PageSourceSearch

https://meetsmore.com/assets/BookingPage-DPopdNHM.js

js meetsmore.com collected 2026-09-24 09:07:57 UTC 10,611 bytes, 1 lines download raw bytes

1import{d as v,j as n,L as b,ck as O,af as W,ag as H,g as p,c0 as Z,gO as ee,o as ne,f as te,e as ie,bh as oe,u as C,ar as se,r as g,ic as re,g4 as ae,W as le,aO as de,cl as j,C as ce,bm as pe,ec as me,R as ue,id as he,eC as xe,ie as fe,m as be,ig as ge,ih as ye,ii as je,ij as ke,a3 as we}from"./index-DkpLsOxt.js";import{P as Se,V as Te}from"./Videocam-DpLyWgT4.js";import{P as Ce}from"./Phone-24HdaSau.js";import{C as Ne}from"./CalendarField-BgBcKqgb.js";import{P as L}from"./PhoneLink-DuXOLVXT.js";import{R as ve}from"./RadioGroupInput-Az1jMb4r.js";import{i as Ee}from"./schedule-B7IetPKQ.js";import{g as Fe}from"./dayjs-CI2TTiVT.js";import"./charge-BRyOoeLr.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"23d597f"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(i){for(var o=1;o<arguments.length;o++){var l=arguments[o];if(l!=null)for(var d in l)l.hasOwnProperty(d)&&(i[d]=l[d])}return i})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:meetsmore-web-app-key":!0});var s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="46cdaeb0-9342-4a15-8c66-dad68222e814",e._sentryDebugIdIdentifier="sentry-dbid-46cdaeb0-9342-4a15-8c66-dad68222e814")}catch{}})();const y=(e,s)=>{if(!e||!s)return null;const i=s.includes("翌日"),o=v(e).add(i?1:0,"day");return v(`${o.format("YYYY-MM-DD")} ${s.replace("翌日","")}`,"YYYY-MM-DD HH:mm").toDate()},N=[{validate:()=>{}},{validate:e=>e.day?void 0:{day:"必須項目です"}},{validate:e=>!e.time||!e.time.start||!e.time.end?{time:"必須項目です"}:void 0},{validate:(e,s)=>{var i,o,l,d;if(e.type==="phone"){if(!((i=e.info)!=null&&i.phone))return{info:{phone:"必須項目です"}}}else if(e.type==="online"){const t=ye(((o=e.info)==null?void 0:o.url)??"").url;if(t)return{info:{url:t}}}else if(p(s)===p((l=e.info)==null?void 0:l.owner)&&!((d=e.info)!=null&&d.address))return{info:{address:"必須項目です"}}}}],Pe=["phone","online","consulting","job"],Ie=e=>Pe.some(s=>s===e),De=e=>({phone:{key:"phone",label:"電話相談",icon:n.jsx(Ce,{}),title:"電話相談の日程を登録する",selectJobSchedulesActionTitle:"依頼者が電話相談の候補日を設定しています!空き日程を伝えましょう"},online:{key:"online",label:"Web相談",icon:n.jsx(Te,{}),title:"Web相談の日程を登録する",selectJobSchedulesActionTitle:"依頼者がWeb相談の候補日を設定しています!空き日程を伝えましょう"},consulting:{key:"consulting",label:e,icon:n.jsx(Se,{}),title:`${e}の日程を登録する`,selectJobSchedulesActionTitle:`依頼者が${e}の候補日を設定しています!空き日程を伝えましょう`},job:{key:"job",label:"仕事の日程",icon:n.jsx(fe,{}),title:"仕事の日程を登録する",selectJobSchedulesActionTitle:""},[void 0]:{key:"",label:"",icon:"",title:"",selectJobSchedulesActionTitle:""}}),Ae=be(e=>({root:{},header:{background:e.palette.common.white,borderBottom:`1px solid ${e.palette.grey[300]}`},head:{width:"90%",maxWidth:600,height:50,margin:"0 auto",padding:10,display:"flex",alignItems:"center",[e.breakpoints.down("sm")]:{width:"100%"}},main:{flex:1,maxWidth:480,width:"90%",margin:"30px auto",[e.breakpoints.down("sm")]:{width:"100%"}},calHeader:{background:e.palette.common.white,display:"flex",alignItems:"center",height:50},calendar:{margin:"30px 0",background:e.palette.common.white,border:`1px solid ${e.palette.grey[300]}`,[e.breakpoints.down("sm")]:{borderLeft:0,borderRight:0}},timePicker:{padding:10},block:{width:"100%",margin:"30px 0",padding:20,background:e.palette.common.white,border:`1px solid ${e.palette.grey[300]}`,[e.breakpoints.down("sm")]:{padding:10,borderLeft:0,borderRight:0}},subtitle:{fontSize:16,fontWeight:"bold",margin:"20px 10px 10px"},notice:{textAlign:"center",fontSize:12,color:e.palette.grey[500],[e.breakpoints.down("sm")]:{margin:"0px 10px"}},warning:{fontSize:12,color:we[500]},typeActions:{display:"flex",flexDirection:"column",alignItems:"center"},typeButton:{margin:8,width:"100%",maxWidth:320,textAlign:"center"},timeBox:{display:"flex",flexWrap:"wrap",padding:5},hourButton:{width:"23%",margin:5,lineHeight:"34px",padding:0,[e.breakpoints.down("sm")]:{width:"46%"}},phoneField:{margin:"16px 8px 8px"},phone:{display:"inline",fontSize:16}}
1)),Qe=()=>{var B;const e=Ae(),s=ne(),i=te(),o=ie(),l=oe(),d=C(r=>r.auth.user),t=C(r=>r.meet.meetForPro),h=C(r=>r.runtimeConfig.runtimeConfigs),x=se.parse(i.search,{ignoreQueryPrefix:!0}).type,[m,F]=g.useState(x?1:0),[P,I]=g.useState([]),[Y,$]=g.useState({type:x,day:null,time:{start:null,end:null},info:{owner:p(d)}});g.useEffect(()=>{l.id&&s(re(l.id)).then(r=>{x&&r.meetForPro&&D({type:x,info:null},r.meetForPro)})},[]);const D=(r,a)=>{var u;const c=(u=a.request)==null?void 0:u.onsiteEstimationEnabled;if(Ee({onsiteEstimationEnabled:c,schedule:r})){const w=p(a.customer);$(f=>({...f,info:{...f.info,owner:w}}))}},A=()=>{F(r=>r+1)},z=r=>{if(!t)return;const{schedule:a}=t;if(r==="job"&&a){o(`/pros/schedules/${p(a)}/edit`);return}D({type:r,info:a==null?void 0:a.info},t),A()},V=r=>{let a={};for(const c of N){const u=c.validate(r,d);u&&(a={...a,...u})}return a},q=(r,a)=>a&&je(a.request)?!0:r==="consulting"&&!!(a!=null&&a.externalContactedAt||a!=null&&a.displayPhone),J=r=>{if(!t)return;const a=q(r.type,t)?"accept":"pending",c=y(r.day,r.time.start),u=y(r.day,r.time.end);return s(ge({...r,user:p(t.pro),meet:p(t),status:a,startTime:c,endTime:u})).then(()=>{o(i.pathname.replace(/\/booking/,""))})},K=ae((B=t==null?void 0:t.service)==null?void 0:B.wordings).consulting,k=De(K),M=le("onsiteEstimation.newHard.enabled",h);return t?n.jsxs("div",{className:e.root,children:[n.jsx(de,{children:n.jsx("title",{children:"予約作成"})}),n.jsx("div",{className:e.header,children:n.jsxs("div",{className:e.head,children:[(m>1||m===1&&!x)&&n.jsxs(j,{onClick:()=>F(m-1),children:[n.jsx(ce,{}),"戻る"]}),n.jsx("div",{style:{flex:"1 1 auto"}}),n.jsx(pe,{to:i.pathname.replace(/\/booking/,""),children:n.jsx(j,{style:{minWidth:40},children:n.jsx(me,{})})})]})}),n.jsx(ue,{validate:V,initialValues:Y,onSubmit:J,children:({form:r,submitting:a,values:c,handleSubmit:u})=>{var R;const w=((R=c.info)==null?void 0:R.owner)!==p(t.customer),f=m===N.length-(!w&&t.request.onsiteEstimationEnabled?2:1),S=m>0?k[c.type]:{title:"スケジュールを登録する"},U=!!N[m].validate(c),G=c.time?y(c.day,c.time.start):null,Q=c.time?y(c.day,c.time.end):null,T={startTime:G,endTime:Q};return n.jsxs("form",{className:e.main,children:[n.jsx("div",{style:{margin:10,fontSize:16,fontWeight:"bold",textAlign:"center"},children:S==null?void 0:S.title}),m===0?n.jsx("div",{className:e.block,children:n.jsx(qe,{bookingTypes:he({request:t.request,meet:t})?{job:k.job}:k,name:"type",classes:e,onClick:z})}):m===1?n.jsx("div",{className:e.block,children:n.jsx(Ne,{name:"day",answers:P,onClick:I,limitRecentDay:M&&xe(t.request)&&q(c.type,t)?-30:0})}):m===2?n.jsx("div",{className:e.block,children:n.jsx(Be,{name:"time",classes:e,answers:P,service:t==null?void 0:t.service,onClick:I})}):m===3&&c.type==="phone"?n.jsxs("div",{className:e.block,children:[n.jsx(He,{name:"info.owner",classes:e,scheduleRange:T,meet:t}),n.jsx(Le,{name:"info.phone",form:r,info:c.info,classes:e,meet:t})]}):m===3&&c.type==="online"?n.jsx("div",{className:e.block,children:n.jsx(We,{name:"info.url",classes:e,scheduleRange:T})}):m===3?n.jsx("div",{className:e.block,children:n.jsx(Re,{name:"info.address",classes:e,scheduleRange:T})}):null,m>0&&n.jsx("div",{className:"mx-md flex md:mx-0",children:n.jsx(j,{variant:"contained",color:"primary",type:"submit",style:{flex:1,height:45},onClick:f?u:X=>{X.preventDefault(),A()},disabled:U||a,children:f?"送信する":"次へ"})})]})}})]}):null},qe=({name:e,bookingTypes:s,onClick:i,classes:o})=>n.jsx(b,{name:e,component:({input:{onChange:l}})=>n.jsx("div",{className:o.typeActions,children:Object.entries(s).filter(d=>Ie(d[0])).map(([d,t])=>n.jsxs(j,{variant:"outlined",color:"primary",size:"large",className:o.typeButton,onClick:()=>{l(d),i(d)},children:[t.icon,t.label]},d))})}),Be=({name:e,answers:s,service:i,onClick:o,classes:l})=>n.jsx(b,{name:e,render:({input:{onChange:d}})=>n.jsx(ke,{dates:s,rootClass:l.timePicker,subType:"duration",service:i,onChange:t=>{const h=t[0];d({start:h.start,end:h.end?h.end:null}),o(t)}})}),Re=({name:e,scheduleRange:s,classes:i})=>n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:i.subtitle,children:["どこで会いますか?",n.jsx(E,{scheduleRange:s})]}),n.jsx("div",{children:n.jsx(b,{name:e,placeholder:"105-0011 東京都港区芝公園4-2−8",component:O})})]}
1),We=({name:e,scheduleRange:s,classes:i})=>n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:i.subtitle,children:["ご指定のURLがあれば入力してください",n.jsx(E,{scheduleRange:s})]}),n.jsx(b,{name:e,component:O})]}),He=({name:e,scheduleRange:s,meet:i,classes:o})=>{const l=!i.request.phone||i.request.phone==="なし";return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:o.subtitle,children:["どちらが電話をしますか?",n.jsx(E,{scheduleRange:s})]}),n.jsxs(b,{name:e,component:ve,children:[n.jsx(W,{value:p(i.customer),control:n.jsx(H,{color:"primary"}),disabled:l,label:"自分が電話をする"}),l&&n.jsx("span",{className:o.warning,children:"依頼者が電話番号を登録していないため、依頼者に電話をしてもらってください"}),n.jsx(W,{value:p(i.pro),control:n.jsx(H,{color:"primary"}),label:"依頼者に電話してもらう"})]})]})},E=({scheduleRange:e})=>{if(!e)return null;const{startTime:s,endTime:i}=e;if(!s||!i)return null;const o=v(s);return n.jsxs("p",{style:{fontSize:14},children:["日時:",o.format("M/D")," ",ee[o.weekday()]," ",o.format("H:mm")," ","- ",Fe(s,i,"H:mm")]})},_=()=>{},Le=({form:e,name:s,info:i,meet:o,classes:l})=>n.jsxs(n.Fragment,{children:[n.jsx(Z,{subscription:{values:!0},onChange:({values:d})=>{var t;return e.change(s,p((t=d.info)==null?void 0:t.owner)===p(o.customer)?o.request.phone:o.pro.phone)}}),n.jsxs("div",{className:l.phoneField,children:["電話番号:"," ",p(i==null?void 0:i.owner)===
1p(o.customer)?n.jsx(L,{className:l.phone,onClick:_,phone:o.request.phone,hiddenText:"後ほど表示できるようになります",disableCall:!0}):n.jsx(L,{className:l.phone,onClick:_,phone:o.pro.phone,disableCall:!0})]})]});export{Re as AddressField,He as OwnerField,Le as PhoneField,E as ScheduleRangeHeader,We as UrlField,Qe as default,De as getBookingType};

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.