PageSourceSearch

https://www.dunkindonuts.co.kr/build/assets/View-6ab6271b.js

js dunkindonuts.co.kr collected 2026-10-02 10:44:13 UTC 10,015 bytes, 1 lines download raw bytes

1import{j as t,F as _,a as s,x as S,r as N,A as M,b as V,X as k,S as P}from"./app-f6a783ad.js";import{C as j}from"./ClientLayout-9ad326f8.js";import{H as w,a as F}from"./index-58b56cf5.js";import{f as b}from"./index-83894486.js";import{D as $,a as R,b as W,c as H,s as U,d as X,e as B}from"./search-901e7720.js";import{C as q,w as Q,c as z,b as Z,e as G}from"./command-e52f3caf.js";import{u as J}from"./index-22118bd4.js";import{r as A,S as K}from"./react-responsive-f14faefc.js";import{C}from"./client-button-1d93ceee.js";import{c as E,g as Y}from"./index-5ce936a8.js";import{D as ee,M as te}from"./Mobile-8dd5d62e.js";import{C as ae}from"./client-category-9c2f9d9f.js";import{A as re,a as ne,b as se,c as le,d as ie,e as oe,g as ce}from"./alert-dialog-5c3b41b4.js";import"./menuList-e63f009f.js";import"./switch-85bcfb7e.js";import"./index-0bc8315a.js";import"./index-12b09670.js";import"./sonner-24852677.js";import"./popover-bf9cd662.js";import"./index-85fa2b22.js";import"./index-2b193fd3.js";import"./index-8b78e5d2.js";import"./form-577b74fe.js";import"./index-43e6a92c.js";import"./label-9fb21cce.js";import"./index-bd55cd05.js";import"./react-icons.esm-3467949d.js";import"./dialog-91510267.js";import"./client-title-ab77936c.js";import"./button-a5eca8d7.js";function me({data:r,gtmData:e}){return t(_,{children:(r==null?void 0:r.length)>0&&s("div",{className:"space-y-[45px]",children:[t("h4",{className:"font-extrabold text-[32px]",children:"추천 이벤트"}),t("ul",{className:"md:flex md:justify-center flex-wrap grid grid-cols-1 xs:grid-cols-2 gap-y-[clamp(60px,6.14vw,90px)] gap-x-[clamp(15px,1.63vw,24px)] w-[87.6%] mx-auto",children:r.map((a,n)=>{const l=a.SOLDOUTDIV===1?"소진시까지":a.SOLDOUTDIV===2?"상시 운영":"",i=a.SDATE&&b(new Date(a.SDATE),"y. LL. dd"),c=a.EDATE?a.SOLDOUTDIV===0?b(new Date(a==null?void 0:a.EDATE),"y. LL. dd"):l:"";return t("li",{className:"md:w-[48%] lg:w-[30%] xl:w-1/4 md:max-w-[348px]",children:s(S,{href:route("eventView"),data:{id:a.id},className:"gtm-click block group md:rounded-[clamp(10px,2.18vw,32px)] md:shadow-[3px_3px_10px_0_rgba(29,7,0,0.16)] md:bg-cream","data-gtm-click":`${e}${n+1}`,children:[t("div",{className:"border border-espresso/10 md:border-none rounded-[clamp(10px,2.18vw,32px)] overflow-hidden aspect-square",children:t("img",{className:"w-full group-hover:opacity-70 transition-opacity duration-300",src:a.W_THUM_FILE})}),s("div",{className:"text-center flex flex-col pb-0 pt-[18px] md:py-[clamp(15px,1.77vw,26px)]",children:[t("h4",{className:"font-extrabold text-[clamp(15px,1.63vw,24px)]",children:a.S_TITLE}),t("span",{className:"text-[clamp(12px,1.09vw,16px)]",children:i+" ~ "+c})]})]})},a.id)})})]})})}function de({data:r,title:e,gtmDate:a}){const[n,l]=N.useState([]),i=A.useMediaQuery({maxWidth:767});function c(m){V.get(m).then(o=>{if(m.endsWith(".xml")){const d=new DOMParser().parseFromString(o.data,"text/xml");console.log(d),l([...d.getElementsByTagName("Data")])}else throw{response:{data:{message:`행사 ${r.EXCEPTDIV?"제외":""} 매장 파일 형식이 올바르지 않습니다.`}}}}).catch(o=>{J.error("오류가 발생했습니다.",{description:o.response.data.message})})}return N.useEffect(()=>{c(r)},[]),t("div",{className:E("flex items-center",i?"flex-col gap-[10px]":"gap-[20px]"),children:s($,{children:[t(R,{className:E("gtm-click rounded-full px-[clamp(16px,2.34vw,32px)] border border-primary text-[clamp(14px,1.36vw,20px)] font-extrabold text-primary hover:text-white hover:bg-primary transition-colors",i?"w-full leading-[2.35]":"w-[420px] leading-[2.35]"),"data-gtm-click":`이벤트/상세-행사${e||(r.EXCEPTDIV?"행사 제외 매장 보기":"행사 매장 보기")}(${a}-${r.S_TITLE})`,children:e||(r.EXCEPTDIV?"행사 제외 매장 보기":"행사 매장 보기")}),s(W,{className:"text-espresso",children:[s(H,{className:"text-center font-bold text-[clamp(24px,1.91vw,28px)]",children:["행사 ",r.EXCEPTDIV?"제외":""," 매장"]}),s(q,{className:"rounded-none",children:[s("div",{className:"border-transparent border border-b-espresso flex justify-between p-[8px]",children:[t(Q.Input,{className:"text-[16px] w-full bg-transparent outline-none placeholder:text-espresso/50 disabled:cursor-not-allowed disabled:opacity-50",placeholder:"찾으시는 매장명을 입력하세요"}),t("img",{src:U,alt:"검색"})]}),s("div",{className:"mt-[23px] relative",children:[t(z,{className:"absolute flex justify-center items-center w-full h-full text-center",children:"결과 없음"}),t(K,{className:"max-h-[450px] h-[220px] md:h-[450px]",children:t(Z,{className:"except-store-list max-h-full h-full",children:n.map((m,o)=>t(G,{className:"aria-selected:bg-transparent leading-[1.8] cursor-pointer",onSelect:()=>M.get(route("storeView"),{search:m.textContent}),children:m.textContent},o))})})]})]}),t(X,{children:t(B,{asChild:!0,children:t(C,{type:"button",className:"w-fit mx-auto rounded-full px-[37px] border border-primary h-[36px] text-[14px] text-primary bg-transparent hover:bg-primary hover:text-white",children:"닫기"})})})]})]})})}function pe(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function D(r,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function xe(r,e,a){return e&&D(r.prototype,e),a&&D(r,a),r}var ue="2.0.1",he="resize",y="load",T="usemap",f="coords",fe="complete",ge=function(){function r(e,a){pe(this,r),this.selector=e instanceof Array?e:document.querySelectorAll(e),document.readyState!==fe?window.addEventListener(y,this.update.bind(this)):this.update(),window.addEventListener(he,this.debounce(this.update,a).bind(this))}return xe(r,[{key:"update",value:function(){for(var a=this.selector,n=0;n<a.length;n++){var l=a[n];if(l.getAttribute(T)===void 0)return;var i=l.cloneNode();i.addEventListener(y,this.handleImageLoad(l.offsetWidth,l.offsetHeight)),i.src=l.src}}},{key:"debounce",value:function(a){var n=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:500,i;return function(){for(var c=arguments.length,m=new Array(c),o=0;o<c;o++)m[o]=arguments[o];window.clearTimeout(i),i=window.setTimeout(function(d){return a.apply(d,m)},l,n)}}},{key:"handleImageLoad",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(l){for(var i=l.target.width,c=l.target.height,m=l.target.getAttribute(T).replace(/^#/,""),o=document.querySelectorAll(r.genAreaSelector(m)),d=function(u){var h=o[u],I=h.dataset[f]=h.dataset[f]||h.getAttribute(f),g=I.split(","),O=g.map(function(we,v){return v%2===0?Number(g[v]/i*a):Number(g[v]/c*n)});h.setAttribute(f,O.toString())},x=0;x<o.length;x++)d(x)}}}],[{key:"genAreaSelector",value:function(a){return'map[name="'.concat(a,'"] area')}}]),r}();function L(r,e){return new ge(r,e)}L.VERSION=ue;function Ge(){var d,x;const e=k().props.event.data,a=A.useMediaQuery({maxWidth:767});if(!e)return t(ve,{});const[n,l]=Y(e),i=[{categoryName:"프로모션",flag:"A",subTitle:"던킨을 더 재미있게 즐길 수 있는<br />특별한 혜택을 소개합니다."},{categoryName:"제휴혜택",flag:"B",subTitle:"던킨을 더 재미있게 즐길 수 있는<br />특별한 혜택을 소개합니다."}],c=e.SDATE&&b(new Date(e.SDATE),"yLLdd").substring(2);function m(){L("img[usemap]",500)}const o={replace({attribs:p}){if((p==null?void 0:p.usemap)==="#image-map"){const u=F(p);return t("img",{className:"hi",onLoad:()=>m(),...u})}}};return s(j,{children:[t(P,{title:"던킨 - EVENT"}),s("div",{className:"max-w-[1464px] md:w-[95%] mx-auto text-espresso 2xl:w-full",children:[s("div",{className:"w-[87.6%] md:w-full mx-auto flex flex-col justify-between items-center border-b border-b-espresso/10 pb-[48px]",children:[t(ae,{title:"EVENT",link:"eventList",data:i,currentData:e.ONOFF_DIV==="B"?i[1]:i[0],wrapClass:"mt-[clamp(60px,6.83vw,100px)] w-full"}),s("div",{className:"text-center mt-[45px] md:mt-[min(0.95vw,18px)]",children:[t("h3",{className:"text-[clamp(32px,4.09vw,60px)] font-bold",children:e.S_TITLE}),s("div",{className:"flex gap-x-[16px] gap-y-[clamp(10px,1.52vw,20px)] flex-col flex-wrap items-center justify-center mt-6",children:[e.PERIOD&&t("p",{className:"md:text-[24px] md:leading-[1.1]",children:(d=e.PERIOD)==null?void 0:d.trim()}),e.NOTES&&t("p",{className:"mt-2 md:text-[20px] md:leading-[1.1]",children:(x=e.NOTES)==null?void 0:x.trim()}),t("div",{className:E("gap-6 grid mt-3",a?"grid-cols-1":n.length>1?"grid-cols-2":"grid-cols-1"),children:n.map((p,u)=>t(de,{data:p,title:l[u],gtmDate:c},u))})]})]})]}),s("div",{className:"max-w-[940px] mx-auto mt-[clamp(60px,6.83vw,100px)]",children:[s("div",{children:[t(ee,{children:w(e.W_CONTS||"",o)}),t(te,{children:w(e.M_CONTS||"",o)})]}),e.NOTICES&&s("div",{className:"bg-cream py-[48px] px-[clamp(24px,3.27vw,48px)] space-y-[10px]",children:[t("div",{className:"text-[22px] font-extrabold",children:"유의사항"}),t("div",{className:"text-[14px] [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:!list-disc [&_ol]:pl-4",children:w(e.NOTICES)})]})]}),s("div",{className:"md:border-t md:border-t-espresso/10 mt-[clamp(60px,14.64vw,100px)] py-[clamp(60px,14.64vw,100px)] space-y-[clamp(32px,3.55vw,52px)] text-center",children:[t(me,{data:e.RECOMMENDED_EVENTS,gtmData:`추천이벤트(${c}-${e.S_TITLE})-이벤트`}),t("div",{className:"flex justify-center",children:t(C,{href:route("eventList"),data:{flag:e.ONOFF_DIV},className:"gtm-click w-fit","data-gtm-click":`이벤트/상세-목록바로가기(${c}-${e.S_TITLE})`,children:"목록 바로가기"})})]})]})]})}function ve(){return t(re,{open:!0,children:s(ne,{className:"max-w-[90%] md:max-w-lg",children:[s(se,{children:[t(le,{children:"이벤트를 찾을 수 없습니다"}),t(ie,{children:"존재하지 않거나 비공개인 이벤트입니다."})]}),t(oe,{children:t(ce,{asChild:!0,children:t(S,{href:route("eventList"),data:{flag:"A"},children:"확인"})})})]})})}export{Ge as default};

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.