diff --git a/composer.json b/composer.json index 0aa544316b..ecaadb596f 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "laravelcollective/html": "^6.2", "league/csv": "^9.7", "league/flysystem-aws-s3-v3": "^3.0", - "livewire/livewire": "^3.0", + "livewire/livewire": "^3.5", "neitanod/forceutf8": "^2.0", "nesbot/carbon": "^2.32", "nunomaduro/collision": "^6.1", diff --git a/public/vendor/livewire/livewire.esm.js b/public/vendor/livewire/livewire.esm.js index 2f0f08cdff..0f6daa54ec 100644 --- a/public/vendor/livewire/livewire.esm.js +++ b/public/vendor/livewire/livewire.esm.js @@ -1594,7 +1594,7 @@ var require_module_cjs = __commonJS({ const target = objects.find((obj) => Object.prototype.hasOwnProperty.call(obj, name)) || objects[objects.length - 1]; const descriptor = Object.getOwnPropertyDescriptor(target, name); if ((descriptor == null ? void 0 : descriptor.set) && (descriptor == null ? void 0 : descriptor.get)) - return Reflect.set(target, name, value, thisProxy); + return descriptor.set.call(thisProxy, value) || true; return Reflect.set(target, name, value); } }; @@ -2861,7 +2861,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); get raw() { return raw; }, - version: "3.14.0", + version: "3.14.1", flushAndStopDeferringMutations, dontAutoEvaluateFunctions, disableEffectScheduling, @@ -7539,7 +7539,9 @@ var UploadManager = class { unsetUploadLoading(this.component); let uploadItem = this.uploadBag.first(name); if (uploadItem) { - uploadItem.request.abort(); + if (uploadItem.request) { + uploadItem.request.abort(); + } this.uploadBag.shift(name).cancelledCallback(); if (cancelledCallback) cancelledCallback(); @@ -8309,6 +8311,9 @@ var Component = class { if (this.originalEffects.url) { effects.url = this.originalEffects.url; } + if (this.originalEffects.scripts) { + effects.scripts = this.originalEffects.scripts; + } el.setAttribute("wire:effects", JSON.stringify(effects)); } addCleanup(cleanup) { @@ -9271,13 +9276,15 @@ function history2(Alpine19) { }); Alpine19.history = { track }; } -function track(name, initialSeedValue, alwaysShow = false) { +function track(name, initialSeedValue, alwaysShow = false, except = null) { let { has, get, set, remove } = queryStringUtils(); let url = new URL(window.location.href); let isInitiallyPresentInUrl = has(url, name); let initialValue = isInitiallyPresentInUrl ? get(url, name) : initialSeedValue; let initialValueMemo = JSON.stringify(initialValue); + let exceptValueMemo = [false, null, void 0].includes(except) ? initialSeedValue : JSON.stringify(except); let hasReturnedToInitialValue = (newValue) => JSON.stringify(newValue) === initialValueMemo; + let hasReturnedToExceptValue = (newValue) => JSON.stringify(newValue) === exceptValueMemo; if (alwaysShow) url = set(url, name, initialValue); replace(url, name, { value: initialValue }); @@ -9290,6 +9297,8 @@ function track(name, initialSeedValue, alwaysShow = false) { url2 = remove(url2, name); } else if (newValue === void 0) { url2 = remove(url2, name); + } else if (!alwaysShow && hasReturnedToExceptValue(newValue)) { + url2 = remove(url2, name); } else { url2 = set(url2, name, newValue); } @@ -9950,7 +9959,7 @@ on("effect", ({ component, effects, cleanup }) => { if (!as) as = name; let initialValue = [false, null, void 0].includes(except) ? dataGet(component.ephemeral, name) : except; - let { replace: replace2, push: push2, pop } = track(as, initialValue, alwaysShow); + let { replace: replace2, push: push2, pop } = track(as, initialValue, alwaysShow, except); if (use === "replace") { let effectReference = import_alpinejs10.default.effect(() => { replace2(dataGet(component.reactive, name)); diff --git a/public/vendor/livewire/livewire.js b/public/vendor/livewire/livewire.js index 110eef86c8..8eef48fadf 100644 --- a/public/vendor/livewire/livewire.js +++ b/public/vendor/livewire/livewire.js @@ -635,7 +635,9 @@ unsetUploadLoading(this.component); let uploadItem = this.uploadBag.first(name); if (uploadItem) { - uploadItem.request.abort(); + if (uploadItem.request) { + uploadItem.request.abort(); + } this.uploadBag.shift(name).cancelledCallback(); if (cancelledCallback) cancelledCallback(); @@ -1011,7 +1013,7 @@ const target = objects.find((obj) => Object.prototype.hasOwnProperty.call(obj, name)) || objects[objects.length - 1]; const descriptor = Object.getOwnPropertyDescriptor(target, name); if (descriptor?.set && descriptor?.get) - return Reflect.set(target, name, value, thisProxy); + return descriptor.set.call(thisProxy, value) || true; return Reflect.set(target, name, value); } }; @@ -2278,7 +2280,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); get raw() { return raw; }, - version: "3.14.0", + version: "3.14.1", flushAndStopDeferringMutations, dontAutoEvaluateFunctions, disableEffectScheduling, @@ -4567,6 +4569,9 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); if (this.originalEffects.url) { effects.url = this.originalEffects.url; } + if (this.originalEffects.scripts) { + effects.scripts = this.originalEffects.scripts; + } el.setAttribute("wire:effects", JSON.stringify(effects)); } addCleanup(cleanup2) { @@ -7914,13 +7919,15 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); }); Alpine3.history = { track: track2 }; } - function track2(name, initialSeedValue, alwaysShow = false) { + function track2(name, initialSeedValue, alwaysShow = false, except = null) { let { has: has2, get: get3, set: set3, remove } = queryStringUtils(); let url = new URL(window.location.href); let isInitiallyPresentInUrl = has2(url, name); let initialValue = isInitiallyPresentInUrl ? get3(url, name) : initialSeedValue; let initialValueMemo = JSON.stringify(initialValue); + let exceptValueMemo = [false, null, void 0].includes(except) ? initialSeedValue : JSON.stringify(except); let hasReturnedToInitialValue = (newValue) => JSON.stringify(newValue) === initialValueMemo; + let hasReturnedToExceptValue = (newValue) => JSON.stringify(newValue) === exceptValueMemo; if (alwaysShow) url = set3(url, name, initialValue); replace(url, name, { value: initialValue }); @@ -7933,6 +7940,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); url2 = remove(url2, name); } else if (newValue === void 0) { url2 = remove(url2, name); + } else if (!alwaysShow && hasReturnedToExceptValue(newValue)) { + url2 = remove(url2, name); } else { url2 = set3(url2, name, newValue); } @@ -9082,7 +9091,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); if (!as) as = name; let initialValue = [false, null, void 0].includes(except) ? dataGet(component.ephemeral, name) : except; - let { replace: replace2, push: push2, pop } = track2(as, initialValue, alwaysShow); + let { replace: replace2, push: push2, pop } = track2(as, initialValue, alwaysShow, except); if (use === "replace") { let effectReference = module_default.effect(() => { replace2(dataGet(component.reactive, name)); diff --git a/public/vendor/livewire/livewire.min.js b/public/vendor/livewire/livewire.min.js index 5872dbf510..36c4171c37 100644 --- a/public/vendor/livewire/livewire.min.js +++ b/public/vendor/livewire/livewire.min.js @@ -1,14 +1,14 @@ -(()=>{var el=Object.create;var ti=Object.defineProperty;var tl=Object.getOwnPropertyDescriptor;var rl=Object.getOwnPropertyNames;var nl=Object.getPrototypeOf,il=Object.prototype.hasOwnProperty;var ol=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var sl=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of rl(t))!il.call(e,i)&&i!==r&&ti(e,i,{get:()=>t[i],enumerable:!(n=tl(t,i))||n.enumerable});return e};var al=(e,t,r)=>(r=e!=null?el(nl(e)):{},sl(t||!e||!e.__esModule?ti(r,"default",{value:e,enumerable:!0}):r,e));var ua=ol((Dn,la)=>{(function(e,t){typeof define=="function"&&define.amd?define(t):typeof Dn=="object"?la.exports=t():e.NProgress=t()})(Dn,function(){var e={};e.version="0.2.0";var t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};e.configure=function(c){var f,m;for(f in c)m=c[f],m!==void 0&&c.hasOwnProperty(f)&&(t[f]=m);return this},e.status=null,e.set=function(c){var f=e.isStarted();c=r(c,t.minimum,1),e.status=c===1?null:c;var m=e.render(!f),v=m.querySelector(t.barSelector),g=t.speed,x=t.easing;return m.offsetWidth,o(function(b){t.positionUsing===""&&(t.positionUsing=e.getPositioningCSS()),s(v,i(c,g,x)),c===1?(s(m,{transition:"none",opacity:1}),m.offsetWidth,setTimeout(function(){s(m,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){e.remove(),b()},g)},g)):setTimeout(b,g)}),this},e.isStarted=function(){return typeof e.status=="number"},e.start=function(){e.status||e.set(0);var c=function(){setTimeout(function(){!e.status||(e.trickle(),c())},t.trickleSpeed)};return t.trickle&&c(),this},e.done=function(c){return!c&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(c){var f=e.status;return f?(typeof c!="number"&&(c=(1-f)*r(Math.random()*f,.1,.95)),f=r(f+c,0,.994),e.set(f)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var c=0,f=0;e.promise=function(m){return!m||m.state()==="resolved"?this:(f===0&&e.start(),c++,f++,m.always(function(){f--,f===0?(c=0,e.done()):e.set((c-f)/c)}),this)}}(),e.render=function(c){if(e.isRendered())return document.getElementById("nprogress");l(document.documentElement,"nprogress-busy");var f=document.createElement("div");f.id="nprogress",f.innerHTML=t.template;var m=f.querySelector(t.barSelector),v=c?"-100":n(e.status||0),g=document.querySelector(t.parent),x;return s(m,{transition:"all 0 linear",transform:"translate3d("+v+"%,0,0)"}),t.showSpinner||(x=f.querySelector(t.spinnerSelector),x&&p(x)),g!=document.body&&l(g,"nprogress-custom-parent"),g.appendChild(f),f},e.remove=function(){u(document.documentElement,"nprogress-busy"),u(document.querySelector(t.parent),"nprogress-custom-parent");var c=document.getElementById("nprogress");c&&p(c)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var c=document.body.style,f="WebkitTransform"in c?"Webkit":"MozTransform"in c?"Moz":"msTransform"in c?"ms":"OTransform"in c?"O":"";return f+"Perspective"in c?"translate3d":f+"Transform"in c?"translate":"margin"};function r(c,f,m){return cm?m:c}function n(c){return(-1+c)*100}function i(c,f,m){var v;return t.positionUsing==="translate3d"?v={transform:"translate3d("+n(c)+"%,0,0)"}:t.positionUsing==="translate"?v={transform:"translate("+n(c)+"%,0)"}:v={"margin-left":n(c)+"%"},v.transition="all "+f+"ms "+m,v}var o=function(){var c=[];function f(){var m=c.shift();m&&m(f)}return function(m){c.push(m),c.length==1&&f()}}(),s=function(){var c=["Webkit","O","Moz","ms"],f={};function m(b){return b.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(_,T){return T.toUpperCase()})}function v(b){var _=document.body.style;if(b in _)return b;for(var T=c.length,O=b.charAt(0).toUpperCase()+b.slice(1),w;T--;)if(w=c[T]+O,w in _)return w;return b}function g(b){return b=m(b),f[b]||(f[b]=v(b))}function x(b,_,T){_=g(_),b.style[_]=T}return function(b,_){var T=arguments,O,w;if(T.length==2)for(O in _)w=_[O],w!==void 0&&_.hasOwnProperty(O)&&x(b,O,w);else x(b,T[1],T[2])}}();function a(c,f){var m=typeof c=="string"?c:d(c);return m.indexOf(" "+f+" ")>=0}function l(c,f){var m=d(c),v=m+f;a(m,f)||(c.className=v.substring(1))}function u(c,f){var m=d(c),v;!a(c,f)||(v=m.replace(" "+f+" "," "),c.className=v.substring(1,v.length-1))}function d(c){return(" "+(c.className||"")+" ").replace(/\s+/gi," ")}function p(c){c&&c.parentNode&&c.parentNode.removeChild(c)}return e})});var wt=class{constructor(){this.arrays={}}add(t,r){this.arrays[t]||(this.arrays[t]=[]),this.arrays[t].push(r)}remove(t){this.arrays[t]&&delete this.arrays[t]}get(t){return this.arrays[t]||[]}each(t,r){return this.get(t).forEach(r)}},Fe=class{constructor(){this.arrays=new WeakMap}add(t,r){this.arrays.has(t)||this.arrays.set(t,[]),this.arrays.get(t).push(r)}remove(t){this.arrays.has(t)&&this.arrays.delete(t,[])}get(t){return this.arrays.has(t)?this.arrays.get(t):[]}each(t,r){return this.get(t).forEach(r)}};function yt(e,t,r={},n=!0){e.dispatchEvent(new CustomEvent(t,{detail:r,bubbles:n,composed:!0,cancelable:!0}))}function xt(e,t,r){return e.addEventListener(t,r),()=>e.removeEventListener(t,r)}function _t(e){return typeof e=="object"&&e!==null}function ri(e){return _t(e)&&!vr(e)}function vr(e){return Array.isArray(e)}function br(e){return typeof e=="function"}function ni(e){return typeof e!="object"||e===null}function ce(e){return JSON.parse(JSON.stringify(e))}function W(e,t){return t===""?e:t.split(".").reduce((r,n)=>{if(r!==void 0)return r[n]},e)}function ye(e,t,r){let n=t.split(".");if(n.length===1)return e[t]=r;let i=n.shift(),o=n.join(".");e[i]===void 0&&(e[i]={}),ye(e[i],o,r)}function Qe(e,t,r={},n=""){if(e===t)return r;if(typeof e!=typeof t||ri(e)&&vr(t)||vr(e)&&ri(t)||ni(e)||ni(t))return r[n]=t,r;let i=Object.keys(e);return Object.entries(t).forEach(([o,s])=>{r={...r,...Qe(e[o],t[o],r,n===""?o:`${n}.${o}`)},i=i.filter(a=>a!==o)}),i.forEach(o=>{r[`${n}.${o}`]="__rm__"}),r}function xe(e){let t=ii(e)?e[0]:e,r=ii(e)?e[1]:void 0;return _t(t)&&Object.entries(t).forEach(([n,i])=>{t[n]=xe(i)}),t}function ii(e){return Array.isArray(e)&&e.length===2&&typeof e[1]=="object"&&Object.keys(e[1]).includes("s")}function St(){if(document.querySelector('meta[name="csrf-token"]'))return document.querySelector('meta[name="csrf-token"]').getAttribute("content");if(document.querySelector("[data-csrf]"))return document.querySelector("[data-csrf]").getAttribute("data-csrf");if(window.livewireScriptConfig.csrf??!1)return window.livewireScriptConfig.csrf;throw"Livewire: No CSRF token detected"}var Ie;function oi(){if(Ie)return Ie;if(window.livewireScriptConfig&&(window.livewireScriptConfig.nonce??!1))return Ie=window.livewireScriptConfig.nonce,Ie;let e=document.querySelector("style[data-livewire-style][nonce]");return e?(Ie=e.nonce,Ie):null}function si(){return document.querySelector("[data-update-uri]")?.getAttribute("data-update-uri")??window.livewireScriptConfig.uri??null}function Et(e){return!!e.match(/