Changeset 3804294
- Timestamp:
- 11/16/2026 06:08:07 AM (less than one hour ago)
- Location:
- sonypayment-light-for-woocommerce/trunk
- Files:
-
- 10 edited
-
assets/js/spfwc-light-request.js (modified) (5 diffs)
-
build/index.asset.php (modified) (1 diff)
-
build/index.js (modified) (1 diff)
-
includes/class-spfwc-light-admin-order.php (modified) (1 diff)
-
includes/class-spfwc-light-blocks-support.php (modified) (2 diffs)
-
includes/class-spfwc-light-payment-gateway.php (modified) (12 diffs)
-
includes/class-spfwc-light-payment-response-handler.php (modified) (4 diffs)
-
includes/spfwc-light-form-cardmember.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
woo-sonypayment-light.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sonypayment-light-for-woocommerce/trunk/assets/js/spfwc-light-request.js
r3261182 r3804294 11 11 $( document ).on( 'change', '#sonypayment-light-card-number', function() { 12 12 spfwc_request.changePayType( $( this ).val() ); 13 }); 14 15 $( document ).on( 'change', 'input[name="sonypayment-light_card_member_option"]', function() { 16 if ( 'saved' === $( this ).val() ) { 17 spfwc_request.changePayType( String( $( this ).data( 'cardfirst' ) || '' ) ); 18 } else if ( '' === $( '#sonypayment-light-card-number' ).val() ) { 19 spfwc_request.changePayType( '' ); 20 } 13 21 }); 14 22 }, … … 57 65 $( '#sonypayment-light-card-paytype-37' ).prop( 'disabled', true ).css( 'display', 'none' ); 58 66 $( '#sonypayment-light-card-paytype-36' ).prop( 'disabled', true ).css( 'display', 'none' ); 67 $( '#sonypayment-light-card-howtopay-label' ).attr( 'for', 'sonypayment-light-card-paytype-4535' ); 59 68 } else if ( '3' == first_c && '6' == second_c ) { 60 69 $( '#sonypayment-light-card-paytype-default' ).prop( 'disabled', true ).css( 'display', 'none' ); … … 62 71 $( '#sonypayment-light-card-paytype-37' ).prop( 'disabled', true ).css( 'display', 'none' ); 63 72 $( '#sonypayment-light-card-paytype-36' ).prop( 'disabled', false ).css( 'display', 'inline' ); 73 $( '#sonypayment-light-card-howtopay-label' ).attr( 'for', 'sonypayment-light-card-paytype-36' ); 64 74 } else if ( '3' == first_c && '7' == second_c ) { 65 75 $( '#sonypayment-light-card-paytype-default' ).prop( 'disabled', true ).css( 'display', 'none' ); … … 67 77 $( '#sonypayment-light-card-paytype-37' ).prop( 'disabled', false ).css( 'display', 'inline' ); 68 78 $( '#sonypayment-light-card-paytype-36' ).prop( 'disabled', true ).css( 'display', 'none' ); 79 $( '#sonypayment-light-card-howtopay-label' ).attr( 'for', 'sonypayment-light-card-paytype-37' ); 69 80 } else { 70 81 $( '#sonypayment-light-card-paytype-default' ).prop( 'disabled', false ).css( 'display', 'inline' ); … … 72 83 $( '#sonypayment-light-card-paytype-37' ).prop( 'disabled', true ).css( 'display', 'none' ); 73 84 $( '#sonypayment-light-card-paytype-36' ).prop( 'disabled', true ).css( 'display', 'none' ); 85 $( '#sonypayment-light-card-howtopay-label' ).attr( 'for', 'sonypayment-light-card-paytype-default' ); 74 86 } 75 87 } -
sonypayment-light-for-woocommerce/trunk/build/index.asset.php
r3529395 r3804294 1 <?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp- element', 'wp-i18n'), 'version' => 'ac62d289ef358103cc52');1 <?php return array('dependencies' => array('react', 'wc-blocks-registry', 'wc-settings', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices'), 'version' => '5bf30cd38cdeb3c225a2'); -
sonypayment-light-for-woocommerce/trunk/build/index.js
r3495074 r3804294 1 (()=>{var e,t={9 68:(e,t,n)=>{"use strict";const r=window.wc.wcBlocksRegistry;var o=n(280);const i=window.wp.i18n,a=window.wp.element,s=window.wc.wcSettings,l=()=>(0,s.getSetting)("sonypayment-light_data",null),c=()=>(0,s.getSetting)("sonypayment-light_cvs_data",null);var u=n(704);const p=u.default||u,d=()=>{const e=l();if(e.response_data_3d){const t=e.response_data_3d;if(0!==Object.keys(t).length)return null}const t=e?.form_html||"";return(0,o.createElement)(o.Fragment,null,p(t))},m=()=>{const e=l();if(!e.three_d_secure)return null;if(e.response_data_3d){const t=e.response_data_3d;if(0!==Object.keys(t).length)return null}const t=e?.three_d_secure_html||"";return(0,o.createElement)(o.Fragment,null,p(t))},f=()=>{const e=l();if(!e.response_data_3d)return null;const t=e.response_data_3d;return 0===Object.keys(t).length?null:(0,o.createElement)(o.Fragment,null,(0,o.createElement)("p",null,"3Dセキュア認証処理中"))},h=({billing:e,eventRegistration:t,emitResponse:n,components:r,tokenCodeRef:i})=>{const a=l(),s=a?.description||"";return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{id:"sonypayment-payment-data"},(0,o.createElement)("fieldset",{id:"sonypayment-payment-card-form",className:"wc-payment-form"},(0,o.createElement)("input",{type:"hidden",name:"sonypayment_token_code",id:"sonypayment-token-code",value:"","data-isblock":"1",ref:i}),(0,o.createElement)("input",{type:"hidden",name:"sonypayment_billing_name",id:"sonypayment-billing-name",value:""}),p(s),(0,o.createElement)(d,null),(0,o.createElement)(m,null),(0,o.createElement)(f,null))))},y=e=>(0,o.createElement)(h,{...e});var g,v,b;async function E(){await new Promise((e=>{const t=setInterval((()=>{const n=document.getElementById("radio-control-wc-payment-method-options-sonypayment-light");n&&(clearInterval(t),n.click(),e(!0))}),200);setTimeout((()=>{clearInterval(t),e(!1)}),1e4)})),await _()}function _(){return new Promise((e=>{let t=0;const n=setInterval((()=>{t>600&&(clearInterval(n),e(!1)),document.querySelector(".wc-block-components-checkout-place-order-button")&&(clearInterval(n),document.querySelector(".wc-block-components-checkout-place-order-button").click(),e(!0)),t++}),1e3)}))}document.addEventListener("DOMContentLoaded",(function(){const e=l();if(e&&e.response_data_3d){const t=e.response_data_3d;0!==Object.keys(t).length&&(document.querySelector(".wp-block-woocommerce-checkout-payment-block")&&E(),new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.length>0&&e.addedNodes.forEach((function(e){1===e.nodeType&&e.matches(".wp-block-woocommerce-checkout-payment-block")&&(E(),_())}))}))})).observe(document.body,{childList:!0,subtree:!0}))}}));const x=({RenderedComponent:e,...t})=>{const[n,r]=(0,a.useState)("");(0,a.useEffect)((()=>{}),[r]),(0,a.useEffect)((()=>{if(n)throw new Error(n)}),[n]);const{eventRegistration:i,emitResponse:s}=t,{onPaymentSetup:c}=i,u=React.useRef(null);t.tokenCodeRef=u;const p={type:s.responseTypes.ERROR,message:sonypayment_params.message.error_card},d={type:s.responseTypes.ERROR,message:sonypayment_params.message.error_agree};return(0,a.useEffect)((()=>{const e=c((async()=>{const e=l();let n={is_block:!0};if(e.response_data_3d){const t=e.response_data_3d;if(0!==Object.keys(t).length)return n=Object.assign(n,{done3d:1}),n=Object.assign(n,t),{type:s.responseTypes.SUCCESS,meta:{paymentMethodData:n}}}if(sonypayment_params.is_3d_secure&&!document.getElementById("sonypayment_agree").checked)return d;if(sonypayment_params.is_user_logged_in&&sonypayment_params.cardmember&&sonypayment_params.is_card_member){const e=document.querySelector("input:checked[name=sonypayment-light_card_member_option]");if(e&&"saved"===e.value)return n=Object.assign(n,{woocommerce_checkout_place_order:""}),n=Object.assign(n,{"sonypayment-light_card_member_option":e.value}),{type:s.responseTypes.SUCCESS,meta:{paymentMethodData:n}}}const r=await((...e)=>{const{tokenCode:t,setTokenCode:n}=e,r=e=>"string"==typeof e&&""!==e&&!isNaN(e);return new Promise((e=>{l();const t=document.getElementById("sonypayment-light-card-number"),n=document.getElementById("sonypayment-light-card-expmm"),o=document.getElementById("sonypayment-light-card-expyy"),i=document.getElementById("sonypayment-light-card-seccd"),a=document.getElementById("sonypayment-light-card-name");let s=!0;r(t.value)||(s=!1),r(n.value)||(s=!1),r(o.value)||(s=!1),null!==i&&(r(i.value)||(s=!1)),isValidInput(a.value)||(s=!1),s||e(!1);const c=t.value,u=n.value,p=o.value,d=null!==i?i.value:"";SpsvApi.spsvCreateToken(c,p,u,d,"","","","",""),spfwc_light_payment_block_page=!0,e(!0)}))})(t);if(!r)return p;const o=await new Promise((e=>{let t="",n=0;const r=setInterval((()=>{n>600&&e(!1),t!==u.current.value&&(t=u.current.value,clearInterval(r),e(t)),n++}),1e3)}));if(o){const e=(()=>{let e="01";const t=document.querySelectorAll("select[name=sonypayment-light_card_paytype]");return Array.from(t).filter((e=>!e.disabled)).forEach((t=>{e=t.options[t.selectedIndex].value})),e})();n=Object.assign(n,{sonypayment_token_code:o}),n=Object.assign(n,{"sonypayment-light_card_paytype":e});const t=document.querySelector("input[type=hidden][name=sonypayment-light_save_payment_method]"),r=document.querySelector("input:checked[name=sonypayment-light_save_payment_method]");return null!==r?n=Object.assign(n,{sonypayment_save_payment_method:r.value}):null!==t&&(n=Object.assign(n,{sonypayment_save_payment_method:t.value})),{type:s.responseTypes.SUCCESS,meta:{paymentMethodData:n}}}return p}));return()=>{e()}}),[s.responseTypes.ERROR,s.responseTypes.SUCCESS,c]),(0,o.createElement)(e,{...t})},k={name:"sonypayment-light",label:(0,o.createElement)((e=>{var t;const{PaymentMethodLabel:n}=e.components,r=null!==(t=l()?.title)&&void 0!==t?t:(0,i.__)("e-SCOTT Credit Card Payment","sonypayment-light-for-woocommerce");return(0,o.createElement)(n,{text:r})}),null),content:(0,o.createElement)(x,{RenderedComponent:y}),edit:(0,o.createElement)(x,{RenderedComponent:y}),canMakePayment:()=>null!==l(),ariaLabel:(0,i.__)("e-SCOTT Credit Card Payment","sonypayment-light-for-woocommerce"),supports:{showSavedCards:null!==(g=l()?.showSavedCards)&&void 0!==g&&g,showSaveOption:null!==(v=l()?.showSaveOption)&&void 0!==v&&v,features:null!==(b=l()?.supports)&&void 0!==b?b:[]}},w=({billing:e,eventRegistration:t,emitResponse:n,components:r})=>{const i=c(),a=i?.description||"",s=i?.fee_text||"";return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{id:"sonypayment-cvs-payment-data",name:"charge_form"},p(a),p(s)))},T=e=>(0,o.createElement)(w,{...e});var S;const C=({RenderedComponent:e,...t})=>{const[n,r]=(0,a.useState)("");(0,a.useEffect)((()=>{}),[r]),(0,a.useEffect)((()=>{if(n)throw new Error(n)}),[n]);const{eventRegistration:i,emitResponse:s}=t,{onPaymentSetup:l}=i;return(0,a.useEffect)((()=>{const e=l((async()=>({type:s.responseTypes.SUCCESS,meta:{paymentMethodData:{is_block:!0}}})));return()=>{e()}}),[s.responseTypes.ERROR,s.responseTypes.SUCCESS,l]),(0,o.createElement)(e,{...t})},O={name:"sonypayment-light_cvs",label:(0,o.createElement)((e=>{var t;const{PaymentMethodLabel:n}=e.components,r=null!==(t=c()?.title)&&void 0!==t?t:(0,i.__)("e-SCOTT Online Payment Collection Agency Service","sonypayment-light-for-woocommerce");return(0,o.createElement)(n,{text:r})}),null),content:(0,o.createElement)(C,{RenderedComponent:T}),edit:(0,o.createElement)(C,{RenderedComponent:T}),canMakePayment:()=>null!==c(),ariaLabel:(0,i.__)("e-SCOTT Online Payment Collection Agency Service","sonypayment-light-for-woocommerce"),supports:{features:null!==(S=c()?.supports)&&void 0!==S?S:[]}};null!==l()&&(0,r.registerPaymentMethod)(k),null!==c()&&(0,r.registerPaymentMethod)(O)},504:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},892:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(504),a=n(600);o(n(600),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},600:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(504),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),x(this,e)},e}();t.Node=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var p=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=a.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=p;var d=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=d;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=m;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function y(e){return(0,a.isTag)(e)}function g(e){return e.type===a.ElementType.CDATA}function v(e){return e.type===a.ElementType.Text}function b(e){return e.type===a.ElementType.Comment}function E(e){return e.type===a.ElementType.Directive}function _(e){return e.type===a.ElementType.Root}function x(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var r=t?k(e.children):[],o=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(g(e)){r=t?k(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),n=a}else if(_(e)){r=t?k(e.children):[];var s=new f(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!E(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function k(e){for(var t=e.map((function(e){return x(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=h,t.isTag=y,t.isCDATA=g,t.isText=v,t.isComment=b,t.isDirective=E,t.isDocument=_,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=x},469:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},912:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,p=e.match(i),d=p&&p[1]?p[1].toLowerCase():"";switch(d){case n:var f=c(e);return a.test(e)||null===(t=null==(y=f.querySelector(r))?void 0:y.parentNode)||void 0===t||t.removeChild(y),s.test(e)||null===(u=null==(y=f.querySelector(o))?void 0:y.parentNode)||void 0===u||u.removeChild(y),f.querySelectorAll(n);case r:case o:var h=l(e).querySelectorAll(d);return s.test(e)&&a.test(e)?h[0].parentNode.childNodes:h;default:return m?m(e):(y=l(e,o).querySelector(o)).childNodes;var y}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,a=/<head[^]*>/i,s=/<body[^]*>/i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var p=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),p.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var m,f="object"==typeof document&&document.createElement("template");f&&f.content&&(m=function(e){return f.innerHTML=e,f.content.childNodes})},604:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(a),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(912)),i=n(844),a=/<(![a-zA-Z\s]+)>/},844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,l=[],c=0,u=t.length;c<u;c++){var p=t[c];switch(p.nodeType){case 1:var d=a(p.nodeName);(s=new r.Element(d,i(p.attributes))).children=e("template"===d?p.content.childNodes:p.childNodes,s);break;case 3:s=new r.Text(p.nodeValue);break;case 8:s=new r.Comment(p.nodeValue);break;default:continue}var m=l[c-1]||null;m&&(m.next=s),s.parent=n,s.prev=m,s.next=null,l.push(s)}return o&&((s=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=l[0]||null,s.parent=n,l.unshift(s),l[1]&&(l[1].prev=l[0])),l};var r=n(892),o=n(469);function i(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function a(e){return function(e){return o.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}},789:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var p=e[u];if((0,r.isCustomAttribute)(u))n[u]=p;else{var d=u.toLowerCase(),m=l(d);if(m){var f=(0,r.getPropertyInfo)(m);switch(i.includes(m)&&a.includes(t)&&!c&&(m=l("default"+d)),n[m]=p,f&&f.type){case r.BOOLEAN:n[m]=!0;break;case r.OVERLOADED_BOOLEAN:""===p&&(n[m]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=p)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(172),o=n(344),i=["checked","value"],a=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}},660:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||a.returnFirstArg,u=n.library||s,p=u.cloneElement,d=u.createElement,m=u.isValidElement,f=t.length,h=0;h<f;h++){var y=t[h];if(o){var g=n.replace(y,h);if(m(g)){f>1&&(g=p(g,{key:g.key||h})),r.push(c(g,y,h));continue}}if("text"!==y.type){var v=y,b={};l(v)?((0,a.setStyleProp)(v.attribs.style,v.attribs),b=v.attribs):v.attribs&&(b=(0,i.default)(v.attribs,v.name));var E=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(E=e(y.children,n));break;default:continue}f>1&&(b.key=h),r.push(c(d(y.name,b,E),y,h))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,a.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&_)continue;r.push(c(y.data,y,h))}}return 1===r.length?r[0]:r};var o=n(280),i=r(n(789)),a=n(344),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,a.isCustomComponent)(e.name,e.attribs)}},704:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,a.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var o=r(n(604));t.htmlToDOM=o.default;var i=r(n(789));t.attributesToProps=i.default;var a=r(n(660));t.domToReact=a.default;var s=n(892);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1}},344:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!a.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(280),i=r(n(8)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},628:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var p=1,d=1;function m(e){var t=e.match(n);t&&(p+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:p,column:d};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:p,column:d},this.source=l.source}h.prototype.content=e;var y=[];function g(t){var n=new Error(l.source+":"+p+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=p,n.column=d,n.source=e,!l.silent)throw n;y.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return m(r),e=e.slice(r.length),n}}function b(){v(r)}function E(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,m(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function x(){var e=f(),n=v(o);if(n){if(_(),!v(i))return g("property missing ':'");var r=v(a),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(s),l}}return b(),function(){var e,t=[];for(E(t);e=x();)!1!==e&&(t.push(e),E(t));return t}()}},172:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,a=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(180),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},180:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},8:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(256)),o=n(424);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(i,l)).replace(r,s))}},256:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(628));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},280:e=>{"use strict";e.exports=window.React}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,o,i)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,o,i]=e[u],s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,o,i]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={656:0,564:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(l)var u=l(r)}for(t&&t(n);c<a.length;c++)i=a[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(u)},n=globalThis.webpackChunksonypayment_light_for_woocommerce=globalThis.webpackChunksonypayment_light_for_woocommerce||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=r.O(void 0,[564],(()=>r(968)));o=r.O(o)})();1 (()=>{var e,t={952:(e,t,n)=>{"use strict";const r=window.wc.wcBlocksRegistry;var o=n(280);const i=window.wp.i18n,a=window.wp.element,s=window.wp.data,l=(window.wp.notices,window.wc.wcSettings),c=()=>(0,l.getSetting)("sonypayment-light_data",null),u=()=>(0,l.getSetting)("sonypayment-light_cvs_data",null);var p=n(704);const d=p.default||p,m=()=>{const e=c();if(e.response_data_3d){const t=e.response_data_3d;if(0!==Object.keys(t).length)return null}const t=e?.form_html||"";return(0,o.createElement)(o.Fragment,null,d(t))},f=()=>{const e=c();if(!e.three_d_secure)return null;if(e.response_data_3d){const t=e.response_data_3d;if(0!==Object.keys(t).length)return null}const t=e?.three_d_secure_html||"";return(0,o.createElement)(o.Fragment,null,d(t))},h=()=>{const e=c();if(!e.response_data_3d)return null;const t=e.response_data_3d;return 0===Object.keys(t).length?null:(0,o.createElement)(o.Fragment,null,(0,o.createElement)("p",null,"3Dセキュア認証処理中"))},y=({billing:e,eventRegistration:t,emitResponse:n,components:r,tokenCodeRef:i})=>{const a=c(),s=a?.description||"";return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{id:"sonypayment-payment-data"},(0,o.createElement)("fieldset",{id:"sonypayment-payment-card-form",className:"wc-payment-form"},(0,o.createElement)("input",{type:"hidden",name:"sonypayment_token_code",id:"sonypayment-token-code",value:"","data-isblock":"1",ref:i}),(0,o.createElement)("input",{type:"hidden",name:"sonypayment_billing_name",id:"sonypayment-billing-name",value:""}),d(s),(0,o.createElement)(m,null),(0,o.createElement)(f,null),(0,o.createElement)(h,null))))},g=e=>(0,o.createElement)(y,{...e});var v,b,E;const _=c()?.card_error_message;async function w(){await new Promise((e=>{const t=setInterval((()=>{const n=document.getElementById("radio-control-wc-payment-method-options-sonypayment-light");n&&(clearInterval(t),n.click(),e(!0))}),200);setTimeout((()=>{clearInterval(t),e(!1)}),1e4)})),await x()}function x(){return new Promise((e=>{let t=0;const n=setInterval((()=>{t>600&&(clearInterval(n),e(!1)),document.querySelector(".wc-block-components-checkout-place-order-button")&&(clearInterval(n),document.querySelector(".wc-block-components-checkout-place-order-button").click(),e(!0)),t++}),1e3)}))}_&&(0,s.dispatch)("core/notices").createErrorNotice(_,{context:"wc/checkout"}),document.addEventListener("DOMContentLoaded",(function(){const e=c();if(e&&e.response_data_3d){const t=e.response_data_3d;0!==Object.keys(t).length&&(document.querySelector(".wp-block-woocommerce-checkout-payment-block")&&w(),new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.length>0&&e.addedNodes.forEach((function(e){1===e.nodeType&&e.matches(".wp-block-woocommerce-checkout-payment-block")&&(w(),x())}))}))})).observe(document.body,{childList:!0,subtree:!0}))}}));const k=({RenderedComponent:e,...t})=>{const[n,r]=(0,a.useState)("");(0,a.useEffect)((()=>{}),[r]),(0,a.useEffect)((()=>{if(n)throw new Error(n)}),[n]);const{eventRegistration:i,emitResponse:s}=t,{onPaymentSetup:l}=i,u=React.useRef(null);t.tokenCodeRef=u;const p={type:s.responseTypes.ERROR,message:sonypayment_params.message.error_card},d={type:s.responseTypes.ERROR,message:sonypayment_params.message.error_agree},m=()=>{let e="01";const t=document.querySelectorAll("select[name=sonypayment-light_card_paytype]");return Array.from(t).filter((e=>!e.disabled)).forEach((t=>{e=t.options[t.selectedIndex].value})),e};return(0,a.useEffect)((()=>{const e=l((async()=>{const e=c();let n={is_block:!0};if(e.response_data_3d){const t=e.response_data_3d;if(0!==Object.keys(t).length)return n=Object.assign(n,{done3d:1}),n=Object.assign(n,t),{type:s.responseTypes.SUCCESS,meta:{paymentMethodData:n}}}if(sonypayment_params.is_3d_secure&&!document.getElementById("sonypayment_agree").checked)return d;if(sonypayment_params.is_user_logged_in&&sonypayment_params.cardmember&&sonypayment_params.is_card_member){const e=document.querySelector("input:checked[name=sonypayment-light_card_member_option]");if(e&&"saved"===e.value)return n=Object.assign(n,{woocommerce_checkout_place_order:""}),n=Object.assign(n,{"sonypayment-light_card_member_option":e.value}),n=Object.assign(n,{"sonypayment-light_card_paytype":m()}),{type:s.responseTypes.SUCCESS,meta:{paymentMethodData:n}}}const r=await((...e)=>{const{tokenCode:t,setTokenCode:n}=e,r=e=>"string"==typeof e&&""!==e&&!isNaN(e);return new Promise((e=>{c();const t=document.getElementById("sonypayment-light-card-number"),n=document.getElementById("sonypayment-light-card-expmm"),o=document.getElementById("sonypayment-light-card-expyy"),i=document.getElementById("sonypayment-light-card-seccd"),a=document.getElementById("sonypayment-light-card-name");let s=!0;r(t.value)||(s=!1),r(n.value)||(s=!1),r(o.value)||(s=!1),null!==i&&(r(i.value)||(s=!1)),isValidInput(a.value)||(s=!1),s||e(!1);const l=t.value,u=n.value,p=o.value,d=null!==i?i.value:"";SpsvApi.spsvCreateToken(l,p,u,d,"","","","",""),spfwc_light_payment_block_page=!0,e(!0)}))})(t);if(!r)return p;const o=await new Promise((e=>{let t="",n=0;const r=setInterval((()=>{n>600&&e(!1),t!==u.current.value&&(t=u.current.value,clearInterval(r),e(t)),n++}),1e3)}));if(o){const e=m();n=Object.assign(n,{sonypayment_token_code:o}),n=Object.assign(n,{"sonypayment-light_card_paytype":e});const t=document.querySelector("input[type=hidden][name=sonypayment-light_save_payment_method]"),r=document.querySelector("input:checked[name=sonypayment-light_save_payment_method]");return null!==r?n=Object.assign(n,{"sonypayment-light_save_payment_method":r.value}):null!==t&&(n=Object.assign(n,{"sonypayment-light_save_payment_method":t.value})),{type:s.responseTypes.SUCCESS,meta:{paymentMethodData:n}}}return p}));return()=>{e()}}),[s.responseTypes.ERROR,s.responseTypes.SUCCESS,l]),(0,o.createElement)(e,{...t})},T={name:"sonypayment-light",label:(0,o.createElement)((e=>{var t;const{PaymentMethodLabel:n}=e.components,r=null!==(t=c()?.title)&&void 0!==t?t:(0,i.__)("e-SCOTT Credit Card Payment","sonypayment-light-for-woocommerce");return(0,o.createElement)(n,{text:r})}),null),content:(0,o.createElement)(k,{RenderedComponent:g}),edit:(0,o.createElement)(k,{RenderedComponent:g}),canMakePayment:()=>null!==c(),ariaLabel:(0,i.__)("e-SCOTT Credit Card Payment","sonypayment-light-for-woocommerce"),supports:{showSavedCards:null!==(v=c()?.showSavedCards)&&void 0!==v&&v,showSaveOption:null!==(b=c()?.showSaveOption)&&void 0!==b&&b,features:null!==(E=c()?.supports)&&void 0!==E?E:[]}},S=({billing:e,eventRegistration:t,emitResponse:n,components:r})=>{const i=u(),a=i?.description||"",s=i?.fee_text||"";return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{id:"sonypayment-cvs-payment-data",name:"charge_form"},d(a),d(s)))},C=e=>(0,o.createElement)(S,{...e});var O;const P=({RenderedComponent:e,...t})=>{const[n,r]=(0,a.useState)("");(0,a.useEffect)((()=>{}),[r]),(0,a.useEffect)((()=>{if(n)throw new Error(n)}),[n]);const{eventRegistration:i,emitResponse:s}=t,{onPaymentSetup:l}=i;return(0,a.useEffect)((()=>{const e=l((async()=>({type:s.responseTypes.SUCCESS,meta:{paymentMethodData:{is_block:!0}}})));return()=>{e()}}),[s.responseTypes.ERROR,s.responseTypes.SUCCESS,l]),(0,o.createElement)(e,{...t})},A={name:"sonypayment-light_cvs",label:(0,o.createElement)((e=>{var t;const{PaymentMethodLabel:n}=e.components,r=null!==(t=u()?.title)&&void 0!==t?t:(0,i.__)("e-SCOTT Online Payment Collection Agency Service","sonypayment-light-for-woocommerce");return(0,o.createElement)(n,{text:r})}),null),content:(0,o.createElement)(P,{RenderedComponent:C}),edit:(0,o.createElement)(P,{RenderedComponent:C}),canMakePayment:()=>null!==u(),ariaLabel:(0,i.__)("e-SCOTT Online Payment Collection Agency Service","sonypayment-light-for-woocommerce"),supports:{features:null!==(O=u()?.supports)&&void 0!==O?O:[]}};null!==c()&&(0,r.registerPaymentMethod)(T),null!==u()&&(0,r.registerPaymentMethod)(A)},504:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},892:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=n(504),a=n(600);o(n(600),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?i.ElementType.Tag:void 0,r=new a.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new a.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},600:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=n(504),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),w(this,e)},e}();t.Node=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var p=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=a.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=p;var d=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=d;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=m;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,r)||this;return i.name=t,i.attribs=n,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(d);function y(e){return(0,a.isTag)(e)}function g(e){return e.type===a.ElementType.CDATA}function v(e){return e.type===a.ElementType.Text}function b(e){return e.type===a.ElementType.Comment}function E(e){return e.type===a.ElementType.Directive}function _(e){return e.type===a.ElementType.Root}function w(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(y(e)){var r=t?x(e.children):[],o=new h(e.name,i({},e.attribs),r);r.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),n=o}else if(g(e)){r=t?x(e.children):[];var a=new m(r);r.forEach((function(e){return e.parent=a})),n=a}else if(_(e)){r=t?x(e.children):[];var s=new f(r);r.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!E(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function x(e){for(var t=e.map((function(e){return w(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=h,t.isTag=y,t.isCDATA=g,t.isText=v,t.isComment=b,t.isDirective=E,t.isDocument=_,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=w},469:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce((function(e,t){return e[t.toLowerCase()]=t,e}),{})},912:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,u,p=e.match(i),d=p&&p[1]?p[1].toLowerCase():"";switch(d){case n:var f=c(e);return a.test(e)||null===(t=null==(y=f.querySelector(r))?void 0:y.parentNode)||void 0===t||t.removeChild(y),s.test(e)||null===(u=null==(y=f.querySelector(o))?void 0:y.parentNode)||void 0===u||u.removeChild(y),f.querySelectorAll(n);case r:case o:var h=l(e).querySelectorAll(d);return s.test(e)&&a.test(e)?h[0].parentNode.childNodes:h;default:return m?m(e):(y=l(e,o).querySelector(o)).childNodes;var y}};var n="html",r="head",o="body",i=/<([a-zA-Z]+[0-9]?)/,a=/<head[^]*>/i,s=/<body[^]*>/i,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var p=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),p.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var d=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=d.documentElement.querySelector(t);return n&&(n.innerHTML=e),d}return d.documentElement.innerHTML=e,d}}var m,f="object"==typeof document&&document.createElement("template");f&&f.content&&(m=function(e){return f.innerHTML=e,f.content.childNodes})},604:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=e.match(a),n=t?t[1]:void 0;return(0,i.formatDOM)((0,o.default)(e),null,n)};var o=r(n(912)),i=n(844),a=/<(![a-zA-Z\s]+)>/},844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=i,t.formatDOM=function e(t,n,o){void 0===n&&(n=null);for(var s,l=[],c=0,u=t.length;c<u;c++){var p=t[c];switch(p.nodeType){case 1:var d=a(p.nodeName);(s=new r.Element(d,i(p.attributes))).children=e("template"===d?p.content.childNodes:p.childNodes,s);break;case 3:s=new r.Text(p.nodeValue);break;case 8:s=new r.Comment(p.nodeValue);break;default:continue}var m=l[c-1]||null;m&&(m.next=s),s.parent=n,s.prev=m,s.next=null,l.push(s)}return o&&((s=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=l[0]||null,s.parent=n,l.unshift(s),l[1]&&(l[1].prev=l[0])),l};var r=n(892),o=n(469);function i(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function a(e){return function(e){return o.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}},789:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var p=e[u];if((0,r.isCustomAttribute)(u))n[u]=p;else{var d=u.toLowerCase(),m=l(d);if(m){var f=(0,r.getPropertyInfo)(m);switch(i.includes(m)&&a.includes(t)&&!c&&(m=l("default"+d)),n[m]=p,f&&f.type){case r.BOOLEAN:n[m]=!0;break;case r.OVERLOADED_BOOLEAN:""===p&&(n[m]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=p)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(172),o=n(344),i=["checked","value"],a=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}},660:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){void 0===n&&(n={});for(var r=[],o="function"==typeof n.replace,c=n.transform||a.returnFirstArg,u=n.library||s,p=u.cloneElement,d=u.createElement,m=u.isValidElement,f=t.length,h=0;h<f;h++){var y=t[h];if(o){var g=n.replace(y,h);if(m(g)){f>1&&(g=p(g,{key:g.key||h})),r.push(c(g,y,h));continue}}if("text"!==y.type){var v=y,b={};l(v)?((0,a.setStyleProp)(v.attribs.style,v.attribs),b=v.attribs):v.attribs&&(b=(0,i.default)(v.attribs,v.name));var E=void 0;switch(y.type){case"script":case"style":y.children[0]&&(b.dangerouslySetInnerHTML={__html:y.children[0].data});break;case"tag":"textarea"===y.name&&y.children[0]?b.defaultValue=y.children[0].data:y.children&&y.children.length&&(E=e(y.children,n));break;default:continue}f>1&&(b.key=h),r.push(c(d(y.name,b,E),y,h))}else{var _=!y.data.trim().length;if(_&&y.parent&&!(0,a.canTextBeChildOfNode)(y.parent))continue;if(n.trim&&_)continue;r.push(c(y.data,y,h))}}return 1===r.length?r[0]:r};var o=n(280),i=r(n(789)),a=n(344),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function l(e){return a.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,a.isCustomComponent)(e.name,e.attribs)}},704:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,a.default)((0,o.default)(e,(null==t?void 0:t.htmlparser2)||l),t):[]};var o=r(n(604));t.htmlToDOM=o.default;var i=r(n(789));t.attributesToProps=i.default;var a=r(n(660));t.domToReact=a.default;var s=n(892);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1}},344:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!a.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,i.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(280),i=r(n(8)),a=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},628:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var p=1,d=1;function m(e){var t=e.match(n);t&&(p+=t.length);var r=e.lastIndexOf("\n");d=~r?e.length-r:d+e.length}function f(){var e={line:p,column:d};return function(t){return t.position=new h(e),b(),t}}function h(e){this.start=e,this.end={line:p,column:d},this.source=l.source}h.prototype.content=e;var y=[];function g(t){var n=new Error(l.source+":"+p+":"+d+": "+t);if(n.reason=t,n.filename=l.source,n.line=p,n.column=d,n.source=e,!l.silent)throw n;y.push(n)}function v(t){var n=t.exec(e);if(n){var r=n[0];return m(r),e=e.slice(r.length),n}}function b(){v(r)}function E(e){var t;for(e=e||[];t=_();)!1!==t&&e.push(t);return e}function _(){var t=f();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return d+=2,m(r),e=e.slice(n),d+=2,t({type:"comment",comment:r})}}function w(){var e=f(),n=v(o);if(n){if(_(),!v(i))return g("property missing ':'");var r=v(a),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return v(s),l}}return b(),function(){var e,t=[];for(E(t);e=w();)!1!==e&&(t.push(e),E(t));return t}()}},172:(e,t,n)=>{"use strict";function r(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach((e=>{o[e]=new r(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((e=>{o[e]=new r(e,2,!1,e,null,!1,!1)})),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach((e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((e=>{o[e]=new r(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((e=>{o[e]=new r(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((e=>{o[e]=new r(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)}));const i=/[\-\:]([a-z])/g,a=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,null,!1,!1)})),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((e=>{const t=e.replace(i,a);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)})),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)}));const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(180),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),p=Object.keys(c).reduce(((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e}),{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=p},180:(e,t)=>{t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},8:function(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(256)),o=n(424);function i(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,(function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)})),n):n}i.default=i,e.exports=i},424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(a,l):e.replace(i,l)).replace(r,s))}},256:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(628));t.default=function(e,t){var n=null;if(!e||"string"!=typeof e)return n;var r=(0,o.default)(e),i="function"==typeof t;return r.forEach((function(e){if("declaration"===e.type){var r=e.property,o=e.value;i?t(r,o,e):o&&((n=n||{})[r]=o)}})),n}},280:e=>{"use strict";e.exports=window.React}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,n,o,i)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,o,i]=e[u],s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(u--,1);var c=o();void 0!==c&&(t=c)}}return t}i=i||0;for(var u=e.length;u>0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[n,o,i]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={656:0,564:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,i,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(l)var u=l(r)}for(t&&t(n);c<a.length;c++)i=a[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(u)},n=globalThis.webpackChunksonypayment_light_for_woocommerce=globalThis.webpackChunksonypayment_light_for_woocommerce||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=r.O(void 0,[564],(()=>r(952)));o=r.O(o)})(); -
sonypayment-light-for-woocommerce/trunk/includes/class-spfwc-light-admin-order.php
r3519149 r3804294 191 191 $latest .= '<tr><th>' . esc_html__( 'Handling of personal information', 'sonypayment-light-for-woocommerce' ) . ':</th><td>' . esc_html__( 'Agreed', 'sonypayment-light-for-woocommerce' ) . '</td></tr>'; 192 192 } 193 if ( 'sonypayment-light' === $payment_method && isset( $response['PayType'] ) && '01' !== $response['PayType']) {193 if ( 'sonypayment-light' === $payment_method && isset( $response['PayType'] ) ) { 194 194 $latest .= '<tr><th>' . esc_html__( 'The number of installments', 'sonypayment-light-for-woocommerce' ) . ':</th><td>' . esc_html( spfwc_get_paytype( $response['PayType'] ) ) . '</td></tr>'; 195 195 } elseif ( 'sonypayment-light_cvs' === $payment_method && ! isset( $response['NyukinDate'] ) && isset( $response['PayLimit'] ) ) { -
sonypayment-light-for-woocommerce/trunk/includes/class-spfwc-light-blocks-support.php
r3519149 r3804294 106 106 $three_d_secure_html = ''; 107 107 $response_data_3d = array(); 108 $card_error_message = ''; 108 109 if ( is_page( $checkout_page_id ) ) { 110 // The block checkout does not render notices added by wc_add_notice(), 111 // so the error message is passed to the script and displayed there. 112 $card_error_message = SPFWC_Payment_Response_Handler::get_checkout_notice(); 113 109 114 ob_start(); 110 115 $this->gateway->elements_form(); … … 154 159 'three_d_secure_html' => $three_d_secure_html, 155 160 'response_data_3d' => $response_data_3d, 161 'card_error_message' => $card_error_message, 156 162 ); 157 163 -
sonypayment-light-for-woocommerce/trunk/includes/class-spfwc-light-payment-gateway.php
r3519149 r3804294 414 414 </p>'; 415 415 $default_fields['card-expmm-field'] = '<p class="form-row form-row-wide"> 416 <label >' . esc_html__( 'Expiry (MM/YY)', 'sonypayment-light-for-woocommerce' ) . ' <span class="required">*</span></label>416 <label id="' . esc_attr( $this->id ) . '-card-exp-label" for="' . esc_attr( $this->id ) . '-card-expmm">' . esc_html__( 'Expiry (MM/YY)', 'sonypayment-light-for-woocommerce' ) . ' <span class="required">*</span></label> 417 417 <input id="' . esc_attr( $this->id ) . '-card-expmm" class="input-text" inputmode="numeric" autocomplete="off" autocorrect="no" autocapitalize="no" spellcheck="no" type="tel" maxlength="2" style="width:60px" placeholder="' . esc_attr__( 'MM', 'sonypayment-light-for-woocommerce' ) . '" /> / 418 <input id="' . esc_attr( $this->id ) . '-card-expyy" class="input-text" inputmode="numeric" autocomplete="off" autocorrect="no" autocapitalize="no" spellcheck="no" type="tel" maxlength="2" style="width:60px" placeholder="' . esc_attr__( 'YY', 'sonypayment-light-for-woocommerce' ) . '" />418 <input id="' . esc_attr( $this->id ) . '-card-expyy" aria-labelledby="' . esc_attr( $this->id ) . '-card-exp-label" class="input-text" inputmode="numeric" autocomplete="off" autocorrect="no" autocapitalize="no" spellcheck="no" type="tel" maxlength="2" style="width:60px" placeholder="' . esc_attr__( 'YY', 'sonypayment-light-for-woocommerce' ) . '" /> 419 419 </p>'; 420 420 if ( $this->seccd ) { … … 428 428 <input id="' . esc_attr( $this->id ) . '-card-name" class="input-text" inputmode="text" autocomplete="off" autocorrect="no" autocapitalize="no" spellcheck="no" type="text" placeholder="TARO YAMADA" /> 429 429 </p>'; 430 $howtopay = apply_filters( 'spfwc_display_howtopay_select', $this->howtopay ); 430 431 $is_card_member = false; 432 $response_member = array(); 433 if ( is_user_logged_in() && $this->cardmember ) { 434 $customer_id = get_current_user_id(); 435 $member = new SPFWC_Card_Member( $customer_id ); 436 $is_card_member = $member->is_card_member(); 437 if ( $is_card_member ) { 438 $response_member = $member->search_card_member(); 439 } 440 } 441 $saved_cardno = ( isset( $response_member['ResponseCd'] ) && 'OK' === $response_member['ResponseCd'] && isset( $response_member['CardNo'] ) ) ? $response_member['CardNo'] : ''; 442 $howtopay = apply_filters( 'spfwc_display_howtopay_select', $this->howtopay ); 431 443 if ( '1' !== $howtopay ) { 432 $paytype_select_field = $this->paytype_select_field( );444 $paytype_select_field = $this->paytype_select_field( '', $saved_cardno ); 433 445 $default_fields['card-howtopay-field'] = '<p class="form-row form-row-wide"> 434 <label for="' . esc_attr( $this->id ) . '-card-howtopay">' . esc_html__( 'The number of installments', 'sonypayment-light-for-woocommerce' ) . ' <span class="required">*</span></label>446 <label id="' . esc_attr( $this->id ) . '-card-howtopay-label" for="' . esc_attr( $this->id ) . '-card-paytype-' . esc_attr( $this->get_active_paytype( $saved_cardno ) ) . '">' . esc_html__( 'The number of installments', 'sonypayment-light-for-woocommerce' ) . ' <span class="required">*</span></label> 435 447 <span>' . $paytype_select_field . '</span> 436 448 </p>'; … … 442 454 <?php 443 455 if ( is_user_logged_in() && $this->cardmember ) : 444 $customer_id = get_current_user_id(); 445 $member = new SPFWC_Card_Member( $customer_id ); 446 if ( $member->is_card_member() ) : 447 $response_member = $member->search_card_member(); 448 $cardlast4 = ( 'OK' === $response_member['ResponseCd'] && isset( $response_member['CardNo'] ) ) ? substr( $response_member['CardNo'], -4 ) : '****'; 456 if ( $is_card_member ) : 457 $cardlast4 = ( 'OK' === $response_member['ResponseCd'] && isset( $response_member['CardNo'] ) ) ? substr( $response_member['CardNo'], -4 ) : '****'; 449 458 ?> 450 459 <p class="form-row form-row-wide"> 451 <input id="<?php echo esc_attr( $this->id ); ?>-card-member-option-saved" name="<?php echo esc_attr( $this->id ); ?>_card_member_option" type="radio" class="input-radio" value="saved" />460 <input id="<?php echo esc_attr( $this->id ); ?>-card-member-option-saved" name="<?php echo esc_attr( $this->id ); ?>_card_member_option" type="radio" class="input-radio" value="saved" data-cardfirst="<?php echo esc_attr( substr( $saved_cardno, 0, 2 ) ); ?>"<?php checked( 'OK' === $response_member['ResponseCd'] ); ?> /> 452 461 <label for="<?php echo esc_attr( $this->id ); ?>-card-member-option-saved" style="display:inline;"><?php esc_html_e( 'Using the saved credit card.', 'sonypayment-light-for-woocommerce' ); ?></label> 453 462 </p> 454 463 <p class="form-row form-row-wide"> 455 < label for="<?php echo esc_attr( $this->id ); ?>-card-member-cardlast4" style="display:inline;"><?php esc_html_e( 'Last 4 digits of the saved card number: ', 'sonypayment-light-for-woocommerce' ); ?></label>464 <span style="display:inline;"><?php esc_html_e( 'Last 4 digits of the saved card number: ', 'sonypayment-light-for-woocommerce' ); ?></span> 456 465 <span id="<?php echo esc_attr( $this->id ); ?>-card-member-cardlast4"><?php echo esc_html( $cardlast4 ); ?></span> 457 466 </p> … … 535 544 if ( $this->three_d_secure ) { 536 545 echo '<div id="sonypayment-consent-message"> 537 <textarea class="sonypayment_agreement_message" rows="5" readonly>' . wp_kses_post( spfwc_consent_message() ) . '</textarea>546 <textarea id="sonypayment-agreement-message" class="sonypayment_agreement_message" rows="5" readonly aria-label="' . esc_attr__( 'Handling of personal information', 'sonypayment-light-for-woocommerce' ) . '">' . wp_kses_post( spfwc_consent_message() ) . '</textarea> 538 547 <p class="sonypayment-consent-area"> 539 548 <input type="checkbox" id="sonypayment_agree" value="agree" /><label for="sonypayment_agree">' . esc_html__( 'I agree to the handling of personal information', 'sonypayment-light-for-woocommerce' ) . '</label> … … 544 553 545 554 /** 555 * Returns the key of the installments field to display first. 556 * 557 * @since 2.0.9 558 * 559 * @param string $cardno Card number. 560 * @return string 'default', '4535', '37' or '36'. 561 */ 562 public function get_active_paytype( $cardno = '' ) { 563 564 $first_c = substr( $cardno, 0, 1 ); 565 $first_cc = substr( $cardno, 0, 2 ); 566 if ( '4' === $first_c || '5' === $first_c || '35' === $first_cc ) { 567 $active = '4535'; 568 } elseif ( '36' === $first_cc ) { 569 $active = '36'; 570 } elseif ( '37' === $first_cc ) { 571 $active = '37'; 572 } else { 573 $active = 'default'; 574 } 575 return $active; 576 } 577 578 /** 546 579 * Selection of installments field. 547 580 * 548 581 * @param string $paytype Number of payments. 549 */ 550 public function paytype_select_field( $paytype = '' ) { 582 * @param string $cardno Card number used to select the initial installments field. 583 */ 584 public function paytype_select_field( $paytype = '', $cardno = '' ) { 585 586 $active = $this->get_active_paytype( $cardno ); 587 $hidden_attr = ' style="display:none;" disabled="disabled"'; 588 $select_attr = array( 589 'default' => $hidden_attr, 590 '4535' => $hidden_attr, 591 '37' => $hidden_attr, 592 '36' => $hidden_attr, 593 ); 594 $select_attr[ $active ] = ''; 551 595 552 596 $field = '<input type="hidden" name="' . esc_attr( $this->id ) . '_card_paytype" value="01" />'; 553 597 $field .= ' 554 <select id="' . esc_attr( $this->id ) . '-card-paytype-default" name="' . esc_attr( $this->id ) . '_card_paytype">598 <select id="' . esc_attr( $this->id ) . '-card-paytype-default" aria-labelledby="' . esc_attr( $this->id ) . '-card-howtopay-label" name="' . esc_attr( $this->id ) . '_card_paytype"' . $select_attr['default'] . ' > 555 599 <option value="01"' . ( ( '01' == $paytype ) ? ' selected="selected"' : ' ' ) . '>' . esc_html__( 'Lump-sum payment', 'sonypayment-light-for-woocommerce' ) . '</option> 556 600 </select>'; 557 601 $field .= ' 558 <select id="' . esc_attr( $this->id ) . '-card-paytype-4535" name="' . esc_attr( $this->id ) . '_card_paytype" style="display:none;" disabled="disabled">602 <select id="' . esc_attr( $this->id ) . '-card-paytype-4535" aria-labelledby="' . esc_attr( $this->id ) . '-card-howtopay-label" name="' . esc_attr( $this->id ) . '_card_paytype"' . $select_attr['4535'] . ' > 559 603 <option value="01"' . ( ( '01' == $paytype ) ? ' selected="selected"' : '' ) . '>' . esc_html__( 'Lump-sum payment', 'sonypayment-light-for-woocommerce' ) . '</option> 560 604 <option value="02"' . ( ( '02' == $paytype ) ? ' selected="selected"' : '' ) . '>2' . esc_html__( '-installments', 'sonypayment-light-for-woocommerce' ) . '</option> … … 576 620 </select>'; 577 621 $field .= ' 578 <select id="' . esc_attr( $this->id ) . '-card-paytype-37" name="' . esc_attr( $this->id ) . '_card_paytype" style="display:none;" disabled="disabled">622 <select id="' . esc_attr( $this->id ) . '-card-paytype-37" aria-labelledby="' . esc_attr( $this->id ) . '-card-howtopay-label" name="' . esc_attr( $this->id ) . '_card_paytype"' . $select_attr['37'] . ' > 579 623 <option value="01"' . ( ( '01' == $paytype ) ? ' selected="selected"' : '' ) . '>' . esc_html__( 'Lump-sum payment', 'sonypayment-light-for-woocommerce' ) . '</option> 580 624 <option value="03"' . ( ( '03' == $paytype ) ? ' selected="selected"' : '' ) . '>3' . esc_html__( '-installments', 'sonypayment-light-for-woocommerce' ) . '</option> … … 594 638 </select>'; 595 639 $field .= ' 596 <select id="' . esc_attr( $this->id ) . '-card-paytype-36" name="' . esc_attr( $this->id ) . '_card_paytype" style="display:none;" disabled="disabled">640 <select id="' . esc_attr( $this->id ) . '-card-paytype-36" aria-labelledby="' . esc_attr( $this->id ) . '-card-howtopay-label" name="' . esc_attr( $this->id ) . '_card_paytype"' . $select_attr['36'] . ' > 597 641 <option value="01"' . ( ( '01' == $paytype ) ? ' selected="selected"' : '' ) . '>' . esc_html__( 'Lump-sum payment', 'sonypayment-light-for-woocommerce' ) . '</option> 598 642 <option value="88"' . ( ( '88' == $paytype ) ? ' selected="selected"' : '' ) . '>' . esc_html__( 'Revolving payment', 'sonypayment-light-for-woocommerce' ) . '</option>'; … … 685 729 686 730 if ( $this->three_d_secure && isset( $_POST['done3d'] ) ) { 731 // Restore 3D Secure result keys lowercased by the Store API on the block checkout. 732 $keys_3d = array( 'EncodeXId3D', 'MessageVersionNo3D', 'TransactionStatus3D', 'CAVVAlgorithm3D', 'ECI3D', 'CAVV3D', 'SecureResultCode', 'DSTransactionId', 'ThreeDSServerTransactionId' ); 733 foreach ( $keys_3d as $key_3d ) { 734 $key_3d_lower = strtolower( $key_3d ); 735 if ( ! isset( $_POST[ $key_3d ] ) && isset( $_POST[ $key_3d_lower ] ) ) { 736 $_POST[ $key_3d ] = $_POST[ $key_3d_lower ]; 737 } 738 } 687 739 $param_list['Token'] = $token; 688 740 if ( isset( $_POST['EncodeXId3D'] ) ) { … … 836 888 $member = new SPFWC_Card_Member( $customer_id ); 837 889 890 // Set the 3D Secure authentication result only in the settlement request. 891 $member_param_list = array_diff_key( 892 $param_list, 893 array_flip( array( 'EncodeXId3D', 'MessageVersionNo3D', 'TransactionStatus3D', 'CAVVAlgorithm3D', 'ECI3D', 'CAVV3D', 'SecureResultCode', 'DSTransactionId', 'ThreeDSServerTransactionId' ) ) 894 ); 895 838 896 // Card member pay with saved card. 839 897 if ( isset( $_POST['sonypayment-light_card_member_option'] ) && 'saved' === wp_unslash( $_POST['sonypayment-light_card_member_option'] ) ) { 840 898 if ( ! isset( $param_list['KaiinId'] ) && ! isset( $param_list['KaiinPass'] ) ) { 841 899 // Search of card member. 842 $response_member = $member->search_card_member( $ param_list );900 $response_member = $member->search_card_member( $member_param_list ); 843 901 if ( 'OK' !== $response_member['ResponseCd'] ) { 844 902 $responsecd = explode( '|', $response_member['ResponseCd'] ); … … 859 917 if ( 'add' === $card_member ) { 860 918 // Register of card member. 861 $response_member = $member->create_card_member( $ param_list );919 $response_member = $member->create_card_member( $member_param_list ); 862 920 if ( 'OK' !== $response_member['ResponseCd'] ) { 863 921 $responsecd = explode( '|', $response_member['ResponseCd'] ); … … 876 934 } elseif ( 'change' === $card_member ) { 877 935 // Search of card member. 878 $response_member = $member->search_card_member( $ param_list );936 $response_member = $member->search_card_member( $member_param_list ); 879 937 if ( 'OK' === $response_member['ResponseCd'] ) { 880 938 // Update of card member. 881 $response_member = $member->update_card_member( $ param_list );939 $response_member = $member->update_card_member( $member_param_list ); 882 940 if ( 'OK' !== $response_member['ResponseCd'] ) { 883 941 $responsecd = explode( '|', $response_member['ResponseCd'] ); … … 927 985 $response_data['Agreement'] = '1'; 928 986 } 987 // Keep the number of installments, because the response of the API type does not contain it. 988 if ( ! isset( $response_data['PayType'] ) ) { 989 $response_data['PayType'] = $paytype; 990 } 929 991 do_action( 'spfwc_process_payment', $response_data, $order ); 930 992 $this->process_response( $response_data, $order ); -
sonypayment-light-for-woocommerce/trunk/includes/class-spfwc-light-payment-response-handler.php
r3519149 r3804294 25 25 add_action( 'woocommerce_api_wc_sonypayment', array( $this, 'response_handler' ) ); 26 26 add_action( 'woocommerce_api_wc_sonypayment-light_transfer', array( $this, 'block_process_payment_transfer' ) ); 27 add_action( 'template_redirect', array( $this, 'checkout_notice' ) ); 28 } 29 30 /** 31 * The error notice saved on returning from 3D Secure authentication. 32 * 33 * @var string|null 34 */ 35 private static $checkout_notice = null; 36 37 /** 38 * Get the error notice saved on returning from 3D Secure authentication. 39 * 40 * The log is read only once and cached, because the block checkout reads the 41 * message when the payment method data is built, after 'template_redirect'. 42 * 43 * @return string Empty string when there is no notice. 44 * @since 2.0.9 45 */ 46 public static function get_checkout_notice() { 47 48 if ( null !== self::$checkout_notice ) { 49 return self::$checkout_notice; 50 } 51 52 self::$checkout_notice = ''; 53 54 if ( isset( $_GET['transaction_code'] ) ) { 55 $trans_code = sanitize_text_field( wp_unslash( $_GET['transaction_code'] ) ); 56 $notice = SPFWC_Payment_Logger::get_notice_log( $trans_code ); 57 if ( $notice ) { 58 self::$checkout_notice = $notice; 59 SPFWC_Payment_Logger::clear_notice_log( $trans_code ); 60 } 61 } 62 63 return self::$checkout_notice; 64 } 65 66 /** 67 * Whether the checkout page is built with the checkout block. 68 * 69 * @return bool 70 * @since 2.0.9 71 */ 72 private function is_block_checkout() { 73 74 if ( ! class_exists( 'WC_Blocks_Utils' ) ) { 75 return false; 76 } 77 78 // has_block() treats a string as the content itself, so the page ID must be an integer. 79 return WC_Blocks_Utils::has_block_in_page( (int) get_option( 'woocommerce_checkout_page_id' ), 'woocommerce/checkout' ); 80 } 81 82 /** 83 * Display the error notice saved on returning from 3D Secure authentication. 84 * 85 * @since 2.0.9 86 */ 87 public function checkout_notice() { 88 89 if ( ! is_checkout() ) { 90 return; 91 } 92 93 // The block checkout does not render notices added by wc_add_notice(). 94 // There the message is passed to the script in SPFWC_Blocks_Support instead. 95 if ( $this->is_block_checkout() ) { 96 return; 97 } 98 99 $notice = self::get_checkout_notice(); 100 if ( '' !== $notice ) { 101 wc_add_notice( $notice, 'error' ); 102 } 103 } 104 105 /** 106 * Redirect with an error notice. 107 * 108 * The response from the 3D Secure authentication page is a cross site request, 109 * so the session cookie is not sent and WooCommerce discards the notice added by 110 * wc_add_notice(). Pass the message through the log table instead. 111 * 112 * @param string $message Error message. 113 * @param string $trans_code Transaction code. 114 * @param string $redirect_url Redirect URL. 115 * @since 2.0.9 116 */ 117 private function redirect_with_notice( $message, $trans_code, $redirect_url ) { 118 119 if ( ! empty( $trans_code ) ) { 120 SPFWC_Payment_Logger::add_notice_log( $message, $trans_code ); 121 $redirect_url = add_query_arg( 'transaction_code', $trans_code, $redirect_url ); 122 } else { 123 wc_add_notice( $message, 'error' ); 124 } 125 wp_safe_redirect( $redirect_url ); 126 exit; 27 127 } 28 128 … … 115 215 SPFWC_Logger::add_log( '[3Secure] Error: ' . print_r( $response_data, true ) ); 116 216 $localized_message = __( '3D Secure authentication failed.', 'sonypayment-light-for-woocommerce' ); 117 wc_add_notice( $localized_message, 'error' ); 118 wp_safe_redirect( wc_get_checkout_url() ); 119 exit; 217 $trans_code = ( isset( $response_data['MerchantFree1'] ) ) ? $response_data['MerchantFree1'] : ''; 218 $this->redirect_with_notice( $localized_message, $trans_code, wc_get_checkout_url() ); 120 219 } 121 220 … … 181 280 exit; 182 281 } else { 183 wc_add_notice( __( 'Payment processing failed. Please retry.', 'sonypayment-light-for-woocommerce' ), 'error' ); 184 wp_safe_redirect( wc_get_checkout_url() ); 185 exit; 282 // Take over the notice added by process_payment(). 283 $localized_message = __( 'Payment processing failed. Please retry.', 'sonypayment-light-for-woocommerce' ); 284 $notices = wc_get_notices( 'error' ); 285 if ( ! empty( $notices ) ) { 286 $notice = end( $notices ); 287 $localized_message = ( is_array( $notice ) && isset( $notice['notice'] ) ) ? $notice['notice'] : $notice; 288 } 289 wc_clear_notices(); 290 $this->redirect_with_notice( $localized_message, $response_data['MerchantFree1'], wc_get_checkout_url() ); 186 291 } 187 292 } … … 247 352 SPFWC_Logger::add_log( '[3Secure] Error: ' . print_r( $response_data, true ) ); 248 353 $localized_message = __( 'Failed to return from 3D Secure authentication.', 'sonypayment-light-for-woocommerce' ); 249 wc_add_notice( $localized_message, 'error' );250 wp_safe_redirect(wc_get_checkout_url() );354 $trans_code = ( isset( $response_data['MerchantFree1'] ) ) ? $response_data['MerchantFree1'] : ''; 355 $this->redirect_with_notice( $localized_message, $trans_code, wc_get_checkout_url() ); 251 356 endif; 252 357 exit; -
sonypayment-light-for-woocommerce/trunk/includes/spfwc-light-form-cardmember.php
r3370943 r3804294 18 18 <?php if ( ! empty( $cardlast4 ) ) : ?> 19 19 <p class="form-row form-row-wide"> 20 < label for="sonypayment-card-member-cardlast4" style="display:inline;"><?php esc_html_e( 'Last 4 digits of the saved card number: ', 'sonypayment-light-for-woocommerce' ); ?></label>20 <span style="display:inline;"><?php esc_html_e( 'Last 4 digits of the saved card number: ', 'sonypayment-light-for-woocommerce' ); ?></span> 21 21 <span id="sonypayment-card-member-cardlast4"><?php echo esc_html( $cardlast4 ); ?></span> 22 22 </p> … … 27 27 </p> 28 28 <p class="form-row form-row-wide"> 29 <label ><?php esc_html_e( 'Expiry (MM/YY)', 'sonypayment-light-for-woocommerce' ); ?> <span class="required">*</span></label>29 <label id="sonypayment-card-exp-label" for="sonypayment-card-expmm"><?php esc_html_e( 'Expiry (MM/YY)', 'sonypayment-light-for-woocommerce' ); ?> <span class="required">*</span></label> 30 30 <input id="sonypayment-card-expmm" name="sonypayment_card_expmm" class="input-text" inputmode="numeric" autocomplete="off" autocorrect="no" autocapitalize="no" spellcheck="no" type="tel" maxlength="2" style="width:60px" placeholder="<?php esc_attr_e( 'MM', 'sonypayment-light-for-woocommerce' ); ?>" /> / 31 <input id="sonypayment-card-expyy" name="sonypayment_card_expyy" class="input-text" inputmode="numeric" autocomplete="off" autocorrect="no" autocapitalize="no" spellcheck="no" type="tel" maxlength="2" style="width:60px" placeholder="<?php esc_attr_e( 'YY', 'sonypayment-light-for-woocommerce' ); ?>" />31 <input id="sonypayment-card-expyy" aria-labelledby="sonypayment-card-exp-label" name="sonypayment_card_expyy" class="input-text" inputmode="numeric" autocomplete="off" autocorrect="no" autocapitalize="no" spellcheck="no" type="tel" maxlength="2" style="width:60px" placeholder="<?php esc_attr_e( 'YY', 'sonypayment-light-for-woocommerce' ); ?>" /> 32 32 </p> 33 33 <?php if ( ! empty( $settings['seccd'] ) && 'yes' === $settings['seccd'] ) : ?> … … 46 46 <?php if ( $is_3d_secure ) : ?> 47 47 <fieldset id="sonypayment-consent-message"> 48 <textarea class="sonypayment_agreement_message" rows="5" readonly><?php echo wp_kses_post( spfwc_consent_message() ); ?></textarea>48 <textarea id="sonypayment-agreement-message" class="sonypayment_agreement_message" rows="5" readonly aria-label="<?php esc_attr_e( 'Handling of personal information', 'sonypayment-light-for-woocommerce' ); ?>"><?php echo wp_kses_post( spfwc_consent_message() ); ?></textarea> 49 49 <p class="sonypayment-consent-area"> 50 50 <input type="checkbox" id="sonypayment_agree" value="agree" /><label for="sonypayment_agree"><span><?php esc_html_e( 'I agree to the handling of personal information', 'sonypayment-light-for-woocommerce' ); ?></span></label> -
sonypayment-light-for-woocommerce/trunk/readme.txt
r3529395 r3804294 3 3 Tags: credit card, payment, woocommerce, e-scott 4 4 Requires at least: 5.6 5 Tested up to: 6.95 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.0. 87 Stable tag: 2.0.9 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 88 88 89 89 == Changelog == 90 91 = 2.0.9 - 2026-11-16 = 92 * Fix - Fixed the bug that card information could not be registered or updated on the block-based checkout page. 93 * Fix - Fixed the bug that installment payments could not be selected when paying with a saved card on the block-based checkout page. 94 * Fix - Fixed the bug that the error message was not displayed when 3D Secure authentication failed. 95 * Fix - Fixed the bug that the labels of the credit card input form were not correctly associated with the input fields. 96 * Update - Changed to set the 3D Secure authentication result only in the settlement request. 97 * Update - Changed to display the number of installments in the payment information metabox for lump-sum payments as well. 90 98 91 99 = 2.0.8 - 2026-05-12 = -
sonypayment-light-for-woocommerce/trunk/woo-sonypayment-light.php
r3529395 r3804294 6 6 * Author: Welcart Inc. 7 7 * Author URI: https://www.welcart.com/ 8 * Version: 2.0. 88 * Version: 2.0.9 9 9 * WC requires at least: 3.0 10 * WC tested up to: 1 0.710 * WC tested up to: 11.3 11 11 * License: GNU General Public License v2.0 12 12 * License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 21 21 } 22 22 23 define( 'SPFWC_LIGHT_VERSION', '2.0. 8.2605121' );23 define( 'SPFWC_LIGHT_VERSION', '2.0.9.2611161' ); 24 24 define( 'SPFWC_LIGHT_PLUGIN_FILE', __FILE__ ); 25 25 define( 'SPFWC_LIGHT_PLUGIN_DIR', untrailingslashit( __DIR__ ) );
Note:
See TracChangeset
for help on using the changeset viewer.