PageSourceSearch

https://contents.kyobobook.co.kr/resources/lib/kbb-js/kbb.stats.js?t=26917142027

js kyobobook.co.kr collected 2026-09-24 08:29:24 UTC 69,994 bytes, 1 lines download raw bytes

1(function(p){typeof define=="function"&&define.amd?define(p):p()})(function(){"use strict";var Zi=Object.defineProperty;var jn=p=>{throw TypeError(p)};var ts=(p,O,A)=>O in p?Zi(p,O,{enumerable:!0,configurable:!0,writable:!0,value:A}):p[O]=A;var W=(p,O,A)=>ts(p,typeof O!="symbol"?O+"":O,A),Ce=(p,O,A)=>O.has(p)||jn("Cannot "+A);var h=(p,O,A)=>(Ce(p,O,"read from private field"),A?A.call(p):O.get(p)),G=(p,O,A)=>O.has(p)?jn("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(p):O.set(p,A),Y=(p,O,A,q)=>(Ce(p,O,"write to private field"),q?q.call(p,A):O.set(p,A),A),Re=(p,O,A)=>(Ce(p,O,"access private method"),A);var vt,De,It,yt,Tt,Kn,wt,Ot,ht,it,_t,D,y,At;const p={KAKAO:"kakao",NAVER:"naver",META:"meta",MOBON:"mobon",PICKS:"picks",CUBOT:"cubot",GOOGLE:"google",TWITTER:"twitter",RTB_HOUSE:"rtbhouse",KARROT:"karrot",TOSS:"toss",DFINERY:"dfinery",ADBRIX:"adbrix"},O=[...Object.values(p)],A="kyobobook.co.kr",q="book",Wt="ebook",pt="hottracks",qt={INIT:"initialize",INITIALIZED:"initialized"},st="ink",z="mok",H=(t,e,n)=>{const r=s=>String.prototype.split.call(e,s).filter(Boolean).reduce((o,a)=>o!=null&&typeof o=="object"?o[a]:o,t),i=r(/[,[\]]+?/)||r(/[,[\].]+?/);return i===void 0||i===t?n:i},Vn=/([^[.\]])+/g,S=(t,e,n)=>{const r=Array.isArray(e)?e:e.match(Vn);if(!r)return t;let i=t;for(let s=0;s<r.length;s++){const o=r[s];if(i[o]==null){const c=isNaN(Number(r[s+1]));i[o]=c?{}:[]}s===r.length-1&&(i[o]=n);const a=i[o];a!==null&&typeof a=="object"&&(i=a)}return t};var Se,Ct={exports:{}},Wn=function(){if(Se)return Ct.exports;Se=1;var t,e=typeof Reflect=="object"?Reflect:null,n=e&&typeof e.apply=="function"?e.apply:function(l,u,d){return Function.prototype.apply.call(l,u,d)};t=e&&typeof e.ownKeys=="function"?e.ownKeys:Object.getOwnPropertySymbols?function(l){return Object.getOwnPropertyNames(l).concat(Object.getOwnPropertySymbols(l))}:function(l){return Object.getOwnPropertyNames(l)};var r=Number.isNaN||function(l){return l!=l};function i(){i.init.call(this)}Ct.exports=i,Ct.exports.once=function(l,u){return new Promise(function(d,_){function v(P){l.removeListener(u,E),_(P)}function E(){typeof l.removeListener=="function"&&l.removeListener("error",v),d([].slice.call(arguments))}var I,w;k(l,u,E,{once:!0}),u!=="error"&&(w=v,typeof(I=l).on=="function"&&k(I,"error",w,{once:!0}))})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function o(l){if(typeof l!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof l)}function a(l){return l._maxListeners===void 0?i.defaultMaxListeners:l._maxListeners}function c(l,u,d,_){var v,E,I,w;if(o(d),(E=l._events)===void 0?(E=l._events=Object.create(null),l._eventsCount=0):(E.newListener!==void 0&&(l.emit("newListener",u,d.listener?d.listener:d),E=l._events),I=E[u]),I===void 0)I=E[u]=d,++l._eventsCount;else if(typeof I=="function"?I=E[u]=_?[d,I]:[I,d]:_?I.unshift(d):I.push(d),(v=a(l))>0&&I.length>v&&!I.warned){I.warned=!0;var P=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(u)+" listeners added. Use emitter.setMaxListeners() to increase limit");P.name="MaxListenersExceededWarning",P.emitter=l,P.type=u,P.count=I.length,w=P,console&&console.warn&&console.warn(w)}return l}function m(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(l,u,d){var _={fired:!1,wrapFn:void 0,target:l,type:u,listener:d},v=m.bind(_);return v.listener=d,_.wrapFn=v,v}function C(l,u,d){var _=l._events;if(_===void 0)return[];var v=_[u];return v===void 0?[]:typeof v=="function"?d?[v.listener||v]:[v]:d?function(E){for(var I=new Array(E.length),w=0;w<I.length;++w)I[w]=E[w].listener||E[w];return I}(v):K(v,v.length)}function N(l){var u=this._events;if(u!==void 0){var d=u[l];if(typeof d=="function")return 1;if(d!==void 0)return d.length}return 0}function K(l,u){for(var d=new Array(u),_=0;_<u;++_)d[_]=l[_];return d}function k(l,u,d,_){if(typeof l.on=="function")_.once?l.once(u,d):l.on(u,d);else{if(typeof l.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof l);l.addEventListener(u,function v(E){_.once&&l.removeEventListener(u,v),d(E)})}}return Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(l){if(typeof l!="number"||l<0||r(l))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+l+".");s=l}}),i.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(l){if(typeof l!="number"||l<0||r(l))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+l+".");return this._maxListeners=l,this},i.prototype.getMaxListeners=function(){return a(this)},i.prototype.emit=function(l){for(var u=[],d=1;d<arguments.length;d++)u.push(arguments[d]);var _=l==="error",v=this._events;if(v!==void 0)_=_&&v.error===void 0;else if(!_)return!1;if(_){var E;if(u.length>0&&(E=u[0]),E instanceof Error)throw E;var I=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw I.context=E,I}var w=v[l];
1if(w===void 0)return!1;if(typeof w=="function")n(w,this,u);else{var P=w.length,Oe=K(w,P);for(d=0;d<P;++d)n(Oe[d],this,u)}return!0},i.prototype.addListener=function(l,u){return c(this,l,u,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(l,u){return c(this,l,u,!0)},i.prototype.once=function(l,u){return o(u),this.on(l,g(this,l,u)),this},i.prototype.prependOnceListener=function(l,u){return o(u),this.prependListener(l,g(this,l,u)),this},i.prototype.removeListener=function(l,u){var d,_,v,E,I;if(o(u),(_=this._events)===void 0)return this;if((d=_[l])===void 0)return this;if(d===u||d.listener===u)--this._eventsCount===0?this._events=Object.create(null):(delete _[l],_.removeListener&&this.emit("removeListener",l,d.listener||u));else if(typeof d!="function"){for(v=-1,E=d.length-1;E>=0;E--)if(d[E]===u||d[E].listener===u){I=d[E].listener,v=E;break}if(v<0)return this;v===0?d.shift():function(w,P){for(;P+1<w.length;P++)w[P]=w[P+1];w.pop()}(d,v),d.length===1&&(_[l]=d[0]),_.removeListener!==void 0&&this.emit("removeListener",l,I||u)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(l){var u,d,_;if((d=this._events)===void 0)return this;if(d.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):d[l]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete d[l]),this;if(arguments.length===0){var v,E=Object.keys(d);for(_=0;_<E.length;++_)(v=E[_])!=="removeListener"&&this.removeAllListeners(v);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(u=d[l])=="function")this.removeListener(l,u);else if(u!==void 0)for(_=u.length-1;_>=0;_--)this.removeListener(l,u[_]);return this},i.prototype.listeners=function(l){return C(this,l,!0)},i.prototype.rawListeners=function(l){return C(this,l,!1)},i.listenerCount=function(l,u){return typeof l.listenerCount=="function"?l.listenerCount(u):N.call(l,u)},i.prototype.listenerCount=N,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]},Ct.exports}();const qn=function(t,...e){for(const n of e){const r=H(t,n);if(r!=null)return r}};function Ne(t){if(t==null){if(typeof window>"u")return!1;t=window.location.hostname}let e=["127.0.0.1","0.0.0.0","localhost"].includes(t);return e||(e=/^local\./.test(t)),e}function J(t){return Array.isArray(t)?t:[t]}const Xn=t=>{const e=t==null?void 0:t.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g);return t==null||e==null?t:e.map(n=>n.toLowerCase()).join("_")},Xt=t=>t!=null&&typeof t.valueOf()=="string";class Fn extends Wn.EventEmitter{constructor(){super(...arguments);G(this,vt)}emit(n,...r){const i=Object.assign({},...r,{target:this,type:n});return super.emit(n,i)}bind(n,r){return Re(this,vt,De).call(this,n,r,"on")}bindOnce(n,r){return Re(this,vt,De).call(this,n,r,"once")}}vt=new WeakSet,De=function(n,r,i="on"){return Xt(n)&&n.indexOf(" ")>0&&(n=n.split(" ")),J(n).forEach(s=>{this[i](s,r)}),this};class Ft extends Fn{constructor(n={}){super();G(this,It,!1);G(this,yt);Y(this,yt,n),this.once(qt.INITIALIZED,()=>{Y(this,It,!0)})}get initialized(){return h(this,It)}get options(){return h(this,yt)}setOption(n,r){S(this.options,n,r)}getOption(n,r){return H(this.options,n,r)}}It=new WeakMap,yt=new WeakMap;class $n{constructor(){W(this,"url");W(this,"fullpath");W(this,"params");W(this,"shortname");W(this,"localhost");W(this,"devhost");W(this,"production");const e=window.location.href,n=new URL(e);var r;this.url=n,this.fullpath=(r=e)!=null&&r.length?(r.includes("?")?r=r.replace(/\?.*/,""):r.includes("#")&&(r=r.replace(/#.*/,"")),r.replace(/\/$/,"")):r??null,this.params=new URLSearchParams(n.search);const{hostname:i,pathname:s}=n;this.localhost=Ne(i),this.devhost=function(o){if(o==null){if(typeof window>"u")return!1;o=window.location.hostname}return Ne()||/^[\w-]+\.(dev3|ndev|nstg)\.kyobobook/.test(o)}(i),this.production=(o=>{if(o===void 0){if(typeof window>"u")return!1;o=window.location.hostname}return!/^(local|127\.)|\.(ndev|nstg)\./.test(o)})(i),this.shortname=[i,s].join("/").replace(/[:/.]+/g,"")}get pathname(){return this.url.pathname}get hostname(){return this.url.hostname}get hash(){return window.location.hash}get debugMode(){return this.has("debug")}get(e,n){return this.params.get(e)??n}has(e){return this.params.has(e)}hasAll(e){return!!function(n){if(typeof n!="object"||n===null||Object.prototype.toString.call(n)!=="[object Object]")return!1;const r=Object.getPrototypeOf(n);if(r===null)return!0;const i=Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor;return typeof i=="function"&&i instanceof i&&Function.prototype.call(i)===Function.prototype.call(n)}(e)&&Object.keys(e).map(n=>this.has(n)).every(Boolean)}debug(e,n){if(this.devhost&&this.debugMode)return this.get(e,n)}hasDebugLog(e){const n=this.debug("log");if(n==null||!n.length)return!1;const r=n.split(",").map(i=>i.trim());return J(e).every(i=>r.includes(i))}debugPop(e){return this.debug("pop")===e}getHashParams(e,n=void 0){if(!this.hash.length)return n;const r=this.hash.substring(1);if(!/^\?/.test(r)||r.length<2)return n;const i=function(s){const o=new URLSearchParams(s).entries(),a={};for(const[c,m]of o)a[c]=m;return a}(r);return e==null?i:i[e]??n}setHashParams(e){const n=Object.assign(this.getHashParams()||{},e);
1Object.keys(n).forEach(i=>{const s=n[i];s==null&&s!==""||delete s[i]});const r=new URLSearchParams(n).toString();window.location.hash="?"+r}}let $t=null;const X=()=>($t==null&&($t=new $n),$t),Pe=()=>X().debugMode,Ue="x-mok-app",zn=(t,e)=>new RegExp(e).test(t),Le=t=>X().debug(t)==="1",zt=t=>{t==null&&(t=typeof window<"u"?window.navigator.userAgent:"");const e=zn.bind(null,t),n=X().debug("kbbapp"),r=typeof n=="string"||e(`${Ue}:kyobobookapp`),i=n==="ios"||Le("ios")||e("iPad|iPhone|iPod"),s=n==="aos"||Le("aos")||e("Android"),o=s||i||e("Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini");return{ios:i,aos:s,mac:e("Macintosh|Mac OS X"),msie:e("Trident"),mobile:o,mobileApp:r||o&&e(Ue),kyoboApp:r}},Jt=new Map,mt=t=>{if(Jt.has("_"))return Jt.get("_");const e=zt(t);return Jt.set("_",e),e},Me=t=>mt(t).mobile,ot=t=>mt(t).mobileApp,Jn=window.console;function B(...t){Pe()&&Jn.info(...t)}class Qn extends Ft{isMobile(){if(typeof document<"u"){const e=document.documentElement.dataset.view;if(e!=null)return e===z}return Me()}}const xe=t=>typeof t=="function",ke=()=>{if(typeof window>"u")return;const t=window.kbb??window.KbbJS;if((n=>{if(n==null)return!1;const r=n;return xe(r.isMobile)&&xe(r.getOption)})(t))return window.kbb==null&&(window.kbb=t),t;const e=new Qn;return t!=null&&typeof t.options=="object"&&Object.assign(e.options,t.options),B("** init kbbjs base module **"),window.kbb=e,e};class Zn extends Ft{constructor(){super(...arguments);G(this,Tt,[])}get list(){return h(this,Tt)}get length(){return h(this,Tt).length}}Tt=new WeakMap;const Qt="stats",F={...qt,INIT_DATALIST:`${Qt}-init-datalist`,INITIALIZED_DATALIST:`${Qt}-initialized-datalist`,REGISTER_DATA:`${Qt}-register-data`},j={PAGE_VIEW:"pageView",CART:"cart",REMOVE_CART:"removeCart",ORDER:"order",WISH:"wish",SEARCH:"search",SIGNUP:"signup",SELECT:"select",CLICK:"click",LOGIN:"login",LOGOUT:"logout",TRACK:"track",INIT:"init",SET_DATA:"setData",GET_DATA:"getData"},tr=[...Object.keys(j).map(t=>j[t])],Zt="js",Be="data-stats",Rt=(Kn=globalThis.process)==null?void 0:Kn.env,er=(Rt==null?void 0:Rt.NODE_ENV)==="development"?Rt.VERSION??"dev":"1.10.1",te=new Map,nr=`script[type="application/ld+json"][data-role="${CSS.escape("kbb-stats")}"]`,ee=t=>{var i;const e=(n=t,btoa([window.location.pathname,n].filter(Boolean).join("|")));var n;if(te.has(e))return te.get(e);const r=(s=>s!=null?document.getElementById(s):document.querySelector(nr))(t);if(r!=null)try{const s=r.textContent,o=JSON.parse(s),a=o.image,c=(i=o.offers)==null?void 0:i.price,m={image:a,price:{normal:null,discount:String(c)}};return te.set(e,m),m}catch{return void console.warn("- application/ld+json[data-role=kbb-stats] parsing failed")}},U="ecommerce_item",Q="purchase",Dt="sign_up",St="ecommerce_checkout",Ke="login",Ge="select_item",Nt="view_item_list",$="view_item",at="view_cart",Z="add_to_cart",tt="add_to_wishlist",Pt="begin_checkout",Ye="refund",ne="main",et="product_detail",He="cart",je="search",re=t=>t==null?[]:Array.isArray(t)?t:[t],L=t=>{var e;return re((e=t==null?void 0:t.ecommerce)==null?void 0:e.items)};function Ve(){return window.dataLayer!=null||(window.dataLayer=[]),window.dataLayer}const rr=["item_catcode","price","price_original"],We=t=>(rr.forEach(e=>{e in t&&delete t[e]}),t);function qe(t){var r;const e=Ve();t.ecommerce!=null&&((r=e.at(-1))==null?void 0:r.ecommerce)!==null&&e.push({ecommerce:null});const n=function(i){if(i.event==null||i.event_name==null||i.ecommerce==null)return i;switch(i.event_name){case Z:case tt:case Ge:case Nt:case $:{const{ecommerce:o,...a}=i,{items:c,...m}=o;return c==null?i:{...a,ecommerce:{...m,items:(s=c,Array.isArray(s)?s.map(We):We(s))}}}}var s;return i}(t);e.push(n)}const Xe=function(t,e){let n=0;return new Promise((r,i)=>{const s=setInterval(()=>{const o=t.map(c=>{const m=window[c];return m==null?null:{key:c,value:m}});if(o.every(c=>c!=null)){clearInterval(s);const c=function(g){const C={};return g.forEach(({key:N,value:K},k)=>{k||(C.global=K),C[N]=K}),C}(o),m=Object.assign({},e,{globals:c});return r(m)}if(n+=1,n<5)return;clearInterval(s);const a=new Error(`Failed to load globals: ${t.join(", ")}`);return console.error(a),i(a)},100)})},ie=function(){var t,e;return((e=(t=ke())==null?void 0:t.isMobile)==null?void 0:e.call(t))??Me()},ft=function(){return ie()?z:st},Fe={"^(local\\.)?product\\.":q,"^ebook-product\\.":Wt,"^m?hottracks\\.":pt},$e=(t=window.location.host)=>{if(t.includes(A)){for(const e in Fe)if(new RegExp(e).test(t))return Fe[e]}};function Ut(t){return Array.isArray(t)?t[0]:t}const ct={...qt,LOAD:"load",LOADED:"loaded"},ir=function(t,e){var i,s;const n=(i=this.props)==null?void 0:i.protoAlias;if(n==null)return;const r=(s=n.find(o=>o.name===t))==null?void 0:s.alias;r==null||r.forEach(o=>{this[o]=e})};class sr extends Ft{constructor(n,r,i={}){super(i);G(this,wt);G(this,Ot);G(this,ht);G(this,it,null);G(this,_t);W(this,"loadPromise",null);Y(this,wt,n),Y(this,ht,r),Y(this,Ot,Ut(r.name)),Y(this,_t,{instance:this}
1),this.emit(ct.INIT),this.once(ct.LOADED,o=>{this.result=o.data});const s=r.prototype;s!=null&&Object.keys(s).forEach(o=>{const a=s[o];this[o]=a,ir.call(this,o,a)}),this.emit(ct.INITIALIZED)}get name(){return h(this,wt)}get id(){return h(this,Ot)}get loaded(){return h(this,it)!=null}get pending(){return this.loadPromise!=null}get data(){return h(this,ht)}get props(){return this.data.props}get result(){return h(this,it)}set result(n){this.result==null&&(this.loadPromise=null,Y(this,it,n),h(this,it).instance=this,Object.assign(h(this,_t),n.globals))}get element(){var n;return(n=this.result)==null?void 0:n.target}get globals(){return h(this,_t)}get deactive(){var n;return typeof((n=this.props)==null?void 0:n.activate)=="function"&&!this.props.activate()}match(n){const r=this.data.name;return Array.isArray(r)?r.includes(n):this.name===n}load(){if(this.deactive)return Promise.reject(new Error(`${this.name} stats is deactive`));if(this.loaded)return Promise.resolve(this.result);if(this.pending)return this.loadPromise;const n=this.data,r={name:this.name,url:n.url,globals:n.globals};this.emit(ct.LOAD,{data:r});const i=h(this,ht).prehandle;if(typeof i=="function")try{i.call(this)}catch(s){console.warn(s)}return this.loadPromise=async function(s){const{name:o,url:a,attrs:c,async:m,defer:g,globals:C}=s;if(a==null){const _={};return C!=null?Xe(J(C??[]),_):Promise.resolve(_)}const N=s.type??((l=a).indexOf("?")&&(l=l.split("?")[0]),/\.css$/.test(l)?"css":Zt),K=N===Zt,k=s.parentTag??(K?"body":"head");var l;let u;if(K?(u=document.createElement("script"),u.src=a,u.defer=g??!0,u.async=m??!0):(u=document.createElement("link"),u.rel="stylesheet",u.href=a),u.type="text/"+(K?"javascript":"css"),c!=null)for(const _ in c)u.setAttribute(_,c[_]);const d=await new Promise((_,v)=>{u.addEventListener("error",I=>v(I));const E=function(I){const{name:w,url:P,type:Oe}=I,Gn=Oe===Zt,Yn=document.querySelectorAll(Gn?"script":"link");for(let Ae=0;Ae<Yn.length;Ae+=1){const Vt=Yn[Ae];if(w!=null&&Vt.getAttribute("type")===w)return Vt;const Qi=Gn?"src":"href",Hn=Vt.getAttribute(Qi);if(Hn&&Hn.includes(P))return Vt}return null}({type:N,url:a,name:o});if(E!=null)return console.warn(`[kbbStats.importScriptV2] duplicate import url: ${a}`),_({target:E});u.addEventListener("load",I=>{_({event:I,target:u})});try{document[k].appendChild(u)}catch{k==="body"?document[k].appendChild(u):console.error(`${o} append to ${k} failed. ${a}`)}});return C==null?Promise.resolve(d):Xe(J(C),d)}(r).then(s=>{this.emit(ct.LOADED,{data:s});const o=n.posthandle;if(o!=null)try{o.call(this,this.globals)}catch(a){console.warn(a)}}).then(()=>this.result),this.loadPromise}log(...n){console.info(`* [${this.name}]`,...n)}debug(...n){Pe()&&this.log(...n)}}wt=new WeakMap,Ot=new WeakMap,ht=new WeakMap,it=new WeakMap,_t=new WeakMap;class or extends sr{constructor(e,n,r={}){super(e,n,r)}}/*! js-cookie v3.0.8 | MIT */function Lt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)r!=="__proto__"&&(t[r]=n[r])}return t}var gt=function t(e,n){function r(i,s,o){if(typeof document<"u"){typeof(o=Lt({},n,o)).expires=="number"&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in o)o[c]&&(a+="; "+c,o[c]!==!0&&(a+="="+o[c].split(";")[0]));return document.cookie=i+"="+e.write(s,i)+a}}return Object.create({set:r,get:function(i){if(typeof document<"u"&&(!arguments.length||i)){for(var s=document.cookie?document.cookie.split("; "):[],o={},a=0;a<s.length;a++){var c=s[a].split("="),m=c.slice(1).join("=");try{var g=decodeURIComponent(c[0]);if(g in o||(o[g]=e.read(m,g)),i===g)break}catch{}}return i?o[i]:o}},remove:function(i,s){r(i,"",Lt({},s,{expires:-1}))},withAttributes:function(i){return t(this.converter,Lt({},this.attributes,i))},withConverter:function(i){return t(Lt({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decode
1URIComponent)}},{path:"/"});let se;const Mt=t=>{switch(t){case p.DFINERY:case p.PICKS:case p.CUBOT:return gt.get("kuid_shd")}return se!=null||(se=gt.get("kuid_gtm")??(()=>{let e;const n=Ve();let r=0;for(;r<n.length;r+=1){const i=n[r];if((i==null?void 0:i.is_member)!=null){if(!i.is_member)return;break}}for(;r<n.length;r+=1){const i=n[r];if((i==null?void 0:i.user_id)!=null){if(i.user_id===null||i.user_id==="")return;e=i.user_id,B('👀 set "_dataLayerUserId":',e);break}}return e})()),se},ar=function(t,e,n){var o,a,c,m;const r=this.get(t);if(r==null)return;const i=n==null?void 0:n.raw,s=Array.isArray(i)?(o=i.at(0))==null?void 0:o.code:i==null?void 0:i.code;if(s&&e===j.CART&&s!=="002")B(`* [kbb.stats] ${e} - bizCode: ${s} is not cart`);else{if(!((c=(a=r.props)==null?void 0:a.compatible)!=null&&c.includes("ga4"))){const g=(m=n==null?void 0:n.vendors)==null?void 0:m[t];if(i!=null&&g!=null&&typeof g=="function"){const C=Object.assign({instance:r},r.globals);J(i).forEach(N=>{g.call(r,C,N)})}return}Object.hasOwnProperty.call(r,e)&&r.load().then(()=>{r[e](n)}).catch(g=>{})}},cr=function(t,e=[]){const n=e.at(0);switch(t){case j.PAGE_VIEW:case j.CART:case j.WISH:case j.ORDER:if(!e.length||e.length===1&&n.ecommerce===null)return}B(`* [kbb.stats] ${t}`,...e);try{O.forEach(i=>ar.call(this,i,t,n))}catch(i){console.warn(i)}var r;(r=n)!=null?r.event!=null||"ecommerce"in r?qe((i=>(s=>{const o=new Set(["raw","vendors"]);return Object.fromEntries(Object.entries(s).filter(a=>!o.has(a[0])))})(i))(r)):console.warn("* [ga4.dataLayer] no required event or ecommerce parameter"):console.warn("* [ga4.dataLayer] no required data parameter")};function ze(t){const e=function(r){const i=r==null?void 0:r.raw;return i==null?[]:Array.isArray(i)?i:[i]}(t),n=e.at(0);if(n!=null)return{code:n.code,list:e.map(r=>{const{code:i,bid:s,cmdtcode:o,cmdtCode:a,...c}=r,m=(g=>{var l;const{bid:C,cmdtcode:N,cmdtCode:K}=g;let k=C??N??K;if(k!=null||(k=(l=document.querySelector('meta[property="eg:itemId"],meta[name="eg:itemId"]'))==null?void 0:l.getAttribute("content"),k!==null))return k})(r);if(m!=null)return{bid:m,...c}}).filter(r=>r!=null)}}const Je="4ffe4f3c-7219-4bd2-a7ae-eba4aefc9b19",lr=function(t){return{exec(e,n,r){var i;((i=this.globals)==null?void 0:i.global).op(e,n,r)},set(e,n){this.exec("setVar",e,n)},setCUID(e=t){this.set("cuid",e)},setUserID(){const e=Mt(p.CUBOT)??"";this.set("userId",e)},track(e,n){this.setCUID(n),this.setUserID(),this.exec("track",e)},cart(e){const n=ze(e);if(n==null)return void this.debug("cart - required legacy data: code");const{code:r,list:i}=n;r==="002"&&i.length?(i.forEach(({bid:s})=>{this.set("itemId",s),this.track("add_to_cart")}),this.debug("cart -",r,i)):this.debug("cart - no cart event data")},wish(e){const n=ze(e);if(n==null)return void this.debug("wish - required legacy data: code");const{code:r,list:i}=n;r==="001"&&i.length?(i.forEach(({bid:s})=>{this.set("itemId",s),this.track("zzim")}),this.debug("wish -",r,i)):this.debug("wish - no product event data")},cartItem(e){e!=null&&(this.set("itemId",e),this.track("add_to_cart"))},wishItem(e){e!=null&&(this.set("itemId",e),this.track("zzim"))},search(e){const n=typeof e=="string"?e:e==null?void 0:e.search_term;n!=null&&(this.set("searchTerm",n),this.track("search"))}}}(Je),ur={name:[p.CUBOT,"qbot"],url:"https://logger.eigene.io/js/logger.min.js",globals:"eglc",props:{API_KEY:Je,protoAlias:[{name:"cart",alias:["cartItem"]},{name:"wish",alias:["wishItem"]}],compatible:["ga4"]},prototype:lr},lt=t=>
1{if(t!=null)return JSON.stringify(t)},R={LOGIN:"df_login",LOGOUT:"df_logout",SIGN_UP:"df_sign_up",PURCHASE:"df_purchase",REFUND:"df_refund",VIEW_HOME:"df_view_home",VIEW_PRODUCT_DETAILS:"df_view_product_details",ADD_TO_CART:"df_add_to_cart",ADD_TO_WISHLIST:"df_add_to_wishlist",VIEW_SEARCH_RESULT:"df_view_search_result",SHARE_PRODUCT:"df_share_product",VIEW_LIST:"df_view_list",VIEW_CART:"df_view_cart",REMOVE_CART:"df_remove_cart",ADD_PAYMENT_INFO:"df_add_payment_info",X_ADD_TO_MAKER:"add_to_maker",X_PAGE_VIEW:"page_view"},f={ITEMS:"df_items",ITEM_ID:"df_item_id",ITEM_NAME:"df_item_name",ITEM_PRICE:"df_price",ITEM_QUANTITY:"df_quantity",ITEM_DISCOUNT:"df_discount",ITEM_CATEGORY1:"df_category1",ITEM_CATEGORY2:"df_category2",ITEM_CATEGORY3:"df_category3",ITEM_CATEGORY4:"df_category4",ITEM_CATEGORY5:"df_category5",DISCOUNT:"df_discount",TOTAL_REFUND_AMOUNT:"df_total_refund_amount",ORDER_ID:"df_order_id",DELIVERY_CHARGE:"df_delivery_charge",PAYMENT_METHOD:"df_payment_method",TOTAL_PURCHASE_AMOUNT:"df_total_purchase_amount",SHARING_CHANNEL:"df_sharing_channel",SIGN_CHANNEL:"df_sign_channel",KEYWORD:"df_keyword",X_EXPECTED_REWARD_AMOUNT:"expected_reward_amount",X_SALE_PRICE:"sale_price",X_ITEM_ID:"item_id",X_ITEM_NAME:"item_name",X_ITEM_PRICE:"item_price",X_ITEM_DISCOUNT:"item_discount",X_ITEM_CATEGORY1:"item_category1",X_ITEM_CATEGORY2:"item_category2",X_PURCHASE_TYPE:"purchase_type",X_TOTAL_DISCOUNT:"discount",X_GIFT_CARD:"gift_card",X_KYOBO_CASH:"kyobo_cash",X_TOTAL_POINT:"total_point",X_DEPOSIT:"deposit",X_E_CASH:"e_cash",X_E_EXCHANGE:"e_exchange",X_MAKER_ID:"maker_id",X_MAKER_NAME:"maker_name"},oe="custom_df_initialized",ae={EXTERNAL_ID:"external_id",EMAIL:"email",PHONE_NO:"phone_no",KAKAO_USER_ID:"kakao_user_id",LINE_USER_ID:"line_user_id"},Qe={DFUserProfile:{NAME:"df_name",GENDER:"df_gender",BIRTH:"df_birth",MEMBERSHIP:"df_membership",PUSH_ADS_OPTIN:"df_push_ads_optin",SMS_ADS_OPTIN:"df_sms_ads_optin",KAKAO_ADS_OPTIN:"df_kakao_ads_optin",PUSH_NIGHT_ADS_OPTIN:"df_push_night_ads_optin"},DFGender:{MALE:"Male",FEMALE:"Female",NON_BINARY:"NonBinary",OTHER:"Other"},DFIdentity:ae,DFEvent:R,DFEventProperty:f},Ze=t=>{let e=!1;try{window[t]&&(e=!0),e||B(`* kbb.stats - Android ${t} not found.`)}catch{}return e},tn=t=>{var n;let e=!1;return window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers[t]&&typeof((n=window.webkit.messageHandlers[t])==null?void 0:n.postMessage)=="function"&&(e=!0),e||B(`* kbb.stats - iOS ${t} not found.`),e},dr=t=>{if(Ze(t))return window[t]},hr=t=>{var e,n;if(tn(t))return(n=(e=window.webkit)==null?void 0:e.messageHandlers)==null?void 0:n[t]},en=t=>(B("@@ stats.adbrix factoryActiveBridge:",t),{isActiveAOS:Ze.bind(null,t),isActiveIOS:tn.bind(null,t),getAosHandler:dr.bind(null,t),getIosHandler:hr.bind(null,t)}),nn="dfineryBridge",_r=()=>{const t=[...Object.keys(Qe)];return ot()&&t.unshift(nn),t};let xt;const pr=function(){if(Object.entries(Qe).forEach(([e,n])=>{S(window,e,n)}),!ot())return;const t=(()=>{if(xt!=null)return xt;const{aos:e}=zt(),n=e?"aos":"ios",r=(o,a)=>{B(`@@ stats.dfinery[${n}] logEvent`,o,lt(a))},{getAosHandler:i,getIosHandler:s}=en("dfineryWebBridge");return xt=e?{logEvent:(o,a)=>{var c;r(o,a),(c=i())==null||c.logEvent(o,lt(a))},enableSDK:()=>{var o;(o=i())==null||o.enableSDK()},disableSDK:()=>{var o;(o=i())==null||o.disableSDK()},setUserProfile:(o,a)=>{var c;(c=i())==null||c.setUserProfile(o,a)},setUserProfiles:(o={})=>{var a;(a=i())==null||a.setUserProfiles(lt(o))},setIdentity:(o,a)=>{var c;(c=i())==null||c.setIdentity(o,a)},setIdentities:(o={})=>{var a;(a=i())==null||a.setIdentities(lt(o))},resetIdentity:()=>{var o;(o=i())==null||o.resetIdentity()}}:{logEvent:(o,a)=>{var c;r(o,a),(c=s())==null||c.postMessage({method:"logEvent",eventName:o,properties:a})},enableSDK:()=>{var o;(o=s())==null||o.postMessage({method:"enableSDK"})},disableSDK:()=>{var o;(o=s())==null||o.postMessage({method:"disableSDK"})},setUserProfile:(o,a)=>{var c;(c=s())==null||c.postMessage({method:"setUserProfile",key:o,value:a})},setUserProfiles:(o={})=>{var a;(a=s())==null||a.postMessage({method:"setUserProfiles",payload:o})},setIdentity:(o,a)=>{var c;(c=s())==null||c.postMessage({method:"setIdentity",key:o,value:a})},setIdentities:(o={})=>{var a;(a=s())==null||a.postMessage({method:"setIdentities",payload:o})},resetIdentity:()=>{var o;(o=s())==null||o.postMessage({method:"resetIdentity"})}},xt})();S(window,nn,t),this.appBridge=t},rn="Dfinery",mr="visit_site_option",fr="visit_channel_option",gr="session_hour",Er="page_url",br="logEnable",vr="logLevel",Ir="shareSubdomainCookie",nt={LOG_EVENT:"logEvent",SET_USER_PROFILE:"setUserProfile",SET_USER_PROFILES:"setUserProfiles",SET_IDENTITY:"setIdentity",SET_IDENTITIES:"setIdentities",RESET_IDENTITY:"resetIdentity",ENABLE_SDK:"enableSDK",DISABLE_SDK:"disableSDK"},yr=["init","onInitialized",...Object.values(nt)],ce="dfcrm_id",sn=t=>{t!=null?gt.set(ce,t,{domain:A}):gt.remove(ce,{domain:A})},on=()=>gt.get(ce),Tr=function(){const t=Mt(p.DFINERY),e=on();t==null?e!=null&&setTimeout(()=>this.logout(),1e3):e==null&&this.setIdentity(ae.EXTERNAL_ID,t)},M=(t,e=0)=>{if(typeof t=="number")return t;if(typeof t=="string"){const n=Number(t);return isNaN(n)?e:n}return e},T={KYOBO_BOOK_KOR:"KOR",KYOBO_BOOK_ENG:"ENG",KYOBO_BOOK_ENG_BNT:"BNT",KYOBO_BOOK_ENG_JAP:"JAP",KYOBO_BOOK_ENG_JNT:"JNT",KYOBO_PB:"PBC",KYOBO_POD:"POD",COMBI_PRODUCT:"CMB",HOTTRACKS_MUSIC_ALBUM:"MUC",HOTTRACKS_DVD:"DVD",HOTTRACKS_GIFT:"GFT",CULTURE:"CUL",GIFT_CARD:"GFC",OPEN_MARKET:"OPN",OPTION_PRODUCT:"OPT",VIDEO_PRODUCT:"MOV",EBOOK:"EBK",EBOOK_AUDIO:"AUD",EBOOK_VIDEO:"VID",EBOOK_DUM:"DUM",EBOOK_SAM:"SAM",FUNDING:"FUD",CASTING:"CAS",EVENT:"EVENT",DIGITAL_EXCHANGE:"DGV"},an=[...Object.values(T)],wr={[T.KYOBO_BOOK_KOR]:"국내도서",[T.KYOBO_BOOK_ENG]:"보유외서",[T.KYOBO_BOOK_ENG_JAP]:"보유일서",[T.KYOBO_BOOK_ENG_BNT]:"해외주문외서",[T.KYOBO_BOOK_ENG_JNT]:"해외주문일서",[T.KYOBO_PB]:"교보굿즈",[T.KYOBO_POD]:"POD",[T.COMBI_PRODUCT]:"패키지",[T.HOTTRACKS_MUSIC_ALBUM]:"음ë°
1˜",[T.HOTTRACKS_DVD]:"DVD",[T.HOTTRACKS_GIFT]:"기프트",[T.CULTURE]:"컬처",[T.GIFT_CARD]:"기프트카드",[T.OPEN_MARKET]:"오픈마켓",[T.OPTION_PRODUCT]:"옵션상품",[T.VIDEO_PRODUCT]:"동영상",[T.EBOOK]:"eBook",[T.EBOOK_AUDIO]:"오디오북",[T.EBOOK_VIDEO]:"동영상북",[T.EBOOK_DUM]:"학술논문",[T.EBOOK_SAM]:"sam",[T.FUNDING]:"바로펀딩",[T.CASTING]:"캐스팅",[T.EVENT]:"이벤트",[T.DIGITAL_EXCHANGE]:"디지털바우처"},kt=t=>an.includes(t)?wr[t]??t:t,cn=t=>{if(t!=null&&t!=="")return t},ln=t=>{const e=cn(t.item_type)??cn(t.item_category)??"";return kt(e)},un=t=>t.replace(/^\[[^\]]+\][\s\t]*/,""),Et=(t,e={},n=!1)=>{let r=0;return{items:t.map(i=>{const s=(({price_original:c,price:m})=>{const g=Number(c)-Number(m);return isNaN(g)?0:g})(i);r+=s;let o=i.item_name??"";n&&(o=un(o));const a={...e,[f.ITEM_ID]:i.item_id??"",[f.ITEM_NAME]:o,[f.ITEM_CATEGORY1]:ln(i),[f.ITEM_CATEGORY2]:i.item_catcode??"",[f.ITEM_PRICE]:M(i.price_original),[f.ITEM_DISCOUNT]:s,[f.ITEM_QUANTITY]:M(i.quantity,1),[f.X_SALE_PRICE]:M(i.price)};return i.expected_reward_amount!=null&&(a[f.X_EXPECTED_REWARD_AMOUNT]=M(i.expected_reward_amount)),a}),totalDiscount:r}},le=function(t){const{event:e,event_name:n}=t;if(e!==U)return;const{items:r}=Et(L(t));switch(n){case at:this.logInternalEvent(R.VIEW_CART,{[f.ITEMS]:r});break;case Z:this.logInternalEvent(R.ADD_TO_CART,{[f.ITEMS]:r});break;case"remove_from_cart":this.logInternalEvent(R.REMOVE_CART,{[f.ITEMS]:r})}},bt=(t,e)=>{let n;try{n=(r=>{const i=r==null?void 0:r.ecommerce;if(i==null)throw new Error("undefined ecommerce");const s=(i==null?void 0:i.transaction_id)??X().get("ordrId");if(s==null)throw new Error("undefined transaction_id");const o=i==null?void 0:i.value;if(o==null)throw new Error("undefined conversion value");if(o===0)throw new Error("conversion value is 0");return{ecommerce:i,id:s,amount:o,items:re(i.items)}})(e)}catch(r){return void t.debug("- 👀[ga4-parse] parseOrderCoreValues -",r)}return n},ue=t=>{const e=`stats-loid-${t}`,n=i=>{var o;const s=i===void 0?e:`${e}-${i}`;return(o=window.sessionStorage)==null?void 0:o.getItem(s)},r=(i,s)=>{const o=s??i;return n(s!==void 0?i:void 0)===o};return{set:(i,s)=>{var c;const o=s??i,a=s===void 0?e:`${e}-${i}`;(c=window.sessionStorage)==null||c.setItem(a,o)},get:n,match:r,noDebugMatch:(i,s)=>!X().debugMode&&r(i,s)}},Bt=ue(p.DFINERY),Or=function(t){const e=bt(this,t);if(e==null)return;const{ecommerce:n,id:r,amount:i,items:s}=e;if(Bt.noDebugMatch("purchase",r))return;const{items:o}=Et(s,{[f.X_EXPECTED_REWARD_AMOUNT]:0},!0);this.logInternalEvent(R.PURCHASE,{[f.ITEMS]:o,[f.ORDER_ID]:r,[f.DELIVERY_CHARGE]:(n==null?void 0:n.shipping)??0,[f.PAYMENT_METHOD]:(n==null?void 0:n.payment_type)??"",[f.TOTAL_PURCHASE_AMOUNT]:i,[f.X_PURCHASE_TYPE]:(n==null?void 0:n.purchase_type)??"",[f.DISCOUNT]:n.discount??0,[f.X_GIFT_CARD]:(n==null?void 0:n.gift_card)??0,[f.X_KYOBO_CASH]:(n==null?void 0:n.kyobo_cash)??0,[f.X_TOTAL_POINT]:(n==null?void 0:n.total_point)??0,[f.X_DEPOSIT]:(n==null?void 0:n.deposit)??0,[f.X_E_CASH]:(n==null?void 0:n.e_cash)??0,[f.X_E_EXCHANGE]:(n==null?void 0:n.e_exchange)??0}),Bt.set("purchase",r)},Ar=function(t){const e=bt(this,t);if(e==null)return;const{id:n,amount:r,items:i}=e;if(Bt.noDebugMatch("refund",n))return;const{items:s}=Et(i,void 0,!0);this.logInternalEvent(R.REFUND,{[f.ITEMS]:s,[f.TOTAL_REFUND_AMOUNT]:r}),Bt.set("refund",n)},dn=function(t){const e=bt(this,t);if(e==null)return;const{ecommerce:n}=e;this.logInternalEvent(R.ADD_PAYMENT_INFO,{[f.X_PURCHASE_TYPE]:(n==null?void 0:n.purchase_type)??""})},Cr=function(t){switch(t.event){case Q:Or.call(this,t);break;case St:switch(t.event_name){case Ye:Ar.call(this,t);break;case Pt:dn.call(this,t)}}},Rr=function(t){switch(t.item_list_id){case ne:this.logInternalEvent(R.VIEW_HOME);break;case je:this.logInternalEvent(R.VIEW_SEARCH_RESULT,{[f.KEYWORD]:t.search_term??""});break;case"funding":case"hotdeal":case"bestseller":case"new":case"picks":case"trend":this.logInternalEvent(R.X_PAGE_VIEW)}},Dr=function(t){var e;switch(t.item_list_id){case et:{if((e=t.item_list_name)!=null&&e.includes("펀딩 프로젝트 상세"))return void this.logInternalEvent(R.X_PAGE_VIEW);const{items:n}=Et(L(t));this.logInternalEvent(R.VIEW_PRODUCT_DETAILS,{[f.ITEMS]:n});break}}},Sr=function(t){switch(t.event_name){case Nt:return Rr.call(this,t);case $:return Dr.call(this,t);case at:return le.call(this,t)}},Nr=function(t){switch(t.event_name){case"view_my_page":t.item_list_id==="benefit"&&this.logInternalEvent(R.X_PAGE_VIEW);break;case"view_promotion_main":t.item_list_id==="promotion_main"&&this.logInternalEvent(R.X_PAGE_VIEW)}},Pr=function(t){switch(t.event){case"general_event":return Nr.call(this,t);case U:return Sr.call(this,t);case St:if(t.event_name===Pt)return this.logInternalEvent(R.X_PAGE_VIEW),dn.call(this,t)}},Ur=function(t){const{event:e,event_name:n}=t;switch(n){case tt:{if(e!==U)return;const{items:r}=Et(L(t));this.logInternalEvent(R.ADD_TO_WISHLIST,{[f.ITEMS]:r});break}case"add_to_maker":{const r=t.ecommerce??{};this.logInternalEvent(R.X_ADD_TO_MAKER,{[f.X_MAKER_ID]:r.content_id,[f.X_MAKER_NAME]:r.content_name});break}}},Lr=()=>{const t=(e=>n=>{for(const r of n)if(e.startsWith(r))return!0;return!1})(window.location.host);return t(["ebook","ebk"])?"eBook":t(["hottrack"])?"핫트랙스":t(["sam"])?"sam":"교보문고"},Mr={name:[p.DFINERY,"df"],globals:(()=>{const t=[..._r()];
1return ot()||t.unshift(rn),t})(),url:(()=>{if(!ot())return"https://static.dfinery.io/web-sdk/3.1.0/dfn-web-sdk.min.js"})(),props:{compatible:["ga4"]},prehandle(){const{mobile:t,mobileApp:e}=mt(),n=e?"MOBILE APP":t?"MOWEB":"WEB";this.refer={channel:Lr(),platform:n},pr.call(this)},posthandle:function(){var o,a;this.once(oe,Tr.bind(this));const{mobileApp:t}=mt();if(t)return void this.emit(oe);const e=this.globals.global,n=e!=null&&typeof e=="object"?e:{queue:[]};n.queue??(n.queue=[]),yr.forEach(c=>{typeof n[c]!="function"&&(n[c]=((m,g)=>(...C)=>{m.queue.push([g,C])})(n,c))}),S(window,rn,n);const r=X(),i={};if(r.devhost&&r.debugMode){const c=r.debug("llv")??3;Object.assign(i,{[br]:!0,[vr]:c,[Ir]:!0})}const s=X().production?"kpa6wv":"3tt2w9";(o=n.init)==null||o.call(n,s,i),(a=n.onInitialized)==null||a.call(n,()=>{this.debug("initialized - service_key:",s),this.emit(oe)}),this.webSDK=n},prototype:function(){const t={getBridge(){return ot()?this.appBridge:this.webSDK},assignTriggerProps(n={}){const{channel:r,platform:i}=this.refer,s=new Date().getHours(),o=window.location.href.split("?")[0];return Object.assign({[mr]:r,[fr]:i,[gr]:s,[Er]:o},n)}},e={logEvent(n,r={},i=!1){var s;i||(f.X_ITEM_CATEGORY1 in(s=r)?s={...s,item_category1:kt(s.item_category1)}:f.ITEMS in s&&s.df_items.map(a=>{if(f.ITEM_CATEGORY1 in a){const c=a[f.ITEM_CATEGORY1],m=kt(c);c!==m&&(a[f.ITEM_CATEGORY1]=m)}return a}),r={...s,item_category1:kt(s.item_category1)});const o=this.assignTriggerProps(r);this.getBridge().logEvent(n,o),ot()||this.debug("logEvent -- ",n,JSON.stringify(o,null,2))},logInternalEvent(n,r={}){this.logEvent(n,r,!0)},setIdentity(n,r){n===ae.EXTERNAL_ID&&sn(r),this.getBridge().setIdentity(n,r)}};return[nt.SET_IDENTITIES,nt.RESET_IDENTITY,nt.ENABLE_SDK,nt.DISABLE_SDK,nt.SET_USER_PROFILE,nt.SET_USER_PROFILES].forEach(n=>{e[n]=function(...r){this.getBridge()[n](...r)}}),{...t,...e,login(n){this.logInternalEvent(R.LOGIN)},order(n){Cr.call(this,n)},logout(){this.logInternalEvent(R.LOGOUT),on()!=null&&(this.resetIdentity(),sn(null))},signup(n){this.logInternalEvent(R.SIGN_UP,{[f.SIGN_CHANNEL]:n.method})},pageView(n){Pr.call(this,n)},cart(n){le.call(this,n)},removeCart(n){le.call(this,n)},wish(n){Ur.call(this,n)}}}()},hn={KAKAO:"Kakao",NAVER:"Naver",LINE:"Line",GOOGLE:"Google",FACEBOOK:"Facebook",TWITTER:"Twitter",WHATSAPP:"whatsApp",QQ:"QQ",WECHAT:"WeChat",ETC:"ETC"},xr={...hn,USER_ID:"UserId",SKT_ID:"SkTid",APPLE_ID:"AppleId"},V={LOGIN:"abx:login",LOGOUT:"abx:logout",SIGN_UP:"abx:sign_up",USE_CREDIT:"abx:use_credit",APP_UPDATE:"abx:app_update",INVITE:"abx:invite",PURCHASE:"abx:purchase",LEVEL_ACHIEVED:"abx:level_achieved",TUTORIAL_COMPLETED:"abx:tutorial_completed",CHARACTER_CREATED:"abx:character_created",STAGE_CLEARED:"abx:stage_cleared",REFUND:"abx:refund",ADD_TO_CART:"abx:add_to_cart",ADD_TO_WISHLIST:"abx:add_to_wishlist",PRODUCT_VIEW:"abx:product_view",CATEGORY_VIEW:"abx:category_view",REVIEW_ORDER:"abx:review_order",SEARCH:"abx:search",SHARE:"abx:share",VIEW_HOME:"abx:view_home",LIST_VIEW:"abx:list_view",CART_VIEW:"abx:cart_view",PAYMENT_INFO_ADDED:"abx:paymentinfo_added",X_SELECT_ITEM:"select_item"},de={IS_SKIP:"abx:is_skip",LEVEL:"abx:level",STAGE:"abx:stage",PREV_VER:"abx:prev_ver",CURR_VER:"abx:curr_ver",KEYWORD:"abx:keyword",SHARING_CHANNEL:"abx:sharing_channel",SIGN_CHANNEL:"abx:sign_channel",INVITE_CHANNEL:"abx:invite_channel",ORDER_ID:"abx:order_id",DELIVERY_CHARGE:"abx:delivery_charge",PENALTY_CHARGE:"abx:penalty_charge",PAYMENT_METHOD:"abx:payment_method",ORDER_SALES:"abx:order_sales",DISCOUNT:"abx:discount",CATEGORY1:"abx:category1",CATEGORY2:"abx:category2",CATEGORY3:"abx:category3",CATEGORY4:"abx:category4",CATEGORY5:"abx:category5",ITEMS:"abx:items",ITEM_PRODUCT_ID:"abx:product_id",ITEM_PRODUCT_NAME:"abx:product_name",ITEM_PRICE:"abx:price",ITEM_QUANTITY:"abx:quantity",ITEM_DISCOUNT:"abx:discount",ITEM_CURRENCY:"abx:currency",ITEM_CATEGORY1:"abx:category1",ITEM_CATEGORY2:"abx:category2",ITEM_CATEGORY3:"abx:category3",ITEM_CATEGORY4:"abx:category4",ITEM_CATEGORY5:"abx:category5",X_LOGIN_CHANNEL:"login_channel",X_ITEM_SALE_PRICE:"sale_price"},_n={ABInviteChannel:hn,ABSharingChannel:{FACEBOOK:"Facebook",KAKAOTALK:"KakaoTalk",KAKAOSTORY:"KakaoStory",LINE:"Line",WHATSAPP:"whatsApp",QQ:"QQ",WECHAT:"WeChat",SMS:"SMS",EMAIL:"Email",COPY_URL:"copyUrl",ETC:"ETC"},ABSignUpChannel:xr,ABPaymentMethod:{CREDIT_CARD:"CreditCard",BANK_TRANSFER:"BankTransfer",MOBILE_PAYMENT:"MobilePayment",ETC:"ETC"},ABEventProperty:de,ABEvent:V,ABCurrency:{KR:"KRW",US:"USD",JP:"JPY",EU:"EUR",UK:"GBP",CN:"CNY",TW:"TWD",HK:"HKD",ID:"IDR",IN:"INR",RU:"RUB",TH:"THB",VN:"VND",MY:"MYR"}};class he{constructor(e){G(this,D,{});Y(this,D,{}
1),Object.entries(e??{}).forEach(([n,r])=>{this[n](r)})}productId(e){return h(this,D)["abx:product_id"]={value:e,type:"string"},this}productName(e){return h(this,D)["abx:product_name"]={value:e,type:"string"},this}price(e){return h(this,D)["abx:price"]={value:e,type:"double"},this}discount(e){return h(this,D)["abx:discount"]={value:e,type:"double"},this}quantity(e){return h(this,D)["abx:quantity"]={value:e,type:"long"},this}category1(e){return h(this,D)["abx:category1"]={value:e,type:"string"},this}category2(e){return h(this,D)["abx:category2"]={value:e,type:"string"},this}category3(e){return h(this,D)["abx:category3"]={value:e,type:"string"},this}category4(e){return h(this,D)["abx:category4"]={value:e,type:"string"},this}category5(e){return h(this,D)["abx:category5"]={value:e,type:"string"},this}currency(e){return h(this,D)["abx:currency"]={value:e,type:"string"},this}customString(e,n){return h(this,D)[e]={value:n,type:"string"},this}customLong(e,n){return h(this,D)[e]={value:n,type:"long"},this}customDouble(e,n){return h(this,D)[e]={value:n,type:"double"},this}customBool(e,n){return h(this,D)[e]={value:n,type:"boolean"},this}build(){return h(this,D)}}D=new WeakMap;const kr=t=>new he(t);class rt{constructor(e={}){G(this,y,{});Y(this,y,{...e})}items(e){let n;if(Array.isArray(e))n=e;else{if(!e||typeof e!="object")return console.warn("[Properties] items() expects an array or single item object"),this;n=[e]}return h(this,y)["abx:items"]=n,this}orderId(e){return h(this,y)["abx:order_id"]={value:e,type:"string"},this}orderSales(e){return h(this,y)["abx:order_sales"]={value:e,type:"double"},this}deliveryCharge(e){return h(this,y)["abx:delivery_charge"]={value:e,type:"double"},this}penaltyCharge(e){return h(this,y)["abx:penalty_charge"]={value:e,type:"double"},this}paymentMethod(e){return h(this,y)["abx:payment_method"]={value:e,type:"string"},this}discount(e){return h(this,y)["abx:discount"]={value:e,type:"double"},this}signChannel(e){return h(this,y)["abx:sign_channel"]={value:e,type:"string"},this}inviteChannel(e){return h(this,y)["abx:invite_channel"]={value:e,type:"string"},this}sharingChannel(e){return h(this,y)["abx:sharing_channel"]={value:e,type:"string"},this}category1(e){return h(this,y)["abx:category1"]={value:e,type:"string"},this}category2(e){return h(this,y)["abx:category2"]={value:e,type:"string"},this}category3(e){return h(this,y)["abx:category3"]={value:e,type:"string"},this}category4(e){return h(this,y)["abx:category4"]={value:e,type:"string"},this}category5(e){return h(this,y)["abx:category5"]={value:e,type:"string"},this}keyword(e){return h(this,y)["abx:keyword"]={value:e,type:"string"},this}prevVer(e){return h(this,y)["abx:prev_ver"]={value:e,type:"string"},this}currVer(e){return h(this,y)["abx:curr_ver"]={value:e,type:"string"},this}level(e){return h(this,y)["abx:level"]={value:e,type:"long"},this}stage(e){return h(this,y)["abx:stage"]={value:e,type:"string"},this}isSkip(e){return h(this,y)["abx:is_skip"]={value:e,type:"boolean"},this}customDouble(e,n){return h(this,y)[e]={value:n,type:"double"},this}customLong(e,n){return h(this,y)[e]={value:n,type:"long"},this}customString(e,n){return h(this,y)[e]={value:n,type:"string"},this}customBool(e,n){return h(this,y)[e]={value:n,type:"boolean"},this}build(){return h(this,y)}}y=new WeakMap;const Br=["items","orderId","orderSales","deliveryCharge","penaltyCharge","paymentMethod","discount","signChannel","invite
1Channel","sharingChannel","category1","category2","category3","category4","category5","keyword","prevVer","currVer","level","stage","isSkip","customDouble","customLong","customString","customBool"].reduce((t,e)=>{var n;return t[e]=(n=e,function(...r){return new rt()[n](...r)}),t},{}),pn="adbrixBridge",Kr=[pn,...Object.keys(_n),"ABProperty","PropertiesBuilder","ItemBuilder","ABItem"];let Kt;const Gr=function(){Object.entries(_n).forEach(([e,n])=>{S(window,e,n)}),S(window,"ABProperty",Br),S(window,"PropertiesBuilder",rt),S(window,"ItemBuilder",he),S(window,"ABItem",kr);const t=(()=>{if(Kt!=null)return Kt;const{aos:e}=zt(),{getAosHandler:n,getIosHandler:r}=en("adbrixWebBridge"),i=(s,o)=>{B(`@@ stats.adbrix[${e?"aos":"ios"}] logEvent`,s,lt(o))};return Kt=e?{logEvent:(s,o)=>{var a;i(s,o),(a=n())==null||a.logEvent(s,lt(o))},enableSDK:()=>{var s;(s=n())==null||s.enableSDK()},disableSDK:()=>{var s;(s=n())==null||s.disableSDK()}}:{logEvent:(s,o)=>{var a;i(s,o),(a=r())==null||a.postMessage({command:"logEvent",eventName:s,properties:o})},enableSDK:()=>{var s;(s=r())==null||s.postMessage({command:"enableSDK"})},disableSDK:()=>{var s;(s=r())==null||s.postMessage({command:"disableSDK"})}},Kt})();B("@@ stats.adbrix initHybridAppBridge:",t),S(window,pn,t),this.bridge=t},_e=(t=[],e=!1)=>{let n=0;return{items:t.map(r=>{const i=(s=>{const o=M(s.price_original),a=M(s.price);return{origin:o,sale:a,discount:o-a}})(r);return n+=i.discount,((s,{origin:o,sale:a,discount:c},m=!1)=>{let g=s.item_name??"";return m&&(g=un(g)),new he().productId(s.item_id??"").productName(g).quantity(M(s.quantity,1)).category1(ln(s)).category2(s.item_catcode??"").price(o).customDouble(de.X_ITEM_SALE_PRICE,a).discount(c).currency(s.currency??"KRW").build()})(r,i,e)}),totalDiscount:n}},pe=t=>{const{items:e}=_e(t);return new rt().items(e).build()},Yr=function(t){const{event:e,event_name:n}=t;if(e!==U)return;const r=L(t);if(r.length)switch(n){case Z:{const i=pe(r);this.logEvent(V.ADD_TO_CART,i);break}}},mn=ue(p.ADBRIX),Hr=function(t){const e=bt(this,t);if(e==null)return;const{ecommerce:n,id:r,amount:i,items:s}=e,o=X();if(mn.get()===r&&o.debugMode===!1)return;const{items:a}=_e(s,!0),c=new rt().items(a).orderId(r).orderSales(i).discount((n==null?void 0:n.discount)??0).build();this.logEvent(V.PURCHASE,c),mn.set(r)},jr=function(t){const e=bt(this,t);if(e==null)return;const{id:n,amount:r,items:i}=e,{items:s}=_e(i,!0),o=new rt().items(s).orderId(n).penaltyCharge(r).build();this.logEvent(V.REFUND,o)},Vr=function(t){switch(t.event){case Q:Hr.call(this,t);break;case St:t.event_name===Ye&&jr.call(this,t)}},Wr=function(t){t.item_list_id===ne&&this.logEvent(V.VIEW_HOME)},qr=function(t){switch(t.item_list_id){case et:{const e=pe(L(t));this.logEvent(V.PRODUCT_VIEW,e);break}}},Xr=function(t){switch(t.event_name){case Nt:return Wr.call(this,t);case $:return qr.call(this,t)}},Fr=function(t){if(t.event===U)return Xr.call(this,t)},$r=function(t){if(t.event_name!==Ge)return;const e=L(t);if(!e.length)return;const n=pe(e);this.logEvent(V.X_SELECT_ITEM,n)},zr={name:p.ADBRIX,globals:[...Kr],props:{compatible:["ga4"],activate:()=>mt().kyoboApp},prehandle(){Gr.call(this)},prototype:{logEvent(t,e={}){this.bridge.logEvent(t,e)},enableSDK(){this.bridge.enableSDK()},disableSDK(){this.bridge.disableSDK()},login(t){const e=new rt().customString(de.X_LOGIN_CHANNEL,t.login_method??"").build();this.logEvent(V.LOGIN,e)},signup(t){const e=new rt().signChannel(t.method??"").build();this.logEvent(V.SIGN_UP,e)},logout(){this.logEvent(V.LOGOUT)},pageView(t){Fr.call(this,t)},select(t){$r.call(this,t)},cart(t){Yr.call(this,t)},order(t){Vr.call(this,t)}}};function Jr(t,e){var i;return typeof(r=(i=t.querySelector(e))==null?void 0:i.textContent)=="number"?""+r:Xt(r)&&(r!=null&&r.length)?r.replace(/[\s\t\r\n,:원정가]+/g,""):null;var r}function me(t){const{wrapper:e,normal:n,discount:r}=t;let i;if(Xt(e)){const c=[...t.top??[],e].filter(Boolean).join(" ");i=document.querySelector(c)}else e instanceof Element&&(i=e);if(i==null)return{normal:null,discount:null};const s=Jr.bind(null,i),[o,a]=[n,r].map(s);return{normal:o,discount:a}}const Qr=[".prod_detail_view_wrap .prod_price_wrap"],Zr={[z]:{wrapper:".prod_price_box .price_dl",normal:".ori",discount:"P > .price"},[st]:{wrapper:".eb_prod_price_box .price_box",normal:"I",discount:"P > STRONG"}};function ti(){const t=Zr[ft()],e=(n=>
1{const r=ie(),i=[...Qr,n].filter(Boolean).join(" "),s=Array.from(document.querySelectorAll(i)).find(o=>{var a,c;return(c=(a=o.querySelector(r?"DT":"SPAN"))==null?void 0:a.textContent)==null?void 0:c.includes("소장")});return s==null?null:s.querySelector(r?"DD":"DIV")})(t.wrapper);return e==null?null:me({...t,wrapper:e})}const ei={[z]:{wrapper:"#price-info",normal:'[data-ga4-role="price-original"]',discount:'[data-ga4-role="price-sale]'},[st]:{wrapper:"#price-info",normal:'[data-ga4-role="price-original"]',discount:'[data-ga4-role="price-sale]'}},ni={wrapper:".prod_detail_view_wrap .prod_price_wrap .prod_price",normal:".sale_price > .val",discount:".price > .val"};function ri(t){var e;try{const n=(e=ee())==null?void 0:e.price;if(n==null)throw new Error("JSON-LD 스크립트에서 가격 정보를 찾을 수 없습니다.");return n}catch{switch(t){case q:return me({...ni});case pt:return me({...ei[ft()]});default:console.warn(`${t} 서비스에서 가격 정보를 찾을 수 없습니다.`)}}return null}const fn=()=>
1{const t=$e();if(t==null)return null;let e=null;switch(t){case q:case pt:e=ri.bind(null,t);break;case Wt:e=ti;break;default:return console.warn(`${t} 서비스에서 가격 정보를 찾을 수 없습니다.`),null}const n=e();return B("** [parsePriceData]:",t,n),{service:t,data:n}},ut=t=>{var n,r;let e=M(t);if(!e){const i=M((r=(n=fn())==null?void 0:n.data)==null?void 0:r.discount);i&&(e=i)}return e},gn=t=>{const e=t.item_id;if(e!=null)return{id:e,name:t.item_name??"",quantity:M(t.quantity,1),price:ut(t.price),brand:t.item_brand??""}},Gt=t=>{const{ecommerce:e}=t;if(e==null)return;const{items:n}=e;return n!=null?{currency:e.currency??"KRW",products:n.map(gn).filter(r=>r!=null)}:void 0},En=function(t){return(t==null?void 0:t.item_list_id)===He&&Gt(t)!=null&&(this.exec().viewCart(),this.debug("viewCart"),!0)},ii=function(t){if((t==null?void 0:t.event)===U)switch(t==null?void 0:t.event_name){case at:En.call(this,t);break;case Z:{const e=Gt(t);e!=null&&(this.exec().addToCart(e),this.debug("addToCart -",e));break}}},si=function(t){const{item_list_id:e}=t;if(e===et){const n=Gt(t);return n!=null&&(this.exec().viewContent(n),this.debug("viewContent -",n),!0)}return!1},oi=function(t){if((t==null?void 0:t.event)===U)switch(t==null?void 0:t.event_name){case $:si.call(this,t);break;case at:En.call(this,t)}},ai=function(t){if((t==null?void 0:t.event)!==Q)return;const e=(n=>{var c,m;const r=L(n),i=((c=n.ecommerce)==null?void 0:c.currency)??"KRW",s=[];let o=0,a=0;for(const g of r){const C=M(g.quantity);o+=C,a+=ut(g.price)*C;const N=gn(g);N!=null&&s.push(N)}
1return{total_quantity:o,total_value:((m=n.ecommerce)==null?void 0:m.value)??a,currency:i,products:s}})(t);this.exec().purchase(e),this.debug("purchase -",e)},ci=function(t){if((t==null?void 0:t.event)===U)switch(t==null?void 0:t.event_name){case tt:{const e=Gt(t);e!=null&&(this.exec().addToWishList(e),this.debug("addToWishList -",e));break}}},Yt="kakaoPixel",bn="1830363100807970928",li={name:[p.KAKAO,Yt,Yt.toLowerCase()],url:"https://t1.daumcdn.net/kas/static/kp.js",globals:Yt,props:{API_KEY:bn,compatible:["ga4"]},prototype:function(t){return{exec(e=t,...n){var i;return((i=this.globals)==null?void 0:i.global)(e,...n)},pageView(e){e!=null&&oi.call(this,e)},cart(e){ii.call(this,e)},wish(e){(e==null?void 0:e.event_name)===tt&&ci.call(this,e)},order(e){ai.call(this,e)},signup(e){(e==null?void 0:e.event)===Dt&&(this.exec().completeRegistration(),this.debug("completeRegistration"))},search(e){if((e==null?void 0:e.search_term)==null)return;const n={keyword:e.search_term};this.exec().search(n),this.debug("search -",n)},login(e){(e==null?void 0:e.event)===Ke&&(this.exec().login(),this.debug("login"))}}}(bn),posthandle:function(){const t=(n,...r)=>this.exec(n,...r);S(window,Yt,t);const e=t();this.pixel==null&&(this.pixel=e),e.pageView()}},vn="1772498599458773001",In=(t,e=!0)=>{const n=t.item_id;if(n==null)return;const r={id:n};return e||(r.name=t.item_name??"",r.quantity=M(t.quantity,1),r.price=ut(t.price)),r},yn=t=>{var s;const e=L(t),n=[],r=((s=t.ecommerce)==null?void 0:s.value)??0;let i=0;for(const o of e){const a=In(o,!1);a!=null&&(i+=M(a.quantity,1),n.push(a))}return{total_price:r,total_quantity:i,products:n}},ui=function(t){var n;const{item_list_id:e}=t;if(e===et){const r=(n=L(t))==null?void 0:n[0];if(r==null)return!1;const i=In(r);return i!=null&&(this.pixel.track("ViewContent",i),this.debug("viewContent -",i),!0)}return!1},di=function(t){(t==null?void 0:t.event)===U&&(t==null?void 0:t.event_name)===$&&ui.call(this,t)},hi=function(t){if((t==null?void 0:t.event)===U)switch(t==null?void 0:t.event_name){case Z:{const e=yn(t);if(e!=null){const{products:n}=e;this.pixel.track("AddToCart",{products:n}),this.debug("addToCart -",e)}break}}},_i=function(t){if((t==null?void 0:t.event)!==Q)return;const e=yn(t);this.pixel.track("Purchase",e),this.debug("purchase -",e)},pi={name:[p.KARROT,"karrotads"],url:"https://karrot-pixel.business.daangn.com/karrot-pixel.js",globals:"karrotPixel",props:{API_KEY:vn,compatible:["ga4"]},posthandle({karrotPixel:t}){t.init(vn),t.track("ViewPage"),this.pixel==null&&(this.pixel=t)},prototype:{login(t){(t==null?void 0:t.event)===Ke&&(this.pixel.track("Login"),this.debug("login"))},signup(t){(t==null?void 0:t.event)===Dt&&(this.pixel.track("CompleteRegistration"),this.debug("signup"))},pageView(t){t!=null&&di.call(this,t)},cart(t){hi.call(this,t)},order(t){_i.call(this,t)}}},fe="fbq",mi={name:[p.META,"facebook"],url:"https://connect.facebook.net/en_US/fbevents.js",globals:fe,props:{API_KEY:"247842611347428"},prehandle:function(){if(H(window,fe)!=null)return;const t=function(){t.callMethod?t.callMethod.apply(t,arguments):t.queue.push(arguments)};S(window,fe,t),H(window,"_fbq")==null&&S(window,"_fbq",t),t.push=t,t.loaded=!0,t.version="2.0",t.queue=[]},posthandle({global:t}){var e;t("init",(e=this.props)==null?void 0:e.API_KEY),t("track","PageView")}},dt="ENP_VAR";var x,b=((x=b||{}).PRODUCT_CODE="productCode",x.PRODUCT_NAME="productName",x.PRICE="price",x.QUANTITY="qty",x.DC_PRICE="dcPrice",x.SOLDOUT="soldOut",x.IMAGEURL="imageUrl",x.SECOND_IMAGEURL="secondImageUrl",x.THIRD_IMAGEURL="thirdImageUrl",x.FOURTH_IMAGEURL="fourthImageUrl",x.TOP_CATEGORY="topCategory",x.FIRST_SUB_CATEGORY="firstSubCategory",x.SECOND_SUB_CATEGORY="secondSubCategory",x.THIRD_SUB_CATEGORY="thirdSubCategory",x);Object.values(b);const fi=[{slt:[`BUTTON[${Be}-role="wish"]`,'BUTTON[data-kbbfn="wish-item"]'].join(","),cls:"mobonWish"},{slt:[`BUTTON[${Be}-role="cart"]`,'BUTTON[data-kbbfn="cart-item"]'].join(","),cls:"mobonCart"}],gi=()=>{fi.forEach(({slt:t,cls:e})=>document.querySelectorAll(t).forEach(n=>n.classList.add(e)))},Ei=[".header_contents_inner"],bi={[st]:".prod_detail_view_area .prod_thumb.e_book IMG",[z]:".prod_thumb_list LI IMG"};
1function vi(){const t=bi[ft()],e=[...Ei,t].filter(Boolean).join(" "),n=document.querySelector(e);if(n==null)return null;const r=n.src;return r==null||r===""?null:r}const Ii={[st]:"#product-image IMG",[z]:"#product-image IMG"},yi=[".header_contents_inner"],Ti={[st]:".prod_thumb_list_wrap .swiper-slide IMG",[z]:".prod_thumb_list .swiper-slide IMG"};function wi(t){var e;try{const n=(e=ee())==null?void 0:e.image;if(n==null)throw new Error("JSON-LD 스크립트에서 가격 정보를 찾을 수 없습니다.");return n}catch{switch(t){case q:return function(){const n=Ti[ft()],r=[...yi,n].filter(Boolean).join(" "),i=document.querySelector(r);if(i==null)return null;const s=i.src;return s==null||s===""?null:s}();case pt:return function(){const n=Ii[ft()],r=document.querySelector(n);if(r==null)return null;const i=r.src;return i==null||i===""?null:i}();default:console.warn(`${t} 서비스에서 가격 정보를 찾을 수 없습니다.`)}}return null}function Oi(t,e){const n=qn.bind(null,t);switch(e){case b.PRODUCT_CODE:return n("item_id","saleCmdtid","cmdtCode","cmdtcode","id","combiSaleCode","combCmdtSaleCmdtid");case b.PRODUCT_NAME:return n("item_name","productName","cmdtName","title","combCmdtName");case b.PRICE:return n("price","salePrice","sapr","priceInfo.discountPrice","priceInfo.price","saleCmdtSapr");case b.DC_PRICE:return n("saleCmdtPrce");case b.QUANTITY:return n("quantity");case b.SOLDOUT:{const r=t.saleCdtnCode;if(r==null)return"N";switch(r){case"001":case"008":return"N"}return"Y"}case b.TOP_CATEGORY:return t.item_category;case b.FIRST_SUB_CATEGORY:return t.item_category2;case b.SECOND_SUB_CATEGORY:return t.item_category3;case b.THIRD_SUB_CATEGORY:return t.item_category4}}function Tn(t,e){return function(n){var s;const r=J(n.raw??[]);return(i=n,re((s=i.ecommerce)==null?void 0:s.items)).map((o,a)=>{const c=r[a]??{};return Object.assign({},o,c)});var i}(e).map(n=>{const r={};return t.forEach(i=>{const s=Oi(n,i);r[i]=s??""}),r})}var wn=(t=>(t.WISH="wish",t.CART="cart",t))(wn||{});const{WISH:On,CART:An}=wn,Ht=".prod_detail_footer .footer_contents_inner",Ai={[On]:[`${Ht} BUTTON.btn_wish`,".product_info_area .prod_share_area BUTTON.btn_ht_wish",".prod_purchase_info_wrap BUTTON.btn_wish"],[An]:[`${Ht} #basket`,`${Ht} BUTTON.cart`,`${Ht} BUTTON[data-target="#popBuyCart"]`,".prod_under_info #addCartBtn",".prod_purchase_info_wrap #onClickAddCart"]},Ci=[b.PRODUCT_CODE,b.PRODUCT_NAME,b.PRICE,b.DC_PRICE,b.SOLDOUT,b.IMAGEURL,b.SECOND_IMAGEURL,b.THIRD_IMAGEURL,b.FOURTH_IMAGEURL,b.TOP_CATEGORY,b.FIRST_SUB_CATEGORY,b.SECOND_SUB_CATEGORY,b.THIRD_SUB_CATEGORY],Ri=t=>{var n;const e=(n=(()=>{const r=$e();if(r==null)return null;let i=null;switch(r){case q:case pt:i=wi.bind(null,r);break;case Wt:i=vi;break;default:return console.warn(`${r} 서비스에서 가격 정보를 찾을 수 없습니다.`),null}return i==null?null:{service:r,data:i()}})())==null?void 0:n.data;e!=null&&(t[b.IMAGEURL]=e)};function Di(t){try{[On,An].forEach(n=>{const r=`mobon${n.charAt(0).toUpperCase()}${n.slice(1)}`;((i,s)=>{for(const o of i){const a=document.querySelector(o);if(a!=null)return a.classList.add(s),a}})(Ai[n],r)})}catch(n){console.warn("[MOBON.parseProductData]:",n)}const e=Tn(Ci,t).at(0);return(n=>{var i;const r=(i=fn())==null?void 0:i.data;r!=null&&[[b.PRICE,r.normal],[b.DC_PRICE,r.discount]].forEach(([s,o])=>{o!=null&&(n[s]=o)})})(e),Ri(e),e}b.PRODUCT_CODE,b.PRODUCT_NAME,b.PRICE,b.QUANTITY;const Si=[b.PRODUCT_CODE,b.PRODUCT_NAME,b.PRICE,b.QUANTITY];function Ni(t){var s;const e=Tn(Si,t),{price:n,count:r}=function(o){let a=0;return{price:o.map(({price:c,qty:m=1})=>{if(c!=null)return a+=m,+c*m}).filter(c=>!!c).reduce((c,m)=>c+m,0),count:a}}(e),i=function(o,a="ordrId"){return o==null&&(o=window.location.href),new URL(o).searchParams.get(a)??""}();return{product:e,totalPrice:((s=t.ecommerce)==null?void 0:s.value)??n,totalQty:r,ordCode:i}}const Pi=function(t){if(t==null)return;const{event:e}=t,n=H(window,dt);let r,i;if(e===Q&&(r="conversion",i=Ni),r==null||i==null)return;const s=i(t);Object.assign(n,{[r]:s})},Ui=function(t){if(t==null)return!1;const{event_name:e,item_list_id:n}=t,r=H(window,dt);let i,s;if(e==="view_item"&&n==="product_detail"&&(i="collect",s=Di),i==null||s==null)return!1;const o=s(t);return Object.assign(r,{[i]:o}),!0},Li={name:[p.MOBON,"mobion"],url:["https://cdn.megadata.co.kr/dist/prod/v2/mtm.js","?adverId=hottracks","&device="+(ie()?"M":"W")].join(""),globals:dt,props:{autoload:!1,compatible:["ga4"]},prototype:{pageView:function(t){Ui.call(this,t)&&this.load()}
1,order:function(t){Pi.call(this,t),this.load()}},prehandle(){const t=window[dt]??{};S(window,dt,t),Object.assign(this.globals,{global:t,[dt]:t}),setTimeout(gi)}},ge="_nasa",Mi={name:p.NAVER,url:"https://wcs.naver.net/wcslog.js",globals:["wcs_add","wcs","wcs_do",ge],props:{API_KEY:"s_453f4415ebcb"},prehandle(){H(window,ge)==null&&S(window,ge,{})},posthandle({wcs_add:t,wcs:e,wcs_do:n,_nasa:r}){var i;t.wa=(i=this.props)==null?void 0:i.API_KEY,e.inflow(A),n(r||{})}},Ee="rtbhEvents",be="od8CJ7jET0cfPPYOEWtu",Cn="init",jt="startorder",Rn="unknown",Dn=()=>Mt(p.RTB_HOUSE)||Rn,ve=t=>{var e;return((e=L(t)[0])==null?void 0:e.item_id)??""},Ie=(t=[],e)=>{const n=t.filter(r=>r.item_id!=null).map(r=>r.item_id);return e==null?n:n.slice(0,e)},Sn=function(t){return(t==null?void 0:t.item_list_id)===He&&(this.event("basketstatus",{offerIds:Ie(L(t))}),!0)},xi=function(t){const{event:e,event_name:n}=t;if(e===U)switch(n){case at:Sn.call(this,t);break;case Z:this.event("basketadd",{offerId:ve(t)})}},ki=function(t){const{item_list_id:e}=t;switch(e){case ne:return this.event("home"),!0;case je:return this.event("listing",{offerIds:Ie(L(t),5)}),!0;default:if(e==null||an.includes(e))break;return this.event("category",{categoryName:e}),!0}return!1},Bi=function(t){const{item_list_id:e}=t;return e===et&&(this.event("offer",{offerId:ve(t)}),!0)},Ki=function(t){const{event:e,event_name:n}=t;if(e==="item_event")switch(n){case"view_dream_order":case"view_gift_order":this.event(jt)}else if(e===U)switch(n){case Nt:ki.call(this,t);break;case $:Bi.call(this,t);break;case at:Sn.call(this,t);break;case Pt:this.event(jt)}else e===St&&n===Pt&&this.event(jt)},Nn=ue("rtbh"),Gi=function(t){var s,o,a;if(t.event!==Q)return;const e=(s=t.ecommerce)==null?void 0:s.transaction_id;if(e==null)return void this.debug("- 👀[rtbh.ga4-parse] parseOrderEvent - undefined transaction_id:",t.ecommerce);if(Nn.get()===e)return;const n=L(t),r=Ie(n),i=((o=t.ecommerce)==null?void 0:o.value)??0;i?(this.event("conversion",{conversionId:e,conversionClass:"order",conversionSubClass:"purchase",conversionCurrency:((a=t.ecommerce)==null?void 0:a.currency)??"KRW",offerIds:r,conversionValue:i}),Nn.set(e)):this.debug("- 👀[rtbh.ga4-parse] parseOrderEvent - conversionValue is 0:",t.ecommerce)},Yi=function(t){const{event:e,event_name:n}=t;if(e===U)switch(n){case tt:{const r=ve(t);r!=null&&r.length&&this.event("wishlist",{offerId:r});break}}},Hi={name:[p.RTB_HOUSE,"rtbh"],url:`https://tags.creativecdn.com/${be}.js`,globals:Ee,props:{API_KEY:be,compatible:["ga4"]},prehandle:function(){if(H(window,Ee)!=null)return;const t=[];S(window,Ee,t),t.push({eventType:Cn,value:be,dc:""})},posthandle({instance:t,global:e}){setTimeout(()=>{const n=Dn();t.props.uid=n,n!==Rn&&this.debug(`set uid: ${t.props.uid}`),window.location.host.startsWith("order.")&&["/cart/multi"].some(r=>
1window.location.pathname.endsWith(r))?t.event(jt):(e.at(-1)||{}).eventType===Cn&&t.event("placebo")},500)},prototype:{getUserId(){var t;return((t=this.props)==null?void 0:t.uid)!=null?this.props.uid:Dn()},push(...t){var r;const e=(r=this.globals)==null?void 0:r.global,n=[...t,{eventType:"uid",id:this.getUserId()}];this.debug("👀 push -",n),e.push(...n)},event(t,e){this.push({eventType:t,...e})},pageView(t){t!=null&&Ki.call(this,t)},cart(t){xi.call(this,t)},order(t){Gi.call(this,t)},wish(t){(t==null?void 0:t.event_name)===tt&&Yi.call(this,t)},search(t){this.debug("👀 search -",t)},click(t){this.debug("👀 click -",t)}},excludeHosts:[/^local/,/^[\w-]+\.(ndev|nstg)\./]},Pn="8071374282030893824",Un=(t,e)=>{const n=t.item_id;if(n==null)return;const r={product_id:n,prodcut_name:t.item_name??"",price:ut(t.price)};return e==null?r:{...r,quantity:M(e,1)}},Ln=t=>{var o;const e=L(t),n=((o=t.ecommerce)==null?void 0:o.currency)??"KRW",r=[];let i=0,s=0;for(const a of e){const c=M(a.quantity);i+=c,s+=ut(a.price)*c;const m=Un(a,c);m!=null&&r.push(m)}return{revenue:s,total_quantity:i,currency:n,products:r}},ji=function(t){var n,r;const{item_list_id:e}=t;if(e===et){const i=(n=L(t))==null?void 0:n[0];if(i==null)return!1;const s=Un(i);if(s==null)return!1;const o=((r=t.ecommerce)==null?void 0:r.currency)||"KRW",a={...s,currency:o};return this.pixel.productView(a),this.debug("viewContent -",a),!0}return!1},Vi=function(t){(t==null?void 0:t.event)===U&&(t==null?void 0:t.event_name)===$&&ji.call(this,t)},Wi=function(t){if((t==null?void 0:t.event)===U)switch(t==null?void 0:t.event_name){case Z:{const e=Ln(t);e!=null&&(this.pixel.addToCart(e),this.debug("addToCart -",e));break}}},qi=function(t){var i;if((t==null?void 0:t.event)!==Q)return;const{revenue:e,...n}=Ln(t),r={total_price:((i=t.ecommerce)==null?void 0:i.value)??e,...n};this.pixel.purchase(r),this.debug("purchase -",r)},Xi={name:[p.TOSS,"tossads"],url:"https://static.toss.im/lex/v1.js",globals:"TossPixel",props:{API_KEY:Pn,compatible:["ga4"]},posthandle({TossPixel:t}){const e=new t(Pn);this.pixel==null&&(this.pixel=e),this.pixel.pageView()},prototype:{pageView(t){t!=null&&Vi.call(this,t)},signup(t){(t==null?void 0:t.event)===Dt&&(this.pixel.signUp(),this.debug("signup"))},cart(t){Wi.call(this,t)},order(t){qi.call(this,t)}}},ye="twq",Mn="o7qfq",xn=t=>t==null?null:encodeURIComponent(t),Te=t=>{var i,s;const e=L(t),n=((i=t.ecommerce)==null?void 0:i.currency)??"KRW",r=e.map(o=>({content_id:o.item_id??null,content_name:xn(o.item_name),content_type:o.item_type??null,content_price:Number(o.price??0),num_items:Number(o.quantity??1),content_group_id:null}));return r.length===1&&r[0].content_price===0&&(r[0].content_price=ut()),{value:((s=t.ecommerce)==null?void 0:s.value)??0,currency:n,contents:r}},we=[li,Mi,mi,Li,ur,{name:[p.TWITTER,"xpixel"],url:"https://static.ads-twitter.com/uwt.js",globals:ye,props:{API_KEY:Mn,compatible:["ga4"]},prehandle:function(){if(H(window,ye)!=null)return;(()=>{if(window.__isDecodeURIComponentOverridden)return;const e=window.decodeURIComponent;window.decodeURIComponent=function(n){if(!n)return n;try{return e(n)}catch(r){if(r instanceof URIError){let i=n;try{return i=n.replace(/%u([0-9A-F]{4})/gi,(s,o)=>String.fromCharCode(parseInt(o,16))),e(i)}catch{return i}}throw r}},window.__isDecodeURIComponentOverridden=!0})();const t=function(){const e=Array.from(arguments);try{t.exe?t.exe.apply(t,e):t.queue.push(e)}catch(n){console.warn(n)}};S(window,ye,t),t.version="1.1",t.queue=[]},posthandle({twq:t}){var e;t("config",(e=this.props)==null?void 0:e.API_KEY)},prototype:{twq(...t){var n;((n=this.globals)==null?void 0:n.global)(...t)},event(t,e){this.twq("event",`tw-${Mn}-${t}`,e)},pageView(t){if(t==null||t.event!==U||t.event_name!==$||t.item_list_id!==et)return;const e=Te(t);this.debug("pageView -",e),this.event("qrdhb",e)},cart(t){const e=Te(t);this.debug("cart -",e),this.event("qoqcc",e)},order(t){const e=Te(t);this.debug("order -",e),this.event("qoqc9",e)},wish(t){var n,r;if((t==null?void 0:t.event_name)!==tt)return;const e={contents:((r=(n=t.ecommerce)==null?void 0:n.items)==null?void 0:r.map(i=>({content_id:i.item_id??null,content_name:xn(i.item_name),content_type:null,content_price:null,num_items:null,content_group_id:null})))??[]};this.debug("wishlist -",e),this.event("qr6yh",e)},search(t){const e=t==null?void 0:t.search_term;if(e==null)return;const n={search_string:e};this.debug("search -",n),this.event("qrc62",n)},signup(t){if(t.event!==Dt)return;const e={status:"completed",description:`signup completed - ${t.method} - ${t.user_id}`,value:1};this.debug("signup -",e),this.event("qoqca",e)}}},Hi,Xi,pi,Mr,zr,{name:"mobontag",url:"https://cdn.onetag.co.kr/0/tcs.js?eid=to2ab8wht6joto2ab8wht6",globals:[]}],Fi=function(t){const e=Ut(t);J(t).forEach(n=>{this[n]==null&&(this[n]=r=>{const i=this.getReadyStackItem(e);if(i!=null)return i.loaded?this.ready(e,r):void i.list.push(r)})})},$i=async function(t){const e=t.name,n=Ut(e);return this.readyEventStack.push({name:n,loaded:!1,list:[]}),Fi.call(this,e),this.register(t)},zi=function(){this.on(F.REGISTER_DATA,({item:e})=>{e.loaded||e.once(ct.LOADED,({target:n,type:r})=>{const i=this.getReadyStackItem(e.id);i!=null&&(i.list.forEach(s=>this.ready(e.id,s)),i.loaded=!0,B([`%c* [kbb.stats.${e.name}] ${Xn(r).toUpperCase()} -`,"props:",Object.keys(n.globals)].join(" "),"color: royalblue;"))})});const t=()=>{var o;const e=(o=window==null?void 0:window.location)==null?void 0:o.host;if(e==null)return;const{initDataListMap:n}=this.options.events??{},r=n?n(we):we,i=((a=we,c)=>{var m;return(c=c??((m=window==null?void 0:window.location)==null?void 0:m.host))==null?[]:a.filter(g=>
1{if(g.excludeHosts==null||g.excludeHosts.length===0)return!0;const C=Array.isArray(g.name)?g.name[0]:g.name,N=g.excludeHosts.some(K=>K.test(c));return N&&console.warn("❎",C,"not initialized - exclude host:",c),!N})})(r,e);this.emit(F.INIT_DATALIST,{data:{list:r,filtered:i}});const s=i.map($i.bind(this));Promise.allSettled(s).then(a=>{this.emit(F.INITIALIZED_DATALIST,{results:a})})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()};class kn extends Zn{constructor(n){var r,i;super(n);G(this,At);W(this,"readyEventStack",[]);this.emit(F.INIT),(i=(r=this.options.events)==null?void 0:r.init)==null||i.call(this),Y(this,At,cr.bind(this)),tr.forEach(s=>{switch(s){case j.INIT:case j.GET_DATA:case j.SET_DATA:return}this[s]==null&&(this[s]=async function(...o){return this.ready().then(()=>h(this,At).call(this,s,o))})}),this.once(F.INITIALIZED_DATALIST,()=>this.emit(F.INITIALIZED)),zi.call(this)}get name(){return"kbb.stats"}get version(){return er}getReadyStackItem(n){return this.readyEventStack.find(r=>r.name===n)}get(n){return this.list.find(r=>r.match(n))}register(n,r){var o;if(n==null)return Promise.reject(new Error("required data"));const i=Ut(n.name);if(i==null)return Promise.reject(new Error("required data.name"));let s=this.get(i);return s!=null?s.loaded?Promise.resolve(s.result):s.loadPromise:(s=new or(i,n),this.emit(F.REGISTER_DATA,{item:s}),this.list.push(s),(r==null?void 0:r.autoload)!==!0||((o=n.props)==null?void 0:o.autoload)===!1?Promise.resolve({instance:s,globals:{}}):s.load())}async ready(n,r){if(n==null)return new Promise(c=>{if(this.initialized)return c(this);this.once(F.INITIALIZED,()=>c(this))});let i;try{i=await this.load(n)}catch(c){return void console.warn("* [kbb.stats] load error -",c)}const{globals:s,...o}=i,a=Object.assign({},o,s);return r==null||r.call(i.instance,a),await Promise.resolve(a)}async load(n){await this.ready();const r=this.get(n);return r==null?Promise.reject(new Error(`not found instance: ${n}`)):r.load()}async loadAll(n){await this.ready();const r=this.list.filter(i=>!i.loaded&&!i.deactive&&!!(n!=null&&n(i)));return Promise.allSettled(r.map(i=>i.load())).then(i=>i.map(s=>s.status==="fulfilled"?s.value:Promise.reject(s.reason)))}}At=new WeakMap,Object.assign(kn.prototype,{push2dl:qe,parseJsonLD:ee,getUserId:Mt});const Ji=["kbb.stats"],Bn=function(){var r;const t=ke(),e=((r=t==null?void 0:t.getOption)==null?void 0:r.call(t,"stats.options"))??{},n=new kn(e);return Ji.forEach(i=>{S(window,i,n),B(`* ${i} loaded: v${H(window,i+".version")}`)}),n}();(async()=>new Promise(t=>{Bn.loadAll(e=>{var n;return((n=e==null?void 0:e.props)==null?void 0:n.autoload)!==!1}).finally(t)}).then(()=>{setTimeout(()=>Bn.load("mobon"),1500)}))()});

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.