PageSourceSearch

https://www.dancelifex.id/_next/static/chunks/pages/spot-booking/[id]-1fa3534ae07e227b.js

js dancelifex.id collected 2026-09-28 10:36:33 UTC 13,094 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5291],{50878:function(e,t,n){"use strict";var i=n(85893);t.Z=function(){return(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",children:[(0,i.jsxs)("g",{filter:"url(#filter0_dd_16342_118234)",children:[(0,i.jsx)("rect",{x:"4",y:"3",width:"32",height:"32",rx:"16",fill:"white","shape-rendering":"crispEdges"}),(0,i.jsx)("path",{d:"M23.5341 24.643L23.0357 23.8936L23.5341 24.643ZM27.3133 18.9944C27.2955 18.4977 26.8785 18.1093 26.3817 18.1271C25.885 18.1448 25.4967 18.5619 25.5144 19.0586L27.3133 18.9944ZM17.0939 23.5633C17.5905 23.5854 18.011 23.2008 18.0331 22.7043C18.0552 22.2077 17.6706 21.7872 17.1741 21.7651L17.0939 23.5633ZM14.263 22.5362L14.3031 21.6371C13.8081 21.6151 13.3883 21.9973 13.3641 22.4922L14.263 22.5362ZM13.2185 25.4596C13.1942 25.956 13.5769 26.3782 14.0734 26.4026C14.5698 26.4269 14.992 26.0442 15.0164 25.5477L13.2185 25.4596ZM16.5749 13.2856L17.0584 14.0447L16.5749 13.2856ZM12.6849 18.8585C12.6928 19.3555 13.1021 19.7519 13.5991 19.744C14.0961 19.7361 14.4926 19.3268 14.4847 18.8298L12.6849 18.8585ZM23.2008 14.6374C22.7037 14.6421 22.3046 15.0488 22.3093 15.5459C22.3141 16.0429 22.7208 16.442 23.2178 16.4373L23.2008 14.6374ZM25.8591 15.5122L25.8676 16.4121C26.3547 16.4075 26.7497 16.0163 26.7589 15.5293L25.8591 15.5122ZM26.8113 12.7766C26.8207 12.2797 26.4255 11.8691 25.9285 11.8597C25.4316 11.8502 25.021 12.2454 25.0116 12.7424L26.8113 12.7766ZM23.0357 23.8936C20.4784 25.5942 17.0267 24.8998 15.3261 22.3425L13.8272 23.3392C16.0784 26.7243 20.6474 27.6435 24.0325 25.3924L23.0357 23.8936ZM25.5144 19.0586C25.5812 20.9283 24.7045 22.7838 23.0357 23.8936L24.0325 25.3924C26.2435 23.9221 27.4014 21.4629 27.3133 18.9944L25.5144 19.0586ZM17.1741 21.7651L14.3031 21.6371L14.2229 23.4354L17.0939 23.5633L17.1741 21.7651ZM13.3641 22.4922L13.2185 25.4596L15.0164 25.5477L15.1619 22.5803L13.3641 22.4922ZM17.0584 14.0447C19.6488 12.3949 23.0861 13.1574 24.7359 15.7478L26.2542 14.7809C24.0703 11.352 19.5203 10.3427 16.0914 12.5265L17.0584 14.0447ZM14.4847 18.8298C14.4549 16.9591 15.368 15.1213 17.0584 14.0447L16.0914 12.5265C13.8519 13.9529 12.6456 16.3887 12.6849 18.8585L14.4847 18.8298ZM23.2178 16.4373L25.8676 16.4121L25.8505 14.6122L23.2008 14.6374L23.2178 16.4373ZM26.7589 15.5293L26.8113 12.7766L25.0116 12.7424L24.9592 15.4951L26.7589 15.5293Z",fill:"#333ECF"})]}),(0,i.jsx)("defs",{children:(0,i.jsxs)("filter",{id:"filter0_dd_16342_118234",x:"0",y:"0",width:"40",height:"40",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,i.jsx)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,i.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,i.jsx)("feOffset",{dy:"1"}),(0,i.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,i.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,i.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),(0,i.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_16342_118234"}),(0,i.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,i.jsx)("feOffset",{dy:"1"}),(0,i.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,i.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,i.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.00392157 0 0 0 0 0.00392157 0 0 0 0 0.00392157 0 0 0 0.2 0"}),(0,i.jsx)("feBlend",{mode:"normal",in2:"effect1_dropShadow_16342_118234",result:"effect2_dropShadow_16342_118234"}),(0,i.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect2_dropShadow_16342_118234",result:"shape"})]})})]})}},59310:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return b}});var i=n(50029),r=n(59499),o=n(87794),s=n.n(o),a=n(6283),l=n(67294),c=n(50878),d=n(5152),u=n.n(d),f=n(81668),p=n(11163),h=n(44352),x=n(90512),m=n(13959),v=n(85893);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?g(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var j=u()((function(){return n.e(9733).then(n.bind(n,79733))}),{ssr:!1,loadableGenerated:{webpack:function(){return[79733]}}}),y=function(){var e,t,n,r,o,d,u=(0,p.useRouter)(),g=(0,l.useRef)(null),y=(0,l.useState)(""),b=y[0],S=y[1],_=(0,l.useState)(null),L=_[0],C=_[1],N=(0,f.l)().setNoti,M=u.query.id,k=null===(e=u.query)||void 0===e?void 0:e["iframe-token"],Z=u.query.selectedDate,O=u.query.spotCount,E=O?parseInt(O):0,B=(0,l.useState)(""),q=B[0],A=B[1],F=(0,l.useState)(!0),P=F[0],I=F[1],T=(0,l.useState)(""),D=(T[0],T[1]),G=(0,l.useState)(1.8),z=G[0],H=G[1],W=(0,l.useState)(1.8),X=W[0],R=W[1],J=(0,l.useState)({x:136,y:196}),Y=J[0],U=J[1],V=(0,l.useState)(!1),K=V[0],Q=V[1],$=(0,l.useState)([]),ee=$[0],te=$[1],ne=(0,l.useState)([]),ie=ne[0],re=ne[1],oe=(0,l.useState)([]),se=oe[0],ae=oe[1],le=(0,l.useState)({minX:0,minY:0,maxX:0,maxY:0}),ce=(le[0],le[1],null!==(t=null===L||void 0===L||null===(n=L.allSpinningSpots)||void 0===n?void 0:n.filter((function(e){return e.isAvailable})))&&void 0!==t?t:[]),de=null!==(r=null===L||void 0===L?void 0:L.previousBookings)&&void 0!==r?r:[],ue=((0,l.useMemo)((function(){var e;return null!==(e=null===L||void 0===L?void 0:L.allSpinningSpots)&&void 0!==e?e:[]}),[L]),null!==(o=null===L||void 0===L?void 0:L.bookedSpinningSpots)&&void 0!==o?o:[]),fe=E>0&&E+de.length>=ce.length||E===ee.length;(0,l.useEffect)((function(){var e=(window.innerWidth-420)/2,t=window.innerHeight-150;U({x:e,y:t})}),[]),(0,l.useEffect)((function(){var e=document.querySelector('[class^="WhatsAppFAB"]');e&&e.remove();var t=document.createElement("style");if(t.innerHTML='[class^="WhatsAppFAB"] { display: none !important; }',document.head.appendChild(t),localStorage.getItem("iframe-token")||k)return D(localStorage.getItem("iframe-token")||k||""),I(!0),window.setTimeout((function(){xe(localStorage.getItem("iframe-token")||k||"",M,Z)}),2e3),void u.replace({pathname:u.pathname,query:w(w({},u.query),{},{error:void 0})},void 0,{shallow:!0});I(!1),A("Something went wrong with the authentication"),u.replace({pathname:u.pathname,query:w(w({},u.query),{},{error:"Something went wrong with the authentication"})},void 0,{shallow:!0})}),[]),(0,l.useEffect)((function(){localStorage.setItem("selected_seat_list",JSON.stringify(ee))}),[ee]),(0,l.useEffect)((function(){var e=u.query.selectedSpotList;e&&e.length>0&&ie.length>0&&te(e.split(",").map((function(e){return ie.find((function(t){return t.seatName===e}))})))}),[ie,u.query.selectedSpotList,u.query.selectedSpotListIds]);var pe=function(e){var t=w({},u.query);t.selectedSpotList=e.map((function(e){return e.seatName})).join(","),t.selectedSpotListIds=e.map((function(e){var t;return null===(t=se.find((function(t){return t.name===e.seatName})))||void 0===t?void 0:t.id})).join(","),0===t.selectedSpotList.length&&(delete t.selectedSpotListIds,delete t.selectedSpotList),u.replace({pathname:u.pathname,query:t},void 0,{shallow:!0})},he=function(e){"increase"===e?(H(Math.min(z+.1,2)),R(Math.min(X+.1,2))):(H(Math.max(z-.1,.8)),R(Math.max(X-.1,.8)))},xe=function(){var e=(0,i.Z)(s().mark((function e(t,n,i){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{fetch("".concat(a._d,"/booking/customer-package-membership/").concat(n,"/").concat(i),{method:"GET",headers:w({Accept:"application/json","Content-Type":"application/json",Authorization:"Bearer ".concat(t)},false)}).then((function(e){return e.json()})).then((function(e){var t,n,i,r;S(e.data.layout),ae(e.data.allSpinningSpots||[]),C(e.data);var o=e.data.layout;if(!o)return A("Something went wrong with the spot booking"),u.replace({pathname:u.pathname,query:w(w({},u.query),{},{error:"Something went wrong with the spot booking"})},void 0,{shallow:!0}),void I(!1);var s=JSON.parse(o),a=null===(t=s.seats)||void 0===t||null===(n=t.sections)||void 0===n||null===(i=n[0])||void 0===i||null===(r=i.subsections)||void 0===r?void 0:r.flatMap((function(e){return e.seats_by_rows}));if(re(a),g.current){var l=g.current.clientWidth||0,c=g.current.clientHeight||0,d=s.state.editor.exportViewport.width,f=(s.state.editor.exportViewport.height,l/d);H(f),R(f),U({x:l/2-d*(f-1),y:c/2/f})}setTimeout((function(){I(!1)}),300)}))}catch(q){I(!1),q instanceof Error&&N({msg:q.message,type:"fail"})}case 1:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}();return q?(0,v.jsx)("div",{className:"flex h-screen w-screen items-center justify-center text-rose-500 ",children:q}):(0,v.jsxs)(v.Fragment,{children:[P&&(0,v.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-white",children:(0,v.jsx)(m.Z,{width:"200px",height:"200px"})}),(0,v.jsxs)("div",{className:(0,x.Z)("h-screen min-h-screen min-w-full overflow-hidden rounded-lg",P&&"opacity-0"),children:[(0,v.jsxs)("div",{className:"relative mb-5 flex flex-grow flex-col rounded-md  border-solid border-[#
1E1E3E8] bg-white",children:[(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"fixed right-12 top-0 z-[1] flex items-center gap-x-2 pb-4 pr-4 pt-6",children:[(0,v.jsxs)("div",{className:" flex flex-row items-center justify-center gap-x-2",children:[(0,v.jsx)("div",{className:"h-5 w-5 rounded-full border border-solid border-[#999999] bg-white"}),(0,v.jsx)("span",{className:"text-[10px] text-[#1F1F1F]",children:"Available"})]}),(0,v.jsxs)("div",{className:"flex flex-row items-center justify-center gap-x-2",children:[(0,v.jsx)("div",{className:"h-5 w-5 rounded-full border  border-solid border-[transparent] bg-[#E1E3E8]"}),(0,v.jsx)("span",{className:"text-[10px] text-[#1F1F1F]",children:"Taken"})]})]}),(0,v.jsx)("div",{className:"fixed left-4 top-4 z-[1] mb-5 flex justify-center gap-x-2 ",children:(0,v.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,v.jsx)("button",{className:"flex flex-col items-center",onClick:function(){return he("increase")},disabled:2===z,children:(0,v.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-[0px_1px_4px_0px_rgba(0,0,0,0.2),0px_1px_4px_0px_rgba(0,0,0,0.25)] ".concat(2===z?"cursor-not-allowed opacity-50":"cursor-pointer opacity-100"),children:(0,v.jsx)(h.R1,{})})}),(0,v.jsx)("button",{className:"flex flex-col items-center",onClick:function(){return he("decrease")},disabled:.8===z,children:(0,v.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-[0px_1px_4px_0px_rgba(0,0,0,0.2),0px_1px_4px_0px_rgba(0,0,0,0.25)] ".concat(.8===z?"cursor-not-allowed opacity-50":"cursor-pointer opacity-100"),children:(0,v.jsx)(h.dZ,{})})})]})}),(0,v.jsx)("div",{className:"fixed right-4 top-4 z-[1] mb-5 flex justify-center ",children:(0,v.jsx)("div",{className:"flex select-none items-center justify-center ".concat(K?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:K?void 0:function(){pe([]),te([]),Q(!0),xe(localStorage.getItem("iframe-token")||k||"",M,Z),setTimeout((function(){Q(!1)}),2e3)},style:{animation:K?"spin 1s linear infinite":"none",transformOrigin:"center"},children:(0,v.jsx)(c.Z,{})})})]}),b?(0,v.jsx)("div",{className:"h-[calc(100vh-60px)] flex-grow",ref:g,children:(0,v.jsx)(j,{layout:b,selectedSeats:ee,setSelectedSeats:function(e){te(e),pe(e)},scaleX:z,scaleY:X,position:Y,handleDragMove:function(e){U({x:e.target.x(),y:e.target.y()})},handleScaleChange:he,height:(null===(d=g.current)||void 0===d?void 0:d.clientHeight)||500,bookedSpotBookings:ue,availibleSpots:ce,disabledByForced:fe,maxBookingLimitPerClass:null===L||void 0===L?void 0:L.maxBookingLimitPerClass,setPosition:U,isLoading:P})}):(0,v.jsx)("div",{className:"h-full flex-grow"})]}),(0,v.jsx)("input",{type:"hidden",value:JSON.stringify(ee),name:"selected_seat_list"})]})]})},b=function(){return(0,v.jsx)("div",{children:(0,v.jsx)(y,{})})}},13959:function(e,t,n){"use strict";var i=n(67162),r=(n(67294),n(31096)),o=n(67288),s=n(85893);t.Z=function(e){var t=e.width,n=void 0===t?"140px":t,r=e.height,l=void 0===r?"140px":r,c=e.color,d=void 0===c?"":c,u=e.className,f=(0,i.vH)().textColor,p=d||f;return(0,s.jsx)(a,{fillColor:p,className:u,children:(0,s.jsx)(o.nI,{style:{width:n,height:l},src:"/lotties/loadingAnimation.lottie",loop:!0,autoplay:!0})})};var a=r.ZP.div.withConfig({displayName:"loading__Wrapper",componentId:"sc-i8pai6-0"})(["path{fill:",";}"],(function(e){return e.fillColor}))},12788:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/spot-booking/[id]",function(){return n(59310)}])}},function(e){e.O(0,[9774,2888,179],(function(){return t=12788,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.