1import{o}from"./p-b6a933a1.js";import{o as i,s as d}from"./p-49fdface.js";import{o as l,a as n,b as s,h as a,i as v,c as u}from"./p-7cf48949.js";const r=()=>{var o,l;const i=[...n().map((({processor_type:d})=>d)),...s().map((({id:d})=>d))];i.includes(d.id)||(null===(l=null===(o=null===window||void 0===window?void 0:window.wp)||void 0===o?void 0:o.hooks)||void 0===l?void 0:l.applyFilters)&&!window.wp.hooks.applyFilters("surecart_auto_select_payment_method",!0)||(d.id=(null==i?void 0:i.length)?null==i?void 0:i[0]:null)},t=()=>{if("paypal"===(null==d?void 0:d.id)&&"card"===(null==d?void 0:d.method)&&a("paypal")&&(d.method=null),!v(null==d?void 0:d.id))return;const o=(u()||[]).map((({id:d})=>d));o.includes(d.method)||(d.method=(null==o?void 0:o.length)?null==o?void 0:o[0]:null)};o("checkout",(()=>{r(),t()})),i("id",(()=>{r(),"paypal"!==(null==d?void 0:d.id)&&(d.method=null),t()})),l("processors",(()=>r())),l("disabled",(()=>r())),l("methods",(()=>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.