1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1891],{86943:function(t,e,i){Promise.resolve().then(i.bind(i,85254))},37131:function(t,e,i){"use strict";var s=i(57437),n=i(36760),r=i.n(n);e.Z=t=>{let{children:e,className:i="",useMinHeight:n=!0}=t;return(0,s.jsx)("div",{className:r()("relative flex flex-col w-full rounded-xl bg-subbackground-light dark:bg-background-dark",{"min-h-[calc(100dvh-200px)] space-y-3 md:space-y-5 px-4 py-4 md:mt-5 md:px-8 md:py-7":n,"p-4":!n},i),children:e})}},91028:function(t,e,i){"use strict";var s=i(57437),n=i(44641),r=i(37062);e.Z=t=>{let{title:e,children:i,className:a="",size:o="xl"}=t;return(0,s.jsxs)("div",{className:(0,r.cn)("w-full flex flex-col sm:flex-row justify-between items-start sm:items-start border-b custom-border pb-3",a),children:[(0,s.jsx)("div",{className:"min-w-fit",children:(0,s.jsx)(n.Z,{size:o,semibold:!0,children:e})}),i&&(0,s.jsx)("div",{className:"flex justify-end w-full",children:i})]})}},39816:function(t,e,i){"use strict";var s=i(57437),n=i(44641),r=i(26047),a=i(4324),o=i(22202),l=i(94017),u=i(72766),c=i(36760),h=i.n(c),d=i(27648),p=i(99376);e.Z=t=>{let{route:e,isExpanded:i,onClick:c=null,padding:f="px-2 py-3"}=t,m=(0,p.usePathname)(),v=(0,p.useRouter)(),g=(0,r.Z)(),{outletType:b}=(0,o.pA)(),{handleCloseSidebarDrawer:x}=(0,l.N)(),{shouldBlock:y,message:w}=(0,a.V)(),k=(t,e,i)=>{t.preventDefault(),y?g.open({title:"Konfirmasi",message:w,isShowCancelBtn:!0,isShowConfirmBtn:!0,cancelBtnText:"Batal",confirmBtnText:"Ya",onConfirm:()=>{g.close(),i?c(e):(x(),v.push(e.path))},onCancel:g.close}):i?c(e):(x(),v.push(e.path))};return(0,s.jsx)("ul",{className:h()("overflow-hidden custom-transition md:ml-10",{"max-h-fit":i,"max-h-0":!i}),children:e.map((t,e)=>{var i;let r=!(null===(i=t.types)||void 0===i?void 0:i.includes(b)),a=m===t.path,o=(0,s.jsxs)("div",{onClick:e=>k(e,t,r),className:h()("cursor-pointer w-full h-full rounded-lg flex items-center justify-between gap-x-3 md:p-2",f,{"hover:bg-gray-100 hover:dark:bg-disable-dark hover:dark:bg-opacity-30 custom-transition":!a,"bg-[#E6F8FF] dark:bg-[#224766]":a}),children:[(0,s.jsx)(n.Z,{color:r?"disable":a?"blue":"default",children:t.name}),r&&(0,s.jsx)(u.Z,{size:14,color:"red"})]});return(0,s.jsx)("li",{children:r?(0,s.jsx)("div",{children:o}):(0,s.jsx)(d.default,{href:t.path,children:o})},e)})})}},85254:function(t,e,i){"use strict";var s=i(57437),n=i(21533),r=i(36760),a=i.n(r),o=i(2265),l=i(39816),u=i(44641),c=i(26047),h=i(28636),d=i(64850),p=i(6986),f=i(99376),m=i(91028),v=i(37131);let g=t=>{let{router:e,routes:i,prefix:r,activeParent:o,toggleParent:h}=t,f=(0,c.Z)(),m=t=>{f.open({title:"Layanan Tidak Tersedia",cancelBtnText:"Tutup",confirmBtnText:"Upgrade",image:d.Y_.blockImage,message:"Upgrade ke Paket ".concat((0,p.Ls)(t.types[0])," untuk dapat menggunakan layanan ini."),onConfirm:()=>e.push("/beli-masa-aktif/upgrade-paket")})};return(0,s.jsx)("div",{className:"w-full flex flex-col gap-y-3 md:w-1/2",children:null==i?void 0:i.map((t,i)=>{let c="".concat(r,"-").concat(i),d=o===c;return t.children?(0,s.jsx)("div",{className:"flex flex-col col-span-12 md:col-span-6",children:(0,s.jsxs)("li",{className:"list-none flex-grow rounded-lg overflow-hidden bg-background-light dark:bg-subbackground-dark",children:[(0,s.jsxs)("button",{onClick:()=>h(c),className:"flex items-center justify-between w-full p-4 text-left hover:bg-disable-soft dark:hover:bg-disable-soft dark:hover:bg-opacity-10 transition-all",children:[(0,s.jsx)(u.Z,{icon:t.nonActiveIcon,iconPosition:"left",semibold:d,children:t.name}),(0,s.jsx)(n.Z,{className:a()("w-5 h-5 transform transition-transform dark:text-secondary-dark",{"-rotate-180":d})})]}),(0,s.jsx)(l.Z,{padding:"px-4 py-3",route:t.children,isExpanded:d,onClick:m})]})},c):(0,s.jsx)("div",{className:"flex flex-col col-span-12 md:col-span-6",children:(0,s.jsx)("li",{className:"list-none flex-grow rounded-lg overflow-hidden bg-background-light dark:bg-subbackground-dark",children:(0,s.jsx)("button",{onClick:()=>{t.path?e.push(t.path):m(t)},className:"flex items-center justify-between w-full p-4 text-left hover:bg-disable-soft dark:hover:bg-disable-soft dark:hover:bg-opacity-10 transition-all",children:(0,s.jsx)(u.Z,{icon:t.nonActiveIcon,iconPosition:"left",children:t.name})})})},c)})})};e.default=t=>{var e;let{page:i,index:n}=t,[r,a]=(0,o.useState)(null),[l,u]=(0,o.useState)(null),c=(0,h.Z)(l),d=(0,f.useRouter)(),p=t=>{a(r===t?null:t)},b=null===(e=c[n])||void 0===e?void 0:e.routes,x=Math.ceil((null==b?void 0:b.length)/2),y=null==b?void 0:b.slice(0,x),w=null==b?void 0:b.slice(x);return(0,o.useEffect)(()=>{let t=localStorage.getItem("authData");t&&u(JSON.parse(t))},[]),(0,s.jsxs)(v.Z,{children:[(0,s.jsx)(m.Z,{title:i,className:"hidden md:block"}),(0,s.jsxs)("div",{className:"w-full h-full flex flex-col md:flex-row gap-3",children:[(0,s.jsx)(g,{routes:y,prefix:"L",router:d,activeParent:r,toggleParent:p}),(0,s.jsx)(g,{routes:w,prefix:"R",router:d,activeParent:r,toggleParent:p})]})]})}}
1,26047:function(t,e,i){"use strict";let s=(0,i(3011).U)(t=>({isOpen:!1,title:"",message:"",onConfirm:()=>{},onCancel:null,cancelBtnText:"Tidak",confirmBtnText:"Ya",isShowConfirmBtn:!0,isShowCancelBtn:!0,image:null,open:e=>t({isOpen:!0,...e}),close:()=>t({isOpen:!1,title:"",message:"",onConfirm:()=>{},onCancel:null,cancelBtnText:"Tidak",confirmBtnText:"Ya",isShowConfirmBtn:!0,isShowCancelBtn:!0,image:null})}));e.Z=s},4324:function(t,e,i){"use strict";i.d(e,{V:function(){return n},Z:function(){return r}});var s=i(2265);let n=(0,i(3011).U)(t=>({shouldBlock:!1,message:"",onConfirm:null,setBlock:function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return t({shouldBlock:e,message:i,onConfirm:s})},reset:()=>t({shouldBlock:!1,message:"",onConfirm:null})}));function r(t){let{condition:e,message:i,onConfirm:r=null}=t,a=n(t=>t.setBlock),o=n(t=>t.reset);(0,s.useEffect)(()=>{if(e){a(!0,i,r);let t=t=>{t.preventDefault(),t.returnValue=i||"Perubahan Anda belum disimpan. Yakin ingin keluar?"};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t),o()}}o()},[e,i,r,a,o])}},94017:function(t,e,i){"use strict";i.d(e,{A:function(){return u},N:function(){return l}});var s=i(3011),n=i(2265),r=i(99376),a=i(28636),o=i(91793);let l=(0,s.U)(t=>({isDrawerSidebarOpen:!1,activeParent:null,setIsDrawerSidebarOpen:e=>t({isDrawerSidebarOpen:e}),handleToggleSidebarDrawer:()=>t(t=>({isDrawerSidebarOpen:!t.isDrawerSidebarOpen})),handleCloseSidebarDrawer:()=>t({isDrawerSidebarOpen:!1}),toggleParent:e=>t(t=>({activeParent:t.activeParent===e?null:e}))})),u=()=>{let{authData:t}=(0,o.Z)(),e=(0,r.usePathname)(),i=(0,n.useRef)(null),s=l(t=>t.setIsDrawerSidebarOpen),u=l(t=>t.isDrawerSidebarOpen),c=l(t=>t.handleToggleSidebarDrawer),h=l(t=>t.handleCloseSidebarDrawer),d=l(t=>t.activeParent),p=l(t=>t.toggleParent),f=(0,n.useMemo)(()=>(0,a.Z)(t),[t]);return(0,n.useEffect)(()=>{if((null==f?void 0:f.length)>0&&e&&i.current!==e){i.current=e;let t=null;f.forEach((i,s)=>{i.routes.forEach((i,n)=>{i.children&&i.children.some(t=>{var i;let s=null===(i=t.path)||void 0===i?void 0:i.replace(/\/$/,"");return s&&e.includes(s)})&&(t="".concat(s,"-").concat(n))})}),t&&l.setState({activeParent:t})}},[e,f]),{isDrawerSidebarOpen:u,setSidebarOpen:s,handleToggleSidebarDrawer:c,handleCloseSidebarDrawer:h,activeParent:d,toggleParent:p,sidebarRoutes:f,authData:t}}},25523:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"RouterContext",{enumerable:!0,get:function(){return s}});let s=i(47043)._(i(2265)).default.createContext(null)},36760:function(t,e){var i;!function(){"use strict";var s={}.hasOwnProperty;function n(){for(var t="",e=0;e<arguments.length;e++){var i=arguments[e];i&&(t=r(t,function(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var i in t)s.call(t,i)&&t[i]&&(e=r(e,i));return e}(i)))}return t}function r(t,e){return e?t?t+" "+e:t+e:t}t.exports?(n.default=n,t.exports=n):void 0!==(i=(function(){return n}).apply(e,[]))&&(t.exports=i)}()},3243:function(t,e,i){"use strict";i.d(e,{Z:function(){return r}});var s=i(2265),n={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};let r=(t,e,i,r)=>{let a=(0,s.forwardRef)((i,a)=>{let{color:o="currentColor",size:l=24,stroke:u=2,title:c,className:h,children:d,...p}=i;return(0,s.createElement)("svg",{ref:a,...n[t],width:l,height:l,className:["tabler-icon","tabler-icon-".concat(e),h].join(" "),..."filled"===t?{fill:o}:{strokeWidth:u,stroke:o},...p},[c&&(0,s.createElement)("title",{key:"svg-title"},c),...r.map(t=>{let[e,i]=t;return(0,s.createElement)(e,i)}),...Array.isArray(d)?d:[d]])});return a.displayName="".concat(i),a}}
1,21533:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(3243).Z)("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]])},72766:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(3243).Z)("outline","lock","Lock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]])},62596:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});let s=(0,i(3243).Z)("outline","trash","Trash",[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]])},2894:function(t,e,i){"use strict";i.d(e,{R:function(){return o},m:function(){return a}});var s=i(18238),n=i(7989),r=i(11255),a=class extends n.F{#t;#e;#i;#s;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#i=t.mutationCache,this.#e=[],this.state=t.state||o(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#n({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=(0,r.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#n({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#n({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});let s="pending"===this.state.status,n=!this.#s.canStart();try{if(s)e();else{this.#n({type:"pending",variables:t,isPaused:n}),this.#i.config.onMutate&&await this.#i.config.onMutate(t,this,i);let e=await this.options.onMutate?.(t,i);e!==this.state.context&&this.#n({type:"pending",context:e,variables:t,isPaused:n})}let r=await this.#s.start();return await this.#i.config.onSuccess?.(r,t,this.state.context,this,i),await this.options.onSuccess?.(r,t,this.state.context,i),await this.#i.config.onSettled?.(r,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(r,null,t,this.state.context,i),this.#n({type:"success",data:r}),r}catch(e){try{await this.#i.config.onError?.(e,t,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onError?.(e,t,this.state.context,i)}catch(t){Promise.reject(t)}try{await this.#i.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,i)}catch(t){Promise.reject(t)}try{await this.options.onSettled?.(void 0,e,t,this.state.context,i)}catch(t){Promise.reject(t)}throw this.#n({type:"error",error:e}),e}finally{this.#i.runNext(this)}}#n(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),s.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#i.notify({mutation:this,type:"updated",action:t})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}}
1,21770:function(t,e,i){"use strict";i.d(e,{D:function(){return c}});var s=i(2265),n=i(2894),r=i(18238),a=i(24112),o=i(45345),l=class extends a.l{#t;#r=void 0;#a;#o;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#t.defaultMutationOptions(t),(0,o.VS)(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(e.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#l(),this.#u(t)}getCurrentResult(){return this.#r}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#l(),this.#u()}mutate(t,e){return this.#o=e,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(t)}#l(){let t=this.#a?.state??(0,n.R)();this.#r={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#u(t){r.Vr.batch(()=>{if(this.#o&&this.hasListeners()){let e=this.#r.variables,i=this.#r.context,s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,e,i,s)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(t.data,null,e,i,s)}catch(t){Promise.reject(t)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,e,i,s)}catch(t){Promise.reject(t)}try{this.#o.onSettled?.(void 0,t.error,e,i,s)}catch(t){Promise.reject(t)}}}this.listeners.forEach(t=>{t(this.#r)})})}},u=i(29827);function c(t,e){let i=(0,u.NL)(e),[n]=s.useState(()=>new l(i,t));s.useEffect(()=>{n.setOptions(t)},[n,t]);let a=s.useSyncExternalStore(s.useCallback(t=>n.subscribe(r.Vr.batchCalls(t)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),c=s.useCallback((t,e)=>{n.mutate(t,e).catch(o.ZT)},[n]);if(a.error&&(0,o.L3)(n.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:c,mutateAsync:a.mutate}}}}]);
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.