@lockerverse/react 0.2.232 → 0.2.234
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/MIGRATIONS.md +8 -0
- package/dist/auction-catalog.css +14 -0
- package/dist/embed/chunks/{auction-payment-view-VFXSZWXR.js → auction-payment-view-ERY7SC6C.js} +1 -1
- package/dist/embed/chunks/{chunk-KW7VHDHQ.js → chunk-JJVID3KZ.js} +2 -2
- package/dist/embed/chunks/{chunk-MAAX3XDC.js → chunk-ZD64W5CW.js} +2 -2
- package/dist/embed/chunks/{chunk-2KXVUET3.js → chunk-ZR6TPDWZ.js} +1 -1
- package/dist/embed/chunks/{lockerverse-auction-item-L62MMRHZ.js → lockerverse-auction-item-ETY2D2I2.js} +2 -2
- package/dist/embed/lockerverse.js +1 -1
- package/dist/embed/runtime.js +2 -2
- package/guides/auctions.md +1 -1
- package/guides/bookings.md +1 -1
- package/guides/browser-embed.md +3 -3
- package/guides/events.md +1 -1
- package/guides/integration.md +1 -1
- package/guides/payment-widgets.md +1 -1
- package/guides/signup.md +1 -1
- package/package.json +2 -2
- /package/dist/embed/chunks/{chunk-KW7VHDHQ.js.LEGAL.txt → chunk-JJVID3KZ.js.LEGAL.txt} +0 -0
- /package/dist/embed/chunks/{chunk-MAAX3XDC.js.LEGAL.txt → chunk-ZD64W5CW.js.LEGAL.txt} +0 -0
- /package/dist/embed/chunks/{lockerverse-auction-item-L62MMRHZ.js.LEGAL.txt → lockerverse-auction-item-ETY2D2I2.js.LEGAL.txt} +0 -0
package/MIGRATIONS.md
CHANGED
|
@@ -4,6 +4,14 @@ This file ships in both @lockerverse/sdk and @lockerverse/react. Use the copy in
|
|
|
4
4
|
the target installed release. This is an agent-run procedure, not an install
|
|
5
5
|
script. Installing a package does not edit host code or guarantee these steps ran.
|
|
6
6
|
|
|
7
|
+
## 0.2.234 — light auction catalog colors
|
|
8
|
+
|
|
9
|
+
Light catalogs use the configured accent for selected status filters and a darker accent border for hovered or focused cards. Update the package or pinned embed URL to adopt the styles.
|
|
10
|
+
|
|
11
|
+
## 0.2.233 — equal-height auction cards
|
|
12
|
+
|
|
13
|
+
The standard auction catalog now aligns card bottoms and bid buttons within each row. Update the React package or the browser embed script to this version to adopt the layout.
|
|
14
|
+
|
|
7
15
|
## 0.2.230 — browser embed loading and dark theme
|
|
8
16
|
|
|
9
17
|
- **Adoption:** change the script URL from `@0.2.229` to `@0.2.230`.
|
package/dist/auction-catalog.css
CHANGED
|
@@ -79,6 +79,13 @@
|
|
|
79
79
|
color: var(--lockerverse-bg);
|
|
80
80
|
background: var(--lockerverse-text);
|
|
81
81
|
}
|
|
82
|
+
[data-lockerverse-theme="light"]
|
|
83
|
+
.lockerverse-auctions__catalog-filters
|
|
84
|
+
:is(button[aria-pressed="true"], a[aria-current="page"]) {
|
|
85
|
+
color: var(--lockerverse-accent-contrast, #000);
|
|
86
|
+
background: var(--lockerverse-accent);
|
|
87
|
+
border-color: var(--lockerverse-accent);
|
|
88
|
+
}
|
|
82
89
|
.lockerverse-auctions__catalog-filters :is(button, a) span {
|
|
83
90
|
padding: 2px 8px;
|
|
84
91
|
font-size: 12px;
|
|
@@ -96,6 +103,9 @@
|
|
|
96
103
|
.lockerverse-auctions__catalog-grid > li {
|
|
97
104
|
min-width: 0;
|
|
98
105
|
}
|
|
106
|
+
.lockerverse-auctions__catalog-grid > li > .lockerverse-auctions--card {
|
|
107
|
+
height: 100%;
|
|
108
|
+
}
|
|
99
109
|
.lockerverse-auctions__catalog-card {
|
|
100
110
|
position: relative;
|
|
101
111
|
display: flex;
|
|
@@ -114,6 +124,10 @@
|
|
|
114
124
|
border-color: rgb(255 255 255 / 20%);
|
|
115
125
|
transform: translateY(-4px);
|
|
116
126
|
}
|
|
127
|
+
[data-lockerverse-theme="light"]
|
|
128
|
+
.lockerverse-auctions__catalog-card:is(:hover, :focus-within) {
|
|
129
|
+
border-color: color-mix(in srgb, var(--lockerverse-accent) 72%, #121416);
|
|
130
|
+
}
|
|
117
131
|
.lockerverse-auctions .lockerverse-auctions__catalog-select {
|
|
118
132
|
position: absolute;
|
|
119
133
|
inset: 0;
|
package/dist/embed/chunks/{auction-payment-view-VFXSZWXR.js → auction-payment-view-ERY7SC6C.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as oe,b as _e,c as We,d as $e,e as Ye,f as ze,g as Re,h as Ve,i as Te,j as He,k as me,l as Je,m as Ge,n as Y}from"./chunk-
|
|
1
|
+
import{a as oe,b as _e,c as We,d as $e,e as Ye,f as ze,g as Re,h as Ve,i as Te,j as He,k as me,l as Je,m as Ge,n as Y}from"./chunk-ZR6TPDWZ.js";import{E as Ae,H as Be,I as Le,a as de,r as pe}from"./chunk-JJVID3KZ.js";import{a as re,c as q}from"./chunk-DCANE7XH.js";var Xe=re((Tn,Ke)=>{"use strict";var zt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ke.exports=zt});var tt=re((In,et)=>{"use strict";var Vt=Xe();function Qe(){}function Ze(){}Ze.resetWarningCache=Qe;et.exports=function(){function t(r,o,a,s,c,u){if(u!==Vt){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Ze,resetWarningCache:Qe};return n.PropTypes=n,n}});var rt=re((jn,nt)=>{nt.exports=tt()();var xn,On});var Tt=re(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});function se(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?se=function(e){return typeof e}:se=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(t)}var At="dahlia",yn=function(e){return e===3?"v3":e},Lt="https://js.stripe.com",gn="".concat(Lt,"/").concat(At,"/stripe.js"),Cn=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,bn=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,kt="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Sn=function(e){return Cn.test(e)||bn.test(e)},En=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Lt,'"]')),n=0;n<e.length;n++){var r=e[n];if(Sn(r.src))return r}return null},Pt=function(e){var n=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(gn).concat(n);var o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return o.appendChild(r),r},kn=function(e,n){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"9.12.1",startTime:n})},ae=null,he=null,ve=null,Pn=function(e){return function(n){e(new Error("Failed to load Stripe.js",{cause:n}))}},wn=function(e,n){return function(){window.Stripe?e(window.Stripe):n(new Error("Stripe.js not available"))}},An=function(e){return ae!==null?ae:(ae=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&e&&console.warn(kt),window.Stripe){n(window.Stripe);return}try{var o=En();if(o&&e)console.warn(kt);else if(!o)o=Pt(e);else if(o&&ve!==null&&he!==null){var a;o.removeEventListener("load",ve),o.removeEventListener("error",he),(a=o.parentNode)===null||a===void 0||a.removeChild(o),o=Pt(e)}ve=wn(n,r),he=Pn(r),o.addEventListener("load",ve),o.addEventListener("error",he)}catch(s){r(s);return}}),ae.catch(function(n){return ae=null,Promise.reject(n)}))},Ln=function(e,n,r){if(e===null)return null;var o=n[0];if(typeof o!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(se(o)," instead."));var a=o.match(/^pk_test/),s=yn(e.version),c=At;a&&s!==c&&console.warn("Stripe.js@".concat(s," was loaded on the page, but @stripe/stripe-js@").concat("9.12.1"," expected Stripe.js@").concat(c,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var u=e.apply(void 0,n);return kn(u,r),u},wt=function(e){var n=`invalid load parameters; expected object of shape
|
|
2
2
|
|
|
3
3
|
{advancedFraudSignals: boolean}
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ee,c as Qe}from"./chunk-DCANE7XH.js";var na=ee(i=>{"use strict";var he=Symbol.for("react.transitional.element"),Ua=Symbol.for("react.portal"),_a=Symbol.for("react.fragment"),Ha=Symbol.for("react.strict_mode"),Ga=Symbol.for("react.profiler"),Va=Symbol.for("react.consumer"),za=Symbol.for("react.context"),Wa=Symbol.for("react.forward_ref"),Na=Symbol.for("react.suspense"),Xa=Symbol.for("react.memo"),ua=Symbol.for("react.lazy"),ja=Symbol.for("react.activity"),Ye=Symbol.iterator;function $a(e){return e===null||typeof e!="object"?null:(e=Ye&&e[Ye]||e["@@iterator"],typeof e=="function"?e:null)}var ra={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sa=Object.assign,oa={};function N(e,a,t){this.props=e,this.context=a,this.refs=oa,this.updater=t||ra}N.prototype.isReactComponent={};N.prototype.setState=function(e,a){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,a,"setState")};N.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function la(){}la.prototype=N.prototype;function Le(e,a,t){this.props=e,this.context=a,this.refs=oa,this.updater=t||ra}var Ie=Le.prototype=new la;Ie.constructor=Le;sa(Ie,N.prototype);Ie.isPureReactComponent=!0;var ea=Array.isArray;function me(){}var x={H:null,A:null,T:null,S:null},fa=Object.prototype.hasOwnProperty;function xe(e,a,t){var u=t.ref;return{$$typeof:he,type:e,key:a,ref:u!==void 0?u:null,props:t}}function Ka(e,a){return xe(e.type,a,e.props)}function ye(e){return typeof e=="object"&&e!==null&&e.$$typeof===he}function Za(e){var a={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(t){return a[t]})}var aa=/\/+/g;function pe(e,a){return typeof e=="object"&&e!==null&&e.key!=null?Za(""+e.key):a.toString(36)}function Ja(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(me,me):(e.status="pending",e.then(function(a){e.status==="pending"&&(e.status="fulfilled",e.value=a)},function(a){e.status==="pending"&&(e.status="rejected",e.reason=a)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function W(e,a,t,u,r){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case he:case Ua:o=!0;break;case ua:return o=e._init,W(o(e._payload),a,t,u,r)}}if(o)return r=r(e),o=u===""?"."+pe(e,0):u,ea(r)?(t="",o!=null&&(t=o.replace(aa,"$&/")+"/"),W(r,a,t,"",function(n){return n})):r!=null&&(ye(r)&&(r=Ka(r,t+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(aa,"$&/")+"/")+o)),a.push(r)),1;o=0;var f=u===""?".":u+":";if(ea(e))for(var l=0;l<e.length;l++)u=e[l],s=f+pe(u,l),o+=W(u,a,t,s,r);else if(l=$a(e),typeof l=="function")for(e=l.call(e),l=0;!(u=e.next()).done;)u=u.value,s=f+pe(u,l++),o+=W(u,a,t,s,r);else if(s==="object"){if(typeof e.then=="function")return W(Ja(e),a,t,u,r);throw a=String(e),Error("Objects are not valid as a React child (found: "+(a==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}return o}function ae(e,a,t){if(e==null)return e;var u=[],r=0;return W(e,u,"","",function(s){return a.call(t,s,r++)}),u}function Qa(e){if(e._status===-1){var a=e._result;a=a(),a.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=a)}if(e._status===1)return e._result.default;throw e._result}var ta=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ya={map:ae,forEach:function(e,a,t){ae(e,function(){a.apply(this,arguments)},t)},count:function(e){var a=0;return ae(e,function(){a++}),a},toArray:function(e){return ae(e,function(a){return a})||[]},only:function(e){if(!ye(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};i.Activity=ja;i.Children=Ya;i.Component=N;i.Fragment=_a;i.Profiler=Ga;i.PureComponent=Le;i.StrictMode=Ha;i.Suspense=Na;i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x;i.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}};i.cache=function(e){return function(){return e.apply(null,arguments)}};i.cacheSignal=function(){return null};i.cloneElement=function(e,a,t){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var u=sa({},e.props),r=e.key;if(a!=null)for(s in a.key!==void 0&&(r=""+a.key),a)!fa.call(a,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&a.ref===void 0||(u[s]=a[s]);var s=arguments.length-2;if(s===1)u.children=t;else if(1<s){for(var o=Array(s),f=0;f<s;f++)o[f]=arguments[f+2];u.children=o}return xe(e.type,r,u)};i.createContext=function(e){return e={$$typeof:za,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Va,_context:e},e};i.createElement=function(e,a,t){var u,r={},s=null;if(a!=null)for(u in a.key!==void 0&&(s=""+a.key),a)fa.call(a,u)&&u!=="key"&&u!=="__self"&&u!=="__source"&&(r[u]=a[u]);var o=arguments.length-2;if(o===1)r.children=t;else if(1<o){for(var f=Array(o),l=0;l<o;l++)f[l]=arguments[l+2];r.children=f}if(e&&e.defaultProps)for(u in o=e.defaultProps,o)r[u]===void 0&&(r[u]=o[u]);return xe(e,s,r)};i.createRef=function(){return{current:null}};i.forwardRef=function(e){return{$$typeof:Wa,render:e}};i.isValidElement=ye;i.lazy=function(e){return{$$typeof:ua,_payload:{_status:-1,_result:e},_init:Qa}};i.memo=function(e,a){return{$$typeof:Xa,type:e,compare:a===void 0?null:a}};i.startTransition=function(e){var a=x.T,t={};x.T=t;try{var u=e(),r=x.S;r!==null&&r(t,u),typeof u=="object"&&u!==null&&typeof u.then=="function"&&u.then(me,ta)}catch(s){ta(s)}finally{a!==null&&t.types!==null&&(a.types=t.types),x.T=a}};i.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()};i.use=function(e){return x.H.use(e)};i.useActionState=function(e,a,t){return x.H.useActionState(e,a,t)};i.useCallback=function(e,a){return x.H.useCallback(e,a)};i.useContext=function(e){return x.H.useContext(e)};i.useDebugValue=function(){};i.useDeferredValue=function(e,a){return x.H.useDeferredValue(e,a)};i.useEffect=function(e,a){return x.H.useEffect(e,a)};i.useEffectEvent=function(e){return x.H.useEffectEvent(e)};i.useId=function(){return x.H.useId()};i.useImperativeHandle=function(e,a,t){return x.H.useImperativeHandle(e,a,t)};i.useInsertionEffect=function(e,a){return x.H.useInsertionEffect(e,a)};i.useLayoutEffect=function(e,a){return x.H.useLayoutEffect(e,a)};i.useMemo=function(e,a){return x.H.useMemo(e,a)};i.useOptimistic=function(e,a){return x.H.useOptimistic(e,a)};i.useReducer=function(e,a,t){return x.H.useReducer(e,a,t)};i.useRef=function(e){return x.H.useRef(e)};i.useState=function(e){return x.H.useState(e)};i.useSyncExternalStore=function(e,a,t){return x.H.useSyncExternalStore(e,a,t)};i.useTransition=function(){return x.H.useTransition()};i.version="19.2.8"});var ge=ee((uu,ia)=>{"use strict";ia.exports=na()});var La=ee(re=>{"use strict";var It=Symbol.for("react.transitional.element"),xt=Symbol.for("react.fragment");function ha(e,a,t){var u=null;if(t!==void 0&&(u=""+t),a.key!==void 0&&(u=""+a.key),"key"in a){t={};for(var r in a)r!=="key"&&(t[r]=a[r])}else t=a;return a=t.ref,{$$typeof:It,type:e,key:u,ref:a!==void 0?a:null,props:t}}re.Fragment=xt;re.jsx=ha;re.jsxs=ha});var yt=ee((fr,Ia)=>{"use strict";Ia.exports=La()});var ue=Qe(ge());var da=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),et=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,t,u)=>u?u.toUpperCase():t.toLowerCase()),Ce=e=>{let a=et(e);return a.charAt(0).toUpperCase()+a.slice(1)},te=(...e)=>e.filter((a,t,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===t).join(" ").trim(),ca=e=>{for(let a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var j=Qe(ge());var pa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var ma=(0,j.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:u,className:r="",children:s,iconNode:o,...f},l)=>(0,j.createElement)("svg",{ref:l,...pa,width:a,height:a,stroke:e,strokeWidth:u?Number(t)*24/Number(a):t,className:te("lucide",r),...!s&&!ca(f)&&{"aria-hidden":"true"},...f},[...o.map(([n,d])=>(0,j.createElement)(n,d)),...Array.isArray(s)?s:[s]]));var m=(e,a)=>{let t=(0,ue.forwardRef)(({className:u,...r},s)=>(0,ue.createElement)(ma,{ref:s,iconNode:a,className:te(`lucide-${da(Ce(e))}`,`lucide-${e}`,u),...r}));return t.displayName=Ce(e),t};var at=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Se=m("arrow-right",at);var tt=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ve=m("chevron-left",tt);var ut=[["path",{d:"m14 13-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381",key:"pgg06f"}],["path",{d:"m16 16 6-6",key:"vzrcl6"}],["path",{d:"m21.5 10.5-8-8",key:"a17d9x"}],["path",{d:"m8 8 6-6",key:"18bi4p"}],["path",{d:"m8.5 7.5 8 8",key:"1oyaui"}]],ke=m("gavel",ut);var rt=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],we=m("shield-check",rt);var st=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],Ae=m("timer-reset",st);var ot=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],X=m("badge-check",ot);var lt=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pe=m("chevron-down",lt);var ft=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],be=m("chevron-right",ft);var nt=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],De=m("clock-3",nt);var it=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Me=m("file-text",it);var dt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Be=m("info",dt);var ct=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],Fe=m("list-checks",ct);var pt=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Re=m("pause",pt);var mt=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Te=m("play",mt);var ht=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],qe=m("shopping-bag",ht);var Lt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ee=m("x",Lt);var xa=new Map;function ya(e,a=2){let t=xa.get(a);return t||(t=new Intl.NumberFormat("en-US",{currency:"USD",maximumFractionDigits:2,minimumFractionDigits:a,style:"currency"}),xa.set(a,t)),t.format(e/100)}function dr(e,a=e.status,t){let u=a==="draft",r=t??Ct(e),s=u?r?.startAt??e.startAt:(a==="finished"?t?.finishedAt:void 0)??t?.endAt??e.endAt,o=new Date(s);if(!Number.isFinite(o.getTime()))return"";let l=(u?r?.startAt:t?.endAt)?!0:(u?e.configuration.startTimeEnabled:e.configuration.endTimeEnabled)??!0,n=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"short",timeZone:"America/New_York",year:"numeric"}).format(o);if(!l)return n;let d=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",timeZone:"America/New_York",timeZoneName:"short"}).format(o);return`${n} at ${d}`}function cr(e){return ya(e,0)}function gt(e,a){if(e.status==="finished"||a?.status==="finished")return"finished";if(a&&!(a.startAt&&a.endAt)&&(a.status==="draft"||e.status==="draft"))return"draft";let t=Date.now();if(Date.parse(a?.endAt??e.endAt)<=t)return"finished";if(Date.parse(a?.startAt??e.startAt)>t)return"draft";if(a)return"active";if(e.items.length){let u=e.items.map(r=>gt(e,r));return u.includes("active")?"active":u.includes("draft")?"draft":"finished"}return e.status}function Ct(e){let a=Date.now();return e.items.filter(t=>t.status!=="finished"&&Date.parse(t.startAt??e.startAt)>a).sort((t,u)=>Date.parse(t.startAt??e.startAt)-Date.parse(u.startAt??e.startAt))[0]}function pr(e){return e.isSoldOut||e.saleMode==="buy_now"&&e.availableQuantity===0}var St="0.2.232",_=class extends Error{failureKind;code;operation;reportable;recoveryRecommended;sdkVersion;serverCode;status;constructor({failureKind:e,code:a,message:t,operation:u,reportable:r,recoveryRecommended:s=!1,serverCode:o,status:f}){super(t),this.name="LockerverseSdkError",this.failureKind=e,this.code=a,this.operation=u,this.reportable=r,this.recoveryRecommended=s,this.sdkVersion=St,this.serverCode=o,this.status=f}};var se,vt={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Oe(e){return!e&&!se?vt:{lang:e?.lang??se?.lang,message:e?.message,abortEarly:e?.abortEarly??se?.abortEarly,abortPipeEarly:e?.abortPipeEarly??se?.abortPipeEarly}}var kt;function wt(e){return kt?.get(e)}var At;function Pt(e){return At?.get(e)}var bt;function Dt(e,a){return bt?.get(e)?.get(a)}function G(e){let a=typeof e;return a==="string"?`"${e}"`:a==="number"||a==="bigint"||a==="boolean"?`${e}`:a==="object"||a==="function"?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":a}function L(e,a,t,u,r){let s=r&&"input"in r?r.input:t.value,o=r?.expected??e.expects??null,f=r?.received??G(s),l={kind:e.kind,type:e.type,input:s,expected:o,received:f,message:`Invalid ${a}: ${o?`Expected ${o} but r`:"R"}eceived ${f}`,requirement:e.requirement,path:r?.path,issues:r?.issues,lang:u.lang,abortEarly:u.abortEarly,abortPipeEarly:u.abortPipeEarly},n=e.kind==="schema",d=r?.message??e.message??Dt(e.reference,l.lang)??(n?Pt(l.lang):null)??u.message??wt(l.lang);d!==void 0&&(l.message=typeof d=="function"?d(l):d),n&&(t.typed=!1),t.issues?t.issues.push(l):t.issues=[l]}var ga=new WeakMap;function P(e){let a=ga.get(e);return a||(a={version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Oe())}},ga.set(e,a)),a}function Mt(e,a){return Object.prototype.hasOwnProperty.call(e,a)&&a!=="__proto__"&&a!=="prototype"&&a!=="constructor"}function Ue(e,a){let t=[...new Set(e)];return t.length>1?`(${t.join(` ${a} `)})`:t[0]??"never"}var _e=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};var Bt=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;var Ft=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z| ?[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u;function b(e,a){return{kind:"validation",type:"check",reference:b,async:!1,expects:null,requirement:e,message:a,"~run"(t,u){return t.typed&&!this.requirement(t.value)&&L(this,"input",t,u),t}}}function He(e){return{kind:"validation",type:"email",reference:He,expects:null,async:!1,requirement:Bt,message:e,"~run"(a,t){return a.typed&&!this.requirement.test(a.value)&&L(this,"email",a,t),a}}}function Ge(e){return{kind:"validation",type:"iso_timestamp",reference:Ge,async:!1,expects:null,requirement:Ft,message:e,"~run"(a,t){return a.typed&&!this.requirement.test(a.value)&&L(this,"timestamp",a,t),a}}}function Ve(e,a){return{kind:"validation",type:"max_value",reference:Ve,async:!1,expects:`<=${e instanceof Date?e.toJSON():G(e)}`,requirement:e,message:a,"~run"(t,u){return t.typed&&!(t.value<=this.requirement)&&L(this,"value",t,u,{received:t.value instanceof Date?t.value.toJSON():G(t.value)}),t}}}function $(e,a){return{kind:"validation",type:"min_length",reference:$,async:!1,expects:`>=${e}`,requirement:e,message:a,"~run"(t,u){return t.typed&&t.value.length<this.requirement&&L(this,"length",t,u,{received:`${t.value.length}`}),t}}}function R(e,a){return{kind:"validation",type:"min_value",reference:R,async:!1,expects:`>=${e instanceof Date?e.toJSON():G(e)}`,requirement:e,message:a,"~run"(t,u){return t.typed&&!(t.value>=this.requirement)&&L(this,"value",t,u,{received:t.value instanceof Date?t.value.toJSON():G(t.value)}),t}}}function ze(e){return{kind:"validation",type:"non_empty",reference:ze,async:!1,expects:"!0",message:e,"~run"(a,t){return a.typed&&a.value.length===0&&L(this,"length",a,t,{received:"0"}),a}}}function We(e,a){return{kind:"validation",type:"regex",reference:We,async:!1,expects:`${e}`,requirement:e,message:a,"~run"(t,u){return t.typed&&!this.requirement.test(t.value)&&L(this,"format",t,u),t}}}function K(e){return{kind:"validation",type:"safe_integer",reference:K,async:!1,expects:null,requirement:Number.isSafeInteger,message:e,"~run"(a,t){return a.typed&&!this.requirement(a.value)&&L(this,"safe integer",a,t),a}}}function Ne(e){return{kind:"transformation",type:"transform",reference:Ne,async:!1,operation:e,"~run"(a){return a.value=this.operation(a.value),a}}}function Rt(){return{kind:"transformation",type:"trim",reference:Rt,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}var Sa={abortEarly:!0};function va(e,a,t){return typeof e.fallback=="function"?e.fallback(a,t):e.fallback}function oe(e,a,t){return typeof e.default=="function"?e.default(a,t):e.default}function le(e,a){return!e["~run"]({value:a},Sa).issues}function q(e,a){return{kind:"schema",type:"array",reference:q,expects:"Array",async:!1,item:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(let s=0;s<r.length;s++){let o=r[s],f=this.item["~run"]({value:o},u);if(f.issues){let l={type:"array",origin:"value",input:r,key:s,value:o};for(let n of f.issues)n.path?n.path.unshift(l):n.path=[l],t.issues?.push(n);if(t.issues||(t.issues=f.issues),u.abortEarly){t.typed=!1;break}}f.typed||(t.typed=!1),t.value.push(f.value)}}else L(this,"type",t,u);return t}}}function S(e){return{kind:"schema",type:"boolean",reference:S,expects:"boolean",async:!1,message:e,get"~standard"(){return P(this)},"~run"(a,t){return typeof a.value=="boolean"?a.typed=!0:L(this,"type",a,t),a}}}function fe(e,a){return{kind:"schema",type:"custom",reference:fe,expects:"unknown",async:!1,check:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){return this.check(t.value)?t.typed=!0:L(this,"type",t,u),t}}}function ne(e){return{kind:"schema",type:"function",reference:ne,expects:"Function",async:!1,message:e,get"~standard"(){return P(this)},"~run"(a,t){return typeof a.value=="function"?a.typed=!0:L(this,"type",a,t),a}}}function Z(e,a){return{kind:"schema",type:"literal",reference:Z,expects:G(e),async:!1,literal:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){return t.value===this.literal?t.typed=!0:L(this,"type",t,u),t}}}function J(e,a){return{kind:"schema",type:"loose_object",reference:J,expects:"Object",async:!1,entries:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r=t.value;if(r&&typeof r=="object"){t.typed=!0,t.value={};for(let s in this.entries){let o=this.entries[s];if(s in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let f=s in r?r[s]:oe(o),l=o["~run"]({value:f},u);if(l.issues){let n={type:"object",origin:"value",input:r,key:s,value:f};for(let d of l.issues)d.path?d.path.unshift(n):d.path=[n],t.issues?.push(d);if(t.issues||(t.issues=l.issues),u.abortEarly){t.typed=!1;break}}l.typed||(t.typed=!1),t.value[s]=l.value}else if(o.fallback!==void 0)t.value[s]=va(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(L(this,"key",t,u,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:r,key:s,value:r[s]}]}),u.abortEarly))break}if(!t.issues||!u.abortEarly)for(let s in r)Mt(r,s)&&!(s in this.entries)&&(t.value[s]=r[s])}else L(this,"type",t,u);return t}}}function h(e,a){return{kind:"schema",type:"nullable",reference:h,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:a,get"~standard"(){return P(this)},"~run"(t,u){return t.value===null&&(this.default!==void 0&&(t.value=oe(this,t,u)),t.value===null)?(t.typed=!0,t):this.wrapped["~run"](t,u)}}}function Q(e){return{kind:"schema",type:"number",reference:Q,expects:"number",async:!1,message:e,get"~standard"(){return P(this)},"~run"(a,t){return typeof a.value=="number"&&!isNaN(a.value)?a.typed=!0:L(this,"type",a,t),a}}}function g(e,a){return{kind:"schema",type:"object",reference:g,expects:"Object",async:!1,entries:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r=t.value;if(r&&typeof r=="object"){t.typed=!0,t.value={};for(let s in this.entries){let o=this.entries[s];if(s in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let f=s in r?r[s]:oe(o),l=o["~run"]({value:f},u);if(l.issues){let n={type:"object",origin:"value",input:r,key:s,value:f};for(let d of l.issues)d.path?d.path.unshift(n):d.path=[n],t.issues?.push(d);if(t.issues||(t.issues=l.issues),u.abortEarly){t.typed=!1;break}}l.typed||(t.typed=!1),t.value[s]=l.value}else if(o.fallback!==void 0)t.value[s]=va(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(L(this,"key",t,u,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:r,key:s,value:r[s]}]}),u.abortEarly))break}}else L(this,"type",t,u);return t}}}function c(e,a){return{kind:"schema",type:"optional",reference:c,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:a,get"~standard"(){return P(this)},"~run"(t,u){return t.value===void 0&&(this.default!==void 0&&(t.value=oe(this,t,u)),t.value===void 0)?(t.typed=!0,t):this.wrapped["~run"](t,u)}}}function D(e,a){return{kind:"schema",type:"picklist",reference:D,expects:Ue(e.map(G),"|"),async:!1,options:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){return this.options.includes(t.value)?t.typed=!0:L(this,"type",t,u),t}}}function Xe(e,a){return{kind:"schema",type:"strict_tuple",reference:Xe,expects:"Array",async:!1,items:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(let s=0;s<this.items.length;s++){let o=r[s],f=this.items[s]["~run"]({value:o},u);if(f.issues){let l={type:"array",origin:"value",input:r,key:s,value:o};for(let n of f.issues)n.path?n.path.unshift(l):n.path=[l],t.issues?.push(n);if(t.issues||(t.issues=f.issues),u.abortEarly){t.typed=!1;break}}f.typed||(t.typed=!1),t.value.push(f.value)}!(t.issues&&u.abortEarly)&&this.items.length<r.length&&L(this,"type",t,u,{input:r[this.items.length],expected:"never",path:[{type:"array",origin:"value",input:r,key:this.items.length,value:r[this.items.length]}]})}else L(this,"type",t,u);return t}}}function I(e){return{kind:"schema",type:"string",reference:I,expects:"string",async:!1,message:e,get"~standard"(){return P(this)},"~run"(a,t){return typeof a.value=="string"?a.typed=!0:L(this,"type",a,t),a}}}function Ca(e){let a;if(e)for(let t of e)if(a)for(let u of t.issues)a.push(u);else a=t.issues;return a}function je(e,a){return{kind:"schema",type:"union",reference:je,expects:Ue(e.map(t=>t.expects),"|"),async:!1,options:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r,s,o;for(let f of this.options){let l=f["~run"]({value:t.value},u);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{r=l;break}else o?o.push(l):o=[l]}if(r)return r;if(s){if(s.length===1)return s[0];L(this,"type",t,u,{issues:Ca(s)}),t.typed=!0}else{if(o?.length===1)return o[0];L(this,"type",t,u,{issues:Ca(o)})}return t}}}function $e(){return{kind:"schema",type:"unknown",reference:$e,expects:"unknown",async:!1,get"~standard"(){return P(this)},"~run"(e){return e.typed=!0,e}}}function Ke(e,a,t){return{kind:"schema",type:"variant",reference:Ke,expects:"Object",async:!1,key:e,options:a,message:t,get"~standard"(){return P(this)},"~run"(u,r){let s=u.value;if(s&&typeof s=="object"){let o,f=0,l=this.key,n=[],d=(C,M)=>{for(let B of C.options){if(B.type==="variant")d(B,new Set(M).add(B.key));else{let F=!0,T=0;for(let A of M){let k=B.entries[A];if(A in s?k["~run"]({typed:!1,value:s[A]},Sa).issues:k.type!=="exact_optional"&&k.type!=="optional"&&k.type!=="nullish"){F=!1,l!==A&&(f<T||f===T&&A in s&&!(l in s))&&(f=T,l=A,n=[]),l===A&&n.push(B.entries[A].expects);break}T++}if(F){let A=B["~run"]({value:s},r);(!o||!o.typed&&A.typed)&&(o=A)}}if(o&&!o.issues)break}};if(d(this,new Set([this.key])),o)return o;L(this,"type",u,r,{input:s[l],expected:Ue(n,"|"),path:[{type:"object",origin:"value",input:s,key:l,value:s[l]}]})}else L(this,"type",u,r);return u}}}function w(e,a,t){let u=e["~run"]({value:a},Oe(t));if(u.issues)throw new _e(u.issues);return u.value}function y(...e){return{...e[0],pipe:e,get"~standard"(){return P(this)},"~run"(a,t){for(let u of e)if(u.kind!=="metadata"){if(a.issues&&(u.kind==="schema"||u.kind==="transformation")){a.typed=!1;break}(!a.issues||!t.abortEarly&&!t.abortPipeEarly)&&(a=u["~run"](a,t))}return a}}}function Ir(e,a,t){let u=e["~run"]({value:a},Oe(t));return{typed:u.typed,success:!u.issues,output:u.value,issues:u.issues}}var V=y(I(),ze(),b(e=>e.trim().length>0)),Cr=c(h(I()),null);function wa(e){return y(Q(),K(),R(e))}var Aa=y(q($e()),Ne(e=>e.filter(a=>{let{archivedAt:t}=w(J({archivedAt:c(h(V))}),a);return!t}))),Tt=g({id:V,label:V}),ka=y(Aa,q(Tt),$(2),b(e=>new Set(e.map(({id:a})=>a)).size===e.length,"Expected unique custom field option IDs.")),ie={id:V,label:V,paymentOptionIds:c(q(V)),required:S()},qt=Ke("type",[g({...ie,type:D(["text","textarea"])}),g({...ie,type:D(["checkbox"])}),g({...ie,options:ka,type:D(["radio","select"])}),g({...ie,options:ka,type:D(["checkboxes","multi_select"])})]),Sr=y(c(Aa,[]),q(qt),b(e=>new Set(e.map(({id:a})=>a)).size===e.length,"Expected unique custom field IDs.")),vr=g({fieldId:V,value:je([S(),I(),q(I())])});function de(e){let a=new Object(e);if(a!==e||Object.isFrozen(a))return e;for(let t of Object.values(a))de(t);return Object.freeze(e)}var Pa=/\/+$/,Et=new Set(["localhost","127.0.0.1","[::1]"]),Ot={development:{sentryDsn:"https://1977371f7bc44480935a7bc9726ca296@o1338376.ingest.sentry.io/6631829"},production:{sentryDsn:"https://43d2d853c129415cf77531c914511174@o1338376.ingest.us.sentry.io/4511911476133888"}};function Ze(e,a,t="apiBaseUrl"){if(!le(I(),e))throw TypeError(`${t} must be a valid HTTP or HTTPS URL.`);let u;try{u=new URL(e)}catch{throw TypeError(`${t} must be a valid HTTP or HTTPS URL.`)}if(u.protocol!=="http:"&&u.protocol!=="https:")throw TypeError(`${t} must be a valid HTTP or HTTPS URL.`);if(u.username||u.password)throw TypeError(`${t} must not include credentials.`);if(u.search||u.hash)throw TypeError(`${t} must not include a query or fragment.`);if(u.protocol!=="https:"&&!(a==="development"&&(Et.has(u.hostname)||u.hostname.endsWith(".localhost"))))throw TypeError(`${t} must use HTTPS except for development loopback endpoints.`);return u.pathname=u.pathname.replace(Pa,""),u.toString().replace(Pa,"")}function Ut(e,a){let t="requestTimeoutMs must be a positive integer no greater than 2147483647.",u=r=>y(I(`${r} must be a non-empty string.`),b(s=>s.trim().length>0,`${r} must be a non-empty string.`));try{let r=w(J({apiBaseUrl:c(I("apiBaseUrl must be a valid HTTP or HTTPS URL.")),communitySlug:u("communitySlug"),environment:c(D(["development","production"],"environment must be either development or production.")),fetch:c(fe(s=>le(ne(),s),"fetch must be a function when provided.")),onError:c(fe(s=>le(ne(),s),"onError must be a function when provided.")),requestTimeoutMs:c(y(Q(t),K(t),R(1,t),Ve(2147483647,t))),sentryDsn:c(h(I("sentryDsn must be a string or null when provided.")))},"Expected an object."),e);return{apiBaseUrl:r.apiBaseUrl,communitySlug:r.communitySlug,environment:r.environment,fetch:r.fetch,onError:r.onError,requestTimeoutMs:r.requestTimeoutMs,resourceSlugValue:w(u(a),r[a]),sentryDsn:r.sentryDsn}}catch(r){let s=r instanceof _e?r.issues[0]?.message??"Invalid SDK options.":"Invalid SDK options.";throw TypeError(s)}}function ba(e,a){let t=Ut(e,a),u=t.environment;if(t.apiBaseUrl!==void 0&&u===void 0)throw TypeError("environment is required when apiBaseUrl is provided.");if(t.apiBaseUrl===void 0&&u==="development")throw TypeError("apiBaseUrl is required when environment is development.");let r=u===void 0?"production":u,{communitySlug:s,resourceSlugValue:o}=t,f=t.fetch??globalThis.fetch,l=t.apiBaseUrl===void 0?"https://portal.lockerverse.com/api":Ze(t.apiBaseUrl,r),n=Ot[r],d=t.sentryDsn,C=d===null?null:d??n.sentryDsn;return{apiBaseUrl:l,communitySlug:encodeURIComponent(s),communitySlugValue:s,environment:r,fetchImplementation:f,onError:t.onError,requestTimeoutMs:t.requestTimeoutMs??2e4,resourceSlug:encodeURIComponent(o),resourceSlugValue:o,sentryDsn:C}}function _t(){return globalThis.window}function Da({communitySlug:e,environment:a,getContext:t,onError:u,resourceContextName:r,sentryDsn:s}){let o=null;return function(f){try{Promise.resolve(u?.(f)).catch(()=>{})}catch{}let l=_t();if(f.reportable&&s&&l!==void 0){let n=o??import("./telemetry-6KTBIZ2M.js");o=n;let d={communitySlug:e,...t()},C=f.status===void 0?d:{...d,status:f.status};n.then(({captureSdkError:M})=>M({context:C,contextName:r,dsn:s,environment:a,error:f})).catch(()=>{o===n&&(o=null)})}return f}}function Ma(e,a,t){function u(s,o){let f=new _({code:s.code,failureKind:o,message:s.message,operation:s.operation,reportable:!0});return s.report===!1?f:a(f)}async function r(s,o,f,l,n,d){let C=new AbortController,M=o?.signal??void 0,B=()=>C.abort(M?.reason);M?.aborted?B():M?.addEventListener("abort",B,{once:!0});let F,T=new Promise((E,H)=>{F=()=>H(C.signal.reason??new DOMException("The request was aborted.","AbortError")),C.signal.aborted?F():C.signal.addEventListener("abort",F,{once:!0})}),A=!1;function k(E,H){return M?.aborted?"aborted":A?"timeout":C.signal.aborted||H instanceof Error&&H.name==="AbortError"?"aborted":E}let z=setTimeout(()=>{A=!0,C.abort(new DOMException("The request timed out.","TimeoutError"))},t);try{let E;try{E=await Promise.race([e(s,{...o,signal:C.signal}),T])}catch(Y){throw u(l,k("network",Y))}if(!E.ok)try{return{errorValue:d?await Promise.race([d(E),T]):void 0,ok:!1,response:E}}catch{throw u(l,"invalid_response")}let H;try{H=await Promise.race([E.json(),T])}catch(Y){throw u(n,k(Y instanceof TypeError?"network":"invalid_response",Y))}try{return{ok:!0,response:E,value:f(H)}}catch{throw u(n,"invalid_response")}}finally{clearTimeout(z),M?.removeEventListener("abort",B),F&&C.signal.removeEventListener("abort",F)}}return{requestJson:r}}function Ba(e,a){if(a===void 0)return e;e.mediaBaseUrl=a;let t=u=>u?.startsWith("https://media.lockerverse.com/")?`${a}/${u.slice(30)}`:u;e.configuration.image=t(e.configuration.image),e.community&&(e.community.banner=t(e.community.banner),e.community.thumbnail=t(e.community.thumbnail));for(let u of e.items)u.image=t(u.image),u.images=u.images.map(t);return e}var v=y(I(),$(1)),p=wa(0),O=y(I(),Ge()),Fa=D(["draft","active","finished"]),Ra=g({additionalUnitAmountCents:p,category:D(["shipping","handling","other"]),firstUnitAmountCents:p,name:v}),Ht=g({additionalCharge:c(h(Ra)),auctionId:v,availableQuantity:h(p),bidCount:p,bidIncrementAmount:h(p),buyNowPriceAmount:h(p),collectShippingAddress:S(),communityId:v,createdAt:O,description:h(I()),endAt:c(h(O)),finalizedBidCount:p,finishedAt:c(h(O)),id:v,image:h(I()),images:q(I()),inventoryQuantity:h(p),isSoldOut:S(),maxBidAmount:h(p),maxQuantityPerOrder:c(h(y(p,R(1)))),minBidAmount:h(p),name:I(),paidQuantity:p,path:v,position:p,reservedQuantity:p,saleMode:D(["auction","buy_now","hybrid"]),slug:v,startAt:c(h(O)),status:Fa,supportsMaximumBids:c(S()),updatedAt:O}),Ta=g({collectShippingAddress:S(),community:c(g({banner:c(h(I())),color:c(h(I())),name:c(I()),thumbnail:c(h(I()))})),communityId:v,configuration:g({collectShippingAddress:S(),endTimeEnabled:c(h(S())),image:h(I()),serviceFeeDefaultChecked:S(),serviceFeeEnabled:S(),startTimeEnabled:c(h(S()))}),createdAt:O,description:h(I()),endAt:O,id:v,items:q(Ht),name:I(),path:v,payment:c(g({connectedAccountId:h(v),currency:Z("usd"),publishableKey:v})),position:p,pricingPolicy:g({currency:Z("usd"),serviceFeeRateBasisPoints:p}),serviceFeeDefaultChecked:S(),serviceFeeEnabled:S(),slug:v,startAt:O,status:Fa,updatedAt:O}),Je={additionalCharge:c(h(Ra)),additionalChargeCents:c(p,0),serviceFeeCents:p,serviceFeeRateBasisPoints:p,subtotalCents:p,totalCents:p},ce=e=>e.totalCents===e.subtotalCents+e.serviceFeeCents+(e.additionalChargeCents??0),qa={...Je,clientSecret:h(v),requiresAction:S()},Gt=y(g(qa),b(e=>ce(e)),b(e=>!e.requiresAction||e.clientSecret!==null)),Ea=y(g({...qa,id:v,purchaseId:v,quantity:y(p,R(1)),status:D(["pending_payment","paid","payment_failed","expired","canceled","refunded"]),totalAmount:p}),b(e=>ce(e)),b(e=>e.id===e.purchaseId&&(!e.requiresAction||e.clientSecret!==null))),Vt=y(g({...Je,quantity:y(p,R(1)),totalAmount:p,unitAmount:p}),b(e=>ce(e))),Oa={confirmationToken:v,email:y(I(),He()),expectedAdditionalChargeCents:c(p),expectedServiceFeeCents:c(p),expectedSubtotalCents:c(p),expectedTotalCents:c(p),includeServiceFee:c(S()),phone:y(I(),We(/^\+[1-9]\d{1,14}$/))},zt=g({...Oa,amount:y(p,R(100)),bidType:c(D(["fixed","maximum"]))}),Wt=g({...Oa,clientRequestId:v,paymentMethodTypes:c(Xe([Z("card")])),quantity:y(p,R(1))}),Nt=e=>w(Ta,e),Xt=e=>w(q(Ta),e),jt=e=>w(Gt,e),$t=e=>w(Ea,e),Kt=e=>w(Vt,e),Zt=e=>w(zt,e),Jt=e=>w(Wt,e),Qt=e=>w(h(Ea),e),Yt=e=>w(y(g(Je),b(a=>ce(a))),e),eu=e=>w(g({includeServiceFee:c(S()),quantity:y(p,R(1))}),e);function au(e,a,t){let u=e+a.map(r=>`/${encodeURIComponent(w(v,r))}`).join("");return t===void 0?u:`${u}?${new URLSearchParams({previewItem:w(v,t)})}`}function Fr(e){let a=ba(e,"communitySlug"),t=e.mediaBaseUrl===void 0?void 0:Ze(e.mediaBaseUrl,a.environment,"mediaBaseUrl"),u=l=>Ba(Nt(l),t),r=Da({communitySlug:a.communitySlugValue,environment:a.environment,getContext:()=>({}),onError:a.onError,resourceContextName:"lockerverse_auction",sentryDsn:a.sentryDsn}),{requestJson:s}=Ma(a.fetchImplementation,r,a.requestTimeoutMs),o=`${a.apiBaseUrl}/auctions/communities/slug/${a.communitySlug}`;async function f(l,n,d,C,M,B=!1){let F=!!C&&!B,T,A;try{T=au(o,n,M),C&&(A={body:JSON.stringify(C.parse(C.value)),headers:{"content-type":"application/json"},method:"POST"})}catch{throw r(new _({...l,message:"Lockerverse auction input is invalid.",reportable:!1}))}try{let k=await s(T,A,d,{...l,report:!1},{...l,report:!1});if(!k.ok){let{status:z}=k.response;throw new _({...l,recoveryRecommended:F&&(z>=500||z===408),reportable:z>=500,status:z})}return de(k.value)}catch(k){throw k instanceof _?r(new _({...l,recoveryRecommended:k.recoveryRecommended||F&&k.status===void 0,reportable:k.reportable,...k.status===void 0?void 0:{status:k.status}})):r(new _({...l,recoveryRecommended:F,reportable:!0}))}}return{createBid:(l,n,d)=>f({code:"auction_bid_failed",message:"Unable to submit Lockerverse auction bid.",operation:"create_auction_bid"},["path",l,"items",n,"bids"],jt,{parse:Zt,value:d}),createPurchase:(l,n,d)=>f({code:"auction_purchase_failed",message:"Unable to submit Lockerverse auction purchase.",operation:"create_auction_purchase"},["path",l,"items",n,"purchases"],$t,{parse:Jt,value:d}),getPurchaseQuote:(l,n,d)=>f({code:"auction_load_failed",message:"Unable to load Lockerverse auction purchase quote.",operation:"load_auction"},["path",l,"items",n,"purchase-quote"],Yt,{parse:eu,value:d},void 0,!0),getPurchaseReceipt:(l,n,d)=>f({code:"auction_receipt_failed",message:"Unable to load Lockerverse auction purchase receipt.",operation:"get_auction_purchase_receipt"},["path",l,"items",n,"purchases",d],Kt),getPurchaseStatus:(l,n,d)=>f({code:"auction_purchase_status_failed",message:"Unable to load Lockerverse auction purchase status.",operation:"get_auction_purchase_status"},["path",l,"items",n,"purchase-status",d],Qt),list:()=>f({code:"auction_load_failed",message:"Unable to load Lockerverse auctions.",operation:"list_auctions"},[],l=>Xt(l).map(n=>Ba(n,t))),load:(l,n)=>f({code:"auction_load_failed",message:"Unable to load Lockerverse auction.",operation:"load_auction"},["path",l],u,void 0,n?.previewItemSlug)}}function U(e){if(!Number.isSafeInteger(e)||e<0)throw TypeError("Auction amounts must be non-negative safe integers.")}function Rr(e,a,t=!1,u=0){if(U(a),U(u),t&&!e.serviceFeeEnabled)throw TypeError("The service fee is not available for this auction.");let r=t?e.pricingPolicy.serviceFeeRateBasisPoints:0;U(r);let s=Math.round(a*r/1e4),o=a+s+u;U(s),U(o);let f={serviceFeeCents:s,serviceFeeRateBasisPoints:r,subtotalCents:a,totalCents:o};return u>0&&(f.additionalChargeCents=u),de(f)}function Tr(e){let a=e.minBidAmount??100,t=e.bidIncrementAmount??100;if(U(a),U(t),e.maxBidAmount===null)return a;U(e.maxBidAmount);let u=Math.max(a,e.maxBidAmount+t);return U(u),u}export{ge as a,Se as b,X as c,Pe as d,ve as e,be as f,De as g,Me as h,ke as i,Be as j,Fe as k,Re as l,Te as m,we as n,qe as o,Ae as p,Ee as q,yt as r,ya as s,dr as t,cr as u,gt as v,Ct as w,pr as x,b as y,He as z,ze as A,We as B,Ne as C,Rt as D,g as E,I as F,y as G,Ir as H,_ as I,Fr as J,Rr as K,Tr as L};
|
|
2
|
-
/*! For license information please see chunk-
|
|
1
|
+
import{a as ee,c as Qe}from"./chunk-DCANE7XH.js";var na=ee(i=>{"use strict";var he=Symbol.for("react.transitional.element"),Ua=Symbol.for("react.portal"),_a=Symbol.for("react.fragment"),Ha=Symbol.for("react.strict_mode"),Ga=Symbol.for("react.profiler"),Va=Symbol.for("react.consumer"),za=Symbol.for("react.context"),Wa=Symbol.for("react.forward_ref"),Na=Symbol.for("react.suspense"),Xa=Symbol.for("react.memo"),ua=Symbol.for("react.lazy"),ja=Symbol.for("react.activity"),Ye=Symbol.iterator;function $a(e){return e===null||typeof e!="object"?null:(e=Ye&&e[Ye]||e["@@iterator"],typeof e=="function"?e:null)}var ra={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sa=Object.assign,oa={};function N(e,a,t){this.props=e,this.context=a,this.refs=oa,this.updater=t||ra}N.prototype.isReactComponent={};N.prototype.setState=function(e,a){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,a,"setState")};N.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function la(){}la.prototype=N.prototype;function Le(e,a,t){this.props=e,this.context=a,this.refs=oa,this.updater=t||ra}var Ie=Le.prototype=new la;Ie.constructor=Le;sa(Ie,N.prototype);Ie.isPureReactComponent=!0;var ea=Array.isArray;function me(){}var x={H:null,A:null,T:null,S:null},fa=Object.prototype.hasOwnProperty;function xe(e,a,t){var u=t.ref;return{$$typeof:he,type:e,key:a,ref:u!==void 0?u:null,props:t}}function Ka(e,a){return xe(e.type,a,e.props)}function ye(e){return typeof e=="object"&&e!==null&&e.$$typeof===he}function Za(e){var a={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(t){return a[t]})}var aa=/\/+/g;function pe(e,a){return typeof e=="object"&&e!==null&&e.key!=null?Za(""+e.key):a.toString(36)}function Ja(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(me,me):(e.status="pending",e.then(function(a){e.status==="pending"&&(e.status="fulfilled",e.value=a)},function(a){e.status==="pending"&&(e.status="rejected",e.reason=a)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function W(e,a,t,u,r){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case he:case Ua:o=!0;break;case ua:return o=e._init,W(o(e._payload),a,t,u,r)}}if(o)return r=r(e),o=u===""?"."+pe(e,0):u,ea(r)?(t="",o!=null&&(t=o.replace(aa,"$&/")+"/"),W(r,a,t,"",function(n){return n})):r!=null&&(ye(r)&&(r=Ka(r,t+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(aa,"$&/")+"/")+o)),a.push(r)),1;o=0;var f=u===""?".":u+":";if(ea(e))for(var l=0;l<e.length;l++)u=e[l],s=f+pe(u,l),o+=W(u,a,t,s,r);else if(l=$a(e),typeof l=="function")for(e=l.call(e),l=0;!(u=e.next()).done;)u=u.value,s=f+pe(u,l++),o+=W(u,a,t,s,r);else if(s==="object"){if(typeof e.then=="function")return W(Ja(e),a,t,u,r);throw a=String(e),Error("Objects are not valid as a React child (found: "+(a==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.")}return o}function ae(e,a,t){if(e==null)return e;var u=[],r=0;return W(e,u,"","",function(s){return a.call(t,s,r++)}),u}function Qa(e){if(e._status===-1){var a=e._result;a=a(),a.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=a)}if(e._status===1)return e._result.default;throw e._result}var ta=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ya={map:ae,forEach:function(e,a,t){ae(e,function(){a.apply(this,arguments)},t)},count:function(e){var a=0;return ae(e,function(){a++}),a},toArray:function(e){return ae(e,function(a){return a})||[]},only:function(e){if(!ye(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};i.Activity=ja;i.Children=Ya;i.Component=N;i.Fragment=_a;i.Profiler=Ga;i.PureComponent=Le;i.StrictMode=Ha;i.Suspense=Na;i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x;i.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}};i.cache=function(e){return function(){return e.apply(null,arguments)}};i.cacheSignal=function(){return null};i.cloneElement=function(e,a,t){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var u=sa({},e.props),r=e.key;if(a!=null)for(s in a.key!==void 0&&(r=""+a.key),a)!fa.call(a,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&a.ref===void 0||(u[s]=a[s]);var s=arguments.length-2;if(s===1)u.children=t;else if(1<s){for(var o=Array(s),f=0;f<s;f++)o[f]=arguments[f+2];u.children=o}return xe(e.type,r,u)};i.createContext=function(e){return e={$$typeof:za,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Va,_context:e},e};i.createElement=function(e,a,t){var u,r={},s=null;if(a!=null)for(u in a.key!==void 0&&(s=""+a.key),a)fa.call(a,u)&&u!=="key"&&u!=="__self"&&u!=="__source"&&(r[u]=a[u]);var o=arguments.length-2;if(o===1)r.children=t;else if(1<o){for(var f=Array(o),l=0;l<o;l++)f[l]=arguments[l+2];r.children=f}if(e&&e.defaultProps)for(u in o=e.defaultProps,o)r[u]===void 0&&(r[u]=o[u]);return xe(e,s,r)};i.createRef=function(){return{current:null}};i.forwardRef=function(e){return{$$typeof:Wa,render:e}};i.isValidElement=ye;i.lazy=function(e){return{$$typeof:ua,_payload:{_status:-1,_result:e},_init:Qa}};i.memo=function(e,a){return{$$typeof:Xa,type:e,compare:a===void 0?null:a}};i.startTransition=function(e){var a=x.T,t={};x.T=t;try{var u=e(),r=x.S;r!==null&&r(t,u),typeof u=="object"&&u!==null&&typeof u.then=="function"&&u.then(me,ta)}catch(s){ta(s)}finally{a!==null&&t.types!==null&&(a.types=t.types),x.T=a}};i.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()};i.use=function(e){return x.H.use(e)};i.useActionState=function(e,a,t){return x.H.useActionState(e,a,t)};i.useCallback=function(e,a){return x.H.useCallback(e,a)};i.useContext=function(e){return x.H.useContext(e)};i.useDebugValue=function(){};i.useDeferredValue=function(e,a){return x.H.useDeferredValue(e,a)};i.useEffect=function(e,a){return x.H.useEffect(e,a)};i.useEffectEvent=function(e){return x.H.useEffectEvent(e)};i.useId=function(){return x.H.useId()};i.useImperativeHandle=function(e,a,t){return x.H.useImperativeHandle(e,a,t)};i.useInsertionEffect=function(e,a){return x.H.useInsertionEffect(e,a)};i.useLayoutEffect=function(e,a){return x.H.useLayoutEffect(e,a)};i.useMemo=function(e,a){return x.H.useMemo(e,a)};i.useOptimistic=function(e,a){return x.H.useOptimistic(e,a)};i.useReducer=function(e,a,t){return x.H.useReducer(e,a,t)};i.useRef=function(e){return x.H.useRef(e)};i.useState=function(e){return x.H.useState(e)};i.useSyncExternalStore=function(e,a,t){return x.H.useSyncExternalStore(e,a,t)};i.useTransition=function(){return x.H.useTransition()};i.version="19.2.8"});var ge=ee((uu,ia)=>{"use strict";ia.exports=na()});var La=ee(re=>{"use strict";var It=Symbol.for("react.transitional.element"),xt=Symbol.for("react.fragment");function ha(e,a,t){var u=null;if(t!==void 0&&(u=""+t),a.key!==void 0&&(u=""+a.key),"key"in a){t={};for(var r in a)r!=="key"&&(t[r]=a[r])}else t=a;return a=t.ref,{$$typeof:It,type:e,key:u,ref:a!==void 0?a:null,props:t}}re.Fragment=xt;re.jsx=ha;re.jsxs=ha});var yt=ee((fr,Ia)=>{"use strict";Ia.exports=La()});var ue=Qe(ge());var da=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),et=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,t,u)=>u?u.toUpperCase():t.toLowerCase()),Ce=e=>{let a=et(e);return a.charAt(0).toUpperCase()+a.slice(1)},te=(...e)=>e.filter((a,t,u)=>!!a&&a.trim()!==""&&u.indexOf(a)===t).join(" ").trim(),ca=e=>{for(let a in e)if(a.startsWith("aria-")||a==="role"||a==="title")return!0};var j=Qe(ge());var pa={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var ma=(0,j.forwardRef)(({color:e="currentColor",size:a=24,strokeWidth:t=2,absoluteStrokeWidth:u,className:r="",children:s,iconNode:o,...f},l)=>(0,j.createElement)("svg",{ref:l,...pa,width:a,height:a,stroke:e,strokeWidth:u?Number(t)*24/Number(a):t,className:te("lucide",r),...!s&&!ca(f)&&{"aria-hidden":"true"},...f},[...o.map(([n,d])=>(0,j.createElement)(n,d)),...Array.isArray(s)?s:[s]]));var m=(e,a)=>{let t=(0,ue.forwardRef)(({className:u,...r},s)=>(0,ue.createElement)(ma,{ref:s,iconNode:a,className:te(`lucide-${da(Ce(e))}`,`lucide-${e}`,u),...r}));return t.displayName=Ce(e),t};var at=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Se=m("arrow-right",at);var tt=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ve=m("chevron-left",tt);var ut=[["path",{d:"m14 13-8.381 8.38a1 1 0 0 1-3.001-3l8.384-8.381",key:"pgg06f"}],["path",{d:"m16 16 6-6",key:"vzrcl6"}],["path",{d:"m21.5 10.5-8-8",key:"a17d9x"}],["path",{d:"m8 8 6-6",key:"18bi4p"}],["path",{d:"m8.5 7.5 8 8",key:"1oyaui"}]],ke=m("gavel",ut);var rt=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],we=m("shield-check",rt);var st=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],Ae=m("timer-reset",st);var ot=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],X=m("badge-check",ot);var lt=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pe=m("chevron-down",lt);var ft=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],be=m("chevron-right",ft);var nt=[["path",{d:"M12 6v6h4",key:"135r8i"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],De=m("clock-3",nt);var it=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Me=m("file-text",it);var dt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Be=m("info",dt);var ct=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],Fe=m("list-checks",ct);var pt=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Re=m("pause",pt);var mt=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Te=m("play",mt);var ht=[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]],qe=m("shopping-bag",ht);var Lt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ee=m("x",Lt);var xa=new Map;function ya(e,a=2){let t=xa.get(a);return t||(t=new Intl.NumberFormat("en-US",{currency:"USD",maximumFractionDigits:2,minimumFractionDigits:a,style:"currency"}),xa.set(a,t)),t.format(e/100)}function dr(e,a=e.status,t){let u=a==="draft",r=t??Ct(e),s=u?r?.startAt??e.startAt:(a==="finished"?t?.finishedAt:void 0)??t?.endAt??e.endAt,o=new Date(s);if(!Number.isFinite(o.getTime()))return"";let l=(u?r?.startAt:t?.endAt)?!0:(u?e.configuration.startTimeEnabled:e.configuration.endTimeEnabled)??!0,n=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"short",timeZone:"America/New_York",year:"numeric"}).format(o);if(!l)return n;let d=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",timeZone:"America/New_York",timeZoneName:"short"}).format(o);return`${n} at ${d}`}function cr(e){return ya(e,0)}function gt(e,a){if(e.status==="finished"||a?.status==="finished")return"finished";if(a&&!(a.startAt&&a.endAt)&&(a.status==="draft"||e.status==="draft"))return"draft";let t=Date.now();if(Date.parse(a?.endAt??e.endAt)<=t)return"finished";if(Date.parse(a?.startAt??e.startAt)>t)return"draft";if(a)return"active";if(e.items.length){let u=e.items.map(r=>gt(e,r));return u.includes("active")?"active":u.includes("draft")?"draft":"finished"}return e.status}function Ct(e){let a=Date.now();return e.items.filter(t=>t.status!=="finished"&&Date.parse(t.startAt??e.startAt)>a).sort((t,u)=>Date.parse(t.startAt??e.startAt)-Date.parse(u.startAt??e.startAt))[0]}function pr(e){return e.isSoldOut||e.saleMode==="buy_now"&&e.availableQuantity===0}var St="0.2.234",_=class extends Error{failureKind;code;operation;reportable;recoveryRecommended;sdkVersion;serverCode;status;constructor({failureKind:e,code:a,message:t,operation:u,reportable:r,recoveryRecommended:s=!1,serverCode:o,status:f}){super(t),this.name="LockerverseSdkError",this.failureKind=e,this.code=a,this.operation=u,this.reportable=r,this.recoveryRecommended=s,this.sdkVersion=St,this.serverCode=o,this.status=f}};var se,vt={lang:void 0,message:void 0,abortEarly:void 0,abortPipeEarly:void 0};function Oe(e){return!e&&!se?vt:{lang:e?.lang??se?.lang,message:e?.message,abortEarly:e?.abortEarly??se?.abortEarly,abortPipeEarly:e?.abortPipeEarly??se?.abortPipeEarly}}var kt;function wt(e){return kt?.get(e)}var At;function Pt(e){return At?.get(e)}var bt;function Dt(e,a){return bt?.get(e)?.get(a)}function G(e){let a=typeof e;return a==="string"?`"${e}"`:a==="number"||a==="bigint"||a==="boolean"?`${e}`:a==="object"||a==="function"?(e&&Object.getPrototypeOf(e)?.constructor?.name)??"null":a}function L(e,a,t,u,r){let s=r&&"input"in r?r.input:t.value,o=r?.expected??e.expects??null,f=r?.received??G(s),l={kind:e.kind,type:e.type,input:s,expected:o,received:f,message:`Invalid ${a}: ${o?`Expected ${o} but r`:"R"}eceived ${f}`,requirement:e.requirement,path:r?.path,issues:r?.issues,lang:u.lang,abortEarly:u.abortEarly,abortPipeEarly:u.abortPipeEarly},n=e.kind==="schema",d=r?.message??e.message??Dt(e.reference,l.lang)??(n?Pt(l.lang):null)??u.message??wt(l.lang);d!==void 0&&(l.message=typeof d=="function"?d(l):d),n&&(t.typed=!1),t.issues?t.issues.push(l):t.issues=[l]}var ga=new WeakMap;function P(e){let a=ga.get(e);return a||(a={version:1,vendor:"valibot",validate(t){return e["~run"]({value:t},Oe())}},ga.set(e,a)),a}function Mt(e,a){return Object.prototype.hasOwnProperty.call(e,a)&&a!=="__proto__"&&a!=="prototype"&&a!=="constructor"}function Ue(e,a){let t=[...new Set(e)];return t.length>1?`(${t.join(` ${a} `)})`:t[0]??"never"}var _e=class extends Error{constructor(e){super(e[0].message),this.name="ValiError",this.issues=e}};var Bt=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;var Ft=/^\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\d|0[1-9]|3[01])[T ](?:0\d|1\d|2[0-3])(?::[0-5]\d){2}(?:\.\d{1,9})?(?:Z| ?[+-](?:0\d|1\d|2[0-3])(?::?[0-5]\d)?)$/u;function b(e,a){return{kind:"validation",type:"check",reference:b,async:!1,expects:null,requirement:e,message:a,"~run"(t,u){return t.typed&&!this.requirement(t.value)&&L(this,"input",t,u),t}}}function He(e){return{kind:"validation",type:"email",reference:He,expects:null,async:!1,requirement:Bt,message:e,"~run"(a,t){return a.typed&&!this.requirement.test(a.value)&&L(this,"email",a,t),a}}}function Ge(e){return{kind:"validation",type:"iso_timestamp",reference:Ge,async:!1,expects:null,requirement:Ft,message:e,"~run"(a,t){return a.typed&&!this.requirement.test(a.value)&&L(this,"timestamp",a,t),a}}}function Ve(e,a){return{kind:"validation",type:"max_value",reference:Ve,async:!1,expects:`<=${e instanceof Date?e.toJSON():G(e)}`,requirement:e,message:a,"~run"(t,u){return t.typed&&!(t.value<=this.requirement)&&L(this,"value",t,u,{received:t.value instanceof Date?t.value.toJSON():G(t.value)}),t}}}function $(e,a){return{kind:"validation",type:"min_length",reference:$,async:!1,expects:`>=${e}`,requirement:e,message:a,"~run"(t,u){return t.typed&&t.value.length<this.requirement&&L(this,"length",t,u,{received:`${t.value.length}`}),t}}}function R(e,a){return{kind:"validation",type:"min_value",reference:R,async:!1,expects:`>=${e instanceof Date?e.toJSON():G(e)}`,requirement:e,message:a,"~run"(t,u){return t.typed&&!(t.value>=this.requirement)&&L(this,"value",t,u,{received:t.value instanceof Date?t.value.toJSON():G(t.value)}),t}}}function ze(e){return{kind:"validation",type:"non_empty",reference:ze,async:!1,expects:"!0",message:e,"~run"(a,t){return a.typed&&a.value.length===0&&L(this,"length",a,t,{received:"0"}),a}}}function We(e,a){return{kind:"validation",type:"regex",reference:We,async:!1,expects:`${e}`,requirement:e,message:a,"~run"(t,u){return t.typed&&!this.requirement.test(t.value)&&L(this,"format",t,u),t}}}function K(e){return{kind:"validation",type:"safe_integer",reference:K,async:!1,expects:null,requirement:Number.isSafeInteger,message:e,"~run"(a,t){return a.typed&&!this.requirement(a.value)&&L(this,"safe integer",a,t),a}}}function Ne(e){return{kind:"transformation",type:"transform",reference:Ne,async:!1,operation:e,"~run"(a){return a.value=this.operation(a.value),a}}}function Rt(){return{kind:"transformation",type:"trim",reference:Rt,async:!1,"~run"(e){return e.value=e.value.trim(),e}}}var Sa={abortEarly:!0};function va(e,a,t){return typeof e.fallback=="function"?e.fallback(a,t):e.fallback}function oe(e,a,t){return typeof e.default=="function"?e.default(a,t):e.default}function le(e,a){return!e["~run"]({value:a},Sa).issues}function q(e,a){return{kind:"schema",type:"array",reference:q,expects:"Array",async:!1,item:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(let s=0;s<r.length;s++){let o=r[s],f=this.item["~run"]({value:o},u);if(f.issues){let l={type:"array",origin:"value",input:r,key:s,value:o};for(let n of f.issues)n.path?n.path.unshift(l):n.path=[l],t.issues?.push(n);if(t.issues||(t.issues=f.issues),u.abortEarly){t.typed=!1;break}}f.typed||(t.typed=!1),t.value.push(f.value)}}else L(this,"type",t,u);return t}}}function S(e){return{kind:"schema",type:"boolean",reference:S,expects:"boolean",async:!1,message:e,get"~standard"(){return P(this)},"~run"(a,t){return typeof a.value=="boolean"?a.typed=!0:L(this,"type",a,t),a}}}function fe(e,a){return{kind:"schema",type:"custom",reference:fe,expects:"unknown",async:!1,check:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){return this.check(t.value)?t.typed=!0:L(this,"type",t,u),t}}}function ne(e){return{kind:"schema",type:"function",reference:ne,expects:"Function",async:!1,message:e,get"~standard"(){return P(this)},"~run"(a,t){return typeof a.value=="function"?a.typed=!0:L(this,"type",a,t),a}}}function Z(e,a){return{kind:"schema",type:"literal",reference:Z,expects:G(e),async:!1,literal:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){return t.value===this.literal?t.typed=!0:L(this,"type",t,u),t}}}function J(e,a){return{kind:"schema",type:"loose_object",reference:J,expects:"Object",async:!1,entries:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r=t.value;if(r&&typeof r=="object"){t.typed=!0,t.value={};for(let s in this.entries){let o=this.entries[s];if(s in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let f=s in r?r[s]:oe(o),l=o["~run"]({value:f},u);if(l.issues){let n={type:"object",origin:"value",input:r,key:s,value:f};for(let d of l.issues)d.path?d.path.unshift(n):d.path=[n],t.issues?.push(d);if(t.issues||(t.issues=l.issues),u.abortEarly){t.typed=!1;break}}l.typed||(t.typed=!1),t.value[s]=l.value}else if(o.fallback!==void 0)t.value[s]=va(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(L(this,"key",t,u,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:r,key:s,value:r[s]}]}),u.abortEarly))break}if(!t.issues||!u.abortEarly)for(let s in r)Mt(r,s)&&!(s in this.entries)&&(t.value[s]=r[s])}else L(this,"type",t,u);return t}}}function h(e,a){return{kind:"schema",type:"nullable",reference:h,expects:`(${e.expects} | null)`,async:!1,wrapped:e,default:a,get"~standard"(){return P(this)},"~run"(t,u){return t.value===null&&(this.default!==void 0&&(t.value=oe(this,t,u)),t.value===null)?(t.typed=!0,t):this.wrapped["~run"](t,u)}}}function Q(e){return{kind:"schema",type:"number",reference:Q,expects:"number",async:!1,message:e,get"~standard"(){return P(this)},"~run"(a,t){return typeof a.value=="number"&&!isNaN(a.value)?a.typed=!0:L(this,"type",a,t),a}}}function g(e,a){return{kind:"schema",type:"object",reference:g,expects:"Object",async:!1,entries:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r=t.value;if(r&&typeof r=="object"){t.typed=!0,t.value={};for(let s in this.entries){let o=this.entries[s];if(s in r||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){let f=s in r?r[s]:oe(o),l=o["~run"]({value:f},u);if(l.issues){let n={type:"object",origin:"value",input:r,key:s,value:f};for(let d of l.issues)d.path?d.path.unshift(n):d.path=[n],t.issues?.push(d);if(t.issues||(t.issues=l.issues),u.abortEarly){t.typed=!1;break}}l.typed||(t.typed=!1),t.value[s]=l.value}else if(o.fallback!==void 0)t.value[s]=va(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(L(this,"key",t,u,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:r,key:s,value:r[s]}]}),u.abortEarly))break}}else L(this,"type",t,u);return t}}}function c(e,a){return{kind:"schema",type:"optional",reference:c,expects:`(${e.expects} | undefined)`,async:!1,wrapped:e,default:a,get"~standard"(){return P(this)},"~run"(t,u){return t.value===void 0&&(this.default!==void 0&&(t.value=oe(this,t,u)),t.value===void 0)?(t.typed=!0,t):this.wrapped["~run"](t,u)}}}function D(e,a){return{kind:"schema",type:"picklist",reference:D,expects:Ue(e.map(G),"|"),async:!1,options:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){return this.options.includes(t.value)?t.typed=!0:L(this,"type",t,u),t}}}function Xe(e,a){return{kind:"schema",type:"strict_tuple",reference:Xe,expects:"Array",async:!1,items:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r=t.value;if(Array.isArray(r)){t.typed=!0,t.value=[];for(let s=0;s<this.items.length;s++){let o=r[s],f=this.items[s]["~run"]({value:o},u);if(f.issues){let l={type:"array",origin:"value",input:r,key:s,value:o};for(let n of f.issues)n.path?n.path.unshift(l):n.path=[l],t.issues?.push(n);if(t.issues||(t.issues=f.issues),u.abortEarly){t.typed=!1;break}}f.typed||(t.typed=!1),t.value.push(f.value)}!(t.issues&&u.abortEarly)&&this.items.length<r.length&&L(this,"type",t,u,{input:r[this.items.length],expected:"never",path:[{type:"array",origin:"value",input:r,key:this.items.length,value:r[this.items.length]}]})}else L(this,"type",t,u);return t}}}function I(e){return{kind:"schema",type:"string",reference:I,expects:"string",async:!1,message:e,get"~standard"(){return P(this)},"~run"(a,t){return typeof a.value=="string"?a.typed=!0:L(this,"type",a,t),a}}}function Ca(e){let a;if(e)for(let t of e)if(a)for(let u of t.issues)a.push(u);else a=t.issues;return a}function je(e,a){return{kind:"schema",type:"union",reference:je,expects:Ue(e.map(t=>t.expects),"|"),async:!1,options:e,message:a,get"~standard"(){return P(this)},"~run"(t,u){let r,s,o;for(let f of this.options){let l=f["~run"]({value:t.value},u);if(l.typed)if(l.issues)s?s.push(l):s=[l];else{r=l;break}else o?o.push(l):o=[l]}if(r)return r;if(s){if(s.length===1)return s[0];L(this,"type",t,u,{issues:Ca(s)}),t.typed=!0}else{if(o?.length===1)return o[0];L(this,"type",t,u,{issues:Ca(o)})}return t}}}function $e(){return{kind:"schema",type:"unknown",reference:$e,expects:"unknown",async:!1,get"~standard"(){return P(this)},"~run"(e){return e.typed=!0,e}}}function Ke(e,a,t){return{kind:"schema",type:"variant",reference:Ke,expects:"Object",async:!1,key:e,options:a,message:t,get"~standard"(){return P(this)},"~run"(u,r){let s=u.value;if(s&&typeof s=="object"){let o,f=0,l=this.key,n=[],d=(C,M)=>{for(let B of C.options){if(B.type==="variant")d(B,new Set(M).add(B.key));else{let F=!0,T=0;for(let A of M){let k=B.entries[A];if(A in s?k["~run"]({typed:!1,value:s[A]},Sa).issues:k.type!=="exact_optional"&&k.type!=="optional"&&k.type!=="nullish"){F=!1,l!==A&&(f<T||f===T&&A in s&&!(l in s))&&(f=T,l=A,n=[]),l===A&&n.push(B.entries[A].expects);break}T++}if(F){let A=B["~run"]({value:s},r);(!o||!o.typed&&A.typed)&&(o=A)}}if(o&&!o.issues)break}};if(d(this,new Set([this.key])),o)return o;L(this,"type",u,r,{input:s[l],expected:Ue(n,"|"),path:[{type:"object",origin:"value",input:s,key:l,value:s[l]}]})}else L(this,"type",u,r);return u}}}function w(e,a,t){let u=e["~run"]({value:a},Oe(t));if(u.issues)throw new _e(u.issues);return u.value}function y(...e){return{...e[0],pipe:e,get"~standard"(){return P(this)},"~run"(a,t){for(let u of e)if(u.kind!=="metadata"){if(a.issues&&(u.kind==="schema"||u.kind==="transformation")){a.typed=!1;break}(!a.issues||!t.abortEarly&&!t.abortPipeEarly)&&(a=u["~run"](a,t))}return a}}}function Ir(e,a,t){let u=e["~run"]({value:a},Oe(t));return{typed:u.typed,success:!u.issues,output:u.value,issues:u.issues}}var V=y(I(),ze(),b(e=>e.trim().length>0)),Cr=c(h(I()),null);function wa(e){return y(Q(),K(),R(e))}var Aa=y(q($e()),Ne(e=>e.filter(a=>{let{archivedAt:t}=w(J({archivedAt:c(h(V))}),a);return!t}))),Tt=g({id:V,label:V}),ka=y(Aa,q(Tt),$(2),b(e=>new Set(e.map(({id:a})=>a)).size===e.length,"Expected unique custom field option IDs.")),ie={id:V,label:V,paymentOptionIds:c(q(V)),required:S()},qt=Ke("type",[g({...ie,type:D(["text","textarea"])}),g({...ie,type:D(["checkbox"])}),g({...ie,options:ka,type:D(["radio","select"])}),g({...ie,options:ka,type:D(["checkboxes","multi_select"])})]),Sr=y(c(Aa,[]),q(qt),b(e=>new Set(e.map(({id:a})=>a)).size===e.length,"Expected unique custom field IDs.")),vr=g({fieldId:V,value:je([S(),I(),q(I())])});function de(e){let a=new Object(e);if(a!==e||Object.isFrozen(a))return e;for(let t of Object.values(a))de(t);return Object.freeze(e)}var Pa=/\/+$/,Et=new Set(["localhost","127.0.0.1","[::1]"]),Ot={development:{sentryDsn:"https://1977371f7bc44480935a7bc9726ca296@o1338376.ingest.sentry.io/6631829"},production:{sentryDsn:"https://43d2d853c129415cf77531c914511174@o1338376.ingest.us.sentry.io/4511911476133888"}};function Ze(e,a,t="apiBaseUrl"){if(!le(I(),e))throw TypeError(`${t} must be a valid HTTP or HTTPS URL.`);let u;try{u=new URL(e)}catch{throw TypeError(`${t} must be a valid HTTP or HTTPS URL.`)}if(u.protocol!=="http:"&&u.protocol!=="https:")throw TypeError(`${t} must be a valid HTTP or HTTPS URL.`);if(u.username||u.password)throw TypeError(`${t} must not include credentials.`);if(u.search||u.hash)throw TypeError(`${t} must not include a query or fragment.`);if(u.protocol!=="https:"&&!(a==="development"&&(Et.has(u.hostname)||u.hostname.endsWith(".localhost"))))throw TypeError(`${t} must use HTTPS except for development loopback endpoints.`);return u.pathname=u.pathname.replace(Pa,""),u.toString().replace(Pa,"")}function Ut(e,a){let t="requestTimeoutMs must be a positive integer no greater than 2147483647.",u=r=>y(I(`${r} must be a non-empty string.`),b(s=>s.trim().length>0,`${r} must be a non-empty string.`));try{let r=w(J({apiBaseUrl:c(I("apiBaseUrl must be a valid HTTP or HTTPS URL.")),communitySlug:u("communitySlug"),environment:c(D(["development","production"],"environment must be either development or production.")),fetch:c(fe(s=>le(ne(),s),"fetch must be a function when provided.")),onError:c(fe(s=>le(ne(),s),"onError must be a function when provided.")),requestTimeoutMs:c(y(Q(t),K(t),R(1,t),Ve(2147483647,t))),sentryDsn:c(h(I("sentryDsn must be a string or null when provided.")))},"Expected an object."),e);return{apiBaseUrl:r.apiBaseUrl,communitySlug:r.communitySlug,environment:r.environment,fetch:r.fetch,onError:r.onError,requestTimeoutMs:r.requestTimeoutMs,resourceSlugValue:w(u(a),r[a]),sentryDsn:r.sentryDsn}}catch(r){let s=r instanceof _e?r.issues[0]?.message??"Invalid SDK options.":"Invalid SDK options.";throw TypeError(s)}}function ba(e,a){let t=Ut(e,a),u=t.environment;if(t.apiBaseUrl!==void 0&&u===void 0)throw TypeError("environment is required when apiBaseUrl is provided.");if(t.apiBaseUrl===void 0&&u==="development")throw TypeError("apiBaseUrl is required when environment is development.");let r=u===void 0?"production":u,{communitySlug:s,resourceSlugValue:o}=t,f=t.fetch??globalThis.fetch,l=t.apiBaseUrl===void 0?"https://portal.lockerverse.com/api":Ze(t.apiBaseUrl,r),n=Ot[r],d=t.sentryDsn,C=d===null?null:d??n.sentryDsn;return{apiBaseUrl:l,communitySlug:encodeURIComponent(s),communitySlugValue:s,environment:r,fetchImplementation:f,onError:t.onError,requestTimeoutMs:t.requestTimeoutMs??2e4,resourceSlug:encodeURIComponent(o),resourceSlugValue:o,sentryDsn:C}}function _t(){return globalThis.window}function Da({communitySlug:e,environment:a,getContext:t,onError:u,resourceContextName:r,sentryDsn:s}){let o=null;return function(f){try{Promise.resolve(u?.(f)).catch(()=>{})}catch{}let l=_t();if(f.reportable&&s&&l!==void 0){let n=o??import("./telemetry-6KTBIZ2M.js");o=n;let d={communitySlug:e,...t()},C=f.status===void 0?d:{...d,status:f.status};n.then(({captureSdkError:M})=>M({context:C,contextName:r,dsn:s,environment:a,error:f})).catch(()=>{o===n&&(o=null)})}return f}}function Ma(e,a,t){function u(s,o){let f=new _({code:s.code,failureKind:o,message:s.message,operation:s.operation,reportable:!0});return s.report===!1?f:a(f)}async function r(s,o,f,l,n,d){let C=new AbortController,M=o?.signal??void 0,B=()=>C.abort(M?.reason);M?.aborted?B():M?.addEventListener("abort",B,{once:!0});let F,T=new Promise((E,H)=>{F=()=>H(C.signal.reason??new DOMException("The request was aborted.","AbortError")),C.signal.aborted?F():C.signal.addEventListener("abort",F,{once:!0})}),A=!1;function k(E,H){return M?.aborted?"aborted":A?"timeout":C.signal.aborted||H instanceof Error&&H.name==="AbortError"?"aborted":E}let z=setTimeout(()=>{A=!0,C.abort(new DOMException("The request timed out.","TimeoutError"))},t);try{let E;try{E=await Promise.race([e(s,{...o,signal:C.signal}),T])}catch(Y){throw u(l,k("network",Y))}if(!E.ok)try{return{errorValue:d?await Promise.race([d(E),T]):void 0,ok:!1,response:E}}catch{throw u(l,"invalid_response")}let H;try{H=await Promise.race([E.json(),T])}catch(Y){throw u(n,k(Y instanceof TypeError?"network":"invalid_response",Y))}try{return{ok:!0,response:E,value:f(H)}}catch{throw u(n,"invalid_response")}}finally{clearTimeout(z),M?.removeEventListener("abort",B),F&&C.signal.removeEventListener("abort",F)}}return{requestJson:r}}function Ba(e,a){if(a===void 0)return e;e.mediaBaseUrl=a;let t=u=>u?.startsWith("https://media.lockerverse.com/")?`${a}/${u.slice(30)}`:u;e.configuration.image=t(e.configuration.image),e.community&&(e.community.banner=t(e.community.banner),e.community.thumbnail=t(e.community.thumbnail));for(let u of e.items)u.image=t(u.image),u.images=u.images.map(t);return e}var v=y(I(),$(1)),p=wa(0),O=y(I(),Ge()),Fa=D(["draft","active","finished"]),Ra=g({additionalUnitAmountCents:p,category:D(["shipping","handling","other"]),firstUnitAmountCents:p,name:v}),Ht=g({additionalCharge:c(h(Ra)),auctionId:v,availableQuantity:h(p),bidCount:p,bidIncrementAmount:h(p),buyNowPriceAmount:h(p),collectShippingAddress:S(),communityId:v,createdAt:O,description:h(I()),endAt:c(h(O)),finalizedBidCount:p,finishedAt:c(h(O)),id:v,image:h(I()),images:q(I()),inventoryQuantity:h(p),isSoldOut:S(),maxBidAmount:h(p),maxQuantityPerOrder:c(h(y(p,R(1)))),minBidAmount:h(p),name:I(),paidQuantity:p,path:v,position:p,reservedQuantity:p,saleMode:D(["auction","buy_now","hybrid"]),slug:v,startAt:c(h(O)),status:Fa,supportsMaximumBids:c(S()),updatedAt:O}),Ta=g({collectShippingAddress:S(),community:c(g({banner:c(h(I())),color:c(h(I())),name:c(I()),thumbnail:c(h(I()))})),communityId:v,configuration:g({collectShippingAddress:S(),endTimeEnabled:c(h(S())),image:h(I()),serviceFeeDefaultChecked:S(),serviceFeeEnabled:S(),startTimeEnabled:c(h(S()))}),createdAt:O,description:h(I()),endAt:O,id:v,items:q(Ht),name:I(),path:v,payment:c(g({connectedAccountId:h(v),currency:Z("usd"),publishableKey:v})),position:p,pricingPolicy:g({currency:Z("usd"),serviceFeeRateBasisPoints:p}),serviceFeeDefaultChecked:S(),serviceFeeEnabled:S(),slug:v,startAt:O,status:Fa,updatedAt:O}),Je={additionalCharge:c(h(Ra)),additionalChargeCents:c(p,0),serviceFeeCents:p,serviceFeeRateBasisPoints:p,subtotalCents:p,totalCents:p},ce=e=>e.totalCents===e.subtotalCents+e.serviceFeeCents+(e.additionalChargeCents??0),qa={...Je,clientSecret:h(v),requiresAction:S()},Gt=y(g(qa),b(e=>ce(e)),b(e=>!e.requiresAction||e.clientSecret!==null)),Ea=y(g({...qa,id:v,purchaseId:v,quantity:y(p,R(1)),status:D(["pending_payment","paid","payment_failed","expired","canceled","refunded"]),totalAmount:p}),b(e=>ce(e)),b(e=>e.id===e.purchaseId&&(!e.requiresAction||e.clientSecret!==null))),Vt=y(g({...Je,quantity:y(p,R(1)),totalAmount:p,unitAmount:p}),b(e=>ce(e))),Oa={confirmationToken:v,email:y(I(),He()),expectedAdditionalChargeCents:c(p),expectedServiceFeeCents:c(p),expectedSubtotalCents:c(p),expectedTotalCents:c(p),includeServiceFee:c(S()),phone:y(I(),We(/^\+[1-9]\d{1,14}$/))},zt=g({...Oa,amount:y(p,R(100)),bidType:c(D(["fixed","maximum"]))}),Wt=g({...Oa,clientRequestId:v,paymentMethodTypes:c(Xe([Z("card")])),quantity:y(p,R(1))}),Nt=e=>w(Ta,e),Xt=e=>w(q(Ta),e),jt=e=>w(Gt,e),$t=e=>w(Ea,e),Kt=e=>w(Vt,e),Zt=e=>w(zt,e),Jt=e=>w(Wt,e),Qt=e=>w(h(Ea),e),Yt=e=>w(y(g(Je),b(a=>ce(a))),e),eu=e=>w(g({includeServiceFee:c(S()),quantity:y(p,R(1))}),e);function au(e,a,t){let u=e+a.map(r=>`/${encodeURIComponent(w(v,r))}`).join("");return t===void 0?u:`${u}?${new URLSearchParams({previewItem:w(v,t)})}`}function Fr(e){let a=ba(e,"communitySlug"),t=e.mediaBaseUrl===void 0?void 0:Ze(e.mediaBaseUrl,a.environment,"mediaBaseUrl"),u=l=>Ba(Nt(l),t),r=Da({communitySlug:a.communitySlugValue,environment:a.environment,getContext:()=>({}),onError:a.onError,resourceContextName:"lockerverse_auction",sentryDsn:a.sentryDsn}),{requestJson:s}=Ma(a.fetchImplementation,r,a.requestTimeoutMs),o=`${a.apiBaseUrl}/auctions/communities/slug/${a.communitySlug}`;async function f(l,n,d,C,M,B=!1){let F=!!C&&!B,T,A;try{T=au(o,n,M),C&&(A={body:JSON.stringify(C.parse(C.value)),headers:{"content-type":"application/json"},method:"POST"})}catch{throw r(new _({...l,message:"Lockerverse auction input is invalid.",reportable:!1}))}try{let k=await s(T,A,d,{...l,report:!1},{...l,report:!1});if(!k.ok){let{status:z}=k.response;throw new _({...l,recoveryRecommended:F&&(z>=500||z===408),reportable:z>=500,status:z})}return de(k.value)}catch(k){throw k instanceof _?r(new _({...l,recoveryRecommended:k.recoveryRecommended||F&&k.status===void 0,reportable:k.reportable,...k.status===void 0?void 0:{status:k.status}})):r(new _({...l,recoveryRecommended:F,reportable:!0}))}}return{createBid:(l,n,d)=>f({code:"auction_bid_failed",message:"Unable to submit Lockerverse auction bid.",operation:"create_auction_bid"},["path",l,"items",n,"bids"],jt,{parse:Zt,value:d}),createPurchase:(l,n,d)=>f({code:"auction_purchase_failed",message:"Unable to submit Lockerverse auction purchase.",operation:"create_auction_purchase"},["path",l,"items",n,"purchases"],$t,{parse:Jt,value:d}),getPurchaseQuote:(l,n,d)=>f({code:"auction_load_failed",message:"Unable to load Lockerverse auction purchase quote.",operation:"load_auction"},["path",l,"items",n,"purchase-quote"],Yt,{parse:eu,value:d},void 0,!0),getPurchaseReceipt:(l,n,d)=>f({code:"auction_receipt_failed",message:"Unable to load Lockerverse auction purchase receipt.",operation:"get_auction_purchase_receipt"},["path",l,"items",n,"purchases",d],Kt),getPurchaseStatus:(l,n,d)=>f({code:"auction_purchase_status_failed",message:"Unable to load Lockerverse auction purchase status.",operation:"get_auction_purchase_status"},["path",l,"items",n,"purchase-status",d],Qt),list:()=>f({code:"auction_load_failed",message:"Unable to load Lockerverse auctions.",operation:"list_auctions"},[],l=>Xt(l).map(n=>Ba(n,t))),load:(l,n)=>f({code:"auction_load_failed",message:"Unable to load Lockerverse auction.",operation:"load_auction"},["path",l],u,void 0,n?.previewItemSlug)}}function U(e){if(!Number.isSafeInteger(e)||e<0)throw TypeError("Auction amounts must be non-negative safe integers.")}function Rr(e,a,t=!1,u=0){if(U(a),U(u),t&&!e.serviceFeeEnabled)throw TypeError("The service fee is not available for this auction.");let r=t?e.pricingPolicy.serviceFeeRateBasisPoints:0;U(r);let s=Math.round(a*r/1e4),o=a+s+u;U(s),U(o);let f={serviceFeeCents:s,serviceFeeRateBasisPoints:r,subtotalCents:a,totalCents:o};return u>0&&(f.additionalChargeCents=u),de(f)}function Tr(e){let a=e.minBidAmount??100,t=e.bidIncrementAmount??100;if(U(a),U(t),e.maxBidAmount===null)return a;U(e.maxBidAmount);let u=Math.max(a,e.maxBidAmount+t);return U(u),u}export{ge as a,Se as b,X as c,Pe as d,ve as e,be as f,De as g,Me as h,ke as i,Be as j,Fe as k,Re as l,Te as m,we as n,qe as o,Ae as p,Ee as q,yt as r,ya as s,dr as t,cr as u,gt as v,Ct as w,pr as x,b as y,He as z,ze as A,We as B,Ne as C,Rt as D,g as E,I as F,y as G,Ir as H,_ as I,Fr as J,Rr as K,Tr as L};
|
|
2
|
+
/*! For license information please see chunk-JJVID3KZ.js.LEGAL.txt */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as _,r as f}from"./chunk-
|
|
2
|
-
/*! For license information please see chunk-
|
|
1
|
+
import{a as _,r as f}from"./chunk-JJVID3KZ.js";import{a as R,c as a}from"./chunk-DCANE7XH.js";var H=R(o=>{"use strict";var Z=_();function P(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(){}var s={d:{f:u,r:function(){throw Error(P(522))},D:u,C:u,L:u,m:u,X:u,S:u,M:u},p:0,findDOMNode:null},ee=Symbol.for("react.portal");function te(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ee,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}var h=Z.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function S(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s;o.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(P(299));return te(t,e,null,r)};o.flushSync=function(t){var e=h.T,r=s.p;try{if(h.T=null,s.p=2,t)return t()}finally{h.T=e,s.p=r,s.d.f()}};o.preconnect=function(t,e){typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,s.d.C(t,e))};o.prefetchDNS=function(t){typeof t=="string"&&s.d.D(t)};o.preinit=function(t,e){if(typeof t=="string"&&e&&typeof e.as=="string"){var r=e.as,n=S(r,e.crossOrigin),c=typeof e.integrity=="string"?e.integrity:void 0,i=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;r==="style"?s.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:n,integrity:c,fetchPriority:i}):r==="script"&&s.d.X(t,{crossOrigin:n,integrity:c,fetchPriority:i,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};o.preinitModule=function(t,e){if(typeof t=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var r=S(e.as,e.crossOrigin);s.d.M(t,{crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&s.d.M(t)};o.preload=function(t,e){if(typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var r=e.as,n=S(r,e.crossOrigin);s.d.L(t,r,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};o.preloadModule=function(t,e){if(typeof t=="string")if(e){var r=S(e.as,e.crossOrigin);s.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:r,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else s.d.m(t)};o.requestFormReset=function(t){s.d.r(t)};o.unstable_batchedUpdates=function(t,e){return t(e)};o.useFormState=function(t,e,r){return h.H.useFormState(t,e,r)};o.useFormStatus=function(){return h.H.useHostTransitionStatus()};o.version="19.2.8"});var re=R((me,k)=>{"use strict";function U(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(U)}catch(t){console.error(t)}}U(),k.exports=H()});var E=a(f(),1);function ne({href:t,onBack:e,className:r,children:n,elementRef:c}){return t?(0,E.jsx)("a",{className:r,href:t,onClick:i=>{e&&i.button===0&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&!i.altKey&&(i.preventDefault(),e())},ref:c,children:n}):e?(0,E.jsx)("button",{className:r,onClick:e,ref:c,type:"button",children:n}):null}var l=a(_(),1),N=a(f(),1),B=(0,l.createContext)(void 0),F=[96,192,320,480,640,960,1280,1920],z=/\.(jpe?g|png|webp|avif)$/i,W=/\/+$/,j=new Set(["media.lockerverse.com","dev-media.lockerverse.com"]);function q(t,e){if(j.has(t.hostname)&&!t.port)return t.pathname;if(!e)return;let r=new URL(e),n=`${r.pathname.replace(W,"")}/`;if(!(r.username||r.password||r.search||r.hash||t.origin!==r.origin||!t.pathname.startsWith(n)))return`/${t.pathname.slice(n.length)}`}function G(t,e){if(t)try{let r=new URL(t),n=q(r,e);return r.protocol!=="https:"||!n||r.username||r.password||r.search||r.hash||n.startsWith("/__image/")||n.includes("/chat-media/")||!z.test(n)?void 0:r}catch{}}function A(t,e){return t.searchParams.set("w",String(e)),t.searchParams.set("f","webp"),t.href}function se({alt:t,width:e,height:r,src:n,maxWidth:c,onError:i,decoding:p="async",...v}){let[x,K]=(0,l.useState)(),V=(0,l.useContext)(B),y=x===n?void 0:G(n,V),L=F.filter(d=>d<=c),$=L.at(-1)??96;return(0,N.jsx)("img",{...v,alt:t,decoding:p,height:r,onError:d=>{y?K(n):i?.(d)},src:y?A(y,$):n,srcSet:y?L.map(d=>`${A(y,d)} ${d}w`).join(", "):void 0,width:e})}var b=a(_(),1),g=new Map,O,I=0,Y=2147483647;function T(){clearTimeout(O),O=void 0;let t=Date.now(),e=Number.POSITIVE_INFINITY;for(let r of g.values())for(let n of r)n>t&&(e=Math.min(e,n));Number.isFinite(e)&&(O=setTimeout(w,Math.min(e-t+1,Y)))}function w(){I+=1;for(let t of g.keys())t();T()}function D(){document.hidden||w()}var X=()=>I,J=()=>0;function ce(t,e,r=[]){let n=[t,e,...r.flatMap(i=>[i.startAt??t,i.endAt??e])].join(","),c=(0,b.useCallback)(i=>(g.size||document.addEventListener("visibilitychange",D),g.set(i,n.split(",").map(Date.parse)),T(),()=>{g.delete(i),T(),g.size||document.removeEventListener("visibilitychange",D)}),[n]);(0,b.useSyncExternalStore)(c,X,J)}var Q=/<\/?(?:p|br|strong|em|u|s|ul|ol|li|blockquote|pre|code|hr|h[1-6]|a)(?:\s|\/?>)/i;function C(t){return Q.test(t)?t:t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r\n|\r|\n/g,"<br>")}var M=a(f(),1);function fe({description:t,className:e,id:r}){return(0,M.jsx)("div",{className:["lockerverse-auctions__description",e].filter(Boolean).join(" "),dangerouslySetInnerHTML:{__html:C(t)},id:r})}var m=a(_(),1);function ye(){let t=(0,m.useRef)(null),[e,r]=(0,m.useState)(!1);return(0,m.useEffect)(()=>{let n=t.current;if(!(n&&"IntersectionObserver"in window))return;let c=!1,i=()=>r(c&&!document.hidden),p=new IntersectionObserver(([v])=>{c=!!(v?.isIntersecting&&v.intersectionRatio>0),i()});return p.observe(n),document.addEventListener("visibilitychange",i),()=>{p.disconnect(),document.removeEventListener("visibilitychange",i)}},[]),{ref:t,visible:e}}export{re as a,ne as b,fe as c,B as d,se as e,ye as f,ce as g};
|
|
2
|
+
/*! For license information please see chunk-ZD64W5CW.js.LEGAL.txt */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as P,B as O,C as N,D as v,F as b,G as y,K as R,L as D,a as J,b as F,d as T,e as L,r as p,u,v as M,y as _,z as B}from"./chunk-KW7VHDHQ.js";import{c as h}from"./chunk-DCANE7XH.js";function $(e,n,o){let i=R(e,n.saleMode==="buy_now"?(n.buyNowPriceAmount??0)*o.quantity:o.amount,o.includeServiceFee,n.additionalCharge?n.additionalCharge.firstUnitAmountCents+n.additionalCharge.additionalUnitAmountCents*(n.saleMode==="buy_now"?o.quantity-1:0):0);return n.additionalCharge?{...i,additionalCharge:n.additionalCharge}:i}function ce(e,n,o){if(M(e,n)!=="active")return"This item is not accepting bids or purchases.";if(o.bidType==="maximum"&&!n.supportsMaximumBids)return"Maximum bidding is not available for this item. Choose a fixed bid.";if(n.saleMode==="hybrid")return"This item type is not supported for checkout.";if(n.saleMode==="buy_now"){if(n.isSoldOut||n.availableQuantity===0)return"This item is sold out.";if(o.quantity>(n.maxQuantityPerOrder??Number.POSITIVE_INFINITY))return`You can buy up to ${n.maxQuantityPerOrder} items per order.`;if(!(n.buyNowPriceAmount&&Number.isSafeInteger(o.quantity))||o.quantity<1||n.availableQuantity!==null&&o.quantity>n.availableQuantity)return"Select an available quantity."}else if(!Number.isSafeInteger(o.amount)||o.amount%100!==0||o.amount<D(n))return"Enter a whole-dollar bid at or above the minimum bid.";return null}function K(e,n){return e?.name===n?.name&&e?.category===n?.category&&e?.firstUnitAmountCents===n?.firstUnitAmountCents&&e?.additionalUnitAmountCents===n?.additionalUnitAmountCents}function ue(e,n,o,i,r){return e.payment?.publishableKey!==n.payment?.publishableKey||e.payment?.connectedAccountId!==n.payment?.connectedAccountId||e.serviceFeeEnabled!==n.serviceFeeEnabled||o.saleMode!==i.saleMode||!K(o.additionalCharge,i.additionalCharge)||o.collectShippingAddress!==i.collectShippingAddress||JSON.stringify($(e,o,r))!==JSON.stringify($(n,i,r))}function de(e){return{expectedAdditionalChargeCents:e.additionalChargeCents??0,expectedServiceFeeCents:e.serviceFeeCents,expectedSubtotalCents:e.subtotalCents,expectedTotalCents:e.totalCents}}async function me({stripe:e,elements:n,email:o,phone:i,billing:r,shipping:a,collectShippingAddress:d}){if(!(r?.complete&&r.value.name.trim()))throw new Error("Complete your billing name and address.");if(d&&!(a?.complete&&a.value.name.trim()))throw new Error("Complete your shipping name and address.");let f=await n.submit();if(f.error)throw new Error(f.error.message??"Check your payment details.");let m=await e.createConfirmationToken({elements:n,params:{payment_method_data:{allow_redisplay:"always",billing_details:{address:r.value.address,email:o,name:r.value.name,phone:i}},return_url:window.location.href,...d&&a?{shipping:{address:a.value.address,name:a.value.name,phone:i}}:void 0}});if(m.error||!m.confirmationToken)throw new Error(m.error?.message??"Unable to prepare payment details.");return m.confirmationToken.id}async function he(e,n){if(!n.requiresAction)return;if(!n.clientSecret)throw new Error("Payment confirmation is incomplete. Check its status before trying again.");let o=await e.handleNextAction({clientSecret:n.clientSecret});if(o.error)throw new Error(o.error.message??"Payment confirmation is incomplete.")}function ge(e,n){if(e)try{Promise.resolve(e(n)).catch(()=>{})}catch{}}var j="Email is required.",q="Enter a valid email address.",X="Phone is required.",S="Enter a valid phone number.",Z=/^(?:$|[^\s@]+@[^\s@]+\.[^\s@]+)$/,ee=/^\+[1-9]\d{6,14}$/;function U(e){return ee.test(e)}function g(e){return e.trim().replace(/[().\s-]/g,"")}var be=y(b(),v(),O(Z,q)),ye=y(b(),v(),P(j),B(q)),ke=y(b(),v(),_(e=>e===""||g(e)!=="",S),N(g),_(e=>e===""||U(e),S)),Ce=y(b(),v(),P(X),N(g),_(U,S));var k=[{callingCode:"+1",label:"\u{1F1FA}\u{1F1F8} +1",value:"US"},{callingCode:"+52",label:"\u{1F1F2}\u{1F1FD} +52",value:"MX"},{callingCode:"+380",label:"\u{1F1FA}\u{1F1E6} +380",value:"UA"},{callingCode:"+48",label:"\u{1F1F5}\u{1F1F1} +48",value:"PL"},{callingCode:"+1",label:"\u{1F1E8}\u{1F1E6} +1",value:"CA"},{callingCode:"+49",label:"\u{1F1E9}\u{1F1EA} +49",value:"DE"},{callingCode:"+44",label:"\u{1F1EC}\u{1F1E7} +44",value:"GB"},{callingCode:"+46",label:"\u{1F1F8}\u{1F1EA} +46",value:"SE"},{callingCode:"+358",label:"\u{1F1EB}\u{1F1EE} +358",value:"FI"},{callingCode:"+1",label:"\u{1F1F5}\u{1F1F7} +1",value:"PR"}];function C(e){return k.find(n=>n.value===e)??k[0]}function ne(e,n){let o=`${n}${n}`,i=e;for(;i.startsWith(o);)i=`${n}${i.slice(o.length)}`;return i}function Ee(e,n){let o=g(e);if(!o)return"";let i=C(n),r=ne(o,i.callingCode);return r.startsWith("+")?r:`${i.callingCode}${r}`}function V(e,n="US"){let o=g(e),i=C(n);return o.startsWith("+")&&!o.startsWith(i.callingCode)?k.find(r=>o.startsWith(r.callingCode))?.value??i.value:i.value}var s=h(p(),1);function te({className:e,error:n,id:o}){return n?(0,s.jsx)("span",{className:`lockerverse-form__error ${e??""}`,id:o,role:"alert",children:n}):null}function I({children:e,error:n,errorId:o,id:i,label:r}){return(0,s.jsxs)("div",{className:"lockerverse-form__field",children:[(0,s.jsx)("label",{htmlFor:i,children:r}),e,(0,s.jsx)(te,{error:n,id:o??`${i}-error`})]})}function oe({className:e,error:n,errorId:o,id:i,label:r,...a}){let d=o??`${i}-error`;return(0,s.jsx)(I,{error:n,errorId:d,id:i,label:r,children:(0,s.jsx)("input",{...a,"aria-describedby":n?d:a["aria-describedby"],"aria-invalid":n?"true":a["aria-invalid"],className:`lockerverse-form__control ${e??""}`,id:i})})}function H(e){return(0,s.jsx)(oe,{autoComplete:"email",placeholder:"name@example.com",...e,type:"email"})}function x({className:e,...n}){return(0,s.jsx)("input",{...n,className:["lockerverse-form__checkbox",e].filter(Boolean).join(" "),type:"checkbox"})}var z=h(J(),1);var c=h(p(),1);function W({id:e,name:n,value:o,onChange:i,country:r,required:a,disabled:d,inputRef:f,error:m,errorId:Q,placeholder:Y="(201) 555-0123"}){let w=(0,z.useRef)(null),E=C(r);return(0,c.jsxs)("div",{className:"lockerverse-form__phone",dir:"ltr",children:[(0,c.jsxs)("div",{className:"lockerverse-form__phone-country",children:[(0,c.jsxs)("span",{"aria-hidden":"true",children:[(0,c.jsx)("span",{className:"lockerverse-form__phone-flag",children:E.label.split(" ")[0]}),E.callingCode,(0,c.jsx)(T,{"aria-hidden":"true",size:14})]}),(0,c.jsx)("select",{"aria-label":"Phone number country",disabled:d,name:"phoneCountry",onChange:l=>{let A=C(l.target.value);i({country:A.value,value:o}),w.current?.focus()},value:E.value,children:k.map(l=>(0,c.jsx)("option",{value:l.value,children:l.label},l.value))})]}),(0,c.jsx)("input",{"aria-describedby":m?Q:void 0,"aria-invalid":m?!0:void 0,autoComplete:"tel-national",disabled:d,id:e,name:n,onChange:l=>{let A=l.target.value;i({country:V(A,r),value:A})},placeholder:Y,ref:l=>{w.current=l,f&&(f.current=l)},required:a,type:"tel",value:o})]})}var t=h(p(),1);function Me(e){let{isPurchase:n,isMaximumBid:o,item:i,id:r}=e;return(0,t.jsxs)("form",{className:"lockerverse-auctions__checkout",noValidate:!0,onSubmit:e.onSubmit,children:[(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-header",children:[(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-navigation",children:[(0,t.jsx)("button",{"aria-label":"Back",className:"lockerverse-auctions__checkout-back",disabled:!e.onBack,onClick:e.onBack,type:"button",children:(0,t.jsx)(L,{"aria-hidden":"true",size:20})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"lockerverse-auctions__checkout-eyebrow",children:"Step 2 of 2"}),(0,t.jsx)("p",{children:n?"Secure checkout":"Secure payment method"})]})]}),(0,t.jsx)("p",{className:"lockerverse-auctions__checkout-eyebrow",children:e.communityName}),(0,t.jsx)("h2",{children:n?"Finalize your purchase.":"Finalize your bid authorization."}),(0,t.jsx)(ae,{...e}),i.collectShippingAddress&&(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-physical",children:[(0,t.jsx)("p",{className:"lockerverse-auctions__checkout-eyebrow",children:"Physical item"}),(0,t.jsx)("p",{children:"This item requires a delivery address. Billing details are used by default, and you can switch to a separate delivery address below if needed."})]})]}),(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-body",children:[e.showFields&&(0,t.jsxs)("fieldset",{disabled:e.locked,children:[(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-contact",children:[(0,t.jsx)(H,{error:e.contactErrors.email,id:`${r}-email`,label:"Email",name:"email",onChange:a=>e.onEmailChange(a.target.value),required:!0,value:e.email}),(0,t.jsx)(I,{error:e.contactErrors.phone,id:`${r}-phone`,label:"Phone",children:(0,t.jsx)(W,{country:e.phoneCountry,error:e.contactErrors.phone,errorId:`${r}-phone-error`,id:`${r}-phone`,name:"phone",onChange:e.onPhoneChange,required:!0,value:e.phone})})]}),(0,t.jsxs)("section",{"aria-label":"Payment Information",className:"lockerverse-auctions__checkout-section",children:[(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-section-heading",children:[(0,t.jsx)("h3",{children:"Payment Information"}),(0,t.jsx)("p",{children:n?"Processed securely and charged immediately for this purchase.":"Stored securely and charged only if your bid finishes on top."})]}),e.paymentFields]}),(0,t.jsxs)("section",{"aria-label":"Billing Details",className:"lockerverse-auctions__checkout-section",children:[(0,t.jsx)("h3",{children:"Billing Details"}),e.billingFields,(0,t.jsx)("p",{children:n?"Use your full name here. We use the email and phone above for purchase confirmation and fulfillment updates.":"Use the bidder's full name here. We use the email and phone above to contact you if this bid is outbid or wins."})]}),i.collectShippingAddress&&(0,t.jsxs)("section",{"aria-label":"Delivery Details",className:"lockerverse-auctions__checkout-section",children:[(0,t.jsxs)("label",{className:"lockerverse-auctions__checkout-checkbox lockerverse-auctions__checkout-delivery",htmlFor:`${r}-delivery-same-as-billing`,children:[(0,t.jsx)(x,{checked:e.sameAsBilling,id:`${r}-delivery-same-as-billing`,onChange:a=>e.onSameAsBillingChange(a.target.checked)}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"Delivery address is the same as billing"}),(0,t.jsx)("span",{children:"Leave this on for the fastest flow. Turn it off only if the delivery address should differ from the billing details above."})]})]}),!e.sameAsBilling&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{children:"Delivery Address"}),e.shippingFields]})]}),(0,t.jsx)(re,{isMaximumBid:o,isPurchase:n,pricing:e.pricing}),e.serviceFeeEnabled&&(0,t.jsx)(ie,{...e})]}),e.message&&(0,t.jsx)("p",{"aria-live":"polite",className:"lockerverse-auctions__notice",role:"status",children:e.message}),!e.isTerminal&&(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-footer",children:[(0,t.jsxs)("p",{children:[n?"By continuing, you agree to be charged for this purchase.":"By continuing, you agree to have this payment method stored for item settlement if your bid is the winning offer.",i.collectShippingAddress?` Your delivery details are stored with the ${n?"order":"bid"} so the seller can fulfill the item after payment.`:""]}),(0,t.jsxs)("button",{className:"lockerverse-auctions__button lockerverse-auctions__checkout-submit",disabled:e.submitDisabled,type:"submit",children:[e.buttonText,(0,t.jsx)(F,{"aria-hidden":"true",size:16})]})]})]})]})}function ie(e){let{isPurchase:n,isMaximumBid:o,pricing:i}=e,r=G(n,o);return(0,t.jsx)("section",{"aria-label":"Processing fees",className:"lockerverse-auctions__checkout-section",children:e.onIncludeServiceFeeChange?(0,t.jsxs)("label",{className:"lockerverse-auctions__checkout-checkbox",htmlFor:`${e.id}-service-fee`,children:[(0,t.jsx)(x,{checked:e.includeServiceFee,id:`${e.id}-service-fee`,onChange:a=>e.onIncludeServiceFeeChange?.(a.target.checked)}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("strong",{children:[r.fee," ",u(e.serviceFeeCents)," to help cover processing fees"]}),(0,t.jsxs)("span",{children:[r.total,": ",u(i.totalCents)]})]})]}):(0,t.jsxs)("p",{children:[r.total,": ",u(i.totalCents)]})})}function re({pricing:e,isPurchase:n,isMaximumBid:o}){let i=G(n,o);return e.additionalCharge?(0,t.jsxs)("section",{"aria-label":"Order amounts",className:"lockerverse-auctions__checkout-section",children:[(0,t.jsxs)("p",{children:[i.amount,": ",u(e.subtotalCents)]}),(0,t.jsxs)("p",{children:[e.additionalCharge.name,":"," ",u(e.additionalChargeCents??0)]}),(0,t.jsxs)("p",{children:[i.total,": ",u(e.totalCents)]})]}):null}function ae(e){let{isPurchase:n,isMaximumBid:o,item:i,pricing:r}=e;return(0,t.jsx)("p",{className:"lockerverse-auctions__checkout-summary",children:n?(0,t.jsxs)(t.Fragment,{children:["Pay ",(0,t.jsx)("strong",{children:u(r.totalCents)})," for"," ",e.quantity," ",e.quantity===1?"item":"items"," of"," ",(0,t.jsx)("strong",{children:i.name}),". Your card is charged immediately once checkout succeeds."]}):(0,t.jsxs)(t.Fragment,{children:["Authorize a payment method for your"," ",o?"maximum bid":"bid"," of"," ",(0,t.jsx)("strong",{children:u(r.subtotalCents)})," on"," ",(0,t.jsx)("strong",{children:i.name}),". Your card is only charged if this bid wins the item.",o?" You pay the final winning price, up to your maximum, plus any agreed fees and additional charges. Your maximum stays private.":""]})})}function G(e,n){return e?{amount:"Subtotal",fee:"Add",total:"Total"}:n?{amount:"Maximum bid",fee:"If I win, add up to",total:"Maximum total if I win"}:{amount:"Bid amount",fee:"If I win, add",total:"Total if I win"}}export{$ as a,ce as b,K as c,ue as d,de as e,me as f,he as g,g as h,ye as i,Ce as j,Ee as k,V as l,Me as m,ge as n};
|
|
1
|
+
import{A as P,B as O,C as N,D as v,F as b,G as y,K as R,L as D,a as J,b as F,d as T,e as L,r as p,u,v as M,y as _,z as B}from"./chunk-JJVID3KZ.js";import{c as h}from"./chunk-DCANE7XH.js";function $(e,n,o){let i=R(e,n.saleMode==="buy_now"?(n.buyNowPriceAmount??0)*o.quantity:o.amount,o.includeServiceFee,n.additionalCharge?n.additionalCharge.firstUnitAmountCents+n.additionalCharge.additionalUnitAmountCents*(n.saleMode==="buy_now"?o.quantity-1:0):0);return n.additionalCharge?{...i,additionalCharge:n.additionalCharge}:i}function ce(e,n,o){if(M(e,n)!=="active")return"This item is not accepting bids or purchases.";if(o.bidType==="maximum"&&!n.supportsMaximumBids)return"Maximum bidding is not available for this item. Choose a fixed bid.";if(n.saleMode==="hybrid")return"This item type is not supported for checkout.";if(n.saleMode==="buy_now"){if(n.isSoldOut||n.availableQuantity===0)return"This item is sold out.";if(o.quantity>(n.maxQuantityPerOrder??Number.POSITIVE_INFINITY))return`You can buy up to ${n.maxQuantityPerOrder} items per order.`;if(!(n.buyNowPriceAmount&&Number.isSafeInteger(o.quantity))||o.quantity<1||n.availableQuantity!==null&&o.quantity>n.availableQuantity)return"Select an available quantity."}else if(!Number.isSafeInteger(o.amount)||o.amount%100!==0||o.amount<D(n))return"Enter a whole-dollar bid at or above the minimum bid.";return null}function K(e,n){return e?.name===n?.name&&e?.category===n?.category&&e?.firstUnitAmountCents===n?.firstUnitAmountCents&&e?.additionalUnitAmountCents===n?.additionalUnitAmountCents}function ue(e,n,o,i,r){return e.payment?.publishableKey!==n.payment?.publishableKey||e.payment?.connectedAccountId!==n.payment?.connectedAccountId||e.serviceFeeEnabled!==n.serviceFeeEnabled||o.saleMode!==i.saleMode||!K(o.additionalCharge,i.additionalCharge)||o.collectShippingAddress!==i.collectShippingAddress||JSON.stringify($(e,o,r))!==JSON.stringify($(n,i,r))}function de(e){return{expectedAdditionalChargeCents:e.additionalChargeCents??0,expectedServiceFeeCents:e.serviceFeeCents,expectedSubtotalCents:e.subtotalCents,expectedTotalCents:e.totalCents}}async function me({stripe:e,elements:n,email:o,phone:i,billing:r,shipping:a,collectShippingAddress:d}){if(!(r?.complete&&r.value.name.trim()))throw new Error("Complete your billing name and address.");if(d&&!(a?.complete&&a.value.name.trim()))throw new Error("Complete your shipping name and address.");let f=await n.submit();if(f.error)throw new Error(f.error.message??"Check your payment details.");let m=await e.createConfirmationToken({elements:n,params:{payment_method_data:{allow_redisplay:"always",billing_details:{address:r.value.address,email:o,name:r.value.name,phone:i}},return_url:window.location.href,...d&&a?{shipping:{address:a.value.address,name:a.value.name,phone:i}}:void 0}});if(m.error||!m.confirmationToken)throw new Error(m.error?.message??"Unable to prepare payment details.");return m.confirmationToken.id}async function he(e,n){if(!n.requiresAction)return;if(!n.clientSecret)throw new Error("Payment confirmation is incomplete. Check its status before trying again.");let o=await e.handleNextAction({clientSecret:n.clientSecret});if(o.error)throw new Error(o.error.message??"Payment confirmation is incomplete.")}function ge(e,n){if(e)try{Promise.resolve(e(n)).catch(()=>{})}catch{}}var j="Email is required.",q="Enter a valid email address.",X="Phone is required.",S="Enter a valid phone number.",Z=/^(?:$|[^\s@]+@[^\s@]+\.[^\s@]+)$/,ee=/^\+[1-9]\d{6,14}$/;function U(e){return ee.test(e)}function g(e){return e.trim().replace(/[().\s-]/g,"")}var be=y(b(),v(),O(Z,q)),ye=y(b(),v(),P(j),B(q)),ke=y(b(),v(),_(e=>e===""||g(e)!=="",S),N(g),_(e=>e===""||U(e),S)),Ce=y(b(),v(),P(X),N(g),_(U,S));var k=[{callingCode:"+1",label:"\u{1F1FA}\u{1F1F8} +1",value:"US"},{callingCode:"+52",label:"\u{1F1F2}\u{1F1FD} +52",value:"MX"},{callingCode:"+380",label:"\u{1F1FA}\u{1F1E6} +380",value:"UA"},{callingCode:"+48",label:"\u{1F1F5}\u{1F1F1} +48",value:"PL"},{callingCode:"+1",label:"\u{1F1E8}\u{1F1E6} +1",value:"CA"},{callingCode:"+49",label:"\u{1F1E9}\u{1F1EA} +49",value:"DE"},{callingCode:"+44",label:"\u{1F1EC}\u{1F1E7} +44",value:"GB"},{callingCode:"+46",label:"\u{1F1F8}\u{1F1EA} +46",value:"SE"},{callingCode:"+358",label:"\u{1F1EB}\u{1F1EE} +358",value:"FI"},{callingCode:"+1",label:"\u{1F1F5}\u{1F1F7} +1",value:"PR"}];function C(e){return k.find(n=>n.value===e)??k[0]}function ne(e,n){let o=`${n}${n}`,i=e;for(;i.startsWith(o);)i=`${n}${i.slice(o.length)}`;return i}function Ee(e,n){let o=g(e);if(!o)return"";let i=C(n),r=ne(o,i.callingCode);return r.startsWith("+")?r:`${i.callingCode}${r}`}function V(e,n="US"){let o=g(e),i=C(n);return o.startsWith("+")&&!o.startsWith(i.callingCode)?k.find(r=>o.startsWith(r.callingCode))?.value??i.value:i.value}var s=h(p(),1);function te({className:e,error:n,id:o}){return n?(0,s.jsx)("span",{className:`lockerverse-form__error ${e??""}`,id:o,role:"alert",children:n}):null}function I({children:e,error:n,errorId:o,id:i,label:r}){return(0,s.jsxs)("div",{className:"lockerverse-form__field",children:[(0,s.jsx)("label",{htmlFor:i,children:r}),e,(0,s.jsx)(te,{error:n,id:o??`${i}-error`})]})}function oe({className:e,error:n,errorId:o,id:i,label:r,...a}){let d=o??`${i}-error`;return(0,s.jsx)(I,{error:n,errorId:d,id:i,label:r,children:(0,s.jsx)("input",{...a,"aria-describedby":n?d:a["aria-describedby"],"aria-invalid":n?"true":a["aria-invalid"],className:`lockerverse-form__control ${e??""}`,id:i})})}function H(e){return(0,s.jsx)(oe,{autoComplete:"email",placeholder:"name@example.com",...e,type:"email"})}function x({className:e,...n}){return(0,s.jsx)("input",{...n,className:["lockerverse-form__checkbox",e].filter(Boolean).join(" "),type:"checkbox"})}var z=h(J(),1);var c=h(p(),1);function W({id:e,name:n,value:o,onChange:i,country:r,required:a,disabled:d,inputRef:f,error:m,errorId:Q,placeholder:Y="(201) 555-0123"}){let w=(0,z.useRef)(null),E=C(r);return(0,c.jsxs)("div",{className:"lockerverse-form__phone",dir:"ltr",children:[(0,c.jsxs)("div",{className:"lockerverse-form__phone-country",children:[(0,c.jsxs)("span",{"aria-hidden":"true",children:[(0,c.jsx)("span",{className:"lockerverse-form__phone-flag",children:E.label.split(" ")[0]}),E.callingCode,(0,c.jsx)(T,{"aria-hidden":"true",size:14})]}),(0,c.jsx)("select",{"aria-label":"Phone number country",disabled:d,name:"phoneCountry",onChange:l=>{let A=C(l.target.value);i({country:A.value,value:o}),w.current?.focus()},value:E.value,children:k.map(l=>(0,c.jsx)("option",{value:l.value,children:l.label},l.value))})]}),(0,c.jsx)("input",{"aria-describedby":m?Q:void 0,"aria-invalid":m?!0:void 0,autoComplete:"tel-national",disabled:d,id:e,name:n,onChange:l=>{let A=l.target.value;i({country:V(A,r),value:A})},placeholder:Y,ref:l=>{w.current=l,f&&(f.current=l)},required:a,type:"tel",value:o})]})}var t=h(p(),1);function Me(e){let{isPurchase:n,isMaximumBid:o,item:i,id:r}=e;return(0,t.jsxs)("form",{className:"lockerverse-auctions__checkout",noValidate:!0,onSubmit:e.onSubmit,children:[(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-header",children:[(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-navigation",children:[(0,t.jsx)("button",{"aria-label":"Back",className:"lockerverse-auctions__checkout-back",disabled:!e.onBack,onClick:e.onBack,type:"button",children:(0,t.jsx)(L,{"aria-hidden":"true",size:20})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"lockerverse-auctions__checkout-eyebrow",children:"Step 2 of 2"}),(0,t.jsx)("p",{children:n?"Secure checkout":"Secure payment method"})]})]}),(0,t.jsx)("p",{className:"lockerverse-auctions__checkout-eyebrow",children:e.communityName}),(0,t.jsx)("h2",{children:n?"Finalize your purchase.":"Finalize your bid authorization."}),(0,t.jsx)(ae,{...e}),i.collectShippingAddress&&(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-physical",children:[(0,t.jsx)("p",{className:"lockerverse-auctions__checkout-eyebrow",children:"Physical item"}),(0,t.jsx)("p",{children:"This item requires a delivery address. Billing details are used by default, and you can switch to a separate delivery address below if needed."})]})]}),(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-body",children:[e.showFields&&(0,t.jsxs)("fieldset",{disabled:e.locked,children:[(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-contact",children:[(0,t.jsx)(H,{error:e.contactErrors.email,id:`${r}-email`,label:"Email",name:"email",onChange:a=>e.onEmailChange(a.target.value),required:!0,value:e.email}),(0,t.jsx)(I,{error:e.contactErrors.phone,id:`${r}-phone`,label:"Phone",children:(0,t.jsx)(W,{country:e.phoneCountry,error:e.contactErrors.phone,errorId:`${r}-phone-error`,id:`${r}-phone`,name:"phone",onChange:e.onPhoneChange,required:!0,value:e.phone})})]}),(0,t.jsxs)("section",{"aria-label":"Payment Information",className:"lockerverse-auctions__checkout-section",children:[(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-section-heading",children:[(0,t.jsx)("h3",{children:"Payment Information"}),(0,t.jsx)("p",{children:n?"Processed securely and charged immediately for this purchase.":"Stored securely and charged only if your bid finishes on top."})]}),e.paymentFields]}),(0,t.jsxs)("section",{"aria-label":"Billing Details",className:"lockerverse-auctions__checkout-section",children:[(0,t.jsx)("h3",{children:"Billing Details"}),e.billingFields,(0,t.jsx)("p",{children:n?"Use your full name here. We use the email and phone above for purchase confirmation and fulfillment updates.":"Use the bidder's full name here. We use the email and phone above to contact you if this bid is outbid or wins."})]}),i.collectShippingAddress&&(0,t.jsxs)("section",{"aria-label":"Delivery Details",className:"lockerverse-auctions__checkout-section",children:[(0,t.jsxs)("label",{className:"lockerverse-auctions__checkout-checkbox lockerverse-auctions__checkout-delivery",htmlFor:`${r}-delivery-same-as-billing`,children:[(0,t.jsx)(x,{checked:e.sameAsBilling,id:`${r}-delivery-same-as-billing`,onChange:a=>e.onSameAsBillingChange(a.target.checked)}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"Delivery address is the same as billing"}),(0,t.jsx)("span",{children:"Leave this on for the fastest flow. Turn it off only if the delivery address should differ from the billing details above."})]})]}),!e.sameAsBilling&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{children:"Delivery Address"}),e.shippingFields]})]}),(0,t.jsx)(re,{isMaximumBid:o,isPurchase:n,pricing:e.pricing}),e.serviceFeeEnabled&&(0,t.jsx)(ie,{...e})]}),e.message&&(0,t.jsx)("p",{"aria-live":"polite",className:"lockerverse-auctions__notice",role:"status",children:e.message}),!e.isTerminal&&(0,t.jsxs)("div",{className:"lockerverse-auctions__checkout-footer",children:[(0,t.jsxs)("p",{children:[n?"By continuing, you agree to be charged for this purchase.":"By continuing, you agree to have this payment method stored for item settlement if your bid is the winning offer.",i.collectShippingAddress?` Your delivery details are stored with the ${n?"order":"bid"} so the seller can fulfill the item after payment.`:""]}),(0,t.jsxs)("button",{className:"lockerverse-auctions__button lockerverse-auctions__checkout-submit",disabled:e.submitDisabled,type:"submit",children:[e.buttonText,(0,t.jsx)(F,{"aria-hidden":"true",size:16})]})]})]})]})}function ie(e){let{isPurchase:n,isMaximumBid:o,pricing:i}=e,r=G(n,o);return(0,t.jsx)("section",{"aria-label":"Processing fees",className:"lockerverse-auctions__checkout-section",children:e.onIncludeServiceFeeChange?(0,t.jsxs)("label",{className:"lockerverse-auctions__checkout-checkbox",htmlFor:`${e.id}-service-fee`,children:[(0,t.jsx)(x,{checked:e.includeServiceFee,id:`${e.id}-service-fee`,onChange:a=>e.onIncludeServiceFeeChange?.(a.target.checked)}),(0,t.jsxs)("span",{children:[(0,t.jsxs)("strong",{children:[r.fee," ",u(e.serviceFeeCents)," to help cover processing fees"]}),(0,t.jsxs)("span",{children:[r.total,": ",u(i.totalCents)]})]})]}):(0,t.jsxs)("p",{children:[r.total,": ",u(i.totalCents)]})})}function re({pricing:e,isPurchase:n,isMaximumBid:o}){let i=G(n,o);return e.additionalCharge?(0,t.jsxs)("section",{"aria-label":"Order amounts",className:"lockerverse-auctions__checkout-section",children:[(0,t.jsxs)("p",{children:[i.amount,": ",u(e.subtotalCents)]}),(0,t.jsxs)("p",{children:[e.additionalCharge.name,":"," ",u(e.additionalChargeCents??0)]}),(0,t.jsxs)("p",{children:[i.total,": ",u(e.totalCents)]})]}):null}function ae(e){let{isPurchase:n,isMaximumBid:o,item:i,pricing:r}=e;return(0,t.jsx)("p",{className:"lockerverse-auctions__checkout-summary",children:n?(0,t.jsxs)(t.Fragment,{children:["Pay ",(0,t.jsx)("strong",{children:u(r.totalCents)})," for"," ",e.quantity," ",e.quantity===1?"item":"items"," of"," ",(0,t.jsx)("strong",{children:i.name}),". Your card is charged immediately once checkout succeeds."]}):(0,t.jsxs)(t.Fragment,{children:["Authorize a payment method for your"," ",o?"maximum bid":"bid"," of"," ",(0,t.jsx)("strong",{children:u(r.subtotalCents)})," on"," ",(0,t.jsx)("strong",{children:i.name}),". Your card is only charged if this bid wins the item.",o?" You pay the final winning price, up to your maximum, plus any agreed fees and additional charges. Your maximum stays private.":""]})})}function G(e,n){return e?{amount:"Subtotal",fee:"Add",total:"Total"}:n?{amount:"Maximum bid",fee:"If I win, add up to",total:"Maximum total if I win"}:{amount:"Bid amount",fee:"If I win, add",total:"Total if I win"}}export{$ as a,ce as b,K as c,ue as d,de as e,me as f,he as g,g as h,ye as i,Ce as j,Ee as k,V as l,Me as m,ge as n};
|