PageSourceSearch

https://picketing.ai/_next/static/chunks/240-293b66f78b23f025.js

js picketing.ai collected 2026-10-05 12:24:44 UTC 8,979 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[240],{76:(e,t,r)=>{r.d(t,{Ef:()=>d,FV:()=>o,Jq:()=>i,ye:()=>c});let n=(r(95704).env.NEXT_PUBLIC_STORAGE_BASE_URL||"/storage").replace(/\/$/,"");function s(e){return e.startsWith("http://")||e.startsWith("https://")}function l(e,t){let r=t.replace(/^\//,"");return"".concat(n,"/").concat(e,"/").concat(r)}function i(e,t){return t&&"string"==typeof t?s(t)?t:l(e,t):null}function o(e,t){return e||(t?s(t)?t:l("product-images",t):null)}let a=/\.(jpg|jpeg|png|gif|webp|avif)$/i;function c(){let{type:e,value:t,detailedValue:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!("fileUpload"===e||"string"==typeof t&&t.includes("order-files")))return!1;let n=null==r?void 0:r.fileType;if("string"==typeof n&&n.startsWith("image/"))return!0;let s=null==r?void 0:r.fileName;return!!("string"==typeof s&&a.test(s)||"string"==typeof t&&a.test(t))}function d(e,t){return i("order-files",(null==t?void 0:t.url)||e)}},27987:(e,t,r)=>{r.d(t,{EG:()=>c,FG:()=>d,HY:()=>x,V7:()=>u,Wr:()=>p,kD:()=>m});var n=r(95938),s=r(10669);let l={avgRating:0,totalCount:0,photoCount:0};function i(e){return e||(0,s.q_)()||null}function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=i(e.project_id);if(!t&&!e.product_id)return null;let r=new URLSearchParams;return t&&r.set("project_id",t),e.product_id&&r.set("product_id",e.product_id),e.limit&&r.set("limit",String(e.limit)),e.offset&&r.set("offset",String(e.offset)),r}let a={reviews:[],my_review:null,stats:l,photos:[],total:0};async function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return a;let r=o({...t,product_id:e});if(!r)return a;let s=await (0,n.nr)("/api/ads/reviews?".concat(r.toString()));return{reviews:(null==s?void 0:s.reviews)||[],my_review:(null==s?void 0:s.my_review)||null,stats:(null==s?void 0:s.stats)||l,photos:(null==s?void 0:s.photos)||[],total:(null==s?void 0:s.total)||0}}async function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return(await c(e,t)).stats}catch(e){return console.error("Error loading product review stats:",e),l}}async function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{return(await c(e,t)).my_review}catch(e){return console.error("Error loading my review:",e),null}}async function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;let r=o(t);if(!r)return null;r.set("order_id",e);try{let e=await (0,n.nr)("/api/ads/reviews/by-order?".concat(r.toString()));return(null==e?void 0:e.review)||null}catch(e){return console.error("Error loading review by order:",e),null}}async function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i(t.project_id);if(!r)return{success:!1,error:"DB_ERROR"};try{let t=await (0,n.nr)("/api/ads/reviews",{method:"POST",body:{project_id:r,productId:e.productId,orderId:e.orderId||null,rating:e.rating,content:e.content||"",photos:e.photos||[]}});return{success:!0,id:null==t?void 0:t.id}}catch(e){var s,l;if(e instanceof n.hD&&401===e.status)return{success:!1,error:"AUTH_ERROR"};if("already_reviewed"===(null==e||null==(l=e.payload)||null==(s=l.details)?void 0:s.reason))return{success:!1,error:"ALREADY_REVIEWED"};return console.error("Error creating review:",e),{success:!1,error:"DB_ERROR"}}}async function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=o(t);if(!r)return!1;try{return await (0,n.nr)("/api/ads/reviews/".concat(encodeURIComponent(e),"?").concat(r.toString()),{method:"DELETE"}),!0}catch(e){return console.error("Error deleting review:",e),!1}}},61185:(e,t,r)=>{r.d(t,{c:()=>p});var n=r(95155),s=r(12115),l=r(71408),i=r(5937),o=r(65229),a=r(39347),c=r(95664),d=r(35299),u=r(5917),x=r(27987);let m={1:"별로입니다",2:"그저 그렇습니다",3:"보통입니다",4:"만족합니다",5:"최고입니다"};function p(e){var t;let{isOpen:r,onClose:p,order:h,existingReview:f=null,onSuccess:v}=e,g=!!f,[y,b]=(0,s.useState)((null==f?void 0:f.rating)||0),[w,j]=(0,s.useState)(0),[N,_]=(0,s.useState)((null==f?void 0:f.content)||""),[E,R]=(0,s.use
1State)(!1),[k,S]=(0,s.useState)(null);(0,s.useEffect)(()=>{f?(b(f.rating||0),_(f.content||"")):(b(0),_(""))},[f]);let A=()=>{g||(b(0),_("")),j(0),S(null),p()},C=async()=>{if(h){if(0===y)return void S("별점을 선택해 주십시오.");R(!0),S(null);try{var e;let t=await (0,x.kD)({productId:String(null!=(e=h.product_id)?e:""),orderId:h.id,rating:y,content:N.trim(),photos:[]});t.success?(null==v||v(),A()):"ALREADY_REVIEWED"===t.error?S("이미 이 상품에 리뷰를 작성하셨습니다."):"AUTH_ERROR"===t.error?S("로그인이 필요합니다."):S("리뷰 저장에 실패했습니다. 다시 시도해 주십시오.")}catch(e){S("리뷰 저장 중 오류가 발생했습니다.")}finally{R(!1)}}},D=w||y;return(0,n.jsx)(l.N,{children:r&&(0,n.jsxs)("div",{className:"pointer-events-none fixed inset-0 z-[60] flex items-end justify-center",children:[(0,n.jsx)(i.P.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"pointer-events-auto absolute inset-0 bg-black/50",onClick:A}),(0,n.jsx)(i.P.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",damping:25,stiffness:300},className:"pointer-events-auto relative w-full max-w-[440px]",children:(0,n.jsxs)("div",{className:"flex max-h-[85vh] w-full flex-col overflow-hidden rounded-t-3xl bg-white",children:[(0,n.jsxs)("div",{className:"sticky top-0 flex items-center justify-between border-b border-border bg-white px-5 py-4",children:[(0,n.jsx)("h2",{className:"text-lg font-bold",children:g?"리뷰 수정":"리뷰 작성"}),(0,n.jsx)("button",{type:"button",onClick:A,className:"-mr-2 p-2 text-secondary hover:text-body",children:(0,n.jsx)(o.A,{className:"h-5 w-5"})})]}),(0,n.jsxs)("div",{className:"max-h-[calc(85vh-140px)] space-y-6 overflow-y-auto p-5",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 rounded-xl bg-warm-50 p-3",children:[(0,n.jsx)("div",{className:"flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-lg bg-warm-200",children:"\uD83D\uDCE6"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"truncate text-sm font-medium text-headline",children:(null==h?void 0:h.product_name)||"광고상품"}),(0,n.jsxs)("p",{className:"text-xs text-secondary",children:["주문번호 ",null==h||null==(t=h.id)?void 0:t.slice(0,8).toUpperCase()]})]})]}),(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("p",{className:"mb-3 text-sm text-secondary",children:"상품은 어떠셨습니까?"}),(0,n.jsx)("div",{className:"flex items-center justify-center gap-2",children:[1,2,3,4,5].map(e=>(0,n.jsx)("button",{type:"button",onClick:()=>b(e),onMouseEnter:()=>j(e),onMouseLeave:()=>j(0),className:"p-1 transition-colors",children:(0,n.jsx)(a.A,{size:36,className:"transition-colors ".concat(e<=D?"fill-order-pending-text text-accent":"fill-warm-200 text-warm-200")})},e))}),D>0&&(0,n.jsx)("p",{className:"mt-2 text-sm font-medium text-accent",children:m[D]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"mb-2 block text-sm font-medium text-body",children:"상세 리뷰 (선택)"}),(0,n.jsx)("textarea",{value:N,onChange:e=>_(e.target.value),placeholder:"상품에 대한 솔직한 후기를 남겨 주십시오.",rows:4,maxLength:1e3,className:"w-full resize-none rounded-xl border border-border px-4 py-3 text-sm focus:border-accent focus:outline-none focus:ring-2 focus:ring-accent/20"}),(0,n.jsxs)("p",{className:"mt-1 text-right text-xs text-tertiary",children:[N.length,"/1000"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"mb-2 block text-sm font-medium text-body",children:"사진 첨부 (선택)"}),(0,n.jsxs)("button",{type:"button",disabled:!0,className:"w-full cursor-not-allowed rounded-xl border-2 border-dashed border-border p-4 text-center text-tertiary",children:[(0,n.jsx)(c.A,{className:"mx-auto mb-1 h-6 w-6"}),(0,n.jsx)("p",{className:"text-sm",children:"사진 첨부는 준비 중입니다"})]})]}),k&&(0,n.jsx)("div",{className:"rounded-lg bg-error-light p-3 text-sm text-error",children:k})]}),(0,n.jsxs)("div",{className:"sticky bottom-0 border-t border-border bg-white px-5 py-4",children:[(0,n.jsx)("button",{type:"button",onClick:C,disabled:E||0===y,className:"flex w-full items-center justify-center gap-2 rounded-xl py-3.5 text-base font-semibold transition-colors ".concat(0===y?"cursor-not-allowed bg-warm-100 text-tertiary":E?"cursor-wait bg-accent/70 text-white":"bg-accent text-white hover:bg-accent-dark"),children:E?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.A,{className:"h-5 w-5 animate-spin"}),"저장 중..."]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.A,{className:"h-5 w-5"}),g?"수정 완료":"리뷰 등록"]})}),(0,n.jsx)("p",{className:"mt-2 text-center text-xs text-tertiary",children:"작성한 리뷰는 검수 후 공개됩니다."})]})]})})]},"review-modal")})}}}]);

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.