PageSourceSearch

https://firehole.com/wp-content/plugins/fortis-for-woocommerce/ass…/blocks.js?ver=61f59ed2e7e77e3a3dbb

js firehole.com collected 2026-10-04 21:52:10 UTC 25,341 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e={20:(e,t,r)=>{var n=r(609),o=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var n,c={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,n)&&!s.hasOwnProperty(n)&&(c[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===c[n]&&(c[n]=t[n]);return{$$typeof:o,type:e,key:l,ref:u,props:c,_owner:a.current}}},848:(e,t,r)=>{e.exports=r(20)},609:e=>{e.exports=window.React}},t={};const r=window.wp.i18n,n=window.wc.wcBlocksRegistry,o=window.wp.htmlEntities,i=window.wc.wcSettings,a={1e3:"ACH/CC - Approved",1001:"AuthCompleted",1002:"Forced",1003:"AuthOnly Declined",1004:"Validation Failure (System Run Trx)",1005:"Processor Response Invalid",1200:"Voided",1201:"Partial Approval",1240:"Approved, optional fields are missing",1301:"Account Deactivated for Fraud",1500:"Generic Decline",1510:"Call",1518:"Transaction Not Permitted - Terminal",1520:"Pickup Card",1530:"Retry Trx",1531:"Communication Error",1540:"Setup Issue, contact Support",1541:"Device is not signature capable",1588:"Data could not be de-tokenized",1599:"Other Reason",1601:"Generic Decline",1602:"Call",1603:"No Reply",1604:"Pickup Card - No Fraud",1605:"Pickup Card - Fraud",1606:"Pickup Card - Lost",1607:"Pickup Card - Stolen",1608:"Account Error",1609:"Already Reversed",1610:"Bad PIN",1611:"Cashback Exceeded",1612:"Cashback Not Available",1613:"CID Error",1614:"Date Error",1615:"Do Not Honor",1616:"NSF",1617:"Exceeded Withdrawal Limit",1618:"Invalid Service Code",1619:"Exceeded activity limit",1620:"Violation",1621:"Encryption 
1Error",1622:"Card Expired",1623:"Renter",1624:"Security Violation",1625:"Card Not Permitted",1626:"Trans Not Permitted",1627:"System Error",1628:"Bad Merchant ID",1629:"Duplicate Batch (Already Closed)",1630:"Batch Rejected",1631:"Account Closed",1632:"PIN tries exceeded",1640:"Required fields are missing (ACH only)",1641:"Previously declined transaction (1640)",1650:"Contact Support",1651:"Max Sending - Throttle Limit Hit (ACH only)",1652:"Max Attempts Exceeded",1653:"Contact Support",1654:"Voided - Online Reversal Failed",1655:"Decline (AVS Auto Reversal)",1656:"Decline (CVV Auto Reversal)",1657:"Decline (Partial Auth Auto Reversal)",1658:"Expired Authorization",1659:"Declined - Partial Approval not Supported",1660:"Bank Account Error, please delete and re-add Account Vault",1661:"Declined AuthIncrement",1662:"Auto Reversal - Processor can't settle",1663:"Manager Needed (Needs override transaction)",1664:"Account Vault Not Found: Sharing Group Unavailable",1665:"Contact Not Found: Sharing Group Unavailable",1666:"Amount Error",1667:"Action Not Allowed in Current State",1668:"Original Authorization Not Valid",1701:"Chip Reject",1800:"Incorrect CVV",1801:"Duplicate Transaction",1802:"MID/TID Not Registered",1803:"Stop Recurring",1804:"No Transactions in Batch",1805:"Batch Does Not Exist"};var s=function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}(848);const{CHECKOUT_STORE_KEY:c,CART_STORE_KEY:l}=window.wc.wcBlocksData;let u=(0,i.getSetting)("fortis_data",{}),d=null,p=null,m=!1,f=!1,_=!1,y=0,g=0,h=0;function v(e,{timeout:t=4e3,interval:r=120}={}){const n=Date.now();let o=null;const i=()=>{let a=!1,s=!1,c=null;try{const e=wp.data.select(l);if(e){"function"==typeof e.isCustomerDataUpdating&&(a=e.isCustomerDataUpdating());const t=e.getCartTotals?e.getCartTotals():null;s=!(!t||!t.total_price),c=t?t.total_price:null}}catch(e){}const u=Date.now()-n,d=null!==o&&c===o;o=c,!a&&s&&d||u>=t?e():setTimeout(i,r)};i()}function b(){try{const e=wp.data.select(l)?.getCartTotals();if(e&&e.total_price)return{cart_total:String(e.total_price),cart_tax:String(e.total_tax||"0")}}catch(e){}return null}if(u.declineMessage){try{wp.data.dispatch("core/notices").createNotice("error",u.declineMessage,{context:"wc/checkout",isDismissible:!0})}catch(e){jQuery((function(e){const t=e(".wp-block-woocommerce-checkout");t.length&&t.prepend('<div class="wc-block-components-notice-banner is-error" role="alert"><div class="wc-block-components-notice-banner__content">'+u.declineMessage+"</div></div>")}))}u.declineMessage=""}let w=0;const j=new Set;let k=!1,Q={isValid:!0,message:""};const A=e=>{k=e,e?(jQuery(".custom-saved-payment-methods").addClass("surcharge-calculating"),0===jQuery(".surcharge-spinner").length&&jQuery(".custom-saved-payment-methods").append('<div class="surcharge-spinner"></div>'),Q={isValid:!1,message:"Calculating surcharges, please wait..."}):(jQuery(".custom-saved-payment-methods").removeClass("surcharge-calculating"),jQuery(".surcharge-spinner").remove(),Q={isValid:!0,message:""})};function S(){A(!0);const e=function(){try{const e=wp.data.select(l).getCustomerData();return{postcode:e?.shippingAddress?.postcode||e?.billingAddress?.postcode||jQuery("#shipping-postcode").val()||jQuery("#billing-postcode").val()||"",fortis_nonce:u.fortisGetTokenSurchargesNonce}}catch(e){return{postcode:jQuery("#shipping-postcode").val()||jQuery("#billing-postcode").val()||"",fortis_nonce:u.fortisGetTokenSurchargesNonce}}}();if(!e.postcode)return void A(!1);const t=jQuery('input[name^="shipping_method"]:checked').val()||jQuery('select[name^="shipping_method"]').val()||jQuery("#shipping-option .wc-block-components-radio-control__input:checked").val(),r=++h,n=b(),o={action:"fortis_get_token_surcharges",postcode:e.postcode,shipping_method:t||"",fortis_nonce:e.fortis_nonce};
1n&&(o.cart_total=n.cart_total,o.cart_tax=n.cart_tax),jQuery.ajax({url:u.ajax_url,type:"POST",timeout:15e3,data:o,success:function(e){r===h&&(e.success&&e.data.tokenSurcharges?(u.tokenSurcharges=e.data.tokenSurcharges,void 0!==e.data.subtotal&&(u.subtotal=e.data.subtotal),void 0!==e.data.taxAmount&&(u.taxAmount=e.data.taxAmount),w++,j.forEach((e=>e(w))),A(!1)):(console.error("Failed to get token surcharges:",e),A(!1)))},error:function(e,t,n){r===h&&(console.error("AJAX error getting token surcharges:",t,n),A(!1))}})}function x(e){if(""===(e=null!=e?String(e).trim():""))return"";if(e.includes("-")){const t=e.split(/-+/);e=t[t.length-1]||""}return e.toUpperCase().replace(/[^A-Z0-9]/g,"")}(()=>{let e=null,t=null,r=null,n=null,o=null,i=null,a=null;try{wp.data.subscribe((()=>{try{var s,c;const u=wp.data.select(l);if(!u)return;const d=u.getCartTotals(),p=d?.total_price,m=`${null!==(s=d?.total_discount)&&void 0!==s?s:""}|${null!==(c=d?.total_discount_tax)&&void 0!==c?c:""}`,f=u.getCustomerData(),_=f?.billingAddress||{},y=f?.shippingAddress||{},g=_.postcode||"",h=y.postcode||"",b=_.state||"",w=y.state||"";(null!==e&&p!==e||null!==t&&m!==t||null!==r&&g!==r||null!==n&&h!==n||null!==o&&b!==o||null!==i&&w!==i)&&(h||g)&&(A(!0),clearTimeout(a),a=setTimeout((()=>v(S)),400)),e=p,t=m,r=g,n=h,o=b,i=w}catch(e){}}))}catch(e){}jQuery(document).on("change","#payment-method .wc-block-components-radio-control__input",(()=>{A(!0),clearTimeout(a),a=setTimeout((()=>v(S)),50)}))})(),(0,r.__)("Fortis Payments","woo-gutenberg-products-block");const E=e=>{const{PaymentMethodLabel:t}=e.components,n=u.title?u.title:(0,r.__)("Credit / Debit Card","woo-gutenberg-products-block");return(0,s.jsx)(t,{text:n})},C=e=>{const{eventRegistration:t}=e,{onCheckoutValidation:r,onShippingRateSelectSuccess:n}=t||{};function o(){if("fortis"===jQuery('input[value="fortis"]:checked').val()){if(_)return;if(m)return;if(y=0,_=!0,jQuery(".wc-block-components-payment-methods__save-card-info").hide(),jQuery(".wc-block-components-checkout-place-order-button").hide(),jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty().html('<div class="fortis-spinner"></div>'),!0===D()){const e=jQuery('input[name^="shipping_method"]:checked').val()||jQuery('select[name^="shipping_method"]').val()||jQuery("#shipping-option .wc-block-components-radio-control__input:checked").val(),t={action:"fortis_get_updated_settings",fortis_nonce:u.fortisGetUpdatedSettingsNonce};e&&(t.shipping_method=e),v((()=>{const e=b();e&&(t.cart_total=e.cart_total,t.cart_tax=e.cart_tax);const r=++g;jQuery.ajax({url:u.ajax_url,async:!0,timeout:1e4,data:t,beforeSend:function(){jQuery("#fortis_spinner_container").empty().html('<div class="fortis-spinner"></div>')},success:function(e){r===g?(N(e),m&&P(),R(),_=!1):_=!1},error:function(e,t,r){console.error("AJAX error:",t,r),m=!1,_=!1,jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").show().html('\n                <h2 class="fortis-error-heading">Error</h2>\n                <p class="fortis-error-message">Failed to load payment form. Please try again.</p>\n              ')}})}))}else _=!1,jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").show().html('\n          <h2 class="fortis-error-heading">Error</h2>\n          <p class="fortis-error-message">Validation failed. Please check your input fields.</p>\n        ')}else m=!1,_=!1,jQuery(".wc-block-components-checkout-place-order-button").show(),jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").empty()}let i,a,s,c;function d(){clearTimeout(i),i=setTimeout(o,50)}wp.element.useEffect((()=>{if(!r)return;const e=r((()=>!k||{type:"error",message:Q.message,hidden:!1}));return()=>e()}),[r]),jQuery(document).on("change","#payment-method .wc-block-components-radio-control__input",(e=>{m=!1,_=!1,d()})),jQuery(document).on("change",'#shipping-option .wc-block-components-radio-control__input, input[name^="shipping_method"], select[name^="shipping_method"]',(e=>{m&&(P(),"fortis"===jQuery('input[value="fortis"]:checked').val()&&d())})),jQuery(document).on("change blur","#email, #billing-first_name, #billing-last_name, #billing-address_1, #billing-city, #billing-postcode, #billing-state, #billing-country",(e=>{"fortis"!==jQuery('input[value="fortis"]:checked').val()||m||_||(clearTimeout(s),s=setTimeout((()=>{jQuery("#fortis_error_container").empty().hide(),o()}),1200))}));let p=0,f=0;return jQuery(document).on("change","#billing-postcode, #billing-state, #billing-country, #shipping-postcode, #shipping-state, #shipping-country",(e=>{if(m)return;const t=Date.now();t-f<500?p++:p=1,f=t,clearTimeout(c),c=setTimeout((()=>{P(),"fortis"===jQuery('input[value="fortis"]:checked').val()&&o(),p=0}),p>=3?1500:500)})),wp.element.useEffect((()=>{const e=["#billing-first_name","#billing-last_name","#billing-address_1","#billing-city","#billing-postcode","#billing-country","#billing-state","#email","#shipping-postcode","#shipping-address_1"];let t={},r=null,n=null;function i(){const t={};return e.forEach((e=>{const r=document.querySelector(e);r&&(t[e]=r.value)})),t}function a(){const r=i();let a=0;for(const n of e)void 0!==t[n]&&r[n]!==t[n]&&""!==r[n]&&a++;t=r,a>=2&&!m&&(clearTimeout(n),n=setTimeout((()=>{P(),"fortis"===jQuery('input[value="fortis"]:checked').val()&&o()}),a>=5?2e3:800))}function s(){r||(t=i(),r=setInterval(a,1e3))}return document.addEventListener("focus",s,{once:!0,capture:!0}
1),document.addEventListener("click",s,{once:!0,capture:!0}),function(){r&&clearInterval(r),n&&clearTimeout(n)}}),[]),wp.element.useEffect((()=>{let e=null,t=!1,r=null;const n=wp.data.subscribe((()=>{try{const n=wp.data.select(l);if(!n)return;const i=n.getCartTotals(),s=i?.total_price;if(null==s)return;if(null!==e&&s!==e&&"fortis"===jQuery('input[value="fortis"]:checked').val()&&(clearTimeout(a),a=setTimeout(B,50)),e=s,"fortis"===jQuery('input[value="fortis"]:checked').val()&&!m){const e=n.getCustomerData();if(e&&e.billingAddress){const n=e.billingAddress,i=n.email||jQuery("#email").val(),a=!!(i&&/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(i)&&n.first_name&&n.last_name&&n.address_1&&n.city&&n.postcode);a&&!t&&(clearTimeout(r),r=setTimeout((()=>{m||_||"fortis"!==jQuery('input[value="fortis"]:checked').val()||o()}),1e3)),t=a}}}catch(e){}}));return()=>{n(),clearTimeout(r)}}),[]),wp.element.useEffect((()=>{const e=setTimeout((()=>{"fortis"===jQuery('input[value="fortis"]:checked').val()&&o()}),100);return()=>clearTimeout(e)}),[]),wp.element.useEffect((()=>{if(!n)return;const e=n((()=>{d()}));return()=>e()}),[n]),wp.element.useEffect((()=>{let e=null,t=null;const r=wp.data.subscribe((()=>{(()=>{try{if("fortis"!==jQuery('input[value="fortis"]:checked').val())return;const r=wp.data.select(l).getCustomerData();if(!r)return;const n=r.billingAddress||{},o=r.shippingAddress||{},i=`${n.address_1}|${n.city}|${n.postcode}`,a=`${o.address_1}|${o.city}|${o.postcode}`;null!==e&&e!==i&&n.address_1&&n.address_1!==o.address_1&&m&&(console.log("Billing address changed - reloading iframe"),P(),d()),null!==t&&t!==a&&m&&(console.log("Shipping address changed - reloading iframe"),P(),d()),e=i,t=a}catch(e){}})()}));return()=>r()}),[]),wp.element.createElement("div",null,wp.element.createElement("div",{id:"fortis_error_container"}),wp.element.createElement("div",{id:"fortispayment"}),wp.element.createElement("div",{id:"fortis_spinner_container"}),wp.element.createElement("form",{id:"fortis_detail_form",role:"form",action:u.url,method:"post",name:"fortis_payment_form"},wp.element.createElement("input",{type:"hidden",id:"fortis_order_id",name:"fortis_order_id",value:u.order_id}),wp.element.createElement("input",{type:"hidden",id:"fortis_result",name:"fortis_result"}),wp.element.createElement("input",{type:"hidden",id:"fortis_SaveAccount",name:"fortis_SaveAccount"})))},T={name:"fortis",label:(0,s.jsx)(E,{}),placeOrderButtonLabel:(0,r.__)("Place Order","woo-gutenberg-products-block"),content:(0,s.jsx)(C,{}),edit:(0,s.jsx)("div",{}),canMakePayment:()=>!0,ariaLabel:(0,o.decodeEntities)(u.title||(0,r.__)("Payment via Fortis","woo-gutenberg-products-block")),supports:{showSaveOption:u.saveAccount,showSavedCards:!0,features:u.supports||[]},savedTokenComponent:Object(wp.element.createElement)((e=>{const{eventRegistration:t,emitResponse:r,token:n}=e,{onPaymentSetup:o,onCheckoutValidation:i}=t,[a,s]=wp.element.useState(0),[c,l]=wp.element.useState((()=>({subtotal:u.subtotal||0,taxAmount:u.taxAmount||0,surchargeAmount:u.tokenSurcharges?.[n]||0})));return wp.element.useEffect((()=>{if(!i)return;const e=i((()=>!k||{type:"error",message:Q.message,hidden:!1}));return()=>e()}),[i]),wp.element.useEffect((()=>{const e=e=>{s(e),l({subtotal:u.subtotal||0,taxAmount:u.taxAmount||0,surchargeAmount:u.tokenSurcharges?.[n]||0})};return j.add(e),()=>{j.delete(e)}}),[n]),wp.element.useEffect((()=>{const e=o((()=>{const e=u.tokenSurcharges&&void 0!==u.tokenSurcharges[n]?u.tokenSurcharges[n]:0;return{type:r.responseTypes.SUCCESS,meta:{paymentMethodData:{token:n,"wc-fortis-payment-token":n,payment_method:"fortis",issavedtoken:1,"surcharge-amount":String(e),"fortis-nonce":u.fortisNonce}}}}));return()=>e()}),[o,n,a]),wp.element.createElement("div",{className:"custom-saved-payment-methods"},wp.element.createElement("p",null,function(e,t,r,n){if(!Number.isInteger(e))return null;const o=Number(t)+Number(n)+Number(r);return n<=0?null:wp.element.createElement("div",null,[wp.element.createElement("p",null,[`Subtotal: $${(t/100).toFixed(2)}`,wp.element.createElement("br"),`Tax: $${(r/100).toFixed(2)}`,wp.element.createElement("br"),`Surcharge Amount: $${(n/100).toFixed(2)}`,wp.element.createElement("br"),wp.element.createElement("strong",null,`Total: $${(o/100).toFixed(2)}`)]),wp.element.createElement("p",null,u.surchargeDisclaimer)])}(parseInt(n.toString()),c.subtotal,c.taxAmount,c.surchargeAmount)))}),null)};function N(e){try{let t=e.indexOf("{"),r=e.lastIndexOf("}")+1,n=e.substring(t,r),o=JSON.parse(n);u.client_token=o.client_token,u.order_id=o.order_id,u.transaction_api_id=o.transaction_api_id,void 0!==o.subtotal&&(u.subtotal=o.subtotal),void 0!==o.taxAmount&&(u.taxAmount=o.taxAmount),u.billing_data=function(){try{const e=wp.data.select(l).getCustomerData(),t=wp.data.select(c);let r="";try{t&&"function"==typeof t.getOrderNotes&&(r=t.getOrderNotes())}catch(e){}if(!r){const e=document.querySelector('textarea[name="order_comments"], textarea[id*="order-comments"], textarea[name*="note"], textarea[placeholder*="note"], .wc-block-components-textarea textarea');e&&e.value&&(r=e.value)}if(e){const t=e.shippingAddress||{}
1,n=e.billingAddress||{},o=n.address_1&&n.address_1!==t.address_1?n:t;return{billing_first_name:o.first_name||"",billing_last_name:o.last_name||"",billing_company:o.company||"",billing_address_1:o.address_1||"",billing_address_2:o.address_2||"",billing_city:o.city||"",billing_state:o.state||"",billing_postcode:o.postcode||"",billing_country:o.country||"",billing_email:o.email||n.email||"",billing_phone:o.phone||n.phone||"",shipping_first_name:t.first_name||"",shipping_last_name:t.last_name||"",shipping_company:t.company||"",shipping_address_1:t.address_1||"",shipping_address_2:t.address_2||"",shipping_city:t.city||"",shipping_state:t.state||"",shipping_postcode:t.postcode||"",shipping_country:t.country||"",shipping_phone:t.phone||"",customer_note:r||"",payment_method:"fortis"}}return null}catch(e){return console.error("Error getting checkout billing data:",e),null}}()}catch(e){console.error("Error parsing AJAX response:",e)}}function D(){try{const e=wp.data.select(l).getCustomerData();if(e){const t=e.shippingAddress||{},r=e.billingAddress||{},n=r.address_1&&r.address_1!==t.address_1?r:t,o=n.email||r.email||jQuery("#email").val();return!(!o||!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(o)||!(n.first_name&&n.last_name&&n.address_1&&n.city&&n.postcode)||(u.address=(n.address_1||"").substring(0,32),u.city=n.city,u.postcode=n.postcode,u.country=n.country||"US",u.state=x(n.state),jQuery(".wc-block-components-payment-methods__save-card-info").show(),0))}}catch(e){}const e=jQuery("#email").val();if(!e||!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e))return!1;if(!jQuery("#billing-first_name").val())return!1;if(!jQuery("#billing-last_name").val())return!1;const t=(jQuery("#billing-address_1").val()||"").substring(0,32);if(!t)return!1;u.address=t;const r=jQuery("#billing-city").val();if(!r)return!1;u.city=r;const n=jQuery("#billing-postcode").val();return!!n&&(u.postcode=n,u.country=jQuery("#billing-country").val(),u.state=x(jQuery("#billing-state").val()),jQuery(".wc-block-components-payment-methods__save-card-info").show(),!0)}function P(){jQuery("#fortispayment iframe").remove(),m=!1,jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty()}function B(){if(f)return;if(y>=3)return console.error("Maximum reset attempts reached, stopping to prevent infinite loop"),m=!1,f=!1,jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").show().html('\n      <h2 class="fortis-error-heading">Error</h2>\n      <p class="fortis-error-message">Unable to load payment form after multiple attempts. Please refresh the page or contact support.</p>\n    '),d=null,void(p=null);f=!0,y++,P();const e=d,t=p;if(d=null,p=null,e?(jQuery("#fortis_error_container").show(),jQuery("#fortis_error_container").html(`\n      <h2 class="fortis-error-heading">${t}</h2>\n      <p class="fortis-error-message">${e}</p>\n    `)):jQuery("#fortis_error_container").empty().hide(),"fortis"===jQuery('input[value="fortis"]:checked').val()&&!0===D()){const e={action:"fortis_get_updated_settings",fortis_nonce:u.fortisGetUpdatedSettingsNonce};v((()=>{const t=b();t&&(e.cart_total=t.cart_total,e.cart_tax=t.cart_tax);const r=++g;jQuery.ajax({url:u.ajax_url,async:!0,timeout:8e3,data:e,beforeSend:function(){jQuery("#fortis_spinner_container").empty().html('<div class="fortis-spinner"></div>')},success:function(e){r===g?(N(e),m&&P(),R(),f=!1):f=!1},error:function(e,t,r){console.error("resetFortisLoader AJAX error:",t,r),m=!1,f=!1,jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").show().html('\n            <h2 class="fortis-error-heading">Error</h2>\n            <p class="fortis-error-message">Failed to load payment form. Please try again.</p>\n          ')}})}))}else f=!1,jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").empty()}function R(){if(!m){m=!0;try{try{const e=wp.data.select(l).getCustomerData();if(e){const t=e.shippingAddress||{},r=e.billingAddress||{},n=r.address_1&&r.address_1!==t.address_1?r:t;u.address=(n.address_1||"").substring(0,32),u.city=n.city||"",u.postcode=n.postcode||"",u.country=n.country||"US",u.state=x(n.state)}}catch(e){console.warn("Could not refresh billing address before iframe creation:",e)}const e=new Commerce.elements(u.client_token),t=jQuery("#fortisp
1ayment").hide();t.length>0&&0===t.find("iframe").length?e.create({container:"#fortispayment",theme:u.fortis_theme,environment:u.fortis_environment,floatingLabels:u.floatingLabels,showValidationAnimation:u.showValidationAnimation,language:"en-us",showReceipt:!1,showSubmitButton:!0,hideAgreementCheckbox:u.hideAgreementCheckbox,defaultCountry:"US",view:u.view,appearance:{colorButtonSelectedBackground:u.fortis_colorButtonSelectedBackground,colorButtonSelectedText:u.fortis_colorButtonSelectedText,colorButtonActionBackground:u.fortis_colorButtonActionBackground,colorButtonActionText:u.fortis_colorButtonActionText,colorButtonBackground:u.fortis_colorButtonBackground,colorButtonText:u.fortis_colorButtonText,colorFieldBackground:u.fortis_colorFieldBackground,colorFieldBorder:u.fortis_colorFieldBorder,colorText:u.fortis_colorText,colorLink:u.fortis_colorLink,fontSize:u.fortis_fontSize,marginSpacing:u.fortis_marginSpacing,borderRadius:u.fortis_borderRadius},fields:{additional:[{name:"transaction_api_id",hidden:!0,value:u.transaction_api_id},{name:"description",hidden:!0,value:""}],billing:[{name:"address",value:u.address,required:!1,hidden:!0},{name:"city",value:u.city,required:!1,hidden:!0},{name:"postal_code",value:u.postcode,required:!1,hidden:!0},{name:"country",value:u.country,required:!1,hidden:!0},{name:"state",value:u.state,required:!1,hidden:!0}]}}):(m=!1,jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").show().html('\n        <h2 class="fortis-error-heading">Error</h2>\n        <p class="fortis-error-message">Payment form container not found. Please try again.</p>\n      ')),e.on("ready",(function(e){jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").empty().hide(),jQuery("#fortispayment").show(),m=!0,y=0,f=!1})),e.on("submit",(function(e){jQuery(document).off("change","#payment-method .wc-block-components-radio-control__input"),jQuery(document).off("change",'#shipping-option .wc-block-components-radio-control__input, input[name^="shipping_method"], select[name^="shipping_method"]'),jQuery(document).off("change","#shipping input, #shipping select, #contact-fields input")})),e.on("done",(function(e){const t=e.data.reason_code_id;if(1e3!==t)return y=0,d=a[t]||"Unknown Code",p="Payment Declined",void B();y=0,document.getElementById("fortis_result").value=JSON.stringify(e);const r=document.querySelectorAll('[id^="checkbox-control-"]');let n="";for(let e=0;e<r.length;e++)(r[e].offsetWidth>0||r[e].offsetHeight>0)&&r[e].parentNode.querySelector(":scope span").textContent.startsWith("Save payment")&&(n=r[e].checked?"on":"off",jQuery("#fortis_SaveAccount").val(n));!function(){const e=document.getElementById("fortis_detail_form");if(!e.querySelector('input[name="_wpnonce"]')){const t=document.createElement("input");t.type="hidden",t.name="_wpnonce",t.value=u.fortisResponseNonce,e.appendChild(t)}if(!e.querySelector('input[name="fortis_billing_data"]')){const t=document.createElement("input");t.type="hidden",t.name="fortis_billing_data",t.value=JSON.stringify(u.billing_data),e.appendChild(t)}e.submit()}()})),e.on("error",(function(e){if(console.error("Iframe error:",e),document.getElementById("fortis_result").value=JSON.stringify(e),m=!1,y>=3)return console.error("Max attempts reached in error handler, not attempting reset"),jQuery("#fortispayment").empty(),jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").show().html('\n          <h2 class="fortis-error-heading">Payment Error</h2>\n          <p class="fortis-error-message">Unable to load payment form. Please refresh the page and try again.</p>\n        '),void(f=!1);p="Payment Error",d=e&&e.data&&e.data.detail?e.data.detail:"An error occurred during payment processing",jQuery(document).on("change","#payment-method .wc-block-components-radio-control__input",(e=>{m=!1,y=0,debouncedInitializeFortisIframe()})),jQuery(document).on("change",'#shipping-option .wc-block-components-radio-control__input, input[name^="shipping_method"], select[name^="shipping_method"]',(e=>{P()})),jQuery(document).on("change","#shipping input, #shipping select, #contact-fields input",(e=>{debouncedResetFortisLoader()})),B()}))}catch(e){console.error("Error creating iframe:",e),m=!1,jQuery("#fortisp
1ayment").empty(),jQuery("#fortis_spinner_container").empty(),jQuery("#fortis_error_container").show().html('\n      <h2 class="fortis-error-heading">Error</h2>\n      <p class="fortis-error-message">Failed to initialize payment form. Please try again.</p>\n    ')}}}(0,n.registerPaymentMethod)(T)})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.