UNPKG

shu-c-view

Version:

rollup 打包vue组件库框架

7 lines (6 loc) 15.3 kB
/*! * shu-c-view v1.2.37 * (c) 2022-09-22 * @license MIT */ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("lodash/isNil"),e=require("lodash/isEqual"),r=require("lodash/set"),n=require("lodash/assign"),o=require("lodash/has"),i=require("lodash/isArray"),a=require("lodash/isEmpty");function c(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var u=c(t),l=c(e),f=c(r),s=c(n),p=c(o),g=c(i),h=c(a),v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},d=function(t){try{return!!t()}catch(t){return!0}},y=!d((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),b={},x=function(t){return t&&t.Math==Math&&t},E=x("object"==typeof globalThis&&globalThis)||x("object"==typeof window&&window)||x("object"==typeof self&&self)||x("object"==typeof v&&v)||function(){return this}()||Function("return this")(),m=function(t){return"object"==typeof t?null!==t:"function"==typeof t},S=m,_=E.document,O=S(_)&&S(_.createElement),R=function(t){return O?_.createElement(t):{}},w=!y&&!d((function(){return 7!=Object.defineProperty(R("div"),"a",{get:function(){return 7}}).a})),P=m,j=function(t){if(!P(t))throw TypeError(String(t)+" is not an object");return t},T=m,I=function(t,e){if(!T(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!T(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!T(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!T(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},A=y,N=w,k=j,C=I,$=Object.defineProperty;b.f=A?$:function(t,e,r){if(k(t),e=C(e,!0),k(r),N)try{return $(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var D=y,M=b.f,U=Function.prototype,L=U.toString,F=/^\s*function ([^ (]*)/;D&&!("name"in U)&&M(U,"name",{configurable:!0,get:function(){try{return L.call(this).match(F)[1]}catch(t){return""}}});var q={},B={},V={}.propertyIsEnumerable,K=Object.getOwnPropertyDescriptor,z=K&&!V.call({1:2},1);B.f=z?function(t){var e=K(this,t);return!!e&&e.enumerable}:V;var G=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Y={}.toString,W=function(t){return Y.call(t).slice(8,-1)},X=W,H="".split,J=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},Q=d((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==X(t)?H.call(t,""):Object(t)}:Object,Z=J,tt=function(t){return Q(Z(t))},et={}.hasOwnProperty,rt=function(t,e){return et.call(t,e)},nt=y,ot=B,it=G,at=tt,ct=I,ut=rt,lt=w,ft=Object.getOwnPropertyDescriptor;q.f=nt?ft:function(t,e){if(t=at(t),e=ct(e,!0),lt)try{return ft(t,e)}catch(t){}if(ut(t,e))return it(!ot.f.call(t,e),t[e])};var st=b,pt=G,gt=y?function(t,e,r){return st.f(t,e,pt(1,r))}:function(t,e,r){return t[e]=r,t},ht={exports:{}},vt=E,dt=gt,yt=function(t,e){try{dt(vt,t,e)}catch(r){vt[t]=e}return e},bt=yt,xt=E["__core-js_shared__"]||bt("__core-js_shared__",{}),Et=xt,mt=Function.toString;"function"!=typeof Et.inspectSource&&(Et.inspectSource=function(t){return mt.call(t)});var St=Et.inspectSource,_t=St,Ot=E.WeakMap,Rt="function"==typeof Ot&&/native code/.test(_t(Ot)),wt={exports:{}},Pt=xt;(wt.exports=function(t,e){return Pt[t]||(Pt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var jt,Tt,It,At=0,Nt=Math.random(),kt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++At+Nt).toString(36)},Ct=wt.exports,$t=kt,Dt=Ct("keys"),Mt={},Ut=Rt,Lt=m,Ft=gt,qt=rt,Bt=xt,Vt=function(t){return Dt[t]||(Dt[t]=$t(t))},Kt=Mt,zt=E.WeakMap;if(Ut){var Gt=Bt.state||(Bt.state=new zt),Yt=Gt.get,Wt=Gt.has,Xt=Gt.set;jt=function(t,e){return e.facade=t,Xt.call(Gt,t,e),e},Tt=function(t){return Yt.call(Gt,t)||{}},It=function(t){return Wt.call(Gt,t)}}else{var Ht=Vt("state");Kt[Ht]=!0,jt=function(t,e){return e.facade=t,Ft(t,Ht,e),e},Tt=function(t){return qt(t,Ht)?t[Ht]:{}},It=function(t){return qt(t,Ht)}}var Jt={set:jt,get:Tt,has:It,enforce:function(t){return It(t)?Tt(t):jt(t,{})},getterFor:function(t){return function(e){var r;if(!Lt(e)||(r=Tt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Qt=E,Zt=gt,te=rt,ee=yt,re=St,ne=Jt.get,oe=Jt.enforce,ie=String(String).split("String");(ht.exports=function(t,e,r,n){var o,i=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,c=!!n&&!!n.noTargetGet;"function"==typeof r&&("string"!=typeof e||te(r,"name")||Zt(r,"name",e),(o=oe(r)).source||(o.source=ie.join("string"==typeof e?e:""))),t!==Qt?(i?!c&&t[e]&&(a=!0):delete t[e],a?t[e]=r:Zt(t,e,r)):a?t[e]=r:ee(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&ne(this).source||re(this)}));var ae=E,ce=E,ue=function(t){return"function"==typeof t?t:void 0},le=function(t,e){return arguments.length<2?ue(ae[t])||ue(ce[t]):ae[t]&&ae[t][e]||ce[t]&&ce[t][e]},fe={},se=Math.ceil,pe=Math.floor,ge=function(t){return isNaN(t=+t)?0:(t>0?pe:se)(t)},he=ge,ve=Math.min,de=function(t){return t>0?ve(he(t),9007199254740991):0},ye=ge,be=Math.max,xe=Math.min,Ee=tt,me=de,Se=function(t,e){var r=ye(t);return r<0?be(r+e,0):xe(r,e)},_e=function(t){return function(e,r,n){var o,i=Ee(e),a=me(i.length),c=Se(n,a);if(t&&r!=r){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((t||c in i)&&i[c]===r)return t||c||0;return!t&&-1}},Oe={includes:_e(!0),indexOf:_e(!1)},Re=rt,we=tt,Pe=Oe.indexOf,je=Mt,Te=function(t,e){var r,n=we(t),o=0,i=[];for(r in n)!Re(je,r)&&Re(n,r)&&i.push(r);for(;e.length>o;)Re(n,r=e[o++])&&(~Pe(i,r)||i.push(r));return i},Ie=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");fe.f=Object.getOwnPropertyNames||function(t){return Te(t,Ie)};var Ae={};Ae.f=Object.getOwnPropertySymbols;var Ne=fe,ke=Ae,Ce=j,$e=le("Reflect","ownKeys")||function(t){var e=Ne.f(Ce(t)),r=ke.f;return r?e.concat(r(t)):e},De=rt,Me=$e,Ue=q,Le=b,Fe=d,qe=/#|\.prototype\./,Be=function(t,e){var r=Ke[Ve(t)];return r==Ge||r!=ze&&("function"==typeof e?Fe(e):!!e)},Ve=Be.normalize=function(t){return String(t).replace(qe,".").toLowerCase()},Ke=Be.data={},ze=Be.NATIVE="N",Ge=Be.POLYFILL="P",Ye=Be,We=E,Xe=q.f,He=gt,Je=ht.exports,Qe=yt,Ze=function(t,e){for(var r=Me(e),n=Le.f,o=Ue.f,i=0;i<r.length;i++){var a=r[i];De(t,a)||n(t,a,o(e,a))}},tr=Ye,er=j,rr=function(){var t=er(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},nr={},or=d;function ir(t,e){return RegExp(t,e)}nr.UNSUPPORTED_Y=or((function(){var t=ir("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),nr.BROKEN_CARET=or((function(){var t=ir("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));var ar=rr,cr=nr,ur=RegExp.prototype.exec,lr=String.prototype.replace,fr=ur,sr=function(){var t=/a/,e=/b*/g;return ur.call(t,"a"),ur.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),pr=cr.UNSUPPORTED_Y||cr.BROKEN_CARET,gr=void 0!==/()??/.exec("")[1];(sr||gr||pr)&&(fr=function(t){var e,r,n,o,i=this,a=pr&&i.sticky,c=ar.call(i),u=i.source,l=0,f=t;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),f=String(t).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==t[i.lastIndex-1])&&(u="(?: "+u+")",f=" "+f,l++),r=new RegExp("^(?:"+u+")",c)),gr&&(r=new RegExp("^"+u+"$(?!\\s)",c)),sr&&(e=i.lastIndex),n=ur.call(a?r:i,f),a?n?(n.input=n.input.slice(l),n[0]=n[0].slice(l),n.index=i.lastIndex,i.lastIndex+=n[0].length):i.lastIndex=0:sr&&n&&(i.lastIndex=i.global?n.index+n[0].length:e),gr&&n&&n.length>1&&lr.call(n[0],r,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)})),n});var hr=fr;(function(t,e){var r,n,o,i,a,c=t.target,u=t.global,l=t.stat;if(r=u?We:l?We[c]||Qe(c,{}):(We[c]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(a=Xe(r,n))&&a.value:r[n],!tr(u?n:c+(l?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ze(i,o)}(t.sham||o&&o.sham)&&He(i,"sham",!0),Je(r,n,i,t)}})({target:"RegExp",proto:!0,forced:/./.exec!==hr},{exec:hr});var vr,dr,yr="process"==W(E.process),br=le("navigator","userAgent")||"",xr=E.process,Er=xr&&xr.versions,mr=Er&&Er.v8;mr?dr=(vr=mr.split("."))[0]+vr[1]:br&&(!(vr=br.match(/Edge\/(\d+)/))||vr[1]>=74)&&(vr=br.match(/Chrome\/(\d+)/))&&(dr=vr[1]);var Sr=yr,_r=dr&&+dr,Or=d,Rr=!!Object.getOwnPropertySymbols&&!Or((function(){return!Symbol.sham&&(Sr?38===_r:_r>37&&_r<41)})),wr=Rr&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Pr=E,jr=wt.exports,Tr=rt,Ir=kt,Ar=Rr,Nr=wr,kr=jr("wks"),Cr=Pr.Symbol,$r=Nr?Cr:Cr&&Cr.withoutSetter||Ir,Dr=function(t){return Tr(kr,t)&&(Ar||"string"==typeof kr[t])||(Ar&&Tr(Cr,t)?kr[t]=Cr[t]:kr[t]=$r("Symbol."+t)),kr[t]},Mr=ht.exports,Ur=d,Lr=Dr,Fr=hr,qr=gt,Br=Lr("species"),Vr=!Ur((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),Kr="$0"==="a".replace(/./,"$0"),zr=Lr("replace"),Gr=!!/./[zr]&&""===/./[zr]("a","$0"),Yr=!Ur((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),Wr=ge,Xr=J,Hr=function(t){return function(e,r){var n,o,i=String(Xr(e)),a=Wr(r),c=i.length;return a<0||a>=c?t?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):n:t?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},Jr={codeAt:Hr(!1),charAt:Hr(!0)}.charAt,Qr=J,Zr=function(t){return Object(Qr(t))},tn=Math.floor,en="".replace,rn=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,nn=/\$([$&'`]|\d{1,2})/g,on=W,an=hr,cn=function(t,e,r,n){var o=Lr(t),i=!Ur((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!Ur((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Br]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||"replace"===t&&(!Vr||!Kr||Gr)||"split"===t&&!Yr){var c=/./[o],u=r(o,""[t],(function(t,e,r,n,o){return e.exec===Fr?i&&!o?{done:!0,value:c.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}),{REPLACE_KEEPS_$0:Kr,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Gr}),l=u[0],f=u[1];Mr(String.prototype,t,l),Mr(RegExp.prototype,o,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}n&&qr(RegExp.prototype[o],"sham",!0)},un=j,ln=de,fn=ge,sn=J,pn=function(t,e,r){return e+(r?Jr(t,e).length:1)},gn=function(t,e,r,n,o,i){var a=r+t.length,c=n.length,u=nn;return void 0!==o&&(o=Zr(o),u=rn),en.call(i,u,(function(i,u){var l;switch(u.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":l=o[u.slice(1,-1)];break;default:var f=+u;if(0===f)return i;if(f>c){var s=tn(f/10);return 0===s?i:s<=c?void 0===n[s-1]?u.charAt(1):n[s-1]+u.charAt(1):i}l=n[f-1]}return void 0===l?"":l}))},hn=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==on(t))throw TypeError("RegExp#exec called on incompatible receiver");return an.call(t,e)},vn=Math.max,dn=Math.min;cn("replace",2,(function(t,e,r,n){var o=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=n.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(r,n){var o=sn(this),i=null==r?void 0:r[t];return void 0!==i?i.call(r,o,n):e.call(String(o),r,n)},function(t,n){if(!o&&i||"string"==typeof n&&-1===n.indexOf(a)){var c=r(e,t,this,n);if(c.done)return c.value}var u=un(t),l=String(this),f="function"==typeof n;f||(n=String(n));var s=u.global;if(s){var p=u.unicode;u.lastIndex=0}for(var g=[];;){var h=hn(u,l);if(null===h)break;if(g.push(h),!s)break;""===String(h[0])&&(u.lastIndex=pn(l,ln(u.lastIndex),p))}for(var v,d="",y=0,b=0;b<g.length;b++){h=g[b];for(var x=String(h[0]),E=vn(dn(fn(h.index),l.length),0),m=[],S=1;S<h.length;S++)m.push(void 0===(v=h[S])?v:String(v));var _=h.groups;if(f){var O=[x].concat(m,E,l);void 0!==_&&O.push(_);var R=String(n.apply(void 0,O))}else R=gn(x,l,E,m,_,n);E>=y&&(d+=l.slice(y,E)+R,y=E+x.length)}return d+l.slice(y)}]}));var yn=m,bn=j,xn=function(t){if(!yn(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},En=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return bn(r),xn(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),mn=m,Sn=En,_n=m,On=W,Rn=Dr("match"),wn=le,Pn=b,jn=y,Tn=Dr("species"),In=y,An=E,Nn=Ye,kn=function(t,e,r){var n,o;return Sn&&"function"==typeof(n=e.constructor)&&n!==r&&mn(o=n.prototype)&&o!==r.prototype&&Sn(t,o),t},Cn=b.f,$n=fe.f,Dn=function(t){var e;return _n(t)&&(void 0!==(e=t[Rn])?!!e:"RegExp"==On(t))},Mn=rr,Un=nr,Ln=ht.exports,Fn=d,qn=Jt.set,Bn=function(t){var e=wn(t),r=Pn.f;jn&&e&&!e[Tn]&&r(e,Tn,{configurable:!0,get:function(){return this}})},Vn=Dr("match"),Kn=An.RegExp,zn=Kn.prototype,Gn=/a/g,Yn=/a/g,Wn=new Kn(Gn)!==Gn,Xn=Un.UNSUPPORTED_Y;if(In&&Nn("RegExp",!Wn||Xn||Fn((function(){return Yn[Vn]=!1,Kn(Gn)!=Gn||Kn(Yn)==Yn||"/a/i"!=Kn(Gn,"i")})))){for(var Hn=function(t,e){var r,n=this instanceof Hn,o=Dn(t),i=void 0===e;if(!n&&o&&t.constructor===Hn&&i)return t;Wn?o&&!i&&(t=t.source):t instanceof Hn&&(i&&(e=Mn.call(t)),t=t.source),Xn&&(r=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var a=kn(Wn?new Kn(t,e):Kn(t,e),n?this:zn,Hn);return Xn&&r&&qn(a,{sticky:r}),a},Jn=function(t){t in Hn||Cn(Hn,t,{configurable:!0,get:function(){return Kn[t]},set:function(e){Kn[t]=e}})},Qn=$n(Kn),Zn=0;Qn.length>Zn;)Jn(Qn[Zn++]);zn.constructor=Hn,Hn.prototype=zn,Ln(An,"RegExp",Hn)}Bn("RegExp");var to=ht.exports,eo=j,ro=d,no=rr,oo=RegExp.prototype,io=oo.toString,ao=ro((function(){return"/a/b"!=io.call({source:"a",flags:"b"})})),co="toString"!=io.name;(ao||co)&&to(RegExp.prototype,"toString",(function(){var t=eo(this),e=String(t.source),r=t.flags;return"/"+e+"/"+String(void 0===r&&t instanceof RegExp&&!("flags"in oo)?no.call(t):r)}),{unsafe:!0});var uo={name:"BaseLabel",inheritAttrs:!1,props:{labelStyle:{type:Object,default:function(){return{color:"#3F3F46","font-size":"12px"}}},labelClass:{type:String,default:""},text:{type:String,default:""},html:{type:String,default:""},isDisplay:{type:Boolean,default:!0},isRender:{type:Boolean,default:!0},listeners:{type:Object,default:function(){return{}}},spaceVal:{type:String,default:"5px"}},methods:{_clickEvent:function(t){l(u(this.listeners),!1)&&p(this.listeners,"click")?this.listeners.click(t):this.$emit("click",t)}},render:function(t){if(l(this.isRender,!1))return t();var e=s({marginLeft:this.spaceVal,marginRight:this.spaceVal},this.labelStyle);return l(this.isDisplay,!1)&&f(e,"display","none"),t("span",{ref:"".concat(this._uid,"-el-label-ref"),style:e,attrs:this.$attrs,class:this.labelClass,domProps:{innerHTML:0===this.html.length?this.text:this.html},on:{click:this._clickEvent}})}};uo.install=function(t,e){var r;if(r="按需加载独立组件:"+uo.name,"development"!==process.env.NODE_ENV&&"dev"!==process.env.NODE_ENV||console.warn(r),g(e)&&!h(e))for(var n=0;n<e.length;n++)e[n].name!==uo.name&&t.use(e[n]);t.component(uo.name,uo)},exports.BaseLabel=uo;