1"use strict";(self.webpackChunkdemoapp=self.webpackChunkdemoapp||[]).push([[176],{94412:(x,f,c)=>{c.d(f,{E:()=>t});const t=p=>0!==p.value?p.value&&/^\d+$/g.test(p.value.toString().replace(/ /g,""))?null:{isNumber:!0}:/^\d+$/g.test(p.value.toString().replace(/ /g,""))?null:{isNumber:!0}},68312:(x,f,c)=>{c.d(f,{h:()=>t});const t=p=>{var m;return/^[\u30a1-\u30f6\u30fc]*$/.test(null===(m=p.value)||void 0===m?void 0:m.toString())?null:{isZenkakuKana:!0}}},5198:(x,f,c)=>{c.d(f,{X:()=>a});var t=c(10467),p=c(34901),m=c(21413),b=c(60878);const k=function y(u,M){var v=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return v.length>=M?u.apply(null,v.slice(0,M).reverse()):function(){for(var d=arguments.length,l=new Array(d),h=0;h<d;h++)l[h]=arguments[h];return y(u,M,v.concat(l))}}(c(30691).A,2);var n=c(54438),_=c(60177);const g=()=>["\u6708","\u706b","\u6c34","\u6728","\u91d1","\u571f","\u65e5"],i=()=>[1,2,3,4,5],r=(u,M,v,d,l)=>({"c-calendar__sunday":u,"c-calendar__saturday":M,"c-calendar__weekdays":v,"c-calendar__day-open":d,"c-calendar__day-selected":l});function o(u,M){if(1&u&&(n.j41(0,"div",15),n.EFF(1),n.k0s()),2&u){const v=M.$implicit;n.R7$(),n.SpI(" ",v," ")}}function e(u,M){if(1&u){const v=n.RV6();n.j41(0,"div",16)(1,"span",17),n.bIt("click",function(){const l=n.eBV(v).$implicit,h=n.XpG();return n.Njj(h.setDay(l))}),n.EFF(2),n.k0s()()}if(2&u){const v=M.$implicit,d=n.XpG();n.R7$(),n.Y8G("ngClass",n.s1E(3,r,0===v.getDay(),6===v.getDay(),n.lJ4(2,i).includes(v.getDay()),d.open(v),d.datePipe.transform(v,"yyyyMMdd")===d.datePipe.transform(d.selectedDay,"yyyyMMdd"))),n.R7$(),n.SpI(" ",v.getDate()," ")}}let a=(()=>{var u;class M{constructor(d,l,h,O){this.reservationsService=d,this.dialogRef=l,this.datePipe=h,this.data=O,this.reservableDates=[],this.currentMonth=new Date,this.today=new Date,this.daysOfMonth=[],this.openDays=[],O?(this.year=O.year||(new Date).getFullYear(),this.month=O.month||(new Date).getMonth()+1,this.reservableDates=Array.isArray(O.reservableDates)?O.reservableDates:[],this.clinicId=O.clinicId,this.currentMonth=O.currentMonth||new Date,this.selectedDay=O.selectedDay):(console.warn("Dialog data is undefined, using default values"),this.year=(new Date).getFullYear(),this.month=(new Date).getMonth()+1)}ngOnInit(){this.onClose=new m.B,this.setCalendar(),this.today=new Date}open(d){return this.openDays.some(l=>l.getMonth()===d.getMonth()&&l.getDate()===d.getDate())}
1setCalendar(){const d=this.getLastMonday(this.year,this.month),l=this.year,h=this.month;this.daysOfMonth=[...Array(42).keys()].map(O=>new Date(d.getFullYear(),d.getMonth(),d.getDate()+O)),this.reservableDates&&Array.isArray(this.reservableDates)?this.openDays=this.reservableDates.map(O=>new Date(l,h-1,O)):(console.warn("reservableDates is undefined or not an array. Using empty array instead."),this.openDays=[])}setDay(d){this.open(d)&&(this.onClose.next(d),this.dialogRef.close(d))}isDisablePrevMonth(){return this.isLimitMonth(1)}isDisableNextMonth(){return this.isLimitMonth(3)}isLimitMonth(d){const l=k(d)(this.today);return l.getFullYear()===this.currentMonth.getFullYear()&&l.getMonth()===this.currentMonth.getMonth()}selectMonth(d){var l=this;return(0,t.A)(function*(){if(l.isDisableNextMonth()&&d>0||l.isDisablePrevMonth()&&d<0)return;l.currentMonth=new Date(l.currentMonth.getFullYear(),l.currentMonth.getMonth()+d,1);const h=yield l.reservationsService.getClinicReservableDateMonth({clinic_id:"krc"+l.clinicId,month:l.datePipe.transform(new Date(l.currentMonth.getFullYear(),l.currentMonth.getMonth()-1,1),"yyyyMM")});l.year=h.year,l.month=h.month,l.reservableDates=h.reservable_dates,l.setCalendar()})()}getLastMonday(d,l){try{if(!d||!l||isNaN(d)||isNaN(l))return console.warn("Invalid year or month values",{year:d,month:l}),new Date;let h=new Date(d,l-1,0);for(;1!=h.getDay();)h=new Date(h.getFullYear(),h.getMonth(),h.getDate()-1);return new Date(h.getFullYear(),h.getMonth(),h.getDate()+6).getMonth()==h.getMonth()&&(h=new Date(d,l-1,1)),h}catch(h){return console.error("Error in getLastMonday:",h),new Date}}}return(u=M).\u0275fac=function(d){return new(d||u)(n.rXU(b.Z),n.rXU(p.ce),n.rXU(_.vh),n.rXU(p.Qs))},u.\u0275cmp=n.VBU({type:u,selectors:[["app-reservation-calendar-modal"]],decls:18,vars:7,consts:[[1,"c-modal-form"],[1,"c-modal-form__wrapper"],[1,"c-modal-form__header"],[1,"c-modal-form__arrow",3,"click","disabled"],[1,"c-modal-form__arrow-left","far","fa-chevron-left"],[1,"c-modal-form__title"],[1,"c-modal-form__arrow-right","far","fa-chevron-right"],[1,"c-calendar"],[1,"c-calendar__week"],["class","c-calendar__week-cell",4,"ngFor","ngForOf"],[1,"c-calendar__days"],["class","c-calendar__days-cell",4,"ngFor","ngForOf"],[1,"modal-header","c-modal-form__close-header"],["type","button","aria-label","Close",1,"pull-right","c-modal-form__close",3,"click"],["aria-hidden","true"],[1,"c-calendar__week-cell"],[1,"c-calendar__days-cell"],[1,"c-calendar__day-close",3,"click","ngClass"]],template:function(d,l){1&d&&(n.j41(0,"div",0)(1,"div",1)(2,"header",2)(3,"button",3),n.bIt("click",function(){return l.selectMonth(-1)}),n.nrm(4,"i",4),n.k0s(),n.j41(5,"h2",5),n.EFF(6),n.k0s(),n.j41(7,"button",3),n.bIt("click",function(){return l.selectMonth(1)}),n.nrm(8,"i",6),n.k0s()(),n.j41(9,"div",7)(10,"div",8),n.DNE(11,o,2,1,"div",9),n.k0s(),n.j41(12,"div",10),n.DNE(13,e,3,9,"div",11),n.k0s()()(),n.j41(14,"div",12)(15,"button",13),n.bIt("click",function(){return l.dialogRef.close()}),n.j41(16,"span",14),n.EFF(17,"\u9589\u3058\u308b"),n.k0s()()()()),2&d&&(n.R7$(3),n.Y8G("disabled",l.isDisablePrevMonth()),n.R7$(3),n.Lme("",l.year,"\u5e74",l.month,"\u6708"),n.R7$(),n.Y8G("disabled",l.isDisableNextMonth()),n.R7$(4),n.Y8G("ngForOf",n.lJ4(6,g)),n.R7$(2),n.Y8G("ngForOf",l.daysOfMonth))},dependencies:[_.YU,_.Sq],styles:['.c-modal-form[_ngcontent-%COMP%]{background-color:#fff;border-radius:3px}.c-modal-form__close-header[_ngcontent-%COMP%]{padding:14px 0;display:flex;justify-content:center;border:0;border-top:1px solid rgba(0,0,0,.12)}.c-modal-form__close[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:-.7px;color:#49c2c2;opacity:1;background-color:#fff}.c-modal-form__wrapper[_ngcontent-%COMP%]{padding:24px 16px}.c-modal-form__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:24px}.c-modal-form__title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#000000b5;margin-bottom:12px}.c-modal-form__arrow[_ngcontent-%COMP%]{position:relative;width:50px;cursor:pointer;outline:none;background-color:transparent}.c-modal-form__arrow[_ngcontent-%COMP%]:disabled .c-modal-form__arrow-left[_ngcontent-%COMP%], .c-modal-form__arrow[_ngcontent-%COMP%]:disabled .c-modal-form__arrow-right[_ngcontent-%COMP%]{color:#00000030}.c-modal-form__arrow-left[_ngcontent-%COMP%], .c-modal-form__arrow-right[_ngcontent-%COMP%]{position:absolute;top:0;font-size:18px;color:#cab994}.c-modal-form__arrow-left[_ngcontent-%COMP%]{left:8px}.c-modal-form__arrow-right[_ngcontent-%COMP%]{right:8px}.c-calendar__week[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:12px}.c-calendar__week-cell[_ngcontent-%COMP%]{font-style:14px;font-weight:700;text-align:center}.c-calendar__days[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,1fr)}.c-calendar__days-cell[_ngcontent-%COMP%]{position:relative;height:28px;line-height:28px;font-size:14px;text-align:center;color:#0000007d;z-index:10}.c-calendar__sunday[_ngcontent-%COMP%]{color:#ce3a32}.c-calendar__saturday[_ngcontent-%COMP%]{color:#49c2c2}.c-calendar__weekdays[_ngcontent-%COMP%]{color:#000000b5}.c-calendar__day-close[_ngcontent-%COMP%]{opacity:.4}.c-calendar__day-open[_ngcontent-%COMP%]{opacity:1}.c-calendar__day-open[_ngcontent-%COMP%]:hover{color:#fff;cursor:pointer}.c-calendar__day-open[_ngcontent-%COMP%]:hover:before{content:"";position:absolute;top:-3px;left:50%;transform:translate(-50%);background-color:#cab994;width:32px;height:32px;border-radius:50%;z-index:-1}.c-calendar__day-selected[_ngcontent-%COMP%]{opacity:1;color:#fff;cursor:pointer}.c-calendar__day-selected[_ngcontent-%COMP%]:before{content:"";position:absolute;top:-3px;left:50%;transform:translate(-50%);background-color:#cab994;width:32px;height:32px;border-radius:50%;z-index:-1}']}),M})()},94756:(x,f,c)=>{c.d(f,{_:()=>g});var t=c(54438),p=c(34901),m=c(21413),b=c(60177);const C=i=>({"c-radio-btn-s--close":i});function y(i,r){if(1&i){const o=t.RV6();t.j41(0,"label",18)(1,"input",19),t.bIt("click",function(){t.eBV(o);const s=t.XpG().index,a=t.XpG();return t.Njj(a.selectStartSlot(s))}),t.k0s(),t.EFF(2),t.nrm(3,"span",20),t.k0s()}if(2&i){const o=t.XpG(),e=o.$implicit,s=o.index,a=t.XpG();t.Y8G("ngClass",t.eq3(5,C,!e.active))("id","start-"+s),t.R7$(),t.Y8G("disabled",!e.active)("checked",e.label==a.selectedStartLabel),t.R7$(),t.SpI("",e.label," ")}}function k(i,r){if(1&i&&(t.qex(0),t.DNE(1,y,4,7,"label",17),t.bVm()),2&i){const o=r.index,e=t.XpG();t.R7$(),t.Y8G("ngIf",e.startTimeIndex<=o+2&&e.endTimeIndex>=o+e.minimumSlots-2)}}function n(i,r){if(1&i){const o=t.RV6();t.j41(0,"label",18)(1,"input",21),t.bIt("click",function(){t.eBV(o);const s=t.XpG().index,a=t.XpG();return t.Njj(a.selectEndSlot(s))}),t.k0s(),t.EFF(2),t.nrm(3,"span",20),t.k0s()}if(2&i){const o=t.XpG(),e=o.$implicit,s=o.index,a=t.XpG();t.Y8G("ngClass",t.eq3(5,C,!e.active))("id","end-"+s),t.R7$(),t.Y8G("disabled",!e.active)("checked",e.label==a.selectedEndLabel),t.R7$(),t.JRh(e.label)}}function _(i,r){if(1&i&&(t.qex(0),t.DNE(1,n,4,7,"label",17),t.bVm()),2&i){const o=r.index,e=t.XpG();t.R7$(),t.Y8G("ngIf",e.startTimeIndex+e.minimumSlots<=o+2&&e.endTimeIndex>=o-2)}}let g=(()=>{var i;
1class r{constructor(e,s,a,u){this.dialogRef=e,this.datePipe=s,this.data=a,this.platformId=u,this.isBrowser=(0,b.UE)(this.platformId),this.slots=a.slots,this.minimumSlots=a.minimumSlots,this.selectDayText=a.selectDayText,this.reservableDate=a.reservableDate}ngOnInit(){this.onClose=new m.B;const e=new Date;if(this.datePipe.transform(this.reservableDate,"yyyyMMdd")==this.datePipe.transform(new Date(e.getFullYear(),e.getMonth(),e.getDate()),"yyyyMMdd")){console.log(this.datePipe.transform(e,"HH:mm"));for(let s=0;this.slots[s].label<this.datePipe.transform(e,"HH:mm");s++)this.slots[s].active=!1}this.resetStartSlots(),this.resetEndSlots(),this.startTimeIndex=this.slots.findIndex(s=>s.active),this.endTimeIndex=-1*(JSON.parse(JSON.stringify(this.slots)).reverse().findIndex(s=>s.active)-this.slots.length)-1}resetStartSlots(){this.startSlots=JSON.parse(JSON.stringify(this.slots));for(let e=0;e<this.slots.length;e++)if(!this.slots[e].active){let s=this.minimumSlots;for(;s--;)this.slots[e-s]&&(this.startSlots[e-s].active=!1)}}resetEndSlots(){this.endSlots=JSON.parse(JSON.stringify(this.slots));for(let s=this.slots.length-1;s>=0;s--){var e;!this.slots[s].active&&null!==(e=this.slots[s-1])&&void 0!==e&&e.active&&(this.endSlots[s].active=!0)}for(let s=0;s<this.slots.length;s++)if(this.slots[s].active){let a=this.minimumSlots;for(;a--;)this.endSlots[s+a].active=!1;break}}selectStartSlot(e){this.resetEndSlots(),this.selectedStartLabel=this.startSlots[e].label;let s=0;for(let u=0;u<this.minimumSlots;u++)this.endSlots[u+e]&&(this.endSlots[u+e].active=!1);for(;s<e;)this.endSlots[s].active=!1,s++;if(this.selectCheck(),this.isBrowser){var a;const u=document.getElementById("end-slots"),M=$("#end-"+this.endSlots.findIndex(d=>d.active)),v=u.scrollTop+(null===(a=M.position())||void 0===a?void 0:a.top);u.scrollTo({top:v,behavior:"smooth"})}}selectEndSlot(e){this.resetStartSlots(),this.selectedEndLabel=this.endSlots[e].label;for(let a=this.minimumSlots-1;a>0;a--)this.startSlots[e-a]&&(this.startSlots[e-a].active=!1);for(let a=e;a<this.startSlots.length;a++)this.startSlots[a].active=!1;this.selectCheck()}selectCheck(){if(this.selectedStartLabel&&this.selectedEndLabel){const e={startLabel:this.selectedStartLabel,endLabel:this.selectedEndLabel};this.onClose.next(e),this.dialogRef.close(e)}}fullTime(){this.selectedStartLabel=this.startSlots.find(s=>s.active).label,this.selectedEndLabel=this.endSlots.reverse().find(s=>s.active).label;const e={startLabel:this.selectedStartLabel,endLabel:this.selectedEndLabel};this.onClose.next(e),this.dialogRef.close(e)}}return(i=r).\u0275fac=function(e){return new(e||i)(t.rXU(p.ce),t.rXU(b.vh),t.rXU(p.Qs),t.rXU(t.Agw))},i.\u0275cmp=t.VBU({type:i,selectors:[["app-reservation-time-slot-modal"]],decls:29,vars:3,consts:[[1,"c-modal-form"],[1,"c-modal-form__wrapper"],[1,"c-modal-form__header"],[1,"c-modal-form__title"],[1,"c-time-slot"],[1,"c-time-slot__title"],[1,"c-time-slot__wrapper"],[1,"c-time-slot__column"],["id","start-slots",1,"c-time-slot__column-inner"],[4,"ngFor","ngForOf"],[1,"c-time-slot__column-middle"],["id","end-slots",1,"c-time-slot__column-inner"],[1,"c-time-slot__btn-all-day",3,"click"],[1,"c-modal-form__note"],[1,"modal-header","c-modal-form__close-header"],["type","button","aria-label","Close",1,"pull-right","c-modal-form__close",3,"click"],["aria-hidden","true"],["class","c-radio-btn-s",3,"ngClass","id",4,"ngIf"],[1,"c-radio-btn-s",3,"ngClass","id"],["type","radio","name","start-time",3,"click","disabled","checked"],[1,"c-radio-btn-s__checkmark"],["type","radio","name","end-time",3,"click","disabled","checked"]],template:function(e,s){1&e&&(t.j41(0,"div",0)(1,"div",1)(2,"header",2)(3,"h2",3),t.EFF(4,"\u5e0c\u671b\u3059\u308b\u6642\u9593\u5e2f\u306e\u8a2d\u5b9a"),t.k0s()(),t.j41(5,"section",4)(6,"h3",5),t.EFF(7),t.k0s(),t.j41(8,"div",6)(9,"div",7)(10,"div",8),t.DNE(11,k,2,1,"ng-container",9),t.k0s()(),t.j41(12,"div",10),t.EFF(13,"\u301c"),t.k0s(),t.j41(14,"div",7)(15,"div",11),t.DNE(16,_,2,1,"ng-container",9),t.k0s()()(),t.j41(17,"div",12),t.bIt("click",function(){return s.fullTime()}),t.EFF(18,"\u7d42\u65e5\u53ef\u80fd"),t.j41(19,"span"),t.EFF(20,"\uff08\u55b6\u696d\u6642\u9593\u5185\u3067\u8a2d\u5b9a\u3055\u308c\u307e\u3059\uff09"),t.k0s()()(),t.j41(21,"p",13),t.EFF(22," \u203b\u6700\u4f4e2\u6642\u9593\u5e45\u304b\u3089\u3054\u9078\u629e\u3044\u305f\u3060\u3051\u307e\u3059\u3002"),t.nrm(23,"br"),t.EFF(24," \u203b\u5e0c\u671b\u6642\u9593\u3092\u9577\u3081\u306b\u3054\u9078\u629e\u3044\u305f\u3060\u304f\u3068\u3001\u3054\u4e88\u7d04\u304c\u30b9\u30e0\u30fc\u30ba\u306b\u9032\u307f\u307e\u3059\u3002 "),t.k0s()(),t.j41(25,"div",14)(26,"button",15),t.bIt("click",function(){return s.dialogRef.close()}),t.j41(27,"span",16),t.EFF(28,"\u9589\u3058\u308b"),t.k0s()()()()),2&e&&(t.R7$(7),t.JRh(s.selectDayText),t.R7$(4),t.Y8G("ngForOf",s.startSlots),t.R7$(5),t.Y8G("ngForOf",s.endSlots))},dependencies:[b.YU,b.Sq,b.bT],styles:['.c-modal-form[_ngcontent-%COMP%]{background-color:#fff;border-radius:3px}.c-modal-form__wrapper[_ngcontent-%COMP%]{padding:24px 16px 16px}.c-modal-form__close-header[_ngcontent-%COMP%]{padding:14px 0;display:flex;justify-content:center;border:0;border-top:1px solid rgba(0,0,0,.12)}.c-modal-form__close[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:-.7px;color:#49c2c2;opacity:1;background-color:#fff}.c-modal-form__header[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:16px}.c-modal-form__title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#000000b5;margin-bottom:12px;text-align:center}.c-modal-form__note[_ngcontent-%COMP%]{font-size:12px;line-height:18px;color:#000000b5;margin:0}.c-time-slot__title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#000000b5;margin-bottom:16px;text-align:center}.c-time-slot__wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:16px}
1.c-time-slot__column-middle[_ngcontent-%COMP%]{width:28px;text-align:center;font-size:12px;font-weight:700;color:#000000b5}.c-time-slot__column[_ngcontent-%COMP%]{position:relative;width:calc((100% - 28px)/2);border:1px solid rgba(0,0,0,.4);border-radius:3px}.c-time-slot__column[_ngcontent-%COMP%]:before{position:absolute;border-radius:3px;top:0;left:0;content:"";width:100%;height:20px;background:linear-gradient(to bottom,#fff,#fff0);z-index:1}.c-time-slot__column[_ngcontent-%COMP%]:after{position:absolute;border-radius:3px;bottom:0;left:0;content:"";width:100%;height:20px;background:linear-gradient(to bottom,#fff0,#fff);z-index:1}.c-time-slot__column-inner[_ngcontent-%COMP%]{height:240px;padding:20px 8px;overflow-y:scroll}.c-time-slot__btn-all-day[_ngcontent-%COMP%]{border:1px solid #49c2c2;border-radius:4px;margin-bottom:16px;text-align:center;font-size:16px;font-weight:700;padding:8px 0;color:#49c2c2}.c-time-slot__btn-all-day[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:12px;font-weight:400}.c-radio-btn-s[_ngcontent-%COMP%]{position:relative;padding-left:30px;cursor:pointer;font-size:14px;-webkit-user-select:none;user-select:none;display:block}.c-radio-btn-s--close[_ngcontent-%COMP%]{opacity:.4}.c-radio-btn-s--open[_ngcontent-%COMP%]{opacity:1}.c-radio-btn-s__remarks[_ngcontent-%COMP%]{font-size:12px}.c-radio-btn-s[_ngcontent-%COMP%] + .c-radio-btn-s[_ngcontent-%COMP%]{margin-top:12px}.c-radio-btn-s[_ngcontent-%COMP%]:hover input[_ngcontent-%COMP%] ~ .c-radio-btn-s__checkmark[_ngcontent-%COMP%]{background-color:#fff}.c-radio-btn-s__checkmark[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:22px;width:22px;background-color:#fff;border:1px solid rgba(0,0,0,.12);border-radius:50%}.c-radio-btn-s__checkmark[_ngcontent-%COMP%]:after{content:"";position:absolute;display:none;top:5px;left:5px;width:10px;height:10px;border-radius:50%;background:#cab994}.c-radio-btn-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.c-radio-btn-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .c-radio-btn-s__checkmark[_ngcontent-%COMP%]{background-color:#fff;border:1px solid rgba(0,0,0,.12)}.c-radio-btn-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .c-radio-btn-s__checkmark[_ngcontent-%COMP%]:after{display:block}.c-radio-btn-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:after{display:block}']}),r})()},78188:(x,f,c)=>{c.d(f,{X:()=>n});var t=c(54438),p=c(60177),m=c(34901),b=c(21413);const C=_=>({"c-radio-btn-s--close":_});function y(_,g){if(1&_){const i=t.RV6();t.qex(0),t.j41(1,"label",16)(2,"input",17),t.bIt("click",function(){const o=t.eBV(i).index,e=t.XpG();return t.Njj(e.selectStartSlot(o))}),t.k0s(),t.EFF(3),t.nrm(4,"span",18),t.k0s(),t.bVm()}if(2&_){const i=g.$implicit,r=g.index,o=t.XpG();t.R7$(),t.Y8G("ngClass",t.eq3(5,C,!i.active))("id","start-"+r),t.R7$(),t.Y8G("disabled",!i.active)("checked",i.label==o.selectedStartLabel),t.R7$(),t.SpI("",i.label," ")}}function k(_,g){if(1&_){const i=t.RV6();t.qex(0),t.j41(1,"label",16)(2,"input",19),t.bIt("click",function(){const o=t.eBV(i).index,e=t.XpG();return t.Njj(e.selectEndSlot(o))}),t.k0s(),t.EFF(3),t.nrm(4,"span",18),t.k0s(),t.bVm()}if(2&_){const i=g.$implicit,r=g.index,o=t.XpG();t.R7$(),t.Y8G("ngClass",t.eq3(5,C,!i.active))("id","end-"+r),t.R7$(),t.Y8G("disabled",!i.active)("checked",i.label==o.selectedEndLabel),t.R7$(),t.JRh(i.label)}}let n=(()=>{var _;class g{constructor(r,o,e){this.dialogRef=r,this.data=o,this.platformId=e,this.isBrowser=(0,p.UE)(this.platformId)}ngOnInit(){this.onClose=new b.B,this.minimumSlots=2,this.slots=this.data.slots,this.selectDayText=this.data.selectDayText,this.resetStartSlots(),this.resetEndSlots()}resetStartSlots(){this.startSlots=JSON.parse(JSON.stringify(this.slots));for(let r=0;this.minimumSlots>r;r++)this.startSlots[this.startSlots.length-1-r].active=!1}resetEndSlots(){this.endSlots=JSON.parse(JSON.stringify(this.slots));for(let r=0;this.minimumSlots>r;r++)this.endSlots[r].active=!1}selectStartSlot(r){this.resetEndSlots(),this.selectedStartLabel=this.startSlots[r].label;let o=0;for(let s=0;s<this.minimumSlots;s++)this.endSlots[s+r]&&(this.endSlots[s+r].active=!1);for(;o<r;)this.endSlots[o].active=!1,o++;if(this.selectCheck(),this.isBrowser){var e;const s=document.getElementById("end-slots"),a=$("#end-"+this.endSlots.findIndex(M=>M.active)),u=s.scrollTop+(null===(e=a.position())||void 0===e?void 0:e.top);s.scrollTo({top:u,behavior:"smooth"})}}selectEndSlot(r){this.resetStartSlots(),this.selectedEndLabel=this.endSlots[r].label;for(let e=this.minimumSlots-1;e>0;e--)this.startSlots[r-e]&&(this.startSlots[r-e].active=!1);for(let e=r;e<this.startSlots.length;e++)this.startSlots[e].active=!1;this.selectCheck()}selectCheck(){if(this.selectedStartLabel&&this.selectedEndLabel){const r={startLabel:this.selectedStartLabel,endLabel:this.selectedEndLabel};this.onClose.next(r),this.dialogRef.close(r)}}}return(_=g).\u0275fac=function(r){return new(r||_)(t.rXU(m.ce),t.rXU(m.Qs),t.rXU(t.Agw))},_.\u0275cmp=t.VBU({type:_,selectors:[["app-reservation-user-time-slot-modal"]],decls:25,vars:3,consts:[[1,"c-modal-form"],[1,"c-modal-form__wrapper"],[1,"c-modal-form__header"],[1,"c-modal-form__title"],[1,"c-time-slot"],[1,"c-time-slot__title"],[1,"c-time-slot__wrapper"],[1,"c-time-slot__column"],["id","start-slots",1,"c-time-slot__column-inner"],[4,"ngFor","ngForOf"],[1,"c-time-slot__column-middle"],["id","end-slots",1,"c-time-slot__column-inner"],[1,"c-modal-form__note"],[1,"modal-header","c-modal-form__close-header"],["type","button","aria-label","Close",1,"pull-right","c-modal-form__close",3,"click"],["aria-hidden","true"],[1,"c-radio-btn-s",3,"ngClass","id"],["type","radio","name","start-time",3,"click","disabled","checked"],[1,"c-radio-btn-s__checkmark"],["type","radio","name","end-time",3,"click","disabled","checked"]],template:function(r,o){1&r&&(t.j41(0,"div",0)(1,"div",1)(2,"header",2)(3,"h2",3),t.EFF(4,"\u6765\u9662\u3057\u3084\u3059\u3044\u6642\u9593\u5e2f\u306e\u8a2d\u5b9a"),t.k0s()(),t.j41(5,"section",4)(6,"h3",5),t.EFF(7),t.k0s(),t.j41(8,"div",6)(9,"div",7)(10,"div",8),t.DNE(11,y,5,7,"ng-container",9),t.k0s()(),t.j41(12,"div",10),t.EFF(13,"\u301c"),t.k0s(),t.j41(14,"div",7)(1
15,"div",11),t.DNE(16,k,5,7,"ng-container",9),t.k0s()()()(),t.j41(17,"p",12),t.EFF(18," \u203b\u6700\u4f4e1\u6642\u9593\u5e45\u304b\u3089\u3054\u9078\u629e\u3044\u305f\u3060\u3051\u307e\u3059\u3002"),t.nrm(19,"br"),t.EFF(20," \u203b\u5e0c\u671b\u6642\u9593\u3092\u9577\u3081\u306b\u3054\u9078\u629e\u3044\u305f\u3060\u304f\u3068\u3001\u3054\u4e88\u7d04\u304c\u30b9\u30e0\u30fc\u30ba\u306b\u9032\u307f\u307e\u3059\u3002 "),t.k0s()(),t.j41(21,"div",13)(22,"button",14),t.bIt("click",function(){return o.dialogRef.close()}),t.j41(23,"span",15),t.EFF(24,"\u9589\u3058\u308b"),t.k0s()()()()),2&r&&(t.R7$(7),t.JRh(o.selectDayText),t.R7$(4),t.Y8G("ngForOf",o.startSlots),t.R7$(5),t.Y8G("ngForOf",o.endSlots))},dependencies:[p.YU,p.Sq],styles:['.c-modal-form[_ngcontent-%COMP%]{background-color:#fff;border-radius:3px}.c-modal-form__wrapper[_ngcontent-%COMP%]{padding:24px 16px 16px}.c-modal-form__close-header[_ngcontent-%COMP%]{padding:14px 0;display:flex;justify-content:center;border:0;border-top:1px solid rgba(0,0,0,.12)}.c-modal-form__close[_ngcontent-%COMP%]{font-size:14px;font-weight:400;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:-.7px;color:#49c2c2;opacity:1;background-color:#fff}.c-modal-form__header[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:16px}.c-modal-form__title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#000000b5;margin-bottom:12px;text-align:center}.c-modal-form__note[_ngcontent-%COMP%]{font-size:12px;line-height:18px;color:#000000b5;margin:0}.c-time-slot__title[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#000000b5;margin-bottom:16px;text-align:center}.c-time-slot__wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:16px}.c-time-slot__column-middle[_ngcontent-%COMP%]{width:28px;text-align:center;font-size:12px;font-weight:700;color:#000000b5}.c-time-slot__column[_ngcontent-%COMP%]{position:relative;width:calc((100% - 28px)/2);border:1px solid rgba(0,0,0,.4);border-radius:3px}.c-time-slot__column[_ngcontent-%COMP%]:before{position:absolute;border-radius:3px;top:0;left:0;content:"";width:100%;height:20px;background:linear-gradient(to bottom,#fff,#fff0);z-index:1}.c-time-slot__column[_ngcontent-%COMP%]:after{position:absolute;border-radius:3px;bottom:0;left:0;content:"";width:100%;height:20px;background:linear-gradient(to bottom,#fff0,#fff);z-index:1}.c-time-slot__column-inner[_ngcontent-%COMP%]{height:240px;padding:20px 8px;overflow-y:scroll}.c-time-slot__btn-all-day[_ngcontent-%COMP%]{border:1px solid #49c2c2;border-radius:4px;margin-bottom:16px;text-align:center;font-size:16px;font-weight:700;padding:8px 0;color:#49c2c2}.c-time-slot__btn-all-day[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:12px;font-weight:400}.c-radio-btn-s[_ngcontent-%COMP%]{position:relative;padding-left:30px;cursor:pointer;font-size:14px;-webkit-user-select:none;user-select:none;display:block}.c-radio-btn-s--close[_ngcontent-%COMP%]{opacity:.4}.c-radio-btn-s--open[_ngcontent-%COMP%]{opacity:1}.c-radio-btn-s__remarks[_ngcontent-%COMP%]{font-size:12px}.c-radio-btn-s[_ngcontent-%COMP%] + .c-radio-btn-s[_ngcontent-%COMP%]{margin-top:12px}.c-radio-btn-s[_ngcontent-%COMP%]:hover input[_ngcontent-%COMP%] ~ .c-radio-btn-s__checkmark[_ngcontent-%COMP%]{background-color:#fff}.c-radio-btn-s__checkmark[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:22px;width:22px;background-color:#fff;border:1px solid rgba(0,0,0,.12);border-radius:50%}.c-radio-btn-s__checkmark[_ngcontent-%COMP%]:after{content:"";position:absolute;display:none;top:5px;left:5px;width:10px;height:10px;border-radius:50%;background:#cab994}.c-radio-btn-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{position:absolute;opacity:0;cursor:pointer}.c-radio-btn-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .c-radio-btn-s__checkmark[_ngcontent-%COMP%]{background-color:#fff;border:1px solid rgba(0,0,0,.12)}.c-radio-btn-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked ~ .c-radio-btn-s__checkmark[_ngcontent-%COMP%]:after{display:block}.c-radio-btn-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:after{display:block}']}),g})()},60878:(x,f,c)=>{c.d(f,{Z:()=>C});var t=c(95816),p=c(60901),m=c(54438),b=c(60177);let C=(()=>{var y;class k{constructor(_,g){this.http=_,this.datePipe=g}getReservationTicketNew(_){return this.http.send("GET",{url:"users/reservations/ticket_new",params:_})}getReservationCounselingNew(_){return this.http.send("GET",{url:"users/reservations/counseling_new",params:_})}getClinicReservableDateMonth(_){return this.http.send("GET",{url:"clinic_reservable_dates/month",params:_})}getClinicReservableDateSlot(_){return this.http.send("GET",{url:"clinic_reservable_dates/slots",params:_})}sentReservation(_,g){var i;const o=new FormData;["given_name","given_name_kana","family_name","family_name_kana","phone_number"].forEach(a=>{null!=_[a]&&o.append(a,_[a].toString())}),null===(i=_.user_reservable_dates_attributes)||void 0===i||i.forEac
1h((a,u)=>{if(a.id&&!a.active)o.append("user_reservable_dates_attributes[".concat(u,"][id]"),a.id.toString()),o.append("user_reservable_dates_attributes[".concat(u,"][_destroy]"),"1");else if(a.active){var M;a.id&&o.append("user_reservable_dates_attributes[".concat(u,"][id]"),null===(M=a.id)||void 0===M?void 0:M.toString()),o.append("user_reservable_dates_attributes[".concat(u,"][day_of_week]"),a.day_of_week),o.append("user_reservable_dates_attributes[".concat(u,"][start_at]"),this.datePipe.transform(a.start_at,"yyyy-MM-ddTHH:mm:00+09:00")),o.append("user_reservable_dates_attributes[".concat(u,"][end_at]"),this.datePipe.transform(a.end_at,"yyyy-MM-ddTHH:mm:00+09:00"))}});const e=_.bookings_attributes;e.ticket_id&&(o.append("bookings_attributes[0][id]",e.id.toString()),o.append("bookings_attributes[0][ticket_id]",e.ticket_id.toString())),o.append("bookings_attributes[0][clinic_id]",e.clinic_id.toString()),o.append("bookings_attributes[0][status]",e.status),o.append("bookings_attributes[0][booking_type]",e.booking_type),o.append("bookings_attributes[0][other_question]",e.other_question),o.append("bookings_attributes[0][treatment_question]",e.treatment_question),o.append("bookings_attributes[0][is_first_time_visiting]",e.is_first_time_visiting?"1":"0"),e.booking_candidates_attributes.forEach((a,u)=>{o.append("bookings_attributes[0][booking_candidates_attributes][".concat(u,"][candidate_order]"),a.candidate_order.toString()),a.start_at&&a.end_at&&(o.append("bookings_attributes[0][booking_candidates_attributes][".concat(u,"][start_at]"),this.datePipe.transform(a.start_at,"yyyy-MM-ddTHH:mm:00+09:00")),o.append("bookings_attributes[0][booking_candidates_attributes][".concat(u,"][end_at]"),this.datePipe.transform(a.end_at,"yyyy-MM-ddTHH:mm:00+09:00")))}),e.counseling_treatment_data_attributes.treatment_id&&o.append("bookings_attributes[0][counseling_treatment_data_attributes][treatment_id]",e.counseling_treatment_data_attributes.treatment_id);const s={};return s[p.u]="1",this.http.send("POST",{url:"users/reservations/".concat(g),body:o,headers:s})}setReservationDate(_,g,i,r){this.reservationDate=_,this.reservationForm=g,this.reservationNew=i,this.reservableDays=r}getReservationDate(){return this.reservationDate}getReservationForm(){return this.reservationForm}getReservationNew(){return this.reservationNew}getReservableDays(){return this.reservableDays}}return(y=k).\u0275fac=function(_){return new(_||y)(m.KVO(t.k),m.KVO(b.vh))},y.\u0275prov=m.jDH({token:y,factory:y.\u0275fac,providedIn:"root"}),k})()},60738:(x,f,c)=>{function t(p,m){if(m.length<p)throw new TypeError(p+" argument"+(p>1?"s":"")+" required, but only "+m.length+" present")}c.d(f,{A:()=>t})},70179:(x,f,c)=>{function t(p){if(null===p||!0===p||!1===p)return NaN;var m=Number(p);return isNaN(m)?m:m<0?Math.ceil(m):Math.floor(m)}c.d(f,{A:()=>t})},30691:(x,f,c)=>{c.d(f,{A:()=>b});var t=c(70179),p=c(40628),m=c(60738);function b(C,y){(0,m.A)(2,arguments);var k=(0,p.A)(C),n=(0,t.A)(y);if(isNaN(n))return new Date(NaN);if(!n)return k;var _=k.getDate(),g=new Date(k.getTime());return g.setMonth(k.getMonth()+n+1,0),_>=g.getDate()?g:(k.setFullYear(g.getFullYear(),g.getMonth(),_),k)}},40628:(x,f,c)=>{c.d(f,{A:()=>m});var t=c(82284),p=c(60738);function m(b){(0,p.A)(1,arguments);var C=Object.prototype.toString.call(b);return b instanceof Date||"object"===(0,t.A)(b)&&"[object Date]"===C?new Date(b.getTime()):"number"==typeof b||"[object Number]"===C?new Date(b):(("string"==typeof b||"[object String]"===C)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}},82284:(x,f,c)=>{function t(p){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(m){return typeof m}:function(m){return m&&"function"==typeof Symbol&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m})(p)}c.d(f,{A:()=>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.