1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8946],{8946:function(e,t,n){n.r(t);var s=n(5893),a=n(8278),r=n(7294),l=n(1163),c=n(5152),i=n.n(c),u=n(5829);let p=i()(()=>n.e(7105).then(n.bind(n,8295)),{loadableGenerated:{webpack:()=>[8295]},ssr:!1});t.default=function(e){let{selectedPlan:t}=e,{locale:n,t:c}=(0,a.b)(),[i,o]=(0,r.useState)({error:null,results:[]}),[_,d]=(0,r.useState)(0),[m,x]=(0,r.useState)(0),[h,j]=(0,r.useState)(""),[N,y]=(0,r.useState)(""),[f,g]=(0,r.useState)(""),[S,v]=(0,r.useState)(""),[b,w]=(0,r.useState)(null),[q,F]=(0,r.useState)(null),k=(0,l.useRouter)(),E=k.query;(0,r.useEffect)(()=>{if(k.isReady){let e=parseInt(k.query.men_num),t=parseInt(k.query.women_num),n=k.query.cin_date,s=k.query.cin_time,a=k.query.cout_time,r=k.query.property_ids,l=k.query.campaign_code;d(e),x(t),j(n),g(s),v(a),void 0!=l&&w(l),R("nap",e,t,n,s,a,r,l)}},[E,k]);let R=async(e,t,n,s,a,r,l,c)=>{var p="https://api.we.ninehours.co.jp";p+="/reservation/search/".concat(e,"/").concat(t,"/").concat(n,"/").concat(s,"/").concat(a,"/").concat(r);let _={property_ids:l};c&&(_.campaign_code=c),p+="?"+(0,u.o)(_);let d=await fetch(p),m=await d.json();if(200!=d.status)return o({...i,error:!0});o({...i,error:!1,results:m.properties}),F(m.campaign)};return null==i.error?void 0:i.error?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"p-plan__resulttext",children:(0,s.jsxs)("h2",{className:"p-plan__resulttext__title",children:[c.plan.text.notFound1,(0,s.jsx)("br",{}),c.plan.text.notFound2]})})}):Object.keys(i.results).length>0?q?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"p-plan__resulttext",children:[(0,s.jsx)("h2",{className:"p-plan__resulttext__title",children:q.name}),(0,s.jsx)("p",{className:"p-plan__resulttext__summary",children:q.desc})]}),(0,s.jsx)("div",{className:"p-plan__locations",children:(0,s.jsx)(p,{properties:i.results,menNum:_,womenNum:m,cinDate:h,cinTime:f,coutTime:S,selectedPlan:t,campaign:q})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"p-plan__resulttext",children:(0,s.jsx)("h2",{className:"p-plan__resulttext__title",children:c.plan.text.BestRate})}),(0,s.jsx)("div",{className:"p-plan__locations",children:(0,s.jsx)(p,{properties:i.results,menNum:_,womenNum:m,cinDate:h,cinTime:f,coutTime:S,selectedPlan:t,campaign:q})})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"p-plan__resulttext",children:(0,s.jsxs)("h2",{className:"p-plan__resulttext__title",children:[c.plan.text.notFound1,(0,s.jsx)("br",{}),c.plan.text.notFound2]})})})}},5829:function(e,t,n){n.d(t,{o:function(){return s}});let s=e=>{let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,s]=e;Array.isArray(s)?s.forEach(e=>t.append("".concat(n,"[]"),String(e))):t.append(n,String(s))}),t.toString()}}}]);
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.