0.22575540957b5e13d1a2.js 300 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. webpackJsonp([0],{"0QkR":function(e,t,r){"use strict";t.b=function(){return Object(n.a)({url:"/subject/listAll",method:"get"})},t.a=function(e){return Object(n.a)({url:"/subject/list",method:"get",params:e})};var n=r("vLgD")},"0RKr":function(e,t){},"3idm":function(e,t,r){"use strict";t.c=function(e,t){return Object(n.a)({url:"/productAttribute/list/"+e,method:"get",params:t})},t.b=function(e){return Object(n.a)({url:"/productAttribute/delete",method:"post",data:e,requestType:"form"})},t.a=function(e){return Object(n.a)({url:"/productAttribute/create",method:"post",data:e})},t.f=function(e,t){return Object(n.a)({url:"/productAttribute/update/"+e,method:"post",data:t})},t.d=function(e){return Object(n.a)({url:"/productAttribute/"+e,method:"get"})},t.e=function(e){return Object(n.a)({url:"/productAttribute/attrInfo/"+e,method:"get"})};var n=r("vLgD")},"4WTo":function(e,t,r){var n=r("NWt+");e.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},"4cjj":function(e,t,r){"use strict";t.c=function(e){return Object(n.a)({url:"/coupon/list",method:"get",params:e})},t.a=function(e){return Object(n.a)({url:"/coupon/create",method:"post",data:e})},t.d=function(e){return Object(n.a)({url:"/coupon/"+e,method:"get"})},t.e=function(e,t){return Object(n.a)({url:"/coupon/update/"+e,method:"post",data:t})},t.b=function(e){return Object(n.a)({url:"/coupon/delete/"+e,method:"post"})};var n=r("vLgD")},"5zde":function(e,t,r){r("zQR9"),r("qyJz"),e.exports=r("FeBl").Array.from},"7Doy":function(e,t,r){var n=r("EqjI"),o=r("7UMu"),i=r("dSzd")("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),n(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},"9Bbf":function(e,t,r){"use strict";var n=r("kM2E");e.exports=function(e){n(n.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})}},"9C8M":function(e,t,r){"use strict";var n=r("evD5").f,o=r("Yobk"),i=r("xH/j"),a=r("+ZMJ"),s=r("2KxR"),c=r("NWt+"),u=r("vIB/"),l=r("EGZi"),d=r("bRrM"),p=r("+E39"),f=r("06OY").fastKey,h=r("LIJb"),m=p?"_s":"size",g=function(e,t){var r,n=f(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};e.exports={getConstructor:function(e,t,r,u){var l=e(function(e,n){s(e,l,t,"_i"),e._t=t,e._i=o(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&c(n,r,e[u],e)});return i(l.prototype,{clear:function(){for(var e=h(this,t),r=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var r=h(this,t),n=g(r,e);if(n){var o=n.n,i=n.p;delete r._i[n.i],n.r=!0,i&&(i.n=o),o&&(o.p=i),r._f==n&&(r._f=o),r._l==n&&(r._l=i),r[m]--}return!!n},forEach:function(e){h(this,t);for(var r,n=a(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!g(h(this,t),e)}}),p&&n(l.prototype,"size",{get:function(){return h(this,t)[m]}}),l},def:function(e,t,r){var n,o,i=g(e,t);return i?i.v=r:(e._l=i={i:o=f(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=i),n&&(n.n=i),e[m]++,"F"!==o&&(e._i[o]=i)),e},getEntry:g,setStrong:function(e,t,r){u(e,t,function(e,r){this._t=h(e,t),this._k=r,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?l(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,l(1))},r?"entries":"values",!r,!0),d(t)}}},"9bBU":function(e,t,r){r("mClu");var n=r("FeBl").Object;e.exports=function(e,t,r){return n.defineProperty(e,t,r)}},ALrJ:function(e,t,r){var n=r("+ZMJ"),o=r("MU5D"),i=r("sB3e"),a=r("QRG4"),s=r("oeOm");e.exports=function(e,t){var r=1==e,c=2==e,u=3==e,l=4==e,d=6==e,p=5==e||d,f=t||s;return function(t,s,h){for(var m,g,v=i(t),y=o(v),b=n(s,h,3),k=a(y.length),S=0,C=r?f(t,k):c?f(t,0):void 0;k>S;S++)if((p||S in y)&&(g=b(m=y[S],S,v),e))if(r)C[S]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return S;case 2:C.push(m)}else if(l)return!1;return d?-1:u||l?l:C}}},BDhv:function(e,t,r){var n=r("kM2E");n(n.P+n.R,"Set",{toJSON:r("m9gC")("Set")})},C4MV:function(e,t,r){e.exports={default:r("9bBU"),__esModule:!0}},Cdx3:function(e,t,r){var n=r("sB3e"),o=r("lktj");r("uqUo")("keys",function(){return function(e){return o(n(e))}})},CmKi:function(e,t,r){"use strict";var n=r("woOf"),o=r.n(n),i=r("Xxa5"),a=r.n(i),s=r("exGp"),c=r.n(s),u=r("mRsl"),l=r("s/Rn"),d=r("UgCr"),p={name:"ProductInfoDetail",props:{value:Object,isEdit:{type:Boolean,default:!1},isAdd:{type:Boolean,default:!1}},data:function(){return{hasEditCreated:!1,selectProductCateValue:[],productCateOptions:[],brandOptions:[],rules:{name:[{required:!0,message:"请输入商品名称",trigger:"blur"},{min:2,max:140,message:"长度在 2 到 140 个字符",trigger:"blur"}],productCategoryId:[{required:!0,message:"请选择商品分类",trigger:"blur"}],brandId:[{required:!0,message:"请选择商品品牌",trigger:"blur"}],requiredProp:[{required:!0,message:"该项为必填项",trigger:"blur"}],price:[{required:!0,message:"请输入正确的商品售价",trigger:"blur",pattern:/(?!(^[0.]*$))((^[1-9]\d*$)|(?!(^0{2,}.))(?!(^0{1,}[1-9]+))(^[0-9]+.\d{1,2}$))/}],originalPrice:[{required:!0,message:"请输入正确的商品市场价",trigger:"blur",pattern:/(?!(^[0.]*$))((^[1-9]\d*$)|(?!(^0{2,}.))(?!(^0{1,}[1-9]+))(^[0-9]+.\d{1,2}$))/}]},showCascader:!1}},created:function(){var e=this;return c()(a.a.mark(function t(){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.isAdd&&(e.showCascader=!0),t.next=3,e.getProductCateList();case 3:return t.next=5,e.getBrandList();case 5:case"end":return t.stop()}},t,e)}))()},computed:{productId:function(){return this.value.id}},watch:{productId:function(e){this.hasEditCreated||void 0!==e&&null!=e&&0!==e&&(console.log("productId",e),this.handleEditCreated())},selectProductCateValue:function(e){console.log(e,"newValue",this.value),null!=e&&2===e.length?(this.value.productCategoryId=e[1],this.value.productCategoryName=this.getCateNameById(this.value.productCategoryId)):(this.value.productCategoryId=null,this.value.productCategoryName=null)}},methods:{handleEditCreated:function(){null!=this.value.productCategoryId&&(this.selectProductCateValue.push(this.value.cateParentId),this.selectProductCateValue.push(this.value.productCategoryId)),this.showCascader=!0,this.hasEditCreated=!0},getProductCateList:function(){var e=this;Object(u.d)().then(function(t){var r=t.data;e.productCateOptions=[];for(var n=0;n<r.length;n++){var o=[];if(null!=r[n].children&&r[n].children.length>0)for(var i=0;i<r[n].children.length;i++)o.push({label:r[n].children[i].name,value:r[n].children[i].id});e.productCateOptions.push({label:r[n].name,value:r[n].id,children:o})}})},getBrandList:function(){var e=this;Object(l.c)({pageNum:1,pageSize:100}).then(function(t){e.brandOptions=[];for(var r=t.data.list,n=0;n<r.length;n++)e.brandOptions.push({label:r[n].name,value:r[n].id})})},getCateNameById:function(e){for(var t=null,r=0;r<this.productCateOptions.length;r++)for(var n=0;n<this.productCateOptions[r].children.length;n++)if(this.productCateOptions[r].children[n].value===e)return t=this.productCateOptions[r].children[n].label;return t},handleNext:function(e){var t=this;this.$refs[e].validate(function(e){if(!e)return t.$message({message:"验证失败",type:"error",duration:1e3}),!1;t.$emit("nextStep")})},handleBrandChange:function(e){for(var t="",r=0;r<this.brandOptions.length;r++)if(this.brandOptions[r].value===e){t=this.brandOptions[r].label;break}this.value.brandName=t}}},f={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"50px"}},[r("el-form",{ref:"productInfoForm",staticStyle:{width:"600px"},attrs:{model:e.value,rules:e.rules,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"商品分类:",prop:"productCategoryId"}},[e.showCascader?r("el-cascader",{attrs:{disabled:!e.isEdit,options:e.productCateOptions},model:{value:e.selectProductCateValue,callback:function(t){e.selectProductCateValue=t},expression:"selectProductCateValue"}}):e._e()],1),e._v(" "),r("el-form-item",{attrs:{label:"商品名称:",prop:"name"}},[r("el-input",{attrs:{disabled:!e.isEdit},model:{value:e.value.name,callback:function(t){e.$set(e.value,"name",t)},expression:"value.name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"商品品牌:",prop:"brandId"}},[r("el-select",{attrs:{disabled:!e.isEdit,placeholder:"请选择品牌"},on:{change:e.handleBrandChange},model:{value:e.value.brandId,callback:function(t){e.$set(e.value,"brandId",t)},expression:"value.brandId"}},e._l(e.brandOptions,function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),r("el-form-item",{attrs:{label:"商品描述:"}},[r("el-input",{attrs:{autoSize:!0,disabled:!e.isEdit,type:"textarea",placeholder:"请输入内容"},model:{value:e.value.detailDesc,callback:function(t){e.$set(e.value,"detailDesc",t)},expression:"value.detailDesc"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"商品货号:"}},[r("el-input",{attrs:{disabled:!e.isEdit},model:{value:e.value.productSn,callback:function(t){e.$set(e.value,"productSn",t)},expression:"value.productSn"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"商品售价:",prop:"price"}},[r("el-input-number",{staticClass:"number-input",attrs:{disabled:!e.isEdit,autocomplete:"off","controls-position":"right",type:"number"},model:{value:e.value.price,callback:function(t){e.$set(e.value,"price",t)},expression:"value.price"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"市场价:",prop:"originalPrice"}},[r("el-input-number",{staticClass:"number-input",attrs:{type:"number",autocomplete:"off","controls-position":"right",disabled:!e.isEdit},model:{value:e.value.originalPrice,callback:function(t){e.$set(e.value,"originalPrice",t)},expression:"value.originalPrice"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"商品库存:"}},[r("el-input-number",{staticClass:"number-input",attrs:{type:"number",autocomplete:"off","controls-position":"right",disabled:!e.isEdit},model:{value:e.value.stock,callback:function(t){e.$set(e.value,"stock",t)},expression:"value.stock"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"排序"}},[r("el-input-number",{attrs:{disabled:!e.isEdit},model:{value:e.value.sort,callback:function(t){e.$set(e.value,"sort",t)},expression:"value.sort"}})],1),e._v(" "),r("el-form-item",{staticStyle:{"text-align":"center"}},[r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:function(t){e.handleNext("productInfoForm")}}},[e._v("下一步,填写商品促销")])],1)],1)],1)},staticRenderFns:[]};var h=r("VU/8")(p,f,!1,function(e){r("YJ1c")},"data-v-9359d4a2",null).exports,m=r("vLgD");var g={name:"ProductSaleDetail",props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{pickerOptions1:{disabledDate:function(e){return e.getTime()<Date.now()}}}},created:function(){var e,t=this;this.isEdit||(e={defaultStatus:0},Object(m.a)({url:"/memberLevel/list",method:"get",params:e})).then(function(e){for(var r=[],n=0;n<e.data.length;n++){var o=e.data[n];r.push({memberLevelId:o.id,memberLevelName:o.name})}t.value.memberPriceList=r})},computed:{selectServiceList:{get:function(){var e=[];if(void 0===this.value.serviceIds||null==this.value.serviceIds||""===this.value.serviceIds)return e;for(var t=this.value.serviceIds.split(","),r=0;r<t.length;r++)e.push(Number(t[r]));return e},set:function(e){var t="";if(null!=e&&e.length>0){for(var r=0;r<e.length;r++)t+=e[r]+",";t.endsWith(",")&&(t=t.substr(0,t.length-1)),this.value.serviceIds=t}else this.value.serviceIds=null}}},methods:{handleEditCreated:function(){var e=this.value.serviceIds.split(",");console.log("handleEditCreated",e);for(var t=0;t<e.length;t++)this.selectServiceList.push(Number(e[t]))},handleRemoveProductLadder:function(e,t){var r=this.value.productLadderList;1===r.length?(r.pop(),r.push({count:0,discount:0,price:0})):r.splice(e,1)},handleAddProductLadder:function(e,t){var r=this.value.productLadderList;r.length<3?r.push({count:0,discount:0,price:0}):this.$message({message:"最多只能添加三条",type:"warning"})},handleRemoveFullReduction:function(e,t){var r=this.value.productFullReductionList;1===r.length?(r.pop(),r.push({fullPrice:0,reducePrice:0})):r.splice(e,1)},handleAddFullReduction:function(e,t){var r=this.value.productFullReductionList;r.length<3?r.push({fullPrice:0,reducePrice:0}):this.$message({message:"最多只能添加三条",type:"warning"})},handlePrev:function(){this.$emit("prevStep")},handleNext:function(){this.$emit("nextStep")}}},v={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"50px"}},[r("el-form",{ref:"productSaleForm",staticStyle:{width:"600px"},attrs:{model:e.value,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"商品上架:"}},[r("el-switch",{attrs:{disabled:!e.isEdit,"active-value":1,"inactive-value":0},model:{value:e.value.publishStatus,callback:function(t){e.$set(e.value,"publishStatus",t)},expression:"value.publishStatus"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"商品推荐:"}},[r("span",{staticStyle:{"margin-right":"10px"}},[e._v("新品")]),e._v(" "),r("el-switch",{attrs:{disabled:!e.isEdit,"active-value":1,"inactive-value":0},model:{value:e.value.newStatus,callback:function(t){e.$set(e.value,"newStatus",t)},expression:"value.newStatus"}}),e._v(" "),r("span",{staticStyle:{"margin-left":"10px","margin-right":"10px"}},[e._v("推荐")]),e._v(" "),r("el-switch",{attrs:{disabled:!e.isEdit,"active-value":1,"inactive-value":0},model:{value:e.value.recommandStatus,callback:function(t){e.$set(e.value,"recommandStatus",t)},expression:"value.recommandStatus"}})],1),e._v(" "),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:1===e.value.promotionType,expression:"value.promotionType===1"}]},[r("div",[e._v("\n 开始时间:\n "),r("el-date-picker",{attrs:{disabled:!e.isEdit,type:"datetime","picker-options":e.pickerOptions1,placeholder:"选择开始时间"},model:{value:e.value.promotionStartTime,callback:function(t){e.$set(e.value,"promotionStartTime",t)},expression:"value.promotionStartTime"}})],1),e._v(" "),r("div",{staticClass:"littleMargin"},[e._v("\n 结束时间:\n "),r("el-date-picker",{attrs:{disabled:!e.isEdit,type:"datetime","picker-options":e.pickerOptions1,placeholder:"选择结束时间"},model:{value:e.value.promotionEndTime,callback:function(t){e.$set(e.value,"promotionEndTime",t)},expression:"value.promotionEndTime"}})],1),e._v(" "),r("div",{staticClass:"littleMargin"},[e._v("\n 促销价格:\n "),r("el-input",{staticStyle:{width:"220px"},attrs:{disabled:!e.isEdit,placeholder:"输入促销价格"},model:{value:e.value.promotionPrice,callback:function(t){e.$set(e.value,"promotionPrice",t)},expression:"value.promotionPrice"}})],1)]),e._v(" "),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:2===e.value.promotionType,expression:"value.promotionType===2"}]},e._l(e.value.memberPriceList,function(t,n){return r("div",{class:{littleMargin:0!==n}},[e._v("\n "+e._s(t.memberLevelName)+":\n "),r("el-input",{staticStyle:{width:"200px"},attrs:{disabled:!e.isEdit},model:{value:t.memberPrice,callback:function(r){e.$set(t,"memberPrice",r)},expression:"item.memberPrice"}})],1)})),e._v(" "),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:3===e.value.promotionType,expression:"value.promotionType===3"}]},[r("el-table",{staticStyle:{width:"80%"},attrs:{data:e.value.productLadderList,border:""}},[r("el-table-column",{attrs:{label:"数量",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{attrs:{disabled:!e.isEdit},model:{value:t.row.count,callback:function(r){e.$set(t.row,"count",r)},expression:"scope.row.count"}})]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"折扣",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{attrs:{disabled:!e.isEdit},model:{value:t.row.discount,callback:function(r){e.$set(t.row,"discount",r)},expression:"scope.row.discount"}})]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text",disabled:!e.isEdit},on:{click:function(r){e.handleRemoveProductLadder(t.$index,t.row)}}},[e._v("删除")]),e._v(" "),r("el-button",{attrs:{type:"text",disabled:!e.isEdit},on:{click:function(r){e.handleAddProductLadder(t.$index,t.row)}}},[e._v("添加")])]}}])})],1)],1),e._v(" "),r("el-form-item",{directives:[{name:"show",rawName:"v-show",value:4===e.value.promotionType,expression:"value.promotionType===4"}]},[r("el-table",{staticStyle:{width:"80%"},attrs:{data:e.value.productFullReductionList,border:""}},[r("el-table-column",{attrs:{label:"满",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{model:{value:t.row.fullPrice,callback:function(r){e.$set(t.row,"fullPrice",r)},expression:"scope.row.fullPrice"}})]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"立减",align:"center",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{model:{value:t.row.reducePrice,callback:function(r){e.$set(t.row,"reducePrice",r)},expression:"scope.row.reducePrice"}})]}}])}),e._v(" "),r("el-table-column",{attrs:{align:"center",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text",disabled:!e.isEdit},on:{click:function(r){e.handleRemoveFullReduction(t.$index,t.row)}}},[e._v("删除")]),e._v(" "),r("el-button",{attrs:{type:"text",disabled:!e.isEdit},on:{click:function(r){e.handleAddFullReduction(t.$index,t.row)}}},[e._v("添加")])]}}])})],1)],1),e._v(" "),r("el-form-item",{staticStyle:{"text-align":"center"}},[r("el-button",{attrs:{size:"medium"},on:{click:e.handlePrev}},[e._v("上一步,填写商品信息")]),e._v(" "),r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.handleNext}},[e._v("下一步,填写商品属性")])],1)],1)],1)},staticRenderFns:[]};var y=r("VU/8")(g,v,!1,function(e){r("0RKr")},"data-v-6baf4303",null).exports,b=r("mvHQ"),k=r.n(b),S=r("c/Tr"),C=r.n(S),w=r("lHA8"),x=r.n(w),E=r("KhLR"),A=r("3idm"),T=r("TZVV"),R=r("//Fk"),_=r.n(R),O=(r("ZW30"),r("OgR6")),P={name:"multiUpload",props:{value:Array,maxCount:{type:Number,default:5},disabled:{type:Boolean,default:!1},bucket_name:{type:String,default:"mall"}},data:function(){return{dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},dialogVisible:!1,dialogImageUrl:null,useOss:!0,ossUploadUrl:"https://"+this.bucket_name+".ks3-cn-beijing.ksyuncs.com",minioUploadUrl:"http://localhost:8080/minio/upload"}},computed:{fileList:function(){for(var e=[],t=0;t<this.value.length;t++)e.push({url:this.value[t]});return e}},methods:{emitInput:function(e){for(var t=[],r=0;r<e.length;r++)t.push(e[r].url);this.$emit("input",t)},handleRemove:function(e,t){this.emitInput(t)},handlePreview:function(e){this.dialogVisible=!0,this.dialogImageUrl=e.url},beforeUpload:function(e){var t=this,r=this;return!this.useOss||new _.a(function(n,o){var i=(new Date).getTime()+e.name,a={filename:e.name,bucketName:t.bucket_name,postData:{filename:e.name,acl:"public-read",key:i}};Object(O.a)(a).then(function(e){r.dataObj.policy=e.data.policy,r.dataObj.signature=e.data.signature,r.dataObj.KSSAccessKeyId=e.data.kssAccessKeyId,r.dataObj.key=i,r.dataObj.name=i,r.dataObj.acl="public-read";var o={KSSAccessKeyId:e.data.kssAccessKeyId,policy:e.data.policy,signature:e.data.signature,key:i,acl:"public-read",uploadDomain:"https://ks3-cn-beijing.ksyuncs.com/"+t.bucket_name,autoStart:!0};document.body,new ks3FileUploader(o);n(!0)}).catch(function(e){console.log(e),o(!1)})})},handleUploadSuccess:function(e,t){var r=this;return c()(a.a.mark(function t(){var n,o;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n={policy:e.data.policy,signature:e.data.signature,key:e.data.key,KSSAccessKeyId:e.data.kssAccessKeyId,acl:"public-read",name:e.data.key,file:e.file},console.log(n,"objInfo"),t.next=5,Object(O.b)(r.ossUploadUrl,n);case 5:o=t.sent,r.fileList.push({name:e.file.name,url:o}),r.emitInput(r.fileList),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(0),console.log(t.t0,"err");case 13:case"end":return t.stop()}},t,r,[[0,10]])}))()},handleExceed:function(e,t){this.$message({message:"最多只能上传"+this.maxCount+"张图片",type:"warning",duration:1e3})}}},I={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-upload",{attrs:{disabled:e.disabled,action:e.ossUploadUrl,data:e.useOss?e.dataObj:null,"list-type":"picture-card","file-list":e.fileList,"before-upload":e.beforeUpload,"on-remove":e.handleRemove,"http-request":e.handleUploadSuccess,"on-preview":e.handlePreview,limit:e.maxCount,"on-exceed":e.handleExceed}},[r("i",{staticClass:"el-icon-plus"})]),e._v(" "),r("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("img",{attrs:{width:"100%",src:e.dialogImageUrl,alt:""}})])],1)},staticRenderFns:[]};var B=r("VU/8")(P,I,!1,function(e){r("rjYO")},null,null).exports,D=r("fZjL"),N=r.n(D),L={name:"editorSlideUpload",props:{color:{type:String,default:"#1890ff"},disabled:{type:Boolean,default:!1},bucket_name:{type:String,default:"mall"}},data:function(){return{dialogVisible:!1,listObj:{},fileList:[],dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},ossUploadUrl:"https://mall.ks3-cn-beijing.ksyuncs.com"}},methods:{checkAllSuccess:function(){var e=this;return N()(this.listObj).every(function(t){return e.listObj[t].hasSuccess})},handleSubmit:function(){var e=this,t=N()(this.listObj).map(function(t){return e.listObj[t]});this.checkAllSuccess()?(console.log(t),this.$emit("successCBK",t),this.listObj={},this.fileList=[],this.dialogVisible=!1):this.$message("请等待所有图片上传成功 或 出现了网络问题,请刷新页面重新上传!")},handleSuccess:function(e,t){var r=this;return c()(a.a.mark(function t(){var n,o;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n={policy:e.data.policy,signature:e.data.signature,key:e.data.key,KSSAccessKeyId:e.data.kssAccessKeyId,acl:"public-read",name:e.data.key,file:e.file},t.next=4,Object(O.b)(r.ossUploadUrl,n);case 4:o=t.sent,r.listObj[e.file.uid].url=o,r.listObj[e.file.uid].hasSuccess=!0,t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.log(t.t0,"err");case 12:case"end":return t.stop()}},t,r,[[0,9]])}))()},handleRemove:function(e){for(var t=e.uid,r=N()(this.listObj),n=0,o=r.length;n<o;n++)if(this.listObj[r[n]].uid===t)return void delete this.listObj[r[n]]},beforeUpload:function(e){var t=this;console.log(e,"试试批量上传");var r=this,n=e.uid;return this.listObj[n]={},new _.a(function(o,i){var a=(new Date).getTime()+e.name,s={filename:e.name,bucketName:t.bucket_name,postData:{filename:e.name,acl:"public-read",key:a,unknowValueField:[]}};Object(O.a)(s).then(function(i){r.dataObj.policy=i.data.policy,r.dataObj.signature=i.data.signature,r.dataObj.KSSAccessKeyId=i.data.kssAccessKeyId,r.dataObj.key=a,r.dataObj.name=a,r.dataObj.acl="public-read",r.listObj[n]={hasSuccess:!1,uid:e.uid,width:t.width,height:t.height,name:a,key:a},o(!0)}).catch(function(e){console.log(e),i(!1)})})}}},j={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"upload-container"},[r("el-button",{style:{background:e.color,borderColor:e.color},attrs:{disabled:e.disabled,icon:"el-icon-upload",size:"mini",type:"primary"},on:{click:function(t){e.dialogVisible=!0}}},[e._v("上传图片\n ")]),e._v(" "),r("el-dialog",{attrs:{"append-to-body":"",visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("el-upload",{staticClass:"editor-slide-upload",attrs:{disabled:e.disabled,action:e.ossUploadUrl,data:e.dataObj,multiple:!1,"file-list":e.fileList,"show-file-list":!0,"list-type":"picture-card","on-remove":e.handleRemove,"http-request":e.handleSuccess,"before-upload":e.beforeUpload}},[r("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")])],1),e._v(" "),r("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),e._v(" "),r("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v("确 定")])],1)],1)},staticRenderFns:[]};var U=r("VU/8")(L,j,!1,function(e){r("YsVJ")},"data-v-5775fba0",null).exports,M=(r("WQDg"),["advlist anchor autolink autosave code codesample colorpicker colorpicker\n contextmenu directionality emoticons fullscreen hr image imagetools importcss insertdatetime\n legacyoutput link lists media nonbreaking noneditable pagebreak paste preview print save searchreplace\n spellchecker tabfocus table template textcolor textpattern visualblocks visualchars wordcount"]),q=["bold italic underline strikethrough alignleft aligncenter\n alignright outdent indent blockquote undo redo removeformat code","hr bullist numlist link image charmap\t preview anchor pagebreak\n fullscreen insertdatetime media table forecolor backcolor"],H={name:"tinymce",components:{editorImage:U},props:{id:{type:String},value:{type:String,default:""},toolbar:{type:Array,required:!1,default:function(){return[]}},menubar:{default:"file edit insert view format table"},height:{type:Number,required:!1,default:360},width:{type:Number,required:!1,default:720},disabled:{type:Boolean,default:!1}},data:function(){return{hasChange:!1,hasInit:!1,tinymceId:this.id||"vue-tinymce-"+ +new Date}},watch:{value:function(e){var t=this;!this.hasChange&&this.hasInit&&this.$nextTick(function(){return window.tinymce.get(t.tinymceId).setContent(e)})}},mounted:function(){this.initTinymce()},activated:function(){this.initTinymce()},deactivated:function(){this.destroyTinymce()},methods:{initTinymce:function(){var e=this,t=this;window.tinymce.init({selector:"#"+this.tinymceId,width:this.width,height:this.height,language:"zh_CN",body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:q,menubar:!1,plugins:M,end_container_on_empty_block:!0,powerpaste_word_import:"clean",code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",imagetools_cors_hosts:["www.tinymce.com","codepen.io"],default_link_target:"_blank",link_title:!1,init_instance_callback:function(r){t.value&&r.setContent(t.value),t.hasInit=!0,r.on("NodeChange Change KeyUp SetContent",function(){e.hasChange=!0,e.$emit("input",r.getContent())})}})},destroyTinymce:function(){window.tinymce.get(this.tinymceId)&&window.tinymce.get(this.tinymceId).destroy()},setContent:function(e){window.tinymce.get(this.tinymceId).setContent(e)},getContent:function(){window.tinymce.get(this.tinymceId).getContent()},imageSuccessCBK:function(e){var t=this;e.forEach(function(e){window.tinymce.get(t.tinymceId).insertContent('<img class="wscnph" src="'+e.url+'" >')})}},destroyed:function(){this.destroyTinymce()}},F={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{class:e.disabled?"disable":""},[r("div",{staticClass:"tinymce-container editor-container",attrs:{disabled:e.disabled,contenteditable:e.disabled}},[r("textarea",{staticClass:"tinymce-textarea",attrs:{contenteditable:e.disabled,disabled:e.disabled,id:e.tinymceId}}),e._v(" "),r("div",{staticClass:"editor-custom-btn-container"},[r("editorImage",{staticClass:"editor-upload-btn",attrs:{disabled:e.disabled,color:"#1890ff"},on:{successCBK:e.imageSuccessCBK}})],1)])])},staticRenderFns:[]};var K=r("VU/8")(H,F,!1,function(e){r("VUmW")},"data-v-8823119a",null).exports,V={name:"ProductAttrDetail",components:{SingleUpload:T.a,MultiUpload:B,Tinymce:K},props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{hasEditCreated:!1,productAttributeCategoryOptions:[],selectProductAttr:[],selectProductParam:[],selectProductAttrPics:[],addProductAttrValue:"",activeHtmlName:"pc"}},computed:{hasAttrPic:function(){return!(this.selectProductAttrPics.length<1)},productId:function(){return this.value.id},selectProductPics:{get:function(){var e=[];if(void 0===this.value.pic||null==this.value.pic||""===this.value.pic)return e;if(e.push(this.value.pic),void 0===this.value.albumPics||null==this.value.albumPics||""===this.value.albumPics)return e;for(var t=this.value.albumPics.split(","),r=0;r<t.length;r++)e.push(t[r]);return e},set:function(e){if(null==e||0===e.length)this.value.pic=null,this.value.albumPics=null;else if(this.value.pic=e[0],this.value.albumPics="",e.length>1)for(var t=1;t<e.length;t++)this.value.albumPics+=e[t],t!==e.length-1&&(this.value.albumPics+=",")}},skuStockList:function(){return this.value.skuStockList}},created:function(){},mounted:function(){console.log(this.value.skuStockList,"skuStockList"),this.handleEditCreated(),this.getProductAttrCateList()},watch:{productId:function(e){this.hasEditCreated||e&&this.handleEditCreated()}},methods:{handleEditCreated:function(){null!=this.value.productAttributeCategoryId&&this.handleProductAttrChange(this.value.productAttributeCategoryId),this.hasEditCreated=!0},getProductAttrCateList:function(){var e=this;Object(E.c)({pageNum:1,pageSize:100}).then(function(t){e.productAttributeCategoryOptions=[];for(var r=t.data.list,n=0;n<r.length;n++)e.productAttributeCategoryOptions.push({label:r[n].name,value:r[n].id})})},getProductAttrList:function(e,t){var r=this;console.log("getProductAttrList","调用");var n={pageNum:1,pageSize:100,type:e};Object(A.c)(t,n).then(function(t){var n=t.data.list;if(0===e){r.selectProductAttr=[];for(var o=0;o<n.length;o++){var i=[],a=[];r.isEdit&&(1===n[o].handAddStatus&&(i=r.getEditAttrOptions(n[o].id)),a=r.getEditAttrValues(o)),r.selectProductAttr.push({id:n[o].id,name:n[o].name,handAddStatus:n[o].handAddStatus,inputList:n[o].inputList,values:a,options:i})}r.isEdit&&(console.log("编辑模式刷新属性"),r.refreshProductAttrPics())}else{r.selectProductParam=[];for(var s=0;s<n.length;s++){var c=null;r.isEdit&&(c=r.getEditParamValue(n[s].id)),r.selectProductParam.push({id:n[s].id,name:n[s].name,value:c,inputType:n[s].inputType,inputList:n[s].inputList})}}})},getEditAttrOptions:function(e){for(var t=[],r=0;r<this.value.productAttributeValueList.length;r++){var n=this.value.productAttributeValueList[r];if(n.productAttributeId===e){for(var o=n.value.split(","),i=0;i<o.length;i++)t.push(o[i]);break}}return t},getEditAttrValues:function(e){var t=new x.a;if(0===e)for(var r=0;r<this.value.skuStockList.length;r++){var n=this.value.skuStockList[r],o=JSON.parse(n.spData);null!=o&&o.length>=1&&t.add(o[0].value)}else if(1===e)for(var i=0;i<this.value.skuStockList.length;i++){var a=this.value.skuStockList[i],s=JSON.parse(a.spData);null!=s&&s.length>=2&&t.add(s[1].value)}else for(var c=0;c<this.value.skuStockList.length;c++){var u=this.value.skuStockList[c],l=JSON.parse(u.spData);null!=l&&l.length>=3&&t.add(l[2].value)}return C()(t)},getEditParamValue:function(e){for(var t=0;t<this.value.productAttributeValueList.length;t++)if(e===this.value.productAttributeValueList[t].productAttributeId)return this.value.productAttributeValueList[t].value},handleProductAttrChange:function(e){this.getProductAttrList(0,e),this.getProductAttrList(1,e)},getInputListArr:function(e){return e.split(",")},handleAddProductAttrValue:function(e){var t=this.selectProductAttr[e].options;null!=this.addProductAttrValue&&""!=this.addProductAttrValue?-1===t.indexOf(this.addProductAttrValue)?(this.selectProductAttr[e].options.push(this.addProductAttrValue),this.addProductAttrValue=null):this.$message({message:"属性值不能重复",type:"warning",duration:1e3}):this.$message({message:"属性值不能为空",type:"warning",duration:1e3})},handleRemoveProductAttrValue:function(e,t){this.selectProductAttr[e].options.splice(t,1)},getProductSkuSp:function(e,t){var r=JSON.parse(e.spData);return null!=r&&t<r.length?r[t].value:null},handleRefreshProductSkuList:function(){var e=this;this.$confirm("刷新列表将导致sku信息重新生成,是否要刷新","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.refreshProductAttrPics(),e.refreshProductSkuList()})},handleSyncProductSkuPrice:function(){var e=this;this.$confirm("将同步第一个sku的价格到所有sku,是否继续","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){if(null!==e.value.skuStockList&&e.value.skuStockList.length>0){var t=[];t=t.concat(t,e.value.skuStockList);for(var r=e.value.skuStockList[0].price,n=0;n<t.length;n++)t[n].price=r;e.value.skuStockList=[],e.value.skuStockList=e.value.skuStockList.concat(e.value.skuStockList,t)}})},handleSyncProductSkuStock:function(){var e=this;this.$confirm("将同步第一个sku的库存到所有sku,是否继续","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){if(null!==e.value.skuStockList&&e.value.skuStockList.length>0){var t=[];t=t.concat(t,e.value.skuStockList);for(var r=e.value.skuStockList[0].stock,n=e.value.skuStockList[0].lowStock,o=0;o<t.length;o++)t[o].stock=r,t[o].lowStock=n;e.value.skuStockList=[],e.value.skuStockList=e.value.skuStockList.concat(e.value.skuStockList,t)}})},refreshProductSkuList:function(){this.value.skuStockList=[];var e=this.value.skuStockList;if(1===this.selectProductAttr.length)for(var t=this.selectProductAttr[0],r=0;r<t.values.length;r++)e.push({spData:k()([{key:t.name,value:t.values[r]}])});else if(2===this.selectProductAttr.length)for(var n=this.selectProductAttr[0],o=this.selectProductAttr[1],i=0;i<n.values.length;i++)if(0!==o.values.length)for(var a=0;a<o.values.length;a++){var s=[];s.push({key:n.name,value:n.values[i]}),s.push({key:o.name,value:o.values[a]}),e.push({spData:k()(s)})}else e.push({spData:k()([{key:n.name,value:n.values[i]}])});else for(var c=this.selectProductAttr[0],u=this.selectProductAttr[1],l=this.selectProductAttr[2],d=0;d<c.values.length;d++)if(0!==u.values.length)for(var p=0;p<u.values.length;p++)if(0!==l.values.length)for(var f=0;f<l.values.length;f++){var h=[];h.push({key:c.name,value:c.values[d]}),h.push({key:u.name,value:u.values[p]}),h.push({key:l.name,value:l.values[f]}),e.push({spData:k()(h)})}else{var m=[];m.push({key:c.name,value:c.values[d]}),m.push({key:u.name,value:u.values[p]}),e.push({spData:k()(m)})}else e.push({spData:k()([{key:c.name,value:c.values[d]}])})},refreshProductAttrPics:function(){if(this.selectProductAttrPics=[],this.selectProductAttr.length>=1)for(var e=this.selectProductAttr[0].values,t=0;t<e.length;t++){var r=null;this.isEdit&&(r=this.getProductSkuPic(e[t])),this.selectProductAttrPics.push({name:e[t],pic:r})}},getProductSkuPic:function(e){for(var t=0;t<this.value.skuStockList.length;t++){if(e===JSON.parse(this.value.skuStockList[t].spData)[0].value)return this.value.skuStockList[t].pic}return null},mergeProductAttrValue:function(){this.value.productAttributeValueList=[];for(var e=0;e<this.selectProductAttr.length;e++){var t=this.selectProductAttr[e];1===t.handAddStatus&&null!=t.options&&t.options.length>0&&this.value.productAttributeValueList.push({productAttributeId:t.id,value:this.getOptionStr(t.options)})}for(var r=0;r<this.selectProductParam.length;r++){var n=this.selectProductParam[r];this.value.productAttributeValueList.push({productAttributeId:n.id,value:n.value})}},mergeProductAttrPics:function(){for(var e=0;e<this.selectProductAttrPics.length;e++)for(var t=0;t<this.value.skuStockList.length;t++){JSON.parse(this.value.skuStockList[t].spData)[0].value===this.selectProductAttrPics[e].name&&(this.value.skuStockList[t].pic=this.selectProductAttrPics[e].pic)}},getOptionStr:function(e){for(var t="",r=0;r<e.length;r++)t+=e[r],r!=e.length-1&&(t+=",");return t},handleRemoveProductSku:function(e,t){var r=this.value.skuStockList;1===r.length?r.pop():r.splice(e,1)},getParamInputList:function(e){return e.split(",")},handlePrev:function(){this.$emit("prevStep")},handleNext:function(){if(this.value.skuStockList&&!(this.value.skuStockList.length<=0)&&this.value.skuStockList[0].price+""&&this.value.skuStockList[0].stock+""&&this.value.skuStockList[0].lowStock+""&&this.value.skuStockList[0].skuCode+""){var e=!1,t=/(?!(^[0.]*$))((^[1-9]\d*$)|(?!(^0{2,}.))(?!(^0{1,}[1-9]+))(^[0-9]+.\d{1,2}$))/;this.value.skuStockList.forEach(function(r){console.log(r,"element.price",(r.price+"").match(t)),(r.price+"").match(t)||(e=!0)}),e?this.$message.error("请填写正确的销售价格"):(this.mergeProductAttrValue(),this.mergeProductAttrPics(),this.$emit("nextStep"))}else this.$message.error("请编辑商品规格")},handleFinishCommit:function(){if(this.value.skuStockList&&!(this.value.skuStockList.length<=0)&&this.value.skuStockList[0].price+""&&this.value.skuStockList[0].stock+""&&this.value.skuStockList[0].lowStock+""&&this.value.skuStockList[0].skuCode+""){var e=!1,t=/(?!(^[0.]*$))((^[1-9]\d*$)|(?!(^0{2,}.))(?!(^0{1,}[1-9]+))(^[0-9]+.\d{1,2}$))/;this.value.skuStockList.forEach(function(r){console.log(r,"element.price",(r.price+"").match(t)),(r.price+"").match(t)||(e=!0)}),e?this.$message.error("请填写正确的销售价格"):(this.mergeProductAttrValue(),this.mergeProductAttrPics(),this.$emit("finishCommit",this.isEdit))}else this.$message.error("请编辑商品规格")}}},z={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"50px"}},[r("el-form",{ref:"productAttrForm",staticStyle:{width:"720px"},attrs:{model:e.value,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"属性类型:"}},[r("el-select",{attrs:{disabled:!e.isEdit,placeholder:"请选择属性类型"},on:{change:e.handleProductAttrChange},model:{value:e.value.productAttributeCategoryId,callback:function(t){e.$set(e.value,"productAttributeCategoryId",t)},expression:"value.productAttributeCategoryId"}},e._l(e.productAttributeCategoryOptions,function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1),e._v(" "),r("el-form-item",{attrs:{label:"商品规格:",rules:[{required:!0,message:"请选择商品规格",trigger:"blur"}]}},[r("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},e._l(e.selectProductAttr,function(t,n){return r("div",[e._v("\n "+e._s(t.name)+":\n "),0===t.handAddStatus?r("el-checkbox-group",{attrs:{disabled:!e.isEdit},model:{value:e.selectProductAttr[n].values,callback:function(t){e.$set(e.selectProductAttr[n],"values",t)},expression:"selectProductAttr[idx].values"}},e._l(e.getInputListArr(t.inputList),function(t){return r("el-checkbox",{key:t,staticClass:"littleMarginLeft",attrs:{label:t,disabled:!e.isEdit}})})):r("div",[r("el-checkbox-group",{attrs:{disabled:!e.isEdit},model:{value:e.selectProductAttr[n].values,callback:function(t){e.$set(e.selectProductAttr[n],"values",t)},expression:"selectProductAttr[idx].values"}},e._l(e.selectProductAttr[n].options,function(t,o){return r("div",{staticClass:"littleMarginLeft",staticStyle:{display:"inline-block"}},[r("el-checkbox",{key:t,attrs:{label:t,disabled:!e.isEdit}}),e._v(" "),r("el-button",{staticClass:"littleMarginLeft",attrs:{disabled:!e.isEdit,type:"text"},on:{click:function(t){e.handleRemoveProductAttrValue(n,o)}}},[e._v("删除\n ")])],1)})),e._v(" "),r("el-input",{staticStyle:{width:"160px","margin-left":"10px"},attrs:{disabled:!e.isEdit,clearable:""},model:{value:e.addProductAttrValue,callback:function(t){e.addProductAttrValue=t},expression:"addProductAttrValue"}}),e._v(" "),r("el-button",{staticClass:"littleMarginLeft",attrs:{disabled:!e.isEdit},on:{click:function(t){e.handleAddProductAttrValue(n)}}},[e._v("增加")])],1)],1)})),e._v(" "),r("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:e.skuStockList,border:""}},[e._l(e.selectProductAttr,function(t,n){return r("el-table-column",{key:t.id,attrs:{label:t.name,align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.getProductSkuSp(t.row,n))+"\n ")]}}])})}),e._v(" "),r("el-table-column",{attrs:{label:"销售价格",width:"80",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{attrs:{disabled:!e.isEdit},model:{value:t.row.price,callback:function(r){e.$set(t.row,"price",r)},expression:"scope.row.price"}})]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"商品库存",width:"80",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{attrs:{disabled:!e.isEdit},model:{value:t.row.stock,callback:function(r){e.$set(t.row,"stock",r)},expression:"scope.row.stock"}})]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"库存预警值",width:"80",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{attrs:{disabled:!e.isEdit},model:{value:t.row.lowStock,callback:function(r){e.$set(t.row,"lowStock",r)},expression:"scope.row.lowStock"}})]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"SKU编号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{attrs:{disabled:t.row.platformLock||!e.isEdit},model:{value:t.row.skuCode,callback:function(r){e.$set(t.row,"skuCode",r)},expression:"scope.row.skuCode"}})]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"操作",width:"80",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.platformLock?e._e():r("el-button",{attrs:{disabled:!e.isEdit,type:"text"},on:{click:function(r){e.handleRemoveProductSku(t.$index,t.row)}}},[e._v("删除\n ")])]}}])})],2),e._v(" "),r("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary",disabled:!e.isEdit},on:{click:e.handleRefreshProductSkuList}},[e._v("刷新列表\n ")]),e._v(" "),r("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary",disabled:!e.isEdit},on:{click:e.handleSyncProductSkuPrice}},[e._v("同步价格\n ")]),e._v(" "),r("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary",disabled:!e.isEdit},on:{click:e.handleSyncProductSkuStock}},[e._v("同步库存\n ")])],1),e._v(" "),e.hasAttrPic?r("el-form-item",{attrs:{label:"属性图片:"}},[r("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},e._l(e.selectProductAttrPics,function(t,n){return r("div",[r("span",[e._v(e._s(t.name)+":")]),e._v(" "),r("single-upload",{staticStyle:{width:"300px",display:"inline-block","margin-left":"10px"},attrs:{disabled:!e.isEdit},model:{value:t.pic,callback:function(r){e.$set(t,"pic",r)},expression:"item.pic"}})],1)}))],1):e._e(),e._v(" "),r("el-form-item",{attrs:{label:"商品参数:"}},[r("el-card",{staticClass:"cardBg",attrs:{shadow:"never"}},e._l(e.selectProductParam,function(t,n){return r("div",{class:{littleMarginTop:0!==n}},[r("div",{staticClass:"paramInputLabel"},[e._v(e._s(t.name)+":")]),e._v(" "),1===t.inputType?r("el-select",{staticClass:"paramInput",attrs:{disabled:!e.isEdit},model:{value:e.selectProductParam[n].value,callback:function(t){e.$set(e.selectProductParam[n],"value",t)},expression:"selectProductParam[index].value"}},e._l(e.getParamInputList(t.inputList),function(e){return r("el-option",{key:e,attrs:{label:e,value:e}})})):r("el-input",{staticClass:"paramInput",attrs:{disabled:!e.isEdit},model:{value:e.selectProductParam[n].value,callback:function(t){e.$set(e.selectProductParam[n],"value",t)},expression:"selectProductParam[index].value"}})],1)}))],1),e._v(" "),r("el-form-item",{attrs:{label:"商品相册:"}},[r("multi-upload",{attrs:{disabled:!e.isEdit},model:{value:e.selectProductPics,callback:function(t){e.selectProductPics=t},expression:"selectProductPics"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"规格参数:"}},[r("el-tabs",{attrs:{type:"card"},model:{value:e.activeHtmlName,callback:function(t){e.activeHtmlName=t},expression:"activeHtmlName"}},[r("el-tab-pane",{attrs:{label:"电脑端详情",name:"pc"}},[r("tinymce",{attrs:{width:595,height:300,disabled:!e.isEdit},model:{value:e.value.detailHtml,callback:function(t){e.$set(e.value,"detailHtml",t)},expression:"value.detailHtml"}})],1),e._v(" "),r("el-tab-pane",{attrs:{label:"移动端详情",name:"mobile"}},[r("tinymce",{attrs:{width:595,height:300,disabled:!e.isEdit},model:{value:e.value.detailMobileHtml,callback:function(t){e.$set(e.value,"detailMobileHtml",t)},expression:"value.detailMobileHtml"}})],1)],1)],1),e._v(" "),r("el-form-item",{staticStyle:{"text-align":"center"}},[r("el-button",{attrs:{size:"medium"},on:{click:e.handlePrev}},[e._v("上一步,填写商品促销")]),e._v(" "),r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.handleFinishCommit}},[e._v("完成,提交商品")])],1)],1)],1)},staticRenderFns:[]};var G=r("VU/8")(V,z,!1,function(e){r("YfSQ")},"data-v-16422e94",null).exports,$=r("0QkR");var W={name:"ProductRelationDetail",props:{value:Object,isEdit:{type:Boolean,default:!1}},data:function(){return{subjectList:[],subjectTitles:["待选择","已选择"],prefrenceAreaList:[],prefrenceAreaTitles:["待选择","已选择"]}},created:function(){this.getSubjectList(),this.getPrefrenceAreaList()},computed:{selectSubject:{get:function(){var e=[];if(null==this.value.subjectProductRelationList||this.value.subjectProductRelationList.length<=0)return e;for(var t=0;t<this.value.subjectProductRelationList.length;t++)e.push(this.value.subjectProductRelationList[t].subjectId);return e},set:function(e){this.value.subjectProductRelationList=[];for(var t=0;t<e.length;t++)this.value.subjectProductRelationList.push({subjectId:e[t]})}},selectPrefrenceArea:{get:function(){var e=[];if(null==this.value.prefrenceAreaProductRelationList||this.value.prefrenceAreaProductRelationList.length<=0)return e;for(var t=0;t<this.value.prefrenceAreaProductRelationList.length;t++)e.push(this.value.prefrenceAreaProductRelationList[t].prefrenceAreaId);return e},set:function(e){this.value.prefrenceAreaProductRelationList=[];for(var t=0;t<e.length;t++)this.value.prefrenceAreaProductRelationList.push({prefrenceAreaId:e[t]})}}},methods:{filterMethod:function(e,t){return t.label.indexOf(e)>-1},getSubjectList:function(){var e=this;Object($.b)().then(function(t){for(var r=t.data,n=0;n<r.length;n++)e.subjectList.push({label:r[n].title,key:r[n].id,disabled:!e.isEdit})})},getPrefrenceAreaList:function(){var e=this;Object(m.a)({url:"/prefrenceArea/listAll",method:"get"}).then(function(t){for(var r=t.data,n=0;n<r.length;n++)e.prefrenceAreaList.push({label:r[n].name,key:r[n].id,disabled:!e.isEdit})})},handlePrev:function(){this.$emit("prevStep")},handleFinishCommit:function(){this.$emit("finishCommit",this.isEdit)}}},J={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{"margin-top":"50px"}},[r("el-form",{ref:"productRelationForm",staticStyle:{width:"680px"},attrs:{model:e.value,"label-width":"120px",size:"small"}},[r("el-form-item",{attrs:{label:"关联专题:"}},[r("el-transfer",{staticStyle:{display:"inline-block"},attrs:{disabled:!e.isEdit,filterable:"","filter-method":e.filterMethod,"filter-placeholder":"请输入专题名称",titles:e.subjectTitles,data:e.subjectList},model:{value:e.selectSubject,callback:function(t){e.selectSubject=t},expression:"selectSubject"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"关联优选:"}},[r("el-transfer",{staticStyle:{display:"inline-block"},attrs:{disabled:!e.isEdit,filterable:"","filter-method":e.filterMethod,"filter-placeholder":"请输入优选名称",titles:e.prefrenceAreaTitles,data:e.prefrenceAreaList},model:{value:e.selectPrefrenceArea,callback:function(t){e.selectPrefrenceArea=t},expression:"selectPrefrenceArea"}})],1),e._v(" "),r("el-form-item",{staticStyle:{"text-align":"center"}},[r("el-button",{attrs:{size:"medium"},on:{click:e.handlePrev}},[e._v("上一步,填写商品属性")]),e._v(" "),r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.handleFinishCommit}},[e._v("完成,提交商品")])],1)],1)],1)},staticRenderFns:[]};var X={albumPics:"",brandId:null,brandName:"",deleteStatus:0,description:"",detailDesc:"",detailHtml:"",detailMobileHtml:"",detailTitle:"",feightTemplateId:0,flashPromotionCount:0,flashPromotionId:0,flashPromotionPrice:0,flashPromotionSort:0,giftPoint:0,giftGrowth:0,keywords:"",lowStock:0,name:"",newStatus:0,note:"",originalPrice:0,pic:"",memberPriceList:[],productFullReductionList:[{fullPrice:0,reducePrice:0}],productLadderList:[{count:0,discount:0,price:0}],previewStatus:0,price:0,productAttributeCategoryId:null,productAttributeValueList:[],skuStockList:[],subjectProductRelationList:[],prefrenceAreaProductRelationList:[],productCategoryId:null,productCategoryName:"",productSn:"",promotionEndTime:"",promotionPerLimit:0,promotionPrice:null,promotionStartTime:"",promotionType:0,publishStatus:0,recommandStatus:0,sale:0,serviceIds:"",sort:0,stock:0,subTitle:"",unit:"",usePointLimit:0,verifyStatus:0,weight:0},Q={name:"ProductDetail",components:{ProductInfoDetail:h,ProductSaleDetail:y,ProductAttrDetail:G,ProductRelationDetail:r("VU/8")(W,J,!1,function(e){r("sm7f")},"data-v-7b66fb39",null).exports},props:{isEdit:{type:Boolean,default:!1},isAdd:{type:Boolean,default:!1}},data:function(){return{active:0,productParam:o()({},X),showStatus:[!0,!1,!1,!1]}},created:function(){var e=this;this.$route.query.id&&Object(d.d)(this.$route.query.id).then(function(t){e.productParam=t.data})},methods:{hideAll:function(){for(var e=0;e<this.showStatus.length;e++)this.showStatus[e]=!1},prevStep:function(){this.active>0&&this.active<this.showStatus.length&&(this.active--,this.hideAll(),this.showStatus[this.active]=!0)},nextStep:function(){this.active<this.showStatus.length-1&&(this.active++,this.hideAll(),this.showStatus[this.active]=!0)},finishCommit:function(e){var t=this;this.$route.query.id&&e?this.$confirm("是否要提交该产品","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.g)(t.$route.query.id,t.productParam).then(function(e){t.$message({type:"success",message:"提交成功",duration:1e3}),t.$router.back()})}):!this.$route.query.id&&e?this.$confirm("是否要提交该产品","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(d.a)(t.productParam).then(function(e){t.$message({type:"success",message:"提交成功",duration:1e3}),t.$router.back()})}):this.$router.back()}}},Y={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-card",{staticClass:"form-container",attrs:{shadow:"never"}},[r("el-steps",{attrs:{active:e.active,"finish-status":"success","align-center":""}},[r("el-step",{attrs:{title:"填写商品信息"}}),e._v(" "),r("el-step",{attrs:{title:"填写商品促销"}}),e._v(" "),r("el-step",{attrs:{title:"填写商品属性"}})],1),e._v(" "),r("product-info-detail",{directives:[{name:"show",rawName:"v-show",value:e.showStatus[0],expression:"showStatus[0]"}],attrs:{"is-edit":e.isEdit,"is-add":e.isAdd},on:{nextStep:e.nextStep},model:{value:e.productParam,callback:function(t){e.productParam=t},expression:"productParam"}}),e._v(" "),e.showStatus[1]?r("product-sale-detail",{attrs:{"is-edit":e.isEdit,"is-add":e.isAdd},on:{nextStep:e.nextStep,prevStep:e.prevStep},model:{value:e.productParam,callback:function(t){e.productParam=t},expression:"productParam"}}):e._e(),e._v(" "),e.showStatus[2]?r("product-attr-detail",{attrs:{"is-edit":e.isEdit,"is-add":e.isAdd},on:{nextStep:e.nextStep,prevStep:e.prevStep,finishCommit:e.finishCommit},model:{value:e.productParam,callback:function(t){e.productParam=t},expression:"productParam"}}):e._e()],1)},staticRenderFns:[]};var Z=r("VU/8")(Q,Y,!1,function(e){r("KwD4")},null,null);t.a=Z.exports},FWz8:function(e,t,r){"use strict";t.d=function(e){return Object(n.a)({url:"/order/list",method:"get",params:e})},t.a=function(e){return Object(n.a)({url:"/order/update/close",method:"post",requestType:"form",data:e})},t.b=function(e){return Object(n.a)({url:"/order/delete",method:"post",params:e})},t.c=function(e){return Object(n.a)({url:"/order/update/delivery",method:"post",data:e})},t.e=function(e){return Object(n.a)({url:"/order/"+e,method:"get"})},t.j=function(e){return Object(n.a)({url:"/order/update/receiverInfo",method:"post",data:e})},t.h=function(e){return Object(n.a)({url:"/order/update/moneyInfo",method:"post",data:e})},t.i=function(e){return Object(n.a)({url:"/order/update/note",method:"post",params:e})},t.f=function(e){return Object(n.a)({url:"/order/selectCourier",method:"get",params:e})},t.g=function(e){return Object(n.a)({url:"/order/refreshCourier",method:"get",params:e})};var n=r("vLgD")},HpRW:function(e,t,r){"use strict";var n=r("kM2E"),o=r("lOnJ"),i=r("+ZMJ"),a=r("NWt+");e.exports=function(e){n(n.S,e,{from:function(e){var t,r,n,s,c=arguments[1];return o(this),(t=void 0!==c)&&o(c),void 0==e?new this:(r=[],t?(n=0,s=i(c,arguments[2],2),a(e,!1,function(e){r.push(s(e,n++))})):a(e,!1,r.push,r),new this(r))}})}},KhLR:function(e,t,r){"use strict";t.c=function(e){return Object(n.a)({url:"/productAttribute/category/list",method:"get",params:e})},t.a=function(e){return Object(n.a)({url:"/productAttribute/category/create",method:"post",data:e,requestType:"form"})},t.b=function(e){return Object(n.a)({url:"/productAttribute/category/delete/"+e,method:"get"})},t.e=function(e,t){return Object(n.a)({url:"/productAttribute/category/update/"+e,method:"post",data:t,requestType:"form"})},t.d=function(){return Object(n.a)({url:"/productAttribute/category/list/withAttr",method:"get"})};var n=r("vLgD")},KwD4:function(e,t){},LIJb:function(e,t,r){var n=r("EqjI");e.exports=function(e,t){if(!n(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},Mdfv:function(e,t,r){"use strict";t.c=function(e){return Object(n.a)({url:"/home/advertise/list",method:"get",params:e})},t.f=function(e,t){return Object(n.a)({url:"/home/advertise/update/status/"+e,method:"post",params:t})},t.b=function(e){return Object(n.a)({url:"/home/advertise/delete",method:"post",data:e,requestType:"form"})},t.a=function(e){return Object(n.a)({url:"/home/advertise/create",method:"post",data:e})},t.d=function(e){return Object(n.a)({url:"/home/advertise/"+e,method:"get"})},t.e=function(e,t){return Object(n.a)({url:"/home/advertise/update/"+e,method:"post",data:t})};var n=r("vLgD")},Og03:function(e,t,r){"use strict";t.c=function(){return Object(n.a)({url:"/resourceCategory/listAll",method:"get"})},t.a=function(e){return Object(n.a)({url:"/resourceCategory/create",method:"post",data:e})},t.d=function(e,t){return Object(n.a)({url:"/resourceCategory/update/"+e,method:"post",data:t})},t.b=function(e){return Object(n.a)({url:"/resourceCategory/delete/"+e,method:"post"})};var n=r("vLgD")},OgR6:function(e,t,r){"use strict";r.d(t,"a",function(){return h}),r.d(t,"b",function(){return m});var n,o,i=r("Xxa5"),a=r.n(i),s=r("exGp"),c=r.n(s),u=r("vLgD"),l=r("mtWM"),d=(r.n(l),r("vYgC")),p=r.n(d),f=this,h=(n=c()(a.a.mark(function e(t){var r,n,o,i,s,c,l;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.bucketName,n=t.filename,o=t.postData,s=r,c=n,l={},"tencent"===(i="tencent")?(s="daya-online-1303457149",c="klx/"+n,l={key:"klx/"+o.key}):l=o,e.abrupt("return",u.a.post("/api-admin/getUploadSign?pluginName="+i,{postData:l,pluginName:i,bucketName:s,filename:c}));case 7:case"end":return e.stop()}},e,f)})),function(e){return n.apply(this,arguments)}),m=(o=c()(a.a.mark(function e(t,r){var n,o,i,s,u;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.next=16;break;case 9:if(!n){e.next=13;break}return e.abrupt("return",n);case 13:throw new Error(o);case 14:e.next=26;break;case 16:return i="",s=null,u=new p.a({Domain:"https://oss.dayaedu.com",getAuthorization:function(){var e=c()(a.a.mark(function e(t,n){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n({Authorization:r.signature});case 1:case"end":return e.stop()}},e,f)}));return function(t,r){return e.apply(this,arguments)}}()}),e.next=21,u.uploadFile({Bucket:"daya-online-1303457149",Region:"ap-nanjing",Key:"klx/"+r.name,Body:r.file,SliceSize:524288e3}).then(function(e){i=e.Location&&e.Location.indexOf("http")>=0?e.Location:"https://"+e.Location}).catch(function(e){s=e});case 21:if(!i){e.next=25;break}return e.abrupt("return",i);case 25:throw new Error(s);case 26:case"end":return e.stop()}},e,f)})),function(e,t){return o.apply(this,arguments)})},STSY:function(e,t,r){"use strict";t.f=function(e){return Object(n.a)({url:"/role/list",method:"get",params:e})},t.c=function(e){return Object(n.a)({url:"/role/create",method:"post",data:e})},t.i=function(e,t){return Object(n.a)({url:"/role/update/"+e,method:"post",data:t})},t.j=function(e,t){return Object(n.a)({url:"/role/updateStatus/"+e,method:"post",params:t})},t.d=function(e){return Object(n.a)({url:"/role/delete",method:"post",data:e,requestType:"form"})},t.e=function(){return Object(n.a)({url:"/role/listAll",method:"get"})},t.g=function(e){return Object(n.a)({url:"/role/listMenu/"+e,method:"get"})},t.h=function(e){return Object(n.a)({url:"/role/listResource/"+e,method:"get"})},t.a=function(e){return Object(n.a)({url:"/role/allocMenu",method:"post",data:e,requestType:"form"})},t.b=function(e){return Object(n.a)({url:"/role/allocResource",method:"post",data:e,requestType:"form"})};var n=r("vLgD")},SldL:function(e,t){!function(t){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",u="object"==typeof e,l=t.regeneratorRuntime;if(l)u&&(e.exports=l);else{(l=t.regeneratorRuntime=u?e.exports:{}).wrap=k;var d="suspendedStart",p="suspendedYield",f="executing",h="completed",m={},g={};g[a]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(P([])));y&&y!==n&&o.call(y,a)&&(g=y);var b=x.prototype=C.prototype=Object.create(g);w.prototype=b.constructor=x,x.constructor=w,x[c]=w.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,c in e||(e[c]="GeneratorFunction")),e.prototype=Object.create(b),e},l.awrap=function(e){return{__await:e}},E(A.prototype),A.prototype[s]=function(){return this},l.AsyncIterator=A,l.async=function(e,t,r,n){var o=new A(k(e,t,r,n));return l.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},E(b),b[c]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},l.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},l.values=P,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return s.type="throw",s.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),m}}}function k(e,t,r,n){var o=t&&t.prototype instanceof C?t:C,i=Object.create(o.prototype),a=new O(n||[]);return i._invoke=function(e,t,r){var n=d;return function(o,i){if(n===f)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw i;return I()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=T(a,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===d)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var c=S(e,t,r);if("normal"===c.type){if(n=r.done?h:p,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function S(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function C(){}function w(){}function x(){}function E(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function A(e){var t;this._invoke=function(r,n){function i(){return new Promise(function(t,i){!function t(r,n,i,a){var s=S(e[r],e,n);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then(function(e){t("next",e,i,a)},function(e){t("throw",e,i,a)}):Promise.resolve(u).then(function(e){c.value=e,i(c)},a)}a(s.arg)}(r,n,t,i)})}return t=t?t.then(i,i):i()}}function T(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,T(e,t),"throw"===t.method))return m;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=S(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,m;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,m):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function R(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function P(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:I}}function I(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())},TZVV:function(e,t,r){"use strict";var n=r("Xxa5"),o=r.n(n),i=r("exGp"),a=r.n(i),s=r("//Fk"),c=r.n(s),u=(r("ZW30"),r("OgR6")),l={name:"singleUpload",props:{value:String,disabled:{type:Boolean,default:!1},bucket_name:{type:String,default:"mall"}},computed:{imageUrl:function(){return this.value},imageName:function(){return null!=this.value&&""!==this.value?this.value.substr(this.value.lastIndexOf("/")+1):null},fileList:function(){return[{name:this.imageName,url:this.imageUrl}]},showFileList:{get:function(){return null!==this.value&&""!==this.value&&void 0!==this.value},set:function(e){}}},data:function(){return{dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},dialogVisible:!1,useOss:!0,ossUploadUrl:"https://"+this.bucket_name+".ks3-cn-beijing.ksyuncs.com",minioUploadUrl:"http://localhost:8080/minio/upload"}},methods:{emitInput:function(e){this.$emit("input",e)},handleRemove:function(e,t){this.emitInput("")},handlePreview:function(e){this.dialogVisible=!0},beforeUpload:function(e){var t=this,r=this;return!this.useOss||(console.log(e,"掉用beforeUpload"),new c.a(function(n,o){var i=(new Date).getTime()+e.name,a={filename:e.name,bucketName:t.bucket_name,postData:{filename:e.name,acl:"public-read",key:i,unknowValueField:[]}};Object(u.a)(a).then(function(e){r.dataObj.policy=e.data.policy,r.dataObj.signature=e.data.signature,r.dataObj.KSSAccessKeyId=e.data.kssAccessKeyId,r.dataObj.key=i,r.dataObj.name=i,r.dataObj.acl="public-read";var o={KSSAccessKeyId:e.data.kssAccessKeyId,policy:e.data.policy,signature:e.data.signature,key:i,acl:"public-read",uploadDomain:"https://ks3-cn-beijing.ksyuncs.com/"+t.bucket_name,autoStart:!0};console.log(o,"ks3Options");document.body,new ks3FileUploader(o);n(!0)}).catch(function(e){console.log(e),o(!1)})}))},handleUploadSuccess:function(e,t){var r=this;return a()(o.a.mark(function t(){var n,i;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n={policy:e.data.policy,signature:e.data.signature,key:e.data.key,KSSAccessKeyId:e.data.kssAccessKeyId,acl:"public-read",name:e.data.key,file:e.file},console.log(n,"objInfo"),t.next=5,Object(u.b)(r.ossUploadUrl,n);case 5:i=t.sent,r.showFileList=!0,r.fileList.pop(),r.fileList.push({name:e.file.name,url:i}),r.emitInput(i),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(0),console.log(t.t0,"err");case 15:case"end":return t.stop()}},t,r,[[0,12]])}))()}}},d={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-upload",{attrs:{disabled:e.disabled,action:e.ossUploadUrl,data:e.useOss?e.dataObj:null,"list-type":"picture",multiple:!1,"show-file-list":e.showFileList,"file-list":e.fileList,"before-upload":e.beforeUpload,"on-remove":e.handleRemove,"http-request":e.handleUploadSuccess,"on-preview":e.handlePreview}},[r("el-button",{attrs:{size:"small",type:"primary"}},[e._v("点击上传")]),e._v(" "),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("\n 只能上传jpg/png文件,且不超过10MB\n ")])],1),e._v(" "),r("el-dialog",{attrs:{visible:e.dialogVisible},on:{"update:visible":function(t){e.dialogVisible=t}}},[r("img",{attrs:{width:"100%",src:e.fileList[0].url,alt:""}})])],1)},staticRenderFns:[]};var p=r("VU/8")(l,d,!1,function(e){r("s40z")},null,null);t.a=p.exports},UgCr:function(e,t,r){"use strict";t.b=function(e){return Object(i.a)({url:"/product/list",method:"get",params:e})},t.c=function(e){return Object(i.a)({url:"/product/simpleList",method:"get",params:e})},t.e=function(e){return Object(i.a)({url:"/product/update/deleteStatus",method:"post",params:e})},t.f=function(e){return Object(i.a)({url:"/product/update/newStatus",method:"post",params:e})},t.i=function(e){return Object(i.a)(o()({url:"/product/update/recommendStatus",method:"post",params:e,data:e},"params",e))},t.h=function(e){return Object(i.a)({url:"/product/update/publishStatus",method:"post",data:e,params:e})},t.a=function(e){return Object(i.a)({url:"/product/create",method:"post",data:e})},t.g=function(e,t){return Object(i.a)({url:"/product/update/"+e,method:"post",data:t})},t.d=function(e){return Object(i.a)({url:"/product/updateInfo/"+e,method:"get"})};var n=r("bOdI"),o=r.n(n),i=r("vLgD")},VUmW:function(e,t){},WQDg:function(e,t){tinymce.addI18n("zh_CN",{Cut:"剪切","Heading 5":"标题5","Header 2":"标题2","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持对剪贴板的访问,请使用Ctrl+X/C/V键进行复制粘贴。","Heading 4":"标题4",Div:"Div区块","Heading 2":"标题2",Paste:"粘贴",Close:"关闭","Font Family":"字体",Pre:"预格式文本","Align right":"右对齐","New document":"新文档",Blockquote:"引用","Numbered list":"编号列表","Heading 1":"标题1",Headings:"标题","Increase indent":"增加缩进",Formats:"格式",Headers:"标题","Select all":"全选","Header 3":"标题3",Blocks:"区块",Undo:"撤消",Strikethrough:"删除线","Bullet list":"项目符号","Header 1":"标题1",Superscript:"上标","Clear formatting":"清除格式","Font Sizes":"字号",Subscript:"下标","Header 6":"标题6",Redo:"重复",Paragraph:"段落",Ok:"确定",Bold:"粗体",Code:"代码",Italic:"斜体","Align center":"居中","Header 5":"标题5","Heading 6":"标题6","Heading 3":"标题3","Decrease indent":"减少缩进","Header 4":"标题4","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"当前为纯文本粘贴模式,再次点击可以回到普通粘贴模式。",Underline:"下划线",Cancel:"取消",Justify:"两端对齐",Inline:"文本",Copy:"复制","Align left":"左对齐","Visual aids":"网格线","Lower Greek":"小写希腊字母",Square:"方块",Default:"默认","Lower Alpha":"小写英文字母",Circle:"空心圆",Disc:"实心圆","Upper Alpha":"大写英文字母","Upper Roman":"大写罗马字母","Lower Roman":"小写罗马字母","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"标识符应该以字母开头,后跟字母、数字、破折号、点、冒号或下划线。",Name:"名称",Anchor:"锚点",Id:"标识符","You have unsaved changes are you sure you want to navigate away?":"你还有文档尚未保存,确定要离开?","Restore last draft":"恢复上次的草稿","Special character":"特殊符号","Source code":"源代码",Language:"语言","Insert/Edit code sample":"插入/编辑代码示例",B:"B",R:"R",G:"G",Color:"颜色","Right to left":"从右到左","Left to right":"从左到右",Emoticons:"表情",Robots:"机器人","Document properties":"文档属性",Title:"标题",Keywords:"关键词",Encoding:"编码",Description:"描述",Author:"作者",Fullscreen:"全屏","Horizontal line":"水平分割线","Horizontal space":"水平边距","Insert/edit image":"插入/编辑图片",General:"普通",Advanced:"高级",Source:"地址",Border:"边框","Constrain proportions":"保持纵横比","Vertical space":"垂直边距","Image description":"图片描述",Style:"样式",Dimensions:"大小","Insert image":"插入图片",Image:"图片","Zoom in":"放大",Contrast:"对比度",Back:"后退",Gamma:"伽马值","Flip horizontally":"水平翻转",Resize:"调整大小",Sharpen:"锐化","Zoom out":"缩小","Image options":"图片选项",Apply:"应用",Brightness:"亮度","Rotate clockwise":"顺时针旋转","Rotate counterclockwise":"逆时针旋转","Edit image":"编辑图片","Color levels":"颜色层次",Crop:"裁剪",Orientation:"方向","Flip vertically":"垂直翻转",Invert:"反转","Date/time":"日期/时间","Insert date/time":"插入日期/时间","Remove link":"删除链接",Url:"地址","Text to display":"显示文字",Anchors:"锚点","Insert link":"插入链接",Link:"链接","New window":"在新窗口打开",None:"无","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"你所填写的URL地址属于外部链接,需要加上http://:前缀吗?","Paste or type a link":"粘贴或输入链接",Target:"打开方式","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"你所填写的URL地址为邮件地址,需要加上mailto:前缀吗?","Insert/edit link":"插入/编辑链接","Insert/edit video":"插入/编辑视频",Media:"媒体","Alternative source":"镜像","Paste your embed code below:":"将内嵌代码粘贴在下面:","Insert video":"插入视频",Poster:"封面","Insert/edit media":"插入/编辑媒体",Embed:"内嵌","Nonbreaking space":"不间断空格","Page break":"分页符","Paste as text":"粘贴为文本",Preview:"预览",Print:"打印",Save:"保存","Could not find the specified string.":"未找到搜索内容.",Replace:"替换",Next:"下一个","Whole words":"全字匹配","Find and replace":"查找和替换","Replace with":"替换为",Find:"查找","Replace all":"全部替换","Match case":"区分大小写",Prev:"上一个",Spellcheck:"拼写检查",Finish:"完成","Ignore all":"全部忽略",Ignore:"忽略","Add to Dictionary":"添加到字典","Insert row before":"在上方插入",Rows:"行",Height:"高","Paste row after":"粘贴到下方",Alignment:"对齐方式","Border color":"边框颜色","Column group":"列组",Row:"行","Insert column before":"在左侧插入","Split cell":"拆分单元格","Cell padding":"单元格内边距","Cell spacing":"单元格外间距","Row type":"行类型","Insert table":"插入表格",Body:"表体",Caption:"标题",Footer:"表尾","Delete row":"删除行","Paste row before":"粘贴到上方",Scope:"范围","Delete table":"删除表格","H Align":"水平对齐",Top:"顶部对齐","Header cell":"表头单元格",Column:"列","Row group":"行组",Cell:"单元格",Middle:"垂直居中","Cell type":"单元格类型","Copy row":"复制行","Row properties":"行属性","Table properties":"表格属性",Bottom:"底部对齐","V Align":"垂直对齐",Header:"表头",Right:"右对齐","Insert column after":"在右侧插入",Cols:"列","Insert row after":"在下方插入",Width:"宽","Cell properties":"单元格属性",Left:"左对齐","Cut row":"剪切行","Delete column":"删除列",Center:"居中","Merge cells":"合并单元格","Insert template":"插入模板",Templates:"模板","Background color":"背景色","Custom...":"自定义...","Custom color":"自定义颜色","No color":"无","Text color":"文字颜色","Table of Contents":"内容列表","Show blocks":"显示区块边框","Show invisible characters":"显示不可见字符","Words: {0}":"字数:{0}",Insert:"插入",File:"文件",Edit:"编辑","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"在编辑区按ALT-F9打开菜单,按ALT-F10打开工具栏,按ALT-0查看帮助",Tools:"工具",View:"视图",Table:"表格",Format:"格式"})},Xxa5:function(e,t,r){e.exports=r("jyFz")},YJ1c:function(e,t){},YfSQ:function(e,t){},YsVJ:function(e,t){},ZW30:function(e,t,r){"use strict";r("vLgD");var n=r("mw3O");r.n(n)},bOdI:function(e,t,r){"use strict";t.__esModule=!0;var n,o=r("C4MV"),i=(n=o)&&n.__esModule?n:{default:n};t.default=function(e,t,r){return t in e?(0,i.default)(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},bUp0:function(e,t,r){"use strict";t.c=function(e,t){return Object(n.a)({url:"/menu/list/"+e,method:"get",params:t})},t.b=function(e){return Object(n.a)({url:"/menu/delete/"+e,method:"post"})},t.a=function(e){return Object(n.a)({url:"/menu/create",method:"post",data:e})},t.g=function(e,t){return Object(n.a)({url:"/menu/update/"+e,method:"post",data:t})},t.e=function(e){return Object(n.a)({url:"/menu/"+e,method:"get"})},t.f=function(e,t){return Object(n.a)({url:"/menu/updateHidden/"+e,method:"post",params:t})},t.d=function(){return Object(n.a)({url:"/menu/treeList",method:"get"})};var n=r("vLgD")},"c/Tr":function(e,t,r){e.exports={default:r("5zde"),__esModule:!0}},exGp:function(e,t,r){"use strict";t.__esModule=!0;var n,o=r("//Fk"),i=(n=o)&&n.__esModule?n:{default:n};t.default=function(e){return function(){var t=e.apply(this,arguments);return new i.default(function(e,r){return function n(o,a){try{var s=t[o](a),c=s.value}catch(e){return void r(e)}if(!s.done)return i.default.resolve(c).then(function(e){n("next",e)},function(e){n("throw",e)});e(c)}("next")})}}},fBQ2:function(e,t,r){"use strict";var n=r("evD5"),o=r("X8DO");e.exports=function(e,t,r){t in e?n.f(e,t,o(0,r)):e[t]=r}},fZjL:function(e,t,r){e.exports={default:r("jFbC"),__esModule:!0}},ioQ5:function(e,t,r){r("HpRW")("Set")},jFbC:function(e,t,r){r("Cdx3"),e.exports=r("FeBl").Object.keys},jyFz:function(e,t,r){var n=function(){return this}()||Function("return this")(),o=n.regeneratorRuntime&&Object.getOwnPropertyNames(n).indexOf("regeneratorRuntime")>=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,e.exports=r("SldL"),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}},lHA8:function(e,t,r){e.exports={default:r("pPW7"),__esModule:!0}},m9gC:function(e,t,r){var n=r("RY/4"),o=r("4WTo");e.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return o(this)}}},mClu:function(e,t,r){var n=r("kM2E");n(n.S+n.F*!r("+E39"),"Object",{defineProperty:r("evD5").f})},mRsl:function(e,t,r){"use strict";t.c=function(e,t){return Object(n.a)({url:"/productCategory/list/"+e,method:"get",params:t})},t.b=function(e){return Object(n.a)({url:"/productCategory/delete/"+e,method:"post"})},t.a=function(e){return Object(n.a)({url:"/productCategory/create",method:"post",data:e})},t.g=function(e,t){return Object(n.a)({url:"/productCategory/update/"+e,method:"post",data:t})},t.e=function(e){return Object(n.a)({url:"/productCategory/"+e,method:"get"})},t.h=function(e){return Object(n.a)({url:"/productCategory/update/showStatus",method:"post",data:e,params:e})},t.f=function(e){return Object(n.a)({url:"/productCategory/update/navStatus",method:"post",data:e,params:e})},t.d=function(){return Object(n.a)({url:"/productCategory/list/withChildren",method:"get"})};var n=r("vLgD")},oNmr:function(e,t,r){r("9Bbf")("Set")},oeOm:function(e,t,r){var n=r("7Doy");e.exports=function(e,t){return new(n(e))(t)}},pPW7:function(e,t,r){r("M6a0"),r("zQR9"),r("+tPU"),r("ttyz"),r("BDhv"),r("oNmr"),r("ioQ5"),e.exports=r("FeBl").Set},qo66:function(e,t,r){"use strict";var n=r("7KvD"),o=r("kM2E"),i=r("06OY"),a=r("S82l"),s=r("hJx8"),c=r("xH/j"),u=r("NWt+"),l=r("2KxR"),d=r("EqjI"),p=r("e6n0"),f=r("evD5").f,h=r("ALrJ")(0),m=r("+E39");e.exports=function(e,t,r,g,v,y){var b=n[e],k=b,S=v?"set":"add",C=k&&k.prototype,w={};return m&&"function"==typeof k&&(y||C.forEach&&!a(function(){(new k).entries().next()}))?(k=t(function(t,r){l(t,k,e,"_c"),t._c=new b,void 0!=r&&u(r,v,t[S],t)}),h("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in C&&(!y||"clear"!=e)&&s(k.prototype,e,function(r,n){if(l(this,k,e),!t&&y&&!d(r))return"get"==e&&void 0;var o=this._c[e](0===r?0:r,n);return t?this:o})}),y||f(k.prototype,"size",{get:function(){return this._c.size}})):(k=g.getConstructor(t,e,v,S),c(k.prototype,r),i.NEED=!0),p(k,e),w[e]=k,o(o.G+o.W+o.F,w),y||g.setStrong(k,e,v),k}},qyJz:function(e,t,r){"use strict";var n=r("+ZMJ"),o=r("kM2E"),i=r("sB3e"),a=r("msXi"),s=r("Mhyx"),c=r("QRG4"),u=r("fBQ2"),l=r("3fs2");o(o.S+o.F*!r("dY0y")(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,o,d,p=i(e),f="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,g=void 0!==m,v=0,y=l(p);if(g&&(m=n(m,h>2?arguments[2]:void 0,2)),void 0==y||f==Array&&s(y))for(r=new f(t=c(p.length));t>v;v++)u(r,v,g?m(p[v],v):p[v]);else for(d=y.call(p),r=new f;!(o=d.next()).done;v++)u(r,v,g?a(d,m,[o.value,v],!0):o.value);return r.length=v,r}})},rjYO:function(e,t){},"s/Rn":function(e,t,r){"use strict";t.c=function(e){return Object(n.a)({url:"/brand/list",method:"get",params:e})},t.a=function(e){return Object(n.a)({url:"/brand/create",method:"post",data:e})},t.f=function(e){return Object(n.a)({url:"/brand/update/showStatus",method:"post",data:e,requestType:"form"})},t.b=function(e){return Object(n.a)({url:"/brand/delete/"+e,method:"get"})},t.d=function(e){return Object(n.a)({url:"/brand/"+e,method:"get"})},t.e=function(e,t){return Object(n.a)({url:"/brand/update/"+e,method:"post",data:t})};var n=r("vLgD")},s40z:function(e,t){},sm7f:function(e,t){},ttyz:function(e,t,r){"use strict";var n=r("9C8M"),o=r("LIJb");e.exports=r("qo66")("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(o(this,"Set"),e=0===e?0:e,e)}},n)},uqUo:function(e,t,r){var n=r("kM2E"),o=r("FeBl"),i=r("S82l");e.exports=function(e,t){var r=(o.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*i(function(){r(1)}),"Object",a)}},vYgC:function(module,exports,__webpack_require__){var factory;factory=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/dist/",r(r.s="./index.js")}({"./index.js":
  2. /*!******************!*\
  3. !*** ./index.js ***!
  4. \******************/
  5. /*! no static exports found */function(e,t,r){var n=r(/*! ./src/cos */"./src/cos.js");e.exports=n},"./lib/base64.js":
  6. /*!***********************!*\
  7. !*** ./lib/base64.js ***!
  8. \***********************/
  9. /*! no static exports found */function(e,t){var r,n,o,i,a,s,c,u,l,d,p,f,h,m,g,v,y,b,k,S=(n=(r=r||{}).Base64,i=function(e){for(var t={},r=0,n=e.length;r<n;r++)t[e.charAt(r)]=r;return t}(o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a=String.fromCharCode,s=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?a(192|t>>>6)+a(128|63&t):a(224|t>>>12&15)+a(128|t>>>6&63)+a(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return a(240|t>>>18&7)+a(128|t>>>12&63)+a(128|t>>>6&63)+a(128|63&t)},c=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,u=function(e){return e.replace(c,s)},l=function(e){var t=[0,2,1][e.length%3],r=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[o.charAt(r>>>18),o.charAt(r>>>12&63),t>=2?"=":o.charAt(r>>>6&63),t>=1?"=":o.charAt(63&r)].join("")},d=r.btoa?function(e){return r.btoa(e)}:function(e){return e.replace(/[\s\S]{1,3}/g,l)},p=function(e){return d(u(e))},f=function(e,t){return t?p(String(e)).replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,""):p(String(e))},h=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),m=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return a(55296+(t>>>10))+a(56320+(1023&t));case 3:return a((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return a((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},g=function(e){return e.replace(h,m)},v=function(e){var t=e.length,r=t%4,n=(t>0?i[e.charAt(0)]<<18:0)|(t>1?i[e.charAt(1)]<<12:0)|(t>2?i[e.charAt(2)]<<6:0)|(t>3?i[e.charAt(3)]:0),o=[a(n>>>16),a(n>>>8&255),a(255&n)];return o.length-=[0,0,2,1][r],o.join("")},y=r.atob?function(e){return r.atob(e)}:function(e){return e.replace(/[\s\S]{1,4}/g,v)},b=function(e){return g(y(e))},{VERSION:"2.1.9",atob:y,btoa:d,fromBase64:k=function(e){return b(String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},toBase64:f,utob:u,encode:f,encodeURI:function(e){return f(e,!0)},btou:g,decode:k,noConflict:function(){var e=r.Base64;return r.Base64=n,e}});e.exports=S},"./lib/beacon.min.js":
  10. /*!***************************!*\
  11. !*** ./lib/beacon.min.js ***!
  12. \***************************/
  13. /*! no static exports found */function(e,t,r){var n,o,i,a=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js");i=function(){"use strict";var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)},t=function(){return(t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}function n(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var o="__BEACON_",i="__BEACON_deviceId",a="last_report_time",s="sending_event_ids",c="beacon_config",u="beacon_config_request_time",l=function(){function e(){var e=this;this.emit=function(t,r){if(e){var n,o=e.__EventsList[t];if(null==o?void 0:o.length){o=o.slice();for(var i=0;i<o.length;i++){n=o[i];try{var a=n.callback.apply(e,[r]);if(1===n.type&&e.remove(t,n.callback),!1===a)break}catch(e){throw e}}}return e}},this.__EventsList={}}return e.prototype.indexOf=function(e,t){for(var r=0;r<e.length;r++)if(e[r].callback===t)return r;return-1},e.prototype.on=function(e,t,r){if(void 0===r&&(r=0),this){var n=this.__EventsList[e];if(n||(n=this.__EventsList[e]=[]),-1===this.indexOf(n,t)){var o={name:e,type:r||0,callback:t};return n.push(o),this}return this}},e.prototype.one=function(e,t){this.on(e,t,1)},e.prototype.remove=function(e,t){if(this){var r=this.__EventsList[e];if(!r)return null;if(!t){try{delete this.__EventsList[e]}catch(e){}return null}if(r.length){var n=this.indexOf(r,t);r.splice(n,1)}return this}},e}();function d(e,t){for(var r={},n=0,o=Object.keys(e);n<o.length;n++){var i=o[n],a=e[i];if("string"==typeof a)r[p(i)]=p(a);else{if(t)throw new Error("value mast be string !!!!");r[p(String(i))]=p(String(a))}}return r}function p(e){if("string"!=typeof e)return e;try{return e.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(e){return""}}function f(e){return String(e.A99)+String(e.A100)}var h=function(){},m=function(){function e(e){var r=this;this.lifeCycle=new l,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(e){if(!e||!e.reduce||!e.length)throw new TypeError("createPipeline 方法需要传入至少有一个 pipe 的数组");return 1===e.length?function(t,r){e[0](t,r||h)}:e.reduce(function(e,t){return function(r,n){return void 0===n&&(n=h),e(r,function(e){return null==t?void 0:t(e,n)})}})}([function(e){r.send({url:r.strategy.getUploadUrl(),data:e,method:"post",contentType:"application/json;charset=UTF-8"},function(){var t=r.config.onReportSuccess;"function"==typeof t&&t(JSON.stringify(e.events))},function(){var t=r.config.onReportFail;"function"==typeof t&&t(JSON.stringify(e.events))})}]),function(e,t){if(!e)throw t instanceof Error?t:new Error(t)}(Boolean(e.appkey),"appkey must be initial"),this.config=t({},e)}return e.prototype.onUserAction=function(e,t){this.preReport(e,t,!1)},e.prototype.onDirectUserAction=function(e,t){this.preReport(e,t,!0)},e.prototype.preReport=function(e,t,r){e?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(e)||this.strategy.isSampleEvent(e)||this.onReport(e,t,r)):this.errorReport.reportError("602"," no eventCode")},e.prototype.addAdditionalParams=function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];this.additionalParams[n]=e[n]}},e.prototype.setChannelId=function(e){this.commonInfo.channelID=String(e)},e.prototype.setOpenId=function(e){this.commonInfo.openid=String(e)},e.prototype.setUnionid=function(e){this.commonInfo.unid=String(e)},e.prototype.getDeviceId=function(){return this.commonInfo.deviceId},e.prototype.getCommonInfo=function(){return this.commonInfo},e.prototype.removeSendingId=function(e){try{var t=JSON.parse(this.storage.getItem(s)),r=t.indexOf(e);-1!=r&&(t.splice(r,1),this.storage.setItem(s,JSON.stringify(t)))}catch(e){}},e}(),g=function(){function e(e,t,r,n){this.requestParams={},this.network=n,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=e.appkey,this.requestParams.platform=r,this.requestParams.uin=t.deviceId,this.requestParams.model="",this.requestParams.os=r,this.requestParams.app_version=e.appVersion,this.requestParams.sdk_version=t.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=e.isOversea?"https://htrace.wetvinfo.com/kv":"https://h.trace.qq.com/kv"}return e.prototype.reportError=function(e,t){this.requestParams._dc=Math.random(),this.requestParams.error_msg=t,this.requestParams.error_code=e,this.network.get(this.uploadUrl,{params:this.requestParams}).catch(function(e){})},e}(),v=function(){function e(e,t,r,n,o){this.strategy={isEventUpOnOff:!0,httpsUploadUrl:"https://otheve.beacon.qq.com/analytics/v2_upload",requestInterval:30,blacklist:[],samplelist:[]},this.realSample={},this.appkey="",this.needQueryConfig=!0,this.appkey=t.appkey,this.storage=n,this.needQueryConfig=e;try{var i=JSON.parse(this.storage.getItem(c));i&&this.processData(i)}catch(e){}t.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!t.isOversea&&this.needRequestConfig()&&this.requestConfig(t.appVersion,r,o)}return e.prototype.requestConfig=function(e,t,r){var n=this;this.storage.setItem(u,Date.now().toString()),r.post("https://oth.str.beacon.qq.com/trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:"undefined"==typeof wx?"3":"4",mainAppKey:this.appkey,appVersion:e,sdkVersion:t.sdkVersion,osVersion:t.userAgent,model:"",packageName:"",params:{A3:t.deviceId}}).then(function(e){if(0==e.data.ret)try{var t=JSON.parse(e.data.beaconConfig);t&&(n.processData(t),n.storage.setItem(c,e.data.beaconConfig))}catch(e){}else n.processData(null),n.storage.setItem(c,"")}).catch(function(e){})},e.prototype.processData=function(e){var t,r,n,o,i;this.strategy.isEventUpOnOff=null!==(t=null==e?void 0:e.isEventUpOnOff)&&void 0!==t?t:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=null!==(r=null==e?void 0:e.httpsUploadUrl)&&void 0!==r?r:this.strategy.httpsUploadUrl,this.strategy.requestInterval=null!==(n=null==e?void 0:e.requestInterval)&&void 0!==n?n:this.strategy.requestInterval,this.strategy.blacklist=null!==(o=null==e?void 0:e.blacklist)&&void 0!==o?o:this.strategy.blacklist,this.strategy.samplelist=null!==(i=null==e?void 0:e.samplelist)&&void 0!==i?i:this.strategy.samplelist;for(var a=0,s=this.strategy.samplelist;a<s.length;a++){var c=s[a].split(",");2==c.length&&(this.realSample[c[0]]=c[1])}},e.prototype.needRequestConfig=function(){if(!this.needQueryConfig)return!1;var e=Number(this.storage.getItem(u));return Date.now()-e>60*this.strategy.requestInterval*1e3},e.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},e.prototype.isBlackEvent=function(e){return-1!=this.strategy.blacklist.indexOf(e)},e.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},e.prototype.isSampleEvent=function(e){return!!Object.prototype.hasOwnProperty.call(this.realSample,e)&&this.realSample[e]<Math.floor(Math.random()*Math.floor(1e4))},e}(),y="session_storage_key",b=function(){function e(e,t,r){this.getSessionStackDepth=0,this.beacon=r,this.storage=e,this.duration=t,this.appkey=r.config.appkey}return e.prototype.getSession=function(){this.getSessionStackDepth+=1;var e=this.storage.getItem(y);if(!e)return this.createSession();var t="",r=0;try{var n=JSON.parse(e)||{sessionId:void 0,sessionStart:void 0};if(!n.sessionId||!n.sessionStart)return this.createSession();var o=Number(this.storage.getItem(a));if(Date.now()-o>this.duration)return this.createSession();t=n.sessionId,r=n.sessionStart,this.getSessionStackDepth=0}catch(e){}return{sessionId:t,sessionStart:r}},e.prototype.createSession=function(){var e=Date.now(),t={sessionId:this.appkey+"_"+e.toString(),sessionStart:e};this.storage.setItem(y,JSON.stringify(t)),this.storage.setItem(a,e.toString());var r="is_new_user",n=this.storage.getItem(r);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:n?"N":"Y"}),this.storage.setItem(r,JSON.stringify(!1)),t},e}();function k(){var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,r=e.indexOf("Edge")>-1&&!t,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){new RegExp("MSIE (\\d+\\.\\d+);").test(e);var o=parseFloat(RegExp.$1);return 7==o?7:8==o?8:9==o?9:10==o?10:6}return r?-2:n?11:-1}var S,C,w=function(){return(w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},x=function(){function e(e,t){void 0===t&&(t={}),this.reportOptions={},this.config=e,this.reportOptions=t}return e.canUseDB=function(){return!!(null===window||void 0===window?void 0:window.indexedDB)},e.prototype.openDB=function(){var t=this;return new Promise(function(r,n){if(!e.canUseDB())return n({message:"当前不支持 indexeddb"});var o=t.config,i=o.name,a=o.version,s=o.stores,c=indexedDB.open(i,a);c.onsuccess=function(){t.db=c.result,r(),w({result:1,func:"open",params:JSON.stringify(t.config)},t.reportOptions)},c.onerror=function(e){var r,o;n(e),w({result:0,func:"open",params:JSON.stringify(t.config),error_msg:null===(o=null===(r=e.target)||void 0===r?void 0:r.error)||void 0===o?void 0:o.message},t.reportOptions)},c.onupgradeneeded=function(){t.db=c.result;try{null==s||s.forEach(function(e){t.createStore(e)})}catch(e){w({result:0,func:"open",params:JSON.stringify(t.config),error_msg:e.message},t.reportOptions),n(e)}}})},e.prototype.useStore=function(e){return this.storeName=e,this},e.prototype.deleteDB=function(){var e=this;return this.closeDB(),new Promise(function(t,r){var n=indexedDB.deleteDatabase(e.config.name);n.onsuccess=function(){return t()},n.onerror=r})},e.prototype.closeDB=function(){var e;null===(e=this.db)||void 0===e||e.close(),this.db=null},e.prototype.getStoreCount=function(){var e=this;return new Promise(function(t,r){var n=e.getStore("readonly").count();n.onsuccess=function(){return t(n.result)},n.onerror=r})},e.prototype.clearStore=function(){var e=this;return new Promise(function(t,r){var n=e.getStore("readwrite").clear();n.onsuccess=function(){return t()},n.onerror=r})},e.prototype.add=function(e,t){var r=this;return new Promise(function(n,o){var i=r.getStore("readwrite").add(e,t);i.onsuccess=function(){n(i.result)},i.onerror=o})},e.prototype.put=function(e,t){var r=this;return new Promise(function(n,o){var i=r.getStore("readwrite").put(e,t);i.onsuccess=function(){n(i.result)},i.onerror=o})},e.prototype.getStoreAllData=function(){var e=this;return new Promise(function(t,r){var n=e.getStore("readonly").openCursor(),o=[];n.onsuccess=function(){var e;if(null===(e=n.result)||void 0===e?void 0:e.value){var r=n.result.value;o.push(r),n.result.continue()}else t(o)},n.onerror=r})},e.prototype.getDataRangeByIndex=function(e,t,r,n,o){var i=this;return new Promise(function(a,s){var c=i.getStore().index(e),u=IDBKeyRange.bound(t,r,n,o),l=[],d=c.openCursor(u);d.onsuccess=function(){var e;(null===(e=null==d?void 0:d.result)||void 0===e?void 0:e.value)?(l.push(null==d?void 0:d.result.value),null==d||d.result.continue()):a(l)},d.onerror=s})},e.prototype.removeDataByIndex=function(e,t,r,n,o){var i=this;return new Promise(function(a,s){var c=i.getStore("readwrite").index(e),u=IDBKeyRange.bound(t,r,n,o),l=c.openCursor(u),d=0;l.onsuccess=function(e){var t=e.target.result;t?(d+=1,t.delete(),t.continue()):a(d)},l.onerror=s})},e.prototype.createStore=function(e){var t=e.name,r=e.indexes,n=void 0===r?[]:r,o=e.options;if(this.db){this.db.objectStoreNames.contains(t)&&this.db.deleteObjectStore(t);var i=this.db.createObjectStore(t,o);n.forEach(function(e){i.createIndex(e.indexName,e.keyPath,e.options)})}},e.prototype.getStore=function(e){var t;return void 0===e&&(e="readonly"),null===(t=this.db)||void 0===t?void 0:t.transaction(this.storeName,e).objectStore(this.storeName)},e}(),E="event_table_v3",A="eventId",T=function(){function e(e){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new x({name:"Beacon_"+e+"_V3",version:1,stores:[{name:E,options:{keyPath:A},indexes:[{indexName:A,keyPath:A,options:{unique:!0}}]}]}),this.open()}return e.prototype.getCount=function(){var e=this;return this.readyExec(function(){return e.db.getStoreCount()})},e.prototype.setItem=function(e,t){var r=this;return this.readyExec(function(){return r.db.add({eventId:e,value:t})})},e.prototype.getItem=function(e){return r(this,void 0,void 0,function(){var t=this;return n(this,function(r){return[2,this.readyExec(function(){return t.db.getDataRangeByIndex(A,e,e)})]})})},e.prototype.removeItem=function(e){var t=this;return this.readyExec(function(){return t.db.removeDataByIndex(A,e,e)})},e.prototype.updateItem=function(e,t){var r=this;return this.readyExec(function(){return r.db.put({eventId:e,value:t})})},e.prototype.iterate=function(e){var t=this;return this.readyExec(function(){return t.db.getStoreAllData().then(function(t){t.forEach(function(t){e(t.value)})})})},e.prototype.open=function(){return r(this,void 0,void 0,function(){var e=this;return n(this,function(t){switch(t.label){case 0:return this.taskQueue=this.taskQueue.then(function(){return e.db.openDB()}),[4,this.taskQueue];case 1:return t.sent(),this.isReady=!0,this.db.useStore(E),[2]}})})},e.prototype.readyExec=function(e){return this.isReady?e():(this.taskQueue=this.taskQueue.then(function(){return e()}),this.taskQueue)},e}(),R=function(){function e(e){this.keyObject={},this.storage=e}return e.prototype.getCount=function(){return this.storage.getStoreCount()},e.prototype.removeItem=function(e){this.storage.removeItem(e),delete this.keyObject[e]},e.prototype.setItem=function(e,t){var r=JSON.stringify(t);this.storage.setItem(e,r),this.keyObject[e]=t},e.prototype.iterate=function(e){for(var t=Object.keys(this.keyObject),r=0;r<t.length;r++){var n=this.storage.getItem(t[r]);e(JSON.parse(n))}},e}(),_=function(){function e(e,t){var r=this;this.dbEventCount=0,k()>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new R(t),this.dbEventCount=this.store.getCount()):(this.store=new T(e),this.getCount().then(function(e){r.dbEventCount=e}).catch(function(e){}))}return e.prototype.getCount=function(){return r(this,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,e.sent()];case 2:return e.sent(),[2,Promise.reject()];case 3:return[2]}})})},e.prototype.insertEvent=function(e,t){return r(this,void 0,void 0,function(){var r,o;return n(this,function(n){switch(n.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];r=f(e.mapValue),n.label=1;case 1:return n.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(r,e)];case 2:return[2,n.sent()];case 3:return o=n.sent(),t&&t(o,e),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}})})},e.prototype.getEvents=function(){return r(this,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:e=[],t.label=1;case 1:return t.trys.push([1,3,,4]),[4,this.store.iterate(function(t){e.push(t)})];case 2:case 3:return t.sent(),[2,Promise.all(e)];case 4:return[2]}})})},e.prototype.removeEvent=function(e){return r(this,void 0,void 0,function(){var t;return n(this,function(r){switch(r.label){case 0:t=f(e.mapValue),r.label=1;case 1:return r.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(t)];case 2:return[2,r.sent()];case 3:return r.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}})})},e}(),O=function(){return(O=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function P(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function I(e,t){var r=[null,void 0,"",NaN].includes(e);if(t.isSkipEmpty&&r)return null;var n=!t.isSkipEmpty&&r?"":e;try{return t.encode?encodeURIComponent(n):n}catch(e){return null}}(C=S||(S={}))[C.equal=0]="equal",C[C.low=-1]="low",C[C.high=1]="high";var B=function(){return(B=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function D(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((n=n.apply(e,t||[])).next())})}function N(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var L=function(){function e(){this.interceptors=[]}return e.prototype.use=function(e,t){return this.interceptors.push({resolved:e,rejected:t}),this.interceptors.length-1},e.prototype.traverse=function(e,t){void 0===t&&(t=!1);var r=Promise.resolve(e);return(t?Array.prototype.reduceRight:Array.prototype.reduce).call(this.interceptors,function(e,t){if(t){var n=t.resolved,o=t.rejected;r=r.then(n,o)}return e},""),r},e.prototype.eject=function(e){this.interceptors[e]&&(this.interceptors[e]=null)},e}(),j={defaults:{timeout:0,method:"GET",mode:"cors",redirect:"follow",credentials:"same-origin"},headers:{common:{Accept:"application/json, text/plain, */*"},POST:{"Content-Type":"application/x-www-form-urlencoded"},PUT:{"Content-Type":"application/x-www-form-urlencoded"},PATCH:{"Content-Type":"application/x-www-form-urlencoded"}},baseURL:"",polyfillUrl:"https://vm.gtimg.cn/comps/script/fetch.min.js",interceptors:{request:new L,response:new L}},U=/^([a-z][a-z\d+\-.]*:)?\/\//i,M=Object.prototype.toString;function q(e){return D(this,void 0,void 0,function(){var t;return N(this,function(r){switch(r.label){case 0:if(window.fetch)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,function(e,t){return new Promise(function(r,n){if(t&&document.querySelectorAll("script[data-tag="+t+"]").length)return r();var o=document.createElement("script"),i=O({type:"text/javascript",charset:"utf-8"},e);Object.keys(i).forEach(function(e){return function(e,t,r){if(e)return void 0===r?e.getAttribute(t):e.setAttribute(t,r)}(o,e,i[e])}),t&&(o.dataset.tag=t),o.onload=function(){return r()},o.onreadystatechange=function(){var e=o.readyState;["complete","loaded"].includes(e)&&(o.onreadystatechange=null,r())},o.onerror=n,document.body.appendChild(o)})}({src:e})];case 2:return r.sent(),[3,4];case 3:throw t=r.sent(),new Error("加载 polyfill "+e+" 失败: "+t.message);case 4:return[2]}})})}function H(e){return D(this,void 0,void 0,function(){var t,r,n,o,i,a,s,c,u,l,d,p,f,h,m,g,v;return N(this,function(y){switch(y.label){case 0:return t=j.baseURL,r=j.defaults,n=j.interceptors,[4,q(j.polyfillUrl)];case 1:return y.sent(),(o=B(B({},r),e)).headers||(o.headers=function(e){void 0===e&&(e="GET");var t=j.headers[e]||{};return B(B({},j.headers.common),t)}(o.method)),function(e){["Accept","Content-Type"].forEach(function(t){return r=t,void((n=e.headers)&&Object.keys(n).forEach(function(e){e!==r&&e.toUpperCase()===r.toUpperCase()&&(n[r]=n[e],delete n[e])}));var r,n}),function(e){if("[object Object]"!==M.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}(e.body)&&(e.body=JSON.stringify(e.body),e.headers&&(e.headers["Content-Type"]="application/json;charset=utf-8"))}(o),[4,n.request.traverse(o,!0)];case 2:if((i=y.sent())instanceof Error)throw i;return i.url=function(e,t){return!e||U.test(t)?t:e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,"")}(t,i.url),a=i.url,s=i.timeout,c=i.params,u=i.method,l=["GET","DELETE","OPTIONS","HEAD"].includes(void 0===u?"GET":u)&&!!c,d=l?function(e,t){void 0===t&&(t={encode:!0,isSkipEmpty:!1});var r=e.url,n=e.query,o=void 0===n?{}:n,i=e.hash,a=r.split("#"),s=a[0],c=a[1],u=void 0===c?"":c,l=s.split("?")[0],d=[],p=I(i||u,t),f=O(O({},function(e){var t=e.split("#"),r=t[0],n=t[1],o=void 0===n?"":n,i=r.split("?"),a=i[0],s=i[1],c=void 0===s?"":s,u=P(o),l=Object.create(null);return c.split("&").forEach(function(e){var t=e.split("="),r=t[0],n=t[1],o=void 0===n?"":n,i=P(r),a=P(o);null===i||null===a||""===i&&""===a||l[i]||(l[i]=a)}),{url:a,query:l,hash:u}}(r).query),o);return Object.keys(f).forEach(function(e){var r=I(e,t),n=I(f[e],t);null!==r&&null!==n&&d.push(r+"="+n)}),l+(d.length?"?"+d.join("&"):"")+(p?"#"+p:"")}({url:a,query:c}):a,p=[],s&&!i.signal&&(m=new Promise(function(e){f=setTimeout(function(){e(new Error("timeout"))},s)}),p.push(m),h=new AbortController,i.signal=h.signal),p.push(fetch(d,i).catch(function(e){return e})),[4,Promise.race(p)];case 3:return g=y.sent(),f&&clearTimeout(f),[4,n.response.traverse(g)];case 4:if((v=y.sent())instanceof Error)throw null==h||h.abort(),v;return[2,v]}})})}var F=function(){function e(e){j.interceptors.request.use(function(r){var n=r.url,o=r.method,i=r.body,a=i;if(e.onReportBeforeSend){var s=e.onReportBeforeSend({url:n,method:o,data:i?JSON.parse(i):null});a=(null==s?void 0:s.data)?JSON.stringify(s.data):null}return"GET"!=o&&a?t(t({},r),{body:a}):r})}return e.prototype.get=function(e,o){return r(this,void 0,void 0,function(){var r,i;return n(this,function(n){switch(n.label){case 0:return[4,H(t({url:e},o))];case 1:return[4,(r=n.sent()).json()];case 2:return i=n.sent(),[2,Promise.resolve({data:i,status:r.status,statusText:r.statusText,headers:r.headers})]}})})},e.prototype.post=function(e,o,i){return r(this,void 0,void 0,function(){var r,a;return n(this,function(n){switch(n.label){case 0:return[4,H(t({url:e,body:o,method:"POST"},i))];case 1:return[4,(r=n.sent()).json()];case 2:return a=n.sent(),[2,Promise.resolve({data:a,status:r.status,statusText:r.statusText,headers:r.headers})]}})})},e}(),K=function(){function e(e){this.appkey=e}return e.prototype.getItem=function(e){try{return window.localStorage.getItem(this.getStoreKey(e))}catch(e){return""}},e.prototype.removeItem=function(e){try{window.localStorage.removeItem(this.getStoreKey(e))}catch(e){}},e.prototype.setItem=function(e,t){try{window.localStorage.setItem(this.getStoreKey(e),t)}catch(e){}},e.prototype.setSessionItem=function(e,t){try{window.sessionStorage.setItem(this.getStoreKey(e),t)}catch(e){}},e.prototype.getSessionItem=function(e){try{return window.sessionStorage.getItem(this.getStoreKey(e))}catch(e){return""}},e.prototype.getStoreKey=function(e){return o+this.appkey+"_"+e},e.prototype.createDeviceId=function(){try{var e=window.localStorage.getItem(i);return e||(e=function(e){for(var t="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",r="",n=0;n<32;n++)r+=t.charAt(Math.floor(Math.random()*t.length));return r}(),window.localStorage.setItem(i,e)),e}catch(e){return""}},e.prototype.clear=function(){try{for(var e=window.localStorage.length,t=0;t<e;t++){var r=window.localStorage.key(t);(null==r?void 0:r.substr(0,9))==o&&window.localStorage.removeItem(r)}}catch(e){}},e.prototype.getStoreCount=function(){var e=0;try{e=window.localStorage.length}catch(e){}return e},e}(),V="logid_start",z="4.5.14-web";return function(r){function n(e){var t=r.call(this,e)||this;t.qimei36="",t.uselessCycleTaskNum=0,t.underWeakNet=!1,t.pauseSearching=!1,t.send=function(e,r,n){t.storage.setItem(a,Date.now().toString()),t.network.post(t.uploadUrl||t.strategy.getUploadUrl(),e.data).then(function(n){var o;100==(null===(o=null==n?void 0:n.data)||void 0===o?void 0:o.result)?t.delayTime=1e3*n.data.delayTime:t.delayTime=0,r&&r(e.data),e.data.events.forEach(function(e){t.store.removeEvent(e).then(function(){t.removeSendingId(f(e.mapValue))})}),t.doCustomCycleTask()}).catch(function(r){var o=e.data.events;t.errorReport.reportError(r.code?r.code.toString():"600",r.message),n&&n(e.data);var i=JSON.parse(t.storage.getItem(s));o.forEach(function(e){i&&-1!=i.indexOf(f(e))&&t.store.insertEvent(e,function(e,r){e&&t.errorReport.reportError("604","insertEvent fail!")}),t.removeSendingId(f(e))}),t.monitorUploadFailed()})};var n,o,i=k();return t.isUnderIE8=i>0&&i<8,t.isUnderIE8||(t.isUnderIE=i>0,e.needInitQimei&&function(e,t){var r,n;(r="https://tun-cos-1258344701.file.myqcloud.com/fp.js",void 0===n&&(n=Date.now()+"-"+Math.random()),new Promise(function(e,t){if(document.getElementById(n))e(void 0);else{var o=document.getElementsByTagName("head")[0],i=document.createElement("script");i.onload=function(){return function(){i.onload=null,e(void 0)}},i.onerror=function(e){i.onerror=null,o.removeChild(i),t(e)},i.src=r,i.id=n,o.appendChild(i)}})).then(function(){(new Fingerprint).getQimei36(e,t)}).catch(function(e){})}(e.appkey,function(e){t.qimei36=e.q36}),t.network=new F(e),t.storage=new K(e.appkey),t.initCommonInfo(e),t.store=new _(e.appkey,t.storage),t.errorReport=new g(t.config,t.commonInfo,"web",t.network),t.strategy=new v(null==e.needQueryConfig||e.needQueryConfig,t.config,t.commonInfo,t.storage,t.network),t.logidStartTime=t.storage.getItem(V),t.logidStartTime||(t.logidStartTime=Date.now().toString(),t.storage.setItem(V,t.logidStartTime)),n=t.logidStartTime,o=Date.now()-Number.parseFloat(n),Math.floor(o/864e5)>=365&&t.storage.clear(),t.initSession(e),t.onDirectUserAction("rqd_js_init",{}),setTimeout(function(){return t.lifeCycle.emit("init")},0),t.initDelayTime=e.delay?e.delay:1e3,t.cycleTask(t.initDelayTime)),t}return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}(n,r),n.prototype.initSession=function(e){var t=18e5;e.sessionDuration&&e.sessionDuration>3e4&&(t=e.sessionDuration),this.beaconSession=new b(this.storage,t,this)},n.prototype.initCommonInfo=function(e){var t=Number(this.storage.getItem(a));try{var r=JSON.parse(this.storage.getItem(s));(Date.now()-t>3e4||!r)&&this.storage.setItem(s,JSON.stringify([]))}catch(e){}e.uploadUrl&&(this.uploadUrl=e.uploadUrl+"?appkey="+e.appkey);var n=[window.screen.width,window.screen.height];window.devicePixelRatio&&n.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:n.join("*"),channelID:e.channelID?String(e.channelID):"",openid:e.openid?String(e.openid):"",unid:e.unionid?String(e.unionid):"",sdkVersion:z},this.config.appVersion=e.versionCode?String(e.versionCode):"",this.config.strictMode=e.strictMode},n.prototype.cycleTask=function(e){var t=this;this.intervalID=window.setInterval(function(){t.pauseSearching||t.store.getEvents().then(function(e){0==e.length&&(t.pauseSearching=!0);var r=[],n=JSON.parse(t.storage.getItem(s));n||(n=[]),e&&e.forEach(function(e){var t=f(e.mapValue);-1==n.indexOf(t)&&(r.push(e),n.push(t))}),0!=r.length&&(t.storage.setItem(s,JSON.stringify(n)),t._normalLogPipeline(t.assembleData(r)))}).catch(function(e){})},e)},n.prototype.onReport=function(e,t,r){var n=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{this.pauseSearching=!1;var o=this.generateData(e,t,r);if(r&&0==this.delayTime&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(o));else{var i=o.shift();i&&this.store.insertEvent(i,function(e){e&&n.errorReport.reportError("604","insertEvent fail!")}).catch(function(e){n._normalLogPipeline(n.assembleData(o))})}}},n.prototype.onSendBeacon=function(e,t){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{this.pauseSearching=!1;var r=this.assembleData(this.generateData(e,t,!0));"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(),JSON.stringify(r))}},n.prototype.generateData=function(e,r,n){var o=[],i="4.5.14-web_"+(n?"direct_log_id":"normal_log_id"),a=Number(this.storage.getItem(i));return a=a||1,r=t(t({},r),{A99:n?"Y":"N",A100:a.toString(),A72:z,A88:this.logidStartTime}),a++,this.storage.setItem(i,a.toString()),o.push({eventCode:e,eventTime:Date.now().toString(),mapValue:d(r,this.config.strictMode)}),o},n.prototype.assembleData=function(e){var r=this.beaconSession.getSession();return{appVersion:this.config.appVersion?p(this.config.appVersion):"",sdkId:"js",sdkVersion:z,mainAppKey:this.config.appkey,platformId:3,common:d(t(t({},this.additionalParams),{A2:this.commonInfo.deviceId,A8:this.commonInfo.openid,A12:this.commonInfo.language,A17:this.commonInfo.pixel,A23:this.commonInfo.channelID,A50:this.commonInfo.unid,A76:r.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:e}},n.prototype.monitorUploadFailed=function(){this.uselessCycleTaskNum++,this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.underWeakNet=!0)},n.prototype.doCustomCycleTask=function(){this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime)),this.uselessCycleTaskNum=0,this.underWeakNet=!1},n}(m)},"object"==a(t)&&void 0!==e?e.exports=i():void 0===(o="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=o)},"./lib/crypto.js":
  14. /*!***********************!*\
  15. !*** ./lib/crypto.js ***!
  16. \***********************/
  17. /*! no static exports found */function(e,t,r){(function(e){var t,n,o,i,a,s,c,u=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),l=l||function(e,t){var r={},n=r.lib={},o=function(){},i=n.Base={extend:function(e){o.prototype=this;var t=new o;return e&&t.mixIn(e),t.hasOwnProperty("init")||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},a=n.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes;if(e=e.sigBytes,this.clamp(),n%4)for(var o=0;o<e;o++)t[n+o>>>2]|=(r[o>>>2]>>>24-o%4*8&255)<<24-(n+o)%4*8;else if(65535<r.length)for(o=0;o<e;o+=4)t[n+o>>>2]=r[o>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;n<t;n+=4)r.push(4294967296*e.random()|0);return new a.init(r,t)}}),s=r.enc={},c=s.Hex={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n<e;n++){var o=t[n>>>2]>>>24-n%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new a.init(r,t/2)}},u=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n<e;n++)r.push(String.fromCharCode(t[n>>>2]>>>24-n%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new a.init(r,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},d=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,o=r.sigBytes,i=this.blockSize,s=o/(4*i);if(t=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*i,o=e.min(4*t,o),t){for(var c=0;c<t;c+=i)this._doProcessBlock(n,c);c=n.splice(0,t),r.sigBytes-=o}return new a.init(c,o)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=d.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=r.algo={};return r}(Math);n=(a=(t=l).lib).WordArray,o=a.Hasher,i=[],a=t.algo.SHA1=o.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],o=r[1],a=r[2],s=r[3],c=r[4],u=0;80>u;u++){if(16>u)i[u]=0|e[t+u];else{var l=i[u-3]^i[u-8]^i[u-14]^i[u-16];i[u]=l<<1|l>>>31}l=(n<<5|n>>>27)+c+i[u],l=20>u?l+(1518500249+(o&a|~o&s)):40>u?l+(1859775393+(o^a^s)):60>u?l+((o&a|o&s|a&s)-1894007588):l+((o^a^s)-899497514),c=s,s=a,a=o<<30|o>>>2,o=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+o|0,r[2]=r[2]+a|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(n+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=o._createHelper(a),t.HmacSHA1=o._createHmacHelper(a),function(){var e=l,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var n=e.blockSize,o=4*n;r.sigBytes>o&&(r=e.finalize(r)),r.clamp();for(var i=this._oKey=r.clone(),a=this._iKey=r.clone(),s=i.words,c=a.words,u=0;u<n;u++)s[u]^=1549556828,c[u]^=909522486;i.sigBytes=a.sigBytes=o,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;return e=t.finalize(e),t.reset(),t.finalize(this._oKey.clone().concat(e))}})}(),c=(s=l).lib.WordArray,s.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s++)o.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map,n=r.charAt(64);if(n){var o=e.indexOf(n);-1!=o&&(t=o)}for(var i=[],a=0,s=0;s<t;s++)if(s%4){var u=r.indexOf(e.charAt(s-1))<<s%4*2,l=r.indexOf(e.charAt(s))>>>6-s%4*2;i[a>>>2]|=(u|l)<<24-a%4*8,a++}return c.create(i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},"object"===u(e)?e.exports=l:window.CryptoJS=l}).call(this,r(/*! ./../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(e))},"./lib/json2xml.js":
  18. /*!*************************!*\
  19. !*** ./lib/json2xml.js ***!
  20. \*************************/
  21. /*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),o=new RegExp("^([^a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�])|^((x|X)(m|M)(l|L))|([^a-zA-Z_À-ÖØ-öø-ÿͰ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿿、-퟿豈-﷏ﷰ-�-.0-9·̀-ͯ‿⁀])","g"),i=/[^\x09\x0A\x0D\x20-\xFF\x85\xA0-\uD7FF\uE000-\uFDCF\uFDE0-\uFFFD]/gm,a=function(e){var t=[];if(e instanceof Object)for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t},s=function(e,t){var r=function(e,r,n,i,a){var s=void 0!==t.indent?t.indent:"\t",c=t.prettyPrint?"\n"+new Array(i).join(s):"";t.removeIllegalNameCharacters&&(e=e.replace(o,"_"));var u=[c,"<",e,n||""];return r&&r.length>0?(u.push(">"),u.push(r),a&&u.push(c),u.push("</"),u.push(e),u.push(">")):u.push("/>"),u.join("")};return function e(o,s,c){var u=n(o);switch((Array.isArray?Array.isArray(o):o instanceof Array)?u="array":o instanceof Date&&(u="date"),u){case"array":var l=[];return o.map(function(t){l.push(e(t,1,c+1))}),t.prettyPrint&&l.push("\n"),l.join("");case"date":return o.toJSON?o.toJSON():o+"";case"object":var d=[];for(var p in o)if(o.hasOwnProperty(p))if(o[p]instanceof Array)for(var f=0;f<o[p].length;f++)o[p].hasOwnProperty(f)&&d.push(r(p,e(o[p][f],0,c+1),null,c+1,a(o[p][f]).length));else d.push(r(p,e(o[p],0,c+1),null,c+1));return t.prettyPrint&&d.length>0&&d.push("\n"),d.join("");case"function":return o();default:return t.escape?(""+o).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(i,""):""+o}}(e,0,0)},c=function(e){var t=['<?xml version="1.0" encoding="UTF-8"'];return e&&t.push(' standalone="yes"'),t.push("?>"),t.join("")};e.exports=function(e,t){if(t||(t={xmlHeader:{standalone:!0},prettyPrint:!0,indent:" ",escape:!0}),"string"==typeof e)try{e=JSON.parse(e.toString())}catch(e){return!1}var r="",o="";return t&&("object"==n(t)?(t.xmlHeader&&(r=c(!!t.xmlHeader.standalone)),void 0!==t.docType&&(o="<!DOCTYPE "+t.docType+">")):r=c()),[r,(t=t||{}).prettyPrint&&o?"\n":"",o,s(e,t)].join("").replace(/\n{2,}/g,"\n").replace(/\s+$/g,"")}},"./lib/md5.js":
  22. /*!********************!*\
  23. !*** ./lib/md5.js ***!
  24. \********************/
  25. /*! no static exports found */function(module,exports,__webpack_require__){(function(process,global,module){var __WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js");!function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===("undefined"==typeof window?"undefined":_typeof(window)),root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===("undefined"==typeof self?"undefined":_typeof(self)),NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"===(void 0===process?"undefined":_typeof(process))&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"===_typeof(module)&&module.exports,AMD=__webpack_require__(/*! !webpack amd options */"./node_modules/webpack/buildin/amd-options.js"),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===_typeof(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e){return function(t,r){return new Md5(!0).update(t,r)[e]()}},createMethod=function(){var e=createOutputMethod("hex");NODE_JS&&(e=nodeWrap(e)),e.getCtx=e.create=function(){return new Md5},e.update=function(t){return e.create().update(t)};for(var t=0;t<OUTPUT_TYPES.length;++t){var r=OUTPUT_TYPES[t];e[r]=createOutputMethod(r)}return e},nodeWrap=function nodeWrap(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(e){if("string"==typeof e)return crypto.createHash("md5").update(e,"utf8").digest("hex");if(null===e||void 0===e)throw ERROR;return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash("md5").update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod};function Md5(e){if(e)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var t=new ArrayBuffer(68);this.buffer8=new Uint8Array(t),this.blocks=new Uint32Array(t)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(e,t){if(!this.finalized){for(var r,n,o=0,i=e.length,a=this.blocks,s=this.buffer8;o<i;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),ARRAY_BUFFER)for(n=this.start;o<i&&n<64;++o)r=e.charCodeAt(o),t||r<128?s[n++]=r:r<2048?(s[n++]=192|r>>6,s[n++]=128|63&r):r<55296||r>=57344?(s[n++]=224|r>>12,s[n++]=128|r>>6&63,s[n++]=128|63&r):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++o)),s[n++]=240|r>>18,s[n++]=128|r>>12&63,s[n++]=128|r>>6&63,s[n++]=128|63&r);else for(n=this.start;o<i&&n<64;++o)r=e.charCodeAt(o),t||r<128?a[n>>2]|=r<<SHIFT[3&n++]:r<2048?(a[n>>2]|=(192|r>>6)<<SHIFT[3&n++],a[n>>2]|=(128|63&r)<<SHIFT[3&n++]):r<55296||r>=57344?(a[n>>2]|=(224|r>>12)<<SHIFT[3&n++],a[n>>2]|=(128|r>>6&63)<<SHIFT[3&n++],a[n>>2]|=(128|63&r)<<SHIFT[3&n++]):(r=65536+((1023&r)<<10|1023&e.charCodeAt(++o)),a[n>>2]|=(240|r>>18)<<SHIFT[3&n++],a[n>>2]|=(128|r>>12&63)<<SHIFT[3&n++],a[n>>2]|=(128|r>>6&63)<<SHIFT[3&n++],a[n>>2]|=(128|63&r)<<SHIFT[3&n++]);this.lastByteIndex=n,this.bytes+=n-this.start,n>=64?(this.start=n-64,this.hash(),this.hashed=!0):this.start=n}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[t>>2]|=EXTRA[3&t],t>=56&&(this.hashed||this.hash(),e[0]=e[16],e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.bytes<<3,e[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var e,t,r,n,o,i,a=this.blocks;this.first?t=((t=((e=((e=a[0]-680876937)<<7|e>>>25)-271733879<<0)^(r=((r=(-271733879^(n=((n=(-1732584194^2004318071&e)+a[1]-117830708)<<12|n>>>20)+e<<0)&(-271733879^e))+a[2]-1126478375)<<17|r>>>15)+n<<0)&(n^e))+a[3]-1316259209)<<22|t>>>10)+r<<0:(e=this.h0,t=this.h1,r=this.h2,t=((t+=((e=((e+=((n=this.h3)^t&(r^n))+a[0]-680876936)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+a[1]-389564586)<<12|n>>>20)+e<<0)&(e^t))+a[2]+606105819)<<17|r>>>15)+n<<0)&(n^e))+a[3]-1044525330)<<22|t>>>10)+r<<0),t=((t+=((e=((e+=(n^t&(r^n))+a[4]-176418897)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+a[5]+1200080426)<<12|n>>>20)+e<<0)&(e^t))+a[6]-1473231341)<<17|r>>>15)+n<<0)&(n^e))+a[7]-45705983)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(n^t&(r^n))+a[8]+1770035416)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+a[9]-1958414417)<<12|n>>>20)+e<<0)&(e^t))+a[10]-42063)<<17|r>>>15)+n<<0)&(n^e))+a[11]-1990404162)<<22|t>>>10)+r<<0,t=((t+=((e=((e+=(n^t&(r^n))+a[12]+1804603682)<<7|e>>>25)+t<<0)^(r=((r+=(t^(n=((n+=(r^e&(t^r))+a[13]-40341101)<<12|n>>>20)+e<<0)&(e^t))+a[14]-1502002290)<<17|r>>>15)+n<<0)&(n^e))+a[15]+1236535329)<<22|t>>>10)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+a[1]-165796510)<<5|e>>>27)+t<<0)^t))+a[6]-1069501632)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+a[11]+643717713)<<14|r>>>18)+n<<0)^n))+a[0]-373897302)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+a[5]-701558691)<<5|e>>>27)+t<<0)^t))+a[10]+38016083)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+a[15]-660478335)<<14|r>>>18)+n<<0)^n))+a[4]-405537848)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+a[9]+568446438)<<5|e>>>27)+t<<0)^t))+a[14]-1019803690)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+a[3]-187363961)<<14|r>>>18)+n<<0)^n))+a[8]+1163531501)<<20|t>>>12)+r<<0,t=((t+=((n=((n+=(t^r&((e=((e+=(r^n&(t^r))+a[13]-1444681467)<<5|e>>>27)+t<<0)^t))+a[2]-51403784)<<9|n>>>23)+e<<0)^e&((r=((r+=(e^t&(n^e))+a[7]+1735328473)<<14|r>>>18)+n<<0)^n))+a[12]-1926607734)<<20|t>>>12)+r<<0,t=((t+=((i=(n=((n+=((o=t^r)^(e=((e+=(o^n)+a[5]-378558)<<4|e>>>28)+t<<0))+a[8]-2022574463)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[11]+1839030562)<<16|r>>>16)+n<<0))+a[14]-35309556)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((o=t^r)^(e=((e+=(o^n)+a[1]-1530992060)<<4|e>>>28)+t<<0))+a[4]+1272893353)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[7]-155497632)<<16|r>>>16)+n<<0))+a[10]-1094730640)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((o=t^r)^(e=((e+=(o^n)+a[13]+681279174)<<4|e>>>28)+t<<0))+a[0]-358537222)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[3]-722521979)<<16|r>>>16)+n<<0))+a[6]+76029189)<<23|t>>>9)+r<<0,t=((t+=((i=(n=((n+=((o=t^r)^(e=((e+=(o^n)+a[9]-640364487)<<4|e>>>28)+t<<0))+a[12]-421815835)<<11|n>>>21)+e<<0)^e)^(r=((r+=(i^t)+a[15]+530742520)<<16|r>>>16)+n<<0))+a[2]-995338651)<<23|t>>>9)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+a[0]-198630844)<<6|e>>>26)+t<<0)|~r))+a[7]+1126891415)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+a[14]-1416354905)<<15|r>>>17)+n<<0)|~e))+a[5]-57434055)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+a[12]+1700485571)<<6|e>>>26)+t<<0)|~r))+a[3]-1894986606)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+a[10]-1051523)<<15|r>>>17)+n<<0)|~e))+a[1]-2054922799)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+a[8]+1873313359)<<6|e>>>26)+t<<0)|~r))+a[15]-30611744)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+a[6]-1560198380)<<15|r>>>17)+n<<0)|~e))+a[13]+1309151649)<<21|t>>>11)+r<<0,t=((t+=((n=((n+=(t^((e=((e+=(r^(t|~n))+a[4]-145523070)<<6|e>>>26)+t<<0)|~r))+a[11]-1120210379)<<10|n>>>22)+e<<0)^((r=((r+=(e^(n|~t))+a[2]+718787259)<<15|r>>>17)+n<<0)|~e))+a[9]-343485551)<<21|t>>>11)+r<<0,this.first?(this.h0=e+1732584193<<0,this.h1=t-271733879<<0,this.h2=r-1732584194<<0,this.h3=n+271733878<<0,this.first=!1):(this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+n<<0)},Md5.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,n=this.h3;return HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(e){if("hex"===e)return this.hex();this.finalize();var t=this.h0,r=this.h1,n=this.h2,o=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&o,o>>8&255,o>>16&255,o>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(16),t=new Uint32Array(e);return t[0]=this.h0,t[1]=this.h1,t[2]=this.h2,t[3]=this.h3,e},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var e,t,r,n="",o=this.array(),i=0;i<15;)e=o[i++],t=o[i++],r=o[i++],n+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[63&(e<<4|t>>>4)]+BASE64_ENCODE_CHAR[63&(t<<2|r>>>6)]+BASE64_ENCODE_CHAR[63&r];return e=o[i],n+=BASE64_ENCODE_CHAR[e>>>2]+BASE64_ENCODE_CHAR[e<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(/*! ./../node_modules/process/browser.js */"./node_modules/process/browser.js"),__webpack_require__(/*! ./../node_modules/webpack/buildin/global.js */"./node_modules/webpack/buildin/global.js"),__webpack_require__(/*! ./../node_modules/webpack/buildin/module.js */"./node_modules/webpack/buildin/module.js")(module))},"./lib/request.js":
  26. /*!************************!*\
  27. !*** ./lib/request.js ***!
  28. \************************/
  29. /*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),o=function(e){switch(n(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},i=function(e,t,r){var n={};return t.getAllResponseHeaders().trim().split("\n").forEach(function(e){if(e){var t=e.indexOf(":"),r=e.substr(0,t).trim().toLowerCase(),o=e.substr(t+1).trim();n[r]=o}}),{error:e,statusCode:t.status,statusMessage:t.statusText,headers:n,body:r}},a=function(e,t){return t||"text"!==t?e.response:e.responseText};e.exports=function(e,t){var r,s,c,u,l=(e.method||"GET").toUpperCase(),d=e.url;if(e.qs){var p=(r=e.qs,s=s||"&",c=c||"=",null===r&&(r=void 0),"object"===n(r)?Object.keys(r).map(function(e){var t=encodeURIComponent(o(e))+c;return Array.isArray(r[e])?r[e].map(function(e){return t+encodeURIComponent(o(e))}).join(s):t+encodeURIComponent(o(r[e]))}).filter(Boolean).join(s):u?encodeURIComponent(o(u))+c+encodeURIComponent(o(r)):"");p&&(d+=(-1===d.indexOf("?")?"?":"&")+p)}var f=new XMLHttpRequest;if(f.open(l,d,!0),f.responseType=e.dataType||"text",e.xhrFields)for(var h in e.xhrFields)f[h]=e.xhrFields[h];var m=e.headers;if(m)for(var g in m)m.hasOwnProperty(g)&&"content-length"!==g.toLowerCase()&&"user-agent"!==g.toLowerCase()&&"origin"!==g.toLowerCase()&&"host"!==g.toLowerCase()&&f.setRequestHeader(g,m[g]);return e.onProgress&&f.upload&&(f.upload.onprogress=e.onProgress),e.onDownloadProgress&&(f.onprogress=e.onDownloadProgress),e.timeout&&(f.timeout=e.timeout),f.ontimeout=function(e){var r=new Error("timeout");t(i(r,f))},f.onload=function(){t(i(null,f,a(f,e.dataType)))},f.onerror=function(r){var n=a(f,e.dataType);if(n)t(i(null,f,n));else{var o=f.statusText;o||0!==f.status||(o=new Error("CORS blocked or network error")),t(i(o,f,n))}},f.send(e.body||""),f}},"./lib/xml2json.js":
  30. /*!*************************!*\
  31. !*** ./lib/xml2json.js ***!
  32. \*************************/
  33. /*! no static exports found */function(e,t,r){var n=r(/*! @xmldom/xmldom */"./node_modules/@xmldom/xmldom/lib/index.js").DOMParser,o=function(){this.version="1.3.5";var e={mergeCDATA:!0,normalize:!0,stripElemPrefix:!0},t=new RegExp(/(?!xmlns)^.*:/);new RegExp(/^\s+|\s+$/g);return this.grokType=function(e){return/^\s*$/.test(e)?null:/^(?:true|false)$/i.test(e)?"true"===e.toLowerCase():isFinite(e)?parseFloat(e):e},this.parseString=function(e,t){if(e){var r=this.stringToXML(e);return r.getElementsByTagName("parsererror").length?null:this.parseXML(r,t)}return null},this.parseXML=function(r,n){for(var i in n)e[i]=n[i];var a={},s=0,c="";if(r.childNodes.length)for(var u,l,d,p=0;p<r.childNodes.length;p++)4===(u=r.childNodes.item(p)).nodeType?e.mergeCDATA&&(c+=u.nodeValue):3===u.nodeType?c+=u.nodeValue:1===u.nodeType&&(0===s&&(a={}),l=e.stripElemPrefix?u.nodeName.replace(t,""):u.nodeName,d=o.parseXML(u),a.hasOwnProperty(l)?(a[l].constructor!==Array&&(a[l]=[a[l]]),a[l].push(d)):(a[l]=d,s++));return Object.keys(a).length||(a=c||""),a},this.xmlToString=function(e){try{return e.xml?e.xml:(new XMLSerializer).serializeToString(e)}catch(e){return null}},this.stringToXML=function(e){try{var t=null;return window.DOMParser?t=(new n).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async=!1,t.loadXML(e),t)}catch(e){return null}},this}.call({});e.exports=function(e){return o.parseString(e)}},"./node_modules/@babel/runtime/helpers/classCallCheck.js":
  34. /*!***************************************************************!*\
  35. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  36. \***************************************************************/
  37. /*! no static exports found */function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/createClass.js":
  38. /*!************************************************************!*\
  39. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  40. \************************************************************/
  41. /*! no static exports found */function(e,t,r){var n=r(/*! ./toPropertyKey.js */"./node_modules/@babel/runtime/helpers/toPropertyKey.js");function o(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}e.exports=function(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPrimitive.js":
  42. /*!************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  44. \************************************************************/
  45. /*! no static exports found */function(e,t,r){var n=r(/*! ./typeof.js */"./node_modules/@babel/runtime/helpers/typeof.js").default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toPropertyKey.js":
  46. /*!**************************************************************!*\
  47. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  48. \**************************************************************/
  49. /*! no static exports found */function(e,t,r){var n=r(/*! ./typeof.js */"./node_modules/@babel/runtime/helpers/typeof.js").default,o=r(/*! ./toPrimitive.js */"./node_modules/@babel/runtime/helpers/toPrimitive.js");e.exports=function(e){var t=o(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":
  50. /*!*******************************************************!*\
  51. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  52. \*******************************************************/
  53. /*! no static exports found */function(e,t){function r(t){"@babel/helpers - typeof";return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@xmldom/xmldom/lib/conventions.js":
  54. /*!********************************************************!*\
  55. !*** ./node_modules/@xmldom/xmldom/lib/conventions.js ***!
  56. \********************************************************/
  57. /*! no static exports found */function(e,t,r){"use strict";function n(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var o=n({HTML:"text/html",isHTML:function(e){return e===o.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),i=n({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===i.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});t.assign=function(e,t){if(null===e||"object"!=typeof e)throw new TypeError("target is not an object");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.find=function(e,t,r){if(void 0===r&&(r=Array.prototype),e&&"function"==typeof r.find)return r.find.call(e,t);for(var n=0;n<e.length;n++)if(Object.prototype.hasOwnProperty.call(e,n)){var o=e[n];if(t.call(void 0,o,n,e))return o}},t.freeze=n,t.MIME_TYPE=o,t.NAMESPACE=i},"./node_modules/@xmldom/xmldom/lib/dom-parser.js":
  58. /*!*******************************************************!*\
  59. !*** ./node_modules/@xmldom/xmldom/lib/dom-parser.js ***!
  60. \*******************************************************/
  61. /*! no static exports found */function(e,t,r){var n=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js"),o=r(/*! ./dom */"./node_modules/@xmldom/xmldom/lib/dom.js"),i=r(/*! ./entities */"./node_modules/@xmldom/xmldom/lib/entities.js"),a=r(/*! ./sax */"./node_modules/@xmldom/xmldom/lib/sax.js"),s=o.DOMImplementation,c=n.NAMESPACE,u=a.ParseError,l=a.XMLReader;function d(e){return e.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function p(e){this.options=e||{locator:{}}}function f(){this.cdata=!1}function h(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function m(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function g(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function v(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}p.prototype.parseFromString=function(e,t){var r=this.options,n=new l,o=r.domBuilder||new f,a=r.errorHandler,s=r.locator,u=r.xmlns||{},p=/\/x?html?$/.test(t),h=p?i.HTML_ENTITIES:i.XML_ENTITIES;s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof f)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+m(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(a,o,s),n.domBuilder=r.domBuilder||o,p&&(u[""]=c.HTML),u.xml=u.xml||c.XML;var g=r.normalizeLineEndings||d;return e&&"string"==typeof e?n.parse(g(e),u,h):n.errorHandler.error("invalid doc source"),o.doc},f.prototype={startDocument:function(){this.doc=(new s).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),a=n.length;v(this,i),this.currentElement=i,this.locator&&h(this.locator,i);for(var s=0;s<a;s++){e=n.getURI(s);var c=n.getValue(s),u=(r=n.getQName(s),o.createAttributeNS(e,r));this.locator&&h(n.getLocator(s),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&h(this.locator,r),v(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=g.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&h(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=g.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&h(this.locator,n),v(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&h(this.locator,o),v(this,o),this.doc.doctype=o}},warning:function(e){console.warn("[xmldom warning]\t"+e,m(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,m(this.locator))},fatalError:function(e){throw new u(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){f.prototype[e]=function(){return null}}),t.__DOMHandler=f,t.normalizeLineEndings=d,t.DOMParser=p},"./node_modules/@xmldom/xmldom/lib/dom.js":
  62. /*!************************************************!*\
  63. !*** ./node_modules/@xmldom/xmldom/lib/dom.js ***!
  64. \************************************************/
  65. /*! no static exports found */function(e,t,r){var n=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js"),o=n.find,i=n.NAMESPACE;function a(e){return""!==e}function s(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function c(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(a):[]}(e);return Object.keys(t.reduce(s,{}))}function u(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function l(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,u(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),r.constructor=e)}var d={},p=d.ELEMENT_NODE=1,f=d.ATTRIBUTE_NODE=2,h=d.TEXT_NODE=3,m=d.CDATA_SECTION_NODE=4,g=d.ENTITY_REFERENCE_NODE=5,v=d.ENTITY_NODE=6,y=d.PROCESSING_INSTRUCTION_NODE=7,b=d.COMMENT_NODE=8,k=d.DOCUMENT_NODE=9,S=d.DOCUMENT_TYPE_NODE=10,C=d.DOCUMENT_FRAGMENT_NODE=11,w=d.NOTATION_NODE=12,x={},E={},A=(x.INDEX_SIZE_ERR=(E[1]="Index size error",1),x.DOMSTRING_SIZE_ERR=(E[2]="DOMString size error",2),x.HIERARCHY_REQUEST_ERR=(E[3]="Hierarchy request error",3)),T=(x.WRONG_DOCUMENT_ERR=(E[4]="Wrong document",4),x.INVALID_CHARACTER_ERR=(E[5]="Invalid character",5),x.NO_DATA_ALLOWED_ERR=(E[6]="No data allowed",6),x.NO_MODIFICATION_ALLOWED_ERR=(E[7]="No modification allowed",7),x.NOT_FOUND_ERR=(E[8]="Not found",8)),R=(x.NOT_SUPPORTED_ERR=(E[9]="Not supported",9),x.INUSE_ATTRIBUTE_ERR=(E[10]="Attribute in use",10));x.INVALID_STATE_ERR=(E[11]="Invalid state",11),x.SYNTAX_ERR=(E[12]="Syntax error",12),x.INVALID_MODIFICATION_ERR=(E[13]="Invalid modification",13),x.NAMESPACE_ERR=(E[14]="Invalid namespace",14),x.INVALID_ACCESS_ERR=(E[15]="Invalid access",15);function _(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,E[e]),this.message=E[e],Error.captureStackTrace&&Error.captureStackTrace(this,_);return r.code=e,t&&(this.message=this.message+": "+t),r}function O(){}function P(e,t){this._node=e,this._refresh=t,I(this)}function I(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!==t){var r=e._refresh(e._node);if(ge(e,"length",r.length),!e.$$length||r.length<e.$$length)for(var n=r.length;n in e;n++)Object.prototype.hasOwnProperty.call(e,n)&&delete e[n];u(r,e),e._inc=t}}function B(){}function D(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function N(e,t,r,n){if(n?t[D(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&F(o,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===i.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function L(e,t,r){var n=D(t,r);if(!(n>=0))throw new _(T,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(F(i,e,r),r.ownerElement=null)}}function j(){}function U(){}function M(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function q(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(q(e,t))return!0}while(e=e.nextSibling)}function H(){this.ownerDocument=this}function F(e,t,r,n){e&&e._inc++,r.namespaceURI===i.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function K(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i,delete n[n.length]}}}function V(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,K(e.ownerDocument,e),t}function z(e){return e&&e.nodeType===U.DOCUMENT_TYPE_NODE}function G(e){return e&&e.nodeType===U.ELEMENT_NODE}function $(e){return e&&e.nodeType===U.TEXT_NODE}function W(e,t){var r=e.childNodes||[];if(o(r,G)||z(t))return!1;var n=o(r,z);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function J(e,t){var r=e.childNodes||[];if(o(r,function(e){return G(e)&&e!==t}))return!1;var n=o(r,z);return!(t&&n&&r.indexOf(n)>r.indexOf(t))}function X(e,t,r){if(!function(e){return e&&(e.nodeType===U.DOCUMENT_NODE||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.ELEMENT_NODE)}(e))throw new _(A,"Unexpected parent node type "+e.nodeType);if(r&&r.parentNode!==e)throw new _(T,"child not in parent");if(!function(e){return e&&(G(e)||$(e)||z(e)||e.nodeType===U.DOCUMENT_FRAGMENT_NODE||e.nodeType===U.COMMENT_NODE||e.nodeType===U.PROCESSING_INSTRUCTION_NODE)}(t)||z(t)&&e.nodeType!==U.DOCUMENT_NODE)throw new _(A,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function Q(e,t,r){var n=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=i.filter(G);if(a.length>1||o(i,$))throw new _(A,"More than one element or text in fragment");if(1===a.length&&!J(e,r))throw new _(A,"Element in fragment can not be inserted before doctype")}if(G(t)&&!J(e,r))throw new _(A,"Only one element can be added and only after doctype");if(z(t)){if(o(n,function(e){return z(e)&&e!==r}))throw new _(A,"Only one doctype is allowed");var s=o(n,G);if(r&&n.indexOf(s)<n.indexOf(r))throw new _(A,"Doctype can only be inserted before an element")}}function Y(e,t,r,n){X(e,t,r),e.nodeType===U.DOCUMENT_NODE&&(n||function(e,t,r){var n=e.childNodes||[],i=t.childNodes||[];if(t.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=i.filter(G);if(a.length>1||o(i,$))throw new _(A,"More than one element or text in fragment");if(1===a.length&&!W(e,r))throw new _(A,"Element in fragment can not be inserted before doctype")}if(G(t)&&!W(e,r))throw new _(A,"Only one element can be added and only after doctype");if(z(t)){if(o(n,z))throw new _(A,"Only one doctype is allowed");var s=o(n,G);if(r&&n.indexOf(s)<n.indexOf(r))throw new _(A,"Doctype can only be inserted before an element");if(!r&&s)throw new _(A,"Doctype can not be appended since element is present")}})(e,t,r);var i=t.parentNode;if(i&&i.removeChild(t),t.nodeType===C){var a=t.firstChild;if(null==a)return t;var s=t.lastChild}else a=s=t;var c=r?r.previousSibling:e.lastChild;a.previousSibling=c,s.nextSibling=r,c?c.nextSibling=a:e.firstChild=a,null==r?e.lastChild=s:r.previousSibling=s;do{a.parentNode=e}while(a!==s&&(a=a.nextSibling));return K(e.ownerDocument||e,e),t.nodeType==C&&(t.firstChild=t.lastChild=null),t}function Z(){this._nsMap={}}function ee(){}function te(){}function re(){}function ne(){}function oe(){}function ie(){}function ae(){}function se(){}function ce(){}function ue(){}function le(){}function de(){}function pe(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var a=[{namespace:i,prefix:null}];return me(this,r,e,t,a),r.join("")}function fe(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===i.XML||o===i.XMLNS)return!1;for(var a=r.length;a--;){var s=r[a];if(s.prefix===n)return s.namespace!==o}return!0}function he(e,t,r){e.push(" ",t,'="',r.replace(/[<>&"\t\n\r]/g,M),'"')}function me(e,t,r,n,o){if(o||(o=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case p:var a=e.attributes,s=a.length,c=e.firstChild,u=e.tagName,l=u;if(!(r=i.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var d,v=0;v<a.length;v++)if("xmlns"===a.item(v).name){d=a.item(v).value;break}if(!d)for(var w=o.length-1;w>=0;w--){if(""===(x=o[w]).prefix&&x.namespace===e.namespaceURI){d=x.namespace;break}}if(d!==e.namespaceURI)for(w=o.length-1;w>=0;w--){var x;if((x=o[w]).namespace===e.namespaceURI){x.prefix&&(l=x.prefix+":"+u);break}}}t.push("<",l);for(var E=0;E<s;E++){"xmlns"==(A=a.item(E)).prefix?o.push({prefix:A.localName,namespace:A.value}):"xmlns"==A.nodeName&&o.push({prefix:"",namespace:A.value})}for(E=0;E<s;E++){var A;if(fe(A=a.item(E),0,o)){var T=A.prefix||"",R=A.namespaceURI;he(t,T?"xmlns:"+T:"xmlns",R),o.push({prefix:T,namespace:R})}me(A,t,r,n,o)}if(u===l&&fe(e,0,o)){T=e.prefix||"",R=e.namespaceURI;he(t,T?"xmlns:"+T:"xmlns",R),o.push({prefix:T,namespace:R})}if(c||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),r&&/^script$/i.test(u))for(;c;)c.data?t.push(c.data):me(c,t,r,n,o.slice()),c=c.nextSibling;else for(;c;)me(c,t,r,n,o.slice()),c=c.nextSibling;t.push("</",l,">")}else t.push("/>");return;case k:case C:for(c=e.firstChild;c;)me(c,t,r,n,o.slice()),c=c.nextSibling;return;case f:return he(t,e.name,e.value);case h:return t.push(e.data.replace(/[<&>]/g,M));case m:return t.push("<![CDATA[",e.data,"]]>");case b:return t.push("\x3c!--",e.data,"--\x3e");case S:var _=e.publicId,O=e.systemId;if(t.push("<!DOCTYPE ",e.name),_)t.push(" PUBLIC ",_),O&&"."!=O&&t.push(" ",O),t.push(">");else if(O&&"."!=O)t.push(" SYSTEM ",O,">");else{var P=e.internalSubset;P&&t.push(" [",P,"]"),t.push(">")}return;case y:return t.push("<?",e.target," ",e.data,"?>");case g:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function ge(e,t,r){e[t]=r}_.prototype=Error.prototype,u(x,_),O.prototype={length:0,item:function(e){return e>=0&&e<this.length?this[e]:null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)me(this[n],r,e,t);return r.join("")},filter:function(e){return Array.prototype.filter.call(this,e)},indexOf:function(e){return Array.prototype.indexOf.call(this,e)}},P.prototype.item=function(e){return I(this),this[e]||null},l(P,O),B.prototype={length:0,item:O.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new _(R);var r=this.getNamedItem(e.nodeName);return N(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new _(R);return t=this.getNamedItemNS(e.namespaceURI,e.localName),N(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return L(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return L(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},j.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new H;if(n.implementation=this,n.childNodes=new O,n.doctype=r||null,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new ie;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},U.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Y(this,e,t)},replaceChild:function(e,t){Y(this,e,t,Q),t&&this.removeChild(t)},removeChild:function(e){return V(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,r,n){var o=new r.constructor;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var a=r[i];"object"!=typeof a&&a!=o[i]&&(o[i]=a)}r.childNodes&&(o.childNodes=new O);o.ownerDocument=t;switch(o.nodeType){case p:var s=r.attributes,c=o.attributes=new B,u=s.length;c._ownerElement=o;for(var l=0;l<u;l++)o.setAttributeNode(e(t,s.item(l),!0));break;case f:n=!0}if(n)for(var d=r.firstChild;d;)o.appendChild(e(t,d,n)),d=d.nextSibling;return o}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==h&&e.nodeType==h?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&r[n]===e)return n;t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&Object.prototype.hasOwnProperty.call(r,e))return r[e];t=t.nodeType==f?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},u(d,U),u(d,U.prototype),H.prototype={nodeName:"#document",nodeType:k,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==C){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return Y(this,e,t),e.ownerDocument=this,null===this.documentElement&&e.nodeType===p&&(this.documentElement=e),e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),V(this,e)},replaceChild:function(e,t){Y(this,e,t,Q),e.ownerDocument=this,t&&this.removeChild(t),G(e)&&(this.documentElement=e)},importNode:function(e,t){return function e(t,r,n){var o;switch(r.nodeType){case p:(o=r.cloneNode(!1)).ownerDocument=t;case C:break;case f:n=!0}o||(o=r.cloneNode(!1));o.ownerDocument=t;o.parentNode=null;if(n)for(var i=r.firstChild;i;)o.appendChild(e(t,i,n)),i=i.nextSibling;return o}(this,e,t)},getElementById:function(e){var t=null;return q(this.documentElement,function(r){if(r.nodeType==p&&r.getAttribute("id")==e)return t=r,!0}),t},getElementsByClassName:function(e){var t=c(e);return new P(this,function(r){var n=[];return t.length>0&&q(r.documentElement,function(o){if(o!==r&&o.nodeType===p){var i=o.getAttribute("class");if(i){var a=e===i;if(!a){var s=c(i);a=t.every((u=s,function(e){return u&&-1!==u.indexOf(e)}))}a&&n.push(o)}}var u}),n})},createElement:function(e){var t=new Z;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new O,(t.attributes=new B)._ownerElement=t,t},createDocumentFragment:function(){var e=new ue;return e.ownerDocument=this,e.childNodes=new O,e},createTextNode:function(e){var t=new re;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new ne;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new oe;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new le;return r.ownerDocument=this,r.tagName=r.nodeName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new ee;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ce;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new Z,n=t.split(":"),o=r.attributes=new B;return r.childNodes=new O,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new ee,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},l(H,U),Z.prototype={nodeType:p,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===C?this.insertBefore(e,null):function(e,t){return t.parentNode&&t.parentNode.removeChild(t),t.parentNode=e,t.previousSibling=e.lastChild,t.nextSibling=null,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,e.lastChild=t,K(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new P(this,function(t){var r=[];return q(t,function(n){n===t||n.nodeType!=p||"*"!==e&&n.tagName!=e||r.push(n)}),r})},getElementsByTagNameNS:function(e,t){return new P(this,function(r){var n=[];return q(r,function(o){o===r||o.nodeType!==p||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)}),n})}},H.prototype.getElementsByTagName=Z.prototype.getElementsByTagName,H.prototype.getElementsByTagNameNS=Z.prototype.getElementsByTagNameNS,l(Z,U),ee.prototype.nodeType=f,l(ee,U),te.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(E[A])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},l(te,U),re.prototype={nodeName:"#text",nodeType:h,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},l(re,te),ne.prototype={nodeName:"#comment",nodeType:b},l(ne,te),oe.prototype={nodeName:"#cdata-section",nodeType:m},l(oe,te),ie.prototype.nodeType=S,l(ie,U),ae.prototype.nodeType=w,l(ae,U),se.prototype.nodeType=v,l(se,U),ce.prototype.nodeType=g,l(ce,U),ue.prototype.nodeName="#document-fragment",ue.prototype.nodeType=C,l(ue,U),le.prototype.nodeType=y,l(le,U),de.prototype.serializeToString=function(e,t,r){return pe.call(e,t,r)},U.prototype.toString=pe;try{if(Object.defineProperty){Object.defineProperty(P.prototype,"length",{get:function(){return I(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case p:case C:var r=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&r.push(e(t)),t=t.nextSibling;return r.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case p:case C:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),ge=function(e,t,r){e["$$"+t]=r}}}catch(e){}t.DocumentType=ie,t.DOMException=_,t.DOMImplementation=j,t.Element=Z,t.Node=U,t.NodeList=O,t.XMLSerializer=de},"./node_modules/@xmldom/xmldom/lib/entities.js":
  66. /*!*****************************************************!*\
  67. !*** ./node_modules/@xmldom/xmldom/lib/entities.js ***!
  68. \*****************************************************/
  69. /*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js").freeze;t.XML_ENTITIES=n({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),t.HTML_ENTITIES=n({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),t.entityMap=t.HTML_ENTITIES},"./node_modules/@xmldom/xmldom/lib/index.js":
  70. /*!**************************************************!*\
  71. !*** ./node_modules/@xmldom/xmldom/lib/index.js ***!
  72. \**************************************************/
  73. /*! no static exports found */function(e,t,r){var n=r(/*! ./dom */"./node_modules/@xmldom/xmldom/lib/dom.js");t.DOMImplementation=n.DOMImplementation,t.XMLSerializer=n.XMLSerializer,t.DOMParser=r(/*! ./dom-parser */"./node_modules/@xmldom/xmldom/lib/dom-parser.js").DOMParser},"./node_modules/@xmldom/xmldom/lib/sax.js":
  74. /*!************************************************!*\
  75. !*** ./node_modules/@xmldom/xmldom/lib/sax.js ***!
  76. \************************************************/
  77. /*! no static exports found */function(e,t,r){var n=r(/*! ./conventions */"./node_modules/@xmldom/xmldom/lib/conventions.js").NAMESPACE,o=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+o.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),a=new RegExp("^"+o.source+i.source+"*(?::"+o.source+i.source+"*)?$"),s=0,c=1,u=2,l=3,d=4,p=5,f=6,h=7;function m(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,m)}function g(){}function v(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function y(e,t,r,o,i,a){function m(e,t,n){r.attributeNames.hasOwnProperty(e)&&a.fatalError("Attribute "+e+" redefined"),r.addValue(e,t.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,i),n)}for(var g,v=++t,y=s;;){var b=e.charAt(v);switch(b){case"=":if(y===c)g=e.slice(t,v),y=l;else{if(y!==u)throw new Error("attribute equal must after attrName");y=l}break;case"'":case'"':if(y===l||y===c){if(y===c&&(a.warning('attribute value must after "="'),g=e.slice(t,v)),t=v+1,!((v=e.indexOf(b,t))>0))throw new Error("attribute value no end '"+b+"' match");m(g,k=e.slice(t,v),t-1),y=p}else{if(y!=d)throw new Error('attribute value must after "="');m(g,k=e.slice(t,v),t),a.warning('attribute "'+g+'" missed start quot('+b+")!!"),t=v+1,y=p}break;case"/":switch(y){case s:r.setTagName(e.slice(t,v));case p:case f:case h:y=h,r.closed=!0;case d:case c:break;case u:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),y==s&&r.setTagName(e.slice(t,v)),v;case">":switch(y){case s:r.setTagName(e.slice(t,v));case p:case f:case h:break;case d:case c:"/"===(k=e.slice(t,v)).slice(-1)&&(r.closed=!0,k=k.slice(0,-1));case u:y===u&&(k=g),y==d?(a.warning('attribute "'+k+'" missed quot(")!'),m(g,k,t)):(n.isHTML(o[""])&&k.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+k+'" missed value!! "'+k+'" instead!!'),m(k,k,t));break;case l:throw new Error("attribute value missed!!")}return v;case"€":b=" ";default:if(b<=" ")switch(y){case s:r.setTagName(e.slice(t,v)),y=f;break;case c:g=e.slice(t,v),y=u;break;case d:var k=e.slice(t,v);a.warning('attribute "'+k+'" missed quot(")!!'),m(g,k,t);case p:y=f}else switch(y){case u:r.tagName;n.isHTML(o[""])&&g.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),m(g,g,t),t=v,y=c;break;case p:a.warning('attribute space is required"'+g+'"!!');case f:y=c,t=v;break;case l:y=d,t=v;break;case h:throw new Error("elements closed character '/' and '>' must be connected to")}}v++}}function b(e,t,r){for(var o=e.tagName,i=null,a=e.length;a--;){var s=e[a],c=s.qName,u=s.value;if((f=c.indexOf(":"))>0)var l=s.prefix=c.slice(0,f),d=c.slice(f+1),p="xmlns"===l&&d;else d=c,l=null,p="xmlns"===c&&"";s.localName=d,!1!==p&&(null==i&&(i={},C(r,r={})),r[p]=i[p]=u,s.uri=n.XMLNS,t.startPrefixMapping(p,u))}for(a=e.length;a--;){(l=(s=e[a]).prefix)&&("xml"===l&&(s.uri=n.XML),"xmlns"!==l&&(s.uri=r[l||""]))}var f;(f=o.indexOf(":"))>0?(l=e.prefix=o.slice(0,f),d=e.localName=o.slice(f+1)):(l=null,d=e.localName=o);var h=e.uri=r[l||""];if(t.startElement(h,d,o,e),!e.closed)return e.currentNSMap=r,e.localNSMap=i,!0;if(t.endElement(h,d,o),i)for(l in i)Object.prototype.hasOwnProperty.call(i,l)&&t.endPrefixMapping(l)}function k(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),a=e.substring(t+1,i);if(/[&<]/.test(a))return/^script$/i.test(r)?(o.characters(a,0,a.length),i):(a=a.replace(/&#?\w+;/g,n),o.characters(a,0,a.length),i)}return t+1}function S(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function C(e,t){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}function w(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),a=i.length;if(a>1&&/!doctype/i.test(i[0][0])){var s=i[1][0],c=!1,u=!1;a>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=a>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[a-1];return r.startDTD(s,c,u),r.endDTD(),l.index+l[0].length}}return-1}function x(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(o){o[0].length;return r.processingInstruction(o[1],o[2]),n+2}return-1}return-1}function E(){this.attributeNames={}}m.prototype=new Error,m.prototype.name=m.name,g.prototype={parse:function(e,t,r){var o=this.domBuilder;o.startDocument(),C(t,t={}),function(e,t,r,o,i){function a(e){var t=e.slice(1,-1);return Object.hasOwnProperty.call(r,t)?r[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function s(t){if(t>g){var r=e.substring(g,t).replace(/&#?\w+;/g,a);p&&c(g),o.characters(r,0,t-g),g=t}}function c(t,r){for(;t>=l&&(r=d.exec(e));)u=r.index,l=u+r[0].length,p.lineNumber++;p.columnNumber=t-u+1}var u=0,l=0,d=/.*(?:\r\n?|\n)|.*$/g,p=o.locator,f=[{currentNSMap:t}],h={},g=0;for(;;){try{var C=e.indexOf("<",g);if(C<0){if(!e.substr(g).match(/^\s*$/)){var A=o.doc,T=A.createTextNode(e.substr(g));A.appendChild(T),o.currentElement=T}return}switch(C>g&&s(C),e.charAt(C+1)){case"/":var R=e.indexOf(">",C+3),_=e.substring(C+2,R).replace(/[ \t\n\r]+$/g,""),O=f.pop();R<0?(_=e.substring(C+2).replace(/[\s<].*/,""),i.error("end tag name: "+_+" is not complete:"+O.tagName),R=C+1+_.length):_.match(/\s</)&&(_=_.replace(/[\s<].*/,""),i.error("end tag name: "+_+" maybe not complete"),R=C+1+_.length);var P=O.localNSMap,I=O.tagName==_,B=I||O.tagName&&O.tagName.toLowerCase()==_.toLowerCase();if(B){if(o.endElement(O.uri,O.localName,_),P)for(var D in P)Object.prototype.hasOwnProperty.call(P,D)&&o.endPrefixMapping(D);I||i.fatalError("end tag name: "+_+" is not match the current start tagName:"+O.tagName)}else f.push(O);R++;break;case"?":p&&c(C),R=x(e,C,o);break;case"!":p&&c(C),R=w(e,C,o,i);break;default:p&&c(C);var N=new E,L=f[f.length-1].currentNSMap,R=y(e,C,N,L,a,i),j=N.length;if(!N.closed&&S(e,R,N.tagName,h)&&(N.closed=!0,r.nbsp||i.warning("unclosed xml attribute")),p&&j){for(var U=v(p,{}),M=0;M<j;M++){var q=N[M];c(q.offset),q.locator=v(p,{})}o.locator=U,b(N,o,L)&&f.push(N),o.locator=p}else b(N,o,L)&&f.push(N);n.isHTML(N.uri)&&!N.closed?R=k(e,R,N.tagName,a,o):R++}}catch(e){if(e instanceof m)throw e;i.error("element parse error: "+e),R=-1}R>g?g=R:s(Math.max(C,g)+1)}}(e,t,r,o,this.errorHandler),o.endDocument()}},E.prototype={setTagName:function(e){if(!a.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!a.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},t.XMLReader=g,t.ParseError=m},"./node_modules/process/browser.js":
  78. /*!*****************************************!*\
  79. !*** ./node_modules/process/browser.js ***!
  80. \*****************************************/
  81. /*! no static exports found */function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,u=[],l=!1,d=-1;function p(){l&&c&&(l=!1,c.length?u=c.concat(u):d=-1,u.length&&f())}function f(){if(!l){var e=s(p);l=!0;for(var t=u.length;t;){for(c=u,u=[];++d<t;)c&&c[d].run();d=-1,t=u.length}c=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new h(e,t)),1!==u.length||l||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},"./node_modules/webpack/buildin/amd-options.js":
  82. /*!****************************************!*\
  83. !*** (webpack)/buildin/amd-options.js ***!
  84. \****************************************/
  85. /*! no static exports found */function(e,t){(function(t){e.exports=t}).call(this,{})},"./node_modules/webpack/buildin/global.js":
  86. /*!***********************************!*\
  87. !*** (webpack)/buildin/global.js ***!
  88. \***********************************/
  89. /*! no static exports found */function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},"./node_modules/webpack/buildin/module.js":
  90. /*!***********************************!*\
  91. !*** (webpack)/buildin/module.js ***!
  92. \***********************************/
  93. /*! no static exports found */function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./package.json":
  94. /*!**********************!*\
  95. !*** ./package.json ***!
  96. \**********************/
  97. /*! exports provided: name, version, description, main, types, scripts, repository, keywords, author, license, bugs, homepage, dependencies, devDependencies, default */function(e){e.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.4.21","description":"JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)","main":"dist/cos-js-sdk-v5.js","types":"index.d.ts","scripts":{"prettier":"prettier --write src demo/demo.js test/test.js server/sts.js index.d.ts","server":"node server/sts.js","dev":"cross-env NODE_ENV=development webpack -w --mode=development","build":"cross-env NODE_ENV=production webpack --mode=production","cos-auth.min.js":"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m","test":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/tencentyun/cos-js-sdk-v5.git"},"keywords":[],"author":"carsonxu","license":"ISC","bugs":{"url":"https://github.com/tencentyun/cos-js-sdk-v5/issues"},"homepage":"https://github.com/tencentyun/cos-js-sdk-v5#readme","dependencies":{"@xmldom/xmldom":"^0.8.6"},"devDependencies":{"@babel/core":"7.17.9","@babel/plugin-transform-runtime":"7.18.10","@babel/preset-env":"7.16.11","babel-loader":"8.2.5","body-parser":"^1.18.3","cross-env":"^5.2.0","express":"^4.16.4","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","prettier":"^3.0.1","qcloud-cos-sts":"^3.0.2","request":"^2.87.0","terser-webpack-plugin":"4.2.3","uglifyjs":"^2.4.11","webpack":"4.46.0","webpack-cli":"4.10.0"}}')},"./src/advance.js":
  98. /*!************************!*\
  99. !*** ./src/advance.js ***!
  100. \************************/
  101. /*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),o=r(/*! ./session */"./src/session.js"),i=r(/*! ./async */"./src/async.js"),a=r(/*! ./event */"./src/event.js").EventProxy,s=r(/*! ./util */"./src/util.js"),c=r(/*! ./tracker */"./src/tracker.js");function u(e,t){var r=this,n=[],o={Bucket:e.Bucket,Region:e.Region,Prefix:e.Key,calledBySdk:e.calledBySdk||"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartList(o,function(r,i){if(r)return t(r);n.push.apply(n,i.Upload||[]),"true"===i.IsTruncated?(o.KeyMarker=i.NextKeyMarker,o.UploadIdMarker=i.NextUploadIdMarker,e()):t(null,{UploadList:n})})}()}function l(e,t){var r=this,n=[],o={Bucket:e.Bucket,Region:e.Region,Key:e.Key,UploadId:e.UploadId,calledBySdk:"sliceUploadFile",tracker:e.tracker};!function e(){r.multipartListPart(o,function(r,i){if(r)return t(r);n.push.apply(n,i.Part||[]),"true"===i.IsTruncated?(o.PartNumberMarker=i.NextPartNumberMarker,e()):t(null,{PartList:n})})}()}var d={sliceUploadFile:function(e,t){var r,n,c=this,d=new a,p=e.TaskId,f=e.Bucket,h=e.Region,m=e.Key,g=e.Body,v=e.ChunkSize||e.SliceSize||c.options.ChunkSize,y=e.AsyncLimit,b=e.StorageClass,k=e.ServerSideEncryption,S=e.onHashProgress,C=e.tracker;C&&C.setParams({chunkSize:v}),d.on("error",function(r){if(c._isRunningTask(p))return r.UploadId=e.UploadData.UploadId||"",t(r)}),d.on("upload_complete",function(r){var n=s.extend({UploadId:e.UploadData.UploadId||""},r);t(null,n)}),d.on("upload_slice_complete",function(t){var a={};s.each(e.Headers,function(e,t){var r=t.toLowerCase();0!==r.indexOf("x-cos-meta-")&&"pic-operations"!==r||(a[t]=e)}),function(e,t){var r=e.Bucket,n=e.Region,o=e.Key,a=e.UploadId,s=e.SliceList,c=this,u=this.options.ChunkRetryTimes+1,l=e.Headers,d=s.map(function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}});i.retry(u,function(t){c.multipartComplete({Bucket:r,Region:n,Key:o,UploadId:a,Parts:d,Headers:l,calledBySdk:"sliceUploadFile",tracker:e.tracker},t)},function(e,r){t(e,r)})}.call(c,{Bucket:f,Region:h,Key:m,UploadId:t.UploadId,SliceList:t.SliceList,Headers:a,tracker:C},function(e,i){if(c._isRunningTask(p)){if(o.removeUsing(t.UploadId),e)return n(null,!0),d.emit("error",e);o.removeUploadId.call(c,t.UploadId),n({loaded:r,total:r},!0),d.emit("upload_complete",i)}})}),d.on("get_upload_data_finish",function(t){var a=o.getFileId(g,e.ChunkSize,f,m);a&&o.saveUploadId.call(c,a,t.UploadId,c.options.UploadIdCacheLimit),o.setUsing(t.UploadId),n(null,!0),function(e,t){var r=this,n=e.TaskId,o=e.Bucket,a=e.Region,c=e.Key,u=e.UploadData,l=e.FileSize,d=e.SliceSize,p=Math.min(e.AsyncLimit||r.options.ChunkParallelLimit||1,256),f=e.Body,h=Math.ceil(l/d),m=0,g=e.ServerSideEncryption,v=e.Headers,y=s.filter(u.PartList,function(e){return e.Uploaded&&(m+=e.PartNumber>=h&&l%d||d),!e.Uploaded}),b=e.onProgress;i.eachLimit(y,p,function(t,p){if(r._isRunningTask(n)){var h=t.PartNumber,y=Math.min(l,t.PartNumber*d)-(t.PartNumber-1)*d,k=0;(function(e,t){var r=this,n=e.TaskId,o=e.Bucket,a=e.Region,c=e.Key,u=e.FileSize,l=e.Body,d=1*e.PartNumber,p=e.SliceSize,f=e.ServerSideEncryption,h=e.UploadData,m=e.Headers||{},g=r.options.ChunkRetryTimes+1,v=p*(d-1),y=p,b=v+p;b>u&&(y=(b=u)-v);var k=["x-cos-traffic-limit","x-cos-mime-limit"],S={};s.each(m,function(e,t){k.indexOf(t)>-1&&(S[t]=e)});var C=h.PartList[d-1];i.retry(g,function(t){r._isRunningTask(n)&&s.fileSlice(l,v,b,!0,function(i){r.multipartUpload({TaskId:n,Bucket:o,Region:a,Key:c,ContentLength:y,PartNumber:d,UploadId:h.UploadId,ServerSideEncryption:f,Body:i,Headers:S,onProgress:e.onProgress,calledBySdk:"sliceUploadFile",tracker:e.tracker},function(e,o){if(r._isRunningTask(n))return e?t(e):(C.Uploaded=!0,t(null,o))})})},function(e,o){if(r._isRunningTask(n))return t(e,o)})}).call(r,{TaskId:n,Bucket:o,Region:a,Key:c,SliceSize:d,FileSize:l,PartNumber:h,ServerSideEncryption:g,Body:f,UploadData:u,Headers:v,onProgress:function(e){m+=e.loaded-k,k=e.loaded,b({loaded:m,total:l})},tracker:e.tracker},function(e,o){r._isRunningTask(n)&&(e||o.ETag||(e='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),e?m-=k:(m+=y-k,t.ETag=o.ETag),b({loaded:m,total:l}),p(e||null,o))})}},function(e){if(r._isRunningTask(n))return e?t(e):void t(null,{UploadId:u.UploadId,SliceList:u.PartList})})}.call(c,{TaskId:p,Bucket:f,Region:h,Key:m,Body:g,FileSize:r,SliceSize:v,AsyncLimit:y,ServerSideEncryption:k,UploadData:t,Headers:e.Headers,onProgress:n,tracker:C},function(e,t){if(c._isRunningTask(p))return e?(n(null,!0),d.emit("error",e)):void d.emit("upload_slice_complete",t)})}),d.on("get_file_size_finish",function(){if(n=s.throttleOnProgress.call(c,r,e.onProgress),e.UploadData.UploadId)d.emit("get_upload_data_finish",e.UploadData);else{var t=s.extend({TaskId:p,Bucket:f,Region:h,Key:m,Headers:e.Headers,StorageClass:b,Body:g,FileSize:r,SliceSize:v,onHashProgress:S,tracker:C},e);(function(e,t){var r=e.TaskId,n=e.Bucket,c=e.Region,d=e.Key,p=e.StorageClass,f=this,h={},m=e.FileSize,g=e.SliceSize,v=Math.ceil(m/g),y=0,b=s.throttleOnProgress.call(f,m,e.onHashProgress),k=function(t,r){var n=t.length;if(0===n)return r(null,!0);if(n>v)return r(null,!1);if(n>1){var o=Math.max(t[0].Size,t[1].Size);if(o!==g)return r(null,!1)}!function o(i){if(i<n){var a=t[i];!function(t,r){var n=g*(t-1),o=Math.min(n+g,m),i=o-n;h[t]?r(null,{PartNumber:t,ETag:h[t],Size:i}):s.fileSlice(e.Body,n,o,!1,function(e){s.getFileMd5(e,function(e,n){if(e)return r(s.error(e));var o='"'+n+'"';h[t]=o,b({loaded:y+=i,total:m}),r(null,{PartNumber:t,ETag:o,Size:i})})})}(a.PartNumber,function(e,t){t&&t.ETag===a.ETag&&t.Size===a.Size?o(i+1):r(null,!1)})}else r(null,!0)}(0)},S=new a;S.on("error",function(e){if(f._isRunningTask(r))return t(e)}),S.on("upload_id_available",function(e){var r={},n=[];s.each(e.PartList,function(e){r[e.PartNumber]=e});for(var o=1;o<=v;o++){var i=r[o];i?(i.PartNumber=o,i.Uploaded=!0):i={PartNumber:o,ETag:null,Uploaded:!1},n.push(i)}e.PartList=n,t(null,e)}),S.on("no_available_upload_id",function(){if(f._isRunningTask(r)){var o=s.extend({Bucket:n,Region:c,Key:d,Query:s.clone(e.Query),StorageClass:p,Body:e.Body,calledBySdk:"sliceUploadFile",tracker:e.tracker},e),i=s.clone(e.Headers);delete i["x-cos-mime-limit"],o.Headers=i,f.multipartInit(o,function(e,n){if(f._isRunningTask(r)){if(e)return S.emit("error",e);var o=n.UploadId;if(!o)return t(s.error(new Error("no such upload id")));S.emit("upload_id_available",{UploadId:o,PartList:[]})}})}}),S.on("has_and_check_upload_id",function(t){t=t.reverse(),i.eachLimit(t,1,function(t,i){f._isRunningTask(r)&&(o.using[t]?i():l.call(f,{Bucket:n,Region:c,Key:d,UploadId:t,tracker:e.tracker},function(e,n){if(f._isRunningTask(r)){if(e)return o.removeUsing(t),S.emit("error",e);var a=n.PartList;a.forEach(function(e){e.PartNumber*=1,e.Size*=1,e.ETag=e.ETag||""}),k(a,function(e,n){if(f._isRunningTask(r))return e?S.emit("error",e):void(n?i({UploadId:t,PartList:a}):i())})}}))},function(e){f._isRunningTask(r)&&(b(null,!0),e&&e.UploadId?S.emit("upload_id_available",e):S.emit("no_available_upload_id"))})}),S.on("seek_local_avail_upload_id",function(t){var i=o.getFileId(e.Body,e.ChunkSize,n,d),a=o.getUploadIdList.call(f,i);i&&a?function i(u){if(u>=a.length)S.emit("has_and_check_upload_id",t);else{var p=a[u];if(!s.isInArray(t,p))return o.removeUploadId.call(f,p),void i(u+1);o.using[p]?i(u+1):l.call(f,{Bucket:n,Region:c,Key:d,UploadId:p,tracker:e.tracker},function(e,t){f._isRunningTask(r)&&(e?(o.removeUploadId.call(f,p),i(u+1)):S.emit("upload_id_available",{UploadId:p,PartList:t.PartList}))})}}(0):S.emit("has_and_check_upload_id",t)}),S.on("get_remote_upload_id_list",function(){u.call(f,{Bucket:n,Region:c,Key:d,tracker:e.tracker},function(t,i){if(f._isRunningTask(r)){if(t)return S.emit("error",t);var a=s.filter(i.UploadList,function(e){return e.Key===d&&(!p||e.StorageClass.toUpperCase()===p.toUpperCase())}).reverse().map(function(e){return e.UploadId||e.UploadID});if(a.length)S.emit("seek_local_avail_upload_id",a);else{var c,u=o.getFileId(e.Body,e.ChunkSize,n,d);u&&(c=o.getUploadIdList.call(f,u))&&s.each(c,function(e){o.removeUploadId.call(f,e)}),S.emit("no_available_upload_id")}}})}),S.emit("get_remote_upload_id_list")}).call(c,t,function(t,r){if(c._isRunningTask(p)){if(t)return d.emit("error",t);e.UploadData.UploadId=r.UploadId,e.UploadData.PartList=r.PartList,d.emit("get_upload_data_finish",e.UploadData)}})}}),r=e.ContentLength,delete e.ContentLength,!e.Headers&&(e.Headers={}),s.each(e.Headers,function(t,r){"content-length"===r.toLowerCase()&&delete e.Headers[r]}),function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],n=1048576,o=0;o<t.length&&!(r/(n=1024*t[o]*1024)<=c.options.MaxPartNumber);o++);e.ChunkSize=e.SliceSize=v=Math.max(v,n)}(),0===r?(e.Body="",e.ContentLength=0,e.SkipTask=!0,c.putObject(e,t)):d.emit("get_file_size_finish")},abortUploadTask:function(e,t){var r=e.Bucket,n=e.Region,o=e.Key,c=e.UploadId,l=e.Level||"task",d=e.AsyncLimit,p=this,f=new a;if(f.on("error",function(e){return t(e)}),f.on("get_abort_array",function(a){(function(e,t){var r=e.Bucket,n=e.Region,o=e.Key,a=e.AbortArray,s=e.AsyncLimit||1,c=this,u=0,l=new Array(a.length);i.eachLimit(a,s,function(t,i){var a=u;if(o&&o!==t.Key)return l[a]={error:{KeyNotMatch:!0}},void i(null);var s=t.UploadId||t.UploadID;c.multipartAbort({Bucket:r,Region:n,Key:t.Key,Headers:e.Headers,UploadId:s},function(e){var o={Bucket:r,Region:n,Key:t.Key,UploadId:s};l[a]={error:e,task:o},i(null)}),u++},function(e){if(e)return t(e);for(var r=[],n=[],o=0,i=l.length;o<i;o++){var a=l[o];a.task&&(a.error?n.push(a.task):r.push(a.task))}return t(null,{successList:r,errorList:n})})}).call(p,{Bucket:r,Region:n,Key:o,Headers:e.Headers,AsyncLimit:d,AbortArray:a},t)}),"bucket"===l)u.call(p,{Bucket:r,Region:n,calledBySdk:"abortUploadTask"},function(e,r){if(e)return t(e);f.emit("get_abort_array",r.UploadList||[])});else if("file"===l){if(!o)return t(s.error(new Error("abort_upload_task_no_key")));u.call(p,{Bucket:r,Region:n,Key:o,calledBySdk:"abortUploadTask"},function(e,r){if(e)return t(e);f.emit("get_abort_array",r.UploadList||[])})}else{if("task"!==l)return t(s.error(new Error("abort_unknown_level")));if(!c)return t(s.error(new Error("abort_upload_task_no_id")));if(!o)return t(s.error(new Error("abort_upload_task_no_key")));f.emit("get_abort_array",[{Key:o,UploadId:c}])}},uploadFile:function(e,t){var r=void 0===e.SliceSize?this.options.SliceSize:e.SliceSize,o=[],i=e.Body,a=i.size||i.length||0,u={TaskId:""};if(this.options.EnableTracker){var l=this.options.UseAccelerate||"string"==typeof this.options.Domain&&this.options.Domain.includes("accelerate.");e.tracker=new c({bucket:e.Bucket,region:e.Region,apiName:"uploadFile",fileKey:e.Key,fileSize:a,accelerate:l,deepTracker:this.options.DeepTracker,customId:this.options.CustomId,delay:this.options.TrackerDelay})}s.each(e,function(e,t){"object"!==n(e)&&"function"!=typeof e&&(u[t]=e)});var d=e.onTaskReady;e.onTaskReady=function(e){u.TaskId=e,d&&d(e)};var p=a>r?"sliceUploadFile":"putObject",f=e.onFileFinish;o.push({api:p,params:e,callback:function(r,n){e.tracker&&e.tracker.formatResult(r,n),f&&f(r,n,u),t&&t(r,n)}}),this._addTasks(o)},uploadFiles:function(e,t){var r=this,o=void 0===e.SliceSize?r.options.SliceSize:e.SliceSize,i=0,a=0,u=s.throttleOnProgress.call(r,a,e.onProgress),l=e.files.length,d=e.onFileFinish,p=Array(l),f=function(e,r,n){u(null,!0),d&&d(e,r,n),p[n.Index]={options:n,error:e,data:r},--l<=0&&t&&t(null,{files:p})},h=[];s.each(e.files,function(e,t){!function(){var l=e.Body,d=l.size||l.length||0,p={Index:t,TaskId:""};if(!r.options.UseRawKey&&e.Key&&"/"===e.Key.substr(0,1)&&(e.Key=e.Key.substr(1)),i+=d,r.options.EnableTracker){var m=r.options.UseAccelerate||"string"==typeof r.options.Domain&&r.options.Domain.includes("accelerate.");e.tracker=new c({bucket:e.Bucket,region:e.Region,apiName:"uploadFiles",fileKey:e.Key,fileSize:d,accelerate:m,deepTracker:r.options.DeepTracker,customId:r.options.CustomId,delay:r.options.TrackerDelay})}s.each(e,function(e,t){"object"!==n(e)&&"function"!=typeof e&&(p[t]=e)});var g=e.onTaskReady;e.onTaskReady=function(e){p.TaskId=e,g&&g(e)};var v=0,y=e.onProgress;e.onProgress=function(e){a=a-v+e.loaded,v=e.loaded,y&&y(e),u({loaded:a,total:i})};var b=d>o?"sliceUploadFile":"putObject",k=e.onFileFinish;h.push({api:b,params:e,callback:function(t,r){e.tracker&&e.tracker.formatResult(t,r),k&&k(t,r),f&&f(t,r,p)}})}()}),r._addTasks(h)},sliceCopyFile:function(e,t){var r=new a,n=this,c=e.Bucket,u=e.Region,d=e.Key,p=e.CopySource,f=s.getSourceParams.call(this,p);if(f){var h=f.Bucket,m=f.Region,g=decodeURIComponent(f.Key),v=void 0===e.CopySliceSize?n.options.CopySliceSize:e.CopySliceSize;v=Math.max(0,v);var y,b,k=e.CopyChunkSize||this.options.CopyChunkSize,S=this.options.CopyChunkParallelLimit,C=this.options.ChunkRetryTimes+1,w=0,x=0,E={},A={},T={};r.on("copy_slice_complete",function(r){var a={};s.each(e.Headers,function(e,t){0===t.toLowerCase().indexOf("x-cos-meta-")&&(a[t]=e)});var l=s.map(r.PartList,function(e){return{PartNumber:e.PartNumber,ETag:e.ETag}});i.retry(C,function(e){n.multipartComplete({Bucket:c,Region:u,Key:d,UploadId:r.UploadId,Parts:l,calledBySdk:"sliceCopyFile"},e)},function(e,n){if(o.removeUsing(r.UploadId),e)return b(null,!0),t(e);o.removeUploadId(r.UploadId),b({loaded:y,total:y},!0),t(null,n)})}),r.on("get_copy_data_finish",function(e){var a=o.getCopyFileId(p,E,k,c,d);a&&o.saveUploadId(a,e.UploadId,n.options.UploadIdCacheLimit),o.setUsing(e.UploadId);var l=s.filter(e.PartList,function(e){return e.Uploaded&&(x+=e.PartNumber>=w&&y%k||k),!e.Uploaded});i.eachLimit(l,S,function(t,r){var o=t.PartNumber,a=t.CopySourceRange,s=t.end-t.start;i.retry(C,function(t){(function(e,t){var r=e.TaskId,n=e.Bucket,o=e.Region,a=e.Key,s=e.CopySource,c=e.UploadId,u=1*e.PartNumber,l=e.CopySourceRange,d=this.options.ChunkRetryTimes+1,p=this;i.retry(d,function(e){p.uploadPartCopy({TaskId:r,Bucket:n,Region:o,Key:a,CopySource:s,UploadId:c,PartNumber:u,CopySourceRange:l},function(t,r){e(t||null,r)})},function(e,r){return t(e,r)})}).call(n,{Bucket:c,Region:u,Key:d,CopySource:p,UploadId:e.UploadId,PartNumber:o,CopySourceRange:a},t)},function(e,n){if(e)return r(e);b({loaded:x+=s,total:y}),t.ETag=n.ETag,r(e||null,n)})},function(n){if(n)return o.removeUsing(e.UploadId),b(null,!0),t(n);r.emit("copy_slice_complete",e)})}),r.on("get_chunk_size_finish",function(){var i=function(){n.multipartInit({Bucket:c,Region:u,Key:d,Headers:T},function(n,o){if(n)return t(n);e.UploadId=o.UploadId,r.emit("get_copy_data_finish",{UploadId:e.UploadId,PartList:e.PartList})})},a=o.getCopyFileId(p,E,k,c,d),f=o.getUploadIdList(a);if(!a||!f)return i();!function t(a){if(a>=f.length)return i();var p=f[a];if(o.using[p])return t(a+1);l.call(n,{Bucket:c,Region:u,Key:d,UploadId:p},function(n,i){if(n)o.removeUploadId(p),t(a+1);else{if(o.using[p])return t(a+1);var c={},u=0;s.each(i.PartList,function(e){var t=parseInt(e.Size),r=u+t-1;c[e.PartNumber+"|"+u+"|"+r]=e.ETag,u+=t}),s.each(e.PartList,function(e){var t=c[e.PartNumber+"|"+e.start+"|"+e.end];t&&(e.ETag=t,e.Uploaded=!0)}),r.emit("get_copy_data_finish",{UploadId:p,PartList:e.PartList})}})}(0)}),r.on("get_file_size_finish",function(){if(function(){for(var t=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],r=1048576,o=0;o<t.length&&!(y/(r=1024*t[o]*1024)<=n.options.MaxPartNumber);o++);e.ChunkSize=k=Math.max(k,r),w=Math.ceil(y/k);for(var i=[],a=1;a<=w;a++){var s=(a-1)*k,c=a*k<y?a*k-1:y-1,u={PartNumber:a,start:s,end:c,CopySourceRange:"bytes="+s+"-"+c};i.push(u)}e.PartList=i}(),(T="Replaced"===e.Headers["x-cos-metadata-directive"]?e.Headers:A)["x-cos-storage-class"]=e.Headers["x-cos-storage-class"]||A["x-cos-storage-class"],T=s.clearKey(T),"ARCHIVE"===A["x-cos-storage-class"]||"DEEP_ARCHIVE"===A["x-cos-storage-class"]){var o=A["x-cos-restore"];if(!o||'ongoing-request="true"'===o)return void t(s.error(new Error("Unrestored archive object is not allowed to be copied")))}delete T["x-cos-copy-source"],delete T["x-cos-metadata-directive"],delete T["x-cos-copy-source-If-Modified-Since"],delete T["x-cos-copy-source-If-Unmodified-Since"],delete T["x-cos-copy-source-If-Match"],delete T["x-cos-copy-source-If-None-Match"],r.emit("get_chunk_size_finish")}),n.headObject({Bucket:h,Region:m,Key:g},function(o,i){if(o)o.statusCode&&404===o.statusCode?t(s.error(o,{ErrorStatus:g+" Not Exist"})):t(o);else if(void 0!==(y=e.FileSize=i.headers["content-length"])&&y)if(b=s.throttleOnProgress.call(n,y,e.onProgress),y<=v)e.Headers["x-cos-metadata-directive"]||(e.Headers["x-cos-metadata-directive"]="Copy"),n.putObjectCopy(e,function(e,r){if(e)return b(null,!0),t(e);b({loaded:y,total:y},!0),t(e,r)});else{var a=i.headers;E=a,A={"Cache-Control":a["cache-control"],"Content-Disposition":a["content-disposition"],"Content-Encoding":a["content-encoding"],"Content-Type":a["content-type"],Expires:a.expires,"x-cos-storage-class":a["x-cos-storage-class"]},s.each(a,function(e,t){0===t.indexOf("x-cos-meta-")&&t.length>"x-cos-meta-".length&&(A[t]=e)}),r.emit("get_file_size_finish")}else t(s.error(new Error('get Content-Length error, please add "Content-Length" to CORS ExposeHeader setting.( 获取Content-Length失败,请在CORS ExposeHeader设置中添加Content-Length,请参考文档:https://cloud.tencent.com/document/product/436/13318 )')))})}else t(s.error(new Error("CopySource format error")))}};e.exports.init=function(e,t){t.transferToTaskMethod(d,"sliceUploadFile"),s.each(d,function(t,r){e.prototype[r]=s.apiWrapper(r,t)})}},"./src/async.js":
  102. /*!**********************!*\
  103. !*** ./src/async.js ***!
  104. \**********************/
  105. /*! no static exports found */function(e,t){var r={eachLimit:function(e,t,r,n){if(n=n||function(){},!e.length||t<=0)return n();var o=0,i=0,a=0;!function s(){if(o>=e.length)return n();for(;a<t&&i<e.length;)a+=1,r(e[(i+=1)-1],function(t){t?(n(t),n=function(){}):(a-=1,(o+=1)>=e.length?n():s())})}()},retry:function(e,t,r){e<1?r():function n(o){t(function(t,i){t&&o<e?n(o+1):r(t,i)})}(1)}};e.exports=r},"./src/base.js":
  106. /*!*********************!*\
  107. !*** ./src/base.js ***!
  108. \*********************/
  109. /*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),o=r(/*! ../lib/request */"./lib/request.js"),i=r(/*! ./util */"./src/util.js");function a(e,t,r){var n=i.clone(t.InventoryConfiguration);if(n.OptionalFields){var o=n.OptionalFields||[];n.OptionalFields={Field:o}}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var a=n.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSECOS")>-1&&(a["SSE-COS"]=a.SSECOS,delete a.SSECOS)}var s=i.json2xml({InventoryConfiguration:n}),c=t.Headers;c["Content-Type"]="application/xml",c["Content-MD5"]=i.b64(i.md5(s));var u="PUT"===e?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";p.call(this,{Action:u,method:e,Bucket:t.Bucket,Region:t.Region,body:s,action:"inventory",qs:{id:t.Id},headers:c},function(e,t){return e&&204===e.statusCode?r(null,{statusCode:e.statusCode}):e?r(e):void r(null,{statusCode:t.statusCode,headers:t.headers})})}function s(e){var t={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},r={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},n=(e&&e.AccessControlList||{}).Grant;n&&(n=i.isArray(n)?n:[n]);var o={READ:0,WRITE:0,FULL_CONTROL:0};return n&&n.length&&i.each(n,function(n){"qcs::cam::anyone:anyone"===n.Grantee.ID||"http://cam.qcloud.com/groups/global/AllUsers"===n.Grantee.URI?o[n.Permission]=1:n.Grantee.ID!==e.Owner.ID&&t[r[n.Permission]].push('id="'+n.Grantee.ID+'"')}),o.FULL_CONTROL||o.WRITE&&o.READ?t.ACL="public-read-write":o.READ?t.ACL="public-read":t.ACL="private",i.each(r,function(e){t[e]=c(t[e].join(","))}),t}function c(e){var t,r,n=e.split(","),o={};for(t=0;t<n.length;)o[r=n[t].trim()]?n.splice(t,1):(o[r]=!0,n[t]=r,t++);return n.join(",")}function u(e){var t=e.region||"",r=e.bucket||"",o=r.substr(0,r.lastIndexOf("-")),a=r.substr(r.lastIndexOf("-")+1),s=e.domain,c=e.object;"function"==typeof s&&(s=s({Bucket:r,Region:t})),["http","https"].includes(e.protocol)&&(e.protocol=e.protocol+":");var u=e.protocol||(i.isBrowser&&"object"===("undefined"==typeof location?"undefined":n(location))&&"http:"===location.protocol?"http:":"https:");s||(s=["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(t)>-1?"{Region}.myqcloud.com":"cos.{Region}.myqcloud.com",e.ForcePathStyle||(s="{Bucket}."+s)),s=(s=s.replace(/\{\{AppId\}\}/gi,a).replace(/\{\{Bucket\}\}/gi,o).replace(/\{\{Region\}\}/gi,t).replace(/\{\{.*?\}\}/gi,"")).replace(/\{AppId\}/gi,a).replace(/\{BucketName\}/gi,o).replace(/\{Bucket\}/gi,r).replace(/\{Region\}/gi,t).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(s)||(s=u+"//"+s),"/"===s.slice(-1)&&(s=s.slice(0,-1));var l=s;return e.ForcePathStyle&&(l+="/"+r),l+="/",c&&(l+=i.camSafeUrlEncode(c).replace(/%2F/g,"/")),e.isLocation&&(l=l.replace(/^https?:\/\//,"")),l}var l=function(e){if(!e.Bucket||!e.Region)return"";var t=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate,r=(e.Url||u({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:e.Bucket,region:t?"accelerate":e.Region})).replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return new RegExp("^([a-z\\d-]+-\\d+\\.)?(cos|cosv6|ci|pic)\\.([a-z\\d-]+)\\.myqcloud\\.com$").test(r)?r:""};function d(e,t){var r=i.clone(e.Headers),n="";i.each(r,function(e,t){(""===e||["content-type","cache-control","expires"].indexOf(t.toLowerCase())>-1)&&delete r[t],"host"===t.toLowerCase()&&(n=e)});var o=!1!==e.ForceSignHost;!n&&e.SignHost&&o&&(r.Host=e.SignHost);var a=!1,s=function(e,r){a||(a=!0,r&&r.XCosSecurityToken&&!r.SecurityToken&&((r=i.clone(r)).SecurityToken=r.XCosSecurityToken,delete r.XCosSecurityToken),t&&t(e,r))},c=this,u=e.Bucket||"",l=e.Region||"",d=e.Key||"";c.options.ForcePathStyle&&u&&(d=u+"/"+d);var p="/"+d,f={},h=e.Scope;if(!h){var m=e.Action||"",g=e.ResourceKey||e.Key||"";h=e.Scope||[{action:m,bucket:u,region:l,prefix:g}]}var v=i.md5(JSON.stringify(h));c._StsCache=c._StsCache||[],function(){var e,t;for(e=c._StsCache.length-1;e>=0;e--){t=c._StsCache[e];var r=Math.round(i.getSkewTime(c.options.SystemClockOffset)/1e3)+30;if(t.StartTime&&r<t.StartTime||r>=t.ExpiredTime)c._StsCache.splice(e,1);else if(!t.ScopeLimit||t.ScopeLimit&&t.ScopeKey===v){f=t;break}}}();var y,b=function(){var t="";f.StartTime&&e.Expires?t=f.StartTime+";"+(f.StartTime+1*e.Expires):f.StartTime&&f.ExpiredTime&&(t=f.StartTime+";"+f.ExpiredTime);var n={Authorization:i.getAuth({SecretId:f.TmpSecretId,SecretKey:f.TmpSecretKey,Method:e.Method,Pathname:p,Query:e.Query,Headers:r,Expires:e.Expires,UseRawKey:c.options.UseRawKey,SystemClockOffset:c.options.SystemClockOffset,KeyTime:t,ForceSignHost:o}),SecurityToken:f.SecurityToken||f.XCosSecurityToken||"",Token:f.Token||"",ClientIP:f.ClientIP||"",ClientUA:f.ClientUA||""};s(null,n)},k=function(e){if(e.Authorization){var t=!1,r=e.Authorization;if(r)if(r.indexOf(" ")>-1)t=!1;else if(r.indexOf("q-sign-algorithm=")>-1&&r.indexOf("q-ak=")>-1&&r.indexOf("q-sign-time=")>-1&&r.indexOf("q-key-time=")>-1&&r.indexOf("q-url-param-list=")>-1)t=!0;else try{(r=atob(r)).indexOf("a=")>-1&&r.indexOf("k=")>-1&&r.indexOf("t=")>-1&&r.indexOf("r=")>-1&&r.indexOf("b=")>-1&&(t=!0)}catch(e){}if(!t)return i.error(new Error("getAuthorization callback params format error"))}else{if(!e.TmpSecretId)return i.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!e.TmpSecretKey)return i.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!e.SecurityToken&&!e.XCosSecurityToken)return i.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!e.ExpiredTime)return i.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(e.ExpiredTime&&10!==e.ExpiredTime.toString().length)return i.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(e.StartTime&&10!==e.StartTime.toString().length)return i.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(f.ExpiredTime&&f.ExpiredTime-i.getSkewTime(c.options.SystemClockOffset)/1e3>60)b();else if(c.options.getAuthorization)c.options.getAuthorization.call(c,{Bucket:u,Region:l,Method:e.Method,Key:d,Pathname:p,Query:e.Query,Headers:r,Scope:h,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:o},function(e){"string"==typeof e&&(e={Authorization:e});var t=k(e);if(t)return s(t);e.Authorization?s(null,e):((f=e||{}).Scope=h,f.ScopeKey=v,c._StsCache.push(f),b())});else{if(!c.options.getSTS)return y={Authorization:i.getAuth({SecretId:e.SecretId||c.options.SecretId,SecretKey:e.SecretKey||c.options.SecretKey,Method:e.Method,Pathname:p,Query:e.Query,Headers:r,Expires:e.Expires,UseRawKey:c.options.UseRawKey,SystemClockOffset:c.options.SystemClockOffset,ForceSignHost:o}),SecurityToken:c.options.SecurityToken||c.options.XCosSecurityToken},s(null,y),y;c.options.getSTS.call(c,{Bucket:u,Region:l},function(e){(f=e||{}).Scope=h,f.ScopeKey=v,f.TmpSecretId||(f.TmpSecretId=f.SecretId),f.TmpSecretKey||(f.TmpSecretKey=f.SecretKey);var t=k(f);if(t)return s(t);c._StsCache.push(f),b()})}return""}function p(e,t){var r=this;!e.headers&&(e.headers={}),!e.qs&&(e.qs={}),e.VersionId&&(e.qs.versionId=e.VersionId),e.qs=i.clearKey(e.qs),e.headers&&(e.headers=i.clearKey(e.headers)),e.qs&&(e.qs=i.clearKey(e.qs));var n=i.clone(e.qs);e.action&&(n[e.action]="");var a=e.url||e.Url,s=e.SignHost||l.call(this,{Bucket:e.Bucket,Region:e.Region,Url:a}),c=e.tracker;!function a(l){var p=r.options.SystemClockOffset;c&&c.setParams({signStartTime:(new Date).getTime(),retryTimes:l-1}),d.call(r,{Bucket:e.Bucket||"",Region:e.Region||"",Method:e.method,Key:e.Key,Query:n,Headers:e.headers,SignHost:s,Action:e.Action,ResourceKey:e.ResourceKey,Scope:e.Scope,ForceSignHost:r.options.ForceSignHost},function(n,s){n?t(n):(c&&c.setParams({signEndTime:(new Date).getTime(),httpStartTime:(new Date).getTime()}),e.AuthData=s,function(e,t){var r=this,n=e.TaskId;if(!n||r._isRunningTask(n)){var a=e.Bucket,s=e.Region,c=e.Key,l=e.method||"GET",d=e.Url||e.url,p=e.body,f=e.rawBody;r.options.UseAccelerate&&(s="accelerate"),d=d||u({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:a,region:s,object:c}),e.action&&(d=d+"?"+(i.isIOS_QQ?"".concat(e.action,"="):e.action)),e.qsStr&&(d=d.indexOf("?")>-1?d+"&"+e.qsStr:d+"?"+e.qsStr);var h={method:l,url:d,headers:e.headers,qs:e.qs,body:p},m="x-cos-security-token";if(i.isCIHost(d)&&(m="x-ci-security-token"),h.headers.Authorization=e.AuthData.Authorization,e.AuthData.Token&&(h.headers.token=e.AuthData.Token),e.AuthData.ClientIP&&(h.headers.clientIP=e.AuthData.ClientIP),e.AuthData.ClientUA&&(h.headers.clientUA=e.AuthData.ClientUA),e.AuthData.SecurityToken&&(h.headers[m]=e.AuthData.SecurityToken),h.headers&&(h.headers=i.clearKey(h.headers)),h=i.clearKey(h),e.onProgress&&"function"==typeof e.onProgress){var g=p&&(p.size||p.length)||0;h.onProgress=function(t){if(!n||r._isRunningTask(n)){var o=t?t.loaded:0;e.onProgress({loaded:o,total:g})}}}e.onDownloadProgress&&(h.onDownloadProgress=e.onDownloadProgress),e.DataType&&(h.dataType=e.DataType),this.options.Timeout&&(h.timeout=this.options.Timeout),r.options.ForcePathStyle&&(h.pathStyle=r.options.ForcePathStyle),r.emit("before-send",h);var v=h.url.includes("accelerate."),y=h.qs?Object.keys(h.qs).map(function(e){return"".concat(e,"=").concat(h.qs[e])}).join("&"):"",b=y?h.url+"?"+y:h.url;e.tracker&&e.tracker.setParams({reqUrl:b,accelerate:v?"Y":"N"}),e.tracker&&e.tracker.parent&&e.tracker.parent.setParams({reqUrl:b,accelerate:v?"Y":"N"});var k=(r.options.Request||o)(h,function(e){if(!e||"abort"!==e.error){var o={options:h,error:e&&e.error,statusCode:e&&e.statusCode||0,statusMessage:e&&e.statusMessage||"",headers:e&&e.headers||{},body:e&&e.body};r.emit("after-receive",o);var a,s=o.error,c=o.body,u={statusCode:o.statusCode,statusMessage:o.statusMessage,headers:o.headers},l=function(e,o){if(n&&r.off("inner-kill-task",S),!a){a=!0;var s={};u&&u.statusCode&&(s.statusCode=u.statusCode),u&&u.headers&&(s.headers=u.headers),e?(e=i.extend(e||{},s),t(e,null)):(o=i.extend(o||{},s),t(null,o)),k=null}};if(s)return l(i.error(s));var d,p=u.statusCode,m=2===Math.floor(p/100);if(f&&m)return l(null,{body:c});try{d=c&&c.indexOf("<")>-1&&c.indexOf(">")>-1&&i.xml2json(c)||{}}catch(e){d={}}var g=d&&d.Error;m?l(null,d):g?l(i.error(new Error(g.Message),{code:g.Code,error:g})):p?l(i.error(new Error(u.statusMessage),{code:""+p})):p&&l(i.error(new Error("statusCode error")))}}),S=function e(t){t.TaskId===n&&(k&&k.abort&&k.abort(),r.off("inner-kill-task",e))};n&&r.on("inner-kill-task",S)}}.call(r,e,function(n,o){c&&c.setParams({httpEndTime:(new Date).getTime()}),n&&l<2&&(p!==r.options.SystemClockOffset||function(e){var t=!1,r=!1,n=e.headers&&(e.headers.date||e.headers.Date)||e.error&&e.error.ServerTime;try{var o=e.error.Code,a=e.error.Message;("RequestTimeTooSkewed"===o||"AccessDenied"===o&&"Request has expired"===a)&&(r=!0)}catch(e){}if(e)if(r&&n){var s=Date.parse(n);this.options.CorrectClockSkew&&Math.abs(i.getSkewTime(this.options.SystemClockOffset)-s)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=s-Date.now(),t=!0)}else 5===Math.floor(e.statusCode/100)&&(t=!0);return t}.call(r,n))?(e.headers&&(delete e.headers.Authorization,delete e.headers.token,delete e.headers.clientIP,delete e.headers.clientUA,e.headers["x-cos-security-token"]&&delete e.headers["x-cos-security-token"],e.headers["x-ci-security-token"]&&delete e.headers["x-ci-security-token"]),a(l+1)):t(n,o)}))})}(1)}var f={getService:function(e,t){"function"==typeof e&&(t=e,e={});var r=this.options.Protocol||(i.isBrowser&&"object"===("undefined"==typeof location?"undefined":n(location))&&"http:"===location.protocol?"http:":"https:"),o=this.options.ServiceDomain,a=e.AppId||this.options.appId,s=e.Region;o?(o=o.replace(/\{\{AppId\}\}/gi,a||"").replace(/\{\{Region\}\}/gi,s||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(o)||(o=r+"//"+o),"/"===o.slice(-1)&&(o=o.slice(0,-1))):o=s?r+"//cos."+s+".myqcloud.com":r+"//service.cos.myqcloud.com";var c="",u=s?"cos."+s+".myqcloud.com":"service.cos.myqcloud.com";u===o.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1")&&(c=u),p.call(this,{Action:"name/cos:GetService",url:o,method:"GET",headers:e.Headers,SignHost:c},function(e,r){if(e)return t(e);var n=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Buckets&&r.ListAllMyBucketsResult.Buckets.Bucket||[];n=i.isArray(n)?n:[n];var o=r&&r.ListAllMyBucketsResult&&r.ListAllMyBucketsResult.Owner||{};t(null,{Buckets:n,Owner:o,statusCode:r.statusCode,headers:r.headers})})},putBucket:function(e,t){var r=this,n="";if(e.BucketAZConfig){var o={BucketAZConfig:e.BucketAZConfig};n=i.json2xml({CreateBucketConfiguration:o})}p.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,body:n},function(n,o){if(n)return t(n);var i=u({protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,isLocation:!0});t(null,{Location:i,statusCode:o.statusCode,headers:o.headers})})},headBucket:function(e,t){p.call(this,{Action:"name/cos:HeadBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"HEAD"},t)},getBucket:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r.marker=e.Marker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,p.call(this,{Action:"name/cos:GetBucket",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r},function(e,r){if(e)return t(e);var n=r.ListBucketResult||{},o=n.Contents||[],a=n.CommonPrefixes||[];o=i.isArray(o)?o:[o],a=i.isArray(a)?a:[a];var s=i.clone(n);i.extend(s,{Contents:o,CommonPrefixes:a,statusCode:r.statusCode,headers:r.headers}),t(null,s)})},deleteBucket:function(e,t){p.call(this,{Action:"name/cos:DeleteBucket",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,method:"DELETE"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},putBucketAcl:function(e,t){var r=e.Headers,n="";if(e.AccessControlPolicy){var o=i.clone(e.AccessControlPolicy||{}),a=o.Grants||o.Grant;a=i.isArray(a)?a:[a],delete o.Grant,delete o.Grants,o.AccessControlList={Grant:a},n=i.json2xml({AccessControlPolicy:o}),r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(n))}i.each(r,function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=c(r[t]))}),p.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,headers:r,action:"acl",body:n},function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketAcl:function(e,t){p.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"acl"},function(e,r){if(e)return t(e);var n=r.AccessControlPolicy||{},o=n.Owner||{},a=n.AccessControlList.Grant||[];a=i.isArray(a)?a:[a];var c=s(n);r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=i.extend(c,{Owner:o,Grants:a,statusCode:r.statusCode,headers:r.headers}),t(null,c)})},putBucketCors:function(e,t){var r=(e.CORSConfiguration||{}).CORSRules||e.CORSRules||[];r=i.clone(i.isArray(r)?r:[r]),i.each(r,function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(t){var r=t+"s",n=e[r]||e[t]||[];delete e[r],e[t]=i.isArray(n)?n:[n]})});var n={CORSRule:r};e.ResponseVary&&(n.ResponseVary=e.ResponseVary);var o=i.json2xml({CORSConfiguration:n}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(o)),p.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"cors",headers:a},function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketCors:function(e,t){p.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchCORSConfiguration"===e.error.Code){var n={CORSRules:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var o=r.CORSConfiguration||{},a=o.CORSRules||o.CORSRule||[];a=i.clone(i.isArray(a)?a:[a]);var s=o.ResponseVary;i.each(a,function(e){i.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(t){var r=t+"s",n=e[r]||e[t]||[];delete e[t],e[r]=i.isArray(n)?n:[n]})}),t(null,{CORSRules:a,ResponseVary:s,statusCode:r.statusCode,headers:r.headers})}})},deleteBucketCors:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"cors"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})})},getBucketLocation:function(e,t){p.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"location"},t)},getBucketPolicy:function(e,t){p.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy",rawBody:!0},function(e,r){if(e)return e.statusCode&&403===e.statusCode?t(i.error(e,{ErrorStatus:"Access Denied"})):e.statusCode&&405===e.statusCode?t(i.error(e,{ErrorStatus:"Method Not Allowed"})):e.statusCode&&404===e.statusCode?t(i.error(e,{ErrorStatus:"Policy Not Found"})):t(e);var n={};try{n=JSON.parse(r.body)}catch(e){}t(null,{Policy:n,statusCode:r.statusCode,headers:r.headers})})},putBucketPolicy:function(e,t){var r=e.Policy;try{"string"==typeof r&&(r=JSON.parse(r))}catch(e){}if(!r||"string"==typeof r)return t(i.error(new Error("Policy format error")));var n=JSON.stringify(r);r.version||(r.version="2.0");var o=e.Headers;o["Content-Type"]="application/json",o["Content-MD5"]=i.b64(i.md5(n)),p.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:e.Bucket,Region:e.Region,action:"policy",body:n,headers:o},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},deleteBucketPolicy:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"policy"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode||e.statusCode,headers:r.headers})})},putBucketTagging:function(e,t){var r=e.Tagging||{},n=r.TagSet||r.Tags||e.Tags||[];n=i.clone(i.isArray(n)?n:[n]);var o=i.json2xml({Tagging:{TagSet:{Tag:n}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(o)),p.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"tagging",headers:a},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketTagging:function(e,t){p.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var n={Tags:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else{var o=[];try{o=r.Tagging.TagSet.Tag||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Tags:o,statusCode:r.statusCode,headers:r.headers})}})},deleteBucketTagging:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},putBucketLifecycle:function(e,t){var r=(e.LifecycleConfiguration||{}).Rules||e.Rules||[];r=i.clone(r);var n=i.json2xml({LifecycleConfiguration:{Rule:r}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.b64(i.md5(n)),p.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"lifecycle",headers:o},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketLifecycle:function(e,t){p.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},function(e,r){if(e)if(404===e.statusCode&&e.error&&"NoSuchLifecycleConfiguration"===e.error.Code){var n={Rules:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var o=[];try{o=r.LifecycleConfiguration.Rule||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Rules:o,statusCode:r.statusCode,headers:r.headers})}})},deleteBucketLifecycle:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"lifecycle"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},putBucketVersioning:function(e,t){if(e.VersioningConfiguration){var r=e.VersioningConfiguration||{},n=i.json2xml({VersioningConfiguration:r}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.b64(i.md5(n)),p.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"versioning",headers:o},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})}else t(i.error(new Error("missing param VersioningConfiguration")))},getBucketVersioning:function(e,t){p.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"versioning"},function(e,r){e||!r.VersioningConfiguration&&(r.VersioningConfiguration={}),t(e,r)})},putBucketReplication:function(e,t){var r=i.clone(e.ReplicationConfiguration),n=i.json2xml({ReplicationConfiguration:r});n=(n=n.replace(/<(\/?)Rules>/gi,"<$1Rule>")).replace(/<(\/?)Tags>/gi,"<$1Tag>");var o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.b64(i.md5(n)),p.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"replication",headers:o},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketReplication:function(e,t){p.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"ReplicationConfigurationnotFoundError"!==e.error.Code)t(e);else{var n={ReplicationConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else!r.ReplicationConfiguration&&(r.ReplicationConfiguration={}),r.ReplicationConfiguration.Rule&&(r.ReplicationConfiguration.Rules=i.makeArray(r.ReplicationConfiguration.Rule),delete r.ReplicationConfiguration.Rule),t(e,r)})},deleteBucketReplication:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"replication"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},putBucketWebsite:function(e,t){if(e.WebsiteConfiguration){var r=i.clone(e.WebsiteConfiguration||{}),n=r.RoutingRules||r.RoutingRule||[];n=i.isArray(n)?n:[n],delete r.RoutingRule,delete r.RoutingRules,n.length&&(r.RoutingRules={RoutingRule:n});var o=i.json2xml({WebsiteConfiguration:r}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(o)),p.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"website",headers:a},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})}else t(i.error(new Error("missing param WebsiteConfiguration")))},getBucketWebsite:function(e,t){p.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"website"},function(e,r){if(e)if(404===e.statusCode&&"NoSuchWebsiteConfiguration"===e.error.Code){var n={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var o=r.WebsiteConfiguration||{};if(o.RoutingRules){var a=i.clone(o.RoutingRules.RoutingRule||[]);a=i.makeArray(a),o.RoutingRules=a}t(null,{WebsiteConfiguration:o,statusCode:r.statusCode,headers:r.headers})}})},deleteBucketWebsite:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"website"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},putBucketReferer:function(e,t){if(e.RefererConfiguration){var r=i.clone(e.RefererConfiguration||{}),n=r.DomainList||{},o=n.Domains||n.Domain||[];(o=i.isArray(o)?o:[o]).length&&(r.DomainList={Domain:o});var a=i.json2xml({RefererConfiguration:r}),s=e.Headers;s["Content-Type"]="application/xml",s["Content-MD5"]=i.b64(i.md5(a)),p.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:a,action:"referer",headers:s},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})}else t(i.error(new Error("missing param RefererConfiguration")))},getBucketReferer:function(e,t){p.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"referer"},function(e,r){if(e)if(404===e.statusCode&&"NoSuchRefererConfiguration"===e.error.Code){var n={WebsiteConfiguration:{},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var o=r.RefererConfiguration||{};if(o.DomainList){var a=i.makeArray(o.DomainList.Domain||[]);o.DomainList={Domains:a}}t(null,{RefererConfiguration:o,statusCode:r.statusCode,headers:r.headers})}})},putBucketDomain:function(e,t){var r=(e.DomainConfiguration||{}).DomainRule||e.DomainRule||[];r=i.clone(r);var n=i.json2xml({DomainConfiguration:{DomainRule:r}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.b64(i.md5(n)),p.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"domain",headers:o},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketDomain:function(e,t){p.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(e,r){if(e)return t(e);var n=[];try{n=r.DomainConfiguration.DomainRule||[]}catch(e){}n=i.clone(i.isArray(n)?n:[n]),t(null,{DomainRule:n,statusCode:r.statusCode,headers:r.headers})})},deleteBucketDomain:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"domain"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},putBucketOrigin:function(e,t){var r=(e.OriginConfiguration||{}).OriginRule||e.OriginRule||[];r=i.clone(r);var n=i.json2xml({OriginConfiguration:{OriginRule:r}}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.b64(i.md5(n)),p.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"origin",headers:o},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketOrigin:function(e,t){p.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(e,r){if(e)return t(e);var n=[];try{n=r.OriginConfiguration.OriginRule||[]}catch(e){}n=i.clone(i.isArray(n)?n:[n]),t(null,{OriginRule:n,statusCode:r.statusCode,headers:r.headers})})},deleteBucketOrigin:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"origin"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},putBucketLogging:function(e,t){var r=i.json2xml({BucketLoggingStatus:e.BucketLoggingStatus||""}),n=e.Headers;n["Content-Type"]="application/xml",n["Content-MD5"]=i.b64(i.md5(r)),p.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:r,action:"logging",headers:n},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketLogging:function(e,t){p.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"logging"},function(e,r){if(e)return t(e);t(null,{BucketLoggingStatus:r.BucketLoggingStatus,statusCode:r.statusCode,headers:r.headers})})},putBucketInventory:function(e,t){return a.call(this,"PUT",e,t)},postBucketInventory:function(e,t){return a.call(this,"POST",e,t)},getBucketInventory:function(e,t){p.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(e,r){if(e)return t(e);var n=r.InventoryConfiguration;if(n&&n.OptionalFields&&n.OptionalFields.Field){var o=n.OptionalFields.Field;i.isArray(o)||(o=[o]),n.OptionalFields=o}if(n.Destination&&n.Destination.COSBucketDestination&&n.Destination.COSBucketDestination.Encryption){var a=n.Destination.COSBucketDestination.Encryption;Object.keys(a).indexOf("SSE-COS")>-1&&(a.SSECOS=a["SSE-COS"],delete a["SSE-COS"])}t(null,{InventoryConfiguration:n,statusCode:r.statusCode,headers:r.headers})})},listBucketInventory:function(e,t){p.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{"continuation-token":e.ContinuationToken}},function(e,r){if(e)return t(e);var n=r.ListInventoryConfigurationResult,o=n.InventoryConfiguration||[];o=i.isArray(o)?o:[o],delete n.InventoryConfiguration,i.each(o,function(e){if(e&&e.OptionalFields&&e.OptionalFields.Field){var t=e.OptionalFields.Field;i.isArray(t)||(t=[t]),e.OptionalFields=t}if(e.Destination&&e.Destination.COSBucketDestination&&e.Destination.COSBucketDestination.Encryption){var r=e.Destination.COSBucketDestination.Encryption;Object.keys(r).indexOf("SSE-COS")>-1&&(r.SSECOS=r["SSE-COS"],delete r["SSE-COS"])}}),n.InventoryConfigurations=o,i.extend(n,{statusCode:r.statusCode,headers:r.headers}),t(null,n)})},deleteBucketInventory:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"inventory",qs:{id:e.Id}},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},putBucketAccelerate:function(e,t){if(e.AccelerateConfiguration){var r={AccelerateConfiguration:e.AccelerateConfiguration||{}},n=i.json2xml(r),o={"Content-Type":"application/xml"};o["Content-MD5"]=i.b64(i.md5(n)),p.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:n,action:"accelerate",headers:o},function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})})}else t(i.error(new Error("missing param AccelerateConfiguration")))},getBucketAccelerate:function(e,t){p.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:e.Bucket,Region:e.Region,action:"accelerate"},function(e,r){e||!r.AccelerateConfiguration&&(r.AccelerateConfiguration={}),t(e,r)})},putBucketEncryption:function(e,t){var r=e.ServerSideEncryptionConfiguration||{},n=r.Rule||r.Rules||[],o=i.json2xml({ServerSideEncryptionConfiguration:{Rule:n}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(o)),p.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:e.Bucket,Region:e.Region,body:o,action:"encryption",headers:a},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getBucketEncryption:function(e,t){p.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},function(e,r){if(e)if(404===e.statusCode&&"NoSuchEncryptionConfiguration"===e.code){var n={EncryptionConfiguration:{Rules:[]},statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else t(e);else{var o=i.makeArray(r.EncryptionConfiguration&&r.EncryptionConfiguration.Rule||[]);r.EncryptionConfiguration={Rules:o},t(e,r)}})},deleteBucketEncryption:function(e,t){p.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"encryption"},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getObject:function(e,t){var r=e.Query||{},n=e.QueryString||"",o=i.throttleOnProgress.call(this,0,e.onProgress),a=e.tracker;a&&a.setParams({signStartTime:(new Date).getTime()}),r["response-content-type"]=e.ResponseContentType,r["response-content-language"]=e.ResponseContentLanguage,r["response-expires"]=e.ResponseExpires,r["response-cache-control"]=e.ResponseCacheControl,r["response-content-disposition"]=e.ResponseContentDisposition,r["response-content-encoding"]=e.ResponseContentEncoding,p.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,DataType:e.DataType,headers:e.Headers,qs:r,qsStr:n,rawBody:!0,onDownloadProgress:o,tracker:a},function(r,n){if(o(null,!0),r){var a=r.statusCode;return e.Headers["If-Modified-Since"]&&a&&304===a?t(null,{NotModified:!0}):t(r)}t(null,{Body:n.body,ETag:i.attr(n.headers,"etag",""),statusCode:n.statusCode,headers:n.headers})})},headObject:function(e,t){p.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},function(r,n){if(r){var o=r.statusCode;return e.Headers["If-Modified-Since"]&&o&&304===o?t(null,{NotModified:!0,statusCode:o}):t(r)}n.ETag=i.attr(n.headers,"etag",""),t(null,n)})},listObjectVersions:function(e,t){var r={};r.prefix=e.Prefix||"",r.delimiter=e.Delimiter,r["key-marker"]=e.KeyMarker,r["version-id-marker"]=e.VersionIdMarker,r["max-keys"]=e.MaxKeys,r["encoding-type"]=e.EncodingType,p.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,action:"versions"},function(e,r){if(e)return t(e);var n=r.ListVersionsResult||{},o=n.DeleteMarker||[];o=i.isArray(o)?o:[o];var a=n.Version||[];a=i.isArray(a)?a:[a];var s=i.clone(n);delete s.DeleteMarker,delete s.Version,i.extend(s,{DeleteMarkers:o,Versions:a,statusCode:r.statusCode,headers:r.headers}),t(null,s)})},putObject:function(e,t){var r=this,n=e.ContentLength,o=i.throttleOnProgress.call(r,n,e.onProgress),a=e.Headers;a["Cache-Control"]||a["cache-control"]||(a["Cache-Control"]=""),a["Content-Type"]||a["content-type"]||(a["Content-Type"]=e.Body&&e.Body.type||"");var s=e.UploadAddMetaMd5||r.options.UploadAddMetaMd5||r.options.UploadCheckContentMd5,c=e.tracker;s&&c&&c.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(s,e.Body,function(s){s&&(c&&c.setParams({md5EndTime:(new Date).getTime()}),r.options.UploadCheckContentMd5&&(a["Content-MD5"]=i.b64(s)),(e.UploadAddMetaMd5||r.options.UploadAddMetaMd5)&&(a["x-cos-meta-md5"]=s)),void 0!==e.ContentLength&&(a["Content-Length"]=e.ContentLength),o(null,!0),p.call(r,{Action:"name/cos:PutObject",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:e.Query,body:e.Body,onProgress:o,tracker:c},function(a,s){if(a)return o(null,!0),t(a);o({loaded:n,total:n},!0);var c=u({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:r.options.UseAccelerate?"accelerate":e.Region,object:e.Key});c=c.substr(c.indexOf("://")+3),s.Location=c,s.ETag=i.attr(s.headers,"etag",""),t(null,s)})},e.onHashProgress)},deleteObject:function(e,t){p.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,VersionId:e.VersionId,action:e.Recursive?"recursive":""},function(e,r){if(e){var n=e.statusCode;return n&&404===n?t(null,{BucketNotFound:!0,statusCode:n}):t(e)}t(null,{statusCode:r.statusCode,headers:r.headers})})},getObjectAcl:function(e,t){var r={};e.VersionId&&(r.versionId=e.VersionId),p.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r,action:"acl"},function(e,r){if(e)return t(e);var n=r.AccessControlPolicy||{},o=n.Owner||{},a=n.AccessControlList&&n.AccessControlList.Grant||[];a=i.isArray(a)?a:[a];var c=s(n);delete c.GrantWrite,r.headers&&r.headers["x-cos-acl"]&&(c.ACL=r.headers["x-cos-acl"]),c=i.extend(c,{Owner:o,Grants:a,statusCode:r.statusCode,headers:r.headers}),t(null,c)})},putObjectAcl:function(e,t){var r=e.Headers,n="";if(e.AccessControlPolicy){var o=i.clone(e.AccessControlPolicy||{}),a=o.Grants||o.Grant;a=i.isArray(a)?a:[a],delete o.Grant,delete o.Grants,o.AccessControlList={Grant:a},n=i.json2xml({AccessControlPolicy:o}),r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(n))}i.each(r,function(e,t){0===t.indexOf("x-cos-grant-")&&(r[t]=c(r[t]))}),p.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"acl",headers:r,body:n},function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})})},optionsObject:function(e,t){var r=e.Headers;r.Origin=e.Origin,r["Access-Control-Request-Method"]=e.AccessControlRequestMethod,r["Access-Control-Request-Headers"]=e.AccessControlRequestHeaders,p.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:r},function(e,r){if(e)return e.statusCode&&403===e.statusCode?t(null,{OptionsForbidden:!0,statusCode:e.statusCode}):t(e);var n=r.headers||{};t(null,{AccessControlAllowOrigin:n["access-control-allow-origin"],AccessControlAllowMethods:n["access-control-allow-methods"],AccessControlAllowHeaders:n["access-control-allow-headers"],AccessControlExposeHeaders:n["access-control-expose-headers"],AccessControlMaxAge:n["access-control-max-age"],statusCode:r.statusCode,headers:r.headers})})},putObjectCopy:function(e,t){var r=this,n=e.Headers;n["Cache-Control"]||n["cache-control"]||(n["Cache-Control"]="");var o=e.CopySource||"",a=i.getSourceParams.call(this,o);if(a){var s=a.Bucket,c=a.Region,l=decodeURIComponent(a.Key);p.call(this,{Scope:[{action:"name/cos:GetObject",bucket:s,region:c,prefix:l},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,headers:e.Headers},function(n,o){if(n)return t(n);var a=i.clone(o.CopyObjectResult||{}),s=u({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0});i.extend(a,{Location:s,statusCode:o.statusCode,headers:o.headers}),t(null,a)})}else t(i.error(new Error("CopySource format error")))},deleteMultipleObject:function(e,t){var r=e.Objects||[],n=e.Quiet;r=i.isArray(r)?r:[r];var o=i.json2xml({Delete:{Object:r,Quiet:n||!1}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(o));var s=i.map(r,function(t){return{action:"name/cos:DeleteObject",bucket:e.Bucket,region:e.Region,prefix:t.Key}});p.call(this,{Scope:s,method:"POST",Bucket:e.Bucket,Region:e.Region,body:o,action:"delete",headers:a},function(e,r){if(e)return t(e);var n=r.DeleteResult||{},o=n.Deleted||[],a=n.Error||[];o=i.isArray(o)?o:[o],a=i.isArray(a)?a:[a];var s=i.clone(n);i.extend(s,{Error:a,Deleted:o,statusCode:r.statusCode,headers:r.headers}),t(null,s)})},restoreObject:function(e,t){var r=e.Headers;if(e.RestoreRequest){var n=e.RestoreRequest||{},o=i.json2xml({RestoreRequest:n});r["Content-Type"]="application/xml",r["Content-MD5"]=i.b64(i.md5(o)),p.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,body:o,action:"restore",headers:r},t)}else t(i.error(new Error("missing param RestoreRequest")))},putObjectTagging:function(e,t){var r=e.Tagging||{},n=r.TagSet||r.Tags||e.Tags||[];n=i.clone(i.isArray(n)?n:[n]);var o=i.json2xml({Tagging:{TagSet:{Tag:n}}}),a=e.Headers;a["Content-Type"]="application/xml",a["Content-MD5"]=i.b64(i.md5(o)),p.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:e.Bucket,Key:e.Key,Region:e.Region,body:o,action:"tagging",headers:a,VersionId:e.VersionId},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},getObjectTagging:function(e,t){p.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:e.Key,Bucket:e.Bucket,Region:e.Region,headers:e.Headers,action:"tagging",VersionId:e.VersionId},function(e,r){if(e)if(404!==e.statusCode||!e.error||"Not Found"!==e.error&&"NoSuchTagSet"!==e.error.Code)t(e);else{var n={Tags:[],statusCode:e.statusCode};e.headers&&(n.headers=e.headers),t(null,n)}else{var o=[];try{o=r.Tagging.TagSet.Tag||[]}catch(e){}o=i.clone(i.isArray(o)?o:[o]),t(null,{Tags:o,statusCode:r.statusCode,headers:r.headers})}})},deleteObjectTagging:function(e,t){p.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"tagging",VersionId:e.VersionId},function(e,r){return e&&204===e.statusCode?t(null,{statusCode:e.statusCode}):e?t(e):void t(null,{statusCode:r.statusCode,headers:r.headers})})},selectObjectContent:function(e,t){if(!e.SelectType)return t(i.error(new Error("missing param SelectType")));var r=e.SelectRequest||{},n=i.json2xml({SelectRequest:r}),o=e.Headers;o["Content-Type"]="application/xml",o["Content-MD5"]=i.b64(i.md5(n)),p.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,action:"select",qs:{"select-type":e.SelectType},VersionId:e.VersionId,body:n,DataType:"arraybuffer",rawBody:!0},function(e,r){if(e&&204===e.statusCode)return t(null,{statusCode:e.statusCode});if(e)return t(e);var n=i.parseSelectPayload(r.body);t(null,{statusCode:r.statusCode,headers:r.headers,Body:n.body,Payload:n.payload})})},appendObject:function(e,t){var r=e.Headers;r["Cache-Control"]||r["cache-control"]||(r["Cache-Control"]=""),r["Content-Type"]||r["content-type"]||(r["Content-Type"]=e.Body&&e.Body.type||""),p.call(this,{Action:"name/cos:AppendObject",method:"POST",Bucket:e.Bucket,Region:e.Region,action:"append",Key:e.Key,body:e.Body,qs:{position:e.Position},headers:e.Headers},function(e,r){if(e)return t(e);t(null,r)})},uploadPartCopy:function(e,t){var r=e.CopySource||"",n=i.getSourceParams.call(this,r);if(n){var o=n.Bucket,a=n.Region,s=decodeURIComponent(n.Key);p.call(this,{Scope:[{action:"name/cos:GetObject",bucket:o,region:a,prefix:s},{action:"name/cos:PutObject",bucket:e.Bucket,region:e.Region,prefix:e.Key}],method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,VersionId:e.VersionId,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers},function(e,r){if(e)return t(e);var n=i.clone(r.CopyPartResult||{});i.extend(n,{statusCode:r.statusCode,headers:r.headers}),t(null,n)})}else t(i.error(new Error("CopySource format error")))},multipartInit:function(e,t){var r=this,n=e.Headers,o=e.tracker;n["Cache-Control"]||n["cache-control"]||(n["Cache-Control"]=""),n["Content-Type"]||n["content-type"]||(n["Content-Type"]=e.Body&&e.Body.type||"");var a=e.Body&&(e.UploadAddMetaMd5||r.options.UploadAddMetaMd5);a&&o&&o.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(a,e.Body,function(n){n&&(e.Headers["x-cos-meta-md5"]=n),a&&o&&o.setParams({md5EndTime:(new Date).getTime()}),p.call(r,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:"uploads",headers:e.Headers,qs:e.Query,tracker:o},function(e,r){return e?(o&&o.parent&&o.parent.setParams({errorNode:"multipartInit"}),t(e)):(r=i.clone(r||{}))&&r.InitiateMultipartUploadResult?t(null,i.extend(r.InitiateMultipartUploadResult,{statusCode:r.statusCode,headers:r.headers})):void t(null,r)})},e.onHashProgress)},multipartUpload:function(e,t){var r=this;i.getFileSize("multipartUpload",e,function(){var n=e.tracker,o=r.options.UploadCheckContentMd5;o&&n&&n.setParams({md5StartTime:(new Date).getTime()}),i.getBodyMd5(o,e.Body,function(a){a&&(e.Headers["Content-MD5"]=i.b64(a)),o&&n&&n.setParams({md5EndTime:(new Date).getTime()}),n&&n.setParams({partNumber:e.PartNumber}),p.call(r,{Action:"name/cos:UploadPart",TaskId:e.TaskId,method:"PUT",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{partNumber:e.PartNumber,uploadId:e.UploadId},headers:e.Headers,onProgress:e.onProgress,body:e.Body||null,tracker:n},function(e,r){if(e)return n&&n.parent&&n.parent.setParams({errorNode:"multipartUpload"}),t(e);t(null,{ETag:i.attr(r.headers,"etag",""),statusCode:r.statusCode,headers:r.headers})})})})},multipartComplete:function(e,t){for(var r=this,n=e.UploadId,o=e.Parts,a=e.tracker,s=0,c=o.length;s<c;s++)o[s].ETag&&0===o[s].ETag.indexOf('"')||(o[s].ETag='"'+o[s].ETag+'"');var l=i.json2xml({CompleteMultipartUpload:{Part:o}});l=l.replace(/\n\s*/g,"");var d=e.Headers;d["Content-Type"]="application/xml",d["Content-MD5"]=i.b64(i.md5(l)),p.call(this,{Action:"name/cos:CompleteMultipartUpload",method:"POST",Bucket:e.Bucket,Region:e.Region,Key:e.Key,qs:{uploadId:n},body:l,headers:d,tracker:a},function(n,o){if(n)return a&&a.parent&&a.parent.setParams({errorNode:"multipartComplete"}),t(n);var s=u({ForcePathStyle:r.options.ForcePathStyle,protocol:r.options.Protocol,domain:r.options.Domain,bucket:e.Bucket,region:e.Region,object:e.Key,isLocation:!0}),c=o.CompleteMultipartUploadResult||{};c.ProcessResults&&c&&c.ProcessResults&&(c.UploadResult={OriginalInfo:{Key:c.Key,Location:s,ETag:c.ETag,ImageInfo:c.ImageInfo},ProcessResults:c.ProcessResults},delete c.ImageInfo,delete c.ProcessResults);var l=i.extend(c,{Location:s,statusCode:o.statusCode,headers:o.headers});t(null,l)})},multipartList:function(e,t){var r={};r.delimiter=e.Delimiter,r["encoding-type"]=e.EncodingType,r.prefix=e.Prefix||"",r["max-uploads"]=e.MaxUploads,r["key-marker"]=e.KeyMarker,r["upload-id-marker"]=e.UploadIdMarker,r=i.clearKey(r);var n=e.tracker;n&&n.setParams({signStartTime:(new Date).getTime()}),p.call(this,{Action:"name/cos:ListMultipartUploads",ResourceKey:r.prefix,method:"GET",Bucket:e.Bucket,Region:e.Region,headers:e.Headers,qs:r,action:"uploads",tracker:n},function(e,r){if(e)return n&&n.parent&&n.parent.setParams({errorNode:"multipartList"}),t(e);if(r&&r.ListMultipartUploadsResult){var o=r.ListMultipartUploadsResult.Upload||[];o=i.isArray(o)?o:[o],r.ListMultipartUploadsResult.Upload=o}var a=i.clone(r.ListMultipartUploadsResult||{});i.extend(a,{statusCode:r.statusCode,headers:r.headers}),t(null,a)})},multipartListPart:function(e,t){var r={},n=e.tracker;r.uploadId=e.UploadId,r["encoding-type"]=e.EncodingType,r["max-parts"]=e.MaxParts,r["part-number-marker"]=e.PartNumberMarker,p.call(this,{Action:"name/cos:ListParts",method:"GET",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r},function(e,r){if(e)return n&&n.parent&&n.parent.setParams({errorNode:"multipartListPart"}),t(e);var o=r.ListPartsResult||{},a=o.Part||[];a=i.isArray(a)?a:[a],o.Part=a;var s=i.clone(o);i.extend(s,{statusCode:r.statusCode,headers:r.headers}),t(null,s)})},multipartAbort:function(e,t){var r={};r.uploadId=e.UploadId,p.call(this,{Action:"name/cos:AbortMultipartUpload",method:"DELETE",Bucket:e.Bucket,Region:e.Region,Key:e.Key,headers:e.Headers,qs:r},function(e,r){if(e)return t(e);t(null,{statusCode:r.statusCode,headers:r.headers})})},request:function(e,t){p.call(this,{method:e.Method,Bucket:e.Bucket,Region:e.Region,Key:e.Key,action:e.Action,headers:e.Headers,qs:e.Query,body:e.Body,Url:e.Url,rawBody:e.RawBody,DataType:e.DataType},function(e,r){if(e)return t(e);r&&r.body&&(r.Body=r.body,delete r.body),t(e,r)})},getObjectUrl:function(e,t){var r=void 0===e.UseAccelerate?this.options.UseAccelerate:e.UseAccelerate,n=u({ForcePathStyle:this.options.ForcePathStyle,protocol:e.Protocol||this.options.Protocol,domain:e.Domain||this.options.Domain,bucket:e.Bucket,region:r?"accelerate":e.Region,object:e.Key}),o="";e.Query&&(o+=i.obj2str(e.Query)),e.QueryString&&(o+=(o?"&":"")+e.QueryString);var a=n;if(void 0!==e.Sign&&!e.Sign)return o&&(a+="?"+o),t(null,{Url:a}),a;var s=l.call(this,{Bucket:e.Bucket,Region:e.Region,UseAccelerate:e.UseAccelerate,Url:n}),c=d.call(this,{Action:"PUT"===(e.Method||"").toUpperCase()?"name/cos:PutObject":"name/cos:GetObject",Bucket:e.Bucket||"",Region:e.Region||"",Method:e.Method||"get",Key:e.Key,Expires:e.Expires,Headers:e.Headers,Query:e.Query,SignHost:s,ForceSignHost:!1!==e.ForceSignHost&&this.options.ForceSignHost},function(e,r){if(t)if(e)t(e);else{var i=n;i+="?"+(r.Authorization.indexOf("q-signature")>-1?function(e){var t=e.match(/q-url-param-list.*?(?=&)/g)[0],r="q-url-param-list="+encodeURIComponent(t.replace(/q-url-param-list=/,"")).toLowerCase(),n=new RegExp(t,"g");return e.replace(n,r)}(r.Authorization):"sign="+encodeURIComponent(r.Authorization)),r.SecurityToken&&(i+="&x-cos-security-token="+r.SecurityToken),r.ClientIP&&(i+="&clientIP="+r.ClientIP),r.ClientUA&&(i+="&clientUA="+r.ClientUA),r.Token&&(i+="&token="+r.Token),o&&(i+="&"+o),setTimeout(function(){t(null,{Url:i})})}});return c?(a+="?"+c.Authorization+(c.SecurityToken?"&x-cos-security-token="+c.SecurityToken:""),o&&(a+="&"+o)):o&&(a+="?"+o),a},getAuth:function(e){return i.getAuth({SecretId:e.SecretId||this.options.SecretId||"",SecretKey:e.SecretKey||this.options.SecretKey||"",Bucket:e.Bucket,Region:e.Region,Method:e.Method,Key:e.Key,Query:e.Query,Headers:e.Headers,Expires:e.Expires,UseRawKey:this.options.UseRawKey,SystemClockOffset:this.options.SystemClockOffset})}};e.exports.init=function(e,t){t.transferToTaskMethod(f,"putObject"),i.each(f,function(t,r){e.prototype[r]=i.apiWrapper(r,t),function(e,t,r){i.each(["Cors","Acl"],function(n){if(e.slice(-n.length)===n){var o=e.slice(0,-n.length)+n.toUpperCase(),a=i.apiWrapper(e,t),s=!1;r[o]=function(){!s&&console.warn("warning: cos."+o+" has been deprecated. Please Use cos."+e+" instead."),s=!0,a.apply(this,arguments)}}})}(r,t,e.prototype)})}},"./src/cos.js":
  110. /*!********************!*\
  111. !*** ./src/cos.js ***!
  112. \********************/
  113. /*! no static exports found */function(e,t,r){"use strict";var n=r(/*! ./util */"./src/util.js"),o=r(/*! ./event */"./src/event.js"),i=r(/*! ./task */"./src/task.js"),a=r(/*! ./base */"./src/base.js"),s=r(/*! ./advance */"./src/advance.js"),c=r(/*! ../package.json */"./package.json"),u={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1048576,SliceSize:1048576,CopyChunkParallelLimit:20,CopyChunkSize:10485760,CopySliceSize:10485760,MaxPartNumber:1e4,ProgressInterval:1e3,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,UseRawKey:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadQueueSize:1e4,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,EnableTracker:!1,DeepTracker:!1,TrackerDelay:5e3,CustomId:""},l=function(e){this.options=n.extend(n.clone(u),e||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1048576,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1048576,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.AppId&&console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'),this.options.SecretId&&this.options.SecretId.indexOf(" ")>-1&&(console.error("error: SecretId格式错误,请检查"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey格式错误,请检查"),console.error("error: SecretKey format is incorrect. Please check")),n.isNode()&&(console.warn("warning: cos-js-sdk-v5 不支持 nodejs 环境使用,请改用 cos-nodejs-sdk-v5,参考文档: https://cloud.tencent.com/document/product/436/8629"),console.warn("warning: cos-js-sdk-v5 does not support nodejs environment. Please use cos-nodejs-sdk-v5 instead. See: https://cloud.tencent.com/document/product/436/8629")),o.init(this),i.init(this)};a.init(l,i),s.init(l,i),l.util={md5:n.md5,xml2json:n.xml2json,json2xml:n.json2xml,encodeBase64:n.encodeBase64},l.getAuthorization=n.getAuth,l.version=c.version,e.exports=l},"./src/event.js":
  114. /*!**********************!*\
  115. !*** ./src/event.js ***!
  116. \**********************/
  117. /*! no static exports found */function(e,t){var r=function(e){var t={},r=function(e){return!t[e]&&(t[e]=[]),t[e]};e.on=function(e,t){"task-list-update"===e&&console.warn('warning: Event "'+e+'" has been deprecated. Please use "list-update" instead.'),r(e).push(t)},e.off=function(e,t){for(var n=r(e),o=n.length-1;o>=0;o--)t===n[o]&&n.splice(o,1)},e.emit=function(e,t){for(var n=r(e).map(function(e){return e}),o=0;o<n.length;o++)n[o](t)}};e.exports.init=r,e.exports.EventProxy=function(){r(this)}},"./src/session.js":
  118. /*!************************!*\
  119. !*** ./src/session.js ***!
  120. \************************/
  121. /*! no static exports found */function(e,t,r){var n,o,i=r(/*! ./util */"./src/util.js"),a="cos_sdk_upload_cache",s=function(){try{n.length?localStorage.setItem(a,JSON.stringify(n)):localStorage.removeItem(a)}catch(e){}},c=function(){if(!n){(function(){try{var e=JSON.parse(localStorage.getItem(a))}catch(e){}e||(e=[]),n=e}).call(this);for(var e=!1,t=Math.round(Date.now()/1e3),r=n.length-1;r>=0;r--){var o=n[r][2];(!o||o+2592e3<t)&&(n.splice(r,1),e=!0)}e&&s()}},u=function(){o||(o=setTimeout(function(){s(),o=null},400))},l={using:{},setUsing:function(e){l.using[e]=!0},removeUsing:function(e){delete l.using[e]},getFileId:function(e,t,r,n){return e.name&&e.size&&e.lastModifiedDate&&t?i.md5([e.name,e.size,e.lastModifiedDate,t,r,n].join("::")):null},getCopyFileId:function(e,t,r,n,o){var a=t["content-length"],s=t.etag||"",c=t["last-modified"];return e&&r?i.md5([e,a,s,c,r,n,o].join("::")):null},getUploadIdList:function(e){if(!e)return null;c.call(this);for(var t=[],r=0;r<n.length;r++)n[r][0]===e&&t.push(n[r][1]);return t.length?t:null},saveUploadId:function(e,t,r){if(c.call(this),e){for(var o=n.length-1;o>=0;o--){var i=n[o];i[0]===e&&i[1]===t&&n.splice(o,1)}n.unshift([e,t,Math.round(Date.now()/1e3)]),n.length>r&&n.splice(r),u()}},removeUploadId:function(e){c.call(this),delete l.using[e];for(var t=n.length-1;t>=0;t--)n[t][1]===e&&n.splice(t,1);u()}};e.exports=l},"./src/task.js":
  122. /*!*********************!*\
  123. !*** ./src/task.js ***!
  124. \*********************/
  125. /*! no static exports found */function(e,t,r){var n=r(/*! ./session */"./src/session.js"),o=r(/*! ./util */"./src/util.js"),i={};e.exports.transferToTaskMethod=function(e,t){i[t]=e[t],e[t]=function(e,r){e.SkipTask?i[t].call(this,e,r):this._addTask(t,e,r)}},e.exports.init=function(e){var t,r,a=[],s={},c=0,u=0,l=function(e){var t={id:e.id,Bucket:e.Bucket,Region:e.Region,Key:e.Key,FilePath:e.FilePath,state:e.state,loaded:e.loaded,size:e.size,speed:e.speed,percent:e.percent,hashPercent:e.hashPercent,error:e.error};return e.FilePath&&(t.FilePath=e.FilePath),e._custom&&(t._custom=e._custom),t},d=(r=function(){t=0,e.emit("task-list-update",{list:o.map(a,l)}),e.emit("list-update",{list:o.map(a,l)})},function(){t||(t=setTimeout(r))}),p=function(){if(!(a.length<=e.options.UploadQueueSize)){for(var t=0;t<u&&t<a.length&&a.length>e.options.UploadQueueSize;){var r="waiting"===a[t].state||"checking"===a[t].state||"uploading"===a[t].state;a[t]&&r?t++:(s[a[t].id]&&delete s[a[t].id],a.splice(t,1),u--)}d()}},f=function t(){if(!(c>=e.options.FileParallelLimit)){for(;a[u]&&"waiting"!==a[u].state;)u++;if(!(u>=a.length)){var r=a[u];u++,c++,r.state="checking",r.params.onTaskStart&&r.params.onTaskStart(l(r)),!r.params.UploadData&&(r.params.UploadData={});var n=o.formatParams(r.api,r.params);i[r.api].call(e,n,function(n,o){e._isRunningTask(r.id)&&("checking"!==r.state&&"uploading"!==r.state||(r.state=n?"error":"success",n&&(r.error=n),c--,d(),t(),r.callback&&r.callback(n,o),"success"===r.state&&(r.params&&(delete r.params.UploadData,delete r.params.Body,delete r.params),delete r.callback)),p())}),d(),setTimeout(t)}}},h=function(t,r){var o=s[t];if(o){var i=o&&"waiting"===o.state,a=o&&("checking"===o.state||"uploading"===o.state);if("canceled"===r&&"canceled"!==o.state||"paused"===r&&i||"paused"===r&&a){if("paused"===r&&o.params.Body&&"function"==typeof o.params.Body.pipe)return void console.error("stream not support pause");o.state=r,e.emit("inner-kill-task",{TaskId:t,toState:r});try{var u=o&&o.params&&o.params.UploadData.UploadId}catch(e){}"canceled"===r&&u&&n.removeUsing(u),d(),a&&(c--,f()),"canceled"===r&&(o.params&&(delete o.params.UploadData,delete o.params.Body,delete o.params),delete o.callback)}p()}};e._addTasks=function(t){o.each(t,function(t){e._addTask(t.api,t.params,t.callback,!0)}),d()};var m=!0;e._addTask=function(t,r,n,i){r=o.formatParams(t,r);var c=o.uuid();r.TaskId=c,r.onTaskReady&&r.onTaskReady(c),r.TaskReady&&(r.TaskReady(c),m&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),m=!1);var u={params:r,callback:n,api:t,index:a.length,id:c,Bucket:r.Bucket,Region:r.Region,Key:r.Key,FilePath:r.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:r._custom},l=r.onHashProgress;r.onHashProgress=function(t){e._isRunningTask(u.id)&&(u.hashPercent=t.percent,l&&l(t),d())};var h=r.onProgress;return r.onProgress=function(t){e._isRunningTask(u.id)&&("checking"===u.state&&(u.state="uploading"),u.loaded=t.loaded,u.speed=t.speed,u.percent=t.percent,h&&h(t),d())},o.getFileSize(t,r,function(e,t){if(e)return n(o.error(e));s[c]=u,a.push(u),u.size=t,!i&&d(),f(),p()}),c},e._isRunningTask=function(e){var t=s[e];return!(!t||"checking"!==t.state&&"uploading"!==t.state)},e.getTaskList=function(){return o.map(a,l)},e.cancelTask=function(e){h(e,"canceled")},e.pauseTask=function(e){h(e,"paused")},e.restartTask=function(e){var t=s[e];!t||"paused"!==t.state&&"error"!==t.state||(t.state="waiting",d(),u=Math.min(u,t.index),f())},e.isUploadRunning=function(){return c||u<a.length}}},"./src/tracker.js":
  126. /*!************************!*\
  127. !*** ./src/tracker.js ***!
  128. \************************/
  129. /*! no static exports found */function(e,t,r){var n=r(/*! @babel/runtime/helpers/classCallCheck */"./node_modules/@babel/runtime/helpers/classCallCheck.js"),o=r(/*! @babel/runtime/helpers/createClass */"./node_modules/@babel/runtime/helpers/createClass.js"),i=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),a=r(/*! ../package.json */"./package.json"),s=null,c=function(e){if(!s){var t=r(/*! ../lib/beacon.min */"./lib/beacon.min.js");s=new t({appkey:"0AND0VEVB24UBGDU",versionCode:a.version,channelID:"js_sdk",openid:"openid",unionid:"unid",strictMode:!1,delay:e,sessionDuration:6e4})}return s},u={getUid:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},getNetType:function(){if("object"===("undefined"==typeof navigator?"undefined":i(navigator))){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(null===e||void 0===e?void 0:e.type)||(null===e||void 0===e?void 0:e.effectiveType)||"unknown"}return"unknown"},getOsType:function(){if("object"!==("undefined"==typeof navigator?"undefined":i(navigator)))return"unknown os";var e=navigator.userAgent.toLowerCase(),t=/macintosh|mac os x/i.test(navigator.userAgent);return e.indexOf("win32")>=0||e.indexOf("wow32")>=0?"win32":e.indexOf("win64")>=0||e.indexOf("wow64")>=0?"win64":t?"mac":"unknown os"},isMobile:function(){return!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))},isAndroid:function(){return!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(Android|Adr|Linux)/i))},isIOS:function(){return!("object"!==("undefined"==typeof navigator?"undefined":i(navigator))||!navigator.userAgent.match(/(iPhone|iPod|iPad|iOS)/i))},isOtherMobile:function(){return isMobile&&!isAndroid&&!isIOS},getDeviceName:function(){if("object"!==("undefined"==typeof navigator?"undefined":i(navigator)))return"unknown device";var e=navigator.userAgent.toLowerCase();if(e.includes("app/tencent_wemeet"))return"tencent_wemeet";if(e.indexOf("maxthon")>=0){var t=e.match(/maxthon\/([\d.]+)/),r=t&&t[1]||"";return"傲游浏览器 ".concat(r).trim()}if(e.indexOf("qqbrowser")>=0){var n=e.match(/qqbrowser\/([\d.]+)/),o=n&&n[1]||"";return"QQ浏览器 ".concat(o).trim()}if(e.indexOf("se 2.x")>=0)return"搜狗浏览器";if(e.indexOf("wxwork")>=0)return"微信内置浏览器";if(e.indexOf("msie")>=0){var a=e.match(/msie ([\d.]+)/),s=a&&a[1]||"";return"IE ".concat(s).trim()}if(e.indexOf("firefox")>=0){var c=e.match(/firefox\/([\d.]+)/),u=c&&c[1]||"";return"Firefox ".concat(u).trim()}if(e.indexOf("chrome")>=0){var l=e.match(/chrome\/([\d.]+)/),d=l&&l[1]||"";return"Chrome ".concat(d).trim()}if(e.indexOf("opera")>=0){var p=e.match(/opera.([\d.]+)/),f=p&&p[1]||"";return"Opera ".concat(f).trim()}if(e.indexOf("safari")>=0){var h=e.match(/version\/([\d.]+)/),m=h&&h[1]||"";return"Safari ".concat(m).trim()}if(e.indexOf("edge")>=0){var g=e.match(/edge\/([\d.]+)/),v=g&&g[1]||"";return"edge ".concat(v).trim()}return e.substr(0,200)}},l={isMobile:u.isMobile(),isBrowser:!u.isMobile(),mobileOsType:u.isAndroid()?"android":u.isIOS?"ios":"other_mobile",pcOsType:u.getOsType()},d={deviceType:l.isMobile?"mobile":l.isBrowser?"browser":"unknown",devicePlatform:l.isMobile?l.mobileOsType:l.pcOsType,deviceName:u.getDeviceName()},p=["multipartInit","multipartUpload","multipartComplete","multipartList","multipartListPart","multipartAbort"],f=["putObject","postObject","appendObject","sliceUploadFile","uploadFile","uploadFiles"].concat(p),h=["getObject"];function m(e){return e.replace(/([A-Z])/g,"_$1").toLowerCase()}var g=function(){"use strict";function e(t){n(this,e);var r=t.parent,o=t.traceId,i=t.bucket,s=t.region,l=t.apiName,p=t.fileKey,f=t.fileSize,h=t.accelerate,m=t.customId,g=t.delay,v=t.deepTracker,y=i&&i.substr(i.lastIndexOf("-")+1)||"";this.parent=r,this.deepTracker=v,this.delay=g,this.params={cossdkVersion:a.version,region:s,networkType:"",host:"",accelerate:h?"Y":"N",requestPath:p||"",size:f||-1,httpMd5:0,httpSign:0,httpFull:0,name:l||"",result:"",tookTime:0,errorNode:"",errorCode:"",errorMessage:"",errorRequestId:"",errorStatusCode:0,errorServiceName:"",tracePlatform:"cos-js-sdk-v5",traceId:o||u.getUid(),bucket:i,appid:y,partNumber:0,retryTimes:0,reqUrl:"",customId:m||"",deviceType:d.deviceType,devicePlatform:d.devicePlatform,deviceName:d.deviceName,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:(new Date).getTime(),endTime:0},this.beacon=c(g)}return o(e,[{key:"formatResult",value:function(e,t){var r,n,o,i,a,s,c=(new Date).getTime()-this.params.startTime,l=u.getNetType(),d=e?(null===e||void 0===e?void 0:e.code)||(null===e||void 0===e?void 0:null===(r=e.error)||void 0===r?void 0:r.code)||(null===e||void 0===e?void 0:null===(n=e.error)||void 0===n?void 0:n.Code):"",p=e?(null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:null===(o=e.error)||void 0===o?void 0:o.message)||(null===e||void 0===e?void 0:null===(i=e.error)||void 0===i?void 0:i.Message):"",f=e?(null===e||void 0===e?void 0:e.resource)||(null===e||void 0===e?void 0:null===(a=e.error)||void 0===a?void 0:a.resource)||(null===e||void 0===e?void 0:null===(s=e.error)||void 0===s?void 0:s.Resource):"",h=e?null===e||void 0===e?void 0:e.statusCode:t.statusCode,m=e?(null===e||void 0===e?void 0:e.headers)&&(null===e||void 0===e?void 0:e.headers["x-cos-request-id"]):(null===t||void 0===t?void 0:t.headers)&&(null===t||void 0===t?void 0:t.headers["x-cos-request-id"]),g=e?m?"Server":"Client":"";if(Object.assign(this.params,{tookTime:c,networkType:l,httpMd5:this.params.md5EndTime-this.params.md5StartTime,httpSign:this.params.signEndTime-this.params.signStartTime,httpFull:this.params.httpEndTime-this.params.httpStartTime,result:e?"Fail":"Success",errorType:g,errorCode:d,errorStatusCode:h,errorMessage:p,errorServiceName:f,errorRequestId:m}),!e||d&&p||(this.params.fullError=e?JSON.stringify(e):""),"getObject"===this.params.name&&(this.params.size=t?t.headers&&t.headers["content-length"]:-1),this.params.reqUrl)try{var v=/^http(s)?:\/\/(.*?)\//.exec(this.params.reqUrl);this.params.host=v[2]}catch(e){this.params.host=this.params.reqUrl}this.sendEvents()}},{key:"setParams",value:function(e){Object.assign(this.params,e)}},{key:"sendEvents",value:function(){if(!p.includes(this.params.name)||this.deepTracker){var e,t=(e=this.params.name,f.includes(e)?"cos_upload":h.includes(e)?"cos_download":"base_service"),r=function(e){var t={},r="Success"===e.result?["tracePlatform","cossdkVersion","region","bucket","appid","networkType","host","accelerate","requestPath","partNumber","size","name","result","tookTime","errorRequestId","retryTimes","reqUrl","customId","deviceType","devicePlatform","deviceName"]:["tracePlatform","cossdkVersion","region","networkType","host","accelerate","requestPath","size","httpMd5","httpSign","httpFull","name","result","tookTime","errorNode","errorCode","errorMessage","errorRequestId","errorStatusCode","errorServiceName","errorType","traceId","bucket","appid","partNumber","retryTimes","reqUrl","customId","fullError","deviceType","devicePlatform","deviceName"];for(var n in e)r.includes(n)&&(t[m(n)]=e[n]);return t}(this.params);this.beacon||(this.beacon=c(this.delay||5e3)),0===this.delay?this.beacon&&this.beacon.onDirectUserAction(t,r):this.beacon&&this.beacon.onUserAction(t,r)}}},{key:"generateSubTracker",value:function(t){return Object.assign(t,{parent:this,deepTracker:this.deepTracker,traceId:this.params.traceId,bucket:this.params.bucket,region:this.params.region,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.delay}),new e(t)}}]),e}();e.exports=g},"./src/util.js":
  130. /*!*********************!*\
  131. !*** ./src/util.js ***!
  132. \*********************/
  133. /*! no static exports found */function(e,t,r){"use strict";(function(t){var n=r(/*! @babel/runtime/helpers/typeof */"./node_modules/@babel/runtime/helpers/typeof.js"),o=r(/*! ../lib/md5 */"./lib/md5.js"),i=r(/*! ../lib/crypto */"./lib/crypto.js"),a=r(/*! ../lib/xml2json */"./lib/xml2json.js"),s=r(/*! ../lib/json2xml */"./lib/json2xml.js"),c=r(/*! ../lib/base64 */"./lib/base64.js"),u=r(/*! ./tracker */"./src/tracker.js");function l(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function d(e,t){var r=[];for(var n in e)e.hasOwnProperty(n)&&r.push(t?l(n).toLowerCase():n);return r.sort(function(e,t){return(e=e.toLowerCase())===(t=t.toLowerCase())?0:e>t?1:-1})}var p,f=["cache-control","content-disposition","content-encoding","content-length","content-md5","expect","expires","host","if-match","if-modified-since","if-none-match","if-unmodified-since","origin","range","transfer-encoding"],h=function(e,t,r){var n=t/8,o=e.slice(r,r+n);return new Uint8Array(o).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[t](o)[0]},m=function(e,t,r,n){var o=e.slice(t,r),i="";return new Uint8Array(o).forEach(function(e){i+=String.fromCharCode(e)}),n&&(i=decodeURIComponent(escape(i))),i},g=function(){},v=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&void 0!==e[r]&&null!==e[r]&&(t[r]=e[r]);return t},y=(p=function(e,t){e=e.split("."),t=t.split(".");for(var r=0;r<t.length;r++)if(e[r]!==t[r])return parseInt(e[r])>parseInt(t[r])?1:-1;return 0},function(e){if(!e)return!1;var t=(e.match(/Chrome\/([.\d]+)/)||[])[1],r=(e.match(/QBCore\/([.\d]+)/)||[])[1],n=(e.match(/QQBrowser\/([.\d]+)/)||[])[1];return t&&p(t,"53.0.2785.116")<0&&r&&p(r,"3.53.991.400")<0&&n&&p(n,"9.0.2524.400")<=0||!1}("undefined"!=typeof navigator&&navigator.userAgent));function b(e){return w(e,function(e){return"object"===n(e)&&null!==e?b(e):e})}function k(e,t){return C(t,function(r,n){e[n]=t[n]}),e}function S(e){return e instanceof Array}function C(e,t){for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)}function w(e,t){var r=S(e)?[]:{};for(var n in e)e.hasOwnProperty(n)&&(r[n]=t(e[n],n));return r}var x=function(e,t){if(t=k({},t),"getAuth"!==e&&"getV4Auth"!==e&&"getObjectUrl"!==e){var r=t.Headers||{};if(t&&"object"===n(t)){!function(){for(var e in t)t.hasOwnProperty(e)&&e.indexOf("x-cos-")>-1&&(r[e]=t[e])}();R.each({"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext","Pic-Operations":"PicOperations"},function(e,n){void 0!==t[e]&&(r[n]=t[e])}),t.Headers=v(r)}}return t},E=function(e){return Date.now()+(e||0)},A="object"===("undefined"==typeof navigator?"undefined":n(navigator))&&!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),T="object"===("undefined"==typeof navigator?"undefined":n(navigator))&&/\sQQ/i.test(navigator.userAgent),R={noop:g,formatParams:x,apiWrapper:function(e,t){return function(r,n){var o,i=this;if("function"==typeof r&&(n=r,r={}),r=x(e,r),i.options.EnableTracker)if("sliceUploadFile"===r.calledBySdk)o=r.tracker&&r.tracker.generateSubTracker({apiName:e});else if(["uploadFile","uploadFiles"].includes(e))o=null;else{var a=-1;r.Body&&(a="string"==typeof r.Body?r.Body.length:r.Body.size||r.Body.byteLength||-1),o=new u({bucket:r.Bucket,region:r.Region,apiName:e,fileKey:r.Key,fileSize:a,deepTracker:i.options.DeepTracker,customId:i.options.CustomId,delay:i.options.TrackerDelay})}r.tracker=o;var s=function(e){return e&&e.headers&&(e.headers["x-cos-request-id"]&&(e.RequestId=e.headers["x-cos-request-id"]),e.headers["x-ci-request-id"]&&(e.RequestId=e.headers["x-ci-request-id"]),e.headers["x-cos-version-id"]&&(e.VersionId=e.headers["x-cos-version-id"]),e.headers["x-cos-delete-marker"]&&(e.DeleteMarker=e.headers["x-cos-delete-marker"])),e},c=function(e,t){o&&o.formatResult(e,t),n&&n(s(e),s(t))},l=function(){if("getService"!==e&&"abortUploadTask"!==e){var t=function(e,t){var r=t.Bucket,n=t.Region,o=t.Key,i=this.options.Domain,a=!i||"string"==typeof i&&i.indexOf("{Bucket}")>-1,s=!i||"string"==typeof i&&i.indexOf("{Region}")>-1;if(e.indexOf("Bucket")>-1||"deleteMultipleObject"===e||"multipartList"===e||"listObjectVersions"===e){if(a&&!r)return"Bucket";if(s&&!n)return"Region"}else if(e.indexOf("Object")>-1||e.indexOf("multipart")>-1||"sliceUploadFile"===e||"abortUploadTask"===e){if(a&&!r)return"Bucket";if(s&&!n)return"Region";if(!o)return"Key"}return!1}.call(i,e,r);if(t)return"missing param "+t;if(r.Region){if(i.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(r.Region))return"Region format error."}else{if(r.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(r.Region))return"Region format error."}i.options.CompatibilityMode||-1!==r.Region.indexOf("-")||"yfb"===r.Region||"default"===r.Region||"accelerate"===r.Region||console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(r.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(r.Bucket))if(r.AppId)r.Bucket=r.Bucket+"-"+r.AppId;else{if(!i.options.AppId)return'Bucket should format as "test-1250000000".';r.Bucket=r.Bucket+"-"+i.options.AppId}r.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete r.AppId)}!i.options.UseRawKey&&r.Key&&"/"===r.Key.substr(0,1)&&(r.Key=r.Key.substr(1))}}(),d=["getAuth","getObjectUrl"].includes(e);if("function"==typeof Promise&&!d&&!n)return new Promise(function(e,o){if(n=function(t,r){t?o(t):e(r)},l)return c(R.error(new Error(l)));t.call(i,r,c)});if(l)return c(R.error(new Error(l)));var p=t.call(i,r,c);return d?p:void 0}},xml2json:a,json2xml:s,md5:o,clearKey:v,fileSlice:function(e,t,r,n,o){var i;if(e.slice?i=e.slice(t,r):e.mozSlice?i=e.mozSlice(t,r):e.webkitSlice&&(i=e.webkitSlice(t,r)),n&&y){var a=new FileReader;a.onload=function(e){i=null,o(new Blob([a.result]))},a.readAsArrayBuffer(i)}else o(i)},getBodyMd5:function(e,t,r,n){r=r||g,e?"string"==typeof t?r(R.md5(t,!0)):Blob&&t instanceof Blob?R.getFileMd5(t,function(e,t){r(t)},n):r():r()},getFileMd5:function(e,t,r){var n=e.size,i=0,a=o.getCtx();!function o(s){if(s>=n){var c=a.digest("hex");t(null,c)}else{var u=Math.min(n,s+1048576);R.fileSlice(e,s,u,!1,function(e){var t,c,u,l;t=e,c=function(t){e=null,a=a.update(t,!0),i+=t.length,t=null,r&&r({loaded:i,total:n,percent:Math.round(i/n*1e4)/1e4}),o(s+1048576)},l=new FileReader,FileReader.prototype.readAsBinaryString?(u=FileReader.prototype.readAsBinaryString,l.onload=function(){c(this.result)}):FileReader.prototype.readAsArrayBuffer?u=function(e){var t="",r=new FileReader;r.onload=function(e){for(var n=new Uint8Array(r.result),o=n.byteLength,i=0;i<o;i++)t+=String.fromCharCode(n[i]);c(t)},r.readAsArrayBuffer(e)}:console.error("FileReader not support readAsBinaryString"),u.call(l,t)})}}(0)},b64:function(e){var t,r,n,o="";for(t=0,r=e.length/2;t<r;t++)n=parseInt(e[2*t]+e[2*t+1],16),o+=String.fromCharCode(n);return btoa(o)},extend:k,isArray:S,isInArray:function(e,t){for(var r=!1,n=0;n<e.length;n++)if(t===e[n]){r=!0;break}return r},makeArray:function(e){return S(e)?e:[e]},each:C,map:w,filter:function(e,t){var r=S(e),n=r?[]:{};for(var o in e)e.hasOwnProperty(o)&&t(e[o],o)&&(r?n.push(e[o]):n[o]=e[o]);return n},clone:b,attr:function(e,t,r){return e&&t in e?e[t]:r},uuid:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},camSafeUrlEncode:l,throttleOnProgress:function(e,t){var r,n,o=this,i=0,a=0,s=Date.now();function c(){if(n=0,t&&"function"==typeof t){r=Date.now();var o,c=Math.max(0,Math.round((a-i)/((r-s)/1e3)*100)/100)||0;o=0===a&&0===e?1:Math.floor(a/e*100)/100||0,s=r,i=a;try{t({loaded:a,total:e,speed:c,percent:o})}catch(e){}}}return function(t,r){if(t&&(a=t.loaded,e=t.total),r)clearTimeout(n),c();else{if(n)return;n=setTimeout(c,o.options.ProgressInterval)}}},getFileSize:function(e,t,r){var n;"string"==typeof t.Body?t.Body=new Blob([t.Body],{type:"text/plain"}):t.Body instanceof ArrayBuffer&&(t.Body=new Blob([t.Body])),t.Body&&(t.Body instanceof Blob||"[object File]"===t.Body.toString()||"[object Blob]"===t.Body.toString())?(n=t.Body.size,t.ContentLength=n,r(null,n)):r(R.error(new Error("params body format error, Only allow File|Blob|String.")))},getSkewTime:E,error:function(e,t){var r=e;return e.message=e.message||null,"string"==typeof t?(e.error=t,e.message=t):"object"===n(t)&&null!==t&&(k(e,t),(t.code||t.name)&&(e.code=t.code||t.name),t.message&&(e.message=t.message),t.stack&&(e.stack=t.stack)),"function"==typeof Object.defineProperty&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=t&&t.name||e.name||e.code||"Error",e.code||(e.code=e.name),e.error||(e.error=b(r)),e},obj2str:function(e,t){var r,n,o,i=[],a=d(e);for(r=0;r<a.length;r++)o=void 0===e[n=a[r]]||null===e[n]?"":""+e[n],n=t?l(n).toLowerCase():l(n),o=l(o)||"",i.push(n+"="+o);return i.join("&")},getAuth:function(e){var t,r=(e=e||{}).SecretId,n=e.SecretKey,o=e.KeyTime,a=(e.method||e.Method||"get").toLowerCase(),s=b(e.Query||e.params||{}),c=function(e){var t={};for(var r in e){var n=r.toLowerCase();(n.indexOf("x-cos-")>-1||f.indexOf(n)>-1)&&(t[r]=e[r])}return t}(b(e.Headers||e.headers||{})),u=e.Key||"";e.UseRawKey?t=e.Pathname||e.pathname||"/"+u:0!==(t=e.Pathname||e.pathname||u).indexOf("/")&&(t="/"+t);var l=!1!==e.ForceSignHost;if(!c.Host&&!c.host&&e.Bucket&&e.Region&&l&&(c.Host=e.Bucket+".cos."+e.Region+".myqcloud.com"),!r)throw new Error("missing param SecretId");if(!n)throw new Error("missing param SecretKey");var p=Math.round(E(e.SystemClockOffset)/1e3)-1,h=p,m=e.Expires||e.expires;h+=void 0===m?900:1*m||0;var g=r,v=o||p+";"+h,y=o||p+";"+h,k=d(c,!0).join(";").toLowerCase(),S=d(s,!0).join(";").toLowerCase(),C=i.HmacSHA1(y,n).toString(),w=[a,t,R.obj2str(s,!0),R.obj2str(c,!0),""].join("\n"),x=["sha1",v,i.SHA1(w).toString(),""].join("\n");return["q-sign-algorithm=sha1","q-ak="+g,"q-sign-time="+v,"q-key-time="+y,"q-header-list="+k,"q-url-param-list="+S,"q-signature="+i.HmacSHA1(x,C).toString()].join("&")},parseSelectPayload:function(e){for(var t={},r=m(e),n={records:[]};e.byteLength;){var o,i=h(e,32,0),a=h(e,32,4),s=i-a-16,c=0;for(e=e.slice(12);c<a;){var u=h(e,8,c),l=m(e,c+1,c+1+u),d=h(e,16,c+u+2),p=m(e,c+u+4,c+u+4+d);t[l]=p,c+=u+4+d}if("Records"===t[":event-type"])o=m(e,c,c+s,!0),n.records.push(o);else if("Stats"===t[":event-type"])o=m(e,c,c+s,!0),n.stats=R.xml2json(o).Stats;else if("error"===t[":event-type"]){var f=t[":error-code"],g=t[":error-message"],v=new Error(g);v.message=g,v.name=v.code=f,n.error=v}else["Progress","Continuation","End"].includes(t[":event-type"]);e=e.slice(c+s+4)}return{payload:n.records.join(""),body:r}},getSourceParams:function(e){var t=this.options.CopySourceParser;if(t)return t(e);var r=e.match(/^([^.]+-\d+)\.cos(v6|-cdc|-cdz|-internal)?\.([^.]+)\.((myqcloud\.com)|(tencentcos\.cn))\/(.+)$/);return r?{Bucket:r[1],Region:r[3],Key:r[7]}:null},isBrowser:!0,isNode:function(){return"object"!==("undefined"==typeof window?"undefined":n(window))&&"object"===(void 0===t?"undefined":n(t))&&!("object"===("undefined"==typeof globalThis?"undefined":n(globalThis))&&("DedicatedWorkerGlobalScope"===globalThis.constructor.name||globalThis.FileReaderSync))},isCIHost:function(e){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(e)},isIOS_QQ:A&&T,encodeBase64:function(e,t){var r=c.encode(e);return t&&(r=r.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),r}};e.exports=R}).call(this,r(/*! ./../node_modules/process/browser.js */"./node_modules/process/browser.js"))}})},module.exports=factory()},xT6B:function(e,t,r){"use strict";function n(e){return("00"+e).substr(e.length)}t.a=function(e,t){/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(var o in r)if(new RegExp("("+o+")").test(t)){var i=r[o]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?i:n(i))}return t}}});
  134. //# sourceMappingURL=0.22575540957b5e13d1a2.js.map