fix(admin_basic,core,ecommerce,plugins,basic): stale dist 전수 재빌드 + 소스맵 게이트 audit 룰 신설

공개 — admin_basic 1.0.4 가 이전 소스로 빌드된 stale dist 를 릴리즈에
실어 주문 상세 합계행에 표현식 원문이 노출되던 회귀를 1.0.5 재빌드로 재수록.

- admin_basic 1.0.5: --production 재빌드 + 서빙 번들 회귀 E2E(red→green) + 시나리오 매니페스트
- 전수 점검: sourcemap 잔존 9확장+코어 3번들 --production 재빌드, untracked .map 3개 삭제
 (+1 bump: gdpr 1.0.3 / tosspayments 1.0.2 / verification_kginicis 1.0.3 /
 verification_nhnkcp 1.0.1 / basic 1.1.1 — 미공개 워킹 5건은 CHANGELOG 누적)
- 리터럴 대조 전수: 기능 drift 는 admin_basic 단독 확정(타 대상 차집합 0), 릴리즈 패리티 7/7 일치
- board/page 사문 build 스크립트 제거 (vite.config 부재 — module:build --all 실패 요인)
- audit 룰 신설: extension-dist-sourcemap-reference(error),
 extension-dist-source-literal-sync(warn) + coverage/룰 테스트/규정 문서 정정
This commit is contained in:
HeuJung committed 2026-08-12 14:31:26 +09:00
1 parent 2de257491f
commit 0bcd42ac04
60 files changed
+303 -134

No files matched your search

