@hbis-uni/components 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const vue=require("vue"),_sfc_main$3=vue.defineComponent({__name:"C1",props:{title:{default:"C1 Component"},primary:{type:Boolean,default:!1}},setup(c){return(y,i)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["c1-container",{"c1-primary":c.primary}])},[vue.renderSlot(y.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(c.title),1)],!0)],2))}}),_export_sfc=(c,y)=>{const i=c.__vccOpts||c;for(const[r,n]of y)i[r]=n;return i},C1=_export_sfc(_sfc_main$3,[["__scopeId","data-v-e2028f64"]]),_hoisted_1$1={class:"c2-container"},_hoisted_2$1={class:"c2-title"},_hoisted_3$1={class:"c2-content"},_sfc_main$2=vue.defineComponent({__name:"C2",props:{title:{default:"C2 Component"},showButton:{type:Boolean,default:!0},buttonText:{default:"Click Me"}},emits:["click"],setup(c,{emit:y}){const i=y,r=n=>{i("click",n)};return(n,m)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createElementVNode("h2",_hoisted_2$1,vue.toDisplayString(c.title),1),vue.createElementVNode("div",_hoisted_3$1,[vue.renderSlot(n.$slots,"default",{},void 0,!0)]),c.showButton?(vue.openBlock(),vue.createElementBlock("button",{key:0,class:"c2-button",onClick:r},vue.toDisplayString(c.buttonText),1)):vue.createCommentVNode("",!0)]))}}),C2=_export_sfc(_sfc_main$2,[["__scopeId","data-v-b1d573ae"]]),_hoisted_1={key:0},_hoisted_2={class:"hbis-date-strip__weekdays"},_hoisted_3={class:"hbis-date-strip__dates"},_hoisted_4=["onClick"],_hoisted_5={class:"hbis-date-strip__date-number"},_hoisted_6={class:"hbis-date-strip__date-slot"},_hoisted_7={key:1,class:"hbis-date-strip__scroll-wrapper"},_hoisted_8={class:"hbis-date-strip__scroll-container"},_hoisted_9={class:"hbis-date-strip__weekdays"},_hoisted_10={class:"hbis-date-strip__dates"},_hoisted_11=["onClick"],_hoisted_12={class:"hbis-date-strip__date-number"},_hoisted_13={class:"hbis-date-strip__date-slot"},_sfc_main$1=vue.defineComponent({__name:"hbis-dateStrip",props:{modelValue:{default:()=>new Date},startDate:{default:()=>new Date},endDate:{default:()=>{const c=new Date;return c.setDate(c.getDate()+30),c}},highlightType:{default:"bg"},showToday:{type:Boolean,default:!0},disablePast:{type:Boolean,default:!1},disableFuture:{type:Boolean,default:!1},selectedColor:{default:"#ffffff"},normalColor:{default:"#666666"},selectedBgColor:{default:"#1890ff"},normalBgColor:{default:"transparent"},scrollable:{type:Boolean,default:!1},visibleDays:{default:7}},emits:["update:modelValue","dateClick"],setup(c,{emit:y}){const i=c,r=y,n=vue.computed(()=>{if(console.log("props:",{startDate:i.startDate,endDate:i.endDate,scrollable:i.scrollable}),i.scrollable)return console.log("显式设置了scrollable为true,允许滚动"),!0;try{const s=new Date(i.startDate);s.setHours(0,0,0,0);const h=new Date(i.endDate);if(h.setHours(0,0,0,0),isNaN(s.getTime())||isNaN(h.getTime()))return console.log("无效的日期对象,使用默认滚动行为"),!1;const e=h.getTime()-s.getTime(),k=Math.ceil(e/(1e3*60*60*24)),o=k+1;return console.log("日期范围天数计算:",{start:s.toLocaleDateString(),end:h.toLocaleDateString(),diffTime:e,diffDays:k,totalDays:o,shouldScroll:o>7}),o>7}catch(s){return console.error("计算日期范围时出错:",s),!1}}),m=[{value:0,label:"日",isWeekend:!0},{value:1,label:"一",isWeekend:!1},{value:2,label:"二",isWeekend:!1},{value:3,label:"三",isWeekend:!1},{value:4,label:"四",isWeekend:!1},{value:5,label:"五",isWeekend:!1},{value:6,label:"六",isWeekend:!0}],f=vue.computed(()=>{const s=d.value[0];if(!s)return m;const h=s.weekday,e=[];for(let k=0;k<7;k++){const o=(h+k)%7;e.push(m[o])}return e}),v=()=>{const s=i.startDate||new Date,h=s.getDay(),e=s.getDate()-(h===0?6:h-1),k=new Date(s);return k.setDate(e),k};vue.ref(v()),vue.onMounted(()=>{console.log("props:",i),console.log("highlightType:",i.highlightType)}),vue.watch(()=>i.highlightType,s=>{console.log("highlightType changed:",s)}),vue.watch(()=>i.modelValue,s=>{console.log("modelValue changed:",s)});const a=vue.computed(()=>{const s=[];try{const h=i.startDate,e=i.endDate;if(isNaN(h.getTime())||isNaN(e.getTime()))return console.log("无效的日期对象,返回空数组"),s;const k=Math.ceil((e.getTime()-h.getTime())/(1e3*60*60*24))+1;for(let o=0;o<k;o++){const g=new Date(h);g.setDate(h.getDate()+o),isNaN(g.getTime())||s.push({date:g,dateString:l(g),day:g.getDate(),month:g.getMonth()+1,year:g.getFullYear(),isWeekend:g.getDay()===0||g.getDay()===6,weekday:g.getDay()})}}catch(h){console.error("生成日期数组时出错:",h)}return s}),d=vue.computed(()=>a.value.filter(s=>!!(s&&s.date&&s.dateString&&!isNaN(s.date.getTime())&&typeof s.dateString=="string"&&typeof s.day=="number"))),l=s=>`${s.getFullYear()}-${String(s.getMonth()+1).padStart(2,"0")}-${String(s.getDate()).padStart(2,"0")}`,t=s=>{const h=s.dateString;return i.modelValue?Array.isArray(i.modelValue)?i.modelValue.some(e=>!e||isNaN(e.getTime())?!1:l(e)===h):isNaN(i.modelValue.getTime())?!1:l(i.modelValue)===h:!1},u=s=>{const h=l(new Date);return s.dateString===h},p=s=>{const h=s.date;return i.disablePast&&h<new Date(new Date().setHours(0,0,0,0))||i.disableFuture&&h>new Date(new Date().setHours(23,59,59,999))?!1:h>=i.startDate&&h<=i.endDate},x=s=>{var h;return((h=m.find(e=>e.value===s))==null?void 0:h.label)||""},_=s=>{p(s)&&(r("dateClick",s),r("update:modelValue",s.date))};return(s,h)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["hbis-date-strip",{"hbis-date-strip--highlight-bg":c.highlightType==="bg","hbis-date-strip--highlight-dot":c.highlightType==="dot","hbis-date-strip--highlight-round":c.highlightType==="round","hbis-date-strip--scrollable":n.value}])},[n.value?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7,[vue.createElementVNode("div",_hoisted_8,[vue.createElementVNode("div",_hoisted_9,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(d.value,e=>(vue.openBlock(),vue.createElementBlock("div",{key:e.dateString+"-weekday",class:vue.normalizeClass(["hbis-date-strip__weekday",{"hbis-date-strip__weekday--weekend":e.isWeekend}])},vue.toDisplayString(x(e.weekday)),3))),128))]),vue.createElementVNode("div",_hoisted_10,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(d.value,e=>(vue.openBlock(),vue.createElementBlock("div",{key:e.dateString,class:vue.normalizeClass(["hbis-date-strip__date",{"hbis-date-strip__date--selected":t(e),"hbis-date-strip__date--today":u(e),"hbis-date-strip__date--disabled":!p(e),"hbis-date-strip__date--weekend":e.isWeekend}]),style:vue.normalizeStyle({color:t(e)?c.selectedColor:c.normalColor,backgroundColor:t(e)?c.selectedBgColor:c.normalBgColor}),onClick:k=>_(e)},[vue.createElementVNode("div",_hoisted_12,vue.toDisplayString(e.day),1),vue.createElementVNode("div",_hoisted_13,[vue.renderSlot(s.$slots,"default",{date:e},void 0,!0)])],14,_hoisted_11))),128))])])])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1,[vue.createElementVNode("div",_hoisted_2,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(f.value,e=>(vue.openBlock(),vue.createElementBlock("div",{key:e.value,class:vue.normalizeClass(["hbis-date-strip__weekday",{"hbis-date-strip__weekday--weekend":e.isWeekend}])},vue.toDisplayString(e.label),3))),128))]),vue.createElementVNode("div",_hoisted_3,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(d.value,e=>(vue.openBlock(),vue.createElementBlock("div",{key:e.dateString,class:vue.normalizeClass(["hbis-date-strip__date",{"hbis-date-strip__date--selected":t(e),"hbis-date-strip__date--today":u(e),"hbis-date-strip__date--disabled":!p(e),"hbis-date-strip__date--weekend":e.isWeekend}]),style:vue.normalizeStyle({color:t(e)?c.selectedColor:c.normalColor,backgroundColor:t(e)?c.selectedBgColor:c.normalBgColor}),onClick:k=>_(e)},[vue.createElementVNode("div",_hoisted_5,vue.toDisplayString(e.day),1),vue.createElementVNode("div",_hoisted_6,[vue.renderSlot(s.$slots,"default",{date:e},void 0,!0)])],14,_hoisted_4))),128))])]))],2))}}),hbisDateStrip=_export_sfc(_sfc_main$1,[["__scopeId","data-v-2e8258eb"]]);var svga_lite_min={exports:{}};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const vue=require("vue"),_sfc_main$3=vue.defineComponent({__name:"C1",props:{title:{default:"C1 Component"},primary:{type:Boolean,default:!1}},setup(c){return(y,i)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["c1-container",{"c1-primary":c.primary}])},[vue.renderSlot(y.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(c.title),1)],!0)],2))}}),_export_sfc=(c,y)=>{const i=c.__vccOpts||c;for(const[r,n]of y)i[r]=n;return i},C1=_export_sfc(_sfc_main$3,[["__scopeId","data-v-e2250793"]]),_hoisted_1$1={class:"c2-container"},_hoisted_2$1={class:"c2-title"},_hoisted_3$1={class:"c2-content"},_sfc_main$2=vue.defineComponent({__name:"C2",props:{title:{default:"C2 Component"},showButton:{type:Boolean,default:!0},buttonText:{default:"Click Me"}},emits:["click"],setup(c,{emit:y}){const i=y,r=n=>{i("click",n)};return(n,m)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$1,[vue.createElementVNode("h2",_hoisted_2$1,vue.toDisplayString(c.title),1),vue.createElementVNode("div",_hoisted_3$1,[vue.renderSlot(n.$slots,"default",{},void 0,!0)]),c.showButton?(vue.openBlock(),vue.createElementBlock("button",{key:0,class:"c2-button",onClick:r},vue.toDisplayString(c.buttonText),1)):vue.createCommentVNode("",!0)]))}}),C2=_export_sfc(_sfc_main$2,[["__scopeId","data-v-ed1086ed"]]),_hoisted_1={key:0},_hoisted_2={class:"hbis-date-strip__weekdays"},_hoisted_3={class:"hbis-date-strip__dates"},_hoisted_4=["onClick"],_hoisted_5={class:"hbis-date-strip__date-number"},_hoisted_6={class:"hbis-date-strip__date-slot"},_hoisted_7={key:1,class:"hbis-date-strip__scroll-wrapper"},_hoisted_8={class:"hbis-date-strip__scroll-container"},_hoisted_9={class:"hbis-date-strip__weekdays"},_hoisted_10={class:"hbis-date-strip__dates"},_hoisted_11=["onClick"],_hoisted_12={class:"hbis-date-strip__date-number"},_hoisted_13={class:"hbis-date-strip__date-slot"},_sfc_main$1=vue.defineComponent({__name:"hbis-dateStrip",props:{modelValue:{default:()=>new Date},startDate:{default:()=>new Date},endDate:{default:()=>{const c=new Date;return c.setDate(c.getDate()+30),c}},highlightType:{default:"bg"},showToday:{type:Boolean,default:!0},disablePast:{type:Boolean,default:!1},disableFuture:{type:Boolean,default:!1},selectedColor:{default:"#ffffff"},normalColor:{default:"#666666"},selectedBgColor:{default:"#1890ff"},normalBgColor:{default:"transparent"},scrollable:{type:Boolean,default:!1},visibleDays:{default:7}},emits:["update:modelValue","dateClick"],setup(c,{emit:y}){const i=c,r=y,n=vue.computed(()=>{if(console.log("props:",{startDate:i.startDate,endDate:i.endDate,scrollable:i.scrollable}),i.scrollable)return console.log("显式设置了scrollable为true,允许滚动"),!0;try{const s=new Date(i.startDate);s.setHours(0,0,0,0);const h=new Date(i.endDate);if(h.setHours(0,0,0,0),isNaN(s.getTime())||isNaN(h.getTime()))return console.log("无效的日期对象,使用默认滚动行为"),!1;const e=h.getTime()-s.getTime(),k=Math.ceil(e/(1e3*60*60*24)),o=k+1;return console.log("日期范围天数计算:",{start:s.toLocaleDateString(),end:h.toLocaleDateString(),diffTime:e,diffDays:k,totalDays:o,shouldScroll:o>7}),o>7}catch(s){return console.error("计算日期范围时出错:",s),!1}}),m=[{value:0,label:"日",isWeekend:!0},{value:1,label:"一",isWeekend:!1},{value:2,label:"二",isWeekend:!1},{value:3,label:"三",isWeekend:!1},{value:4,label:"四",isWeekend:!1},{value:5,label:"五",isWeekend:!1},{value:6,label:"六",isWeekend:!0}],f=vue.computed(()=>{const s=d.value[0];if(!s)return m;const h=s.weekday,e=[];for(let k=0;k<7;k++){const o=(h+k)%7;e.push(m[o])}return e}),v=()=>{const s=i.startDate||new Date,h=s.getDay(),e=s.getDate()-(h===0?6:h-1),k=new Date(s);return k.setDate(e),k};vue.ref(v()),vue.onMounted(()=>{console.log("props:",i),console.log("highlightType:",i.highlightType)}),vue.watch(()=>i.highlightType,s=>{console.log("highlightType changed:",s)}),vue.watch(()=>i.modelValue,s=>{console.log("modelValue changed:",s)});const a=vue.computed(()=>{const s=[];try{const h=i.startDate,e=i.endDate;if(isNaN(h.getTime())||isNaN(e.getTime()))return console.log("无效的日期对象,返回空数组"),s;const k=Math.ceil((e.getTime()-h.getTime())/(1e3*60*60*24))+1;for(let o=0;o<k;o++){const g=new Date(h);g.setDate(h.getDate()+o),isNaN(g.getTime())||s.push({date:g,dateString:l(g),day:g.getDate(),month:g.getMonth()+1,year:g.getFullYear(),isWeekend:g.getDay()===0||g.getDay()===6,weekday:g.getDay()})}}catch(h){console.error("生成日期数组时出错:",h)}return s}),d=vue.computed(()=>a.value.filter(s=>!!(s&&s.date&&s.dateString&&!isNaN(s.date.getTime())&&typeof s.dateString=="string"&&typeof s.day=="number"))),l=s=>`${s.getFullYear()}-${String(s.getMonth()+1).padStart(2,"0")}-${String(s.getDate()).padStart(2,"0")}`,t=s=>{const h=s.dateString;return i.modelValue?Array.isArray(i.modelValue)?i.modelValue.some(e=>!e||isNaN(e.getTime())?!1:l(e)===h):isNaN(i.modelValue.getTime())?!1:l(i.modelValue)===h:!1},u=s=>{const h=l(new Date);return s.dateString===h},p=s=>{const h=s.date;return i.disablePast&&h<new Date(new Date().setHours(0,0,0,0))||i.disableFuture&&h>new Date(new Date().setHours(23,59,59,999))?!1:h>=i.startDate&&h<=i.endDate},x=s=>{var h;return((h=m.find(e=>e.value===s))==null?void 0:h.label)||""},_=s=>{p(s)&&(r("dateClick",s),r("update:modelValue",s.date))};return(s,h)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["hbis-date-strip",{"hbis-date-strip--highlight-bg":c.highlightType==="bg","hbis-date-strip--highlight-dot":c.highlightType==="dot","hbis-date-strip--highlight-round":c.highlightType==="round","hbis-date-strip--scrollable":n.value}])},[n.value?(vue.openBlock(),vue.createElementBlock("div",_hoisted_7,[vue.createElementVNode("div",_hoisted_8,[vue.createElementVNode("div",_hoisted_9,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(d.value,e=>(vue.openBlock(),vue.createElementBlock("div",{key:e.dateString+"-weekday",class:vue.normalizeClass(["hbis-date-strip__weekday",{"hbis-date-strip__weekday--weekend":e.isWeekend}])},vue.toDisplayString(x(e.weekday)),3))),128))]),vue.createElementVNode("div",_hoisted_10,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(d.value,e=>(vue.openBlock(),vue.createElementBlock("div",{key:e.dateString,class:vue.normalizeClass(["hbis-date-strip__date",{"hbis-date-strip__date--selected":t(e),"hbis-date-strip__date--today":u(e),"hbis-date-strip__date--disabled":!p(e),"hbis-date-strip__date--weekend":e.isWeekend}]),style:vue.normalizeStyle({color:t(e)?c.selectedColor:c.normalColor,backgroundColor:t(e)?c.selectedBgColor:c.normalBgColor}),onClick:k=>_(e)},[vue.createElementVNode("div",_hoisted_12,vue.toDisplayString(e.day),1),vue.createElementVNode("div",_hoisted_13,[vue.renderSlot(s.$slots,"default",{date:e},void 0,!0)])],14,_hoisted_11))),128))])])])):(vue.openBlock(),vue.createElementBlock("div",_hoisted_1,[vue.createElementVNode("div",_hoisted_2,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(f.value,e=>(vue.openBlock(),vue.createElementBlock("div",{key:e.value,class:vue.normalizeClass(["hbis-date-strip__weekday",{"hbis-date-strip__weekday--weekend":e.isWeekend}])},vue.toDisplayString(e.label),3))),128))]),vue.createElementVNode("div",_hoisted_3,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(d.value,e=>(vue.openBlock(),vue.createElementBlock("div",{key:e.dateString,class:vue.normalizeClass(["hbis-date-strip__date",{"hbis-date-strip__date--selected":t(e),"hbis-date-strip__date--today":u(e),"hbis-date-strip__date--disabled":!p(e),"hbis-date-strip__date--weekend":e.isWeekend}]),style:vue.normalizeStyle({color:t(e)?c.selectedColor:c.normalColor,backgroundColor:t(e)?c.selectedBgColor:c.normalBgColor}),onClick:k=>_(e)},[vue.createElementVNode("div",_hoisted_5,vue.toDisplayString(e.day),1),vue.createElementVNode("div",_hoisted_6,[vue.renderSlot(s.$slots,"default",{date:e},void 0,!0)])],14,_hoisted_4))),128))])]))],2))}}),hbisDateStrip=_export_sfc(_sfc_main$1,[["__scopeId","data-v-f7fe6423"]]);var svga_lite_min={exports:{}};/*!
2
2
  * svga.lite
3
3
  *
4
4
  * Version: 1.6.1
@@ -9,5 +9,5 @@
9
9
  /** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */
