smarteye-e-components 0.0.26 → 0.0.28
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/dist/smarteye-e-components.js +27 -1
- package/dist/smarteye-e-components.js.map +1 -1
- package/dist/smarteye-e-components.mjs +2402 -394
- package/dist/smarteye-e-components.mjs.map +1 -1
- package/dist/style.css +1 -1
- package/lib/components/recursion-device-group/index.vue.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,2 +1,28 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");exports.RecursionDeviceGroup=void 0;(e=>{(o=>{function l(a){const i=[];for(let c=0;c<a;c++)i.push({id:"testId",pid:"",name:`device-${c}`,online:c%2==0,channels:[]});return i}function r(a){const i=[];for(let c=0;c<a;c++)i.push({id:`groupid-${c}`,name:`group-${c}`,pid:"",onlineCount:0,totalCount:0,devices:l(4),items:r(a-c-1)});return i}function s(a){return{name:"hah",onlineCount:0,totalCount:0,items:r(a)}}o.RandomDeviceGroup=s})(e.Test||(e.Test={}));function n(o,l){for(let r=0;r<o.length;r++)l(o[r]),n(o[r].items,l)}(o=>{function l(r){const s={},a={};return n(r.items,i=>{s[i.id]=i;for(let c=0;c<i.devices.length;c++)a[i.devices[c].id]=i.devices[c]}),{getGroup(i){return s[i]},getDevice(i){return a[i]},foreachGroup(i){for(let c in s)i(s[c])}}}o.AccessSession=l})(e.Utils||(e.Utils={}))})(exports.RecursionDeviceGroup||(exports.RecursionDeviceGroup={}));const T=t.defineComponent({props:{countInfo:Object,controlParams:Object},setup(e){function n(r,s){if(s){let a=0;return s.items.forEach(i=>{a+=n(r,i)}),r(s)+a}return 0}const o=t.computed(()=>n(r=>{var s,a;if(r.devices){let i=(s=r.devices)==null?void 0:s.filter(u=>u.online);const c=(a=e.controlParams)==null?void 0:a.searchStr;return c&&(i=i.filter(u=>u.name.includes(c)||u.id.includes(c))),i.length}return 0},e.countInfo));return{totalCount:t.computed(()=>n(r=>{var s;if(r.devices){let a=r.devices;const i=(s=e.controlParams)==null?void 0:s.searchStr;return i&&(a=a.filter(c=>c.name.includes(i)||c.id.includes(i))),a.length}return r.totalCount},e.countInfo)),onlineCount:o}}});const b=(e,n)=>{const o=e.__vccOpts||e;for(const[l,r]of n)o[l]=r;return o},A={class:"root"},R={class:"count-show"};function U(e,n,o,l,r,s){return t.openBlock(),t.createElementBlock("div",A,[t.renderSlot(e.$slots,"default",{},void 0,!0),t.createElementVNode("span",R,t.toDisplayString(e.onlineCount)+"/"+t.toDisplayString(e.totalCount),1)])}const G=b(T,[["render",U],["__scopeId","data-v-1962595f"]]),j=Object.freeze({left:0,top:0,width:16,height:16}),H=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),k=Object.freeze({...j,...H});Object.freeze({...k,body:"",hidden:!1});({...j});const x=Object.freeze({width:null,height:null}),M=Object.freeze({...x,...H});function W(e,n){const o={...e};for(const l in n){const r=n[l],s=typeof r;l in x?(r===null||r&&(s==="string"||s==="number"))&&(o[l]=r):s===typeof o[l]&&(o[l]=l==="rotate"?r%4:r)}return o}const q=/[\s,]+/;function K(e,n){n.split(q).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function J(e,n=0){const o=e.replace(/^-?[0-9.]*/,"");function l(r){for(;r<0;)r+=4;return r%4}if(o===""){const r=parseInt(e);return isNaN(r)?0:l(r)}else if(o!==e){let r=0;switch(o){case"%":r=25;break;case"deg":r=90}if(r){let s=parseFloat(e.slice(0,e.length-o.length));return isNaN(s)?0:(s=s/r,s%1===0?l(s):0)}}return n}const Q=/(-?[0-9.]*[0-9]+[0-9.]*)/g,X=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $(e,n,o){if(n===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*n*o)/o;if(typeof e!="string")return e;const l=e.split(Q);if(l===null||!l.length)return e;const r=[];let s=l.shift(),a=X.test(s);for(;;){if(a){const i=parseFloat(s);isNaN(i)?r.push(s):r.push(Math.ceil(i*n*o)/o)}else r.push(s);if(s=l.shift(),s===void 0)return r.join("");a=!a}}function Y(e,n){const o={...k,...e},l={...M,...n},r={left:o.left,top:o.top,width:o.width,height:o.height};let s=o.body;[o,l].forEach(v=>{const p=[],m=v.hFlip,h=v.vFlip;let _=v.rotate;m?h?_+=2:(p.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),p.push("scale(-1 1)"),r.top=r.left=0):h&&(p.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),p.push("scale(1 -1)"),r.top=r.left=0);let S;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:S=r.height/2+r.top,p.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:p.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:S=r.width/2+r.left,p.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}_%2===1&&(r.left!==r.top&&(S=r.left,r.left=r.top,r.top=S),r.width!==r.height&&(S=r.width,r.width=r.height,r.height=S)),p.length&&(s='<g transform="'+p.join(" ")+'">'+s+"</g>")});const a=l.width,i=l.height,c=r.width,u=r.height;let f,d;return a===null?(d=i===null?"1em":i==="auto"?u:i,f=$(d,c/u)):(f=a==="auto"?c:a,d=i===null?$(f,u/c):i==="auto"?u:i),{attributes:{width:f.toString(),height:d.toString(),viewBox:r.left.toString()+" "+r.top.toString()+" "+c.toString()+" "+u.toString()},body:s}}const Z=/\sid="(\S+)"/g,ee="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let te=0;function oe(e,n=ee){const o=[];let l;for(;l=Z.exec(e);)o.push(l[1]);return o.length&&o.forEach(r=>{const s=typeof n=="function"?n(r):n+(te++).toString(),a=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+s+"$3")}),e}function ne(e,n){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const l in n)o+=" "+l+'="'+n[l]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function re(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ie(e){return'url("data:image/svg+xml,'+re(e)+'")'}const P={...M,inline:!1},se={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},le={display:"inline-block"},C={backgroundColor:"currentColor"},F={backgroundColor:"transparent"},O={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},E={webkitMask:C,mask:C,background:F};for(const e in E){const n=E[e];for(const o in O)n[e+o]=O[o]}const y={};["horizontal","vertical"].forEach(e=>{const n=e.slice(0,1)+"Flip";y[e+"-flip"]=n,y[e.slice(0,1)+"-flip"]=n,y[e+"Flip"]=n});function I(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const ae=(e,n)=>{const o=W(P,n),l={...se},r=n.mode||"svg",s={},a=n.style,i=typeof a=="object"&&!(a instanceof Array)?a:{};for(let m in n){const h=n[m];if(h!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":o[m]=h===!0||h==="true"||h===1;break;case"flip":typeof h=="string"&&K(o,h);break;case"color":s.color=h;break;case"rotate":typeof h=="string"?o[m]=J(h):typeof h=="number"&&(o[m]=h);break;case"ariaHidden":case"aria-hidden":h!==!0&&h!=="true"&&delete l["aria-hidden"];break;default:{const _=y[m];_?(h===!0||h==="true"||h===1)&&(o[_]=!0):P[m]===void 0&&(l[m]=h)}}}const c=Y(e,o),u=c.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),r==="svg"){l.style={...s,...i},Object.assign(l,u);let m=0,h=n.id;return typeof h=="string"&&(h=h.replace(/-/g,"_")),l.innerHTML=oe(c.body,h?()=>h+"ID"+m++:"iconifyVue"),t.h("svg",l)}const{body:f,width:d,height:g}=e,v=r==="mask"||(r==="bg"?!1:f.indexOf("currentColor")!==-1),p=ne(f,{...u,width:d+"",height:g+""});return l.style={...s,"--svg":ie(p),width:I(u.width),height:I(u.height),...le,...v?C:F,...i},t.h("span",l)},L=Object.create(null);function w(e,n){L[e]=n}const ce=t.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,n=e.icon,o=typeof n=="string"?L[n]:typeof n=="object"?n:null;return o===null||typeof o!="object"||typeof o.body!="string"?this.$slots.default?this.$slots.default():null:ae({...k,...o},e)}});var ue=Object.defineProperty,D=Object.getOwnPropertySymbols,de=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,V=(e,n,o)=>n in e?ue(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,fe=(e,n)=>{for(var o in n||(n={}))de.call(n,o)&&V(e,o,n[o]);if(D)for(var o of D(n))he.call(n,o)&&V(e,o,n[o]);return e};const pe={name:"VirtualList",props:{listData:{type:Object,default:()=>[]},itemSize:{type:Number,default:200}},computed:{listHeight(){return this.listData.length*this.itemSize},visibleCount(){return Math.ceil(this.screenHeight/this.itemSize)},getTransform(){return`translate3d(0,${this.startOffset}px,0)`},visibleData(){return this.listData.slice(this.start,Math.min(this.end,this.listData.length))}},setup(){const e={screenHeight:t.ref(0),startOffset:t.ref(0),start:t.ref(0),end:t.ref(0)},n=t.ref();return fe({virList:n},e)},mounted(){this.screenHeight=this.$el.clientHeight,this.screenHeight==0&&(this.screenHeight=400),this.start=0,this.end=this.start+this.visibleCount},methods:{scrollEvent(){if(this.virList){let e=this.virList.scrollTop;this.start=Math.floor(e/this.itemSize),this.end=this.start+this.visibleCount,this.startOffset=e-e%this.itemSize}}}};function ve(e,n,o,l,r,s){return t.openBlock(),t.createElementBlock("div",{ref:"virList",class:"infinite-list-container",onScroll:n[0]||(n[0]=a=>s.scrollEvent())},[t.createElementVNode("div",{class:"infinite-list-phantom",style:t.normalizeStyle({height:s.listHeight+"px"})},null,4),t.createElementVNode("div",{class:"infinite-list",style:t.normalizeStyle({transform:s.getTransform})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.visibleData,a=>(t.openBlock(),t.createElementBlock("div",{ref_for:!0,ref:"items",class:"infinite-list-item",key:a.id,style:t.normalizeStyle({height:o.itemSize+"px",lineHeight:o.itemSize+"px"})},[t.renderSlot(e.$slots,"default",{data:a},void 0,!0)],4))),128))],4)],544)}const me=b(pe,[["render",ve],["__scopeId","data-v-67c5afcc"]]);var ge=Object.defineProperty,_e=Object.defineProperties,Se=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,N=(e,n,o)=>n in e?ge(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,be=(e,n)=>{for(var o in n||(n={}))we.call(n,o)&&N(e,o,n[o]);if(B)for(var o of B(n))ye.call(n,o)&&N(e,o,n[o]);return e},Ce=(e,n)=>_e(e,Se(n));const ke=t.defineComponent({components:{VirtualList:me,CountShow:G,Icon:ce},name:"group-show",props:{deviceGroup:Object,controlParams:Object},setup(e){const n=t.inject("theme"),o={filterDevice(i){var c,u,f,d;let g=!0;(c=e.controlParams)!=null&&c.searchStr&&(g=i.name.indexOf((u=e.controlParams)==null?void 0:u.searchStr)>=0||i.id.indexOf((f=e.controlParams)==null?void 0:f.searchStr)>=0);let v=!0;return(d=e.controlParams)!=null&&d.onlyShowOnline&&(v=i.online),g&&v},deviceText(i){return i.name.length>0?i.name:i.id}},l={filteredDevices:t.computed(()=>{var i;const c=(i=e.deviceGroup)==null?void 0:i.devices,u=c&&c.filter(d=>o.filterDevice(d))||[];return u.filter(d=>d.online).concat(u.filter(d=>!d.online))})},r=t.computed(()=>l.filteredDevices.value.length>10?"400px":`${l.filteredDevices.value.length*40}px`),s=t.computed(()=>{var i,c;const u=e.controlParams.searchStr;return u.length==0||e.deviceGroup&&((i=e.deviceGroup)==null?void 0:i.name.indexOf(u))>0?!0:(c=e.deviceGroup)==null?void 0:c.devices.find(f=>f.name.indexOf(e.controlParams.searchStr)>=0||f.id.indexOf(e.controlParams.searchStr)>=0)}),a=t.ref(!1);return Ce(be({innerUtils:o},l),{devicePanelHeight:r,showGroup:s,bShow:a,theme:n})}});const $e={key:0,class:"head-op"},Pe={key:1,style:{display:"inline-block",width:"25px"}},Oe=["title"],Ee={class:"group-slot"},Ie={key:0,style:{"margin-left":"26px"}},De=["title"],Ve={class:"device-slot"};function Be(e,n,o,l,r,s){var a;const i=t.resolveComponent("Icon"),c=t.resolveComponent("CountShow"),u=t.resolveComponent("group-show"),f=t.resolveComponent("VirtualList");return e.showGroup?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass("group "+e.theme)},[t.createVNode(c,{countInfo:e.deviceGroup,controlParams:e.controlParams},{default:t.withCtx(()=>{var d,g,v,p,m;return[e.deviceGroup&&e.deviceGroup.devices.length+e.deviceGroup.items.length>0?(t.openBlock(),t.createElementBlock("span",$e,[t.createVNode(i,{icon:e.bShow?"minus":"plus",width:"20",onClick:n[0]||(n[0]=h=>e.bShow=!e.bShow),class:"handle-ls-svg"},null,8,["icon"])])):(t.openBlock(),t.createElementBlock("span",Pe)),t.createElementVNode("span",{class:"group-head-db-click",onDblclick:n[1]||(n[1]=h=>e.bShow=!e.bShow)},[t.createVNode(i,{icon:"group",width:"24",class:"group-avatar"}),t.createElementVNode("span",{class:"group-name",title:(d=e.deviceGroup)==null?void 0:d.name},t.toDisplayString(((g=e.deviceGroup)==null?void 0:g.name)&&((v=e.deviceGroup)==null?void 0:v.name.length)>0?(p=e.deviceGroup)==null?void 0:p.name:(m=e.deviceGroup)==null?void 0:m.id),9,Oe)],32),t.createElementVNode("div",Ee,[t.renderSlot(e.$slots,"group",{group:e.deviceGroup},void 0,!0)])]}),_:3},8,["countInfo","controlParams"]),e.bShow?(t.openBlock(),t.createElementBlock("div",Ie,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((a=e.deviceGroup)==null?void 0:a.items,(d,g)=>(t.openBlock(),t.createBlock(u,{key:g,deviceGroup:d,controlParams:e.controlParams},{group:t.withCtx(({group:v})=>[t.renderSlot(e.$slots,"group",{group:v},void 0,!0)]),device:t.withCtx(({device:v,group:p})=>[t.renderSlot(e.$slots,"device",{device:v,group:p},void 0,!0)]),_:2},1032,["deviceGroup","controlParams"]))),128)),t.createElementVNode("div",{class:"device-show-div",style:t.normalizeStyle(`height: ${e.filteredDevices.length>10?"400px":`${e.filteredDevices.length*40}px`}`)},[t.createVNode(f,{"list-data":e.filteredDevices,"item-size":40},{default:t.withCtx(({data:d})=>[t.createElementVNode("div",{class:t.normalizeClass(d.online&&"online-device")},[t.createVNode(i,{icon:"user",width:"16",class:"device-avatar"}),t.createElementVNode("span",{title:d.id,class:"device-name"},t.toDisplayString(e.innerUtils.deviceText(d)),9,De),t.createElementVNode("div",Ve,[t.renderSlot(e.$slots,"device",{device:d,group:e.deviceGroup},void 0,!0)])],2)]),_:3},8,["list-data"])],4)])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0)}const Ne=b(ke,[["render",Be],["__scopeId","data-v-ec49c748"]]),ze={width:1024,height:1024,body:'<path fill="currentColor" d="M384 192v640l384-320.064z"/>'},Ge={width:1024,height:1024,body:'<path fill="currentColor" d="M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384H832zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896z"/>'},je={width:1024,height:1024,body:'<path fill="currentColor" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0a208 208 0 0 1 416 0z"/>'},He={width:1024,height:1024,body:'<path fill="currentColor" d="M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64h352z"/>'},xe={width:1024,height:1024,body:'<path fill="currentColor" d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"/>'};w("right",ze);w("group",Ge);w("user",je);w("plus",He);w("minus",xe);const Me=t.defineComponent({components:{CountShow:G,GroupShow:Ne},props:{deviceGroup:Object,theme:{type:String,default:""}},methods:{onCheckBoxChange(){this.controlParams.onlyShowOnline=!this.controlParams.onlyShowOnline},onSearchChange(){var e;this.inputSearchRef&&(this.controlParams.searchStr=(e=this.inputSearchRef)==null?void 0:e.value)},search(e){this.controlParams.searchStr=e}},setup(e){t.provide("theme",e.theme);const n=t.ref({onlyShowOnline:!1,searchStr:""});return{inputSearchRef:t.ref(),controlParams:n}}});const Fe=e=>(t.pushScopeId("data-v-7e0a8034"),e=e(),t.popScopeId(),e),Le={class:"device-group-list"},Te={class:"search-panel"},Ae=Fe(()=>t.createElementVNode("label",{for:"onlineShow"},"\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907",-1)),Re={class:"device-panel"};function Ue(e,n,o,l,r,s){var a;const i=t.resolveComponent("CountShow"),c=t.resolveComponent("group-show");return t.openBlock(),t.createElementBlock("div",Le,[t.createElementVNode("div",Te,[t.createVNode(i,{countInfo:e.deviceGroup},{default:t.withCtx(()=>[t.createElementVNode("input",{type:"checkbox",id:"onlineShow",value:"onlineShow",onChange:n[0]||(n[0]=(...u)=>e.onCheckBoxChange&&e.onCheckBoxChange(...u))},null,32),Ae]),_:1},8,["countInfo"])]),t.createElementVNode("div",Re,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((a=e.deviceGroup)==null?void 0:a.items,(u,f)=>(t.openBlock(),t.createBlock(c,{controlParams:e.controlParams,key:f,deviceGroup:u},{group:t.withCtx(({group:d})=>[t.renderSlot(e.$slots,"group",{group:d},void 0,!0)]),device:t.withCtx(({device:d,group:g})=>[t.renderSlot(e.$slots,"device",{device:d,group:g},void 0,!0)]),_:2},1032,["controlParams","deviceGroup"]))),128))])])}const We=b(Me,[["render",Ue],["__scopeId","data-v-7e0a8034"]]),z={RecursionDeviceGroup:We},qe={install(e){for(const n in z){const o=z[n];e.component(n,o)}}};exports.default=qe;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue");exports.RecursionDeviceGroup=void 0;(e=>{(n=>{function r(s){const i=[];for(let l=0;l<s;l++)i.push({id:"testId",pid:"",name:`device-${l}`,online:l%2==0,channels:[]});return i}function o(s){const i=[];for(let l=0;l<s;l++)i.push({id:`groupid-${l}`,name:`group-${l}`,pid:"",onlineCount:0,totalCount:0,devices:r(14),items:o(s-l-1)});return i}function a(s){return{name:"hah",onlineCount:0,totalCount:0,items:o(s)}}n.RandomDeviceGroup=a})(e.Test||(e.Test={}));function t(n,r){for(let o=0;o<n.length;o++)r(n[o]),t(n[o].items,r)}(n=>{function r(o){const a={},s={};return t(o.items,i=>{a[i.id]=i;for(let l=0;l<i.devices.length;l++)s[i.devices[l].id]=i.devices[l]}),{getGroup(i){return a[i]},getDevice(i){return s[i]},foreachGroup(i){for(let l in a)i(a[l])}}}n.AccessSession=r})(e.Utils||(e.Utils={}))})(exports.RecursionDeviceGroup||(exports.RecursionDeviceGroup={}));const Hn=c.defineComponent({props:{countInfo:Object,controlParams:Object},setup(e){function t(o,a){if(a){let s=0;return a.items.forEach(i=>{s+=t(o,i)}),o(a)+s}return 0}const n=c.computed(()=>t(o=>{var a,s;if(o.devices){let i=(a=o.devices)==null?void 0:a.filter(u=>u.online);const l=(s=e.controlParams)==null?void 0:s.searchStr;return l&&(i=i.filter(u=>u.name.includes(l)||u.id.includes(l))),i.length}return 0},e.countInfo));return{totalCount:c.computed(()=>t(o=>{var a;if(o.devices){let s=o.devices;const i=(a=e.controlParams)==null?void 0:a.searchStr;return i&&(s=s.filter(l=>l.name.includes(i)||l.id.includes(i))),s.length}return o.totalCount},e.countInfo)),onlineCount:n}}});const be=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},jn={class:"root"},zn={class:"count-show"};function Yn(e,t,n,r,o,a){return c.openBlock(),c.createElementBlock("div",jn,[c.renderSlot(e.$slots,"default",{total:e.totalCount,online:e.onlineCount},void 0,!0),c.createElementVNode("span",zn,c.toDisplayString(e.onlineCount)+"/"+c.toDisplayString(e.totalCount),1)])}const Ut=be(Hn,[["render",Yn],["__scopeId","data-v-a063c331"]]),$t=Object.freeze({left:0,top:0,width:16,height:16}),xt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Ge=Object.freeze({...$t,...xt});Object.freeze({...Ge,body:"",hidden:!1});({...$t});const Wt=Object.freeze({width:null,height:null}),Gt=Object.freeze({...Wt,...xt});function Kn(e,t){const n={...e};for(const r in t){const o=t[r],a=typeof o;r in Wt?(o===null||o&&(a==="string"||a==="number"))&&(n[r]=o):a===typeof n[r]&&(n[r]=r==="rotate"?o%4:o)}return n}const Xn=/[\s,]+/;function Qn(e,t){t.split(Xn).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function qn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let a=parseFloat(e.slice(0,e.length-n.length));return isNaN(a)?0:(a=a/o,a%1===0?r(a):0)}}return t}const Jn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Zn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function tt(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(Jn);if(r===null||!r.length)return e;const o=[];let a=r.shift(),s=Zn.test(a);for(;;){if(s){const i=parseFloat(a);isNaN(i)?o.push(a):o.push(Math.ceil(i*t*n)/n)}else o.push(a);if(a=r.shift(),a===void 0)return o.join("");s=!s}}function eo(e,t){const n={...Ge,...e},r={...Gt,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let a=n.body;[n,r].forEach(E=>{const N=[],O=E.hFlip,v=E.vFlip;let T=E.rotate;O?v?T+=2:(N.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),N.push("scale(-1 1)"),o.top=o.left=0):v&&(N.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),N.push("scale(1 -1)"),o.top=o.left=0);let b;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:b=o.height/2+o.top,N.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:N.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:b=o.width/2+o.left,N.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}T%2===1&&(o.left!==o.top&&(b=o.left,o.left=o.top,o.top=b),o.width!==o.height&&(b=o.width,o.width=o.height,o.height=b)),N.length&&(a='<g transform="'+N.join(" ")+'">'+a+"</g>")});const s=r.width,i=r.height,l=o.width,u=o.height;let g,_;return s===null?(_=i===null?"1em":i==="auto"?u:i,g=tt(_,l/u)):(g=s==="auto"?l:s,_=i===null?tt(g,u/l):i==="auto"?u:i),{attributes:{width:g.toString(),height:_.toString(),viewBox:o.left.toString()+" "+o.top.toString()+" "+l.toString()+" "+u.toString()},body:a}}const to=/\sid="(\S+)"/g,no="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let oo=0;function ro(e,t=no){const n=[];let r;for(;r=to.exec(e);)n.push(r[1]);return n.length&&n.forEach(o=>{const a=typeof t=="function"?t(o):t+(oo++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+"$3")}),e}function so(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function ao(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function lo(e){return'url("data:image/svg+xml,'+ao(e)+'")'}const nt={...Gt,inline:!1},io={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},co={display:"inline-block"},Ae={backgroundColor:"currentColor"},Bt={backgroundColor:"transparent"},ot={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},rt={webkitMask:Ae,mask:Ae,background:Bt};for(const e in rt){const t=rt[e];for(const n in ot)t[e+n]=ot[n]}const Ee={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";Ee[e+"-flip"]=t,Ee[e.slice(0,1)+"-flip"]=t,Ee[e+"Flip"]=t});function st(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const uo=(e,t)=>{const n=Kn(nt,t),r={...io},o=t.mode||"svg",a={},s=t.style,i=typeof s=="object"&&!(s instanceof Array)?s:{};for(let O in t){const v=t[O];if(v!==void 0)switch(O){case"icon":case"style":case"onLoad":case"mode":break;case"inline":case"hFlip":case"vFlip":n[O]=v===!0||v==="true"||v===1;break;case"flip":typeof v=="string"&&Qn(n,v);break;case"color":a.color=v;break;case"rotate":typeof v=="string"?n[O]=qn(v):typeof v=="number"&&(n[O]=v);break;case"ariaHidden":case"aria-hidden":v!==!0&&v!=="true"&&delete r["aria-hidden"];break;default:{const T=Ee[O];T?(v===!0||v==="true"||v===1)&&(n[T]=!0):nt[O]===void 0&&(r[O]=v)}}}const l=eo(e,n),u=l.attributes;if(n.inline&&(a.verticalAlign="-0.125em"),o==="svg"){r.style={...a,...i},Object.assign(r,u);let O=0,v=t.id;return typeof v=="string"&&(v=v.replace(/-/g,"_")),r.innerHTML=ro(l.body,v?()=>v+"ID"+O++:"iconifyVue"),c.h("svg",r)}const{body:g,width:_,height:m}=e,E=o==="mask"||(o==="bg"?!1:g.indexOf("currentColor")!==-1),N=so(g,{...u,width:_+"",height:m+""});return r.style={...a,"--svg":lo(N),width:st(u.width),height:st(u.height),...co,...E?Ae:Bt,...i},c.h("span",r)},Ht=Object.create(null);function ie(e,t){Ht[e]=t}const fo=c.defineComponent({inheritAttrs:!1,render(){const e=this.$attrs,t=e.icon,n=typeof t=="string"?Ht[t]:typeof t=="object"?t:null;return n===null||typeof n!="object"||typeof n.body!="string"?this.$slots.default?this.$slots.default():null:uo({...Ge,...n},e)}});var mo=Object.defineProperty,_o=Object.defineProperties,go=Object.getOwnPropertyDescriptors,at=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,ho=Object.prototype.propertyIsEnumerable,lt=(e,t,n)=>t in e?mo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,it=(e,t)=>{for(var n in t||(t={}))po.call(t,n)&<(e,n,t[n]);if(at)for(var n of at(t))ho.call(t,n)&<(e,n,t[n]);return e},Eo=(e,t)=>_o(e,go(t)),vo=(e,t,n)=>new Promise((r,o)=>{var a=l=>{try{i(n.next(l))}catch(u){o(u)}},s=l=>{try{i(n.throw(l))}catch(u){o(u)}},i=l=>l.done?r(l.value):Promise.resolve(l.value).then(a,s);i((n=n.apply(e,t)).next())});const No={name:"VirtualList",props:{listData:{type:Object,default:()=>[]},itemSize:{type:Number,default:200}},setup(e){const t={screenHeight:c.ref(0),startOffset:c.ref(0),start:c.ref(0),end:c.ref(0)},n=c.ref(),r={listHeight:c.computed(()=>e.listData.length*e.itemSize),visibleCount:c.computed(()=>Math.ceil(t.screenHeight.value/e.itemSize)),getTransform:c.computed(()=>`translate3d(0,${t.startOffset.value}px,0)`),visibleData:c.computed(()=>e.listData.slice(t.start.value,Math.min(t.end.value,e.listData.length)))};return it(Eo(it({},r),{virList:n}),t)},mounted(){this.init(),c.watch(()=>this.listData.length,()=>vo(this,null,function*(){yield this.$nextTick(),this.init()}))},methods:{init(){this.screenHeight=this.$el.clientHeight,this.screenHeight==0&&(this.screenHeight=400),this.start=0,this.end=this.start+this.visibleCount},scrollEvent(){if(this.virList){let e=this.virList.scrollTop;this.start=Math.floor(e/this.itemSize),this.end=this.start+this.visibleCount,this.startOffset=e-e%this.itemSize}}}};function bo(e,t,n,r,o,a){return c.openBlock(),c.createElementBlock("div",{ref:"virList",class:"infinite-list-container",onScroll:t[0]||(t[0]=s=>a.scrollEvent())},[c.createElementVNode("div",{class:"infinite-list-phantom",style:c.normalizeStyle({height:e.listHeight+"px"})},null,4),c.createElementVNode("div",{class:"infinite-list",style:c.normalizeStyle({transform:e.getTransform})},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(e.visibleData,s=>(c.openBlock(),c.createElementBlock("div",{ref_for:!0,ref:"items",class:"infinite-list-item",key:s.id,style:c.normalizeStyle({height:n.itemSize+"px",lineHeight:n.itemSize+"px"})},[c.renderSlot(e.$slots,"default",{data:s},void 0,!0)],4))),128))],4)],544)}const Oo=be(No,[["render",bo],["__scopeId","data-v-12d2a294"]]);var To=Object.defineProperty,Io=Object.defineProperties,So=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,Lo=Object.prototype.hasOwnProperty,yo=Object.prototype.propertyIsEnumerable,ut=(e,t,n)=>t in e?To(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Do=(e,t)=>{for(var n in t||(t={}))Lo.call(t,n)&&ut(e,n,t[n]);if(ct)for(var n of ct(t))yo.call(t,n)&&ut(e,n,t[n]);return e},Co=(e,t)=>Io(e,So(t));const Ao=c.defineComponent({components:{VirtualList:Oo,CountShow:Ut,Icon:fo},name:"group-show",props:{deviceGroup:Object,controlParams:Object},setup(e){const t=c.ref(),n=c.inject("theme"),r={filterDevice(l){var u,g,_,m;let E=!0;(u=e.controlParams)!=null&&u.searchStr&&(E=l.name.indexOf((g=e.controlParams)==null?void 0:g.searchStr)>=0||l.id.indexOf((_=e.controlParams)==null?void 0:_.searchStr)>=0);let N=!0;return(m=e.controlParams)!=null&&m.onlyShowOnline&&(N=l.online),E&&N},deviceText(l){return l.name.length>0?l.name:l.id},groupText(l){if(l)return l.name.length>0?l.name:l.id}},o={filteredDevices:c.computed(()=>{var l;const u=(l=e.deviceGroup)==null?void 0:l.devices,g=u&&u.filter(m=>r.filterDevice(m))||[];return g.filter(m=>m.online).concat(g.filter(m=>!m.online))})},a=c.computed(()=>o.filteredDevices.value.length>10?"400px":`${o.filteredDevices.value.length*40}px`),s=c.computed(()=>{var l,u;if(e.controlParams){const g=e.controlParams.searchStr;return g.length==0||e.deviceGroup&&((l=e.deviceGroup)==null?void 0:l.name.indexOf(g))>0?!0:(u=e.deviceGroup)==null?void 0:u.devices.find(_=>_.name.indexOf(e.controlParams.searchStr)>=0||_.id.indexOf(e.controlParams.searchStr)>=0)}return!1}),i=c.ref(!1);return Co(Do({innerUtils:r},o),{devicePanelHeight:a,showGroup:s,bShow:i,theme:n,countRef:t})}});const wo={key:0,class:"head-op"},Po={key:1,style:{display:"inline-block",width:"25px"}},ko={key:0,class:"group-head-count"},Ro=["title"],Fo={class:"group-slot"},Vo={key:0,style:{"margin-left":"26px"}},Mo=["title"],Uo={class:"device-slot"};function $o(e,t,n,r,o,a){var s;const i=c.resolveComponent("Icon"),l=c.resolveComponent("CountShow"),u=c.resolveComponent("group-show"),g=c.resolveComponent("VirtualList");return e.showGroup?(c.openBlock(),c.createElementBlock("div",{key:0,class:c.normalizeClass("group "+e.theme)},[c.createVNode(l,{countInfo:e.deviceGroup,controlParams:e.controlParams,ref:"countRef"},{default:c.withCtx(({online:_,total:m})=>{var E,N;return[e.deviceGroup&&e.deviceGroup.devices.length+e.deviceGroup.items.length>0?(c.openBlock(),c.createElementBlock("span",wo,[c.createVNode(i,{icon:e.bShow?"minus":"plus",width:"20",onClick:t[0]||(t[0]=O=>e.bShow=!e.bShow),class:"handle-ls-svg"},null,8,["icon"])])):(c.openBlock(),c.createElementBlock("span",Po)),c.createElementVNode("span",{class:"group-head-db-click",onDblclick:t[1]||(t[1]=O=>e.bShow=!e.bShow)},[c.createVNode(i,{icon:e.bShow?"group":"group-closed",width:"24",class:"group-avatar"},null,8,["icon"]),e.bShow?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("span",ko,c.toDisplayString((E=e.deviceGroup)==null?void 0:E.items.length),1)),c.createElementVNode("span",{class:"group-name",title:(N=e.deviceGroup)==null?void 0:N.name},c.toDisplayString(e.innerUtils.groupText(e.deviceGroup)),9,Ro)],32),c.createElementVNode("div",Fo,[c.renderSlot(e.$slots,"group",{group:e.deviceGroup},void 0,!0)])]}),_:3},8,["countInfo","controlParams"]),e.bShow?(c.openBlock(),c.createElementBlock("div",Vo,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((s=e.deviceGroup)==null?void 0:s.items,(_,m)=>(c.openBlock(),c.createBlock(u,{key:m,deviceGroup:_,controlParams:e.controlParams},{group:c.withCtx(({group:E})=>[c.renderSlot(e.$slots,"group",{group:E},void 0,!0)]),device:c.withCtx(({device:E,group:N})=>[c.renderSlot(e.$slots,"device",{device:E,group:N},void 0,!0)]),_:2},1032,["deviceGroup","controlParams"]))),128)),c.createElementVNode("div",{class:"device-show-div",style:c.normalizeStyle(`height: ${e.filteredDevices.length>10?"400px":`${e.filteredDevices.length*40}px`}`)},[c.createVNode(g,{"list-data":e.filteredDevices,"item-size":40},{default:c.withCtx(({data:_})=>[c.createElementVNode("div",{class:c.normalizeClass(_.online&&"online-device")},[c.createVNode(i,{icon:"user",width:"16",class:"device-avatar"}),c.createElementVNode("span",{title:_.id,class:"device-name"},c.toDisplayString(e.innerUtils.deviceText(_)),9,Mo),c.createElementVNode("div",Uo,[c.renderSlot(e.$slots,"device",{device:_,group:e.deviceGroup},void 0,!0)])],2)]),_:3},8,["list-data"])],4)])):c.createCommentVNode("",!0)],2)):c.createCommentVNode("",!0)}const xo=be(Ao,[["render",$o],["__scopeId","data-v-af859703"]]),Wo={width:1024,height:1024,body:'<path fill="currentColor" d="M384 192v640l384-320.064z"/>'},Go={width:1024,height:1024,body:'<path fill="currentColor" d="M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384H832zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896z"/>'},Bo={width:1024,height:1024,body:'<path fill="currentColor" d="M128 192v640h768V320H485.76L357.504 192H128zm-32-64h287.872l128.384 128H928a32 32 0 0 1 32 32v576a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32z"/>'},Ho={width:1024,height:1024,body:'<path fill="currentColor" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0a208 208 0 0 1 416 0z"/>'},jo={width:1024,height:1024,body:'<path fill="currentColor" d="M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64h352z"/>'},zo={width:1024,height:1024,body:'<path fill="currentColor" d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"/>'};/*!
|
|
2
|
+
* shared v9.2.2
|
|
3
|
+
* (c) 2022 kazuya kawaguchi
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/const Q=typeof window<"u";let H,te;if(process.env.NODE_ENV!=="production"){const e=Q&&window.performance;e&&e.mark&&e.measure&&e.clearMarks&&e.clearMeasures&&(H=t=>e.mark(t),te=(t,n,r)=>{e.measure(t,n,r),e.clearMarks(n),e.clearMarks(r)})}const Yo=/\{([0-9a-zA-Z]+)\}/g;function Be(e,...t){return t.length===1&&D(t[0])&&(t=t[0]),(!t||!t.hasOwnProperty)&&(t={}),e.replace(Yo,(n,r)=>t.hasOwnProperty(r)?t[r]:"")}const Ko=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",q=e=>Ko?Symbol(e):e,Xo=(e,t,n)=>Qo({l:e,k:t,s:n}),Qo=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),F=e=>typeof e=="number"&&isFinite(e),qo=e=>ze(e)==="[object Date]",ve=e=>ze(e)==="[object RegExp]",Oe=e=>S(e)&&Object.keys(e).length===0;function ce(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const $=Object.assign;let ft;const He=()=>ft||(ft=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function mt(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const Jo=Object.prototype.hasOwnProperty;function je(e,t){return Jo.call(e,t)}const P=Array.isArray,R=e=>typeof e=="function",h=e=>typeof e=="string",w=e=>typeof e=="boolean",D=e=>e!==null&&typeof e=="object",jt=Object.prototype.toString,ze=e=>jt.call(e),S=e=>ze(e)==="[object Object]",Zo=e=>e==null?"":P(e)||S(e)&&e.toString===jt?JSON.stringify(e,null,2):String(e),_t=2;function er(e,t=0,n=e.length){const r=e.split(/\r?\n/);let o=0;const a=[];for(let s=0;s<r.length;s++)if(o+=r[s].length+1,o>=t){for(let i=s-_t;i<=s+_t||n>o;i++){if(i<0||i>=r.length)continue;const l=i+1;a.push(`${l}${" ".repeat(3-String(l).length)}| ${r[i]}`);const u=r[i].length;if(i===s){const g=t-(o-u)+1,_=Math.max(1,n>o?u-g:n-t);a.push(" | "+" ".repeat(g)+"^".repeat(_))}else if(i>s){if(n>o){const g=Math.max(Math.min(n-o,u),1);a.push(" | "+"^".repeat(g))}o+=u+1}}break}return a.join(`
|
|
6
|
+
`)}function zt(){const e=new Map;return{events:e,on(n,r){const o=e.get(n);o&&o.push(r)||e.set(n,[r])},off(n,r){const o=e.get(n);o&&o.splice(o.indexOf(r)>>>0,1)},emit(n,r){(e.get(n)||[]).slice().map(o=>o(r)),(e.get("*")||[]).slice().map(o=>o(n,r))}}}/*!
|
|
7
|
+
* message-compiler v9.2.2
|
|
8
|
+
* (c) 2022 kazuya kawaguchi
|
|
9
|
+
* Released under the MIT License.
|
|
10
|
+
*/const M={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,__EXTEND_POINT__:15},tr={[M.EXPECTED_TOKEN]:"Expected token: '{0}'",[M.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[M.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[M.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[M.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[M.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[M.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[M.EMPTY_PLACEHOLDER]:"Empty placeholder",[M.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[M.INVALID_LINKED_FORMAT]:"Invalid linked format",[M.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[M.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[M.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[M.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'"};function Yt(e,t,n={}){const{domain:r,messages:o,args:a}=n,s=process.env.NODE_ENV!=="production"?Be((o||tr)[e]||"",...a||[]):e,i=new SyntaxError(String(s));return i.code=e,t&&(i.location=t),i.domain=r,i}/*!
|
|
11
|
+
* devtools-if v9.2.2
|
|
12
|
+
* (c) 2022 kazuya kawaguchi
|
|
13
|
+
* Released under the MIT License.
|
|
14
|
+
*/const Kt={I18nInit:"i18n:init",FunctionTranslate:"function:translate"};/*!
|
|
15
|
+
* core-base v9.2.2
|
|
16
|
+
* (c) 2022 kazuya kawaguchi
|
|
17
|
+
* Released under the MIT License.
|
|
18
|
+
*/const Z=[];Z[0]={w:[0],i:[3,0],["["]:[4],o:[7]};Z[1]={w:[1],["."]:[2],["["]:[4],o:[7]};Z[2]={w:[2],i:[3,0],[0]:[3,0]};Z[3]={i:[3,0],[0]:[3,0],w:[1,1],["."]:[2,1],["["]:[4,1],o:[7,1]};Z[4]={["'"]:[5,0],['"']:[6,0],["["]:[4,2],["]"]:[1,3],o:8,l:[4,0]};Z[5]={["'"]:[4,0],o:8,l:[5,0]};Z[6]={['"']:[4,0],o:8,l:[6,0]};const nr=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function or(e){return nr.test(e)}function rr(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function sr(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function ar(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:or(t)?rr(t):"*"+t}function lr(e){const t=[];let n=-1,r=0,o=0,a,s,i,l,u,g,_;const m=[];m[0]=()=>{s===void 0?s=i:s+=i},m[1]=()=>{s!==void 0&&(t.push(s),s=void 0)},m[2]=()=>{m[0](),o++},m[3]=()=>{if(o>0)o--,r=4,m[0]();else{if(o=0,s===void 0||(s=ar(s),s===!1))return!1;m[1]()}};function E(){const N=e[n+1];if(r===5&&N==="'"||r===6&&N==='"')return n++,i="\\"+N,m[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a==="\\"&&E())){if(l=sr(a),_=Z[r],u=_[l]||_.l||8,u===8||(r=u[0],u[1]!==void 0&&(g=m[u[1]],g&&(i=a,g()===!1))))return;if(r===7)return t}}const dt=new Map;function ir(e,t){return D(e)?e[t]:null}function cr(e,t){if(!D(e))return null;let n=dt.get(t);if(n||(n=lr(t),n&&dt.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const s=o[n[a]];if(s===void 0)return null;o=s,a++}return o}const ur=e=>e,fr=e=>"",mr="text",_r=e=>e.length===0?"":e.join(""),dr=Zo;function gt(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function gr(e){const t=F(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(F(e.named.count)||F(e.named.n))?F(e.named.count)?e.named.count:F(e.named.n)?e.named.n:t:t}function pr(e,t){t.count||(t.count=e),t.n||(t.n=e)}function hr(e={}){const t=e.locale,n=gr(e),r=D(e.pluralRules)&&h(t)&&R(e.pluralRules[t])?e.pluralRules[t]:gt,o=D(e.pluralRules)&&h(t)&&R(e.pluralRules[t])?gt:void 0,a=T=>T[r(n,T.length,o)],s=e.list||[],i=T=>s[T],l=e.named||{};F(e.pluralIndex)&&pr(n,l);const u=T=>l[T];function g(T){const b=R(e.messages)?e.messages(T):D(e.messages)?e.messages[T]:!1;return b||(e.parent?e.parent.message(T):fr)}const _=T=>e.modifiers?e.modifiers[T]:ur,m=S(e.processor)&&R(e.processor.normalize)?e.processor.normalize:_r,E=S(e.processor)&&R(e.processor.interpolate)?e.processor.interpolate:dr,N=S(e.processor)&&h(e.processor.type)?e.processor.type:mr,v={list:i,named:u,plural:a,linked:(T,...b)=>{const[y,I]=b;let p="text",C="";b.length===1?D(y)?(C=y.modifier||C,p=y.type||p):h(y)&&(C=y||C):b.length===2&&(h(y)&&(C=y||C),h(I)&&(p=I||p));let L=g(T)(v);return p==="vnode"&&P(L)&&C&&(L=L[0]),C?_(C)(L,p):L},message:g,type:N,interpolate:E,normalize:m};return v}let me=null;function Er(e){me=e}function vr(e,t,n){me&&me.emit(Kt.I18nInit,{timestamp:Date.now(),i18n:e,version:t,meta:n})}const Nr=br(Kt.FunctionTranslate);function br(e){return t=>me&&me.emit(e,t)}const B={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,__EXTEND_POINT__:7},Or={[B.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[B.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[B.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[B.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[B.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[B.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale."};function le(e,...t){return Be(Or[e],...t)}function Tr(e,t,n){return[...new Set([n,...P(t)?t:D(t)?Object.keys(t):h(t)?[t]:[n]])]}function Xt(e,t,n){const r=h(n)?n:Ye,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let s=[n];for(;P(s);)s=pt(a,s,t);const i=P(t)||!S(t)?t:t.default?t.default:null;s=h(i)?[i]:i,P(s)&&pt(a,s,!1),o.__localeChainCache.set(r,a)}return a}function pt(e,t,n){let r=!0;for(let o=0;o<t.length&&w(r);o++){const a=t[o];h(a)&&(r=Ir(e,t[o],n))}return r}function Ir(e,t,n){let r;const o=t.split("-");do{const a=o.join("-");r=Sr(e,a,n),o.splice(-1,1)}while(o.length&&r===!0);return r}function Sr(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const o=t.replace(/!/g,"");e.push(o),(P(n)||S(n))&&n[o]&&(r=n[o])}return r}const Lr="9.2.2",Te=-1,Ye="en-US",Ne="",ht=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function yr(){return{upper:(e,t)=>t==="text"&&h(e)?e.toUpperCase():t==="vnode"&&D(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&h(e)?e.toLowerCase():t==="vnode"&&D(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&h(e)?ht(e):t==="vnode"&&D(e)&&"__v_isVNode"in e?ht(e.children):e}}let Dr,Qt;function Cr(e){Qt=e}let qt;function Ar(e){qt=e}let Jt=null;const Et=e=>{Jt=e},wr=()=>Jt;let Zt=null;const vt=e=>{Zt=e},Pr=()=>Zt;let Nt=0;function kr(e={}){const t=h(e.version)?e.version:Lr,n=h(e.locale)?e.locale:Ye,r=P(e.fallbackLocale)||S(e.fallbackLocale)||h(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:n,o=S(e.messages)?e.messages:{[n]:{}},a=S(e.datetimeFormats)?e.datetimeFormats:{[n]:{}},s=S(e.numberFormats)?e.numberFormats:{[n]:{}},i=$({},e.modifiers||{},yr()),l=e.pluralRules||{},u=R(e.missing)?e.missing:null,g=w(e.missingWarn)||ve(e.missingWarn)?e.missingWarn:!0,_=w(e.fallbackWarn)||ve(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,E=!!e.unresolving,N=R(e.postTranslation)?e.postTranslation:null,O=S(e.processor)?e.processor:null,v=w(e.warnHtmlMessage)?e.warnHtmlMessage:!0,T=!!e.escapeParameter,b=R(e.messageCompiler)?e.messageCompiler:Dr,y=R(e.messageResolver)?e.messageResolver:Qt||ir,I=R(e.localeFallbacker)?e.localeFallbacker:qt||Tr,p=D(e.fallbackContext)?e.fallbackContext:void 0,C=R(e.onWarn)?e.onWarn:ce,L=e,V=D(L.__datetimeFormatters)?L.__datetimeFormatters:new Map,G=D(L.__numberFormatters)?L.__numberFormatters:new Map,z=D(L.__meta)?L.__meta:{};Nt++;const Y={version:t,cid:Nt,locale:n,fallbackLocale:r,messages:o,modifiers:i,pluralRules:l,missing:u,missingWarn:g,fallbackWarn:_,fallbackFormat:m,unresolving:E,postTranslation:N,processor:O,warnHtmlMessage:v,escapeParameter:T,messageCompiler:b,messageResolver:y,localeFallbacker:I,fallbackContext:p,onWarn:C,__meta:z};return Y.datetimeFormats=a,Y.numberFormats=s,Y.__datetimeFormatters=V,Y.__numberFormatters=G,process.env.NODE_ENV!=="production"&&(Y.__v_emitter=L.__v_emitter!=null?L.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&vr(Y,t,z),Y}function Ie(e,t){return e instanceof RegExp?e.test(t):e}function en(e,t){return e instanceof RegExp?e.test(t):e}function Ke(e,t,n,r,o){const{missing:a,onWarn:s}=e;if(process.env.NODE_ENV!=="production"){const i=e.__v_emitter;i&&i.emit("missing",{locale:n,key:t,type:o,groupId:`${o}:${t}`})}if(a!==null){const i=a(e,n,t,o);return h(i)?i:t}else return process.env.NODE_ENV!=="production"&&en(r,t)&&s(le(B.NOT_FOUND_KEY,{key:t,locale:n})),t}function ue(e,t,n){const r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}let tn=M.__EXTEND_POINT__;const ye=()=>++tn,J={INVALID_ARGUMENT:tn,INVALID_DATE_ARGUMENT:ye(),INVALID_ISO_DATE_ARGUMENT:ye(),__EXTEND_POINT__:ye()};function ae(e){return Yt(e,null,process.env.NODE_ENV!=="production"?{messages:Rr}:void 0)}const Rr={[J.INVALID_ARGUMENT]:"Invalid arguments",[J.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[J.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string"},bt=()=>"",X=e=>R(e);function Ot(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,messageCompiler:a,fallbackLocale:s,messages:i}=e,[l,u]=we(...t),g=w(u.missingWarn)?u.missingWarn:e.missingWarn,_=w(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn,m=w(u.escapeParameter)?u.escapeParameter:e.escapeParameter,E=!!u.resolvedMessage,N=h(u.default)||w(u.default)?w(u.default)?a?l:()=>l:u.default:n?a?l:()=>l:"",O=n||N!=="",v=h(u.locale)?u.locale:e.locale;m&&Fr(u);let[T,b,y]=E?[l,v,i[v]||{}]:nn(e,l,v,s,_,g),I=T,p=l;if(!E&&!(h(I)||X(I))&&O&&(I=N,p=I),!E&&(!(h(I)||X(I))||!h(b)))return o?Te:l;if(process.env.NODE_ENV!=="production"&&h(I)&&e.messageCompiler==null)return ce(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${l}'.`),l;let C=!1;const L=()=>{C=!0},V=X(I)?I:on(e,l,b,I,p,L);if(C)return I;const G=Ur(e,b,y,u),z=hr(G),Y=Vr(e,V,z),de=r?r(Y,l):Y;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const ge={timestamp:Date.now(),key:h(l)?l:X(I)?I.key:"",locale:b||(X(I)?I.locale:""),format:h(I)?I:X(I)?I.source:"",message:de};ge.meta=$({},e.__meta,wr()||{}),Nr(ge)}return de}function Fr(e){P(e.list)?e.list=e.list.map(t=>h(t)?mt(t):t):D(e.named)&&Object.keys(e.named).forEach(t=>{h(e.named[t])&&(e.named[t]=mt(e.named[t]))})}function nn(e,t,n,r,o,a){const{messages:s,onWarn:i,messageResolver:l,localeFallbacker:u}=e,g=u(e,r,n);let _={},m,E=null,N=n,O=null;const v="translate";for(let T=0;T<g.length;T++){if(m=O=g[T],process.env.NODE_ENV!=="production"&&n!==m&&Ie(o,t)&&i(le(B.FALLBACK_TO_TRANSLATE,{key:t,target:m})),process.env.NODE_ENV!=="production"&&n!==m){const C=e.__v_emitter;C&&C.emit("fallback",{type:v,key:t,from:N,to:O,groupId:`${v}:${t}`})}_=s[m]||{};let b=null,y,I;if(process.env.NODE_ENV!=="production"&&Q&&(b=window.performance.now(),y="intlify-message-resolve-start",I="intlify-message-resolve-end",H&&H(y)),(E=l(_,t))===null&&(E=_[t]),process.env.NODE_ENV!=="production"&&Q){const C=window.performance.now(),L=e.__v_emitter;L&&b&&E&&L.emit("message-resolve",{type:"message-resolve",key:t,message:E,time:C-b,groupId:`${v}:${t}`}),y&&I&&H&&te&&(H(I),te("intlify message resolve",y,I))}if(h(E)||R(E))break;const p=Ke(e,t,m,a,v);p!==t&&(E=p),N=O}return[E,m,_]}function on(e,t,n,r,o,a){const{messageCompiler:s,warnHtmlMessage:i}=e;if(X(r)){const m=r;return m.locale=m.locale||n,m.key=m.key||t,m}if(s==null){const m=()=>r;return m.locale=n,m.key=t,m}let l=null,u,g;process.env.NODE_ENV!=="production"&&Q&&(l=window.performance.now(),u="intlify-message-compilation-start",g="intlify-message-compilation-end",H&&H(u));const _=s(r,Mr(e,n,o,r,i,a));if(process.env.NODE_ENV!=="production"&&Q){const m=window.performance.now(),E=e.__v_emitter;E&&l&&E.emit("message-compilation",{type:"message-compilation",message:r,time:m-l,groupId:`translate:${t}`}),u&&g&&H&&te&&(H(g),te("intlify message compilation",u,g))}return _.locale=n,_.key=t,_.source=r,_}function Vr(e,t,n){let r=null,o,a;process.env.NODE_ENV!=="production"&&Q&&(r=window.performance.now(),o="intlify-message-evaluation-start",a="intlify-message-evaluation-end",H&&H(o));const s=t(n);if(process.env.NODE_ENV!=="production"&&Q){const i=window.performance.now(),l=e.__v_emitter;l&&r&&l.emit("message-evaluation",{type:"message-evaluation",value:s,time:i-r,groupId:`translate:${t.key}`}),o&&a&&H&&te&&(H(a),te("intlify message evaluation",o,a))}return s}function we(...e){const[t,n,r]=e,o={};if(!h(t)&&!F(t)&&!X(t))throw ae(J.INVALID_ARGUMENT);const a=F(t)?String(t):(X(t),t);return F(n)?o.plural=n:h(n)?o.default=n:S(n)&&!Oe(n)?o.named=n:P(n)&&(o.list=n),F(r)?o.plural=r:h(r)?o.default=r:S(r)&&$(o,r),[a,o]}function Mr(e,t,n,r,o,a){return{warnHtmlMessage:o,onError:s=>{if(a&&a(s),process.env.NODE_ENV!=="production"){const i=`Message compilation error: ${s.message}`,l=s.location&&er(r,s.location.start.offset,s.location.end.offset),u=e.__v_emitter;u&&u.emit("compile-error",{message:r,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${n}`}),console.error(l?`${i}
|
|
19
|
+
${l}`:i)}else throw s},onCacheKey:s=>Xo(t,n,s)}}function Ur(e,t,n,r){const{modifiers:o,pluralRules:a,messageResolver:s,fallbackLocale:i,fallbackWarn:l,missingWarn:u,fallbackContext:g}=e,m={locale:t,modifiers:o,pluralRules:a,messages:E=>{let N=s(n,E);if(N==null&&g){const[,,O]=nn(g,E,t,i,l,u);N=s(O,E)}if(h(N)){let O=!1;const T=on(e,E,t,N,E,()=>{O=!0});return O?bt:T}else return X(N)?N:bt}};return e.processor&&(m.processor=e.processor),r.list&&(m.list=r.list),r.named&&(m.named=r.named),F(r.plural)&&(m.pluralIndex=r.plural),m}const Tt=typeof Intl<"u",rn={dateTimeFormat:Tt&&typeof Intl.DateTimeFormat<"u",numberFormat:Tt&&typeof Intl.NumberFormat<"u"};function It(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:s}=e,{__datetimeFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!rn.dateTimeFormat)return a(le(B.CANNOT_FORMAT_DATE)),Ne;const[l,u,g,_]=Pe(...t),m=w(g.missingWarn)?g.missingWarn:e.missingWarn,E=w(g.fallbackWarn)?g.fallbackWarn:e.fallbackWarn,N=!!g.part,O=h(g.locale)?g.locale:e.locale,v=s(e,o,O);if(!h(l)||l==="")return new Intl.DateTimeFormat(O,_).format(u);let T={},b,y=null,I=O,p=null;const C="datetime format";for(let G=0;G<v.length;G++){if(b=p=v[G],process.env.NODE_ENV!=="production"&&O!==b&&Ie(E,l)&&a(le(B.FALLBACK_TO_DATE_FORMAT,{key:l,target:b})),process.env.NODE_ENV!=="production"&&O!==b){const z=e.__v_emitter;z&&z.emit("fallback",{type:C,key:l,from:I,to:p,groupId:`${C}:${l}`})}if(T=n[b]||{},y=T[l],S(y))break;Ke(e,l,b,m,C),I=p}if(!S(y)||!h(b))return r?Te:l;let L=`${b}__${l}`;Oe(_)||(L=`${L}__${JSON.stringify(_)}`);let V=i.get(L);return V||(V=new Intl.DateTimeFormat(b,$({},y,_)),i.set(L,V)),N?V.formatToParts(u):V.format(u)}const sn=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Pe(...e){const[t,n,r,o]=e,a={};let s={},i;if(h(t)){const l=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw ae(J.INVALID_ISO_DATE_ARGUMENT);const u=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();i=new Date(u);try{i.toISOString()}catch{throw ae(J.INVALID_ISO_DATE_ARGUMENT)}}else if(qo(t)){if(isNaN(t.getTime()))throw ae(J.INVALID_DATE_ARGUMENT);i=t}else if(F(t))i=t;else throw ae(J.INVALID_ARGUMENT);return h(n)?a.key=n:S(n)&&Object.keys(n).forEach(l=>{sn.includes(l)?s[l]=n[l]:a[l]=n[l]}),h(r)?a.locale=r:S(r)&&(s=r),S(o)&&(s=o),[a.key||"",i,a,s]}function St(e,t,n){const r=e;for(const o in n){const a=`${t}__${o}`;!r.__datetimeFormatters.has(a)||r.__datetimeFormatters.delete(a)}}function Lt(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:s}=e,{__numberFormatters:i}=e;if(process.env.NODE_ENV!=="production"&&!rn.numberFormat)return a(le(B.CANNOT_FORMAT_NUMBER)),Ne;const[l,u,g,_]=ke(...t),m=w(g.missingWarn)?g.missingWarn:e.missingWarn,E=w(g.fallbackWarn)?g.fallbackWarn:e.fallbackWarn,N=!!g.part,O=h(g.locale)?g.locale:e.locale,v=s(e,o,O);if(!h(l)||l==="")return new Intl.NumberFormat(O,_).format(u);let T={},b,y=null,I=O,p=null;const C="number format";for(let G=0;G<v.length;G++){if(b=p=v[G],process.env.NODE_ENV!=="production"&&O!==b&&Ie(E,l)&&a(le(B.FALLBACK_TO_NUMBER_FORMAT,{key:l,target:b})),process.env.NODE_ENV!=="production"&&O!==b){const z=e.__v_emitter;z&&z.emit("fallback",{type:C,key:l,from:I,to:p,groupId:`${C}:${l}`})}if(T=n[b]||{},y=T[l],S(y))break;Ke(e,l,b,m,C),I=p}if(!S(y)||!h(b))return r?Te:l;let L=`${b}__${l}`;Oe(_)||(L=`${L}__${JSON.stringify(_)}`);let V=i.get(L);return V||(V=new Intl.NumberFormat(b,$({},y,_)),i.set(L,V)),N?V.formatToParts(u):V.format(u)}const an=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ke(...e){const[t,n,r,o]=e,a={};let s={};if(!F(t))throw ae(J.INVALID_ARGUMENT);const i=t;return h(n)?a.key=n:S(n)&&Object.keys(n).forEach(l=>{an.includes(l)?s[l]=n[l]:a[l]=n[l]}),h(r)?a.locale=r:S(r)&&(s=r),S(o)&&(s=o),[a.key||"",i,a,s]}function yt(e,t,n){const r=e;for(const o in n){const a=`${t}__${o}`;!r.__numberFormatters.has(a)||r.__numberFormatters.delete(a)}}typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(He().__INTLIFY_PROD_DEVTOOLS__=!1);function $r(){return ln().__VUE_DEVTOOLS_GLOBAL_HOOK__}function ln(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const xr=typeof Proxy=="function",Wr="devtools-plugin:setup",Gr="plugin:settings:set";let re,Re;function Br(){var e;return re!==void 0||(typeof window<"u"&&window.performance?(re=!0,Re=window.performance):typeof global<"u"&&((e=global.perf_hooks)===null||e===void 0?void 0:e.performance)?(re=!0,Re=global.perf_hooks.performance):re=!1),re}function Hr(){return Br()?Re.now():Date.now()}class jr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const r={};if(t.settings)for(const s in t.settings){const i=t.settings[s];r[s]=i.defaultValue}const o=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},r);try{const s=localStorage.getItem(o),i=JSON.parse(s);Object.assign(a,i)}catch{}this.fallbacks={getSettings(){return a},setSettings(s){try{localStorage.setItem(o,JSON.stringify(s))}catch{}a=s},now(){return Hr()}},n&&n.on(Gr,(s,i)=>{s===this.plugin.id&&this.fallbacks.setSettings(i)}),this.proxiedOn=new Proxy({},{get:(s,i)=>this.target?this.target.on[i]:(...l)=>{this.onQueue.push({method:i,args:l})}}),this.proxiedTarget=new Proxy({},{get:(s,i)=>this.target?this.target[i]:i==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(i)?(...l)=>(this.targetQueue.push({method:i,args:l,resolve:()=>{}}),this.fallbacks[i](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:i,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function zr(e,t){const n=e,r=ln(),o=$r(),a=xr&&n.enableEarlyProxy;if(o&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))o.emit(Wr,e,t);else{const s=a?new jr(n,o):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:s}),s&&t(s.proxiedTarget)}}/*!
|
|
20
|
+
* vue-devtools v9.2.2
|
|
21
|
+
* (c) 2022 kazuya kawaguchi
|
|
22
|
+
* Released under the MIT License.
|
|
23
|
+
*/const De={["vue-devtools-plugin-vue-i18n"]:"Vue I18n devtools",["vue-i18n-resource-inspector"]:"I18n Resources",["vue-i18n-timeline"]:"Vue I18n"},Yr={["vue-i18n-resource-inspector"]:"Search for scopes ..."},Kr={["vue-i18n-timeline"]:16764185};/*!
|
|
24
|
+
* vue-i18n v9.2.2
|
|
25
|
+
* (c) 2022 kazuya kawaguchi
|
|
26
|
+
* Released under the MIT License.
|
|
27
|
+
*/const Xr="9.2.2";function Qr(){let e=!1;typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(He().__INTLIFY_PROD_DEVTOOLS__=!1),process.env.NODE_ENV!=="production"&&e&&console.warn("You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.")}let cn=B.__EXTEND_POINT__;const se=()=>++cn,K={FALLBACK_TO_ROOT:cn,NOT_SUPPORTED_PRESERVE:se(),NOT_SUPPORTED_FORMATTER:se(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:se(),NOT_SUPPORTED_GET_CHOICE_INDEX:se(),COMPONENT_NAME_LEGACY_COMPATIBLE:se(),NOT_FOUND_PARENT_SCOPE:se()},qr={[K.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[K.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[K.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[K.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[K.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[K.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[K.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope."};function Se(e,...t){return Be(qr[e],...t)}let un=M.__EXTEND_POINT__;const W=()=>++un,A={UNEXPECTED_RETURN_TYPE:un,INVALID_ARGUMENT:W(),MUST_BE_CALL_SETUP_TOP:W(),NOT_INSLALLED:W(),NOT_AVAILABLE_IN_LEGACY_MODE:W(),REQUIRED_VALUE:W(),INVALID_VALUE:W(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:W(),NOT_INSLALLED_WITH_PROVIDE:W(),UNEXPECTED_ERROR:W(),NOT_COMPATIBLE_LEGACY_VUE_I18N:W(),BRIDGE_SUPPORT_VUE_2_ONLY:W(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:W(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:W(),__EXTEND_POINT__:W()};function j(e,...t){return Yt(e,null,process.env.NODE_ENV!=="production"?{messages:Jr,args:t}:void 0)}const Jr={[A.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[A.INVALID_ARGUMENT]:"Invalid argument",[A.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[A.NOT_INSLALLED]:"Need to install with `app.use` function",[A.UNEXPECTED_ERROR]:"Unexpected error",[A.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[A.REQUIRED_VALUE]:"Required in value: {0}",[A.INVALID_VALUE]:"Invalid value",[A.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[A.NOT_INSLALLED_WITH_PROVIDE]:"Need to install with `provide` function",[A.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[A.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[A.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define \u2018i18n\u2019 option or custom block in Composition API with using local scope in Legacy API mode",[A.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Fe=q("__transrateVNode"),Ve=q("__datetimeParts"),Me=q("__numberParts"),_e=q("__enableEmitter"),Ue=q("__disableEmitter"),Zr=q("__setPluralRules");q("__intlifyMeta");const es=q("__injectWithOption");function $e(e){if(!D(e))return e;for(const t in e)if(!!je(e,t))if(!t.includes("."))D(e[t])&&$e(e[t]);else{const n=t.split("."),r=n.length-1;let o=e;for(let a=0;a<r;a++)n[a]in o||(o[n[a]]={}),o=o[n[a]];o[n[r]]=e[t],delete e[t],D(o[n[r]])&&$e(o[n[r]])}return e}function fn(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:a}=t,s=S(n)?n:P(r)?{}:{[e]:{}};if(P(r)&&r.forEach(i=>{if("locale"in i&&"resource"in i){const{locale:l,resource:u}=i;l?(s[l]=s[l]||{},fe(u,s[l])):fe(u,s)}else h(i)&&fe(JSON.parse(i),s)}),o==null&&a)for(const i in s)je(s,i)&&$e(s[i]);return s}const he=e=>!D(e)||P(e);function fe(e,t){if(he(e)||he(t))throw j(A.INVALID_VALUE);for(const n in e)je(e,n)&&(he(e[n])||he(t[n])?t[n]=e[n]:fe(e[n],t[n]))}function mn(e){return e.type}function ts(e,t,n){let r=D(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=fn(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(a=>{e.mergeLocaleMessage(a,r[a])});{if(D(t.datetimeFormats)){const a=Object.keys(t.datetimeFormats);a.length&&a.forEach(s=>{e.mergeDateTimeFormat(s,t.datetimeFormats[s])})}if(D(t.numberFormats)){const a=Object.keys(t.numberFormats);a.length&&a.forEach(s=>{e.mergeNumberFormat(s,t.numberFormats[s])})}}}function Dt(e){return c.createVNode(c.Text,null,e,0)}const Ct="__INTLIFY_META__";let At=0;function wt(e){return(t,n,r,o)=>e(n,r,c.getCurrentInstance()||void 0,o)}const ns=()=>{const e=c.getCurrentInstance();let t=null;return e&&(t=mn(e)[Ct])?{[Ct]:t}:null};function _n(e={},t){const{__root:n}=e,r=n===void 0;let o=w(e.inheritLocale)?e.inheritLocale:!0;const a=c.ref(n&&o?n.locale.value:h(e.locale)?e.locale:Ye),s=c.ref(n&&o?n.fallbackLocale.value:h(e.fallbackLocale)||P(e.fallbackLocale)||S(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),i=c.ref(fn(a.value,e)),l=c.ref(S(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),u=c.ref(S(e.numberFormats)?e.numberFormats:{[a.value]:{}});let g=n?n.missingWarn:w(e.missingWarn)||ve(e.missingWarn)?e.missingWarn:!0,_=n?n.fallbackWarn:w(e.fallbackWarn)||ve(e.fallbackWarn)?e.fallbackWarn:!0,m=n?n.fallbackRoot:w(e.fallbackRoot)?e.fallbackRoot:!0,E=!!e.fallbackFormat,N=R(e.missing)?e.missing:null,O=R(e.missing)?wt(e.missing):null,v=R(e.postTranslation)?e.postTranslation:null,T=n?n.warnHtmlMessage:w(e.warnHtmlMessage)?e.warnHtmlMessage:!0,b=!!e.escapeParameter;const y=n?n.modifiers:S(e.modifiers)?e.modifiers:{};let I=e.pluralRules||n&&n.pluralRules,p;p=(()=>{r&&vt(null);const f={version:Xr,locale:a.value,fallbackLocale:s.value,messages:i.value,modifiers:y,pluralRules:I,missing:O===null?void 0:O,missingWarn:g,fallbackWarn:_,fallbackFormat:E,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:T,escapeParameter:b,messageResolver:e.messageResolver,__meta:{framework:"vue"}};f.datetimeFormats=l.value,f.numberFormats=u.value,f.__datetimeFormatters=S(p)?p.__datetimeFormatters:void 0,f.__numberFormatters=S(p)?p.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(f.__v_emitter=S(p)?p.__v_emitter:void 0);const d=kr(f);return r&&vt(d),d})(),ue(p,a.value,s.value);function L(){return[a.value,s.value,i.value,l.value,u.value]}const V=c.computed({get:()=>a.value,set:f=>{a.value=f,p.locale=a.value}}),G=c.computed({get:()=>s.value,set:f=>{s.value=f,p.fallbackLocale=s.value,ue(p,a.value,f)}}),z=c.computed(()=>i.value),Y=c.computed(()=>l.value),de=c.computed(()=>u.value);function ge(){return R(v)?v:null}function vn(f){v=f,p.postTranslation=f}function Nn(){return N}function bn(f){f!==null&&(O=wt(f)),N=f,p.missing=O}function On(f,d){return f!=="translate"||!d.resolvedMessage}const ne=(f,d,x,U,Le,pe)=>{L();let oe;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)try{Et(ns()),r||(p.fallbackContext=n?Pr():void 0),oe=f(p)}finally{Et(null),r||(p.fallbackContext=void 0)}else oe=f(p);if(F(oe)&&oe===Te){const[ee,Bn]=d();if(process.env.NODE_ENV!=="production"&&n&&h(ee)&&On(x,Bn)&&(m&&(Ie(_,ee)||en(g,ee))&&ce(Se(K.FALLBACK_TO_ROOT,{key:ee,type:x})),process.env.NODE_ENV!=="production")){const{__v_emitter:et}=p;et&&m&&et.emit("fallback",{type:x,key:ee,to:"global",groupId:`${x}:${ee}`})}return n&&m?U(n):Le(ee)}else{if(pe(oe))return oe;throw j(A.UNEXPECTED_RETURN_TYPE)}};function Je(...f){return ne(d=>Reflect.apply(Ot,null,[d,...f]),()=>we(...f),"translate",d=>Reflect.apply(d.t,d,[...f]),d=>d,d=>h(d))}function Tn(...f){const[d,x,U]=f;if(U&&!D(U))throw j(A.INVALID_ARGUMENT);return Je(d,x,$({resolvedMessage:!0},U||{}))}function In(...f){return ne(d=>Reflect.apply(It,null,[d,...f]),()=>Pe(...f),"datetime format",d=>Reflect.apply(d.d,d,[...f]),()=>Ne,d=>h(d))}function Sn(...f){return ne(d=>Reflect.apply(Lt,null,[d,...f]),()=>ke(...f),"number format",d=>Reflect.apply(d.n,d,[...f]),()=>Ne,d=>h(d))}function Ln(f){return f.map(d=>h(d)||F(d)||w(d)?Dt(String(d)):d)}const yn={normalize:Ln,interpolate:f=>f,type:"vnode"};function Dn(...f){return ne(d=>{let x;const U=d;try{U.processor=yn,x=Reflect.apply(Ot,null,[U,...f])}finally{U.processor=null}return x},()=>we(...f),"translate",d=>d[Fe](...f),d=>[Dt(d)],d=>P(d))}function Cn(...f){return ne(d=>Reflect.apply(Lt,null,[d,...f]),()=>ke(...f),"number format",d=>d[Me](...f),()=>[],d=>h(d)||P(d))}function An(...f){return ne(d=>Reflect.apply(It,null,[d,...f]),()=>Pe(...f),"datetime format",d=>d[Ve](...f),()=>[],d=>h(d)||P(d))}function wn(f){I=f,p.pluralRules=I}function Pn(f,d){const x=h(d)?d:a.value,U=Ze(x);return p.messageResolver(U,f)!==null}function kn(f){let d=null;const x=Xt(p,s.value,a.value);for(let U=0;U<x.length;U++){const Le=i.value[x[U]]||{},pe=p.messageResolver(Le,f);if(pe!=null){d=pe;break}}return d}function Rn(f){const d=kn(f);return d!=null?d:n?n.tm(f)||{}:{}}function Ze(f){return i.value[f]||{}}function Fn(f,d){i.value[f]=d,p.messages=i.value}function Vn(f,d){i.value[f]=i.value[f]||{},fe(d,i.value[f]),p.messages=i.value}function Mn(f){return l.value[f]||{}}function Un(f,d){l.value[f]=d,p.datetimeFormats=l.value,St(p,f,d)}function $n(f,d){l.value[f]=$(l.value[f]||{},d),p.datetimeFormats=l.value,St(p,f,d)}function xn(f){return u.value[f]||{}}function Wn(f,d){u.value[f]=d,p.numberFormats=u.value,yt(p,f,d)}function Gn(f,d){u.value[f]=$(u.value[f]||{},d),p.numberFormats=u.value,yt(p,f,d)}At++,n&&Q&&(c.watch(n.locale,f=>{o&&(a.value=f,p.locale=f,ue(p,a.value,s.value))}),c.watch(n.fallbackLocale,f=>{o&&(s.value=f,p.fallbackLocale=f,ue(p,a.value,s.value))}));const k={id:At,locale:V,fallbackLocale:G,get inheritLocale(){return o},set inheritLocale(f){o=f,f&&n&&(a.value=n.locale.value,s.value=n.fallbackLocale.value,ue(p,a.value,s.value))},get availableLocales(){return Object.keys(i.value).sort()},messages:z,get modifiers(){return y},get pluralRules(){return I||{}},get isGlobal(){return r},get missingWarn(){return g},set missingWarn(f){g=f,p.missingWarn=g},get fallbackWarn(){return _},set fallbackWarn(f){_=f,p.fallbackWarn=_},get fallbackRoot(){return m},set fallbackRoot(f){m=f},get fallbackFormat(){return E},set fallbackFormat(f){E=f,p.fallbackFormat=E},get warnHtmlMessage(){return T},set warnHtmlMessage(f){T=f,p.warnHtmlMessage=f},get escapeParameter(){return b},set escapeParameter(f){b=f,p.escapeParameter=f},t:Je,getLocaleMessage:Ze,setLocaleMessage:Fn,mergeLocaleMessage:Vn,getPostTranslationHandler:ge,setPostTranslationHandler:vn,getMissingHandler:Nn,setMissingHandler:bn,[Zr]:wn};return k.datetimeFormats=Y,k.numberFormats=de,k.rt=Tn,k.te=Pn,k.tm=Rn,k.d=In,k.n=Sn,k.getDateTimeFormat=Mn,k.setDateTimeFormat=Un,k.mergeDateTimeFormat=$n,k.getNumberFormat=xn,k.setNumberFormat=Wn,k.mergeNumberFormat=Gn,k[es]=e.__injectWithOption,k[Fe]=Dn,k[Ve]=An,k[Me]=Cn,process.env.NODE_ENV!=="production"&&(k[_e]=f=>{p.__v_emitter=f},k[Ue]=()=>{p.__v_emitter=void 0}),k}const Xe={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function os({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>r=[...r,...P(o.children)?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},{})}function dn(e){return c.Fragment}const Ce={name:"i18n-t",props:$({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>F(e)||!isNaN(e)}},Xe),setup(e,t){const{slots:n,attrs:r}=t,o=e.i18n||qe({useScope:e.scope,__useComponent:!0});return()=>{const a=Object.keys(n).filter(_=>_!=="_"),s={};e.locale&&(s.locale=e.locale),e.plural!==void 0&&(s.plural=h(e.plural)?+e.plural:e.plural);const i=os(t,a),l=o[Fe](e.keypath,i,s),u=$({},r),g=h(e.tag)||D(e.tag)?e.tag:dn();return c.h(g,u,l)}}};function rs(e){return P(e)&&!h(e[0])}function gn(e,t,n,r){const{slots:o,attrs:a}=t;return()=>{const s={part:!0};let i={};e.locale&&(s.locale=e.locale),h(e.format)?s.key=e.format:D(e.format)&&(h(e.format.key)&&(s.key=e.format.key),i=Object.keys(e.format).reduce((m,E)=>n.includes(E)?$({},m,{[E]:e.format[E]}):m,{}));const l=r(e.value,s,i);let u=[s.key];P(l)?u=l.map((m,E)=>{const N=o[m.type],O=N?N({[m.type]:m.value,index:E,parts:l}):[m.value];return rs(O)&&(O[0].key=`${m.type}-${E}`),O}):h(l)&&(u=[l]);const g=$({},a),_=h(e.tag)||D(e.tag)?e.tag:dn();return c.h(_,g,u)}}const Pt={name:"i18n-n",props:$({value:{type:Number,required:!0},format:{type:[String,Object]}},Xe),setup(e,t){const n=e.i18n||qe({useScope:"parent",__useComponent:!0});return gn(e,t,an,(...r)=>n[Me](...r))}},kt={name:"i18n-d",props:$({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Xe),setup(e,t){const n=e.i18n||qe({useScope:"parent",__useComponent:!0});return gn(e,t,sn,(...r)=>n[Ve](...r))}};function ss(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function as(e){const t=s=>{const{instance:i,modifiers:l,value:u}=s;if(!i||!i.$)throw j(A.UNEXPECTED_ERROR);const g=ss(e,i.$);process.env.NODE_ENV!=="production"&&l.preserve&&ce(Se(K.NOT_SUPPORTED_PRESERVE));const _=Rt(u);return[Reflect.apply(g.t,g,[...Ft(_)]),g]};return{created:(s,i)=>{const[l,u]=t(i);Q&&e.global===u&&(s.__i18nWatcher=c.watch(u.locale,()=>{i.instance&&i.instance.$forceUpdate()})),s.__composer=u,s.textContent=l},unmounted:s=>{Q&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:i})=>{if(s.__composer){const l=s.__composer,u=Rt(i);s.textContent=Reflect.apply(l.t,l,[...Ft(u)])}},getSSRProps:s=>{const[i]=t(s);return{textContent:i}}}}function Rt(e){if(h(e))return{path:e};if(S(e)){if(!("path"in e))throw j(A.REQUIRED_VALUE,"path");return e}else throw j(A.INVALID_VALUE)}function Ft(e){const{path:t,locale:n,args:r,choice:o,plural:a}=e,s={},i=r||{};return h(n)&&(s.locale=n),F(o)&&(s.plural=o),F(a)&&(s.plural=a),[t,i,s]}function ls(e,t,...n){const r=S(n[0])?n[0]:{},o=!!r.useI18nComponentName,a=w(r.globalInstall)?r.globalInstall:!0;process.env.NODE_ENV!=="production"&&a&&o&&ce(Se(K.COMPONENT_NAME_LEGACY_COMPATIBLE,{name:Ce.name})),a&&(e.component(o?"i18n":Ce.name,Ce),e.component(Pt.name,Pt),e.component(kt.name,kt)),e.directive("t",as(t))}const pn="vue-i18n: composer properties";let xe;async function is(e,t){return new Promise((n,r)=>{try{zr({id:"vue-devtools-plugin-vue-i18n",label:De["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[pn],app:e},o=>{xe=o,o.on.visitComponentTree(({componentInstance:s,treeNode:i})=>{cs(s,i,t)}),o.on.inspectComponent(({componentInstance:s,instanceData:i})=>{s.vnode.el&&s.vnode.el.__VUE_I18N__&&i&&(t.mode==="legacy"?s.vnode.el.__VUE_I18N__!==t.global.__composer&&Vt(i,s.vnode.el.__VUE_I18N__):Vt(i,s.vnode.el.__VUE_I18N__))}),o.addInspector({id:"vue-i18n-resource-inspector",label:De["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:Yr["vue-i18n-resource-inspector"]}),o.on.getInspectorTree(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&ds(s,t)});const a=new Map;o.on.getInspectorState(async s=>{if(s.app===e&&s.inspectorId==="vue-i18n-resource-inspector")if(o.unhighlightElement(),ps(s,t),s.nodeId==="global"){if(!a.has(s.app)){const[i]=await o.getComponentInstances(s.app);a.set(s.app,i)}o.highlightElement(a.get(s.app))}else{const i=gs(s.nodeId,t);i&&o.highlightElement(i)}}),o.on.editInspectorState(s=>{s.app===e&&s.inspectorId==="vue-i18n-resource-inspector"&&Es(s,t)}),o.addTimelineLayer({id:"vue-i18n-timeline",label:De["vue-i18n-timeline"],color:Kr["vue-i18n-timeline"]}),n(!0)})}catch(o){console.error(o),r(!1)}})}function hn(e){return e.type.name||e.type.displayName||e.type.__file||"Anonymous"}function cs(e,t,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(e&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&e.vnode.el.__VUE_I18N__!==r){const o={label:`i18n (${hn(e)} Scope)`,textColor:0,backgroundColor:16764185};t.tags.push(o)}}function Vt(e,t){const n=pn;e.state.push({type:n,key:"locale",editable:!0,value:t.locale.value}),e.state.push({type:n,key:"availableLocales",editable:!1,value:t.availableLocales}),e.state.push({type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value}),e.state.push({type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}),e.state.push({type:n,key:"messages",editable:!1,value:Qe(t.messages.value)}),e.state.push({type:n,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}),e.state.push({type:n,key:"numberFormats",editable:!1,value:t.numberFormats.value})}function Qe(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];R(r)&&"source"in r?t[n]=_s(r):D(r)?t[n]=Qe(r):t[n]=r}),t}const us={"<":"<",">":">",'"':""","&":"&"};function fs(e){return e.replace(/[<>"&]/g,ms)}function ms(e){return us[e]||e}function _s(e){const t=e.source?`("${fs(e.source)}")`:"(?)";return{_custom:{type:"function",display:`<span>\u0192</span> ${t}`}}}function ds(e,t){e.rootNodes.push({id:"global",label:"Global Scope"});const n=t.mode==="composition"?t.global:t.global.__composer;for(const[r,o]of t.__instances){const a=t.mode==="composition"?o:o.__composer;n!==a&&e.rootNodes.push({id:a.id.toString(),label:`${hn(r)} Scope`})}}function gs(e,t){let n=null;if(e!=="global"){for(const[r,o]of t.__instances.entries())if(o.id.toString()===e){n=r;break}}return n}function En(e,t){if(e==="global")return t.mode==="composition"?t.global:t.global.__composer;{const n=Array.from(t.__instances.values()).find(r=>r.id.toString()===e);return n?t.mode==="composition"?n:n.__composer:null}}function ps(e,t){const n=En(e.nodeId,t);return n&&(e.state=hs(n)),null}function hs(e){const t={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:e.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:e.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}];t[n]=r;const o="Locale messages info",a=[{type:o,key:"messages",editable:!1,value:Qe(e.messages.value)}];t[o]=a;{const s="Datetime formats info",i=[{type:s,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}];t[s]=i;const l="Datetime formats info",u=[{type:l,key:"numberFormats",editable:!1,value:e.numberFormats.value}];t[l]=u}return t}function We(e,t){if(xe){let n;t&&"groupId"in t&&(n=t.groupId,delete t.groupId),xe.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:e,groupId:n,time:Date.now(),meta:{},data:t||{},logType:e==="compile-error"?"error":e==="fallback"||e==="missing"?"warning":"default"}})}}function Es(e,t){const n=En(e.nodeId,t);if(n){const[r]=e.path;r==="locale"&&h(e.state.value)?n.locale.value=e.state.value:r==="fallbackLocale"&&(h(e.state.value)||P(e.state.value)||D(e.state.value))?n.fallbackLocale.value=e.state.value:r==="inheritLocale"&&w(e.state.value)&&(n.inheritLocale=e.state.value)}}const vs=q("global-vue-i18n");function Ns(e={},t){const n=w(e.globalInjection)?e.globalInjection:!0,r=!0,o=new Map,[a,s]=bs(e),i=q(process.env.NODE_ENV!=="production"?"vue-i18n":"");function l(_){return o.get(_)||null}function u(_,m){o.set(_,m)}function g(_){o.delete(_)}{const _={get mode(){return"composition"},get allowComposition(){return r},async install(m,...E){process.env.NODE_ENV!=="production"&&(m.__VUE_I18N__=_),m.__VUE_I18N_SYMBOL__=i,m.provide(m.__VUE_I18N_SYMBOL__,_),n&&Cs(m,_.global),ls(m,_,...E);const N=m.unmount;if(m.unmount=()=>{_.dispose(),N()},process.env.NODE_ENV!=="production"||!1){if(!await is(m,_))throw j(A.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const v=zt();{const T=s;T[_e]&&T[_e](v)}v.on("*",We)}},get global(){return s},dispose(){a.stop()},__instances:o,__getInstance:l,__setInstance:u,__deleteInstance:g};return _}}function qe(e={}){const t=c.getCurrentInstance();if(t==null)throw j(A.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw j(A.NOT_INSLALLED);const n=Os(t),r=Is(n),o=mn(t),a=Ts(e,o);if(a==="global")return ts(r,e,o),r;if(a==="parent"){let l=Ss(n,t,e.__useComponent);return l==null&&(process.env.NODE_ENV!=="production"&&ce(Se(K.NOT_FOUND_PARENT_SCOPE)),l=r),l}const s=n;let i=s.__getInstance(t);if(i==null){const l=$({},e);"__i18n"in o&&(l.__i18n=o.__i18n),r&&(l.__root=r),i=_n(l),Ls(s,t,i),s.__setInstance(t,i)}return i}function bs(e,t,n){const r=c.effectScope();{const o=r.run(()=>_n(e));if(o==null)throw j(A.UNEXPECTED_ERROR);return[r,o]}}function Os(e){{const t=c.inject(e.isCE?vs:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw j(e.isCE?A.NOT_INSLALLED_WITH_PROVIDE:A.UNEXPECTED_ERROR);return t}}function Ts(e,t){return Oe(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Is(e){return e.mode==="composition"?e.global:e.global.__composer}function Ss(e,t,n=!1){let r=null;const o=t.root;let a=t.parent;for(;a!=null;){const s=e;if(e.mode==="composition"&&(r=s.__getInstance(a)),r!=null||o===a)break;a=a.parent}return r}function Ls(e,t,n){let r=null;c.onMounted(()=>{if((process.env.NODE_ENV!=="production"||!1)&&!0&&t.vnode.el){t.vnode.el.__VUE_I18N__=n,r=zt();const o=n;o[_e]&&o[_e](r),r.on("*",We)}},t),c.onUnmounted(()=>{if((process.env.NODE_ENV!=="production"||!1)&&!0&&t.vnode.el&&t.vnode.el.__VUE_I18N__){r&&r.off("*",We);const o=n;o[Ue]&&o[Ue](),delete t.vnode.el.__VUE_I18N__}e.__deleteInstance(t)},t)}const ys=["locale","fallbackLocale","availableLocales"],Ds=["t","rt","d","n","tm"];function Cs(e,t){const n=Object.create(null);ys.forEach(r=>{const o=Object.getOwnPropertyDescriptor(t,r);if(!o)throw j(A.UNEXPECTED_ERROR);const a=c.isRef(o.value)?{get(){return o.value.value},set(s){o.value.value=s}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,r,a)}),e.config.globalProperties.$i18n=n,Ds.forEach(r=>{const o=Object.getOwnPropertyDescriptor(t,r);if(!o||!o.value)throw j(A.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${r}`,o)})}Cr(cr);Ar(Xt);Qr();if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=He();e.__INTLIFY__=!0,Er(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const As={"zhi-xian-shi-zai-xian-she-bei":e=>{const{normalize:t}=e;return t(["\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907"])}},ws={"zhi-xian-shi-zai-xian-she-bei":e=>{const{normalize:t}=e;return t(["Only show online devices "])}};ie("right",Wo);ie("group",Go);ie("group-closed",Bo);ie("user",Ho);ie("plus",jo);ie("minus",zo);const Ps=c.defineComponent({components:{CountShow:Ut,GroupShow:xo},props:{deviceGroup:Object,theme:{type:String,default:""},locale:String},methods:{onCheckBoxChange(){this.controlParams.onlyShowOnline=!this.controlParams.onlyShowOnline},onSearchChange(){var e;this.inputSearchRef&&(this.controlParams.searchStr=(e=this.inputSearchRef)==null?void 0:e.value)},search(e){this.controlParams.searchStr=e}},setup(e){const t=Ns({locale:"en-us",messages:{"zh-cn":As,"en-us":ws},fallbackLocale:"en-us",silentTranslationWarn:!0,silentFallbackWarn:!0});c.provide("theme",e.theme);const n=c.ref({onlyShowOnline:!1,searchStr:""}),r=c.ref();return{i18nHello:t.global,inputSearchRef:r,controlParams:n}}});const ks={class:"device-group-list"},Rs={class:"search-panel"},Fs={for:"onlineShow"},Vs={class:"device-panel"};function Ms(e,t,n,r,o,a){var s;const i=c.resolveComponent("CountShow"),l=c.resolveComponent("group-show");return c.openBlock(),c.createElementBlock("div",ks,[c.createElementVNode("div",Rs,[c.createVNode(i,{countInfo:e.deviceGroup},{default:c.withCtx(()=>[c.createElementVNode("input",{type:"checkbox",id:"onlineShow",value:"onlineShow",onChange:t[0]||(t[0]=(...u)=>e.onCheckBoxChange&&e.onCheckBoxChange(...u))},null,32),c.createElementVNode("label",Fs,c.toDisplayString(e.i18nHello.t("zhi-xian-shi-zai-xian-she-bei")),1)]),_:1},8,["countInfo"])]),c.createElementVNode("div",Vs,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList((s=e.deviceGroup)==null?void 0:s.items,(u,g)=>(c.openBlock(),c.createBlock(l,{controlParams:e.controlParams,key:g,deviceGroup:u},{group:c.withCtx(({group:_})=>[c.renderSlot(e.$slots,"group",{group:_},void 0,!0)]),device:c.withCtx(({device:_,group:m})=>[c.renderSlot(e.$slots,"device",{device:_,group:m},void 0,!0)]),_:2},1032,["controlParams","deviceGroup"]))),128))])])}const Us=be(Ps,[["render",Ms],["__scopeId","data-v-c882ab2c"]]),Mt={RecursionDeviceGroup:Us},$s={install(e){for(const t in Mt){const n=Mt[t];e.component(t,n)}}};exports.default=$s;
|
|
2
28
|
//# sourceMappingURL=smarteye-e-components.js.map
|