@@ -4,6 +4,12 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.3] - 2026-08-12
### Fixed
- 빌드 산출물이 존재하지 않는 소스맵 파일을 참조해 브라우저 개발자 도구 사용 시 불필요한 404 요청이 발생하던 문제를 수정했습니다.
## [1.0.2] - 2026-08-10
### Added
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "plugins/sirsoft-gdpr",
"description": "GDPR (General Data Protection Regulation) plugin for G7 platform by sirsoft",
"type": "library",
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",
"authors": [
{
-1
View File
@@ -1,2 +1 @@
var SirsoftGdpr=(function(p){"use strict";function Z(e,t){const n=e.toLowerCase(),r=t.toLowerCase();if(r.startsWith("*.")){const o=r.slice(1);return n.endsWith(o)&&n!==o.slice(1)}return n===r}function R(e,t){if(typeof window>"u"||typeof URL>"u")return null;let n,r;try{const o=new URL(e,window.location.href);r=o.protocol,n=o.hostname}catch{return null}if(r!=="http:"&&r!=="https:"||n===""||n===window.location.hostname)return null;for(const[o,i]of Object.entries(t))if(o!=="necessary"){for(const s of i)if(Z(n,s))return o}return null}const b="data-gdpr-category",_="gdpr-blocked-embed",j="data-gdpr-original",k=[`script[${b}]`,`iframe[${b}]`,"script[src]","iframe[src]","img[src]","link[href]"].join(", ");let l=null,y={categories:{},needs_renewal:!1},N={};function P(e){if(e&&typeof e=="object"&&"categories"in e){const t=e;return{categories:{...t.categories},needs_renewal:t.needs_renewal===!0}}return{categories:{...e},needs_renewal:!1}}function H(e){y=P(e),l!==null&&m()}function ee(e){N={...e},l!==null&&m()}function te(){typeof document>"u"||l!==null||(m(),l=new MutationObserver(e=>{for(const t of e)t.addedNodes.forEach(n=>{n instanceof HTMLElement&&re(n)})}),l.observe(document.documentElement,{childList:!0,subtree:!0}),window.addEventListener("gdpr:consent-changed",ne))}function ne(e){const t=e.detail;t!==null&&typeof t=="object"&&(y=P(t)),m()}function re(e){ie(e)&&C(e),e.querySelectorAll(k).forEach(t=>C(t))}function m(){typeof document>"u"||(document.querySelectorAll(`.${_}`).forEach(e=>{const t=e.dataset.gdprBlockedCategory;t&&A(t)&&se(e)}),document.querySelectorAll(k).forEach(e=>C(e)))}function C(e){if(e.classList.contains(_)||e.hasAttribute("data-gdpr-blocked-category"))return;const t=e.getAttribute(b);if(t!==null&&t!==""){if(A(t))return;M(e,t);return}const n=oe(e);if(n===null)return;const r=R(n,N);r!==null&&(A(r)||M(e,r))}function oe(e){return e instanceof HTMLScriptElement||e instanceof HTMLIFrameElement||e instanceof HTMLImageElement?e.getAttribute("src"):e instanceof HTMLLinkElement?e.getAttribute("href"):null}function ie(e){if(typeof e.matches!="function")return!1;try{return e.matches(k)}catch{return!1}}function M(e,t){const n=document.createElement("div");n.className=_,n.dataset.gdprBlockedCategory=t,n.dataset.gdprOriginalTag=e.tagName.toLowerCase(),n.setAttribute(j,e.outerHTML),n.setAttribute("aria-hidden","true"),n.style.display="none",e.replaceWith(n)}function se(e){const t=e.getAttribute(j);if(!t){e.remove();return}const n=document.createElement("div");n.innerHTML=t;const r=n.firstElementChild;r!==null?e.replaceWith(r):e.remove()}function A(e){return e==="necessary"?!0:y.needs_renewal?!1:y.categories[e]===!0}const ce=500,ae=["click","keydown","change","submit","pointerdown","touchstart"];let B=!1,E=0;function le(e){e.isTrusted&&(E=Date.now())}function ue(){if(!B){B=!0;for(const e of ae){const t=le;window.addEventListener(e,t,{capture:!0,passive:!0})}}}function G(){const e=window.event;return e&&e.isTrusted?!0:E===0?!1:Date.now()-E<=ce}const u=["XSRF-TOKEN","laravel_session","laravel_maintenance","gdpr_session"];let T=!1,a=null,w={functionalConsented:!1,necessaryAllowlist:u};function fe(e){const t=e.indexOf("=");return t<=0?null:e.substring(0,t).trim()}function de(e){return w.necessaryAllowlist.includes(e)}function ge(e){const t=fe(e);return t===null?!1:!!(pe(e)||de(t)||w.functionalConsented||G())}function pe(e){const t=e.toLowerCase(),n=t.match(/max-age\s*=\s*(-?\d+)/);return!!(n&&parseInt(n[1],10)<=0||t.includes("expires=thu, 01 jan 1970")||t.includes("expires=thu, 01-jan-1970"))}function ye(e){if(T)return;if(T=!0,w=e,a=Object.getOwnPropertyDescriptor(Document.prototype,"cookie")??null,!a||!a.set||!a.get){T=!1;return}const t=a.set,n=a.get;Object.defineProperty(Document.prototype,"cookie",{configurable:!0,get(){return n.call(this)},set(r){ge(r)&&t.call(this,r)}})}function $(e){w=e}const f=[{key:"g7_locale",storage:"localStorage",matchType:"exact"},{key:"auth_token",storage:"localStorage",matchType:"exact"},{key:"g7_cache_version",storage:"localStorage",matchType:"exact"},{key:"g7_cart_key",storage:"localStorage",matchType:"exact"},{key:"g7-devtools-panel",storage:"localStorage",matchType:"exact"},{key:"g7_devtools_",matchType:"prefix"},{key:"g7_filters_",matchType:"prefix"},{key:"g7_columns_",matchType:"prefix"},{key:"g7_order_",matchType:"prefix"}];let U=!1,S=null,h={functionalConsented:!1,necessaryAllowlist:f};function me(e,t){for(const n of h.necessaryAllowlist){if(n.storage&&n.storage!==t)continue;const r=n.matchType??"exact";if(r==="exact"&&n.key===e||r==="prefix"&&e.startsWith(n.key))return!0}return!1}function we(e,t){return!!(me(e,t)||h.functionalConsented||G())}function he(e){if(U)return;U=!0,h=e;const t=Storage.prototype;S=t.setItem,t.setItem=function(n,r){const o=this===window.sessionStorage?"sessionStorage":"localStorage";we(n,o)&&S&&S.call(this,n,r)}}function W(e){h=e}function be(e,t,n){for(const r of n){if(r.storage&&r.storage!==t)continue;const o=r.matchType??"exact";if(o==="exact"&&r.kLine truncated
//# sourceMappingURL=plugin.iife.js.map
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@plugins/sirsoft-gdpr",
"version": "1.0.2",
"version": "1.0.3",
"private": true,
"type": "module",
"scripts": {
+1 -1
View File
@@ -5,7 +5,7 @@
"ko": "GDPR (일반 데이터 보호 규정)",
"en": "GDPR (General Data Protection Regulation)"
},
"version": "1.0.2",
"version": "1.0.3",
"description": {
"ko": "쿠키 동의 배너, 자동 차단, 동의 이력 저장, 마이페이지 동의 철회를 제공하는 GDPR 대응 플러그인입니다.",
"en": "GDPR-ready plugin: cookie consent banner, auto-blocking, consent history, and mypage consent withdrawal."
@@ -1,3 +1,4 @@
// audit:allow extension-dist-source-literal-sync DEFAULT_BLOCKED_DOMAINS 는 현재 소비처가 없어 tree-shake 로 번들에서 제외된다 (도메인 문자열 부재 = stale 아님)
/**
* GDPR 도메인 기반 차단 매칭 + 기본 카탈로그
*
@@ -22,6 +22,7 @@
### Fixed
- 빌드 산출물이 존재하지 않는 소스맵 파일을 참조해 브라우저 개발자 도구 사용 시 불필요한 404 요청이 발생하던 문제를 수정했습니다.
- 이커머스 관리자 주문설정에서 다른 탭에 갔다 돌아오면 간편결제 항목의 브랜드 로고가 사라지고 회색 기본 아이콘으로 남던 문제를 수정했습니다. 화면을 새로고침해야만 다시 표시됐습니다.
- 결제 취소 기록의 환불 금액에 원화 단위가 고정 표기되던 문제를 수정했습니다. 해외 결제(엔화 등) 취소도 실제 결제 통화로 표시됩니다.
@@ -163,7 +164,6 @@
- KG 이니시스 플러그인 설정 화면의 간편결제 토글은 이커머스 주문설정으로 통합 — 일반 결제수단과 동일한 인터페이스에서 활성화/정렬/최소 주문금액을 관리할 수 있습니다.
### Added
- 일본 결제(CBT) 설정에 JPPG 결제창 표시용 가맹점명/문의처 입력 항목을 추가했습니다.
@@ -88,4 +88,3 @@
</main>
</body>
</html>`),t.document.close()}function E(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}const D="sirsoft-pay_kginicis",be="__kginicisOrderShowInjectorInstalled",K="kginicis-mp-receipt-row",ke=/^(?:\/mypage\/orders\/([^/]+)|\/shop\/guest\/orders\/([^/]+))$/,G=new Map;function Tt(e){try{const n=window.G7Core?.getState,i=n?.()?.currentDataContext?.order?.data;return i&&(i.order_number===e||i.id!==void 0&&String(i.id)===e)?i:null}catch{return null}}function xt(){const e=document.getElementById("order_payment_info_panel");if(e)return Array.from(e.children).find(r=>r.className?.includes("space-y"))??e;const t=Array.from(document.querySelectorAll("h3")).find(r=>{const o=r.textContent?.trim()??"";return o.includes("결제 정보")||/^Payment Information$/i.test(o)});if(!t)return null;const n=t.parentElement?.parentElement;return n?Array.from(n.children).find(r=>r.className?.includes("space-y"))??n:null}function Rt(e,t){if(!t)return!1;const n=Array.from(e.querySelectorAll("div"));for(const r of n){const o=Array.from(r.children).filter(a=>a instanceof HTMLElement&&a.tagName==="SPAN");if(o.length<2)continue;const i=o[0].textContent?.trim();if(i!=="결제 방법"&&i!=="결제수단"&&i!=="Payment Method")continue;const s=o[o.length-1];return s.textContent?.trim()===t?(r.dataset.kginicisPaymentMethodRow="true",!0):(s.textContent=t,s.dataset.kginicisPaymentMethodPatched="true",r.dataset.kginicisPaymentMethodRow="true",!0)}return!1}function Mt(e,t){const n=document.createElement("div");n.id=K,n.className="flex items-center justify-between",n.dataset.kginicisReceiptRow="mypage-order";const r=document.createElement("span");r.className="text-gray-500 dark:text-gray-400 text-sm",r.textContent=vt(t);const o=document.createElement("button");return o.type="button",o.dataset.kginicisReceiptButton="mypage-order",o.className="inline-flex items-center gap-1 text-sm text-blue-600 dark:text-blue-400 hover:underline disabled:opacity-50",o.textContent=A(t),o.addEventListener("click",async()=>{o.disabled=!0,o.textContent="로딩 중...";const i=await v(e);o.disabled=!1,o.textContent=A(i??t),C(i)&&we(i)}),n.appendChild(r),n.appendChild(o),n}async function Nt(e,t){const n=Tt(e),r=n?.payment;if(r&&(r.pg_provider!=="kginicis"||!r.transaction_id))return!0;const o=n?.order_number??(t?e:null);if(!o)return!1;if(!t&&n&&!r)return!0;const i=xt();if(!i)return!1;const{status:s,info:a}=await ge(o);if(!t&&s===404)return!0;const c=r?.payment_status==="paid",u=a?.receipt_type==="cbt_confirmation";if(r&&!c&&!u)return!0;if(!r&&!C(a))return!1;const d=Rt(i,a?.payment_method_display_label);return!document.getElementById(K)&&C(a)&&(i.appendChild(Mt(o,a)),console.info(`[${D}] receipt button injected on mypage order show`)),d&&console.info(`[${D}] payment method display patched on mypage order show`),!!(document.getElementById(K)||d)}function Lt(e,t){if(G.has(e))return;let n=0;const r=window.setInterval(()=>{n++,Nt(e,t).then(o=>{(o||n>=30)&&(window.clearInterval(r),G.delete(e))})},400);G.set(e,r)}function Ot(){const e=location.pathname.match(ke);if(e){const t=e[1],n=e[2],r=t??n;r&&Lt(r,n!==void 0)}}function $t(){if(typeof window>"u")return;const e=window;if(e[be])return;e[be]=!0,console.info(`[${D}] mypage order show injector installed`);let t=null;const n=(a=1500)=>{t!==null&&window.clearTimeout(t),t=window.setTimeout(()=>{t=null,Ot()},a)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>n()):n();const r=history.pushState.bind(history);history.pushState=(...a)=>{r(...a),n(600)};const o=history.replaceState.bind(history);history.replaceState=(...a)=>{o(...a),n(600)},window.addEventListener("popstate",()=>n(500));const i=document.getElementById("app")??document.body;new MutationObserver(()=>{ke.test(location.pathname)&&n(250)}).observe(i,{childList:!0,subtree:!0})}const j="sirsoft-pay_kginicis",Ce="__kginicisAdminPaymentDisplayInjectorInstalled",Dt=/^\/admin\/ecommerce\/orders\/([^/]+)$/;function Kt(){return localStorage.getItem("auth_token")}async function Gt(e){const t=Kt();if(!t)return null;try{const n=await fetch(`/api/plugins/${j}/admin/orders/${e}/transaction-status`,{headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}});if(!n.ok)return null;const r=await n.json();return("data"in r?r.data:r)??null}catch{return null}}function jt(e){return Array.from(e.children).filter(t=>t instanceof HTMLElement)}function Yt(e,t){let n=!1;const r=Array.from(e.querySelectorAll("div"));for(const o of r){const i=jt(o),s=i.findIndex(l=>l.textContent?.trim()==="결제수단");if(s<0)continue;const a=i.slice(s+1).find(l=>l.textContent?.trim()&&l.textContent.trim()!=="결제수단");if(!a)continue;const c=i.slice(s+2).find(l=>/^\(.+\)$/.test(l.textContent?.trim()??"")),u=c?.textContent?.trim().replace(/^\(|\)$/g,"")??"",d=u&&t.endsWith(")")?t.replace(/\)$/,`, ${u})`):t;a.textContent?.trim()!==d&&(a.textContent=d,a.dataset.kginicisPaymentMethodPatched="true"),o.dataLine truncated
//# sourceMappingURL=plugin.iife.js.map
@@ -12,6 +12,7 @@
### Fixed
- 빌드 산출물이 존재하지 않는 소스맵 파일을 참조해 브라우저 개발자 도구 사용 시 불필요한 404 요청이 발생하던 문제를 수정했습니다.
- 이커머스 관리자 주문설정에서 다른 탭에 갔다 돌아오면 간편결제 항목의 브랜드 색상 배지가 사라지고 회색 기본 아이콘으로 남던 문제를 수정했습니다. 화면을 새로고침해야만 다시 표시됐습니다.
- 관리자 주문 상세의 거래 조회에서 취소·환불 금액에 원화 단위가 고정 표기되던 문제를 수정했습니다. 이제 주문 시점 기준 통화로 표시됩니다.
- 결제 취소 기록의 환불 금액 표기도 결제 통화를 따르도록 수정했습니다.
@@ -15,4 +15,3 @@ try {
}
<\/script>
</body></html>`),X.close(),y=window.setTimeout(()=>{N(new Error("KCP SDK load timeout"))},15e3),f.__kcpReady=()=>{y!==void 0&&(clearTimeout(y),y=void 0)}})}const Xe={nhnkcp_payco:"PAYCO",nhnkcp_naverpay:"네이버페이",nhnkcp_naverpay_point:"네이버페이 포인트",nhnkcp_kakaopay:"카카오페이",nhnkcp_applepay:"Apple Pay"},Ze="0 0 0 2px #ffffff, 0 0 0 5px rgba(0,0,0,0.55)";function oe(){return document.querySelector(".nhnkcp-easy-pay-btns")??null}function re(){const e=oe();e&&e.querySelectorAll("button").forEach(t=>{t.style.boxShadow="",t.style.outline=""})}function et(e){const t=oe();if(!t)return;const n=Xe[e];t.querySelectorAll("button").forEach(o=>{o.textContent?.trim()===n?(o.style.boxShadow=Ze,o.style.outline="none"):(o.style.boxShadow="",o.style.outline="")})}function tt(e){const t=e.params?.paymentMethod;if(!t)return;const n=window.G7Core;if(S(t)&&!x()){const r=M();n?.state?.setLocal?.({paymentErrorMessage:r,isSubmittingOrder:!1}),n?.modal?.open?.("nhnkcp_payment_error_modal"),re();return}const o=typeof t=="string"&&t.startsWith("nhnkcp_");n?.state?.setLocal?.({paymentMethod:t}),o?et(t):re()}function nt(e){const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","readonly"),t.style.position="fixed",t.style.left="-9999px",t.style.top="0",document.body.appendChild(t),t.select();try{document.execCommand("copy")}finally{t.remove()}}async function ot(e){const t=String(e.params?.text??"");if(t!==""){if(navigator.clipboard&&typeof navigator.clipboard.writeText=="function"){await navigator.clipboard.writeText(t);return}nt(t)}}const ae={requestPayment:Je,setPaymentMethod:tt,copyToClipboard:ot},se="/api/modules/sirsoft-ecommerce/user/orders",$="sirsoft-pay_nhnkcp",ie={info:(...e)=>console.info(`[${$}]`,...e),warn:(...e)=>console.warn(`[${$}]`,...e),error:(...e)=>console.error(`[${$}]`,...e)};function rt(e){return typeof e=="string"?e:e instanceof URL?e.toString():typeof Request<"u"&&e instanceof Request?e.url:String(e)}function at(e,t){return t?.method?t.method.toUpperCase():typeof Request<"u"&&e instanceof Request?e.method.toUpperCase():"GET"}function st(e,t){if(t!=="POST")return!1;const n=e.split("?")[0].split("#")[0];return n===se||n.endsWith(se)}function it(e){try{return JSON.parse(e).payment_method}catch{return}}function ct(e){return new Response(JSON.stringify({success:!1,message:e,error:e,errors:{payment_method:[e]}}),{status:422,statusText:"Unprocessable Content",headers:{"Content-Type":"application/json"}})}function dt(){if(typeof window>"u"||typeof window.fetch!="function")return;const e="__sirsoftNhnkcpInterceptorInstalled",t=window;if(t[e])return;t[e]=!0;const n=window.fetch.bind(window);window.fetch=async function(r,a){const s=rt(r),i=at(r,a);if(!st(s,i))return n(r,a);let c;if(a?.body&&typeof a.body=="string"&&(c=it(a.body)),S(c)&&!x()){const d=M();return ie.warn(d),ct(d)}return n(r,a)},ie.info("order request interceptor installed (Apple Pay device guard)")}const L="sirsoft-pay_nhnkcp",ce="__kcpOcReceiptInjectorInstalled",de="kcp-oc-receipt-btn",lt=/^\/shop\/orders\/([^/]+)\/complete$/;function le(){return localStorage.getItem("auth_token")}async function ut(e){const t=le();if(!t)return null;try{const n=await fetch(`/api/modules/sirsoft-ecommerce/user/orders/${e}`,{headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}});return n.ok?(await n.json())?.data?.payment??null:null}catch{return null}}async function O(e){const t=le();if(!t)return null;try{const n=await fetch(`/api/plugins/${L}/user/orders/${e}/receipt`,{headers:{Authorization:`Bearer ${t}`,Accept:"application/json"}});return n.ok?await n.json():null}catch{return null}}function ue(e,t,n){const o=document.createElement("button");return o.type="button",o.className=t,o.textContent=e,o.addEventListener("click",()=>n(o)),o}function pt(e){if(!e)return!1;const t=Array.from(document.querySelectorAll("div"));for(const n of t){const o=Array.from(n.children).filter(s=>s instanceof HTMLElement&&s.tagName==="SPAN");if(o.length<2)continue;const r=o[0].textContent?.trim();if(r!=="결제 방법"&&r!=="결제수단"&&r!=="결제 방식")continue;const a=o[o.length-1];return a.textContent?.trim()===e?(n.dataset.nhnkcpPaymentMethodRow="true",!0):(a.textContent=e,a.dataset.nhnkcpPaymentMethodPatched="true",n.dataset.nhnkcpPaymentMethodRow="true",!0)}return!1}async function mt(e){if(document.getElementById(de))return;const t=await ut(e);if(!t||t.pg_provider!=="nhnkcp"||!t.transaction_id||!t.paid_at)return;const n=Array.from(document.querySelectorAll('button[type="button"]')).find(c=>c.className.includes("bg-blue-600"));if(!n?.parentElement)return;const o=await O(e);pt(o?.payment_method_display_label);const r=n.parentElement,a=ue("영수증 조회",n.className.replace(/bg-blue-\d+/g,"bg-green-600").replace(/hover:bg-blue-\d+/g,"hover:bg-green-700"),async c=>{c.disabled=!0,c.textContent="로딩 중...";const d=await O(e);if(c.disabled=!1,c.textContent="영수증 조회",d){const l=window.KcpReceiptPopup;l&&new l({url:d.reLine truncated
//# sourceMappingURL=plugin.iife.js.map
@@ -12,6 +12,7 @@
### Fixed
- 빌드 산출물이 존재하지 않는 소스맵 파일을 참조해 브라우저 개발자 도구 사용 시 불필요한 404 요청이 발생하던 문제를 수정했습니다.
- 이커머스 관리자 주문설정에서 다른 탭에 갔다 돌아오면 간편결제 항목의 브랜드 색상 배지가 사라지고 회색 기본 아이콘으로 남던 문제를 수정했습니다. 화면을 새로고침해야만 다시 표시됐습니다.
- 결제 취소 기록과 환불 금액 오류 안내에 원화 단위가 고정 표기되던 문제를 수정했습니다. 이제 실제 결제 통화로 표시됩니다.
- 쇼핑몰 주소를 기본값이 아닌 값으로 바꾸거나 주소 없이 운영하는 상점에서, 결제를 마치거나 결제에 실패한 구매자가 존재하지 않는 페이지로 이동하던 문제를 수정했습니다. 이동 주소가 기본 주소로 고정돼 있었기 때문이며, 이제 상점 주소 설정을 따라갑니다. 이미 운영 중인 사이트도 업데이트 시 자동으로 반영되며, 이동 주소를 직접 입력해 두었다면 그 값은 그대로 유지됩니다. (#85 @hwaryeon1234 님께서 제보해주셨습니다.)
@@ -1,2 +1 @@
(function(){"use strict";function le(e){return/^https?:\/\//i.test(e)||e.startsWith("/api/")?e:e.startsWith("/plugins/")?`/api${e}`:e.startsWith("plugins/")?`/api/${e}`:e}function de(e){return e.trim().slice(0,160)}async function ue(e,t="nicepay-window-closed"){if(!e.closeReportUrl)return;const n={oid:e.oid,price:Number(e.price),buyer_email:e.buyer_email??"",buyer_phone:e.buyer_phone??"",payment_method:e.payment_method??"",reason:de(t)||"nicepay-window-closed"};try{const a=window.G7Core?.api;if(typeof a?.post=="function"){await a.post(e.closeReportUrl,n);return}await fetch(le(e.closeReportUrl),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0})}catch(a){console.warn("[sirsoft-pay_nicepayments] failed to report payment window close",a)}}function pe(e){return new Promise((t,n)=>{if(document.querySelector(`script[src="${e}"]`)){t();return}const a=document.createElement("script");a.src=e,a.onload=()=>t(),a.onerror=()=>n(new Error(`Failed to load script: ${e}`)),document.head.appendChild(a)})}function me(e,t){const n=document.createElement("form");n.id="nicepayForm",n.method="post",n.action=e,n.acceptCharset="utf-8";for(const[a,r]of Object.entries(t)){const o=document.createElement("input");o.type="hidden",o.name=a,o.value=r,n.appendChild(o)}return document.body.appendChild(n),n}const ye="/plugins/sirsoft-pay_nicepayments/payment/callback",fe="https://web.nicepay.co.kr/v3/v3Payment.jsp";function he(){if(typeof navigator>"u")return!1;const e=navigator;if(e.userAgentData?.mobile!==void 0)return e.userAgentData.mobile;const t=(navigator.userAgent||"").toLowerCase();return!!(/android|iphone|ipod|windows phone|iemobile|blackberry|opera mini|mobile safari/.test(t)||(navigator.maxTouchPoints??0)>1&&!t.includes("windows")&&!t.includes("macintosh"))}async function be(e,t){const{pgPaymentData:n,paymentMethod:a}=e.params??{},r=window.__templateApp?.globalState?._local,o=a??n?.payment_method??r?.paymentMethod??"card";if(!n){console.error("[sirsoft-pay_nicepayments] pgPaymentData is required");return}const i=window.G7Core;try{const s=await i.api.get("/modules/sirsoft-ecommerce/payments/client-config/nicepayments");if(!s.data){console.error("[sirsoft-pay_nicepayments] Failed to fetch client config",s);return}const l=s.data,d=he();if(!d&&(await pe(l.sdk_url),typeof window.goPay!="function")){i?.toast?.error?.("나이스페이먼츠 SDK를 불러올 수 없습니다. 잠시 후 다시 시도해주세요."),i?.state?.setLocal?.({isSubmittingOrder:!1,paymentMethod:o});return}const _=window.location.origin+l.sign_data_url,u=typeof localStorage<"u"?localStorage.getItem("auth_token"):null,te={"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest",Accept:"application/json"};u&&(te.Authorization=`Bearer ${u}`);const ne=await fetch(_,{method:"POST",credentials:"include",headers:te,body:JSON.stringify({amt:n.amount,moid:n.order_number,buyer_email:n.customer_email??"",buyer_phone:n.customer_phone??""})});if(!ne.ok)throw new Error("SignData 생성에 실패했습니다.");const L=await ne.json(),ae=window.location.origin+ye,M=typeof o=="string"&&o.startsWith("nicepay_"),oe=M?"CARD":{card:"CARD",vbank:"VBANK",bank:"BANK",phone:"CELLPHONE"}[o??"card"]??"CARD",c={PayMethod:oe,GoodsName:n.order_name,Amt:String(n.amount),MID:L.mid,Moid:n.order_number,BuyerName:n.customer_name??"",BuyerEmail:n.customer_email??"",BuyerTel:n.customer_phone??"",ReturnURL:ae,EdiDate:L.ediDate,SignData:L.signData,CharSet:"utf-8",GoodsCl:"1",DirectShowOpt:"",DirectEasyPay:"",NicepayReserved:"",EasyPayMethod:"",MallReserved:"",MallReserved1:""};oe==="CELLPHONE"&&(c.GoodsCl=n.goods_cl??"1");const ft=l.useEscrow&&!M;if(c.TransType=ft?"1":"0",M)switch(c.DirectShowOpt="CARD",c.MallReserved=`nicepay_easy_pay_method=${encodeURIComponent(o)}`,c.MallReserved1=o,o){case"nicepay_naverpay":c.DirectEasyPay="E020",c.EasyPayMethod="E020=CARD";break;case"nicepay_kakaopay":c.NicepayReserved="DirectKakao=Y";break;case"nicepay_samsungpay":c.DirectEasyPay="E021";break;case"nicepay_applepay":c.DirectEasyPay="E025";break;case"nicepay_payco":c.NicepayReserved="DirectPayco=Y";break;case"nicepay_skpay":c.NicepayReserved="DirectPay11=Y";break;case"nicepay_ssgpay":c.DirectEasyPay="E007";break;case"nicepay_lpay":c.DirectEasyPay="E018";break}try{const m=(await i.api.get(`/modules/sirsoft-ecommerce/user/orders/${n.order_number}`))?.data;if(m){const P=Number(m.total_tax_amount??0),h=Number(m.total_vat_amount??0),ce=Number(m.total_tax_free_amount??0);(P>0||h>0||ce>0)&&(c.TaxAmt=String(P),c.VatAmt=String(h),c.TaxFreeAmt=String(ce))}}catch{}const p=me(ae,c);if(d){p.action=fe,p.acceptCharset="euc-kr";const f=p.querySelector('input[name="CharSet"]');f&&(f.value="euc-kr"),p.submit();return}window.nicepaySubmit=()=>{p.submit()};let re=!1;const ht=new Set(document.body.children),ie=(f,m)=>{if(re)return;re=!0;const P=[f,m].filter(Boolean).join(": ")||"nicepay-window-closed";ue({closeReportUrl:l.close_report_url,oid:n.order_number,price:Number(n.aLine truncated
//# sourceMappingURL=plugin.iife.js.map
@@ -4,6 +4,12 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.2] - 2026-08-12
### Fixed
- 빌드 산출물이 존재하지 않는 소스맵 파일을 참조해 브라우저 개발자 도구 사용 시 불필요한 404 요청이 발생하던 문제를 수정했습니다.
## [1.0.1] - 2026-08-11
### Fixed
@@ -51,7 +57,6 @@
### Fixed
- 쇼핑몰 주소를 기본값이 아닌 값으로 바꾸거나 주소 없이 운영하는 상점에서, 결제를 마치거나 결제에 실패한 구매자가 존재하지 않는 페이지로 이동하던 문제를 수정했습니다. 이동 주소가 기본 주소로 고정돼 있었기 때문이며, 이제 상점 주소 설정을 따라갑니다. 이미 운영 중인 사이트도 업데이트 시 자동으로 반영되며, 이동 주소를 직접 입력해 두었다면 그 값은 그대로 유지됩니다. (#85 @hwaryeon1234 님께서 제보해주셨습니다.)
- 전액 환불이 부분취소로 잘못 요청되던 문제를 수정했습니다. 이미 부분취소한 이력이 있는 주문의 잔액 취소도 정확한 금액으로 처리됩니다.
- 면세 상품이 포함된 주문을 환불할 때 면세 금액이 함께 전달되지 않아 부가세가 잘못 계산되던 문제를 수정했습니다.
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"identifier": "sirsoft-tosspayments",
"version": "1.0.0",
"version": "1.0.1",
"components": {
"basic": [],
"composite": [],
@@ -1,7 +1,7 @@
{
"name": "plugins/sirsoft-tosspayments",
"description": "TossPayments PG Plugin for G7 platform",
"version": "1.0.1",
"version": "1.0.2",
"type": "library",
"authors": [
{
@@ -1,2 +1 @@
(function(){"use strict";function O(e){return new Promise((t,s)=>{if(document.querySelector(`script[src="${e}"]`)){t();return}const n=document.createElement("script");n.src=e,n.async=!0,n.onload=()=>t(),n.onerror=()=>s(new Error(`Failed to load script: ${e}`)),document.head.appendChild(n)})}function $(e,t){if(!e.order_sheet_mode||!t)return{method:"CARD",easyPay:null};const s=(e.enabled_methods??[]).find(n=>n.id===t);return s?{method:s.method,easyPay:s.easy_pay_provider}:{method:"CARD",easyPay:null}}function T(e){if(e==="on")return!0;if(e==="off")return!1}function q(e,t){const s={validHours:e.vbank?.valid_hours??24},n=e.vbank?.cash_receipt_type??"";n&&(s.cashReceipt={type:n});const o=T(e.use_escrow);return o!==void 0&&(s.useEscrow=o),s}function A(e,t,s){if(t.use_escrow==="off")return;const n=s.escrow_products??[];n.length>0&&(e.escrowProducts=n)}async function F(e,t){const s=e.params||{},{pgPaymentData:n}=s;if(!n){console.error("[sirsoft-tosspayments] pgPaymentData is required");return}const o=window.G7Core,r=s.paymentMethod??o?.state?.getLocal?.()?.paymentMethod;try{const a=await o.api.get("/modules/sirsoft-ecommerce/payments/client-config/tosspayments");if(!a.data){console.error("[sirsoft-tosspayments] Failed to fetch client config",a);return}const i=a.data;if(window.TossPayments||await O(i.sdk_url),window.TossPayments||await new Promise(m=>setTimeout(m,100)),!window.TossPayments){console.error("[sirsoft-tosspayments] TossPayments SDK not available");return}const te=window.TossPayments(i.client_key).payment({customerKey:n.customer_key??window.TossPayments.ANONYMOUS}),g=n.currency??"KRW",{method:d,easyPay:b}=$(i,r);if(g!=="KRW"&&(d!=="CARD"||b!==null)){console.warn("[sirsoft-tosspayments] non-KRW currency supports card only",{currency:g,method:d}),o?.state?.setLocal?.({paymentErrorMessage:o?.t?.("sirsoft-tosspayments.errors.non_krw_method")??"This payment method is available for KRW only.",isSubmittingOrder:!1}),o?.modal?.open?.("tosspayments_payment_error_modal");return}const D=window.location.origin,c={method:d,amount:{currency:g,value:n.amount},orderId:n.order_number,orderName:n.order_name,successUrl:D+i.callback_urls.success,failUrl:D+i.callback_urls.fail,customerEmail:n.customer_email??void 0,customerName:n.customer_name??void 0,customerMobilePhone:n.customer_phone??void 0};if(d==="CARD")c.card={flowMode:"DEFAULT",useCardPoint:!1,useAppCardOnly:!1},b&&(c.card.flowMode="DIRECT",c.card.easyPay=b);else if(d==="VIRTUAL_ACCOUNT")c.virtualAccount=q(i,n),A(c,i,n);else if(d==="TRANSFER"){const m=T(i.use_escrow);m!==void 0&&(c.transfer={useEscrow:m}),A(c,i,n)}await te.requestPayment(c)}catch(a){if(console.error("[sirsoft-tosspayments] requestPayment error",a),a?.code==="USER_CANCEL"){console.info("[sirsoft-tosspayments] Payment cancelled by user");try{await o.api.post(`/modules/sirsoft-ecommerce/orders/${n.order_number}/cancel-payment`,{cancel_code:a.code,cancel_message:a.message})}catch(x){console.warn("[sirsoft-tosspayments] Failed to record cancellation",x)}o?.state?.setLocal?.({isSubmittingOrder:!1}),o?.modal?.open?.("tosspayments_payment_cancel_modal");return}const i=a?.message??"Unknown error";o?.state?.setLocal?.({paymentErrorMessage:i,isSubmittingOrder:!1}),o?.modal?.open?.("tosspayments_payment_error_modal")}}const v={requestPayment:F},U="sirsoft-tosspayments",E="__tossAdminPaymentMethodBrandInjectorInstalled",S="__tossAdminPaymentMethodBrandSyncListenerAttached",B=/^\/admin\/ecommerce\/settings\/?$/,L='[data-toss-admin-payment-brand-mark="true"]',K=200,G=120,H=[{id:"toss_tosspay",labels:["토스페이 (토스페이먼츠)","토스페이 간편결제 — 토스페이먼츠를 통해 처리","TossPay (TossPayments)","TossPay easy payment — processed via TossPayments"],shortLabels:[],markLines:["T"],markClassName:"bg-blue-500 text-white"},{id:"toss_kakaopay",labels:["카카오페이 (토스페이먼츠)","카카오페이 간편결제 — 토스페이먼츠를 통해 처리","KakaoPay (TossPayments)","KakaoPay easy payment — processed via TossPayments"],shortLabels:[],markLines:["K"],markClassName:"bg-yellow-400 text-gray-950"},{id:"toss_naverpay",labels:["네이버페이 (토스페이먼츠)","네이버페이 간편결제 — 토스페이먼츠를 통해 처리","NaverPay (TossPayments)","NaverPay easy payment — processed via TossPayments"],shortLabels:[],markLines:["N"],markClassName:"bg-green-500 text-white"},{id:"toss_payco",labels:["페이코 (토스페이먼츠)","페이코 간편결제 — 토스페이먼츠를 통해 처리","PAYCO (TossPayments)","PAYCO easy payment — processed via TossPayments"],shortLabels:[],markLines:["P"],markClassName:"bg-red-500 text-white"},{id:"toss_samsungpay",labels:["삼성페이 (토스페이먼츠)","삼성페이 간편결제 — 토스페이먼츠를 통해 처리","Samsung Pay (TossPayments)","Samsung Pay easy payment — processed via TossPayments"],shortLabels:[],markLines:["S"],markClassName:"bg-blue-600 text-white"}];let M=null,u=null,y=!1;function Y(Line truncated
//# sourceMappingURL=plugin.iife.js.map
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@g7/sirsoft-tosspayments",
"version": "1.0.1",
"version": "1.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@g7/sirsoft-tosspayments",
"version": "1.0.1",
"version": "1.0.2",
"devDependencies": {
"jsdom": "^27.4.0",
"typescript": "^5.3.3",
@@ -1,6 +1,6 @@
{
"name": "@g7/sirsoft-tosspayments",
"version": "1.0.1",
"version": "1.0.2",
"type": "module",
"private": true,
"scripts": {
@@ -5,7 +5,7 @@
"ko": "토스페이먼츠",
"en": "TossPayments"
},
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",
"description": {
"ko": "토스페이먼츠 결제 게이트웨이 (통합결제창 연동)",
@@ -4,6 +4,12 @@ All notable changes to this plugin will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.0.3] - 2026-08-12
### Fixed
- 빌드 산출물이 존재하지 않는 소스맵 파일을 참조해 브라우저 개발자 도구 사용 시 불필요한 404 요청이 발생하던 문제를 수정했습니다.
## [1.0.2] - 2026-08-10
### Changed
@@ -1,7 +1,7 @@
{
"name": "plugins/sirsoft-verification_kginicis",
"description": "KG Inicis Identity Verification provider for G7",
"version": "1.0.2",
"version": "1.0.3",
"type": "library",
"authors": [
{
@@ -1,2 +1 @@
var SirsoftVerificationKginicis=(function(o){"use strict";const s="sirsoft-verification_kginicis",D="inicis",C="width=400,height=640,scrollbars=yes,resizable=yes",L="https://sa.inicis.com/auth",I="identity-challenge-modal",l={info:(...e)=>console.info(`[${s}]`,...e),warn:(...e)=>console.warn(`[${s}]`,...e),error:(...e)=>console.error(`[${s}]`,...e)};function a(){return window.G7Core??null}function v(){return`${window.location.origin}/plugins/${s}/plugin/inicis/callback`}function P(e,i){const t=document.createElement("form");t.setAttribute("name","saForm"),t.setAttribute("method","POST"),t.setAttribute("action",L),t.setAttribute("target",i),t.setAttribute("accept-charset","UTF-8"),t.style.display="none";const f={mid:e.mid,reqSvcCd:e.reqSvcCd,mTxId:e.mtxid,authHash:e.authHash,flgFixedUser:e.flgFixedUser,successUrl:v(),failUrl:v(),reservedMsg:e.reservedMsg};for(const[d,c]of Object.entries(f)){const r=document.createElement("input");r.type="hidden",r.name=d,r.value=c,t.appendChild(r)}document.body.appendChild(t),t.submit(),window.setTimeout(()=>{try{t.remove()}catch{}},0)}function _(e){const t=a()?.state?.set;typeof t=="function"&&t({identityChallenge:{providerInProgress:e}})}const S={NOT_ADULT:"$t:sirsoft-verification_kginicis.errors.not_adult",INVALID_AUTH_URL:"$t:sirsoft-verification_kginicis.errors.invalid_auth_url",DECRYPT_FAILED:"$t:sirsoft-verification_kginicis.errors.decrypt_failed",REMOTE_CALL_FAILED:"$t:sirsoft-verification_kginicis.errors.remote_call_failed",NOT_FOUND:"$t:sirsoft-verification_kginicis.errors.not_found",ALREADY_CONSUMED:"$t:sirsoft-verification_kginicis.errors.already_consumed",IDENTITY_BINDING_MISMATCH:"$t:sirsoft-verification_kginicis.errors.binding_mismatch",INCOMPLETE_IDENTITY:"$t:sirsoft-verification_kginicis.errors.incomplete_identity",STORAGE_FAILED:"$t:sirsoft-verification_kginicis.errors.storage_failed"},T="$t:sirsoft-verification_kginicis.errors.verify_failed",U=new Set(["NOT_ADULT"]);function O(e){return S[e]??T}function b(){const e=a()?.identity?.markDomainNoticeShown;if(typeof e=="function")try{e()}catch{}}async function g(e,i="error"){const t=a()?.dispatch;if(typeof t=="function")try{await t({handler:"toast",params:{type:i,message:e}})}catch{}}function N(e){const i=a()?.dispatch;return typeof i!="function"?Promise.resolve():i({handler:"sequence",params:{actions:[{handler:"resolveIdentityChallenge",params:e},{handler:"closeModal",target:I}]}}).catch(()=>{})}async function h(){const e=a(),i=e?.state?.getGlobal?.()?.identityChallenge??e?.state?.get?.()?.identityChallenge;if(!i){l.error("_global.identityChallenge 미설정 — 코어 모달 진입 흐름 확인 필요");return}const t=i.public_payload;if(!t?.mid||!t?.mtxid||!t?.authHash){l.error("public_payload 의 mid/mtxid/authHash 부재 — Provider.requestChallenge 응답 확인 필요",t),await g("본인인증 페이로드가 준비되지 않았습니다. 잠시 후 다시 시도해 주세요.");return}const f="sa_popup",d=window.open("",f,C);if(!d){l.error("window.open null — 팝업 차단됨"),await g("팝업이 차단되었습니다. 브라우저 팝업 허용 설정 후 다시 시도해 주세요.");return}_(!0),P(t,f);let c=!1,r=null,u=null;const p=()=>{u&&(window.removeEventListener("message",u),u=null),r!==null&&(window.clearInterval(r),r=null)};u=A=>{if(A.origin!==window.location.origin)return;const n=A.data;if(!n||n.type!=="identity_result"||c)return;c=!0,p();try{d.close()}catch{}_(!1);const R=n.verification_token?{result:"verified",token:n.verification_token}:n.identity_error?{result:"failed",failureCode:n.identity_error}:{result:"cancelled"};n.identity_error&&(U.has(n.identity_error)&&b(),g(O(n.identity_error),"error")),N(R)},window.addEventListener("message",u),r=window.setInterval(()=>{if(c){p();return}d.closed&&(c=!0,p(),_(!1))},500)}function y(){const i=a()?.getActionDispatcher;if(typeof i!="function")return!1;const t=i();return!t||typeof t.registerHandler!="function"?!1:(t.registerHandler(`${s}.startAuth`,h,{category:"plugin",source:s}),l.info("startAuth handler registered"),!0)}function E(){if(y())return;let e=0;const i=window.setInterval(()=>{e++,(y()||e>=50)&&(window.clearInterval(i),e>=50&&l.warn("G7Core ActionDispatcher 미준비 — handler 등록 실패"))},100)}function w(){E()}function m(){E()}return m(),window.__SirsoftVerificationKginicis={identifier:s,init:m,initPlugin:w,startAuthHandler:h},o.MODAL_ID=I,o.PLUGIN_IDENTIFIER=s,o.PROVIDER_ID=D,o.init=m,o.initPlugin=w,o.startAuthHandler=h,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),o})({});
//# sourceMappingURL=plugin.iife.js.map
@@ -1,12 +1,12 @@
{
"name": "@g7/sirsoft-verification_kginicis",
"version": "1.0.2",
"version": "1.0.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@g7/sirsoft-verification_kginicis",
"version": "1.0.2",
"version": "1.0.3",
"devDependencies": {
"jsdom": "^27.4.0",
"typescript": "^5.3.3",
@@ -1,6 +1,6 @@
{
"name": "@g7/sirsoft-verification_kginicis",
"version": "1.0.2",
"version": "1.0.3",
"type": "module",
"private": true,
"scripts": {
@@ -5,7 +5,7 @@
"ko": "KG이니시스 본인인증",
"en": "KG Inicis Identity Verification"
},
"version": "1.0.2",
"version": "1.0.3",
"license": "MIT",
"description": {
"ko": "KG이니시스 통합인증의 본인확인(reqSvcCd=03)을 G7 코어 IDV 인프라에 Provider 로 등록하는 플러그인",
@@ -4,6 +4,12 @@ All notable changes to this plugin will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.0.1] - 2026-08-12
### Fixed
- 빌드 산출물이 존재하지 않는 소스맵 파일을 참조해 브라우저 개발자 도구 사용 시 불필요한 404 요청이 발생하던 문제를 수정했습니다.
## [1.0.0] - 2026-08-10
### Added
@@ -1,7 +1,7 @@
{
"name": "plugins/sirsoft-verification_nhnkcp",
"description": "NHN KCP mobile identity verification provider for G7",
"version": "1.0.0",
"version": "1.0.1",
"type": "library",
"authors": [
{
@@ -1,2 +1 @@
var SirsoftVerificationNhnkcp=function(c){"use strict";const i="sirsoft-verification_nhnkcp",M="nhnkcp",k="width=410,height=500,scrollbars=yes,resizable=yes",E="kcp_cert_popup",S="identity-challenge-modal",A="g7.identity.redirectStash",h="sirsoft-verification_nhnkcp.formStash",l={info:(...e)=>console.info(`[${i}]`,...e),warn:(...e)=>console.warn(`[${i}]`,...e),error:(...e)=>console.error(`[${i}]`,...e)};function u(){return window.G7Core??null}const R={9999:`$t:${i}.errors.cancelled`,NOT_ADULT:`$t:${i}.errors.not_adult`,DUPLICATE:`$t:${i}.errors.duplicate`,REMOTE_CALL_FAILED:`$t:${i}.errors.remote_call_failed`,DECRYPT_FAILED:`$t:${i}.errors.decrypt_failed`,INCOMPLETE_IDENTITY:`$t:${i}.errors.incomplete_identity`,NOT_FOUND:`$t:${i}.errors.not_found`,ALREADY_CONSUMED:`$t:${i}.errors.already_consumed`,EXPIRED:`$t:${i}.errors.not_found`,IDENTITY_BINDING_MISMATCH:`$t:${i}.errors.binding_mismatch`,STORAGE_FAILED:`$t:${i}.errors.storage_failed`,PROVIDER_ERROR:`$t:${i}.errors.verify_failed`},v=`$t:${i}.errors.verify_failed`,T=new Set(["NOT_ADULT","DUPLICATE"]);function F(e){return R[e]??v}function g(e,t){const n=R[e];if(n)return n;const r=(t??"").trim();return r===""?v:e?`[${e}] ${r}`:r}const N=1023;function b(){if(typeof window>"u")return!1;const e=window.navigator?.userAgent??"";return/Android|iPhone|iPad|iPod|IEMobile|Opera Mini/i.test(e)?!0:typeof window.innerWidth=="number"&&window.innerWidth<=N}function p(e){const t=u()?.state?.set;typeof t=="function"&&t({identityChallenge:{providerInProgress:e}})}function I(){const e=u()?.identity?.markDomainNoticeShown;if(typeof e=="function")try{e()}catch{}}async function _(e,t="error"){const n=u()?.dispatch;if(typeof n=="function")try{await n({handler:"toast",params:{type:t,message:e}})}catch{}}function O(e,t){const n=document.createElement("form");n.setAttribute("name","kcpCertForm"),n.setAttribute("method","POST"),n.setAttribute("action",e.call_url),n.setAttribute("target",t),n.setAttribute("accept-charset","UTF-8"),n.style.display="none";const r={reg_cert_key:e.reg_cert_key,kcp_page_submit_yn:"Y"};for(const[o,s]of Object.entries(r)){const a=document.createElement("input");a.type="hidden",a.name=o,a.value=s,n.appendChild(a)}document.body.appendChild(n),n.submit(),window.setTimeout(()=>{try{n.remove()}catch{}},0)}function U(){try{window.sessionStorage.setItem(A,JSON.stringify({return_url:window.location.href,payload:{},stashed_at:Date.now()}))}catch(e){l.warn("복귀 주소 보관 실패 — 인증 후 처음 화면으로 돌아갈 수 있습니다.",e)}try{window.sessionStorage.setItem(h,JSON.stringify({fields:G(),stashed_at:Date.now()}))}catch(e){l.warn("입력값 보관 실패",e)}}function G(){const e={};return document.querySelectorAll("input[name], select[name], textarea[name]").forEach(n=>{const r=n.getAttribute("name")??"";if(!r)return;const o=(n.getAttribute("type")??"").toLowerCase();if(o==="password"||o==="file"||o==="hidden")return;if(o==="checkbox"||o==="radio"){n.checked&&(e[r]=String(n.value??"on"));return}const s=String(n.value??"");s!==""&&(e[r]=s)}),e}function H(e){const t=Object.keys(e);if(t.length===0)return;let n=0;const r=window.setInterval(()=>{n+=1;let o=0;t.forEach(s=>{const a=document.querySelector(`[name="${Y(s)}"]`);if(!a)return;const d=(a.getAttribute("type")??"").toLowerCase();if(d==="checkbox"||d==="radio"){const f=a;f.value===e[s]&&!f.checked&&f.click(),o+=1;return}j(a,e[s]),o+=1}),(o===t.length||n>=25)&&window.clearInterval(r)},200)}function Y(e){const t=globalThis.CSS;return t&&typeof t.escape=="function"?t.escape(e):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function j(e,t){const n=Object.getPrototypeOf(e),r=Object.getOwnPropertyDescriptor(n,"value");r?.set?r.set.call(e,t):e.value=t,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function K(e){const t=u()?.dispatch;return typeof t!="function"?Promise.resolve():t({handler:"sequence",params:{actions:[{handler:"resolveIdentityChallenge",params:e},{handler:"closeModal",target:S}]}}).catch(()=>{})}const P=new Set;function $(e){e&&P.add(e)}function V(e){return!!e&&P.has(e)}async function B(e){if(!e)return;const t=u()?.api?.getToken?.()??null;try{await fetch(`/api/identity/challenges/${encodeURIComponent(e)}/cancel`,{method:"POST",credentials:"include",headers:{Accept:"application/json",...t?{Authorization:`Bearer ${t}`}:{}}})}catch(n){l.warn("이탈 거래 취소 통보 실패 (재시도 흐름에는 영향 없음)",n)}}async function q(e){const t=u(),n={purpose:e.purpose};e.provider_id&&(n.provider_id=e.provider_id),e.target&&(n.target=e.target);try{const r=t?.api?.getToken?.()??null,o=(()=>{try{return window.localStorage?.getItem("g7_locale")}catch{return null}})(),s=await fetch("/api/identity/challenges",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json",...o?{"Accept-Language":o}:{},...r?{Authorization:`Bearer ${r}`}:{}},body:JSON.stringify(n)}),a=await s.json().catch(()=>null);if(!Line truncated
//# sourceMappingURL=plugin.iife.js.map
var SirsoftVerificationNhnkcp=(function(c){"use strict";const i="sirsoft-verification_nhnkcp",M="nhnkcp",k="width=410,height=500,scrollbars=yes,resizable=yes",E="kcp_cert_popup",S="identity-challenge-modal",A="g7.identity.redirectStash",h="sirsoft-verification_nhnkcp.formStash",l={info:(...e)=>console.info(`[${i}]`,...e),warn:(...e)=>console.warn(`[${i}]`,...e),error:(...e)=>console.error(`[${i}]`,...e)};function u(){return window.G7Core??null}const R={9999:`$t:${i}.errors.cancelled`,NOT_ADULT:`$t:${i}.errors.not_adult`,DUPLICATE:`$t:${i}.errors.duplicate`,REMOTE_CALL_FAILED:`$t:${i}.errors.remote_call_failed`,DECRYPT_FAILED:`$t:${i}.errors.decrypt_failed`,INCOMPLETE_IDENTITY:`$t:${i}.errors.incomplete_identity`,NOT_FOUND:`$t:${i}.errors.not_found`,ALREADY_CONSUMED:`$t:${i}.errors.already_consumed`,EXPIRED:`$t:${i}.errors.not_found`,IDENTITY_BINDING_MISMATCH:`$t:${i}.errors.binding_mismatch`,STORAGE_FAILED:`$t:${i}.errors.storage_failed`,PROVIDER_ERROR:`$t:${i}.errors.verify_failed`},v=`$t:${i}.errors.verify_failed`,T=new Set(["NOT_ADULT","DUPLICATE"]);function F(e){return R[e]??v}function g(e,t){const n=R[e];if(n)return n;const r=(t??"").trim();return r===""?v:e?`[${e}] ${r}`:r}const N=1023;function b(){if(typeof window>"u")return!1;const e=window.navigator?.userAgent??"";return/Android|iPhone|iPad|iPod|IEMobile|Opera Mini/i.test(e)?!0:typeof window.innerWidth=="number"&&window.innerWidth<=N}function p(e){const t=u()?.state?.set;typeof t=="function"&&t({identityChallenge:{providerInProgress:e}})}function I(){const e=u()?.identity?.markDomainNoticeShown;if(typeof e=="function")try{e()}catch{}}async function _(e,t="error"){const n=u()?.dispatch;if(typeof n=="function")try{await n({handler:"toast",params:{type:t,message:e}})}catch{}}function O(e,t){const n=document.createElement("form");n.setAttribute("name","kcpCertForm"),n.setAttribute("method","POST"),n.setAttribute("action",e.call_url),n.setAttribute("target",t),n.setAttribute("accept-charset","UTF-8"),n.style.display="none";const r={reg_cert_key:e.reg_cert_key,kcp_page_submit_yn:"Y"};for(const[o,s]of Object.entries(r)){const a=document.createElement("input");a.type="hidden",a.name=o,a.value=s,n.appendChild(a)}document.body.appendChild(n),n.submit(),window.setTimeout(()=>{try{n.remove()}catch{}},0)}function U(){try{window.sessionStorage.setItem(A,JSON.stringify({return_url:window.location.href,payload:{},stashed_at:Date.now()}))}catch(e){l.warn("복귀 주소 보관 실패 — 인증 후 처음 화면으로 돌아갈 수 있습니다.",e)}try{window.sessionStorage.setItem(h,JSON.stringify({fields:G(),stashed_at:Date.now()}))}catch(e){l.warn("입력값 보관 실패",e)}}function G(){const e={};return document.querySelectorAll("input[name], select[name], textarea[name]").forEach(n=>{const r=n.getAttribute("name")??"";if(!r)return;const o=(n.getAttribute("type")??"").toLowerCase();if(o==="password"||o==="file"||o==="hidden")return;if(o==="checkbox"||o==="radio"){n.checked&&(e[r]=String(n.value??"on"));return}const s=String(n.value??"");s!==""&&(e[r]=s)}),e}function H(e){const t=Object.keys(e);if(t.length===0)return;let n=0;const r=window.setInterval(()=>{n+=1;let o=0;t.forEach(s=>{const a=document.querySelector(`[name="${Y(s)}"]`);if(!a)return;const d=(a.getAttribute("type")??"").toLowerCase();if(d==="checkbox"||d==="radio"){const f=a;f.value===e[s]&&!f.checked&&f.click(),o+=1;return}j(a,e[s]),o+=1}),(o===t.length||n>=25)&&window.clearInterval(r)},200)}function Y(e){const t=globalThis.CSS;return t&&typeof t.escape=="function"?t.escape(e):e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function j(e,t){const n=Object.getPrototypeOf(e),r=Object.getOwnPropertyDescriptor(n,"value");r?.set?r.set.call(e,t):e.value=t,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function K(e){const t=u()?.dispatch;return typeof t!="function"?Promise.resolve():t({handler:"sequence",params:{actions:[{handler:"resolveIdentityChallenge",params:e},{handler:"closeModal",target:S}]}}).catch(()=>{})}const P=new Set;function $(e){e&&P.add(e)}function V(e){return!!e&&P.has(e)}async function B(e){if(!e)return;const t=u()?.api?.getToken?.()??null;try{await fetch(`/api/identity/challenges/${encodeURIComponent(e)}/cancel`,{method:"POST",credentials:"include",headers:{Accept:"application/json",...t?{Authorization:`Bearer ${t}`}:{}}})}catch(n){l.warn("이탈 거래 취소 통보 실패 (재시도 흐름에는 영향 없음)",n)}}async function q(e){const t=u(),n={purpose:e.purpose};e.provider_id&&(n.provider_id=e.provider_id),e.target&&(n.target=e.target);try{const r=t?.api?.getToken?.()??null,o=(()=>{try{return window.localStorage?.getItem("g7_locale")}catch{return null}})(),s=await fetch("/api/identity/challenges",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json",Accept:"application/json",...o?{"Accept-Language":o}:{},...r?{Authorization:`Bearer ${r}`}:{}},body:JSON.stringify(n)}),a=await s.json().catch(()=>null);if(Line truncated
@@ -1,12 +1,12 @@
{
"name": "@g7/sirsoft-verification_nhnkcp",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@g7/sirsoft-verification_nhnkcp",
"version": "1.0.0",
"version": "1.0.1",
"devDependencies": {
"jsdom": "^27.4.0",
"typescript": "^5.3.3",
@@ -1,6 +1,6 @@
{
"name": "@g7/sirsoft-verification_nhnkcp",
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"private": true,
"scripts": {
@@ -5,7 +5,7 @@
"ko": "NHN KCP 휴대폰 본인확인",
"en": "NHN KCP Mobile Identity Verification"
},
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",
"description": {
"ko": "NHN KCP 휴대폰 본인확인(V2 REST)을 G7 코어 IDV 인프라에 Provider 로 등록하는 플러그인",