10
10
  (function(){"use strict";var t=void 0,e=this;function r(r,i){var s,n=r.split("."),o=e;!(n[0]in o)&&o.execScript&&o.execScript("var "+n[0]);for(;n.length&&(s=n.shift());)n.length||i===t?o=o[s]?o[s]:o[s]={}:o[s]=i}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;function s(t){var e,r,s,n,o,a,f,h,l,u,p=t.length,d=0,c=Number.POSITIVE_INFINITY;for(h=0;h<p;++h)t[h]>d&&(d=t[h]),t[h]<c&&(c=t[h]);for(e=1<<d,r=new(i?Uint32Array:Array)(e),s=1,n=0,o=2;s<=d;){for(h=0;h<p;++h)if(t[h]===s){for(a=0,f=n,l=0;l<s;++l)a=a<<1|1&f,f>>=1;for(u=s<<16|h,l=a;l<e;l+=o)r[l]=u;++n}++s,n<<=1,o<<=1}return[r,d,c]}function n(t,e){switch(this.g=[],this.h=32768,this.d=this.f=this.a=this.l=0,this.input=i?new Uint8Array(t):t,this.m=!1,this.i=a,this.r=!1,!e&&(e={})||(e.index&&(this.a=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.r=e.resize)),this.i){case o:this.b=32768,this.c=new(i?Uint8Array:Array)(32768+this.h+258);break;case a:this.b=0,this.c=new(i?Uint8Array:Array)(this.h),this.e=this.z,this.n=this.v,this.j=this.w;break;default:throw Error("invalid inflate mode")}}var o=0,a=1,f={t:o,s:a};n.prototype.k=function(){for(;!this.m;){var e=S(this,3);switch(1&e&&(this.m=!0),e>>>=1){case 0:var r=this.input,n=this.a,f=this.c,h=this.b,l=r.length,u=t,d=f.length,c=t;if(this.d=this.f=0,n+1>=l)throw Error("invalid uncompressed block header: LEN");if(u=r[n++]|r[n++]<<8,n+1>=l)throw Error("invalid uncompressed block header: NLEN");if(u===~(r[n++]|r[n++]<<8))throw Error("invalid uncompressed block header: length verify");if(n+u>r.length)throw Error("input buffer is broken");switch(this.i){case o:for(;h+u>f.length;){if(u-=c=d-h,i)f.set(r.subarray(n,n+c),h),h+=c,n+=c;else for(;c--;)f[h++]=r[n++];this.b=h,f=this.e(),h=this.b}break;case a:for(;h+u>f.length;)f=this.e({p:2});break;default:throw Error("invalid inflate mode")}if(i)f.set(r.subarray(n,n+u),h),h+=u,n+=u;else for(;u--;)f[h++]=r[n++];this.a=n,this.b=h,this.c=f;break;case 1:this.j(_,x);break;case 2:var y,v,m,b,g=S(this,5)+257,A=S(this,5)+1,w=S(this,4)+4,k=new(i?Uint8Array:Array)(p.length),O=t,E=t,T=t,N=t,I=t;for(I=0;I<w;++I)k[p[I]]=S(this,3);if(!i)for(I=w,w=k.length;I<w;++I)k[p[I]]=0;for(y=s(k),O=new(i?Uint8Array:Array)(g+A),I=0,b=g+A;I<b;)switch(E=j(this,y),E){case 16:for(N=3+S(this,2);N--;)O[I++]=T;break;case 17:for(N=3+S(this,3);N--;)O[I++]=0;T=0;break;case 18:for(N=11+S(this,7);N--;)O[I++]=0;T=0;break;default:T=O[I++]=E}v=s(i?O.subarray(0,g):O.slice(0,g)),m=s(i?O.subarray(g):O.slice(g)),this.j(v,m);break;default:throw Error("unknown BTYPE: "+e)}}return this.n()};var h,l,u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=i?new Uint16Array(u):u,d=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],c=i?new Uint16Array(d):d,y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],v=i?new Uint8Array(y):y,m=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],b=i?new Uint16Array(m):m,g=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],A=i?new Uint8Array(g):g,w=new(i?Uint8Array:Array)(288);for(h=0,l=w.length;h<l;++h)w[h]=143>=h?8:255>=h?9:279>=h?7:8;var k,O,_=s(w),E=new(i?Uint8Array:Array)(30);for(k=0,O=E.length;k<O;++k)E[k]=5;var x=s(E);function S(t,e){for(var r,i=t.f,s=t.d,n=t.input,o=t.a,a=n.length;s<e;){if(o>=a)throw Error("input buffer is broken");i|=n[o++]<<s,s+=8}return r=i&(1<<e)-1,t.f=i>>>e,t.d=s-e,t.a=o,r}function j(t,e){for(var r,i,s=t.f,n=t.d,o=t.input,a=t.a,f=o.length,h=e[0],l=e[1];n<l&&!(a>=f);)s|=o[a++]<<n,n+=8;if((i=(r=h[s&(1<<l)-1])>>>16)>n)throw Error("invalid code length: "+i);return t.f=s>>i,t.d=n-i,t.a=a,65535&r}function T(t,e){var r,i;switch(this.input=t,this.a=0,!e&&(e={})||(e.index&&(this.a=e.index),e.verify&&(this.A=e.verify)),r=t[this.a++],i=t[this.a++],15&r){case N:this.method=N;break;default:throw Error("unsupported compression method")}if(0!=((r<<8)+i)%31)throw Error("invalid fcheck flag:"+((r<<8)+i)%31);if(32&i)throw Error("fdict flag is not supported");this.q=new n(t,{index:this.a,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}n.prototype.j=function(t,e){var r=this.c,i=this.b;this.o=t;for(var s,n,o,a,f=r.length-258;256!==(s=j(this,t));)if(256>s)i>=f&&(this.b=i,r=this.e(),i=this.b),r[i++]=s;else for(a=c[n=s-257],0<v[n]&&(a+=S(this,v[n])),s=j(this,e),o=b[s],0<A[s]&&(o+=S(this,A[s])),i>=f&&(this.b=i,r=this.e(),i=this.b);a--;)r[i]=r[i++-o];for(;8<=this.d;)this.d-=8,this.a--;this.b=i},n.prototype.w=function(t,e){var r=this.c,i=this.b;this.o=t;for(var s,n,o,a,f=r.length;256!==(s=j(this,t));)if(256>s)i>=f&&(f=(r=this.e()).length),r[i++]=s;else for(a=c[n=s-257],0<v[n]&&(a+=S(this,v[n])),s=j(this,e),o=b[s],0<A[s]&&(o+=S(this,A[s])),i+a>f&&(f=(r=this.e()).length);a--;)r[i]=r[i++-o];for(;8<=this.d;)this.d-=8,this.a--;this.b=i},n.prototype.e=function(){var t,e,r=new(i?Uint8Array:Array)(this.b-32768),s=this.b-32768,n=this.c;if(i)r.set(n.subarray(32768,r.length));else for(t=0,e=r.length;t<e;++t)r[t]=n[t+32768];if(this.g.push(r),this.l+=r.length,i)n.set(n.subarray(s,s+32768));else for(t=0;32768>t;++t)n[t]=n[s+t];return this.b=32768,n},n.prototype.z=function(t){var e,r,s,n=this.input.length/this.a+1|0,o=this.input,a=this.c;return t&&("number"==typeof t.p&&(n=t.p),"number"==typeof t.u&&(n+=t.u)),2>n?r=(s=(o.length-this.a)/this.o[2]/2*258|0)<a.length?a.length+s:a.length<<1:r=a.length*n,i?(e=new Uint8Array(r)).set(a):e=a,this.c=e},n.prototype.n=function(){var t,e,r,s,n,o=0,a=this.c,f=this.g,h=new(i?Uint8Array:Array)(this.l+(this.b-32768));if(0===f.length)return i?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);for(e=0,r=f.length;e<r;++e)for(s=0,n=(t=f[e]).length;s<n;++s)h[o++]=t[s];for(e=32768,r=this.b;e<r;++e)h[o++]=a[e];return this.g=[],this.buffer=h},n.prototype.v=function(){var t,e=this.b;return i?this.r?(t=new Uint8Array(e)).set(this.c.subarray(0,e)):t=this.c.subarray(0,e):(this.c.length>e&&(this.c.length=e),t=this.c),this.buffer=t},T.prototype.k=function(){var t,e,r=this.input;if(t=this.q.k(),this.a=this.q.a,this.A){e=(r[this.a++]<<24|r[this.a++]<<16|r[this.a++]<<8|r[this.a++])>>>0;var i=t;if("string"==typeof i){var s,n,o=i.split("");for(s=0,n=o.length;s<n;s++)o[s]=(255&o[s].charCodeAt(0))>>>0;i=o}for(var a,f=1,h=0,l=i.length,u=0;0<l;){l-=a=1024<l?1024:l;do{h+=f+=i[u++]}while(--a);f%=65521,h%=65521}if(e!==(h<<16|f)>>>0)throw Error("invalid adler-32 checksum")}return t};var N=8;r("Zlib.Inflate",T),r("Zlib.Inflate.prototype.decompress",T.prototype.k);var I,B,F,D,M={ADAPTIVE:f.s,BLOCK:f.t};if(Object.keys)I=Object.keys(M);else for(B in I=[],F=0,M)I[F++]=B;for(F=0,D=I.length;F<D;++F)r("Zlib.Inflate.BufferType."+(B=I[F]),M[B])}).call(this)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=[],r=0;r<t.length;r+=32768)e.push(String.fromCharCode.apply(null,t.subarray(r,r+32768)));return e.join("")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(27),s=function(t,e){this.videoSize={width:0,height:0},this.images={},this.dynamicElements={},this.sprites=[],this.version=t.version,this.videoSize.width=t.params.viewBoxWidth||0,this.videoSize.height=t.params.viewBoxHeight||0,this.FPS=t.params.fps||20,this.frames=t.params.frames||0,t.sprites instanceof Array&&(this.sprites=t.sprites.map(function(t){return new i.default(t)})),e&&(this.images=e)};e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(28),s=function(t){this.frames=[],this.imageKey=t.imageKey,t.frames&&(this.frames=t.frames.map(function(t){return new i.default(t)}))};e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(29),s=function(t,e,r,i,s,n){return{a:t,b:e,c:r,d:i,tx:s,ty:n}},n=function(t,e,r,i){return{x:t,y:e,width:r,height:i}},o=function(){function t(e){this.alpha=0,this.transform=s(1,0,0,1,0,0),this.nx=0,this.ny=0,this.layout=n(0,0,0,0),this.shapes=[],this.alpha=parseFloat(e.alpha)||0,e.layout&&(this.layout=n(parseFloat(e.layout.x)||0,parseFloat(e.layout.y)||0,parseFloat(e.layout.width)||0,parseFloat(e.layout.height)||0)),e.transform&&(this.transform=s(parseFloat(e.transform.a)||1,parseFloat(e.transform.b)||0,parseFloat(e.transform.c)||0,parseFloat(e.transform.d)||1,parseFloat(e.transform.tx)||0,parseFloat(e.transform.ty)||0)),e.clipPath&&e.clipPath.length>0&&(this.maskPath=new i.default(e.clipPath,void 0,{fill:"#000000"})),e.shapes&&(e.shapes instanceof Array&&e.shapes.forEach(function(t){switch(t.pathArgs=t.args,t.type){case 0:t.type="shape",t.pathArgs=t.shape;break;case 1:t.type="rect",t.pathArgs=t.rect;break;case 2:t.type="ellipse",t.pathArgs=t.ellipse;break;case 3:t.type="keep"}if(t.styles){t.styles.fill&&("number"==typeof t.styles.fill.r&&(t.styles.fill[0]=t.styles.fill.r),"number"==typeof t.styles.fill.g&&(t.styles.fill[1]=t.styles.fill.g),"number"==typeof t.styles.fill.b&&(t.styles.fill[2]=t.styles.fill.b),"number"==typeof t.styles.fill.a&&(t.styles.fill[3]=t.styles.fill.a)),t.styles.stroke&&("number"==typeof t.styles.stroke.r&&(t.styles.stroke[0]=t.styles.stroke.r),"number"==typeof t.styles.stroke.g&&(t.styles.stroke[1]=t.styles.stroke.g),"number"==typeof t.styles.stroke.b&&(t.styles.stroke[2]=t.styles.stroke.b),"number"==typeof t.styles.stroke.a&&(t.styles.stroke[3]=t.styles.stroke.a));var e=t.styles.lineDash||[];switch(t.styles.lineDashI>0&&e.push(t.styles.lineDashI),t.styles.lineDashII>0&&(e.length<1&&e.push(0),e.push(t.styles.lineDashII),e.push(0)),t.styles.lineDashIII>0&&(e.length<2&&(e.push(0),e.push(0)),e[2]=t.styles.lineDashIII),t.styles.lineDash=e,t.styles.lineJoin){case 0:t.styles.lineJoin="miter";break;case 1:t.styles.lineJoin="round";break;case 2:t.styles.lineJoin="bevel"}switch(t.styles.lineCap){case 0:t.styles.lineCap="butt";break;case 1:t.styles.lineCap="round";break;case 2:t.styles.lineCap="square"}}}),e.shapes[0]&&"keep"===e.shapes[0].type?this.shapes=t.lastShapes:(t.lastShapes=e.shapes,this.shapes=e.shapes));var r=this.transform.a*this.layout.x+this.transform.c*this.layout.y+this.transform.tx,o=this.transform.a*(this.layout.x+this.layout.width)+this.transform.c*this.layout.y+this.transform.tx,a=this.transform.a*this.layout.x+this.transform.c*(this.layout.y+this.layout.height)+this.transform.tx,f=this.transform.a*(this.layout.x+this.layout.width)+this.transform.c*(this.layout.y+this.layout.height)+this.transform.tx,h=this.transform.b*this.layout.x+this.transform.d*this.layout.y+this.transform.ty,l=this.transform.b*(this.layout.x+this.layout.width)+this.transform.d*this.layout.y+this.transform.ty,u=this.transform.b*this.layout.x+this.transform.d*(this.layout.y+this.layout.height)+this.transform.ty,p=this.transform.b*(this.layout.x+this.layout.width)+this.transform.d*(this.layout.y+this.layout.height)+this.transform.ty;this.nx=Math.min(Math.min(a,f),Math.min(r,o)),this.ny=Math.min(Math.min(u,p),Math.min(h,l))}return t.lastShapes="",t}();e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t,e,r){this._d=t,this._transform=e,this._styles=r};e.default=i}]);`,Parser=function(){function Parser(_a){var disableWorker=(_a===void 0?{disableWorker:!1}:_a).disableWorker;disableWorker?(eval(WORKER),this.worker=window.SVGAParserMockWorker):this.worker=new Worker(window.URL.createObjectURL(new Blob([WORKER])))}return Parser.prototype.do=function(c){var y=this,i=new Uint8Array(c,0,4);if(i[0]==80&&i[1]==75&&i[2]==3&&i[3]==4)throw"this parser not support version@1.x of svga.";if(!c)throw new Error("Parser Data not found");if(!this.worker)throw new Error("Parser Worker not found");return new Promise(function(r,n){var m;y.worker.disableWorker?((m=y.worker).onmessageCallback=function(f){r(f)},m.onmessage({data:c})):((m=y.worker).postMessage(c),m.onmessage=function(f){var v=f.data;r(v)})})},Parser.prototype.destroy=function(){var c=this.worker;c.terminate&&c.terminate()},Parser}();exports$1.default=Parser},function(c,y,i){Object.defineProperty(y,"__esModule",{value:!0});var r,n,m,f=i(5),v=i(9);(function(l){l.START="start",l.RESUME="resume",l.PROCESS="process",l.PAUSE="pause",l.STOP="stop",l.END="end",l.CLEAR="clear"})(r||(r={})),function(l){l.FORWARDS="forwards",l.BACKWARDS="backwards"}(n||(n={})),function(l){l.FORWARDS="forwards",l.FALLBACKS="fallbacks"}(m||(m={}));var a=typeof window<"u"&&"IntersectionObserver"in window,d=function(){function l(t,u,p){if(this.videoItem=u,this.loop=!0,this.fillMode=n.FORWARDS,this.playMode=m.FORWARDS,this.progress=0,this.currentFrame=0,this.totalFramesCount=0,this.startFrame=0,this.endFrame=0,this.cacheFrames=!1,this.intersectionObserverRender=!1,this.intersectionObserverRenderShow=!0,this._intersectionObserver=null,this.$onEvent={start:function(){},resume:function(){},process:function(){},pause:function(){},stop:function(){},end:function(){},clear:function(){}},this.container=typeof t=="string"?document.body.querySelector(t):t,!this.container)throw new Error("container undefined.");if(!this.container.getContext)throw new Error("container should be HTMLCanvasElement.");this._renderer=new f.default(this),this._animator=new v.default,this.videoItem&&this.mount(u),p&&this.set(p)}return l.prototype.set=function(t){var u=this;t.loop!==void 0&&(this.loop=t.loop),t.fillMode&&(this.fillMode=t.fillMode),t.playMode&&(this.playMode=t.playMode),t.cacheFrames!==void 0&&(this.cacheFrames=t.cacheFrames),this.startFrame=t.startFrame?t.startFrame:this.startFrame,this.endFrame=t.endFrame?t.endFrame:this.endFrame,t.intersectionObserverRender!==void 0&&(this.intersectionObserverRender=t.intersectionObserverRender),a&&this.intersectionObserverRender?(this._intersectionObserver=new IntersectionObserver(function(p){p[0].intersectionRatio<=0?u.intersectionObserverRenderShow&&(u.intersectionObserverRenderShow=!1):!u.intersectionObserverRenderShow&&(u.intersectionObserverRenderShow=!0)},{rootMargin:"0px",threshold:[0,.5,1]}),this._intersectionObserver.observe(this.container)):(this._intersectionObserver&&this._intersectionObserver.disconnect(),this.intersectionObserverRender=!1,this.intersectionObserverRenderShow=!0),this._animator.noExecutionDelay=t.noExecutionDelay},l.prototype.mount=function(t){var u=this;return new Promise(function(p,x){u.currentFrame=0,u.progress=0,u.totalFramesCount=t.frames-1,u.videoItem=t,u._renderer.prepare().then(p),u._renderer.clear(),u._setSize()})},l.prototype.start=function(){if(!this.videoItem)throw new Error("video item undefined.");this._renderer.clear(),this._startAnimation(),this.$onEvent.start()},l.prototype.resume=function(){if(!this.videoItem)throw new Error("video item undefined.");this._startAnimation(),this.$onEvent.resume()},l.prototype.pause=function(){this._animator&&this._animator.stop(),this.$onEvent.pause()},l.prototype.stop=function(){this._animator&&this._animator.stop(),this.currentFrame=0,this._renderer.drawFrame(this.currentFrame),this.$onEvent.stop()},l.prototype.clear=function(){this._animator&&this._animator.stop(),this._renderer.clear(),this.$onEvent.clear()},l.prototype.destroy=function(){this._animator&&this._animator.stop(),this._renderer.clear(),this._animator=null,this._renderer=null,this.videoItem=null},l.prototype.$on=function(t,u){var p=this;return this.$onEvent[t]=u,t==="end"&&(this._animator.onEnd=function(){return p.$onEvent.end()}),this},l.prototype._startAnimation=function(){var t=this,u=this,p=u.playMode,x=u.totalFramesCount,_=u.startFrame,s=u.endFrame,h=u.videoItem;this.currentFrame===x&&(this.currentFrame=_||0),this._animator.startValue=p==="fallbacks"?s||x:_||0,this._animator.endValue=p==="fallbacks"?_||0:s||x;var e=h.frames;s>0&&s>_?e=s-_:s<=0&&_>0&&(e=h.frames-_),this._animator.duration=e*(1/h.FPS)*1e3,this._animator.loop=this.loop===!0||this.loop<=0?1/0:this.loop===!1?1:this.loop,this._animator.fillRule=this.fillMode==="backwards"?1:0,this._animator.onUpdate=function(k){k=Math.floor(k),t.currentFrame!==k&&(t.currentFrame=k,t.progress=parseFloat((k+1).toString())/parseFloat(h.frames.toString())*100,t._renderer.drawFrame(t.currentFrame),t.$onEvent.process())},this._animator.start(this.currentFrame)},l.prototype._setSize=function(){var t=this.videoItem.videoSize;this.container.width=t.width,this.container.height=t.height},l}();y.default=d},function(c,y,i){Object.defineProperty(y,"__esModule",{value:!0});var r=i(6),n=function(){function m(f){this._bitmapCache={},this._dynamicElements={},this._frames={},this._player=f;var v=this._player.container;this._ofsCanvas=window.OffscreenCanvas?new window.OffscreenCanvas(v.width,v.height):document.createElement("canvas")}return m.prototype.prepare=function(){var f=this;return new Promise(function(v,a){if(f._bitmapCache={},f._player.videoItem.images&&Object.keys(f._player.videoItem.images).length!=0){f._player.videoItem.dynamicElements&&(f._dynamicElements=f._player.videoItem.dynamicElements);var d=0,l=0;for(var t in f._player.videoItem.images){var u=f._player.videoItem.images[t];if(typeof u!="string"||u.indexOf("iVBO")!==0&&u.indexOf("/9j/2w")!==0)f._bitmapCache[t]=u;else{d++;var p=document.createElement("img");p.src="data:image/png;base64,"+u,f._bitmapCache[t]=p,p.onload=function(){++l===d&&v()}}}}else v()})},m.prototype.clear=function(){this._player.container.width=this._player.container.width},m.prototype.drawFrame=function(f){var v=this._player;if(!v.intersectionObserverRender||v.intersectionObserverRenderShow){this.clear();var a=v.container.getContext("2d");if(this._player.cacheFrames&&this._frames[f]){var d=this._frames[f];a.drawImage(d,0,0,d.width,d.height,0,0,d.width,d.height)}else{var l=this._ofsCanvas;if(l.width=this._player.container.width,l.height=this._player.container.height,r.default(l,this._bitmapCache,this._dynamicElements,this._player.videoItem,this._player.currentFrame),a.drawImage(l,0,0,l.width,l.height,0,0,l.width,l.height),this._player.cacheFrames)if("toDataURL"in l){var t=l.toDataURL(),u=new Image;u.src=t,this._frames[f]=u}else this._frames[f]=l.transferToImageBitmap()}}},m}();y.default=n},function(c,y,i){Object.defineProperty(y,"__esModule",{value:!0}),y.default=void 0;var r=f(i(0)),n=f(i(7)),m=f(i(8));function f(t){return t&&t.__esModule?t:{default:t}}var v="MLHVCSQRZmlhvcsqrz";function a(t,u){var p=u._styles;p!==void 0&&(p&&p.stroke?t.strokeStyle="rgba(".concat(parseInt((255*p.stroke[0]).toString()),", ").concat(parseInt((255*p.stroke[1]).toString()),", ").concat(parseInt((255*p.stroke[2]).toString()),", ").concat(p.stroke[3],")"):t.strokeStyle="transparent",p&&(t.lineWidth=p.strokeWidth||void 0,t.lineCap=p.lineCap||void 0,t.lineJoin=p.lineJoin||void 0,t.miterLimit=p.miterLimit||void 0),p&&p.fill?t.fillStyle="rgba(".concat(parseInt((255*p.fill[0]).toString()),", ").concat(parseInt((255*p.fill[1]).toString()),", ").concat(parseInt((255*p.fill[2]).toString()),", ").concat(p.fill[3],")"):t.fillStyle="transparent",p&&p.lineDash&&t.setLineDash(p.lineDash))}function d(t,u){t.save(),a(t,u),u._transform!==void 0&&u._transform!==null&&t.transform(u._transform.a||1,u._transform.b||0,u._transform.c||0,u._transform.d||1,u._transform.tx||0,u._transform.ty||0);var p={x:0,y:0,x1:0,y1:0,x2:0,y2:0};t.beginPath(),u._d.replace(/([a-zA-Z])/g,"|||$1 ").replace(/,/g," ").split("|||").forEach(function(x){if(x.length!=0){var _=x.substr(0,1);if(v.indexOf(_)>=0){var s=x.substr(1).trim().split(" ");(function(h,e,k,o){switch(k){case"M":e.x=Number(o[0]),e.y=Number(o[1]),h.moveTo(e.x,e.y);break;case"m":e.x+=Number(o[0]),e.y+=Number(o[1]),h.moveTo(e.x,e.y);break;case"L":e.x=Number(o[0]),e.y=Number(o[1]),h.lineTo(e.x,e.y);break;case"l":e.x+=Number(o[0]),e.y+=Number(o[1]),h.lineTo(e.x,e.y);break;case"H":e.x=Number(o[0]),h.lineTo(e.x,e.y);break;case"h":e.x+=Number(o[0]),h.lineTo(e.x,e.y);break;case"V":e.y=Number(o[0]),h.lineTo(e.x,e.y);break;case"v":e.y+=Number(o[0]),h.lineTo(e.x,e.y);break;case"C":e.x1=Number(o[0]),e.y1=Number(o[1]),e.x2=Number(o[2]),e.y2=Number(o[3]),e.x=Number(o[4]),e.y=Number(o[5]),h.bezierCurveTo(e.x1,e.y1,e.x2,e.y2,e.x,e.y);break;case"c":e.x1=e.x+Number(o[0]),e.y1=e.y+Number(o[1]),e.x2=e.x+Number(o[2]),e.y2=e.y+Number(o[3]),e.x+=Number(o[4]),e.y+=Number(o[5]),h.bezierCurveTo(e.x1,e.y1,e.x2,e.y2,e.x,e.y);break;case"S":e.x1&&e.y1&&e.x2&&e.y2?(e.x1=e.x-e.x2+e.x,e.y1=e.y-e.y2+e.y,e.x2=Number(o[0]),e.y2=Number(o[1]),e.x=Number(o[2]),e.y=Number(o[3]),h.bezierCurveTo(e.x1,e.y1,e.x2,e.y2,e.x,e.y)):(e.x1=Number(o[0]),e.y1=Number(o[1]),e.x=Number(o[2]),e.y=Number(o[3]),h.quadraticCurveTo(e.x1,e.y1,e.x,e.y));break;case"s":e.x1&&e.y1&&e.x2&&e.y2?(e.x1=e.x-e.x2+e.x,e.y1=e.y-e.y2+e.y,e.x2=e.x+Number(o[0]),e.y2=e.y+Number(o[1]),e.x+=Number(o[2]),e.y+=Number(o[3]),h.bezierCurveTo(e.x1,e.y1,e.x2,e.y2,e.x,e.y)):(e.x1=e.x+Number(o[0]),e.y1=e.y+Number(o[1]),e.x+=Number(o[2]),e.y+=Number(o[3]),h.quadraticCurveTo(e.x1,e.y1,e.x,e.y));break;case"Q":e.x1=Number(o[0]),e.y1=Number(o[1]),e.x=Number(o[2]),e.y=Number(o[3]),h.quadraticCurveTo(e.x1,e.y1,e.x,e.y);break;case"q":e.x1=e.x+Number(o[0]),e.y1=e.y+Number(o[1]),e.x+=Number(o[2]),e.y+=Number(o[3]),h.quadraticCurveTo(e.x1,e.y1,e.x,e.y);break;case"A":case"a":break;case"Z":case"z":h.closePath()}})(t,p,_,s)}}}),u._styles&&u._styles.fill?t.fill():u._styles&&u._styles.stroke&&t.stroke(),t.restore()}var l=function(t,u,p,x,_){var s=t.getContext("2d");return x.sprites.forEach(function(h){var e=h.frames[_];if(!(e.alpha<.05)){s.save(),s.globalAlpha=e.alpha,s.transform(e.transform.a||1,e.transform.b||0,e.transform.c||0,e.transform.d||1,e.transform.tx||0,e.transform.ty||0);var k=u[h.imageKey];k&&(e.maskPath!==void 0&&e.maskPath!==null&&(e.maskPath._styles=void 0,d(s,e.maskPath),s.clip()),s.drawImage(k,0,0));var o=p[h.imageKey];o&&s.drawImage(o,(e.layout.width-o.width)/2,(e.layout.height-o.height)/2),e.shapes&&e.shapes.forEach(function(g){g.type==="shape"&&g.pathArgs&&g.pathArgs.d?d(s,new r.default(g.pathArgs.d,g.transform,g.styles)):g.type==="ellipse"&&g.pathArgs?function(w,b){w.save(),a(w,b),b._transform!==void 0&&b._transform!==null&&w.transform(b._transform.a||1,b._transform.b||0,b._transform.c||0,b._transform.d||1,b._transform.tx||0,b._transform.ty||0);var A=b._x-b._radiusX,S=b._y-b._radiusY,E=2*b._radiusX,N=2*b._radiusY,O=E/2*.5522848,F=N/2*.5522848,C=A+E,j=S+N,D=A+E/2,T=S+N/2;w.beginPath(),w.moveTo(A,T),w.bezierCurveTo(A,T-F,D-O,S,D,S),w.bezierCurveTo(D+O,S,C,T-F,C,T),w.bezierCurveTo(C,T+F,D+O,j,D,j),w.bezierCurveTo(D-O,j,A,T+F,A,T),b._styles&&b._styles.fill?w.fill():b._styles&&b._styles.stroke&&w.stroke(),w.restore()}(s,new n.default(parseFloat(g.pathArgs.x)||0,parseFloat(g.pathArgs.y)||0,parseFloat(g.pathArgs.radiusX)||0,parseFloat(g.pathArgs.radiusY)||0,g.transform,g.styles)):g.type==="rect"&&g.pathArgs&&function(w,b){w.save(),a(w,b),b._transform!==void 0&&b._transform!==null&&w.transform(b._transform.a||1,b._transform.b||0,b._transform.c||0,b._transform.d||1,b._transform.tx||0,b._transform.ty||0);var A=b._x,S=b._y,E=b._width,N=b._height,O=b._cornerRadius;E<2*O&&(O=E/2),N<2*O&&(O=N/2),w.beginPath(),w.moveTo(A+O,S),w.arcTo(A+E,S,A+E,S+N,O),w.arcTo(A+E,S+N,A,S+N,O),w.arcTo(A,S+N,A,S,O),w.arcTo(A,S,A+E,S,O),w.closePath(),b._styles&&b._styles.fill?w.fill():b._styles&&b._styles.stroke&&w.stroke(),w.restore()}(s,new m.default(parseFloat(g.pathArgs.x)||0,parseFloat(g.pathArgs.y)||0,parseFloat(g.pathArgs.width)||0,parseFloat(g.pathArgs.height)||0,parseFloat(g.pathArgs.cornerRadius)||0,g.transform,g.styles))}),s.restore()}}),t};y.default=l},function(c,y,i){var r,n=(r=function(f,v){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var l in d)Object.prototype.hasOwnProperty.call(d,l)&&(a[l]=d[l])})(f,v)},function(f,v){function a(){this.constructor=f}r(f,v),f.prototype=v===null?Object.create(v):(a.prototype=v.prototype,new a)});Object.defineProperty(y,"__esModule",{value:!0});var m=function(f){function v(a,d,l,t,u,p){var x=f.call(this)||this;return x._x=a,x._y=d,x._radiusX=l,x._radiusY=t,x._transform=u,x._styles=p,x}return n(v,f),v}(i(0).default);y.default=m},function(c,y,i){var r,n=(r=function(f,v){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,d){a.__proto__=d}||function(a,d){for(var l in d)Object.prototype.hasOwnProperty.call(d,l)&&(a[l]=d[l])})(f,v)},function(f,v){function a(){this.constructor=f}r(f,v),f.prototype=v===null?Object.create(v):(a.prototype=v.prototype,new a)});Object.defineProperty(y,"__esModule",{value:!0});var m=function(f){function v(a,d,l,t,u,p,x){var _=f.call(this)||this;return _._x=a,_._y=d,_._width=l,_._height=t,_._cornerRadius=u,_._transform=p,_._styles=x,_}return n(v,f),v}(i(0).default);y.default=m},function(c,y,i){Object.defineProperty(y,"__esModule",{value:!0});var r=function(){function n(){this._currentTimeMillsecond=function(){return typeof performance>"u"?new Date().getTime():performance.now()},this.noExecutionDelay=!1,this.startValue=0,this.endValue=0,this.duration=0,this.loop=1,this.fillRule=0,this.onStart=function(){},this.onUpdate=function(){},this.onEnd=function(){},this._isRunning=!1,this._mStartTime=0,this._currentFrication=0,this._worker=null}return n.prototype.start=function(m){this.doStart(m)},n.prototype.stop=function(){this._doStop()},Object.defineProperty(n.prototype,"animatedValue",{get:function(){return(this.endValue-this.startValue)*this._currentFrication+this.startValue},enumerable:!1,configurable:!0}),n.prototype.doStart=function(m){this._isRunning=!0,this._mStartTime=this._currentTimeMillsecond(),m&&(this._mStartTime-=m/(this.endValue-this.startValue)*this.duration),this._currentFrication=0,this.noExecutionDelay&&this._worker===null&&(this._worker=new Worker(window.URL.createObjectURL(new Blob([`onmessage = function () {
11
11
  setTimeout(function() {postMessage(null)}, 1 / 60)
12
- }`])))),this.onStart(),this._doFrame()},n.prototype._doStop=function(){this._isRunning=!1,this._worker!==null&&(this._worker.terminate(),this._worker=null)},n.prototype._doFrame=function(){this._isRunning&&(this._doDeltaTime(this._currentTimeMillsecond()-this._mStartTime),this._isRunning&&(this._worker?(this._worker.onmessage=this._doFrame.bind(this),this._worker.postMessage(null)):window.requestAnimationFrame(this._doFrame.bind(this))))},n.prototype._doDeltaTime=function(m){m>=this.duration*this.loop?(this._currentFrication=this.fillRule===1?0:1,this._isRunning=!1):this._currentFrication=m%this.duration/this.duration,this.onUpdate(this.animatedValue),this._isRunning===!1&&(this._worker!==null&&(this._worker.terminate(),this._worker=null),this.onEnd())},n}();y.default=r}]).default})})(svga_lite_min);var svga_lite_minExports=svga_lite_min.exports;const _sfc_main={__name:"hbis-svgaPlayer",props:{src:{type:String,required:!0},autoplay:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},progress:{type:Number,default:0},speed:{type:Number,default:1},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"}},emits:["loaded","play","pause","ended","progress","error"],setup(c,{expose:y,emit:i}){vue.useCssVars(e=>({v5ce75b7f:c.width,v26351a8e:c.height}));const r=c,n=i,m=vue.ref(null),f=vue.ref(null);let v=null,a=null,d=null;const l=async()=>{try{v=new svga_lite_minExports.Parser,d=await v.load(r.src),a=new svga_lite_minExports.Player(f.value),a.loop=r.loop,a.speed=r.speed,a.onStart=()=>n("play"),a.onPause=()=>n("pause"),a.onEnd=()=>n("ended"),a.onFrame=()=>n("progress",a.progress),await a.setAnimationData(d),r.progress>0&&(a.progress=r.progress),r.autoplay&&a.start(),n("loaded")}catch(e){console.error("SVGA 加载失败:",e),n("error",e)}},t=()=>{a&&a.start()},u=()=>{a&&a.pause()},p=()=>{a&&a.stop()},x=()=>{a&&(a.stop(),a.start())},_=e=>{a&&(a.progress=e)},s=e=>{a&&(a.speed=e)},h=e=>{a&&(a.loop=e)};return y({play:t,pause:u,stop:p,restart:x,setProgress:_,setSpeed:s,setLoop:h}),vue.watch(()=>r.src,async e=>{e&&await l()}),vue.watch(()=>r.loop,e=>{h(e)}),vue.watch(()=>r.speed,e=>{s(e)}),vue.watch(()=>r.progress,e=>{_(e)}),vue.onMounted(async()=>{await vue.nextTick(),await l()}),vue.onUnmounted(()=>{a&&(a.stop(),a=null),v&&(v=null),d=null}),(e,k)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"containerRef",ref:m,class:"svga-player-container"},[vue.createElementVNode("canvas",{ref_key:"canvasRef",ref:f,class:"svga-player-canvas"},null,512)],512))}},HbisSvgaPlayer=_export_sfc(_sfc_main,[["__scopeId","data-v-6b83dcf1"]]);exports.C1=C1;exports.C2=C2;exports.HbisSvgaPlayer=HbisSvgaPlayer;exports.hbisDateStrip=hbisDateStrip;exports.hbisSvgaPlayer=HbisSvgaPlayer;
12
+ }`])))),this.onStart(),this._doFrame()},n.prototype._doStop=function(){this._isRunning=!1,this._worker!==null&&(this._worker.terminate(),this._worker=null)},n.prototype._doFrame=function(){this._isRunning&&(this._doDeltaTime(this._currentTimeMillsecond()-this._mStartTime),this._isRunning&&(this._worker?(this._worker.onmessage=this._doFrame.bind(this),this._worker.postMessage(null)):window.requestAnimationFrame(this._doFrame.bind(this))))},n.prototype._doDeltaTime=function(m){m>=this.duration*this.loop?(this._currentFrication=this.fillRule===1?0:1,this._isRunning=!1):this._currentFrication=m%this.duration/this.duration,this.onUpdate(this.animatedValue),this._isRunning===!1&&(this._worker!==null&&(this._worker.terminate(),this._worker=null),this.onEnd())},n}();y.default=r}]).default})})(svga_lite_min);var svga_lite_minExports=svga_lite_min.exports;const _sfc_main={__name:"hbis-svgaPlayer",props:{src:{type:String,required:!0},autoplay:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},progress:{type:Number,default:0},speed:{type:Number,default:1},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"}},emits:["loaded","play","pause","ended","progress","error"],setup(c,{expose:y,emit:i}){vue.useCssVars(e=>({v404d30eb:c.width,a0ec1abc:c.height}));const r=c,n=i,m=vue.ref(null),f=vue.ref(null);let v=null,a=null,d=null;const l=async()=>{try{v=new svga_lite_minExports.Parser,d=await v.load(r.src),a=new svga_lite_minExports.Player(f.value),a.loop=r.loop,a.speed=r.speed,a.onStart=()=>n("play"),a.onPause=()=>n("pause"),a.onEnd=()=>n("ended"),a.onFrame=()=>n("progress",a.progress),await a.setAnimationData(d),r.progress>0&&(a.progress=r.progress),r.autoplay&&a.start(),n("loaded")}catch(e){console.error("SVGA 加载失败:",e),n("error",e)}},t=()=>{a&&a.start()},u=()=>{a&&a.pause()},p=()=>{a&&a.stop()},x=()=>{a&&(a.stop(),a.start())},_=e=>{a&&(a.progress=e)},s=e=>{a&&(a.speed=e)},h=e=>{a&&(a.loop=e)};return y({play:t,pause:u,stop:p,restart:x,setProgress:_,setSpeed:s,setLoop:h}),vue.watch(()=>r.src,async e=>{e&&await l()}),vue.watch(()=>r.loop,e=>{h(e)}),vue.watch(()=>r.speed,e=>{s(e)}),vue.watch(()=>r.progress,e=>{_(e)}),vue.onMounted(async()=>{await vue.nextTick(),await l()}),vue.onUnmounted(()=>{a&&(a.stop(),a=null),v&&(v=null),d=null}),(e,k)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"containerRef",ref:m,class:"svga-player-container"},[vue.createElementVNode("canvas",{ref_key:"canvasRef",ref:f,class:"svga-player-canvas"},null,512)],512))}},HbisSvgaPlayer=_export_sfc(_sfc_main,[["__scopeId","data-v-94c319f8"]]);exports.C1=C1;exports.C2=C2;exports.HbisSvgaPlayer=HbisSvgaPlayer;exports.hbisDateStrip=hbisDateStrip;exports.hbisSvgaPlayer=HbisSvgaPlayer;
13
13
  //# sourceMappingURL=index.cjs.js.map