!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("preact/compat"));else if("function"==typeof define&&define.amd)define(["preact/compat"],t);else{var r="object"==typeof exports?t(require("preact/compat")):t(e.PreactCompat);for(var s in r)("object"==typeof exports?exports:e)[s]=r[s]}}(Depicter,(e=>(()=>{"use strict";var t={585:t=>{t.exports=e}},r={};function s(e){var o=r[e];if(void 0!==o)return o.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,s),n.exports}s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};s.r(o),s.d(o,{dpcCircleTimer:()=>h});var n,a=s(585);function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)({}).hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},c.apply(null,arguments)}const l=e=>a.createElement("svg",c({width:12,height:16,viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),n||(n=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.99805 14.0029V1.99902C7.99805 0.89453 8.89453 0 9.99805 0C11.1035 0 11.9981 0.89453 11.9981 1.99902V14.0029C11.9981 15.1035 11.1035 16.0029 9.99805 16.0029C8.89453 16.0029 7.99805 15.1035 7.99805 14.0029ZM0 14.0029V1.99902C0 0.89453 0.89453 0 2 0C3.10547 0 4 0.89453 4 1.99902V14.0029C4 15.1035 3.10547 16.0029 2 16.0029C0.89453 16.0029 0 15.1035 0 14.0029Z"})));var i;function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)({}).hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},p.apply(null,arguments)}const u=e=>a.createElement("svg",p({width:11,height:16,viewBox:"0 0 11 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{left:"8%"}},e),i||(i=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0541 7.22605C10.5431 7.62615 10.5431 8.37385 10.0541 8.77395L1.63338 15.6637C0.980451 16.1979 0.000137329 15.7334 0.000137329 14.8897L0.000137329 1.11026C0.000137329 0.266631 0.98045 -0.197916 1.63338 0.336306L10.0541 7.22605Z"}))),d=e=>{const{className:t="dpc-circle-timer",progress:r=50,lineCap:s=!1,thickness:o=10,status:n="play",showSymbol:c=!1,changeStatusOnClick:i=!1,showSymbolOnHover:p=!1,onPause:d,onResume:f}=e,h=50-o/2,m=(0,a.useMemo)((()=>{const e=2*Math.PI*h;return{strokeDasharray:e,strokeDashoffset:e*((100-Math.min(100,Math.max(0,r)))/100)}}),[r,h]),v=(0,a.useMemo)((()=>({inset:`${o+22}%`})),[o]),b=(0,a.useCallback)((()=>{i&&("play"===n?d?.():f?.())}),[d,f,i,n]);return Depicter.h("div",{className:t+(i?" dpc-circle-timer-clickable":""),onClick:b},Depicter.h("svg",{width:"100%",height:"100%",viewBox:"0 0 100 100"},Depicter.h("circle",{className:"dpc-circle-timer-bg-bar",r:h,cx:"50%",cy:"50%",fill:"transparent",stroke:"#e0e0e0",strokeWidth:o}),Depicter.h("circle",{className:"dpc-circle-timer-progress-bar",r:h,cx:"50%",cy:"50%",fill:"transparent",stroke:"#60e6a8",strokeWidth:o,strokeLinecap:s?"round":void 0,style:m})),c&&Depicter.h("div",{className:`dpc-circle-timer-symbol ${p?"dpc-circle-timer-hover-symbol":""} `,style:v},"play"!==n?Depicter.h(u,null):Depicter.h(l,null)))};function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)({}).hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},f.apply(null,arguments)}const h={component:e=>{const{composer:t,...r}=e,[s,o]=(0,a.useState)(0),[n,c]=(0,a.useState)("play"),l=(0,a.useRef)(0),i=(0,a.useRef)(0);(0,a.useEffect)((()=>{let e;const t=()=>{const r=i.current+(l.current-i.current)/10;Math.abs(l.current-i.current)>=.02&&o(r),i.current=r,e=window.requestAnimationFrame(t)};return t(),()=>{e&&window.cancelAnimationFrame(e)}}),[]);const p=(0,a.useCallback)(((e,t)=>{l.current=t/100*115}),[]),u=(0,a.useCallback)((()=>{c("pause")}),[]),h=(0,a.useCallback)((()=>{c("play")}),[]),m=(0,a.useCallback)((()=>{t.slideshow.pause()}),[t.slideshow]),v=(0,a.useCallback)((()=>{t.slideshow.resume()}),[t.slideshow]);return(0,a.useEffect)((()=>(t.on("slideshowTimerUpdate",p),t.on("slideshowPaused",u),t.on("slideshowStart",h),()=>{t.off("slideshowTimerUpdate",p),t.off("slideshowPaused",u),t.off("slideshowStart",h)})),[t,u,p,h]),Depicter.h(d,f({},r,{progress:s,status:n,onPause:m,onResume:v}))},async:!1};return o})()));