@autoafleveren/ui 1.0.6 → 1.0.7

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.
Files changed (3) hide show
  1. package/dist/ui.cjs +1 -1
  2. package/dist/ui.js +263 -263
  3. package/package.json +1 -1
package/dist/ui.cjs CHANGED
@@ -623,7 +623,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
623
623
  <span>0</span>
624
624
  <span>`).concat(this.decimalSeparator,`</span>
625
625
  </div>
626
- </div>`)),a++;if(a>n)for(var o=this.rootElement.getElementsByClassName(this.digitClassname),i=function(c){var u=o[c].parentElement;u.style.animationDuration=s.durationFade+"ms",u.style.animationName="numberflip-animation-fade-out",setTimeout(function(){return u.remove()},s.durationFade)},s=this,l=n;l<o.length;l++)i(l)},e.prototype.setDigitInContainers=function(t,n){for(var a=this,o=this.getDigitsOfNumber(t),i=this.rootElement.getElementsByClassName(this.digitClassname),s=function(u){var d=i[u],f=typeof o[u]=="number"?o[u]:-1;if(typeof f=="number"){var p=l.calculateTranslateY(f);setTimeout(function(){var m=n?a.durationSlide:0;d.style.transitionDuration=m+"ms",d.style.transform="translateY(".concat(p,"%)")},0)}},l=this,c=0;c<i.length;c++)s(c)},e.prototype.getDigitsOfNumber=function(t){var n=this.numberFormatter(t).split("");return n.map(function(a){return a==="."?".":parseInt(a,10)})},e.prototype.calculateTranslateY=function(t){var n=9.090909090909092;return(-10*n+(t+1)*n).toString()},e}();const lA={class:"mr-6 w-full select-none"},cA=r.defineComponent({__name:"AppStepper",props:r.mergeModels({title:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=r.useModel(e,"modelValue"),n=r.useTemplateRef("flipRef"),a=r.ref();r.watch(t,s=>{var l,c;(c=(l=a.value)==null?void 0:l.setNumber)==null||c.call(l,s)}),r.onMounted(()=>{n.value&&(a.value=new sA({rootElement:n.value,initialNumber:t.value,durationSlide:500,wrapperClassname:"flex overflow-hidden relative transition-opacity transition-1000",digitClassname:"flex flex-col absolute transition-transform transition-1000 ease-in-out *:text-center"}),setTimeout(()=>{var s,l;(l=(s=a.value)==null?void 0:s.setNumber)==null||l.call(s,t.value)},100))});function o(){t.value+=1}function i(){t.value!==0&&(t.value-=1)}return(s,l)=>(r.openBlock(),r.createBlock(r.unref(hp),{"content-classes":"flex items-center",class:"p-4!"},{default:r.withCtx(()=>{var c,u;return[r.createElementVNode("div",lA,[r.renderSlot(s.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(s.title),1)])]),r.createVNode(r.unref(Mn),{icon:(c=r.unref(In).far)==null?void 0:c.minus,"aria-disabled":t.value===0,class:"cursor-pointer aria-disabled:cursor-not-allowed aria-disabled:opacity-50","data-test-decrement-icon":"",onClick:i},null,8,["icon","aria-disabled"]),r.createElementVNode("div",{ref_key:"flipRef",ref:n,class:"w-16 shrink-0 justify-center text-center font-bold","data-test-number-flip":""},null,512),r.createVNode(r.unref(Mn),{icon:(u=r.unref(In).far)==null?void 0:u.plus,class:"cursor-pointer","data-test-increment-icon":"",onClick:o},null,8,["icon"])]}),_:3}))}}),uA={class:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10"},dA={class:"absolute left-0 bottom-2 z-20 -ml-8 flex sm:-ml-5 sm:-translate-y-2.5 sm:pr-4"},o2=r.defineComponent({__name:"AppDrawer",props:{withBackdrop:{type:Boolean,default:!0},preventBackdropClose:{type:Boolean,default:!1},contentClasses:{default:""},modalClasses:{default:""},panelClasses:{default:""},content:{},properties:{default:void 0}},emits:["open","close"],setup(e,{expose:t,emit:n}){const a=n,o=r.ref(!1);async function i(){o.value=!0,a("open")}async function s(){o.value=!1,a("close",{animation:async()=>new Promise(l=>setTimeout(l,350))})}return t({isOpen:o,open:i,close:s}),r.provide("isDrawer",!0),(l,c)=>(r.openBlock(),r.createBlock(r.unref(tt.TransitionRoot),{show:o.value,as:"template"},{default:r.withCtx(()=>[r.createVNode(r.unref(tt.Dialog),{static:!0,class:"relative z-10 group/drawer is-drawer","data-test-drawer-dialog":"",onClose:c[0]||(c[0]=()=>l.preventBackdropClose||!l.withBackdrop?void 0:s())},{default:r.withCtx(()=>[l.withBackdrop?(r.openBlock(),r.createBlock(r.unref(tt.TransitionChild),{key:0,as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:r.withCtx(()=>c[1]||(c[1]=[r.createElementVNode("div",{class:"fixed inset-0 bg-zinc-500/75 transition-opacity","data-test-backdrop":""},null,-1)])),_:1})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass([{"pointer-events-none":!l.withBackdrop},"fixed inset-0 overflow-hidden"])},[r.createElementVNode("div",{class:r.normalizeClass([{"pointer-events-none":!l.withBackdrop},"absolute inset-0 overflow-hidden"])},[r.createElementVNode("div",uA,[r.createVNode(r.unref(tt.TransitionChild),{as:"template",enter:"transform transition ease-in-out duration-300 sm:duration-500","enter-from":"translate-x-full","enter-to":"translate-x-0",leave:"transform transition ease-in-out duration-300 sm:duration-500","leave-from":"translate-x-0","leave-to":"translate-x-full"},{default:r.withCtx(()=>[r.createVNode(r.unref(tt.DialogPanel),{class:r.normalizeClass([l.panelClasses,"@container pointer-events-auto relative w-screen max-w-xl 2xl:max-w-4xl"])},{default:r.withCtx(()=>[r.createVNode(r.unref(tt.TransitionChild),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:r.withCtx(()=>{var u;return[r.createElementVNode("div",dA,[r.createElementVNode("button",{type:"button",class:"focus:outline-hidden cursor-pointer z-40 p-2 relative rounded-full bg-primary text-white drop-shadow-xs hover:bg-primary-active",onClick:s},[c[2]||(c[2]=r.createElementVNode("span",{class:"absolute -inset-1.5"},null,-1)),c[3]||(c[3]=r.createElementVNode("span",{class:"sr-only"},"Close panel",-1)),r.createVNode(r.unref(Mn),{icon:(u=r.unref(In).far)==null?void 0:u["chevron-right"],class:"size-6","aria-hidden":"true"},null,8,["icon"])])])]}),_:1}),r.createElementVNode("div",{class:r.normalizeClass([l.modalClasses,"flex h-full flex-col overflow-y-scroll rounded-l-[40px] bg-white pt-8 mb-8 shadow-[-6px_0px_6px_#20202010]"])},[r.createElementVNode("div",{class:r.normalizeClass(`relative mt-6 flex-1 px-2 sm:px-6 ${l.contentClasses}`),"data-test-modal-content":""},[r.renderSlot(l.$slots,"default",{},()=>[typeof l.content=="string"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(l.content),1)],64)):(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.content),r.normalizeProps(r.mergeProps({key:1},l.properties)),null,16))])],2)],2)]),_:3},8,["class"])]),_:3})])],2)],2)]),_:3})]),_:3},8,["show"]))}}),nd={instances:r.ref([])};function Nv(e){var t,n;(t=e==null?void 0:e.instance)==null||t.unmount(),(n=e==null?void 0:e.element)==null||n.remove()}function fA(e={}){async function t(a){window.scrollTo(0,0);const o=document.createElement("div");document.body.append(o);let i=null;return new Promise(s=>{i=r.createApp(V1,{...e,...a,onClose:s}),i.mount(o),nd.instances.value.push({instance:i,element:o})}).finally(()=>{i&&setTimeout(()=>{Nv({instance:i,element:o})},500)})}async function n(){return nd.instances.value.forEach(a=>Nv(a)),Promise.resolve()}return{...nd,open:t,close:n}}const rd={instances:r.ref([])};function Av(e){var t,n;(t=e==null?void 0:e.instance)==null||t.unmount(),(n=e==null?void 0:e.element)==null||n.remove()}function pA(){async function e(n){window.scrollTo(0,0);const a=document.createElement("div");document.body.append(a);let o=null;return new Promise(i=>{o=r.createApp(F1,{...n,onClose:i}),o.mount(a),rd.instances.value.push({instance:o,element:a})}).finally(()=>{o&&setTimeout(()=>{Av({instance:o,element:a})},500)})}async function t(){return rd.instances.value.forEach(n=>Av(n)),Promise.resolve()}return{...rd,open:e,close:t}}const Bv={instances:r.ref([])};function Dv(e){var t,n;(t=e==null?void 0:e.instance)==null||t.unmount(),(n=e==null?void 0:e.element)==null||n.remove()}function mA(e,t){const n=r.ref(),a=r.inject("plugins");async function o(s){t&&(t.content=e),window.scrollTo(0,0);const l=document.createElement("div");document.body.append(l);let c=null,u=null;return new Promise(d=>{r.isRef(e)?u=e.value:(c=r.createApp(U1,{...t,...s,onClose:f=>{var p;(p=t==null?void 0:t.onClose)==null||p.call(t),d(f)}}),a==null||a.forEach(f=>{c==null||c.use(f)}),u=c.mount(l)),u.open(),n.value={ref:u,instance:c,element:l},Bv.instances.value.push(n.value)}).finally(()=>{c&&setTimeout(()=>{Dv({instance:c,element:l})},500)})}async function i(){var s;return(s=n.value)==null||s.ref.close(),setTimeout(()=>{n.value&&Dv(n.value)},300),Promise.resolve()}return{...Bv,instance:n,open:o,close:i}}const Ja={instances:r.ref([])};function Rv(e){var n,a;(n=e==null?void 0:e.instance)==null||n.unmount(),(a=e==null?void 0:e.element)==null||a.remove();const t=Ja.instances.value.findIndex(o=>o.instance._uid===e.instance._uid);t>-1&&Ja.instances.value.splice(t,1)}function hA(e,t){const n=r.ref();function a(s,l){const c=s.mount(l);c.open(),n.value={ref:c,instance:s,element:l},Ja.instances.value.push(n.value)}async function o(s){t&&(t.content=e),!(t!=null&&t.content)&&!s.content&&s.router&&(s.content=ei.RouterView),window.scrollTo(0,0);const l=document.createElement("div");document.body.append(l);let c=null;return new Promise(u=>{var d,f,p,m,g,y,S,v,C,w,b,M,E;if(Ja.instances.value.length>0&&s.router){(y=(g=(m=(p=(f=(d=Ja.instances.value[Ja.instances.value.length-1])==null?void 0:d.instance)==null?void 0:f.config)==null?void 0:p.globalProperties)==null?void 0:m.$router)==null?void 0:g.push)==null||y.call(g,s.router);return}if(r.isRef(e))e.value;else{c=r.createApp(o2,{...t,...s,onClose:P=>{var I;(I=t==null?void 0:t.onClose)==null||I.call(t),u(P)}});const T=(S=window.UILibraryOptions)==null?void 0:S.plugins,O=T==null?void 0:T.find(P=>typeof(P==null?void 0:P.isReady)=="function");if(T==null||T.forEach(P=>{c==null||c.use(P)}),!O){a(c,l),s.router&&((b=(w=(C=(v=c==null?void 0:c.config)==null?void 0:v.globalProperties)==null?void 0:C.$router)==null?void 0:w.push)==null||b.call(w,s.router));return}(E=(M=O==null?void 0:O.isReady())==null?void 0:M.then)==null||E.call(M,()=>{var P,I,L,$;a(c,l),s.router&&(($=(L=(I=(P=c==null?void 0:c.config)==null?void 0:P.globalProperties)==null?void 0:I.$router)==null?void 0:L.push)==null||$.call(L,s.router))})}}).finally(()=>{c&&setTimeout(()=>{Rv({instance:c,element:l})},500)})}async function i(){var s;return(s=n.value)==null||s.ref.close(),setTimeout(()=>{n.value&&Rv(n.value)},300),Promise.resolve()}return{...Ja,instance:n,open:o,close:i}}const hr={selection:r.shallowRef([]),tableSelection:r.shallowRef([]),actions:r.shallowRef([]),isOpen:r.shallowRef(!1),onResetSelection:r.shallowRef(),selectionText:r.shallowRef(":selection selected")};function Ni(){function e(l){hr.selection.value=l,s()}function t(l){hr.tableSelection.value=l}function n(l){hr.actions.value=l,s()}function a(){var l,c;hr.selection.value.splice(0),(c=(l=hr.onResetSelection).value)==null||c.call(l,hr.selection.value)}function o(l){hr.selectionText.value=l}function i(){var l;hr.isOpen.value=!1,(l=document.querySelectorAll("[data-tippy-root]"))==null||l.forEach(c=>{var u,d;(u=c._tippy)==null||u.hide(),(d=c._tippy)==null||d.destroy()})}function s(){hr.isOpen.value=!0}return{...hr,resetSelection:a,setSelection:e,setTableSelection:t,setSelectionText:o,setActions:n,open:s,close:i}}function vA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sn(e,t,n){return t=lc(t),bA(e,i2()?Reflect.construct(t,n||[],lc(e).constructor):t.apply(e,n))}function Ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gA(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,s2(a.key),a)}}function Wt(e,t,n){return t&&gA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yA(e,t,n){return(t=s2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lc(e){return lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lc(e)}function Cn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uf(e,t)}function i2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i2=function(){return!!e})()}function Lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,a)}return n}function ss(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lv(Object(n),!0).forEach(function(a){yA(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lv(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function bA(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vA(e)}function uf(e,t){return uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},uf(e,t)}function wA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function s2(e){var t=wA(e,"string");return typeof t=="symbol"?t:t+""}function ls(e){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}var Wp=function(){function e(){Ut(this,e)}return Wt(e,[{key:"listenForWhisper",value:function(n,a){return this.listen(".client-"+n,a)}},{key:"notification",value:function(n){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",n)}},{key:"stopListeningForWhisper",value:function(n,a){return this.stopListening(".client-"+n,a)}}])}(),l2=function(){function e(t){Ut(this,e),this.namespace=t}return Wt(e,[{key:"format",value:function(n){return[".","\\"].includes(n.charAt(0))?n.substring(1):(this.namespace&&(n=this.namespace+"."+n),n.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(n){this.namespace=n}}])}();function kA(e){try{new e}catch(t){if(t instanceof Error&&t.message.includes("is not a constructor"))return!1}return!0}var qp=function(e){function t(n,a,o){var i;return Ut(this,t),i=Sn(this,t),i.name=a,i.pusher=n,i.options=o,i.eventFormatter=new l2(i.options.namespace),i.subscribe(),i}return Cn(t,e),Wt(t,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(a,o){return this.on(this.eventFormatter.format(a),o),this}},{key:"listenToAll",value:function(a){var o=this;return this.subscription.bind_global(function(i,s){var l;if(!i.startsWith("pusher:")){var c=String((l=o.options.namespace)!==null&&l!==void 0?l:"").replace(/\./g,"\\"),u=i.startsWith(c)?i.substring(c.length+1):"."+i;a(u,s)}}),this}},{key:"stopListening",value:function(a,o){return o?this.subscription.unbind(this.eventFormatter.format(a),o):this.subscription.unbind(this.eventFormatter.format(a)),this}},{key:"stopListeningToAll",value:function(a){return a?this.subscription.unbind_global(a):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(a){return this.on("pusher:subscription_succeeded",function(){a()}),this}},{key:"error",value:function(a){return this.on("pusher:subscription_error",function(o){a(o)}),this}},{key:"on",value:function(a,o){return this.subscription.bind(a,o),this}}])}(Wp),c2=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),o),this}}])}(qp),_A=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),o),this}}])}(qp),SA=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"here",value:function(a){return this.on("pusher:subscription_succeeded",function(o){a(Object.keys(o.members).map(function(i){return o.members[i]}))}),this}},{key:"joining",value:function(a){return this.on("pusher:member_added",function(o){a(o.info)}),this}},{key:"whisper",value:function(a,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),o),this}},{key:"leaving",value:function(a){return this.on("pusher:member_removed",function(o){a(o.info)}),this}}])}(c2),u2=function(e){function t(n,a,o){var i;return Ut(this,t),i=Sn(this,t),i.events={},i.listeners={},i.name=a,i.socket=n,i.options=o,i.eventFormatter=new l2(i.options.namespace),i.subscribe(),i}return Cn(t,e),Wt(t,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(a,o){return this.on(this.eventFormatter.format(a),o),this}},{key:"stopListening",value:function(a,o){return this.unbindEvent(this.eventFormatter.format(a),o),this}},{key:"subscribed",value:function(a){return this.on("connect",function(o){a(o)}),this}},{key:"error",value:function(a){return this}},{key:"on",value:function(a,o){var i=this;return this.listeners[a]=this.listeners[a]||[],this.events[a]||(this.events[a]=function(s,l){i.name===s&&i.listeners[a]&&i.listeners[a].forEach(function(c){return c(l)})},this.socket.on(a,this.events[a])),this.listeners[a].push(o),this}},{key:"unbind",value:function(){var a=this;Object.keys(this.events).forEach(function(o){a.unbindEvent(o)})}},{key:"unbindEvent",value:function(a,o){this.listeners[a]=this.listeners[a]||[],o&&(this.listeners[a]=this.listeners[a].filter(function(i){return i!==o})),(!o||this.listeners[a].length===0)&&(this.events[a]&&(this.socket.removeListener(a,this.events[a]),delete this.events[a]),delete this.listeners[a])}}])}(Wp),d2=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(a),data:o}),this}}])}(u2),CA=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"here",value:function(a){return this.on("presence:subscribed",function(o){a(o.map(function(i){return i.user_info}))}),this}},{key:"joining",value:function(a){return this.on("presence:joining",function(o){return a(o.user_info)}),this}},{key:"whisper",value:function(a,o){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(a),data:o}),this}},{key:"leaving",value:function(a){return this.on("presence:leaving",function(o){return a(o.user_info)}),this}}])}(d2),cc=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(a,o){return this}},{key:"listenToAll",value:function(a){return this}},{key:"stopListening",value:function(a,o){return this}},{key:"subscribed",value:function(a){return this}},{key:"error",value:function(a){return this}},{key:"on",value:function(a,o){return this}}])}(Wp),f2=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this}}])}(cc),EA=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this}}])}(cc),xA=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"here",value:function(a){return this}},{key:"joining",value:function(a){return this}},{key:"whisper",value:function(a,o){return this}},{key:"leaving",value:function(a){return this}}])}(f2),Kc=function(){function e(t){Ut(this,e),this.setOptions(t),this.connect()}return Wt(e,[{key:"setOptions",value:function(n){this.options=ss(ss(ss({},e._defaultOptions),n),{},{broadcaster:n.broadcaster});var a=this.csrfToken();a&&(this.options.auth.headers["X-CSRF-TOKEN"]=a,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=a),a=this.options.bearerToken,a&&(this.options.auth.headers.Authorization="Bearer "+a,this.options.userAuthentication.headers.Authorization="Bearer "+a)}},{key:"csrfToken",value:function(){var n;return typeof window<"u"&&typeof window.Laravel<"u"&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"&&(n=document.querySelector('meta[name="csrf-token"]'))?n.getAttribute("content"):null}}])}();Kc._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"};var ad=function(e){function t(){var n;return Ut(this,t),n=Sn(this,t,arguments),n.channels={},n}return Cn(t,e),Wt(t,[{key:"connect",value:function(){if(typeof this.options.client<"u")this.pusher=this.options.client;else if(this.options.Pusher)this.pusher=new this.options.Pusher(this.options.key,this.options);else if(typeof window<"u"&&typeof window.Pusher<"u")this.pusher=new window.Pusher(this.options.key,this.options);else throw new Error("Pusher client not found. Should be globally available or passed via options.client")}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(a,o,i){return this.channel(a).listen(o,i)}},{key:"channel",value:function(a){return this.channels[a]||(this.channels[a]=new qp(this.pusher,a,this.options)),this.channels[a]}},{key:"privateChannel",value:function(a){return this.channels["private-"+a]||(this.channels["private-"+a]=new c2(this.pusher,"private-"+a,this.options)),this.channels["private-"+a]}},{key:"encryptedPrivateChannel",value:function(a){return this.channels["private-encrypted-"+a]||(this.channels["private-encrypted-"+a]=new _A(this.pusher,"private-encrypted-"+a,this.options)),this.channels["private-encrypted-"+a]}},{key:"presenceChannel",value:function(a){return this.channels["presence-"+a]||(this.channels["presence-"+a]=new SA(this.pusher,"presence-"+a,this.options)),this.channels["presence-"+a]}},{key:"leave",value:function(a){var o=this,i=[a,"private-"+a,"private-encrypted-"+a,"presence-"+a];i.forEach(function(s){o.leaveChannel(s)})}},{key:"leaveChannel",value:function(a){this.channels[a]&&(this.channels[a].unsubscribe(),delete this.channels[a])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}])}(Kc),TA=function(e){function t(){var n;return Ut(this,t),n=Sn(this,t,arguments),n.channels={},n}return Cn(t,e),Wt(t,[{key:"connect",value:function(){var a,o=this,i=this.getSocketIO();this.socket=i((a=this.options.host)!==null&&a!==void 0?a:void 0,this.options),this.socket.on("reconnect",function(){Object.values(o.channels).forEach(function(s){s.subscribe()})})}},{key:"getSocketIO",value:function(){if(typeof this.options.client<"u")return this.options.client;if(typeof window<"u"&&typeof window.io<"u")return window.io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(a,o,i){return this.channel(a).listen(o,i)}},{key:"channel",value:function(a){return this.channels[a]||(this.channels[a]=new u2(this.socket,a,this.options)),this.channels[a]}},{key:"privateChannel",value:function(a){return this.channels["private-"+a]||(this.channels["private-"+a]=new d2(this.socket,"private-"+a,this.options)),this.channels["private-"+a]}},{key:"presenceChannel",value:function(a){return this.channels["presence-"+a]||(this.channels["presence-"+a]=new CA(this.socket,"presence-"+a,this.options)),this.channels["presence-"+a]}},{key:"leave",value:function(a){var o=this,i=[a,"private-"+a,"presence-"+a];i.forEach(function(s){o.leaveChannel(s)})}},{key:"leaveChannel",value:function(a){this.channels[a]&&(this.channels[a].unsubscribe(),delete this.channels[a])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}])}(Kc),$v=function(e){function t(){var n;return Ut(this,t),n=Sn(this,t,arguments),n.channels={},n}return Cn(t,e),Wt(t,[{key:"connect",value:function(){}},{key:"listen",value:function(a,o,i){return new cc}},{key:"channel",value:function(a){return new cc}},{key:"privateChannel",value:function(a){return new f2}},{key:"encryptedPrivateChannel",value:function(a){return new EA}},{key:"presenceChannel",value:function(a){return new xA}},{key:"leave",value:function(a){}},{key:"leaveChannel",value:function(a){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}])}(Kc),PA=function(){function e(t){Ut(this,e),this.options=t,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return Wt(e,[{key:"channel",value:function(n){return this.connector.channel(n)}},{key:"connect",value:function(){if(this.options.broadcaster==="reverb")this.connector=new ad(ss(ss({},this.options),{},{cluster:""}));else if(this.options.broadcaster==="pusher")this.connector=new ad(this.options);else if(this.options.broadcaster==="socket.io")this.connector=new TA(this.options);else if(this.options.broadcaster==="null")this.connector=new $v(this.options);else if(typeof this.options.broadcaster=="function"&&kA(this.options.broadcaster))this.connector=new this.options.broadcaster(this.options);else throw new Error("Broadcaster ".concat(ls(this.options.broadcaster)," ").concat(String(this.options.broadcaster)," is not supported."))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(n){return this.connector.presenceChannel(n)}},{key:"leave",value:function(n){this.connector.leave(n)}},{key:"leaveChannel",value:function(n){this.connector.leaveChannel(n)}},{key:"leaveAllChannels",value:function(){for(var n in this.connector.channels)this.leaveChannel(n)}},{key:"listen",value:function(n,a,o){return this.connector.listen(n,a,o)}},{key:"private",value:function(n){return this.connector.privateChannel(n)}},{key:"encryptedPrivate",value:function(n){if(this.connectorSupportsEncryptedPrivateChannels(this.connector))return this.connector.encryptedPrivateChannel(n);throw new Error("Broadcaster ".concat(ls(this.options.broadcaster)," ").concat(String(this.options.broadcaster)," does not support encrypted private channels."))}},{key:"connectorSupportsEncryptedPrivateChannels",value:function(n){return n instanceof ad||n instanceof $v}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),(typeof Turbo>"u"?"undefined":ls(Turbo))==="object"&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var n=this;Vue.http.interceptors.push(function(a,o){n.socketId()&&a.headers.set("X-Socket-ID",n.socketId()),o()})}},{key:"registerAxiosRequestInterceptor",value:function(){var n=this;axios.interceptors.request.use(function(a){return n.socketId()&&(a.headers["X-Socket-Id"]=n.socketId()),a})}},{key:"registerjQueryAjaxSetup",value:function(){var n=this;typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter(function(a,o,i){n.socketId()&&i.setRequestHeader("X-Socket-Id",n.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var n=this;document.addEventListener("turbo:before-fetch-request",function(a){a.detail.fetchOptions.headers["X-Socket-Id"]=n.socketId()})}}])}(),od={exports:{}};/*!
626
+ </div>`)),a++;if(a>n)for(var o=this.rootElement.getElementsByClassName(this.digitClassname),i=function(c){var u=o[c].parentElement;u.style.animationDuration=s.durationFade+"ms",u.style.animationName="numberflip-animation-fade-out",setTimeout(function(){return u.remove()},s.durationFade)},s=this,l=n;l<o.length;l++)i(l)},e.prototype.setDigitInContainers=function(t,n){for(var a=this,o=this.getDigitsOfNumber(t),i=this.rootElement.getElementsByClassName(this.digitClassname),s=function(u){var d=i[u],f=typeof o[u]=="number"?o[u]:-1;if(typeof f=="number"){var p=l.calculateTranslateY(f);setTimeout(function(){var m=n?a.durationSlide:0;d.style.transitionDuration=m+"ms",d.style.transform="translateY(".concat(p,"%)")},0)}},l=this,c=0;c<i.length;c++)s(c)},e.prototype.getDigitsOfNumber=function(t){var n=this.numberFormatter(t).split("");return n.map(function(a){return a==="."?".":parseInt(a,10)})},e.prototype.calculateTranslateY=function(t){var n=9.090909090909092;return(-10*n+(t+1)*n).toString()},e}();const lA={class:"mr-6 w-full select-none"},cA=r.defineComponent({__name:"AppStepper",props:r.mergeModels({title:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=r.useModel(e,"modelValue"),n=r.useTemplateRef("flipRef"),a=r.ref();r.watch(t,s=>{var l,c;(c=(l=a.value)==null?void 0:l.setNumber)==null||c.call(l,s)}),r.onMounted(()=>{n.value&&(a.value=new sA({rootElement:n.value,initialNumber:t.value,durationSlide:500,wrapperClassname:"flex overflow-hidden relative transition-opacity transition-1000",digitClassname:"flex flex-col absolute transition-transform transition-1000 ease-in-out *:text-center"}),setTimeout(()=>{var s,l;(l=(s=a.value)==null?void 0:s.setNumber)==null||l.call(s,t.value)},100))});function o(){t.value+=1}function i(){t.value!==0&&(t.value-=1)}return(s,l)=>(r.openBlock(),r.createBlock(r.unref(hp),{"content-classes":"flex items-center",class:"p-4!"},{default:r.withCtx(()=>{var c,u;return[r.createElementVNode("div",lA,[r.renderSlot(s.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(s.title),1)])]),r.createVNode(r.unref(Mn),{icon:(c=r.unref(In).far)==null?void 0:c.minus,"aria-disabled":t.value===0,class:"cursor-pointer aria-disabled:cursor-not-allowed aria-disabled:opacity-50","data-test-decrement-icon":"",onClick:i},null,8,["icon","aria-disabled"]),r.createElementVNode("div",{ref_key:"flipRef",ref:n,class:"w-16 shrink-0 justify-center text-center font-bold","data-test-number-flip":""},null,512),r.createVNode(r.unref(Mn),{icon:(u=r.unref(In).far)==null?void 0:u.plus,class:"cursor-pointer","data-test-increment-icon":"",onClick:o},null,8,["icon"])]}),_:3}))}}),uA={class:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10"},dA={class:"absolute left-0 bottom-2 z-20 -ml-8 flex sm:-ml-5 sm:-translate-y-2.5 sm:pr-4"},o2=r.defineComponent({__name:"AppDrawer",props:{withBackdrop:{type:Boolean,default:!0},preventBackdropClose:{type:Boolean,default:!1},contentClasses:{default:""},modalClasses:{default:""},panelClasses:{default:""},content:{},properties:{default:void 0}},emits:["open","close"],setup(e,{expose:t,emit:n}){const a=n,o=r.ref(!1);async function i(){o.value=!0,a("open")}async function s(){o.value=!1,a("close",{animation:async()=>new Promise(l=>setTimeout(l,350))})}return t({isOpen:o,open:i,close:s}),r.provide("isDrawer",!0),(l,c)=>(r.openBlock(),r.createBlock(r.unref(tt.TransitionRoot),{show:o.value,as:"template"},{default:r.withCtx(()=>[r.createVNode(r.unref(tt.Dialog),{static:!0,class:"relative z-10 group/drawer is-drawer","data-test-drawer-dialog":"",onClose:c[0]||(c[0]=()=>l.preventBackdropClose||!l.withBackdrop?void 0:s())},{default:r.withCtx(()=>[l.withBackdrop?(r.openBlock(),r.createBlock(r.unref(tt.TransitionChild),{key:0,as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:r.withCtx(()=>c[1]||(c[1]=[r.createElementVNode("div",{class:"fixed inset-0 bg-zinc-500/75 transition-opacity","data-test-backdrop":""},null,-1)])),_:1})):r.createCommentVNode("",!0),r.createElementVNode("div",{class:r.normalizeClass([{"pointer-events-none":!l.withBackdrop},"fixed inset-0 overflow-hidden"])},[r.createElementVNode("div",{class:r.normalizeClass([{"pointer-events-none":!l.withBackdrop},"absolute inset-0 overflow-hidden"])},[r.createElementVNode("div",uA,[r.createVNode(r.unref(tt.TransitionChild),{as:"template",enter:"transform transition ease-in-out duration-300 sm:duration-500","enter-from":"translate-x-full","enter-to":"translate-x-0",leave:"transform transition ease-in-out duration-300 sm:duration-500","leave-from":"translate-x-0","leave-to":"translate-x-full"},{default:r.withCtx(()=>[r.createVNode(r.unref(tt.DialogPanel),{class:r.normalizeClass([l.panelClasses,"@container pointer-events-auto relative w-screen max-w-xl 2xl:max-w-4xl"])},{default:r.withCtx(()=>[r.createVNode(r.unref(tt.TransitionChild),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:r.withCtx(()=>{var u;return[r.createElementVNode("div",dA,[r.createElementVNode("button",{type:"button",class:"focus:outline-hidden cursor-pointer z-40 p-2 relative rounded-full bg-primary text-white drop-shadow-xs hover:bg-primary-active",onClick:s},[c[2]||(c[2]=r.createElementVNode("span",{class:"absolute -inset-1.5"},null,-1)),c[3]||(c[3]=r.createElementVNode("span",{class:"sr-only"},"Close panel",-1)),r.createVNode(r.unref(Mn),{icon:(u=r.unref(In).far)==null?void 0:u["chevron-right"],class:"size-6","aria-hidden":"true"},null,8,["icon"])])])]}),_:1}),r.createElementVNode("div",{class:r.normalizeClass([l.modalClasses,"flex h-full flex-col overflow-y-scroll rounded-l-[40px] bg-white pt-8 mb-8 shadow-[-6px_0px_6px_#20202010]"])},[r.createElementVNode("div",{class:r.normalizeClass(`relative mt-6 flex-1 px-2 sm:px-6 ${l.contentClasses}`),"data-test-modal-content":""},[r.renderSlot(l.$slots,"default",{},()=>[typeof l.content=="string"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(l.content),1)],64)):(r.openBlock(),r.createBlock(r.resolveDynamicComponent(l.content),r.normalizeProps(r.mergeProps({key:1},l.properties)),null,16))])],2)],2)]),_:3},8,["class"])]),_:3})])],2)],2)]),_:3})]),_:3},8,["show"]))}}),nd={instances:r.ref([])};function Nv(e){var t,n;(t=e==null?void 0:e.instance)==null||t.unmount(),(n=e==null?void 0:e.element)==null||n.remove()}function fA(e={}){async function t(a){window.scrollTo(0,0);const o=document.createElement("div");document.body.append(o);let i=null;return new Promise(s=>{i=r.createApp(V1,{...e,...a,onClose:s}),i.mount(o),nd.instances.value.push({instance:i,element:o})}).finally(()=>{i&&setTimeout(()=>{Nv({instance:i,element:o})},500)})}async function n(){return nd.instances.value.forEach(a=>Nv(a)),Promise.resolve()}return{...nd,open:t,close:n}}const rd={instances:r.ref([])};function Av(e){var t,n;(t=e==null?void 0:e.instance)==null||t.unmount(),(n=e==null?void 0:e.element)==null||n.remove()}function pA(){async function e(n){window.scrollTo(0,0);const a=document.createElement("div");document.body.append(a);let o=null;return new Promise(i=>{o=r.createApp(F1,{...n,onClose:i}),o.mount(a),rd.instances.value.push({instance:o,element:a})}).finally(()=>{o&&setTimeout(()=>{Av({instance:o,element:a})},500)})}async function t(){return rd.instances.value.forEach(n=>Av(n)),Promise.resolve()}return{...rd,open:e,close:t}}const Bv={instances:r.ref([])};function Dv(e){var t,n;(t=e==null?void 0:e.instance)==null||t.unmount(),(n=e==null?void 0:e.element)==null||n.remove()}function mA(e,t){const n=r.ref(),a=r.inject("plugins");async function o(s){t&&(t.content=e),window.scrollTo(0,0);const l=document.createElement("div");document.body.append(l);let c=null,u=null;return new Promise(d=>{r.isRef(e)?u=e.value:(c=r.createApp(U1,{...t,...s,onClose:f=>{var p;(p=t==null?void 0:t.onClose)==null||p.call(t),d(f)}}),a==null||a.forEach(f=>{c==null||c.use(f)}),u=c.mount(l)),u.open(),n.value={ref:u,instance:c,element:l},Bv.instances.value.push(n.value)}).finally(()=>{c&&setTimeout(()=>{Dv({instance:c,element:l})},500)})}async function i(){var s;return(s=n.value)==null||s.ref.close(),setTimeout(()=>{n.value&&Dv(n.value)},300),Promise.resolve()}return{...Bv,instance:n,open:o,close:i}}const Ja={instances:r.ref([])};function Rv(e){var n,a;(n=e==null?void 0:e.instance)==null||n.unmount(),(a=e==null?void 0:e.element)==null||a.remove();const t=Ja.instances.value.findIndex(o=>o.instance._uid===e.instance._uid);t>-1&&Ja.instances.value.splice(t,1)}function hA(e,t){const n=r.ref();function a(s,l){const c=s.mount(l);c.open(),n.value={ref:c,instance:s,element:l},Ja.instances.value.push(n.value)}async function o(s){t&&(t.content=e),!(t!=null&&t.content)&&!s.content&&s.router&&(s.content=ei.RouterView),window.scrollTo(0,0);const l=document.createElement("div");document.body.append(l);let c=null;return new Promise(u=>{var d,f,p,m,g,y,S,v,C,w,b,M,E;if(Ja.instances.value.length>0&&s.router){(y=(g=(m=(p=(f=(d=Ja.instances.value[Ja.instances.value.length-1])==null?void 0:d.instance)==null?void 0:f.config)==null?void 0:p.globalProperties)==null?void 0:m.$router)==null?void 0:g.push)==null||y.call(g,s.router);return}if(r.isRef(e))e.value;else{c=r.createApp(o2,{...t,...s,onClose:P=>{var I;(I=t==null?void 0:t.onClose)==null||I.call(t),u(P)}});const T=r.inject("plugins")||((S=window.UILibraryOptions)==null?void 0:S.plugins),O=T==null?void 0:T.find(P=>typeof(P==null?void 0:P.isReady)=="function");if(T==null||T.forEach(P=>{c==null||c.use(P)}),!O){a(c,l),s.router&&((b=(w=(C=(v=c==null?void 0:c.config)==null?void 0:v.globalProperties)==null?void 0:C.$router)==null?void 0:w.push)==null||b.call(w,s.router));return}(E=(M=O==null?void 0:O.isReady())==null?void 0:M.then)==null||E.call(M,()=>{var P,I,L,$;a(c,l),s.router&&(($=(L=(I=(P=c==null?void 0:c.config)==null?void 0:P.globalProperties)==null?void 0:I.$router)==null?void 0:L.push)==null||$.call(L,s.router))})}}).finally(()=>{c&&setTimeout(()=>{Rv({instance:c,element:l})},500)})}async function i(){var s;return(s=n.value)==null||s.ref.close(),setTimeout(()=>{n.value&&Rv(n.value)},300),Promise.resolve()}return{...Ja,instance:n,open:o,close:i}}const hr={selection:r.shallowRef([]),tableSelection:r.shallowRef([]),actions:r.shallowRef([]),isOpen:r.shallowRef(!1),onResetSelection:r.shallowRef(),selectionText:r.shallowRef(":selection selected")};function Ni(){function e(l){hr.selection.value=l,s()}function t(l){hr.tableSelection.value=l}function n(l){hr.actions.value=l,s()}function a(){var l,c;hr.selection.value.splice(0),(c=(l=hr.onResetSelection).value)==null||c.call(l,hr.selection.value)}function o(l){hr.selectionText.value=l}function i(){var l;hr.isOpen.value=!1,(l=document.querySelectorAll("[data-tippy-root]"))==null||l.forEach(c=>{var u,d;(u=c._tippy)==null||u.hide(),(d=c._tippy)==null||d.destroy()})}function s(){hr.isOpen.value=!0}return{...hr,resetSelection:a,setSelection:e,setTableSelection:t,setSelectionText:o,setActions:n,open:s,close:i}}function vA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sn(e,t,n){return t=lc(t),bA(e,i2()?Reflect.construct(t,n||[],lc(e).constructor):t.apply(e,n))}function Ut(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gA(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,s2(a.key),a)}}function Wt(e,t,n){return t&&gA(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yA(e,t,n){return(t=s2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lc(e){return lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lc(e)}function Cn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uf(e,t)}function i2(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i2=function(){return!!e})()}function Lv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,a)}return n}function ss(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lv(Object(n),!0).forEach(function(a){yA(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lv(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function bA(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vA(e)}function uf(e,t){return uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},uf(e,t)}function wA(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function s2(e){var t=wA(e,"string");return typeof t=="symbol"?t:t+""}function ls(e){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}var Wp=function(){function e(){Ut(this,e)}return Wt(e,[{key:"listenForWhisper",value:function(n,a){return this.listen(".client-"+n,a)}},{key:"notification",value:function(n){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",n)}},{key:"stopListeningForWhisper",value:function(n,a){return this.stopListening(".client-"+n,a)}}])}(),l2=function(){function e(t){Ut(this,e),this.namespace=t}return Wt(e,[{key:"format",value:function(n){return[".","\\"].includes(n.charAt(0))?n.substring(1):(this.namespace&&(n=this.namespace+"."+n),n.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(n){this.namespace=n}}])}();function kA(e){try{new e}catch(t){if(t instanceof Error&&t.message.includes("is not a constructor"))return!1}return!0}var qp=function(e){function t(n,a,o){var i;return Ut(this,t),i=Sn(this,t),i.name=a,i.pusher=n,i.options=o,i.eventFormatter=new l2(i.options.namespace),i.subscribe(),i}return Cn(t,e),Wt(t,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(a,o){return this.on(this.eventFormatter.format(a),o),this}},{key:"listenToAll",value:function(a){var o=this;return this.subscription.bind_global(function(i,s){var l;if(!i.startsWith("pusher:")){var c=String((l=o.options.namespace)!==null&&l!==void 0?l:"").replace(/\./g,"\\"),u=i.startsWith(c)?i.substring(c.length+1):"."+i;a(u,s)}}),this}},{key:"stopListening",value:function(a,o){return o?this.subscription.unbind(this.eventFormatter.format(a),o):this.subscription.unbind(this.eventFormatter.format(a)),this}},{key:"stopListeningToAll",value:function(a){return a?this.subscription.unbind_global(a):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(a){return this.on("pusher:subscription_succeeded",function(){a()}),this}},{key:"error",value:function(a){return this.on("pusher:subscription_error",function(o){a(o)}),this}},{key:"on",value:function(a,o){return this.subscription.bind(a,o),this}}])}(Wp),c2=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),o),this}}])}(qp),_A=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),o),this}}])}(qp),SA=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"here",value:function(a){return this.on("pusher:subscription_succeeded",function(o){a(Object.keys(o.members).map(function(i){return o.members[i]}))}),this}},{key:"joining",value:function(a){return this.on("pusher:member_added",function(o){a(o.info)}),this}},{key:"whisper",value:function(a,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(a),o),this}},{key:"leaving",value:function(a){return this.on("pusher:member_removed",function(o){a(o.info)}),this}}])}(c2),u2=function(e){function t(n,a,o){var i;return Ut(this,t),i=Sn(this,t),i.events={},i.listeners={},i.name=a,i.socket=n,i.options=o,i.eventFormatter=new l2(i.options.namespace),i.subscribe(),i}return Cn(t,e),Wt(t,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(a,o){return this.on(this.eventFormatter.format(a),o),this}},{key:"stopListening",value:function(a,o){return this.unbindEvent(this.eventFormatter.format(a),o),this}},{key:"subscribed",value:function(a){return this.on("connect",function(o){a(o)}),this}},{key:"error",value:function(a){return this}},{key:"on",value:function(a,o){var i=this;return this.listeners[a]=this.listeners[a]||[],this.events[a]||(this.events[a]=function(s,l){i.name===s&&i.listeners[a]&&i.listeners[a].forEach(function(c){return c(l)})},this.socket.on(a,this.events[a])),this.listeners[a].push(o),this}},{key:"unbind",value:function(){var a=this;Object.keys(this.events).forEach(function(o){a.unbindEvent(o)})}},{key:"unbindEvent",value:function(a,o){this.listeners[a]=this.listeners[a]||[],o&&(this.listeners[a]=this.listeners[a].filter(function(i){return i!==o})),(!o||this.listeners[a].length===0)&&(this.events[a]&&(this.socket.removeListener(a,this.events[a]),delete this.events[a]),delete this.listeners[a])}}])}(Wp),d2=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(a),data:o}),this}}])}(u2),CA=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"here",value:function(a){return this.on("presence:subscribed",function(o){a(o.map(function(i){return i.user_info}))}),this}},{key:"joining",value:function(a){return this.on("presence:joining",function(o){return a(o.user_info)}),this}},{key:"whisper",value:function(a,o){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(a),data:o}),this}},{key:"leaving",value:function(a){return this.on("presence:leaving",function(o){return a(o.user_info)}),this}}])}(d2),cc=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(a,o){return this}},{key:"listenToAll",value:function(a){return this}},{key:"stopListening",value:function(a,o){return this}},{key:"subscribed",value:function(a){return this}},{key:"error",value:function(a){return this}},{key:"on",value:function(a,o){return this}}])}(Wp),f2=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this}}])}(cc),EA=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"whisper",value:function(a,o){return this}}])}(cc),xA=function(e){function t(){return Ut(this,t),Sn(this,t,arguments)}return Cn(t,e),Wt(t,[{key:"here",value:function(a){return this}},{key:"joining",value:function(a){return this}},{key:"whisper",value:function(a,o){return this}},{key:"leaving",value:function(a){return this}}])}(f2),Kc=function(){function e(t){Ut(this,e),this.setOptions(t),this.connect()}return Wt(e,[{key:"setOptions",value:function(n){this.options=ss(ss(ss({},e._defaultOptions),n),{},{broadcaster:n.broadcaster});var a=this.csrfToken();a&&(this.options.auth.headers["X-CSRF-TOKEN"]=a,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=a),a=this.options.bearerToken,a&&(this.options.auth.headers.Authorization="Bearer "+a,this.options.userAuthentication.headers.Authorization="Bearer "+a)}},{key:"csrfToken",value:function(){var n;return typeof window<"u"&&typeof window.Laravel<"u"&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"&&(n=document.querySelector('meta[name="csrf-token"]'))?n.getAttribute("content"):null}}])}();Kc._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"};var ad=function(e){function t(){var n;return Ut(this,t),n=Sn(this,t,arguments),n.channels={},n}return Cn(t,e),Wt(t,[{key:"connect",value:function(){if(typeof this.options.client<"u")this.pusher=this.options.client;else if(this.options.Pusher)this.pusher=new this.options.Pusher(this.options.key,this.options);else if(typeof window<"u"&&typeof window.Pusher<"u")this.pusher=new window.Pusher(this.options.key,this.options);else throw new Error("Pusher client not found. Should be globally available or passed via options.client")}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(a,o,i){return this.channel(a).listen(o,i)}},{key:"channel",value:function(a){return this.channels[a]||(this.channels[a]=new qp(this.pusher,a,this.options)),this.channels[a]}},{key:"privateChannel",value:function(a){return this.channels["private-"+a]||(this.channels["private-"+a]=new c2(this.pusher,"private-"+a,this.options)),this.channels["private-"+a]}},{key:"encryptedPrivateChannel",value:function(a){return this.channels["private-encrypted-"+a]||(this.channels["private-encrypted-"+a]=new _A(this.pusher,"private-encrypted-"+a,this.options)),this.channels["private-encrypted-"+a]}},{key:"presenceChannel",value:function(a){return this.channels["presence-"+a]||(this.channels["presence-"+a]=new SA(this.pusher,"presence-"+a,this.options)),this.channels["presence-"+a]}},{key:"leave",value:function(a){var o=this,i=[a,"private-"+a,"private-encrypted-"+a,"presence-"+a];i.forEach(function(s){o.leaveChannel(s)})}},{key:"leaveChannel",value:function(a){this.channels[a]&&(this.channels[a].unsubscribe(),delete this.channels[a])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}])}(Kc),TA=function(e){function t(){var n;return Ut(this,t),n=Sn(this,t,arguments),n.channels={},n}return Cn(t,e),Wt(t,[{key:"connect",value:function(){var a,o=this,i=this.getSocketIO();this.socket=i((a=this.options.host)!==null&&a!==void 0?a:void 0,this.options),this.socket.on("reconnect",function(){Object.values(o.channels).forEach(function(s){s.subscribe()})})}},{key:"getSocketIO",value:function(){if(typeof this.options.client<"u")return this.options.client;if(typeof window<"u"&&typeof window.io<"u")return window.io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(a,o,i){return this.channel(a).listen(o,i)}},{key:"channel",value:function(a){return this.channels[a]||(this.channels[a]=new u2(this.socket,a,this.options)),this.channels[a]}},{key:"privateChannel",value:function(a){return this.channels["private-"+a]||(this.channels["private-"+a]=new d2(this.socket,"private-"+a,this.options)),this.channels["private-"+a]}},{key:"presenceChannel",value:function(a){return this.channels["presence-"+a]||(this.channels["presence-"+a]=new CA(this.socket,"presence-"+a,this.options)),this.channels["presence-"+a]}},{key:"leave",value:function(a){var o=this,i=[a,"private-"+a,"presence-"+a];i.forEach(function(s){o.leaveChannel(s)})}},{key:"leaveChannel",value:function(a){this.channels[a]&&(this.channels[a].unsubscribe(),delete this.channels[a])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}])}(Kc),$v=function(e){function t(){var n;return Ut(this,t),n=Sn(this,t,arguments),n.channels={},n}return Cn(t,e),Wt(t,[{key:"connect",value:function(){}},{key:"listen",value:function(a,o,i){return new cc}},{key:"channel",value:function(a){return new cc}},{key:"privateChannel",value:function(a){return new f2}},{key:"encryptedPrivateChannel",value:function(a){return new EA}},{key:"presenceChannel",value:function(a){return new xA}},{key:"leave",value:function(a){}},{key:"leaveChannel",value:function(a){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}])}(Kc),PA=function(){function e(t){Ut(this,e),this.options=t,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return Wt(e,[{key:"channel",value:function(n){return this.connector.channel(n)}},{key:"connect",value:function(){if(this.options.broadcaster==="reverb")this.connector=new ad(ss(ss({},this.options),{},{cluster:""}));else if(this.options.broadcaster==="pusher")this.connector=new ad(this.options);else if(this.options.broadcaster==="socket.io")this.connector=new TA(this.options);else if(this.options.broadcaster==="null")this.connector=new $v(this.options);else if(typeof this.options.broadcaster=="function"&&kA(this.options.broadcaster))this.connector=new this.options.broadcaster(this.options);else throw new Error("Broadcaster ".concat(ls(this.options.broadcaster)," ").concat(String(this.options.broadcaster)," is not supported."))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(n){return this.connector.presenceChannel(n)}},{key:"leave",value:function(n){this.connector.leave(n)}},{key:"leaveChannel",value:function(n){this.connector.leaveChannel(n)}},{key:"leaveAllChannels",value:function(){for(var n in this.connector.channels)this.leaveChannel(n)}},{key:"listen",value:function(n,a,o){return this.connector.listen(n,a,o)}},{key:"private",value:function(n){return this.connector.privateChannel(n)}},{key:"encryptedPrivate",value:function(n){if(this.connectorSupportsEncryptedPrivateChannels(this.connector))return this.connector.encryptedPrivateChannel(n);throw new Error("Broadcaster ".concat(ls(this.options.broadcaster)," ").concat(String(this.options.broadcaster)," does not support encrypted private channels."))}},{key:"connectorSupportsEncryptedPrivateChannels",value:function(n){return n instanceof ad||n instanceof $v}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),(typeof Turbo>"u"?"undefined":ls(Turbo))==="object"&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var n=this;Vue.http.interceptors.push(function(a,o){n.socketId()&&a.headers.set("X-Socket-ID",n.socketId()),o()})}},{key:"registerAxiosRequestInterceptor",value:function(){var n=this;axios.interceptors.request.use(function(a){return n.socketId()&&(a.headers["X-Socket-Id"]=n.socketId()),a})}},{key:"registerjQueryAjaxSetup",value:function(){var n=this;typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter(function(a,o,i){n.socketId()&&i.setRequestHeader("X-Socket-Id",n.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var n=this;document.addEventListener("turbo:before-fetch-request",function(a){a.detail.fetchOptions.headers["X-Socket-Id"]=n.socketId()})}}])}(),od={exports:{}};/*!
627
627
  * Pusher JavaScript Library v8.4.0
628
628
  * https://pusher.com/
629
629
  *