| 1 |
- import{o as t,t as e,p as n,w as o,v as i,Q as a,x as r,y as s,B as l,ag as u,q as c,D as d,F as h,E as f,H as p,I as m,R as y,g,ab as b,c as v,aD as _,aJ as C,G as w,az as S,aA as x,aB as O,h as k,aG as T,bu as E,z as j,A,aC as L,a2 as P,X as R,b as V,bv as I,P as B,C as N,n as D,bw as M,bx as z,by as $,bz as G,a8 as F,ap as X,bA as H,bB as U}from"./index-P0fyQ2Em.js";import{_ as q}from"./u-popup.CXrq2y3n.js";import{r as J}from"./uni-app.es.DOtS5Ldl.js";import{_ as W}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{_ as K}from"./u-icon.wXcRZHbn.js";import{_ as Q}from"./u-divider.BoeCb7vx.js";import{_ as Y}from"./u-line.D-FzmOwL.js";import{_ as Z}from"./u-upload.Btn0UtQx.js";import{_ as tt}from"./uni-icons.RJ8Vh9KU.js";import{_ as et}from"./u-input.Cp2bygnN.js";import{M as nt}from"./index.C9raOSI0.js";import{_ as ot}from"./u-button.Chh1-6a-.js";import{_ as it}from"./mp-html.DI6DI7Ml.js";const at=W({name:"u-modal",emits:["update:modelValue","input","confirm","cancel"],props:{value:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:""},title:{type:[String],default:"提示"},width:{type:[Number,String],default:600},content:{type:String,default:"内容"},showTitle:{type:Boolean,default:!0},showConfirmButton:{type:Boolean,default:!0},showCancelButton:{type:Boolean,default:!1},confirmText:{type:String,default:"确认"},cancelText:{type:String,default:"取消"},confirmColor:{type:String,default:"#2979ff"},cancelColor:{type:String,default:"#606266"},borderRadius:{type:[Number,String],default:16},titleStyle:{type:Object,default:()=>({})},contentStyle:{type:Object,default:()=>({})},cancelStyle:{type:Object,default:()=>({})},confirmStyle:{type:Object,default:()=>({})},zoom:{type:Boolean,default:!0},asyncClose:{type:Boolean,default:!1},maskCloseAble:{type:Boolean,default:!1},negativeTop:{type:[String,Number],default:0},blur:{type:[Number,String],default:0}},data:()=>({loading:!1,popupValue:!1}),computed:{valueCom(){return this.modelValue},cancelBtnStyle(){return Object.assign({color:this.cancelColor},this.cancelStyle)},confirmBtnStyle(){return Object.assign({color:this.confirmColor},this.confirmStyle)},uZIndex(){return this.zIndex?this.zIndex:this.$u.zIndex.popup}},watch:{valueCom:{immediate:!0,handler(t){!0===t&&(this.loading=!1),this.popupValue=t}}},methods:{confirm(){this.asyncClose?this.loading=!0:(this.$emit("input",!1),this.$emit("update:modelValue",!1)),this.$emit("confirm")},cancel(){this.$emit("cancel"),this.$emit("input",!1),this.$emit("update:modelValue",!1),setTimeout((()=>{this.loading=!1}),300)},popupClose(){this.$emit("input",!1),this.$emit("update:modelValue",!1)},clearLoading(){this.loading=!1}}},[["render",function(d,h,f,p,m,y){const g=c,b=J(t("u-popup"),q);return e(),n(g,null,{default:o((()=>[i(b,{blur:f.blur,zoom:f.zoom,mode:"center",popup:!1,"z-index":y.uZIndex,modelValue:m.popupValue,"onUpdate:modelValue":h[0]||(h[0]=t=>m.popupValue=t),length:f.width,"mask-close-able":f.maskCloseAble,"border-radius":f.borderRadius,onClose:y.popupClose,"negative-top":f.negativeTop},{default:o((()=>[i(g,{class:"u-model"},{default:o((()=>[f.showTitle?(e(),n(g,{key:0,class:"u-model__title u-line-1",style:a([f.titleStyle])},{default:o((()=>[r(s(f.title),1)])),_:1},8,["style"])):l("",!0),i(g,{class:"u-model__content"},{default:o((()=>[d.$slots.default||d.$slots.$default?(e(),n(g,{key:0,style:a([f.contentStyle])},{default:o((()=>[u(d.$slots,"default",{},void 0,!0)])),_:3},8,["style"])):(e(),n(g,{key:1,class:"u-model__content__message",style:a([f.contentStyle])},{default:o((()=>[r(s(f.content),1)])),_:1},8,["style"]))])),_:3}),f.showCancelButton||f.showConfirmButton?(e(),n(g,{key:1,class:"u-model__footer u-border-top"},{default:o((()=>[f.showCancelButton?(e(),n(g,{key:0,"hover-stay-time":100,"hover-class":"u-model__btn--hover",class:"u-model__footer__button",style:a([y.cancelBtnStyle]),onClick:y.cancel},{default:o((()=>[r(s(f.cancelText),1)])),_:1},8,["style","onClick"])):l("",!0),f.showConfirmButton||d.$slots["confirm-button"]?(e(),n(g,{key:1,"hover-stay-time":100,"hover-class":f.asyncClose?"none":"u-model__btn--hover",class:"u-model__footer__button hairline-left",style:a([y.confirmBtnStyle]),onClick:y.confirm},{default:o((()=>[r(s(f.confirmText),1)])),_:1},8,["hover-class","style","onClick"])):l("",!0)])),_:1})):l("",!0)])),_:3})])),_:3},8,["blur","zoom","z-index","modelValue","length","mask-close-able","border-radius","onClose","negative-top"])])),_:3})}],["__scopeId","data-v-e1675742"]]);const rt=W({name:"jnpf-text",props:{textStyle:{type:Object,default:()=>({})},content:{default:""}},computed:{getTextstyle(){return{...this.textStyle,"line-height":2*this.textStyle["line-height"]+"rpx","font-size":2*this.textStyle["font-size"]+"rpx"}}}},[["render",function(t,i,l,u,d,h){const f=c;return e(),n(f,{class:"jnpf-text",style:a(h.getTextstyle)},{default:o((()=>[r(s(l.content),1)])),_:1},8,["style"])}],["__scopeId","data-v-f671720b"]]);const st=W({name:"jnpf-group-title",props:{content:{type:String,default:""},helpMessage:{type:String,default:""},contentPosition:{type:String,default:"left"}},methods:{handleClick(){this.helpMessage&&this.$emit("groupIcon")}}},[["render",function(l,u,d,h,f,p){const m=J(t("u-icon"),K),y=c;return e(),n(y,{class:"jnpf-group-title",style:a({"text-align":d.contentPosition}),onClick:u[0]||(u[0]=t=>p.handleClick())},{default:o((()=>[r(s(d.content)+" ",1),i(m,{name:d.helpMessage?"question-circle-fill":"",class:"u-m-l-10",color:"#a0acb7"},null,8,["name"])])),_:1},8,["style"])}],["__scopeId","data-v-584a9855"]]);const lt=W({name:"jnpf-divider",props:{content:{default:""}}},[["render",function(i,a,l,u,c,d){const h=J(t("u-divider"),Q);return e(),n(h,{"half-width":"200",height:"80"},{default:o((()=>[r(s(l.content),1)])),_:1})}]]);const ut=W({name:"u-steps",props:{name:{type:String,default:""},mode:{type:String,default:"dot"},list:{type:Array,default:()=>[]},type:{type:String,default:"primary"},current:{type:[Number,String],default:0},activeColor:{type:String,default:"#2979ff"},unActiveColor:{type:String,default:"#909399"},icon:{type:String,default:"checkmark"},direction:{type:String,default:"row"}},data:()=>({}),methods:{clickStep(t){this.$emit("change",t)}}},[["render",function(u,y,g,b,v,_){const C=m,w=J(t("u-icon"),K),S=c,x=J(t("u-line"),Y);return e(),n(S,{class:""},{default:o((()=>[i(S,{class:"u-steps",style:a({flexDirection:g.direction})},{default:o((()=>[(e(!0),d(h,null,f(g.list,((t,u)=>(e(),n(S,{class:p(["u-steps__item",["u-steps__item--"+g.direction]]),key:u,onClick:t=>_.clickStep(u)},{default:o((()=>["number"==g.mode?(e(),n(S,{key:0,class:"u-steps__item__num",style:a({backgroundColor:g.current<u?"transparent":g.activeColor,borderColor:g.current<u?g.unActiveColor:g.activeColor})},{default:o((()=>[g.current<u?(e(),n(C,{key:0,style:a({color:g.current<u?g.unActiveColor:g.activeColor})},{default:o((()=>[r(s(u+1),1)])),_:2},1032,["style"])):(e(),n(w,{key:1,size:"22",color:"#ffffff",name:g.icon},null,8,["name"]))])),_:2},1032,["style"])):l("",!0),"dot"==g.mode?(e(),n(S,{key:1,class:"u-steps__item__dot",style:a({backgroundColor:u<=g.current?g.activeColor:g.unActiveColor})},null,8,["style"])):l("",!0),i(C,{class:p(["u-line-1",["u-steps__item__text--"+g.direction]]),style:a({color:u<=g.current?g.activeColor:g.unActiveColor})},{default:o((()=>[r(s(g.name?t[g.name]:t.name),1)])),_:2},1032,["style","class"]),u<g.list.length-1?(e(),n(S,{key:2,class:p(["u-steps__item__line",["u-steps__item__line--"+g.mode]])},{default:o((()=>[i(x,{direction:g.direction,length:"100%","hair-line":!1,color:g.unActiveColor},null,8,["direction","color"])])),_:1},8,["class"])):l("",!0)])),_:2},1032,["class","onClick"])))),128))])),_:1},8,["style"])])),_:1})}],["__scopeId","data-v-b04e75e2"]]);const ct=W({name:"u-collapse-item",emits:["change"],props:{title:{type:String,default:""},align:{type:String,default:"left"},disabled:{type:Boolean,default:!1},open:{type:Boolean,default:!1},name:{type:[Number,String],default:""},activeStyle:{type:Object,default:()=>({})},index:{type:[String,Number],default:""}},data(){return{isShow:!1,elId:this.$u.guid(),height:0,headStyle:{},bodyStyle:{},itemStyle:{},arrowColor:"",hoverClass:"",arrow:!0}},watch:{open(t){this.isShow=t}},created(){this.parent=!1,this.isShow=this.open},methods:{init(){this.parent=this.$u.$parent.call(this,"u-collapse"),this.parent&&(this.nameSync=this.name?this.name:this.parent.childrens.length,!this.parent.childrens.includes(this)&&this.parent.childrens.push(this),this.headStyle=this.parent.headStyle,this.bodyStyle=this.parent.bodyStyle,this.arrowColor=this.parent.arrowColor,this.hoverClass=this.parent.hoverClass,this.arrow=this.parent.arrow,this.itemStyle=this.parent.itemStyle),this.$nextTick((()=>{this.queryRect()}))},headClick(){this.disabled||(this.parent&&1==this.parent.accordion&&this.parent.childrens.map((t=>{this!=t&&(t.isShow=!1)})),this.isShow=!this.isShow,this.$emit("change",{index:this.index,show:this.isShow}),this.isShow&&this.parent&&this.parent.onChange(),this.$forceUpdate())},queryRect(){this.$uGetRect("#"+this.elId).then((t=>{this.height=t.height}))}},mounted(){this.init()}},[["render",function(f,m,g,b,v,_){const C=c,w=J(t("u-icon"),K);return e(),n(C,{class:"u-collapse-item",style:a([v.itemStyle])},{default:o((()=>[i(C,{"hover-stay-time":200,class:"u-collapse-head",onClick:y(_.headClick,["stop"]),"hover-class":v.hoverClass,style:a([v.headStyle])},{default:o((()=>[f.$slots["title-all"]?u(f.$slots,"title-all",{key:1},void 0,!0):(e(),d(h,{key:0},[f.$slots.title?u(f.$slots,"title",{key:1},void 0,!0):(e(),n(C,{key:0,class:"u-collapse-title u-line-1",style:a([{textAlign:g.align?g.align:"left"},v.isShow&&g.activeStyle&&!v.arrow?g.activeStyle:""])},{default:o((()=>[r(s(g.title),1)])),_:1},8,["style"])),i(C,{class:"u-icon-wrap"},{default:o((()=>[v.arrow?(e(),n(w,{key:0,color:v.arrowColor,class:p([{"u-arrow-down-icon-active":v.isShow},"u-arrow-down-icon"]),name:"arrow-down"},null,8,["color","class"])):l("",!0)])),_:1})],64))])),_:3},8,["onClick","hover-class","style"]),i(C,{class:"u-collapse-body",style:a([{height:v.isShow?v.height+"px":"0"}])},{default:o((()=>[i(C,{class:"u-collapse-content",id:v.elId,style:a([v.bodyStyle])},{default:o((()=>[u(f.$slots,"default",{},void 0,!0)])),_:3},8,["id","style"])])),_:3},8,["style"])])),_:3},8,["style"])}],["__scopeId","data-v-71d11c18"]]);const dt=W({name:"u-collapse",emits:["change"],props:{accordion:{type:Boolean,default:!0},headStyle:{type:Object,default:()=>({})},bodyStyle:{type:Object,default:()=>({})},itemStyle:{type:Object,default:()=>({})},arrow:{type:Boolean,default:!0},arrowColor:{type:String,default:"#909399"},hoverClass:{type:String,default:"u-hover-class"}},created(){this.childrens=[]},data:()=>({}),methods:{init(){this.childrens.forEach(((t,e)=>{t.init()}))},onChange(){let t=[];this.childrens.forEach(((e,n)=>{e.isShow&&t.push(e.nameSync)})),this.accordion&&(t=t.join("")),this.$emit("change",t)}}},[["render",function(t,i,a,r,s,l){const d=c;return e(),n(d,{class:"u-collapse"},{default:o((()=>[u(t.$slots,"default",{},void 0,!0)])),_:3})}],["__scopeId","data-v-03a75566"]]);const ht=W({props:{extraOptions:{type:Array,default:()=>[]},extraObj:{type:Object,default:()=>{}}},computed:{getExtraList(){const t=this.extraOptions.filter((t=>!!t.value));let e=[];for(let n=0;n<t.length;n++){const o=t[n];if(o.value.includes("-")){let t=o.value.split("-")[0],n=o.value.split("-")[1],i=o.label.split("-")[0],a=o.label.replace(i+"-",""),r={jnpfKey:"table",value:t,label:i,title:i,dataIndex:t,children:[],tableName:t};o.dataIndex=n,o.title=a,e.some((e=>e.value===t))||e.push(r);for(let s=0;s<e.length;s++)if(e[s].value===t){e[s].children.push(o);break}}else e.push(o)}return e}}},[["render",function(t,a,u,p,m,y){const g=c;return y.getExtraList.length?(e(!0),d(h,{key:0},f(y.getExtraList,((t,a)=>(e(),n(g,{class:"u-flex extra-val",key:a},{default:o((()=>["table"===t.jnpfKey?(e(),n(g,{key:0,class:"u-flex-col extra-child"},{default:o((()=>{var a,c,p;return[(null==(a=u.extraObj[t.value])?void 0:a.length)?l("",!0):(e(),n(g,{key:0,class:"title"},{default:o((()=>[r(s(t.label),1)])),_:2},1024)),(null==(c=u.extraObj[t.value])?void 0:c.length)?(e(!0),d(h,{key:1},f(u.extraObj[t.value],((a,l)=>(e(),n(g,{class:"extra-child-item",key:l},{default:o((()=>[i(g,{class:"u-flex-col extra-child-item-hd"},{default:o((()=>[i(g,{class:"title"},{default:o((()=>[r(s(t.label),1)])),_:2},1024),i(g,{class:"title"},{default:o((()=>[r(s(`(${l+1})`),1)])),_:2},1024)])),_:2},1024),(e(!0),d(h,null,f(t.children,((a,c)=>(e(),n(g,{class:"u-flex child",key:c},{default:o((()=>[i(g,{class:"txt u-m-b-8"},{default:o((()=>[r(s(a.title),1)])),_:2},1024),i(g,{class:"txt val u-line-1"},{default:o((()=>[r(s(u.extraObj[t.value][l][a.dataIndex]),1)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1024)))),128)):l("",!0),(null==(p=u.extraObj[t.value])?void 0:p.length)?l("",!0):(e(),n(g,{key:2,class:"u-text-center"},{default:o((()=>[r(" 暂无数据 ")])),_:1}))]})),_:2},1024)):(e(),n(g,{key:1,class:"u-flex extra"},{default:o((()=>[i(g,{class:"txt"},{default:o((()=>[r(s(t.label),1)])),_:2},1024),u.extraObj?(e(),n(g,{key:0,class:"txt val u-line-1"},{default:o((()=>[r(s(u.extraObj[t.value]),1)])),_:2},1024)):l("",!0)])),_:2},1024))])),_:2},1024)))),128)):l("",!0)}],["__scopeId","data-v-23c1546b"]]),ft={KB:1024,MB:1048576,GB:1073741824};const pt=W({name:"jnpf-upload-img",props:{modelValue:{type:[Array,String],default:()=>[]},tipText:{type:String,default:""},limit:{type:Number,default:99},sizeUnit:{type:String,default:"MB"},pathType:{type:String,default:"defaultPath"},isAccount:{type:Number,default:0},folder:{type:String,default:""},fileSize:{type:Number,default:10},disabled:{type:Boolean,default:!1},detailed:{type:Boolean,default:!1},simple:{type:Boolean,default:!1},align:{type:String,default:"right"},sortRule:{type:Array,default:()=>[]},timeFormat:{type:String,default:""},buttonText:{type:String,default:"点击上传"}},data(){return{fileList:[],realLimit:0,deletable:!0,uploadHeaders:{Authorization:""},params:{pathType:this.pathType,isAccount:this.isAccount,folder:this.folder,sortRule:(this.sortRule||[]).join(),timeFormat:this.timeFormat},lists:[],maxSize:""}},watch:{limit(t){this.realLimit=t},modelValue:{immediate:!0,handler(t){this.fileList=Array.isArray(t)?JSON.parse(JSON.stringify(t)):[]}}},created(){this.uploadHeaders.Authorization=g("token"),this.maxSize=this.fileSize?this.fileSize*ft[this.sizeUnit]:1e13,this.$nextTick((()=>{this.lists=this.fileList||[]})),this.realLimit=this.limit,this.disabled&&(this.deletable=!1)},computed:{comUploadUrl(){return this.define.comUploadUrl}},methods:{onSuccess(t,e,n,o){200==t.code?(this.fileList.push({name:n[e].file.name,fileId:t.data.name,url:t.data.url,thumbUrl:t.data.thumbUrl}),this.$emit("update:modelValue",this.fileList),this.$emit("change",this.fileList)):(n.splice(e,1),this.$u.toast(t.msg))},handleError(t,e,n,o){n.splice(e,1)},deleteItem(t){b({title:"提示",content:"您确定要删除此项吗?",success:e=>{e.confirm&&(this.$refs.uUpload.remove(t),this.fileList.splice(t,1),this.$emit("update:modelValue",this.fileList),this.$emit("change",this.fileList),v({title:"移除成功",icon:"none"}))}})},onListChange(t){this.lists=t||[]},doPreviewImage(t=0){const e=this.fileList.map((t=>_.getAuthImgUrl(t.url)));C({urls:e,current:e[t],success:()=>{},fail:()=>{v({title:"预览图片失败",icon:"none"})}})}}},[["render",function(a,u,m,g,b,v){const _=J(t("u-icon"),K),C=c,S=w,x=J(t("u-upload"),Z);return e(),n(C,{class:"jnpf-upload-img"},{default:o((()=>[m.simple?l("",!0):(e(),n(C,{key:0,class:p("jnpf-upload jnpf-upload-"+m.align)},{default:o((()=>[b.fileList.length?(e(!0),d(h,{key:0},f(b.fileList,((t,r)=>(e(),n(C,{class:"u-list-item u-preview-wrap",key:r},{default:o((()=>[m.disabled||m.detailed?l("",!0):(e(),n(C,{key:0,class:"u-delete-icon",onClick:y((t=>v.deleteItem(r)),["stop"])},{default:o((()=>[i(_,{class:"u-icon",name:"close",size:"20",color:"#ffffff"})])),_:2},1032,["onClick"])),i(S,{class:"u-preview-image",src:a.jnpf.getAuthImgUrl(t.thumbUrl||t.url),mode:"aspectFill",onClick:y((t=>v.doPreviewImage(r)),["stop"])},null,8,["src","onClick"])])),_:2},1024)))),128)):l("",!0),m.detailed?l("",!0):(e(),n(x,{key:1,width:"150",height:"150",action:v.comUploadUrl+"annexpic",header:b.uploadHeaders,"form-data":b.params,onOnListChange:v.onListChange,"max-size":b.maxSize,"max-count":b.realLimit,"show-upload-list":!1,"show-progress":!1,deletable:b.deletable,uploadText:m.buttonText,onOnSuccess:v.onSuccess,onOnError:v.handleError,ref:"uUpload","file-list":b.lists,disabled:m.disabled,class:p({"jnpf-upload-disabled":m.disabled})},null,8,["action","header","form-data","onOnListChange","max-size","max-count","deletable","uploadText","onOnSuccess","onOnError","file-list","disabled","class"]))])),_:1},8,["class"])),m.simple?l("",!0):(e(),n(C,{key:1,class:"tipText u-p-l-20"},{default:o((()=>[r(s(m.tipText),1)])),_:1})),m.simple?(e(),n(C,{key:2,class:"text-primary",onClick:u[0]||(u[0]=y((t=>v.doPreviewImage()),["stop"]))},{default:o((()=>[r("查看图片")])),_:1})):l("",!0)])),_:1})}],["__scopeId","data-v-7732c886"]]);const mt=W({name:"UniRate",props:{isFill:{type:[Boolean,String],default:!0},color:{type:String,default:"#ececec"},activeColor:{type:String,default:"#ffca3e"},disabledColor:{type:String,default:"#c0c0c0"},size:{type:[Number,String],default:24},value:{type:[Number,String],default:0},modelValue:{type:[Number,String],default:0},max:{type:[Number,String],default:5},margin:{type:[Number,String],default:0},disabled:{type:[Boolean,String],default:!1},readonly:{type:[Boolean,String],default:!1},allowHalf:{type:[Boolean,String],default:!1},touchable:{type:[Boolean,String],default:!0}},data:()=>({valueSync:"",userMouseFristMove:!0,userRated:!1,userLastRate:1}),watch:{value(t){this.valueSync=Number(t)},modelValue(t){this.valueSync=Number(t)}},computed:{stars(){const t=this.valueSync?this.valueSync:0,e=[],n=Math.floor(t),o=Math.ceil(t);for(let i=0;i<this.max;i++)n>i?e.push({activeWitch:"100%"}):o-1===i?e.push({activeWitch:100*(t-n)+"%"}):e.push({activeWitch:"0"});return e},marginNumber(){return Number(this.margin)}},created(){this.valueSync=Number(this.value||this.modelValue),this._rateBoxLeft=0,this._oldValue=null},mounted(){setTimeout((()=>{this._getSize()}),100),this.PC=this.IsPC()},methods:{touchstart(t){if(this.IsPC())return;if(this.readonly||this.disabled)return;const{clientX:e,screenX:n}=t.changedTouches[0];this._getRateCount(e||n)},touchmove(t){if(this.IsPC())return;if(this.readonly||this.disabled||!this.touchable)return;const{clientX:e,screenX:n}=t.changedTouches[0];this._getRateCount(e||n)},mousedown(t){if(!this.IsPC())return;if(this.readonly||this.disabled)return;const{clientX:e}=t;this.userLastRate=this.valueSync,this._getRateCount(e),this.userRated=!0},mousemove(t){if(!this.IsPC())return;if(this.userRated)return;if(this.userMouseFristMove&&(console.log("---mousemove----",this.valueSync),this.userLastRate=this.valueSync,this.userMouseFristMove=!1),this.readonly||this.disabled||!this.touchable)return;const{clientX:e}=t;this._getRateCount(e)},mouseleave(t){this.IsPC()&&(this.readonly||this.disabled||!this.touchable||(this.userRated?this.userRated=!1:this.valueSync=this.userLastRate))},IsPC(){var t=navigator.userAgent,e=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],n=!0;for(let o=0;o<e.length-1;o++)if(t.indexOf(e[o])>0){n=!1;break}return n},_getRateCount(t){this._getSize();const e=Number(this.size);if(isNaN(e))return new Error("size 属性只能设置为数字");const n=t-this._rateBoxLeft;let o=parseInt(n/(e+this.marginNumber));o=o<0?0:o,o=o>this.max?this.max:o;const i=parseInt(n-(e+this.marginNumber)*o);let a=0;(this._oldValue!==o||this.PC)&&(this._oldValue=o,a=this.allowHalf?i>e/2?o+1:o+.5:o+1,a=Math.max(.5,Math.min(a,this.max)),this.valueSync=a,this._onChange())},_onChange(){this.$emit("input",this.valueSync),this.$emit("update:modelValue",this.valueSync),this.$emit("change",{value:this.valueSync})},_getSize(){S().in(this).select(".uni-rate").boundingClientRect().exec((t=>{t&&(this._rateBoxLeft=t[0].left)}))}}},[["render",function(r,s,l,u,m,g){const b=J(t("uni-icons"),tt),v=c;return e(),n(v,null,{default:o((()=>[i(v,{ref:"uni-rate",class:"uni-rate"},{default:o((()=>[(e(!0),d(h,null,f(g.stars,((t,r)=>(e(),n(v,{class:p(["uni-rate__icon",{"uni-cursor-not-allowed":l.disabled}]),style:a({"margin-right":g.marginNumber+"px"}),key:r,onTouchstart:y(g.touchstart,["stop"]),onTouchmove:y(g.touchmove,["stop"]),onMousedown:y(g.mousedown,["stop"]),onMousemove:y(g.mousemove,["stop"]),onMouseleave:g.mouseleave},{default:o((()=>[i(b,{color:l.color,size:l.size,type:l.isFill?"star-filled":"star"},null,8,["color","size","type"]),i(v,{style:a({width:t.activeWitch}),class:"uni-rate__icon-on"},{default:o((()=>[i(b,{color:l.disabled?l.disabledColor:l.activeColor,size:l.size,type:"star-filled"},null,8,["color","size"])])),_:2},1032,["style"])])),_:2},1032,["class","style","onTouchstart","onTouchmove","onMousedown","onMousemove","onMouseleave"])))),128))])),_:1},512)])),_:1})}],["__scopeId","data-v-06ce50f7"]]);const yt=W({name:"jnpf-rate",inheritAttrs:!1,props:{modelValue:{type:[Number,String],default:0},allowHalf:{type:Boolean,default:!1},max:{type:Number,default:5},disabled:{type:Boolean,default:!1}},watch:{modelValue:{handler(t){this.innerValue=Number(t)},immediate:!0}},data:()=>({innerValue:0}),methods:{onChange(t){this.$emit("update:modelValue",t.value),this.$emit("change",t.value)}}},[["render",function(o,i,a,r,s,l){const u=J(t("uni-rate"),mt);return e(),n(u,{class:"jnpf-rate",modelValue:s.innerValue,"onUpdate:modelValue":i[0]||(i[0]=t=>s.innerValue=t),size:20,max:a.max,allowHalf:a.allowHalf,disabled:a.disabled,onChange:l.onChange},null,8,["modelValue","max","allowHalf","disabled","onChange"])}],["__scopeId","data-v-a9e71dc7"]]);const gt=W({name:"u-slider",emits:["update:modelValue","input","start","moving","end"],props:{value:{type:[Number,String],default:0},modelValue:{type:[Number,String],default:0},disabled:{type:Boolean,default:!1},blockWidth:{type:[Number,String],default:30},min:{type:[Number,String],default:0},max:{type:[Number,String],default:100},step:{type:[Number,String],default:1},height:{type:[Number,String],default:6},activeColor:{type:String,default:"#2979ff"},inactiveColor:{type:String,default:"#c0c4cc"},blockColor:{type:String,default:"#ffffff"},blockStyle:{type:Object,default:()=>({})}},data:()=>({startX:0,status:"end",newValue:0,distanceX:0,startValue:0,barStyle:{},sliderRect:{left:0,width:0}}),watch:{valueCom(t){"end"==this.status&&this.updateValue(this.valueCom,!1)}},created(){this.updateValue(this.valueCom,!1)},mounted(){this.$uGetRect(".u-slider").then((t=>{this.sliderRect=t}))},computed:{valueCom(){return this.modelValue}},methods:{uGetRect(){this.$uGetRect(".u-slider").then((t=>{this.sliderRect=t}))},onTouchStart(t){if(this.disabled)return;this.startX=0;let e=t.touches[0];this.startX=e.clientX,this.startValue=this.format(this.valueCom),this.status="start"},async onTouchMove(t){if(this.disabled)return;0!=this.sliderRect.left&&0!=this.sliderRect.width||await this.uGetRect(),"start"==this.status&&this.$emit("start");let e=t.touches[0];this.distanceX=e.clientX-this.sliderRect.left,this.newValue=this.distanceX/this.sliderRect.width*100,this.status="moving",this.$emit("moving"),this.updateValue(this.newValue,!0)},onTouchEnd(){this.disabled||("moving"===this.status&&(this.updateValue(this.newValue,!1),this.$emit("end")),this.status="end")},updateValue(t,e){const n=this.format(t);if(n>this.max||n>100)return;let o={width:n+"%"};1==e?o.transition="none":delete o.transition,this.$emit("input",n),this.$emit("update:modelValue",n),this.barStyle=o},format(t){return Math.round(Math.max(this.min,Math.min(t,this.max))/this.step)*this.step},async onClick(t){if(this.disabled)return;0!=this.sliderRect.left&&0!=this.sliderRect.width||await this.uGetRect();const e=(t.detail.x-this.sliderRect.left)/this.sliderRect.width*100;this.updateValue(e,!1)}}},[["render",function(t,r,s,l,d,h){const f=c;return e(),n(f,{class:p(["u-slider",[s.disabled?"u-slider--disabled":""]]),onClick:h.onClick,style:a({backgroundColor:s.inactiveColor})},{default:o((()=>[i(f,{class:"u-slider__gap",style:a([d.barStyle,{height:s.height+"rpx",backgroundColor:s.activeColor}])},{default:o((()=>[i(f,{class:"u-slider__button-wrap",onTouchstart:h.onTouchStart,onTouchmove:h.onTouchMove,onTouchend:h.onTouchEnd,onTouchcancel:h.onTouchEnd},{default:o((()=>[t.$slots.default||t.$slots.$default?u(t.$slots,"default",{key:0},void 0,!0):(e(),n(f,{key:1,class:"u-slider__button",style:a([s.blockStyle,{height:s.blockWidth+"rpx",width:s.blockWidth+"rpx",backgroundColor:s.blockColor}])},null,8,["style"]))])),_:3},8,["onTouchstart","onTouchmove","onTouchend","onTouchcancel"])])),_:3},8,["style"])])),_:3},8,["onClick","class","style"])}],["__scopeId","data-v-90de5220"]]);const bt=W({name:"jnpf-slider",props:{modelValue:{type:[Number,String],default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},disabled:{type:Boolean,default:!1}},data:()=>({innerValue:0}),watch:{modelValue:{handler(t){this.innerValue=t},immediate:!0,deep:!0},innerValue:{handler(t){this.$emit("update:modelValue",t),this.$emit("change",t)},immediate:!0,deep:!0}},methods:{end(){this.$emit("update:modelValue",this.innerValue),this.$emit("change",this.innerValue)}}},[["render",function(a,l,u,d,h,f){const m=c,y=J(t("u-slider"),gt);return e(),n(y,{class:p(["jnpf-slider",{"jnpf-slider-disabled":u.disabled}]),modelValue:h.innerValue,"onUpdate:modelValue":l[0]||(l[0]=t=>h.innerValue=t),step:u.step,min:u.min,max:u.max,disabled:u.disabled,onEnd:f.end},{default:o((()=>[i(m,{class:p(["slider-badge-button",{disabled:u.disabled}])},{default:o((()=>[r(s(h.innerValue),1)])),_:1},8,["class"])])),_:1},8,["class","modelValue","step","min","max","disabled","onEnd"])}],["__scopeId","data-v-330a2f7c"]]);var vt=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n},_t=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var Ct,wt=function(t){function e(t,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=t.toUpperCase(),n.mod43&&(t+=(o=function(t){for(var e=0,n=0;n<t.length;n++)e+=kt(t[n]);return e%=43}(t),St[o])),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),_t(e,[{key:"encode",value:function(){for(var t=Ot("*"),e=0;e<this.data.length;e++)t+=Ot(this.data[e])+"0";return{data:t+=Ot("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),e}(),St=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],xt=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function Ot(t){return e=kt(t),xt[e].toString(2);var e}function kt(t){return St.indexOf(t)}function Tt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Et={SET_A:0,SET_B:1,SET_C:2,SHIFT:98,START_A:103,START_B:104,START_C:105,MODULO:103,STOP:106,FNC1:207,SET_BY_CODE:(Tt(Ct={},103,0),Tt(Ct,104,1),Tt(Ct,105,2),Ct),SWAP:{101:0,100:1,99:2},A_START_CHAR:String.fromCharCode(208),B_START_CHAR:String.fromCharCode(209),C_START_CHAR:String.fromCharCode(210),A_CHARS:"[\0-_È-Ï]",B_CHARS:"[ -È-Ï]",C_CHARS:"(Ï*[0-9]{2}Ï*)",BARS:[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]};var jt=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var At=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return o.bytes=t.split("").map((function(t){return t.charCodeAt(0)})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),jt(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,n=t.shift()-105,o=Et.SET_BY_CODE[n];if(void 0===o)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&t.unshift(Et.FNC1);var i=e.next(t,1,o);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+i.result+e.getBar((i.checksum+n)%Et.MODULO)+e.getBar(Et.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var t=this.options.ean128||!1;return"string"==typeof t&&(t="true"===t.toLowerCase()),t}}],[{key:"getBar",value:function(t){return Et.BARS[t]?Et.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===Et.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===Et.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,n,o){if(!t.length)return{result:"",checksum:0};var i=void 0,a=void 0;if(t[0]>=200){a=t.shift()-105;var r=Et.SWAP[a];void 0!==r?i=e.next(t,n+1,r):(o!==Et.SET_A&&o!==Et.SET_B||a!==Et.SHIFT||(t[0]=o===Et.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),i=e.next(t,n+1,o))}else a=e.correctIndex(t,o),i=e.next(t,n+1,o);var s=a*n;return{result:e.getBar(a)+i.result,checksum:s+i.checksum}}}]),e}(),Lt=function(t){return t.match(new RegExp("^"+Et.A_CHARS+"*"))[0].length},Pt=function(t){return t.match(new RegExp("^"+Et.B_CHARS+"*"))[0].length},Rt=function(t){return t.match(new RegExp("^"+Et.C_CHARS+"*"))[0]};function Vt(t,e){var n=e?Et.A_CHARS:Et.B_CHARS,o=t.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+String.fromCharCode(204)+It(t.substring(o[1].length));var i=t.match(new RegExp("^"+n+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(e?205:206)+Vt(t.substring(i.length),!e)}function It(t){var e=Rt(t),n=e.length;if(n===t.length)return t;t=t.substring(n);var o=Lt(t)>=Pt(t);return e+String.fromCharCode(o?206:205)+Vt(t,o)}function Bt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Nt=function(t){function e(t,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,function(t){var e=void 0;if(Rt(t).length>=2)e=Et.C_START_CHAR+It(t);else{var n=Lt(t)>Pt(t);e=(n?Et.A_START_CHAR:Et.B_START_CHAR)+Vt(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,(function(t,e){return String.fromCharCode(203)+e}))}(t),n));else o=Bt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return Bt(o)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,At),e}(),Dt=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var Mt=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Et.A_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,At),Dt(e,[{key:"valid",value:function(){return new RegExp("^"+Et.A_CHARS+"+$").test(this.data)}}]),e}(),zt=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var $t=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Et.B_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,At),zt(e,[{key:"valid",value:function(){return new RegExp("^"+Et.B_CHARS+"+$").test(this.data)}}]),e}(),Gt=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();const Ft={CODE128:Nt,CODE128A:Mt,CODE128B:$t,CODE128C:function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Et.C_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,At),Gt(e,[{key:"valid",value:function(){return new RegExp("^"+Et.C_CHARS+"+$").test(this.data)}}]),e}()};const Xt={SIDE_BIN:"101",MIDDLE_BIN:"01010",BINARIES:{L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},EAN2_STRUCTURE:["LL","LG","GL","GG"],EAN5_STRUCTURE:["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],EAN13_STRUCTURE:["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]};var Ht=function(t,e,n){var o=t.split("").map((function(t,n){return Xt.BINARIES[e[n]]})).map((function(e,n){return e?e[t[n]]:""}));if(n){var i=t.length-1;o=o.map((function(t,e){return e<i?t+n:t}))}return o.join("")},Ut=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var qt=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.fontSize=!n.flat&&n.fontSize>10*n.width?10*n.width:n.fontSize,o.guardHeight=n.height+o.fontSize/2+n.textMargin,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),Ut(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return Ht(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return Ht(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:Xt.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:Xt.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:Xt.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[Xt.SIDE_BIN,this.leftEncode(),Xt.MIDDLE_BIN,this.rightEncode(),Xt.SIDE_BIN].join(""),text:this.text}}}]),e}(),Jt=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),Wt=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var r=i.get;return void 0!==r?r.call(o):void 0};var Kt=function(t){return(10-t.substr(0,12).split("").map((function(t){return+t})).reduce((function(t,e,n){return n%2?t+3*e:t+e}),0)%10)%10},Qt=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=Kt(t));var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.lastChar=n.lastChar,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,qt),Jt(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===Kt(this.data)}},{key:"leftText",value:function(){return Wt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),n=Xt.EAN13_STRUCTURE[this.data[0]];return Wt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,n)}},{key:"rightText",value:function(){return Wt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return Wt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=Wt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),e}(),Yt=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),Zt=function t(e,n,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,o)}if("value"in i)return i.value;var r=i.get;return void 0!==r?r.call(o):void 0};var te=function(t){return(10-t.substr(0,7).split("").map((function(t){return+t})).reduce((function(t,e,n){return n%2?t+e:t+3*e}),0)%10)%10},ee=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{7}$/)&&(t+=te(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,qt),Yt(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===te(this.data)}},{key:"leftText",value:function(){return Zt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var t=this.data.substr(0,4);return Zt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,"LLLL")}},{key:"rightText",value:function(){return Zt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var t=this.data.substr(4,4);return Zt(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRR")}}]),e}(),ne=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var oe=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),ne(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,e=Xt.EAN5_STRUCTURE[(t=this.data,t.split("").map((function(t){return+t})).reduce((function(t,e,n){return n%2?t+9*e:t+3*e}),0)%10)];return{data:"1011"+Ht(this.data,e,"01"),text:this.text}}}]),e}(),ie=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var ae=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),ie(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=Xt.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+Ht(this.data,t,"01"),text:this.text}}}]),e}(),re=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();function se(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}const le={UPC:function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=se(t));var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.displayValue=n.displayValue,n.fontSize>10*n.width?o.fontSize=10*n.width:o.fontSize=n.fontSize,o.guardHeight=n.height+o.fontSize/2+n.textMargin,o}return re(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==se(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=Ht(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=Ht(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+Ht(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:Ht(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:Ht(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:Ht(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),e}(),checksum:se};var ue=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();function ce(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var de=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],he=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],fe=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=ce(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(o.isValid=!1,-1!==t.search(/^[0-9]{6}$/))o.middleDigits=t,o.upcA=pe(t,"0"),o.text=n.text||""+o.upcA[0]+t+o.upcA[o.upcA.length-1],o.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return ce(o);if(o.middleDigits=t.substring(1,t.length-1),o.upcA=pe(o.middleDigits,t[0]),o.upcA[o.upcA.length-1]!==t[t.length-1])return ce(o);o.isValid=!0}return o.displayValue=n.displayValue,n.fontSize>10*n.width?o.fontSize=10*n.width:o.fontSize=n.fontSize,o.guardHeight=n.height+o.fontSize/2+n.textMargin,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),ue(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],n=he[parseInt(e)][parseInt(t)];return Ht(this.middleDigits,n)}}]),e}();function pe(t,e){for(var n=parseInt(t[t.length-1]),o=de[n],i="",a=0,r=0;r<o.length;r++){var s=o[r];i+="X"===s?t[a++]:s}return""+(i=""+e+i)+(0,le.checksum)(i)}const me={EAN13:Qt,EAN8:ee,EAN5:oe,EAN2:ae,UPC:le.UPC,UPCE:fe};const ye={START_BIN:"1010",END_BIN:"11101",BINARIES:["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]};var ge=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();function be(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ve(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var _e=function(t){function e(){return be(this,e),ve(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),ge(e,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var t=this,e=this.data.match(/.{2}/g).map((function(e){return t.encodePair(e)})).join("");return{data:ye.START_BIN+e+ye.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=ye.BINARIES[t[1]];return ye.BINARIES[t[0]].split("").map((function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")})).join("")}}]),e}(),Ce=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var we=function(t){var e=t.substr(0,13).split("").map((function(t){return parseInt(t,10)})).reduce((function(t,e,n){return t+e*(3-n%2*2)}),0);return 10*Math.ceil(e/10)-e};const Se={ITF:_e,ITF14:function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{13}$/)&&(t+=we(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,_e),Ce(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===we(this.data)}}]),e}()};var xe=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var Oe=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),xe(e,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=ke(n,4-n.length);for(var o=0;o<n.length;o++)t+="0"==n[o]?"100":"110"}return{data:t+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),e}();function ke(t,e){for(var n=0;n<e;n++)t="0"+t;return t}const Te=function(t){for(var e=0,n=0;n<t.length;n++){var o=parseInt(t[n]);(n+t.length)%2==0?e+=o:e+=2*o%10+Math.floor(2*o/10)}return(10-e%10)%10},Ee=function(t){for(var e=0,n=[2,3,4,5,6,7],o=0;o<t.length;o++){var i=parseInt(t[t.length-1-o]);e+=n[o%n.length]*i}return(11-e%11)%11};const je={MSI:Oe,MSI10:function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+Te(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Oe),e}(),MSI11:function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+Ee(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Oe),e}(),MSI1010:function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=Te(t),t+=Te(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Oe),e}(),MSI1110:function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=Ee(t),t+=Te(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Oe),e}()};var Ae=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var Le=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return o.number=parseInt(t,10),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),Ae(e,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(),Pe=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var Re=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return o.text=o.options.text||o.text.replace(/[A-D]/g,""),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,vt),Pe(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"101100110011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}();const Ve={CODE128:Ft.CODE128,CODE128A:Ft.CODE128A,CODE128B:Ft.CODE128B,CODE128C:Ft.CODE128C,EAN13:me.EAN13,EAN8:me.EAN8,EAN5:me.EAN5,EAN2:me.EAN2,UPC:me.UPCE,UPCE:me.UPCE,ITF14:Se.ITF14,ITF:Se.ITF,MSI:je.MSI,MSI10:je.MSI10,MSI11:je.MSI11,MSI1010:je.MSI1010,MSI1110:je.MSI1110,PHARMACODE:Le,CODABAR:Re,CODE39:wt};let Ie={};Ie=function(t,e,n,o,i){let a,r,s,l,u,c,d;var h;if(u=e,c=o,d=i,a=Object.assign({},n),(h=a).marginTop=null==h.marginTop?h.margin:h.marginTop,h.marginBottom=null==h.marginBottom?h.margin:h.marginBottom,h.marginRight=null==h.marginRight?h.margin:h.marginRight,h.marginLeft=null==h.marginLeft?h.margin:h.marginLeft,""==a.text||!t)return!1;s=t,l=x(u,s),r=new(Ve[a.format.toUpperCase()])(a.text,a).encode();let f=function(t,e){let n,o=[],i=e.marginLeft+e.marginRight;return Array.isArray(t)?o=[...t]:o[0]=JSON.parse(JSON.stringify(t)),o.forEach(((t,a)=>{let r=l.measureText(o[a].text?o[a].text:"").width,s=o[a].data.length*e.width,u=0;e.displayValue&&s<r&&("center"==e.textAlign?u=Math.floor((r-s)/2):"left"==e.textAlign?u=0:"right"==e.textAlign&&(u=Math.floor(r-s))),o[a].barcodePadding=u,o[a].width=Math.ceil(Math.max(r,s)),i+=o[a].width,o[a].options&&null!=o[a].options.height?o[a].height=o[a].options.height+(e.displayValue&&(o[a].text?o[a].text:"").length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom:o[a].height=n=e.height+(e.displayValue&&(o[a].text?o[a].text:"").length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom})),{encodings:o,width:i,height:n}}(r,a);c({width:f.width,height:f.height}),setTimeout((()=>{p.render(a,f)}),50);let p={render(t,e){this.prepare(t,e),e.encodings.forEach(((e,n)=>{this.barcode(t,e),this.text(t,e),this.move(e)})),this.draw(t,e)},barcode(t,e){let n,o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,l.fillStyle=t.lineColor;for(let i=0;i<o.length;i++){let a=i*t.width+e.barcodePadding,r=t.height;e.options&&null!=e.options.height&&(r=e.options.height),"1"===o[i]?l.fillRect(a,n,t.width,r):o[i]&&l.fillRect(a,n,t.width,r*o[i])}},text(t,e){if(t.displayValue){let n,o,i,a;o="top"==t.textPosition?t.marginTop+t.fontSize:t.height+t.textMargin+t.marginTop+t.fontSize,e.options?(null!=e.options.textAlign&&(i=e.options.textAlign),null!=e.options.fontSize&&(a=e.options.fontSize)):(i=t.textAlign,a=t.fontSize),l.setFontSize(a),"left"==i||e.barcodePadding>0?(n=0,l.setTextAlign("left")):"right"==i?(n=e.width-1,l.setTextAlign("right")):(n=e.width/2,l.setTextAlign("center")),l.fillStyle=t.fontColor,null!=e.text&&l.fillText(e.text,n,o)}},move(t){l.translate(t.width,0)},prepare(t,e){t.background&&(l.fillStyle=t.background,l.fillRect(0,0,e.width,e.height)),l.translate(t.marginLeft,0)},draw(t,e){l.draw(!1,(()=>{this.toImgs(t,e)}))},toImgs(t,e){setTimeout((()=>{try{O({width:e.width,height:e.height,destWidth:e.width,destHeight:e.height,canvasId:u,fileType:"png",success:function(t){d(t.tempFilePath)},fail:function(t){d(t)},complete:function(){k()}},s)}catch(t){}}),t.text.length+100)}}};const Be=Ie,Ne={width:4,height:120,displayValue:!0,textAlign:"center",textPosition:"bottom",textMargin:0,fontSize:24,fontColor:"#000000",lineColor:"#000000",background:"#FFFFFF",margin:0,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0},De={name:"tkiBarcode",props:{show:{type:Boolean,default:!0},cid:{type:String,default:"tki-barcode-canvas"},unit:{type:String,default:"upx"},val:{type:String,default:""},format:{type:String,default:"CODE128"},opations:{type:Object,default:function(){return{}}},onval:{type:Boolean,default:!1},loadMake:{type:Boolean,default:!0}},data:()=>({result:"",canvasWidth:0,canvasHeight:0,defaultOpations:Object.assign({},Ne)}),onUnload:function(){},methods:{_makeCode(){let t=this;Object.assign(this.defaultOpations,this.opations),"upx"==t.unit&&(t.defaultOpations.width&&(t.defaultOpations.width=T(t.defaultOpations.width)),t.defaultOpations.height&&(t.defaultOpations.height=T(t.defaultOpations.height)),t.defaultOpations.fontSize&&(t.defaultOpations.fontSize=T(t.defaultOpations.fontSize))),t._empty(t.defaultOpations.text)&&(t.defaultOpations.text=t.val),t._empty(t.defaultOpations.format)&&(t.defaultOpations.format=t.format),new Be(t,t.cid,t.defaultOpations,(function(e){t.canvasWidth=e.width,t.canvasHeight=e.height}),(function(e){t._result(e),t.defaultOpations=Ne}))},_clearCode(){this._result("")},_saveCode(){let t=this;""!=this.result&&E({filePath:t.result,success:function(){v({title:"条形码保存成功",icon:"success",duration:2e3})}})},_result(t){this.result=t,this.$emit("result",t)},_empty(t){let e=typeof t,n=!1;return"number"==e&&""==String(t)||"undefined"==e?n=!0:"object"==e?"{}"!=JSON.stringify(t)&&"[]"!=JSON.stringify(t)&&null!=t||(n=!0):"string"==e?""!=t&&"undefined"!=t&&"null"!=t&&"{}"!=t&&"[]"!=t||(n=!0):"function"==e&&(n=!1),n}},watch:{val(t,e){this.onval&&(t==e||this._empty(t)||setTimeout((()=>{this._makeCode()}),0))},opations:{handler(t,e){this.onval&&(this._empty(t)||setTimeout((()=>{this._makeCode()}),0))},deep:!0}},mounted:function(){this.loadMake&&(this._empty(this.val)||setTimeout((()=>{this._makeCode()}),0))}};let Me=0;const ze=W({name:"jnpf-barcode",props:{dataType:{type:String,default:"static"},format:{type:String,default:"code128"},lineColor:{type:String,default:"#000"},background:{type:String,default:"#fff"},relationField:{type:String,default:""},formData:{type:Object},width:{type:Number,default:4},height:{type:Number,default:40},staticText:{type:String,default:""}},components:{tkiBarcode:W(De,[["render",function(t,r,s,l,u,d){const h=L,f=w,p=c;return e(),n(p,{class:"tki-barcode"},{default:o((()=>[i(h,{class:"tki-barcode-canvas","canvas-id":s.cid,style:a({width:u.canvasWidth+"px",height:u.canvasHeight+"px"})},null,8,["canvas-id","style"]),j(i(f,{src:u.result,style:a({width:u.canvasWidth+"px",height:u.canvasHeight+"px"})},null,8,["src","style"]),[[A,s.show]])])),_:1})}],["__scopeId","data-v-dd04a07e"]])},data:()=>({cid:"",relationText:"",showBarCode:!1,key:+new Date}),computed:{barcode(){var t;return"static"===this.dataType?this.staticText:null==(t=this.relationText)?void 0:t.toString()},opations(){return{format:this.format,width:this.width,height:this.height,displayValue:!1,lineColor:this.lineColor,background:this.background}}},created(){this.cid=this.uuid(),this.showBarCode=!0,P("updateCode",(()=>{this.showBarCode=!1,this.$nextTick((()=>{this.showBarCode=!0}))}))},watch:{formData:{handler:function(t){t&&"relation"===this.dataType&&this.relationField&&this.relationText!=t[this.relationField]&&(this.relationText=t[this.relationField],setTimeout((()=>{this.key=+new Date}),50))},deep:!0,immediate:!0}},methods:{uuid(){const t=Date.now(),e=Math.floor(1e9*Math.random());return Me++,"barcode_"+e+Me+String(t)}}},[["render",function(t,o,i,a,r,s){const u=R("tki-barcode");return s.barcode&&r.showBarCode?(e(),n(u,{class:"jnpf-barcode",ref:"barcode",format:i.format,cid:r.cid,val:s.barcode,opations:s.opations,loadMake:"",key:r.key},null,8,["format","cid","val","opations"])):l("",!0)}],["__scopeId","data-v-6b3e5ea8"]]);let $e={};!function(){function t(t){return t<128?[t]:t<2048?[192+(t>>6),128+(63&t)]:[224+(t>>12),128+(t>>6&63),128+(63&t)]}function e(e,n){this.typeNumber=-1,this.errorCorrectLevel=n,this.modules=null,this.moduleCount=0,this.dataCache=null,this.rsBlocks=null,this.totalDataCount=-1,this.data=e,this.utf8bytes=function(e){for(var n=[],o=0;o<e.length;o++)for(var i=t(e.charCodeAt(o)),a=0;a<i.length;a++)n.push(i[a]);return n}(e),this.make()}e.prototype={constructor:e,getModuleCount:function(){return this.moduleCount},make:function(){this.getRightType(),this.dataCache=this.createData(),this.createQrcode()},makeImpl:function(t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var e=0;e<this.moduleCount;e++)this.modules[e]=new Array(this.moduleCount);this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(!0,t),this.typeNumber>=7&&this.setupTypeNumber(!0),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(t,e){for(var n=-1;n<=7;n++)if(!(t+n<=-1||this.moduleCount<=t+n))for(var o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(this.modules[t+n][e+o]=0<=n&&n<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=o&&o<=4)},createQrcode:function(){for(var t=0,e=0,n=null,o=0;o<8;o++){this.makeImpl(o);var i=d.getLostPoint(this);(0==o||t>i)&&(t=i,e=o,n=this.modules)}this.modules=n,this.setupTypeInfo(!1,e),this.typeNumber>=7&&this.setupTypeNumber(!1)},setupTimingPattern:function(){for(var t=8;t<this.moduleCount-8;t++)null==this.modules[t][6]&&(this.modules[t][6]=t%2==0,null==this.modules[6][t]&&(this.modules[6][t]=t%2==0))},setupPositionAdjustPattern:function(){for(var t=d.getPatternPosition(this.typeNumber),e=0;e<t.length;e++)for(var n=0;n<t.length;n++){var o=t[e],i=t[n];if(null==this.modules[o][i])for(var a=-2;a<=2;a++)for(var r=-2;r<=2;r++)this.modules[o+a][i+r]=-2==a||2==a||-2==r||2==r||0==a&&0==r}},setupTypeNumber:function(t){for(var e=d.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var o=!t&&1==(e>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=o,this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=o}},setupTypeInfo:function(t,e){for(var o=n[this.errorCorrectLevel]<<3|e,i=d.getBCHTypeInfo(o),a=0;a<15;a++){var r=!t&&1==(i>>a&1);a<6?this.modules[a][8]=r:a<8?this.modules[a+1][8]=r:this.modules[this.moduleCount-15+a][8]=r;r=!t&&1==(i>>a&1);a<8?this.modules[8][this.moduleCount-a-1]=r:a<9?this.modules[8][15-a-1+1]=r:this.modules[8][15-a-1]=r}this.modules[this.moduleCount-8][8]=!t},createData:function(){var t=new y,n=this.typeNumber>9?16:8;t.put(4,4),t.put(this.utf8bytes.length,n);for(var o=0,i=this.utf8bytes.length;o<i;o++)t.put(this.utf8bytes[o],8);for(t.length+4<=8*this.totalDataCount&&t.put(0,4);t.length%8!=0;)t.putBit(!1);for(;!(t.length>=8*this.totalDataCount||(t.put(e.PAD0,8),t.length>=8*this.totalDataCount));)t.put(e.PAD1,8);return this.createBytes(t)},createBytes:function(t){for(var e=0,n=0,o=0,i=this.rsBlock.length/3,a=new Array,r=0;r<i;r++)for(var s=this.rsBlock[3*r+0],l=this.rsBlock[3*r+1],u=this.rsBlock[3*r+2],c=0;c<s;c++)a.push([u,l]);for(var h=new Array(a.length),f=new Array(a.length),m=0;m<a.length;m++){var y=a[m][0],g=a[m][1]-y;n=Math.max(n,y),o=Math.max(o,g),h[m]=new Array(y);for(r=0;r<h[m].length;r++)h[m][r]=255&t.buffer[r+e];e+=y;var b=d.getErrorCorrectPolynomial(g),v=new p(h[m],b.getLength()-1).mod(b);f[m]=new Array(b.getLength()-1);for(r=0;r<f[m].length;r++){var _=r+v.getLength()-f[m].length;f[m][r]=_>=0?v.get(_):0}}var C=new Array(this.totalDataCount),w=0;for(r=0;r<n;r++)for(m=0;m<a.length;m++)r<h[m].length&&(C[w++]=h[m][r]);for(r=0;r<o;r++)for(m=0;m<a.length;m++)r<f[m].length&&(C[w++]=f[m][r]);return C},mapData:function(t,e){for(var n=-1,o=this.moduleCount-1,i=7,a=0,r=this.moduleCount-1;r>0;r-=2)for(6==r&&r--;;){for(var s=0;s<2;s++)if(null==this.modules[o][r-s]){var l=!1;a<t.length&&(l=1==(t[a]>>>i&1)),d.getMask(e,o,r-s)&&(l=!l),this.modules[o][r-s]=l,-1==--i&&(a++,i=7)}if((o+=n)<0||this.moduleCount<=o){o-=n,n=-n;break}}}},e.PAD0=236,e.PAD1=17;for(var n=[1,0,3,2],o=0,i=1,a=2,r=3,s=4,l=5,u=6,c=7,d={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(t){for(var e=t<<10;d.getBCHDigit(e)-d.getBCHDigit(d.G15)>=0;)e^=d.G15<<d.getBCHDigit(e)-d.getBCHDigit(d.G15);return(t<<10|e)^d.G15_MASK},getBCHTypeNumber:function(t){for(var e=t<<12;d.getBCHDigit(e)-d.getBCHDigit(d.G18)>=0;)e^=d.G18<<d.getBCHDigit(e)-d.getBCHDigit(d.G18);return t<<12|e},getBCHDigit:function(t){for(var e=0;0!=t;)e++,t>>>=1;return e},getPatternPosition:function(t){return d.PATTERN_POSITION_TABLE[t-1]},getMask:function(t,e,n){switch(t){case o:return(e+n)%2==0;case i:return e%2==0;case a:return n%3==0;case r:return(e+n)%3==0;case s:return(Math.floor(e/2)+Math.floor(n/3))%2==0;case l:return e*n%2+e*n%3==0;case u:return(e*n%2+e*n%3)%2==0;case c:return(e*n%3+(e+n)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}},getErrorCorrectPolynomial:function(t){for(var e=new p([1],0),n=0;n<t;n++)e=e.multiply(new p([1,h.gexp(n)],0));return e},getLostPoint:function(t){for(var e=t.getModuleCount(),n=0,o=0,i=0;i<e;i++)for(var a=0,r=t.modules[i][0],s=0;s<e;s++){var l=t.modules[i][s];if(s<e-6&&l&&!t.modules[i][s+1]&&t.modules[i][s+2]&&t.modules[i][s+3]&&t.modules[i][s+4]&&!t.modules[i][s+5]&&t.modules[i][s+6]&&(s<e-10?t.modules[i][s+7]&&t.modules[i][s+8]&&t.modules[i][s+9]&&t.modules[i][s+10]&&(n+=40):s>3&&t.modules[i][s-1]&&t.modules[i][s-2]&&t.modules[i][s-3]&&t.modules[i][s-4]&&(n+=40)),i<e-1&&s<e-1){var u=0;l&&u++,t.modules[i+1][s]&&u++,t.modules[i][s+1]&&u++,t.modules[i+1][s+1]&&u++,0!=u&&4!=u||(n+=3)}r^l?a++:(r=l,a>=5&&(n+=3+a-5),a=1),l&&o++}for(s=0;s<e;s++)for(a=0,r=t.modules[0][s],i=0;i<e;i++){l=t.modules[i][s];i<e-6&&l&&!t.modules[i+1][s]&&t.modules[i+2][s]&&t.modules[i+3][s]&&t.modules[i+4][s]&&!t.modules[i+5][s]&&t.modules[i+6][s]&&(i<e-10?t.modules[i+7][s]&&t.modules[i+8][s]&&t.modules[i+9][s]&&t.modules[i+10][s]&&(n+=40):i>3&&t.modules[i-1][s]&&t.modules[i-2][s]&&t.modules[i-3][s]&&t.modules[i-4][s]&&(n+=40)),r^l?a++:(r=l,a>=5&&(n+=3+a-5),a=1)}return n+=10*(Math.abs(100*o/e/e-50)/5)}},h={glog:function(t){if(t<1)throw new Error("glog("+t+")");return h.LOG_TABLE[t]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return h.EXP_TABLE[t]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},f=0;f<8;f++)h.EXP_TABLE[f]=1<<f;for(f=8;f<256;f++)h.EXP_TABLE[f]=h.EXP_TABLE[f-4]^h.EXP_TABLE[f-5]^h.EXP_TABLE[f-6]^h.EXP_TABLE[f-8];for(f=0;f<255;f++)h.LOG_TABLE[h.EXP_TABLE[f]]=f;function p(t,e){if(null==t.length)throw new Error(t.length+"/"+e);for(var n=0;n<t.length&&0==t[n];)n++;this.num=new Array(t.length-n+e);for(var o=0;o<t.length-n;o++)this.num[o]=t[o+n]}p.prototype={get:function(t){return this.num[t]},getLength:function(){return this.num.length},multiply:function(t){for(var e=new Array(this.getLength()+t.getLength()-1),n=0;n<this.getLength();n++)for(var o=0;o<t.getLength();o++)e[n+o]^=h.gexp(h.glog(this.get(n))+h.glog(t.get(o)));return new p(e,0)},mod:function(t){var e=this.getLength(),n=t.getLength();if(e-n<0)return this;for(var o=new Array(e),i=0;i<e;i++)o[i]=this.get(i);for(;o.length>=n;){var a=h.glog(o[0])-h.glog(t.get(0));for(i=0;i<t.getLength();i++)o[i]^=h.gexp(h.glog(t.get(i))+a);for(;0==o[0];)o.shift()}return new p(o,0)}};var m=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];function y(){this.buffer=new Array,this.length=0}e.prototype.getRightType=function(){for(var t=1;t<41;t++){var e=m[4*(t-1)+this.errorCorrectLevel];if(null==e)throw new Error("bad rs block @ typeNumber:"+t+"/errorCorrectLevel:"+this.errorCorrectLevel);for(var n=e.length/3,o=0,i=0;i<n;i++){var a=e[3*i+0];o+=e[3*i+2]*a}var r=t>9?2:1;if(this.utf8bytes.length+r<o||40==t){this.typeNumber=t,this.rsBlock=e,this.totalDataCount=o;break}}},y.prototype={get:function(t){var e=Math.floor(t/8);return this.buffer[e]>>>7-t%8&1},put:function(t,e){for(var n=0;n<e;n++)this.putBit(t>>>e-n-1&1)},putBit:function(t){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};let g=[];$e=function(t){if(this.options={text:"",size:256,correctLevel:3,background:"#ffffff",foreground:"#000000",pdground:"#000000",image:"",imageSize:30,canvasId:t.canvasId,context:t.context,usingComponents:t.usingComponents,showLoading:t.showLoading,loadingText:t.loadingText},"string"==typeof t&&(t={text:t}),t)for(var n in t)this.options[n]=t[n];for(var o=null,i=(n=0,g.length);n<i;n++)if(g[n].text==this.options.text&&g[n].text.correctLevel==this.options.correctLevel){o=g[n].obj;break}n==i&&(o=new e(this.options.text,this.options.correctLevel),g.push({text:this.options.text,correctLevel:this.options.correctLevel,obj:o}));let a=function(t){var e=t.options;return e.pdground&&(t.row>1&&t.row<5&&t.col>1&&t.col<5||t.row>t.count-6&&t.row<t.count-2&&t.col>1&&t.col<5||t.row>1&&t.row<5&&t.col>t.count-6&&t.col<t.count-2)?e.pdground:e.foreground};!function(t){t.showLoading&&V({title:t.loadingText,mask:!0});for(var e=x(t.canvasId,t.context),n=o.getModuleCount(),i=t.size,r=t.imageSize,s=(i/n).toPrecision(4),l=(i/n).toPrecision(4),u=0;u<n;u++)for(var c=0;c<n;c++){var d=Math.ceil((c+1)*s)-Math.floor(c*s),h=Math.ceil((u+1)*s)-Math.floor(u*s),f=a({row:u,col:c,count:n,options:t});e.setFillStyle(o.modules[u][c]?f:t.background),e.fillRect(Math.round(c*s),Math.round(u*l),d,h)}if(t.image){let n=function(e,n,o,i,a,r,s,l,u){e.setLineWidth(s),e.setFillStyle(t.background),e.setStrokeStyle(t.background),e.beginPath(),e.moveTo(n+r,o),e.arcTo(n+i,o,n+i,o+r,r),e.arcTo(n+i,o+a,n+i-r,o+a,r),e.arcTo(n,o+a,n,o+a-r,r),e.arcTo(n,o,n+r,o,r),e.closePath(),l&&e.fill(),u&&e.stroke()};var p=Number(((i-r)/2).toFixed(2)),m=Number(((i-r)/2).toFixed(2));n(e,p,m,r,r,2,6,!0,!0),e.drawImage(t.image,p,m,r,r)}setTimeout((()=>{e.draw(!0,(()=>{setTimeout((()=>{try{O({width:t.width,height:t.height,destWidth:t.width,destHeight:t.height,canvasId:t.canvasId,quality:Number(1),success:function(e){t.cbResult&&t.cbResult(e.tempFilePath)},fail:function(e){t.cbResult&&t.cbResult(e)},complete:function(){t.showLoading&&k()}},t.context)}catch(e){}}),t.text.length+100)}))}),t.usingComponents?0:150)}(this.options)},$e.prototype.clear=function(t){var e=x(this.options.canvasId,this.options.context);e.clearRect(0,0,this.options.size,this.options.size),e.draw(!1,(()=>{t&&t()}))}}();const Ge=$e;let Fe;const Xe={name:"tki-qrcode",props:{cid:{type:String,default:"tki-qrcode-canvas"},size:{type:Number,default:200},unit:{type:String,default:"upx"},show:{type:Boolean,default:!0},val:{type:String,default:""},background:{type:String,default:"#ffffff"},foreground:{type:String,default:"#000000"},pdground:{type:String,default:"#000000"},icon:{type:String,default:""},iconSize:{type:Number,default:40},lv:{type:Number,default:3},onval:{type:Boolean,default:!1},loadMake:{type:Boolean,default:!1},usingComponents:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},loadingText:{type:String,default:"二维码生成中"}},data:()=>({result:""}),methods:{_makeCode(){let t=this;this._empty(this.val)?v({title:"二维码内容不能为空",icon:"none",duration:2e3}):Fe=new Ge({context:t,canvasId:t.cid,usingComponents:t.usingComponents,showLoading:t.showLoading,loadingText:t.loadingText,text:t.val,size:t.cpSize,background:t.background,foreground:t.foreground,pdground:t.pdground,correctLevel:t.lv,image:t.icon,imageSize:t.iconSize,cbResult:function(e){t._result(e)}})},_clearCode(){this._result(""),Fe.clear()},_saveCode(){let t=this;""!=this.result&&E({filePath:t.result,success:function(){v({title:"二维码保存成功",icon:"success",duration:2e3})}})},_result(t){this.result=t,this.$emit("result",t)},_empty(t){let e=typeof t,n=!1;return"number"==e&&""==String(t)||"undefined"==e?n=!0:"object"==e?"{}"!=JSON.stringify(t)&&"[]"!=JSON.stringify(t)&&null!=t||(n=!0):"string"==e?""!=t&&"undefined"!=t&&"null"!=t&&"{}"!=t&&"[]"!=t||(n=!0):"function"==e&&(n=!1),n}},watch:{size:function(t,e){t==e||this._empty(t)||(this.cSize=t,this._empty(this.val)||setTimeout((()=>{this._makeCode()}),100))},val:function(t,e){this.onval&&(t==e||this._empty(t)||setTimeout((()=>{this._makeCode()}),0))}},computed:{cpSize(){return"upx"==this.unit?T(this.size):this.size}},mounted:function(){this.loadMake&&(this._empty(this.val)||setTimeout((()=>{this._makeCode()}),0))}};let He=0;const Ue=W({name:"qrcode",props:{dataType:{type:String,default:"static"},colorLight:{type:String,default:"#fff"},colorDark:{type:String,default:"#000"},relationField:{type:String,default:""},formData:{type:Object},width:{type:Number,default:200},staticText:{type:String,default:""}},components:{tkiQrcode:W(Xe,[["render",function(t,r,s,l,u,d){const h=L,f=w,p=c;return e(),n(p,{class:"tki-qrcode"},{default:o((()=>[i(h,{class:"tki-qrcode-canvas","canvas-id":s.cid,style:a({width:d.cpSize+"px",height:d.cpSize+"px"})},null,8,["canvas-id","style"]),j(i(f,{src:u.result,style:a({width:d.cpSize+"px",height:d.cpSize+"px"})},null,8,["src","style"]),[[A,s.show]])])),_:1})}],["__scopeId","data-v-b9f789f4"]])},computed:{qrcode(){var t;if("static"===this.dataType)return this.staticText;if("relation"===this.dataType)return null==(t=this.relationText)?void 0:t.toString();if(this.formData&&this.dynamicModelExtra&&this.dynamicModelExtra.id&&this.dynamicModelExtra.modelId){const t={t:"DFD",id:this.dynamicModelExtra.id,mid:this.dynamicModelExtra.modelId,mt:this.dynamicModelExtra.type,fid:this.dynamicModelExtra.flowId||"",pid:this.dynamicModelExtra.processId||"",ftid:this.dynamicModelExtra.taskId||"",opt:this.dynamicModelExtra.opType};return JSON.stringify(t)}return""},dynamicModelExtra:()=>g("dynamicModelExtra")||null},data:()=>({cid:"",relationText:"",showQrcode:!1}),mounted(){this.cid=this.uuid(),this.showQrcode=!0,P("updateCode",(()=>{this.showQrcode=!1,this.$nextTick((()=>{this.showQrcode=!0}))}))},watch:{formData:{handler(t){const e=t[this.relationField]||0===t[this.relationField]||!1===t[this.relationField]?t[this.relationField]:"";t&&"relation"===this.dataType&&this.relationField&&(this.relationText=e)},deep:!0,immediate:!0}},methods:{uuid(){const t=Date.now(),e=Math.floor(1e9*Math.random());return He++,"qrcode_"+e+He+String(t)}}},[["render",function(t,o,i,a,r,s){const u=R("tki-qrcode");return s.qrcode&&r.showQrcode?(e(),n(u,{key:0,class:"jnpf-qrcode",ref:"qrcode",cid:r.cid,val:s.qrcode,size:2*i.width,background:i.colorLight,foreground:i.colorDark,onval:"",loadMake:"",showLoading:!1},null,8,["cid","val","size","background","foreground"])):l("",!0)}],["__scopeId","data-v-9a999353"]]),qe=t=>{const e=[],n=[],o=t=>t.length>0?t[t.length-1]:null,i=(t,e)=>{const n=t=>["+-","×÷","()"].findIndex((e=>e.includes(t)));return n(t)-n(e)};for(t.forEach((t=>{if("string"==typeof t&&Number.isNaN(Number(t)))if("("===t)e.push(t);else if(")"===t){let t;do{t=e.pop(),"("!==t&&n.push(t)}while(e.length&&"("!==t)}else{let a=o(e);if(a){for(;a&&"("!==a&&i(a,t)>=0;)n.push(e.pop()),a=o(e);e.push(t)}else e.push(t)}else n.push(t)}));e.length;)n.push(e.pop());return n},Je=t=>{const e=[],n=t=>/^[\d|\.]$/.test(t);for(let o=0;o<t.length;o++)o>0&&n(t[o-1])&&n(t[o])?e[e.length-1]+=t[o]:e.push(t[o]);return e};const We=W({name:"jnpf-calculation",props:{modelValue:{type:[String,Number],default:""},thousands:{type:Boolean,default:!1},precision:{default:0},isAmountChinese:{type:Boolean,default:!1},expression:{type:Array,default:[]},config:{type:Object,default:{}},formData:{type:Object,default:{}},rowIndex:{type:[String,Number],default:""},roundType:{type:[String,Number],default:1},dateCalConfig:Object,type:{default:1,type:Number}},data(){return{innerValue:"",RPN_EXP:qe(Je(this.expression)),rmbText:"",subValue:0,unitObj:{d:"天",h:"时",M:"月",m:"分",s:"秒",Y:"年"},startTime:new Date,endTime:new Date}},watch:{formData:{handler(t,e){setTimeout((()=>{this.execRPN()}),0)},deep:!0,immediate:!0},modelValue:{handler(t,e){this.innerValue=t},deep:!0,immediate:!0}},methods:{getRoundValue(t){const e=this.precision||0;let n;if(2==this.roundType){const o=Math.pow(10,e);return n=Math.trunc(t*o)/o,n}return 3==this.roundType?Math.ceil(t):4==this.roundType?Math.floor(t):t.toFixed(e)},execRPN(){var t,e,n,o,i;if(2===this.type)1==(null==(t=this.dateCalConfig)?void 0:t.startTimeType)&&(this.startTime=this.dateCalConfig.startTimeValue),2==(null==(e=this.dateCalConfig)?void 0:e.startTimeType)&&(this.startTime=this.getFormVal(this.dateCalConfig.startRelationField)),1==(null==(n=this.dateCalConfig)?void 0:n.endTimeType)&&(this.endTime=this.dateCalConfig.endTimeValue),2==(null==(o=this.dateCalConfig)?void 0:o.endTimeType)&&(this.endTime=this.getFormVal(this.dateCalConfig.endRelationField)),this.innerValue=this.calDateDiff(this.startTime,this.endTime,null==(i=this.dateCalConfig)?void 0:i.dateUnit),this.$emit("update:modelValue",this.innerValue);else{const t=this.RPN_EXP.map((t=>"object"==typeof t?this.getFormVal(t.__vModel__):t));this.setValue(t),this.subValue=JSON.parse(JSON.stringify(this.innerValue)),isNaN(this.innerValue)&&(this.innerValue=0),this.rmbText=this.jnpf.getAmountChinese(Number(this.subValue)||0),this.$emit("update:modelValue",this.subValue),this.thousands&&(this.innerValue=this.numFormat(this.innerValue))}},calDateDiff(t,e,n){var o;if(!t||!e)return"";const i=I(t);let a=I(e);0===a.hour()&&0===a.minute()&&0===a.second()&&2===(null==(o=this.dateCalConfig)?void 0:o.dateFormat)&&(a=a.endOf("d"));const r=a.diff(i,"Y"==n?"y":n,!0);return r||0===r?this.getRoundValue(r):""},setValue(t){let e=(t=>{t=t.concat();const e=(t,e,n)=>{let o=Number(t),i=Number(e);switch(n){case"+":return o+i;case"-":return o-i;case"×":return o*i;case"÷":return o/i}};for(let n=2;n<t.length;n++)if("+-×÷".includes(t[n])){let o=e(t[n-2],t[n-1],t[n]);t.splice(n-2,3,o),n-=2}return t[0]})(t);if(isNaN(e)||!isFinite(e))this.innerValue=0;else{let t=Number(e);2==this.roundType?this.innerValue=t:this.innerValue=Number(t.toFixed(this.precision||0))}this.innerValue=this.getRoundValue(parseFloat(this.innerValue))},numFormat(t){let e=(t=t.toString().split("."))[0].split("").reverse(),n=[];for(let o=0,i=e.length;o<i;o++)o%3==0&&0!==o&&n.push(","),n.push(e[o]);return n.reverse(),n=t[1]?n.join("").concat("."+t[1]):n.join(""),n},getFormVal(t){try{if(t.indexOf(".")>-1){let[e,n]=t.split(".");return"number"==typeof this.rowIndex?!Array.isArray(this.formData[e])||this.formData[e].length<this.rowIndex+1?0:this.formData[e][this.rowIndex][n]||0:this.formData[e].length?this.formData[e].reduce(((t,e)=>(e[n]?Number(e[n]):0)+t),0):0}return this.formData[t]||0}catch(e){return console.warn("计算公式出错, 可能包含无效的组件值",e),0}}}},[["render",function(a,u,h,f,p,m){const y=J(t("u-input"),et),g=c;return e(),n(g,{class:"jnpf-calculation jnpf-calculation-right"},{default:o((()=>[i(g,{class:"u-flex"},{default:o((()=>{var t;return[i(y,{"input-align":"right",modelValue:p.innerValue,"onUpdate:modelValue":u[0]||(u[0]=t=>p.innerValue=t),disabled:"",placeholder:""},null,8,["modelValue"]),2===h.type?(e(),d("span",{key:0,class:"unit"},s(p.unitObj[null==(t=h.dateCalConfig)?void 0:t.dateUnit]),1)):l("",!0)]})),_:1}),h.isAmountChinese?(e(),n(g,{key:0,class:"tips"},{default:o((()=>[r(s(p.rmbText),1)])),_:1})):l("",!0)])),_:1})}],["__scopeId","data-v-b5dac42c"]]);const Ke=W({name:"jnpf-date-calculation",props:{modelValue:{type:[String,Number],default:""},expression:{type:Array,default:[]},formData:{type:Object,default:{}},rowIndex:{type:[String,Number],default:""},startRelationField:String,startTimeValue:[String,Number],startTimeType:{default:1,type:Number},format:{default:"yyyy-MM-dd",type:String}},data:()=>({innerValue:"",startTime:new Date}),computed:{getExp(){return(t=>{const e=[],n=t=>/^[\d|\.]$/.test(t);for(let o=0;o<t.length;o++)o>0&&n(t[o-1])&&n(t[o])?e[e.length-1]+=t[o]:e.push(t[o]);return e})(this.expression)}},watch:{formData:{handler(t,e){setTimeout((()=>{this.execRPN()}),0)},deep:!0,immediate:!0},modelValue:{handler(t,e){this.innerValue=t},deep:!0,immediate:!0}},methods:{execRPN(){const t=this.getExp.map((t=>"object"==typeof t?this.getFormVal(t.__vModel__):t));1==this.startTimeType&&(this.startTime=this.startTimeValue),2==this.startTimeType&&(this.startTime=this.getFormVal(this.startRelationField)),this.innerValue=this.calcDate(this.startTime,this.getDateInfo(t)),this.$emit("update:modelValue",this.innerValue)},getDateInfo(t){let e=0,n=0,o=0,i=0,a=0,r=0;for(let s=0;s<t.length;s+=3){const l=t[s],u=Number.parseInt(t[s+1],10),c="+"===l?1:-1;switch(t[s+2]){case"d":e+=c*u;break;case"h":i+=c*u;break;case"M":n+=c*u;break;case"m":a+=c*u;break;case"s":r+=c*u;break;case"Y":o+=c*u}}return{days:e,hours:i,minutes:a,months:n,seconds:r,years:o}},calcDate(t,e){if(!t)return"";const n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setSeconds(n.getSeconds()+e.seconds),I(n).startOf(this.jnpf.getDateTimeUnit(this.format)).valueOf()},getFormVal(t){try{if(t.indexOf(".")>-1){let[e,n]=t.split(".");return"number"==typeof this.rowIndex?!Array.isArray(this.formData[e])||this.formData[e].length<this.rowIndex+1?0:this.formData[e][this.rowIndex][n]||0:this.formData[e].length?this.formData[e].reduce(((t,e)=>(e[n]?Number(e[n]):0)+t),0):0}return this.formData[t]||0}catch(e){return console.warn("计算公式出错, 可能包含无效的组件值",e),0}}}},[["render",function(a,r,s,l,u,d){const h=J(t("u-input"),et),f=c;return e(),n(f,{class:"jnpf-calculation jnpf-calculation-right"},{default:o((()=>[i(h,{"input-align":"right",modelValue:a.jnpf.toDate(u.innerValue,s.format),disabled:"",placeholder:""},null,8,["modelValue"])])),_:1})}],["__scopeId","data-v-8b98bf6b"]]);const Qe=W({name:"jnpf-sign",components:{MultSelect:nt},props:{modelValue:{type:[String,Number,Boolean]},disabled:{type:Boolean,default:!1},detailed:{type:Boolean,default:!1},showBtn:{type:Boolean,default:!0},align:{type:String,default:"right"},ableIds:{type:Array,default:()=>[]}},data:()=>({innerValue:"",show:!1,options:[],defaultValue:[]}),watch:{modelValue:{handler(t){this.innerValue=t||""},immediate:!0}},methods:{getListByIds(){var t;(t={ids:this.ableIds},B({url:"/api/system/Signature/ListByIds",method:"post",data:t})).then((t=>{this.options=t.data.list||[];const e=this.options.findIndex((t=>this.innerValue===t.icon));e>-1&&(this.defaultValue=[this.options[e].id]),this.show=!0}))},open(){if(!this.disabled)return this.ableIds.length?void(this.ableIds.length&&this.getListByIds()):this.show=!0},confirm(t){t.length&&(this.innerValue=t[0].icon||"",this.$emit("update:modelValue",this.innerValue),this.$emit("change",t[0]))},handlePreviewImage(t){C({urls:[_.getAuthImgUrl(t)],current:t,success:()=>{},fail:()=>{v({title:"预览图片失败",icon:"none"})}})}}},[["render",function(t,a,s,u,f,m){const g=w,b=c,v=R("MultSelect");return e(),n(b,{class:p(["jnpf-signature","right"==s.align?"flex-end":"flex-start"])},{default:o((()=>[i(b,{class:"jnpf-signature-box"},{default:o((()=>[s.showBtn?(e(),d(h,{key:0},[j(i(g,{class:"jnpf-signature-img",src:t.jnpf.getAuthImgUrl(f.innerValue),mode:"scaleToFill",onClick:a[0]||(a[0]=y((t=>m.handlePreviewImage(f.innerValue)),["stop"]))},null,8,["src"]),[[A,f.innerValue]]),s.detailed?l("",!0):(e(),n(b,{key:0,class:p(["jnpf-signature-btn",{"jnpf-signature-disabled":s.disabled}]),onClick:a[1]||(a[1]=t=>m.open())},{default:o((()=>[N("i",{class:"icon-ym icon-ym-signature1"}),f.innerValue?l("",!0):(e(),n(b,{key:0,class:"title"},{default:o((()=>[r("电子签章")])),_:1}))])),_:1},8,["class"]))],64)):l("",!0)])),_:1}),i(v,{show:f.show,list:f.options,onConfirm:m.confirm,onClose:a[2]||(a[2]=t=>f.show=!1),"default-value":f.defaultValue,filterable:""},null,8,["show","list","onConfirm","default-value"])])),_:1},8,["class"])}],["__scopeId","data-v-cc6c4848"]]),Ye={lat:"",lng:"",name:"",fullAddress:""};const Ze=W({name:"jnpf-location",props:{modelValue:{type:String,default:""},autoLocation:{type:Boolean,default:!1},enableLocationScope:{type:Boolean,default:!1},adjustmentScope:{type:Number,default:500},enableDesktopLocation:{type:Boolean,default:!1},locationScope:{type:Array,default:[]},disabled:{type:Boolean,default:!1},detailed:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},buttonText:{type:String,default:"添加定位"}},data:()=>({innerValue:"",errTitle:"",emitKey:""}),watch:{modelValue:{handler(t){this.innerValue=t?JSON.parse(t):Ye},immediate:!0}},computed:{staticMapUrl(){if(!this.enableLocationScope)return" ";const t=this.innerValue.lng+","+this.innerValue.lat;return`${this.define.baseURL}/api/system/Location/staticmap?location=${t}&zoom=19&size=80*80&key=${this.define.aMapWebKey}`}},created(){this.errTitle="",this.handleAutoLocation(),this.handleListen()},methods:{handleListen(){this.emitKey="location"+this.jnpf.idGenerator(),P(this.emitKey,(t=>{this.handleConfirm(t)}))},handleLocation(t){if(this.disabled||this.detailed)return;const e={adjustmentScope:this.adjustmentScope,enableLocationScope:this.enableLocationScope,enableDesktopLocation:this.enableDesktopLocation,locationScope:this.locationScope,emitKey:this.emitKey};D({url:"/pages/apply/location/index?data="+JSON.stringify(e)})},handleAutoLocation(){!this.autoLocation||this.innerValue.fullAddress||this.detailed||M({type:"gcj02",isHighAccuracy:!0,success:t=>{const e=()=>{const e={location:t.longitude+","+t.latitude,key:this.define.aMapWebKey};$(e).then((e=>{const n=e.data.regeocode.addressComponent;this.innerValue={pName:n.province,cName:n.city,adName:n.district,address:n.streetNumber.street+n.streetNumber.number,name:e.data.regeocode.formatted_address,lng:t.longitude,lat:t.latitude,fullAddress:e.data.regeocode.formatted_address},this.$emit("update:modelValue",JSON.stringify(this.innerValue)),this.$emit("change",JSON.stringify(this.innerValue))})).catch((()=>{this.handelError()}))};if(this.enableDesktopLocation&&this.locationScope.length){let n=[];for(let e=0;e<this.locationScope.length;e++){const o=this.locationScope[e],i=this.jnpf.getDistance(o.lat,o.lng,t.latitude,t.longitude)||0;n.push(i>o.radius)}if(n.every((t=>!0===t)))return;e()}else e()},fail:t=>{this.handelError()}})},handleConfirm(t){this.innerValue=t?JSON.parse(t):Ye,this.errTitle="",this.onchange()},handelError(){this.errTitle="定位失败,请检查网络畅通、定位开启后重试"},handleClear(){this.innerValue=Ye,this.$emit("update:modelValue",""),this.$emit("change","")},onchange(){let t=this.$u.deepClone(this.innerValue);this.$emit("update:modelValue",JSON.stringify(t)),this.$emit("change",JSON.stringify(t))},openMap(){z({latitude:Number(this.innerValue.lat),longitude:Number(this.innerValue.lng),name:this.innerValue.name,address:this.innerValue.address,success:()=>{},fail:function(t){console.log(t)}})},getLocation(){if(this.detailed)return this.openMap();this.enableLocationScope&&this.handleLocation()}}},[["render",function(a,u,d,h,f,m){const y=J(t("u-icon"),K),g=J(t("u-button"),ot),b=w,v=c;return e(),n(v,{class:"jnpf-location"},{default:o((()=>[d.detailed?l("",!0):(e(),n(g,{key:0,class:p(["jnpf-location-btn",{"jnpf-location-disabled":d.disabled}]),onClick:m.handleLocation,size:"mini"},{default:o((()=>[i(y,{class:"jnpf-location-icon",name:"map"}),r(" "+s(f.innerValue.fullAddress||f.errTitle?a.$t("app.apply.location.relocation"):a.$t("app.apply.location.location")),1)])),_:1},8,["class","onClick"])),f.innerValue.fullAddress?(e(),n(v,{key:1,class:"location-card"},{default:o((()=>[i(v,{class:"location-card-info",onClick:m.getLocation},{default:o((()=>[d.enableLocationScope?(e(),n(b,{key:0,class:"location-card-static-map",src:m.staticMapUrl},null,8,["src"])):l("",!0),i(v,{class:p(["location-card-address",{disabled:d.disabled}])},{default:o((()=>[r(s(f.innerValue.fullAddress),1)])),_:1},8,["class"]),d.detailed||d.disabled||!d.clearable?l("",!0):(e(),n(y,{key:1,name:"close-circle-fill",onClick:m.handleClear},null,8,["onClick"]))])),_:1},8,["onClick"])])),_:1})):l("",!0),f.errTitle?(e(),n(v,{key:2,class:"errTitle"},{default:o((()=>[r(s(f.errTitle),1)])),_:1})):l("",!0)])),_:1})}],["__scopeId","data-v-ef738b58"]]);const tn=W({name:"jnpf-link",props:{content:{type:String,default:"文本链接"},href:{type:String,default:""},target:{type:String,default:""},textStyle:{type:Object,default:{}}},methods:{handleClick(t){if(!this.href)return this.$u.toast("未配置跳转链接");this.target,D({url:"/pages/apply/externalLink/index?url="+this.href,fail:t=>{this.$u.toast("暂无此页面")}})}}},[["render",function(t,l,u,d,h,f){const p=m,y=c;return e(),n(y,{class:"jnpf-link",style:a(u.textStyle),onClick:l[0]||(l[0]=t=>f.handleClick())},{default:o((()=>[i(p,null,{default:o((()=>[r(s(u.content),1)])),_:1})])),_:1},8,["style"])}],["__scopeId","data-v-fc6186b9"]]);const en=W({name:"jnpf-editor",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"请输入"},disabled:{type:Boolean,default:!1},detailed:{type:Boolean,default:!1}},data(){return{innerValue:"",readOnly:!1,formats:{},editorChange:!1,id:"jnpf-editor-"+this.jnpf.idGenerator()}},watch:{modelValue(t){this.editorChange&&t||(this.editorChange=!1,this.editorCtx&&this.editorCtx.setContents({html:t}))}},onLoad(){G({family:"Pacifico",source:'url("/Pacifico-Regular.ttf")'})},methods:{readOnlyChange(){this.readOnly=!this.readOnly},onEditorReady(){S().in(this).select("#"+this.id).context((t=>{this.editorCtx=t.context,this.editorCtx.setContents({html:this.modelValue})})).exec()},undo(){this.editorCtx.undo()},redo(){this.editorCtx.redo()},format(t){let{name:e,value:n}=t.target.dataset;e&&this.editorCtx.format(e,n)},onStatusChange(t){const e=t.detail;this.formats=e},insertDivider(){this.editorCtx.insertDivider()},clear(){this.editorCtx.clear()},removeFormat(){this.editorCtx.removeFormat()},insertDate(){const t=new Date,e=`${t.getFullYear()}/${t.getMonth()+1}/${t.getDate()}`;this.editorCtx.insertText({text:e})},insertImage(){F({count:1,success:t=>{this.getImageBase64(t)}})},getImageBase64(t){const e=t.tempFilePaths[0];X({url:e,responseType:"arraybuffer",success:t=>{const e=H(t.data);this.insertImageVal("data:image/jpeg;base64,"+e)}})},insertImageVal(t){this.editorCtx.insertImage({src:t,alt:"图像",success:function(){}})},getValue(t){this.editorChange=!0;const e=this;this.editorCtx.getContents({success:function(t){let n="\n"===t.text?"":t.html;e.$emit("update:modelValue",n)}})}}},[["render",function(a,r,s,l,u,f){const m=c,y=U,g=J(t("mp-html"),it);return e(),n(m,{class:"jnpf-editor"},{default:o((()=>[s.detailed?(e(),n(m,{key:1,class:"editor-box"},{default:o((()=>[i(g,{content:s.modelValue},null,8,["content"])])),_:1})):(e(),d(h,{key:0},[i(m,{class:"toolbar"},{default:o((()=>[i(m,{class:p([{"ql-active":u.formats.bold},"iconfont icon-zitijiacu"]),"data-name":"bold",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":u.formats.italic},"iconfont icon-zitixieti"]),"data-name":"italic",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":u.formats.underline},"iconfont icon-zitixiahuaxian"]),"data-name":"underline",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":u.formats.strike},"iconfont icon-zitishanchuxian"]),"data-name":"strike",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"left"===u.formats.align},"iconfont icon-zuoduiqi"]),"data-name":"align","data-value":"left",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"center"===u.formats.align},"iconfont icon-juzhongduiqi"]),"data-name":"align","data-value":"center",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"right"===u.formats.align},"iconfont icon-youduiqi"]),"data-name":"align","data-value":"right",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"justify"===u.formats.align},"iconfont icon-zuoyouduiqi"]),"data-name":"align","data-value":"justify",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":u.formats.lineHeight},"iconfont icon-line-height"]),"data-name":"lineHeight","data-value":"2",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":u.formats.letterSpacing},"iconfont icon-Character-Spacing"]),"data-name":"letterSpacing","data-value":"2em",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":u.formats.marginTop},"iconfont icon-722bianjiqi_duanqianju"]),"data-name":"marginTop","data-value":"20px",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":u.formats.marginBottom},"iconfont icon-723bianjiqi_duanhouju"]),"data-name":"marginBottom","data-value":"20px",onClick:f.format},null,8,["class","onClick"]),i(m,{class:"iconfont icon-clearedformat",onClick:f.removeFormat},null,8,["onClick"]),i(m,{class:p([{"ql-active":u.formats.fontFamily},"iconfont icon-font"]),"data-name":"fontFamily","data-value":"Pacifico",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"24px"===u.formats.fontSize},"iconfont icon-fontsize"]),"data-name":"fontSize","data-value":"24px",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"#0000ff"===u.formats.color},"iconfont icon-text_color"]),"data-name":"color","data-value":"#0000ff",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"#00ff00"===u.formats.backgroundColor},"iconfont icon-fontbgcolor"]),"data-name":"backgroundColor","data-value":"#00ff00",onClick:f.format},null,8,["class","onClick"]),i(m,{class:"iconfont icon-date",onClick:f.insertDate},null,8,["onClick"]),i(m,{class:"iconfont icon--checklist","data-name":"list","data-value":"check",onClick:f.format},null,8,["onClick"]),i(m,{class:p([{"ql-active":"ordered"===u.formats.list},"iconfont icon-youxupailie"]),"data-name":"list","data-value":"ordered",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"bullet"===u.formats.list},"iconfont icon-wuxupailie"]),"data-name":"list","data-value":"bullet",onClick:f.format},null,8,["class","onClick"]),i(m,{class:"iconfont icon-undo",onClick:f.undo},null,8,["onClick"]),i(m,{class:"iconfont icon-redo",onClick:f.redo},null,8,["onClick"]),i(m,{class:"iconfont icon-outdent","data-name":"indent","data-value":"-1",onClick:f.format},null,8,["onClick"]),i(m,{class:"iconfont icon-indent","data-name":"indent","data-value":"+1",onClick:f.format},null,8,["onClick"]),i(m,{class:"iconfont icon-fengexian",onClick:f.insertDivider},null,8,["onClick"]),i(m,{class:"iconfont icon-charutupian",onClick:f.insertImage},null,8,["onClick"]),i(m,{class:p([{"ql-active":1===u.formats.header},"iconfont icon-format-header-1"]),"data-name":"header","data-value":1,onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"sub"===u.formats.script},"iconfont icon-zitixiabiao"]),"data-name":"script","data-value":"sub",onClick:f.format},null,8,["class","onClick"]),i(m,{class:p([{"ql-active":"super"===u.formats.script},"iconfont icon-zitishangbiao"]),"data-name":"script","data-value":"super",onClick:f.format},null,8,["class","onClick"]),i(m,{class:"iconfont icon-shanchu",onClick:f.clear},null,8,["onClick"]),i(m,{class:p([{"ql-active":"rtl"===u.formats.direction},"iconfont icon-direction-rtl"]),"data-name":"direction","data-value":"rtl",onClick:f.format},null,8,["class","onClick"])])),_:1}),i(m,{class:"editor-wrapper"},{default:o((()=>[i(y,{id:u.id,class:p(["ql-container",{"ql-disabled":s.disabled}]),placeholder:s.placeholder,showImgSize:"",showImgToolbar:"",showImgResize:"",onStatuschange:f.onStatusChange,"read-only":s.disabled,onReady:f.onEditorReady,onInput:f.getValue},null,8,["id","class","placeholder","onStatuschange","read-only","onReady","onInput"])])),_:1})],64))])),_:1})}],["__scopeId","data-v-b76e6a20"]]);const nn=W({name:"jnpf-button",props:{align:{default:"left"},buttonText:{default:""},disabled:{type:Boolean,default:!1},type:{default:""}},computed:{realType(){return this.type?"danger"===this.type?"error":this.type:"default"}},data:()=>({customStyle:{display:"inline-block"}}),methods:{onClick(t){this.$emit("click",t)}}},[["render",function(a,l,u,d,h,f){const m=J(t("u-button"),ot),y=c;return e(),n(y,{class:p("jnpf-button jnpf-button-"+u.align)},{default:o((()=>[i(m,{"custom-style":h.customStyle,type:f.realType,disabled:u.disabled,onClick:f.onClick},{default:o((()=>[r(s(u.buttonText),1)])),_:1},8,["custom-style","type","disabled","onClick"])])),_:1},8,["class"])}],["__scopeId","data-v-d58db38b"]]);export{ht as D,yt as _,bt as a,at as b,pt as c,We as d,Ke as e,Qe as f,Ze as g,rt as h,st as i,lt as j,ut as k,ct as l,dt as m,ze as n,Ue as o,tn as p,en as q,nn as r};
|