1/* Clinic-specific booking links supplied and confirmed by the clinic. No answers or photos are transferred. */ 2(()=>{'use strict'; 3const base='https://reservation.medical-force.com/b/142c444b-7333-4013-95ef-1b2cb065e374'; 4// Order: beauty consultation, beauty consultation+treatment, beauty prepaid treatment, 5// hair consultation, hair consultation+treatment, hair prepaid treatment. 6const clinics={ 7 nihonbashi:{id:'bf16ff9be9dd4544b1fe145812897e69',menus:['01383e8e-78ad-49cc-833e-cb6372a51f55','b75fcec3-64c1-4297-9219-889bc1aa7f6f','5cb13fc0-6bd6-42b4-a9ea-40ef690fa23c','6378c120-929d-4683-8a99-c4bfaebdfd57','76e41d90-d866-4795-96e1-a658fec50c79','a62a41b0-4de2-42e3-bcd7-1fed8dcef0ee']}, 8 shibuya:{id:'f88775f2f2554778b5c194dc551e1a0e',menus:['2211fca4-3e15-496e-b3e2-0d872f7fd174','4acf68e3-535d-432f-bc5d-12833d3d65d6','c0f8ed20-2086-440c-823f-da74cca5fb4f','049bf8cb-e91c-4b02-b0f6-2c9da313535f','97fd805b-4207-449d-864b-38c15cb5c301','e0cbaf2d-daf9-465f-87f6-d7ceb91c0542']}, 9 omiya:{id:'32455de4259d47e0827400a0af89c111',menus:['25337047-a6ad-4ed0-83cb-8abe364d0290','93cd9126-d434-464f-aef1-416d790e877d','5236e2ed-ca38-42bb-a64d-8c3572de07f8','b1dfa338-f1cf-4c1d-9e68-543ca151d240','8110d01f-d043-4a06-b33b-dcda035d1bb6','a930d5a2-bf0c-47e5-a83b-4ef3a19898b4']} 10}; 11const copy={ 12 ja:{book:'WEBäºç´',title:'ãäºç´å 容ãé¸ãã§ãã ãã',clinic:'ã¯ãªããã¯',names:['æ¥æ¬æ©é¢','æ¸è°·é¢','大宮é¢'],groups:['ç¾å®¹æ½è¡','å»çè±æ¯'],choices:['ã«ã¦ã³ã»ãªã³ã°ã®ã¿','ã«ã¦ã³ã»ãªã³ã°ï¼æ½è¡','æ½è¡ã®ã¿ï¼äºåæ±ºæ¸æ¸ã¿ï¼'],lead:'é¸ã¶ã¨äºç´ç»é¢ã¸é²ã¿ã¾ãã',close:'éãã'}, 13 en:{book:'Book online (Japanese)',title:'Choose your booking',clinic:'Clinic',names:['Nihonbashi','Shibuya','Omiya'],groups:['Aesthetic treatments','Laser hair removal'],choices:['Consultation only','Consultation + treatment','Treatment only (already prepaid)'],lead:'The booking service opens in Japanese. Select LANGUAGE at the top right to switch to English; you may need to select it again after changing pages. Menu names may remain in Japanese. Chinese and Korean are not supported. Confirmation emails use the clinicâs preset message and do not automatically follow the selected language.',close:'Close'}, 14 'zh-hans':{book:'å¨çº¿é¢çº¦ï¼æ¥è¯ï¼',title:'è¯·éæ©é¢çº¦å 容',clinic:'è¯æ',names:['æ¥æ¬æ¡¥é¢','æ¶©è°·é¢','大宫é¢'],groups:['ç¾å®¹æ²»ç','å»çè±æ¯'],choices:['ä» å¨è¯¢','å¨è¯¢ï¼æ²»ç','ä» æ²»çï¼å·²é¢ä»ï¼'],lead:'é¢çº¦é¡µé¢ä»¥æ¥è¯æå¼ãå¯éè¿å³ä¸è§ LANGUAGE åæ¢ä¸ºè±è¯ï¼è·³è½¬é¡µé¢åå¯è½éè¦éæ°éæ©ã项ç®åç§°å¯è½ä»ä¸ºæ¥è¯ãç®å䏿¯æä¸æåé©è¯ã确认é®ä»¶ä½¿ç¨è¯æé¢è®¾å 容ï¼ä¸ä¼éæéè¯è¨èªå¨åæ¢ã',close:'å ³é'}, 15 ko:{book:'ì¨ë¼ì¸ ìì½ (ì¼ë³¸ì´)',title:'ìì½ ë´ì©ì ì íí´ ì£¼ì¸ì',clinic:'í´ë¦¬ë',names:['ëí¼ë°ìì ','ìë¶ì¼ì ','ì¤ë¯¸ì¼ì '],groups:['ë¯¸ì© ìì ','ìë£ ì 모'],choices:['ìë´ë§','ìë´ï¼ìì ','ìì ë§ (ì¬ì ê²°ì ìë£)'],lead:'ìì½ íë©´ì ì¼ë³¸ì´ë¡ ì´ë¦½ëë¤. ì¤ë¥¸ìª½ ì LANGUAGEìì ìì´ë¡ ë³ê²½í ì ìì¼ë©°, íì´ì§ ì´ë í ë¤ì ì íí´ì¼ í ì ììµëë¤. ë©ë´ ì´ë¦ì ì¼ë³¸ì´ë¡ ë¨ì ì ììµëë¤. ì¤êµì´ì íêµì´ë ì§ìíì§ ììµëë¤. íì¸ ë©ì¼ì ë³ììì ì¤ì í ë´ì©ì¼ë¡ ë°ì¡ëë©° ì íí ì¸ì´ê° ìë ì ì©ëì§ ììµëë¤.',close:'ë«ê¸°'} 16}; 17const notices={ 18 ja:['表é¢éº»é ããå¸æã®æ¹','診ççµäº90ååã¾ã§ã®æé帯ããäºç´ãã ããã','æåã»ãåãåãã','LINEã§ãé£çµ¡ãã ããã','å»å¸«æåæï¼5,500åï¼å±±ä¸å»å¸«ï¼8,800å','å»å¸«ã®å¤åæ¥ãè¦ã'], 19 en:['If you would like topical anaesthesia','Please book a time at least 90 minutes before the clinic closes.','Staff requests and enquiries','Please contact us via LINE.','Doctor request fee: Â¥5,500 / Dr Yamanaka: Â¥8,800','View doctor working days'], 20 'zh-hans':['å¦é表é¢éº»é','è¯·éæ©è·è¯çç»æè³å°90åéçé¢çº¦æ¶é´ã','æå®å»æ¤äººååå¨è¯¢','请éè¿LINEèç³»æä»¬ã','å»çæå®è´¹ï¼5,500æ¥å ï¼å±±ä¸å»çï¼8,800æ¥å ','æ¥çå»çåºè¯æ¥æ'], 21 ko:['íë©´ë§ì·¨ë¥¼ ìíìë ë¶','ì§ë£ ì¢ ë£ ìµì 90ë¶ ì ìê°ëë¡ ìì½í´ 주ì¸ì.','ìë£ì§ ì§ì ë° ë¬¸ì','LINEì¼ë¡ ì°ë½í´ 주ì¸ì.','ìì¬ ì§ì ë£: 5,500ì / ì¼ë§ëì¹´ ìì¬: 8,800ì','ìì¬ ê·¼ë¬´ì¼ ë³´ê¸°'] 22}; 23function route(){return window.dmtcStarter?.route||document.body.dataset.dmtcsRoute||location.pathname;} 24function language(){return (route().match(/(?:^|\/)(en|zh-hans|ko)\//i)?.[1]||document.documentElement.lang||'ja').toLowerCase();} 25function words(){return copy[language()]||copy.ja;} 26function isBookingRoot(a){ 27 try { const u=new URL(a.getAttribute('href'),document.baseURI), target=new URL(base); 28 return u.origin===target.origin && u.pathname.replace(/\/+$/,'')===target.pathname; 29 } catch (_) { return false; } 30} 31// DMTC patch 2026-10-03: keep AI Engine links outside site-wide booking enhancements. 32// Do not add LINE buttons, booking classes or dialogs inside AI-generated replies. 33// The optional data attribute can exclude other intentionally plain-link regi
33ons. 34const bookingIgnoreSelector=[ 35 '.mwai-chatbot-container','.mwai-chatbot','.mwai-chat','.mwai-window', 36 '.mwai-conversation','[id^="mwai-chatbot-"]','[id^="mwai-chat-"]', 37 '[data-dmtcs-booking-ignore]' 38].join(','); 39function ignoreBooking(a){return !!a?.closest?.(bookingIgnoreSelector);} 40function articleScope(a){return !window.dmtcsArticleBookingOnly||!!a.closest('.dmtcs-article-cta');} 41function update(a){if(ignoreBooking(a)||!articleScope(a)||a.hasAttribute('lang'))return;const href=a.getAttribute('href')||''; 42if(a.matches('[data-book],.dmtc-reservation')||/#reserve$/.test(href)||/(?:^|\/)book\/(?:index\.html)?(?:#.*)?$/.test(href)){a.href=base;a.removeAttribute('data-book');a.textContent=words().book;} 43if(isBookingRoot(a)){a.setAttribute('aria-haspopup','dialog');if(a.textContent.trim()==='WEBäºç´ã¸é²ã')a.textContent=words().book;} 44if(isBookingRoot(a)&&language()==='ja'&&!a.closest('#dmtcs-booking'))a.classList.add('dmtcs-web-booking'); 45if(isBookingRoot(a)&&language()==='ja'&&!a.closest('#dmtcs-booking')&&!a.dataset.dmtcsLineAdded){ 46 a.dataset.dmtcsLineAdded='true';if(a.nextElementSibling?.classList.contains('dmtcs-line-booking'))return;const line=document.createElement('a');line.href='https://lin.ee/VXqC1Iy';line.className='dmtcs-line-booking';line.textContent='LINEäºç´'; 47 if(a.hasAttribute('data-dmtcs-consultation-only'))line.setAttribute('aria-label','LINEã§ã«ã¦ã³ã»ãªã³ã°ãäºç´'); 48 a.after(line); 49} 50if(a.textContent.trim()==='ã¯ãªããã¯ã»äºç´æ¡å ')a.textContent='ã¯ãªããã¯æ¡å '; 51} 52function scan(root){if(root.matches?.('a'))update(root);root.querySelectorAll?.('a').forEach(update);} 53function placement(a){ 54 if(a.closest('#dmtcs-booking'))return dialog?.dataset.dmtcsBookingLocation||'other'; 55 if(a.closest('.dmtcs-article-cta'))return 'article_bottom'; 56 if(a.closest('.sticky,.mobile-bar'))return 'fixed_bar'; 57 if(a.closest('.home-hero,.hero'))return 'hero'; 58 if(a.closest('.clinic-card'))return 'clinic_card'; 59 if(a.closest('#dmtcs-fukuoka-opening'))return 'fukuoka_notice'; 60 if(a.closest('#dmtcs-points'))return 'line_benefit'; 61 if(a.closest('#reserve'))return 'bottom_cta'; 62 if(a.closest('header,.dmtcs-mobile-header'))return 'header'; 63 return 'other'; 64} 65// GTM custom event only. Never send patient answers, treatment names, URLs or form values. 66// GA4 destination and consent remain controlled by the existing GTM configuration. 67function trackBooking(a){ 68 const root=isBookingRoot(a),choice=a.classList.contains('dmtcs-book-choice'),line=a.matches('.dmtcs-line-booking,.dmtcs-line-registration'); 69 if(!root&&!choice&&!line)return; 70 const candidate=choice?document.querySelector('#dmtcs-book-clinic')?.value:(a.dataset.dmtcsClinic||a.parentElement?.querySelector('[data-dmtcs-clinic]')?.dataset.dmtcsClinic); 71 const payload={event:a.dataset.dmtcsLinePurpose==='opening'?'dmtc_opening_interest':'dmtc_booking_click',booking_channel:line?'line':'web',booking_location:placement(a),booking_step:root?'open_selector':'outbound',booking_clinic:Object.hasOwn(clinics,candidate)?candidate:'unspecified'}; 72 try{window.dataLayer=window.dataLayer||[];window.dataLayer.push(payload);document.dispatchEvent(new CustomEvent('dmtc:booking-click',{detail:payload}));}catch(_){} 73} 74let dialog,opener; 75function openBooking(a){ 76 if(typeof HTMLDialogElement==='undefined'||!HTMLDialogElement.prototype.showModal)return false; 77 const t=words();opener=a; 78 const consultationOnly=a.hasAttribute("data-dmtcs-consultation-only"); 79 if(!dialog){ 80 const style=document.createElement('style');style.textContent=` 81 #dmtcs-booking{box-sizing:border-box;width:calc(100% - 24px);max-width:560px;max-height:85vh;max-height:85dvh;margin:auto;padding:22px;border:1px solid #c6dedd;border-radius:18px;background:#fff;color:#263b3c;overflow-y:auto;overscroll-behavior:contain;font:16px/1.5 sans-serif;} 82 #dmtcs-booking::backdrop{background:rgba(0,0,0,.45)}#dmtcs-booking *{box-sizing:border-box} 83 #dmtcs-booking .dmtcs-book-close{display:block;margin:0 0 12px auto;padding:8px 14px;background:white;color:#087e84;border:1px solid #087e84;border-radius:8px;
83cursor:pointer} 84 #dmtcs-booking h2{font:700 21px/1.5 sans-serif;margin:0 0 8px}#dmtcs-booking p{font-size:14px;margin:0 0 16px} 85 #dmtcs-booking label{display:block;font-weight:700}#dmtcs-booking select{width:100%;max-width:100%;font:inherit;padding:10px;margin:6px 0 18px;border:1px solid #7cbfbc;border-radius:8px;background:white;color:#263b3c} 86 #dmtcs-booking h3{font:700 16px/1.5 sans-serif;margin:16px 0 8px}#dmtcs-booking .dmtcs-book-choice{display:block;width:100%;padding:12px;margin:8px 0;border:1px solid #80c8c3;border-radius:10px;background:#f1faf9;color:#086e74;text-decoration:none;white-space:normal;overflow-wrap:anywhere;font-weight:700} 87 #dmtcs-booking section{margin:0;padding:0;border:0;min-height:0} 88 #dmtcs-booking .dmtcs-book-notice{padding:12px;margin:0 0 14px;background:#f5f9f9;border:1px solid #d2e6e4;border-radius:10px;font-size:14px;line-height:1.6} 89 #dmtcs-booking .dmtcs-book-notice h3{font-size:14px;margin:0 0 4px}#dmtcs-booking .dmtcs-book-notice p{margin:0 0 10px;font-size:14px}#dmtcs-booking .dmtcs-book-notice a{color:#086e74;text-decoration:underline} 90 #dmtcs-booking :focus-visible{outline:3px solid #087e84;outline-offset:2px}`; 91 document.head.append(style);dialog=document.createElement('dialog');dialog.id='dmtcs-booking';dialog.setAttribute('aria-labelledby','dmtcs-book-title');document.body.append(dialog); 92 dialog.addEventListener('close',()=>opener?.focus()); 93 dialog.addEventListener('click',e=>{if(e.target===dialog){const r=dialog.getBoundingClientRect();if(e.clientX<r.left||e.clientX>r.right||e.clientY<r.top||e.clientY>r.bottom)dialog.close();}}); 94 } 95 dialog.dataset.dmtcsBookingLocation=placement(a); 96 dialog.replaceChildren(); 97 const close=document.createElement('button');close.type='button';close.className='dmtcs-book-close';close.textContent=t.close;close.onclick=()=>dialog.close(); 98 const title=document.createElement('h2');title.id='dmtcs-book-title';title.textContent=t.title; 99 const lead=document.createElement('p');lead.textContent=t.lead; 100 const label=document.createElement('label');label.htmlFor='dmtcs-book-clinic';label.textContent=t.clinic; 101 const select=document.createElement('select');select.id='dmtcs-book-clinic'; 102 const blank=new Option('â '+t.clinic+' â','');select.append(blank);
103 Object.keys(clinics).forEach((key,i)=>select.append(new Option(t.names[i],key))); 104 const requested=a.dataset.dmtcsClinic; 105 const detected=(Object.hasOwn(clinics,requested)?requested:'')||route().match(/clinic-(nihonbashi|shibuya|omiya)\.html/)?.[1];select.value=detected||''; 106 const note=document.createElement('aside');note.className='dmtcs-book-notice'; 107 const n=notices[language()]||notices.ja; 108 const anaesthesia=document.createElement('h3');anaesthesia.textContent=n[0]; 109 const timing=document.createElement('p');timing.textContent=n[1]; 110 const requests=document.createElement('h3');requests.textContent=n[2]; 111 const contact=document.createElement('p');contact.append(document.createTextNode(n[3]),document.createElement('br'),document.createTextNode(n[4])); 112 const shift=document.createElement('a');shift.href='https://datsumou-madoguchi.com/doctors-working-days/';shift.textContent=n[5];shift.target='_blank';shift.rel='noopener noreferrer'; 113 if(!consultationOnly)note.append(anaesthesia,timing); 114 note.append(requests,contact,shift); 115 const choices=document.createElement('div');choices.setAttribute('aria-live','polite'); 116 function render(){choices.replaceChildren();const c=clinics[select.value];if(!c)return; 117 t.groups.forEach((group,g)=>{if(consultationOnly&&g!==0)return;const section=document.createElement('section');const h=document.createElement('h3');h.textContent=group;section.append(h);t.choices.forEach((name,i)=>{if(consultationOnly&&i!==0)return;const link=document.createElement('a');link.className='dmtcs-book-choice';link.textContent=name+' â';link.href=base+'/reservations/new?c='+c.id+'&menu_entrance_id='+c.menus[g*3+i];section.append(link);});choices.append(section);}); 118 } 119 select.addEventListener('change',render);render();dialog.append(close,title,lead); 120 if(language()==='ja'){ 121 const benefit=document.createElement('p');benefit.className='dmtcs-book-notice';benefit.append(document.createTextNode('WEBäºç´ããLINEç»é²ã§ãä¼è¨éé¡ã®10ï¼ ãã¤ã³ãéå ã')); 122 const registration=document.createElement('a');registration.href='https://lin.ee/VXqC1Iy';registration.textContent='LINEç»é²ã¯ãã¡ã';registration.target='_blank';registration.rel='noopener';registration.className='dmtcs-line-registration';benefit.append(registration);dialog.append(benefit); 123 } 124 dialog.append(label,select,note,choices);dialog.showModal();title.tabIndex=-1;title.focus({preventScroll:true});dialog.scrollTop=0;return true; 125} 126scan(document);new MutationObserver(rs=>rs.forEach(r=>r.addedNodes.forEach(scan))).observe(document.body,{childList:true,subtree:true}); 127window.addEventListener('click',e=>{const a=e.target.closest?.('a');if(!a||ignoreBooking(a)||(!articleScope(a)&&!a.closest('#dmtcs-booking')))return;update(a);trackBooking(a);if(isBookingRoot(a)){e.stopImmediatePropagation();if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&openBooking(a))e.preventDefault();}},true); 128})();
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.