@primer-io/primer-js 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/custom-elements.json +144 -144
- package/dist/primer-loader.d.ts +1 -0
- package/dist/primer-loader.js +10 -10
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
|
@@ -78,268 +78,268 @@
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"kind": "variable",
|
|
81
|
-
"name": "
|
|
81
|
+
"name": "Qr",
|
|
82
82
|
"default": "class{constructor(t){this._methods=t}get(t){return this._methods.get(t)}toArray(){return Array.from(this._methods.values())}size(){return this._methods.size}}"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"kind": "variable",
|
|
86
|
-
"name": "
|
|
86
|
+
"name": "ei",
|
|
87
87
|
"default": "class{constructor(t){this._methods=t}get(t){return this._methods.get(t)}toArray(){return Array.from(this._methods.values())}size(){return this._methods.size}}"
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
"kind": "variable",
|
|
91
|
-
"name": "
|
|
92
|
-
"default": "class extends v{constructor(){super(...arguments);this.size=\"large\";this.showCloseButton=!1;this.open=!1}openDialog(){this.open=!0}closeDialog(){let e=document.querySelector(\"primer-dialog\");if(e){e.startExitAnimation();let r=()=>{this.open=!1,this.removeEventListener(\"primer-dialog-close\",r)};this.addEventListener(\"primer-dialog-close\",r)}else this.open=!1}renderContent(){return m`<div class=\"content-container\"><slot></slot>${this.renderSecureHtmlContent()}</div>`}renderSecureHtmlContent(){return this.secureHtmlContent?
|
|
91
|
+
"name": "ce",
|
|
92
|
+
"default": "class extends v{constructor(){super(...arguments);this.size=\"large\";this.showCloseButton=!1;this.open=!1}openDialog(){this.open=!0}closeDialog(){let e=document.querySelector(\"primer-dialog\");if(e){e.startExitAnimation();let r=()=>{this.open=!1,this.removeEventListener(\"primer-dialog-close\",r)};this.addEventListener(\"primer-dialog-close\",r)}else this.open=!1}renderContent(){return m`<div class=\"content-container\"><slot></slot>${this.renderSecureHtmlContent()}</div>`}renderSecureHtmlContent(){return this.secureHtmlContent?Vo(this.secureHtmlContent)?m`${Ya(this.secureHtmlContent.content)}`:(P.warn(\"PortalDialogComponent: Invalid access token provided for htmlContent. Content will not be rendered.\"),g):g}renderDialog(){return this.open?m`<primer-portal><primer-dialog .open=${this.open} size=${this.size} .showCloseButton=${!1} @primer-dialog-close=\"${()=>this.closeDialog()}\" >${this.renderContent()}</primer-dialog></primer-portal>`:g}connectedCallback(){super.connectedCallback(),this.open||this.openDialog()}updated(e){if(super.updated(e),e.has(\"secureHtmlContent\")){let r=this.secureHtmlContent;r&&!Vo(r)&&(P.errorWithDatadog(\"PortalDialogComponent: Invalid access token provided for htmlContent. Content will not be rendered.\"),this.secureHtmlContent=void 0)}e.has(\"open\")&&this.open&&this.onOpen&&this.onOpen(),e.has(\"open\")&&this.open&&this.onContentRendered&&this.updateComplete.then(()=>{requestAnimationFrame(()=>{this.onContentRendered?.()})})}render(){return m`${this.renderDialog()}`}}"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"kind": "variable",
|
|
96
|
-
"name": "
|
|
97
|
-
"default": "class extends v{constructor(){super();this.customStyles=\"\";this.clientToken=\"\";this.options={};this.disableLoader=!1;this._jsInitialized=!1;this.previousLoadingState=!0;this.hasAssignedContent=!1;this._loadingTimeoutId=null;this._eventListenerController=null;this.locale=\"en-GB\";this.onSlotChange=e=>{let o=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=o.length>0,this.requestUpdate()};this.sdkContextController=new
|
|
96
|
+
"name": "Pe",
|
|
97
|
+
"default": "class extends v{constructor(){super();this.customStyles=\"\";this.clientToken=\"\";this.options={};this.disableLoader=!1;this._jsInitialized=!1;this.previousLoadingState=!0;this.hasAssignedContent=!1;this._loadingTimeoutId=null;this._eventListenerController=null;this.locale=\"en-GB\";this.onSlotChange=e=>{let o=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=o.length>0,this.requestUpdate()};this.sdkContextController=new Gr(this),this.sdkStateController=new Kr(this),this.primerEventsController=new Bt(this),this.styleProcessingController=new jr(this),this.vaultManagerController=new or(this),this.cardNetworkController=new Pr(this),this.achPaymentEventsController=new Ci(this),this.headlessSdkController=new Ei(this)}set jsInitialized(e){this.requestUpdate(),this._jsInitialized=e}get jsInitialized(){return this._jsInitialized}get primerJS(){return this.headlessSdkController?.primerJSInstance??void 0}connectedCallback(){super.connectedCallback(),this.sdkContextController.setEventsController(this.primerEventsController),this._eventListenerController=new AbortController,document.addEventListener(\"primer:card-submit\",this.handleExternalCardSubmit.bind(this),{signal:this._eventListenerController.signal})}attributeChangedCallback(e,r,o){e===Oc.CUSTOM_STYLES?this.styleProcessingController.processCustomStyles(o):super.attributeChangedCallback(e,r,o)}disconnectedCallback(){this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null),this.sdkStateController?.currentState.isLoading&&this.sdkStateController.forceCompleteLoading(),this._eventListenerController&&(this._eventListenerController.abort(),this._eventListenerController=null),super.disconnectedCallback()}willUpdate(e){e.has(\"options\")&&(this.options?.locale&&(wo(this.options?.locale)?this.locale=Io(this.options?.locale):P.warn(\"\\u{1F30E}\\u2757 Unsupported locale provided:\",this.options?.locale,\"- Falling back to default locale `en-GB`\")),To(this.locale||\"en-GB\"))}updated(){let e=getComputedStyle(this);this.sdkContextController.setComputedStyles(e),this.checkLoadingStateChange()}handleExternalCardSubmit(e){this._eventListenerController?.signal.aborted||e.target!==this&&this.primerEventsController.dispatchEvent(\"primer:card-submit\",e.detail)}checkLoadingStateChange(){let e=this.sdkStateController?.currentState.isLoading||!1;this.previousLoadingState&&!e&&(this.jsInitialized=!0,Z({eventName:\"CHECKOUT_FLOW_STARTED\"})),this.previousLoadingState=e,e&&!this._loadingTimeoutId?this._loadingTimeoutId=window.setTimeout(()=>{this.sdkStateController?.currentState.isLoading&&(P.warn(\"Loading timeout in component, forcing completion\"),this.sdkStateController.forceCompleteLoading(),this.jsInitialized=!0),this._loadingTimeoutId=null},1e4):!e&&this._loadingTimeoutId&&(window.clearTimeout(this._loadingTimeoutId),this._loadingTimeoutId=null)}render(){let e=this.sdkStateController.currentState,r=e.isLoading,o=e.primerJsError,n=!r&&!o;return m` ${k(r,()=>g)} ${k(o,()=>m`<primer-checkout-error></primer-checkout-error>`)} ${k(n,()=>m`<slot name=\"main\" @slotchange=${this.onSlotChange}></slot>${k(this.hasAssignedContent,()=>g,()=>m`<primer-main></primer-main>`)} `,()=>g)} `}addEventListener(e,r,o){super.addEventListener(e,r,o)}removeEventListener(e,r,o){super.removeEventListener(e,r,o)}}"
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
"kind": "function",
|
|
101
|
-
"name": "
|
|
101
|
+
"name": "Wa"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"kind": "function",
|
|
105
|
-
"name": "
|
|
105
|
+
"name": "qa"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"kind": "function",
|
|
109
|
-
"name": "
|
|
109
|
+
"name": "Yc"
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
112
|
"kind": "function",
|
|
113
|
-
"name": "
|
|
113
|
+
"name": "Bc"
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"kind": "variable",
|
|
117
|
-
"name": "
|
|
118
|
-
"default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-loader)\";this.size=\"medium\";this.compact=!1}getSize(){if(this.size in
|
|
117
|
+
"name": "Ye",
|
|
118
|
+
"default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-loader)\";this.size=\"medium\";this.compact=!1}getSize(){if(this.size in Fo)return Fo[this.size];let e=parseInt(this.size,10);return isNaN(e)?Fo.medium:e}render(){let e=this.getSize(),r=20,o=`0 0 ${r} ${r}`;return this.style.setProperty(\"--spinner-color\",this.color),this.style.setProperty(\"--spinner-size\",`${e}px`),m`<div class=\"spinner-container ${this.compact?\"compact\":\"\"}\"><svg class=\"spinner\" width=\"${e}\" height=\"${e}\" viewBox=\"${o}\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" role=\"status\" aria-label=\"Loading\" ><path d=\"M4.27827 10.002C4.27827 6.84166 6.84019 4.27973 10.0005 4.27973C10.7676 4.27973 11.3894 3.6579 11.3894 2.89084C11.3894 2.12378 10.7676 1.50195 10.0005 1.50195C5.30607 1.50195 1.50049 5.30753 1.50049 10.002C1.50049 14.6964 5.30607 18.502 10.0005 18.502C14.6949 18.502 18.5005 14.6964 18.5005 10.002C18.5005 9.23489 17.8787 8.61306 17.1116 8.61306C16.3445 8.61306 15.7227 9.23489 15.7227 10.002C15.7227 13.1622 13.1608 15.7242 10.0005 15.7242C6.84019 15.7242 4.27827 13.1622 4.27827 10.002Z\" fill=\"currentColor\" class=\"path\" /></svg></div>`}}"
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
"kind": "variable",
|
|
122
|
-
"name": "
|
|
123
|
-
"default": "class extends v{constructor(){super(...arguments);this.focusWithin=!1;this.hasError=!1;this.handleWrapperClick=e=>{if(e.target!==e.currentTarget)return;let r=this.findSlottedPrimerInput();r?r.focus():this.dispatchEvent(new CustomEvent(\"wrapper-click\",{bubbles:!0,composed:!0}))}}findSlottedPrimerInput(){if(!this.inputSlot)return null;let e=this.inputSlot.assignedElements({flatten:!0}),r=e.find(o=>o.tagName.toLowerCase()===\"primer-input\");if(r)return r;for(let o of e){let n=o.querySelector(\"primer-input\");if(n)return n}return null}render(){let e={\"input-slot\":!0,\"focus-within\":this.focusWithin};return m`<div class=\"input-wrapper\"><slot name=\"label\"></slot><div class=\"${
|
|
122
|
+
"name": "Be",
|
|
123
|
+
"default": "class extends v{constructor(){super(...arguments);this.focusWithin=!1;this.hasError=!1;this.handleWrapperClick=e=>{if(e.target!==e.currentTarget)return;let r=this.findSlottedPrimerInput();r?r.focus():this.dispatchEvent(new CustomEvent(\"wrapper-click\",{bubbles:!0,composed:!0}))}}findSlottedPrimerInput(){if(!this.inputSlot)return null;let e=this.inputSlot.assignedElements({flatten:!0}),r=e.find(o=>o.tagName.toLowerCase()===\"primer-input\");if(r)return r;for(let o of e){let n=o.querySelector(\"primer-input\");if(n)return n}return null}render(){let e={\"input-slot\":!0,\"focus-within\":this.focusWithin};return m`<div class=\"input-wrapper\"><slot name=\"label\"></slot><div class=\"${ie(e)}\" @click=\"${this.handleWrapperClick}\"><slot name=\"input\"></slot></div><slot name=\"error\"></slot></div>`}}"
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
"kind": "variable",
|
|
127
|
-
"name": "
|
|
127
|
+
"name": "Qe",
|
|
128
128
|
"default": "class extends v{constructor(){super(...arguments);this.for=\"\";this.disabled=!1}render(){return m`<label for=${this.for}><slot></slot></label>`}}"
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
"kind": "variable",
|
|
132
|
-
"name": "
|
|
133
|
-
"default": "class extends v{constructor(){super(...arguments);this.variant=\"primary\";this.disabled=!1;this.loading=!1;this.buttonType=\"button\";this.selectionState=\"default\";this.selectable=!1;this.flex=!0;this.handleClick=()=>{!this.selectable||this.disabled||this.loading||(this.selectionState=this.selectionState===\"default\"?\"checked\":\"default\",this.dispatchEvent(new CustomEvent(\"selection-change\",{bubbles:!0,composed:!0,detail:{state:this.selectionState}})))}}renderCheckmark(){return!this.selectable||this.selectionState!==\"checked\"||this.loading?
|
|
132
|
+
"name": "ye",
|
|
133
|
+
"default": "class extends v{constructor(){super(...arguments);this.variant=\"primary\";this.disabled=!1;this.loading=!1;this.buttonType=\"button\";this.selectionState=\"default\";this.selectable=!1;this.flex=!0;this.handleClick=()=>{!this.selectable||this.disabled||this.loading||(this.selectionState=this.selectionState===\"default\"?\"checked\":\"default\",this.dispatchEvent(new CustomEvent(\"selection-change\",{bubbles:!0,composed:!0,detail:{state:this.selectionState}})))}}renderCheckmark(){return!this.selectable||this.selectionState!==\"checked\"||this.loading?g:m`<primer-icon name=\"checkmark\" size=\"sm\" color=\"var(--primer-color-brand)\" ></primer-icon>`}renderSpinner(){if(!this.loading)return g;let e;return this.variant===\"primary\"?e=\"var(--primer-color-background-outlined-default)\":(this.variant===\"secondary\"||this.variant===\"tertiary\")&&(e=\"var(--primer-color-gray-900)\"),m`<primer-spinner size=\"small\" color=\"${e}\" compact ></primer-spinner>`}render(){return m`<button type=${this.buttonType} ?disabled=${this.disabled||this.loading} @click=${this.handleClick} part=\"button\" aria-checked=${this.selectionState===\"checked\"} aria-busy=${this.loading} aria-label=${this.ariaLabel?this.ariaLabel:g} >${this.renderSpinner()} ${this.flex?m`<span class=\"button-content ${this.loading?\"loading\":\"\"}\"><slot></slot></span>`:m`<span class=\"button-content-base ${this.loading?\"loading\":\"\"}\" ><slot></slot></span>`} ${this.renderCheckmark()}</button>`}}"
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
"kind": "variable",
|
|
137
|
-
"name": "
|
|
137
|
+
"name": "et",
|
|
138
138
|
"default": "class extends v{constructor(){super(...arguments);this.for=\"\";this.active=!0}render(){return m`<span class=\"error\" role=\"alert\" aria-live=\"polite\" id=\"${this.for||\"\"}\" ><slot></slot></span>`}}"
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
"kind": "variable",
|
|
142
|
-
"name": "
|
|
143
|
-
"default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-icon-primary)\";this.size=\"lg\"}render(){let e=this.name?
|
|
142
|
+
"name": "Fe",
|
|
143
|
+
"default": "class extends v{constructor(){super(...arguments);this.color=\"var(--primer-color-icon-primary)\";this.size=\"lg\"}render(){let e=this.name?ts[this.name]:null;return m`<div style=\"--internal-icon-color: ${this.color}\">${e||m`<slot></slot>`}</div>`}}"
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"kind": "variable",
|
|
147
|
-
"name": "
|
|
147
|
+
"name": "tt",
|
|
148
148
|
"default": "class extends v{constructor(){super(...arguments);this.type=\"complete\"}render(){return this.type===\"complete\"?m`<primer-icon size=\"lg\" name=\"successful-check\" color=\"var(--primer-color-icon-positive)\" ></primer-icon><p>Checkout complete!</p><p class=\"secondary\"> You'll be redirected to the order confirmation page soon. </p>`:m`<primer-icon size=\"lg\" name=\"failure-icon\" color=\"var(--primer-color-icon-negative)\" ></primer-icon><p>Payment failed</p>${this.description?m`<p class=\"secondary\">${this.description}</p>`:m`<p class=\"secondary\">Something went wrong.</p>`} `}}"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"kind": "variable",
|
|
152
|
-
"name": "
|
|
152
|
+
"name": "F",
|
|
153
153
|
"default": "class extends v{constructor(){super(...arguments);this.value=\"\";this.placeholder=\"\";this.disabled=!1;this.name=\"\";this.type=\"text\";this.required=!1;this.readonly=!1;this.pattern=\"\";this.min=\"\";this.max=\"\";this.step=\"\";this.autocomplete=\"\";this._id=\"\";this.hasFocus=!1;this.hasError=!1;this.handleInput=e=>{e.stopPropagation();let r=e.target;this.value=r.value;let o=new CustomEvent(\"input\",{detail:this.value,bubbles:!0,composed:!0});this.dispatchEvent(o)};this.handleChange=e=>{e.stopPropagation();let r=e.target;this.value=r.value;let o=new CustomEvent(\"change\",{detail:this.value,bubbles:!0,composed:!0});this.dispatchEvent(o)};this.handleFocus=()=>{this.hasFocus=!0,this.dispatchEvent(new FocusEvent(\"focus\",{bubbles:!0,composed:!0}))};this.handleBlur=()=>{this.hasFocus=!1,this.dispatchEvent(new FocusEvent(\"blur\",{bubbles:!0,composed:!0}))};this.handleInvalid=e=>{e.stopPropagation(),this.hasError=!0,this.dispatchEvent(new Event(\"invalid\",{bubbles:!0,composed:!0}))}}get id(){return this._id}set id(e){this._id=e,this.setAttribute(\"id\",e)}focus(e){this.inputElement?.focus(e)}blur(){this.inputElement?.blur()}select(){this.inputElement?.select()}setSelectionRange(e,r,o){this.inputElement?.setSelectionRange(e,r,o)}get validity(){return this.inputElement?.validity||{}}get validationMessage(){return this.inputElement?.validationMessage||\"\"}checkValidity(){return this.inputElement?.checkValidity()||!1}reportValidity(){return this.inputElement?.reportValidity()||!1}render(){let e={input:!0,\"input--focused\":this.hasFocus,\"input--disabled\":this.disabled,\"input--error\":this.hasError,\"input--readonly\":this.readonly},r=Object.entries(e).filter(([,o])=>o).map(([o])=>o).join(\" \");return m`<input part=\"input\" class=${r} .value=${this.value} .type=${this.type} ?disabled=${this.disabled} ?required=${this.required} ?readonly=${this.readonly} placeholder=${this.placeholder} pattern=${this.pattern} minlength=${this.minlength??\"\"} maxlength=${this.maxlength??\"\"} min=${this.min} max=${this.max} step=${this.step} autocomplete=${this.autocomplete} name=${this.name} id=${this.id} @input=${this.handleInput} @change=${this.handleChange} @focus=${this.handleFocus} @blur=${this.handleBlur} @invalid=${this.handleInvalid} />`}addEventListener(e,r,o){super.addEventListener(e,r,o)}removeEventListener(e,r,o){super.removeEventListener(e,r,o)}}"
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
"kind": "variable",
|
|
157
|
-
"name": "
|
|
158
|
-
"default": "class extends v{constructor(){super(...arguments);this.name=\"\";this.id=\"\";this.value=\"\";this.disabled=!1;this.hasError=!1;this.placeholder=\"\";this.options=[]}handleChange(e){let r=e.target,o=this.value;this.value=r.value,this.dispatchEvent(new CustomEvent(\"change\",{detail:this.value,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(\"input\",{detail:this.value,bubbles:!0,composed:!0})),this.requestUpdate(\"value\",o)}handleFocus(){this.dispatchEvent(new CustomEvent(\"focus\",{bubbles:!0,composed:!0}))}handleBlur(){this.dispatchEvent(new CustomEvent(\"blur\",{bubbles:!0,composed:!0}))}renderSelectOptions(){let e=[];for(let r of this.options)e.push(m`<option value=${r.value}>${r.label}</option>`);return e}render(){return m`<select id=${this.id} name=${this.name} .value=${
|
|
157
|
+
"name": "ve",
|
|
158
|
+
"default": "class extends v{constructor(){super(...arguments);this.name=\"\";this.id=\"\";this.value=\"\";this.disabled=!1;this.hasError=!1;this.placeholder=\"\";this.options=[]}handleChange(e){let r=e.target,o=this.value;this.value=r.value,this.dispatchEvent(new CustomEvent(\"change\",{detail:this.value,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(\"input\",{detail:this.value,bubbles:!0,composed:!0})),this.requestUpdate(\"value\",o)}handleFocus(){this.dispatchEvent(new CustomEvent(\"focus\",{bubbles:!0,composed:!0}))}handleBlur(){this.dispatchEvent(new CustomEvent(\"blur\",{bubbles:!0,composed:!0}))}renderSelectOptions(){let e=[];for(let r of this.options)e.push(m`<option value=${r.value}>${r.label}</option>`);return e}render(){return m`<select id=${this.id} name=${this.name} .value=${as(this.value)} ?disabled=${this.disabled} ?required=${!this.value} @change=${this.handleChange} @focus=${this.handleFocus} @blur=${this.handleBlur} aria-invalid=${this.hasError?\"true\":\"false\"} ><option value=\"\" disabled ?selected=${!this.value}>${this.placeholder||\"Select an option\"}</option>${this.renderSelectOptions()}</select>`}}"
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"kind": "variable",
|
|
162
|
-
"name": "
|
|
162
|
+
"name": "be",
|
|
163
163
|
"default": "class extends v{constructor(){super(...arguments);this.header=\"\";this.expanded=!1;this.expandText=\"Expand\";this.collapseText=\"Collapse\";this.ariaLabel=\"\";this.buttonVariant=\"primary\";this.isExpanded=!1;this.toggleExpanded=()=>{this.isExpanded=!this.isExpanded,this.dispatchExpandedChangedEvent(this.isExpanded)}}connectedCallback(){super.connectedCallback(),this.isExpanded=this.expanded}dispatchExpandedChangedEvent(e){this.dispatchEvent(new CustomEvent(\"expanded-changed\",{bubbles:!0,composed:!0,detail:{expanded:e}}))}expand(){this.isExpanded||(this.isExpanded=!0,this.dispatchExpandedChangedEvent(!0))}collapse(){this.isExpanded&&(this.isExpanded=!1,this.dispatchExpandedChangedEvent(!1))}render(){let e=this.isExpanded?this.collapseText:this.expandText,r=this.ariaLabel||this.header||e,o=this.header||e;return m`<div class=\"collapsable\"><primer-button variant=${this.buttonVariant} buttonType=\"button\" @click=${this.toggleExpanded} aria-expanded=${this.isExpanded} aria-controls=\"collapsable-content\" aria-label=${r} ><span>${o}</span></primer-button><div class=\"collapsable-wrapper ${this.isExpanded?\"expanded\":\"\"}\" id=\"collapsable-content\" role=\"region\" aria-labelledby=\"collapsable-header\" ><div class=\"collapsable-content\"><slot></slot></div></div></div>`}}"
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
"kind": "variable",
|
|
167
|
-
"name": "
|
|
168
|
-
"default": "class extends v{constructor(){super();this.message=\"\";this.visible=!1;this._role=\"alert\";this.showMessage=!1;this.role=\"alert\"}get role(){return this._role}set role(e){this._role=e,this.setAttribute(\"role\",e)}updated(e){e.has(\"visible\")&&this.handleVisibilityChange()}handleVisibilityChange(){this.visible?(this.showMessage=!0,this.setAttribute(\"aria-hidden\",\"false\")):setTimeout(()=>{this.showMessage=!1,this.setAttribute(\"aria-hidden\",\"true\")},200)}render(){if(!this.showMessage&&!this.visible)return
|
|
167
|
+
"name": "He",
|
|
168
|
+
"default": "class extends v{constructor(){super();this.message=\"\";this.visible=!1;this._role=\"alert\";this.showMessage=!1;this.role=\"alert\"}get role(){return this._role}set role(e){this._role=e,this.setAttribute(\"role\",e)}updated(e){e.has(\"visible\")&&this.handleVisibilityChange()}handleVisibilityChange(){this.visible?(this.showMessage=!0,this.setAttribute(\"aria-hidden\",\"false\")):setTimeout(()=>{this.showMessage=!1,this.setAttribute(\"aria-hidden\",\"true\")},200)}render(){if(!this.showMessage&&!this.visible)return g;let e={\"error-message\":!0,hidden:!this.visible};return m`<div part=\"error-message\" class=${ie(e)} aria-live=\"assertive\" aria-atomic=\"true\" ><div part=\"error-icon\" class=\"error-icon\"><primer-icon name=\"failure-icon\" size=\"sm\" color=\"var(--primer-color-icon-negative)\" ></primer-icon></div><div part=\"error-content\" class=\"error-content\">${this.message}</div></div>`}}"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"kind": "variable",
|
|
172
|
-
"name": "
|
|
172
|
+
"name": "ft",
|
|
173
173
|
"default": "class extends v{constructor(){super(...arguments);this._id=`d${Math.random().toString(36).substring(7)}`;this._handleSlotChange=e=>{let o=e.target.assignedNodes();if(!o.length)return;let n=this.getContainer();o.forEach(a=>n.appendChild(a))}}get id(){return this._id}getContainer(){let e=document.querySelector(`#${this._id}`);return e||(e=document.createElement(\"div\"),e.id=this._id,document.body.appendChild(e),this._setupEventListeners(e)),e}_setupEventListeners(e){[\"primer-ach-error\",\"primer-ach-bank-details-collected\",\"primer-ach-mandate-confirmed\",\"primer-ach-mandate-declined\",\"primer-dialog-close\"].forEach(r=>{e.addEventListener(r,o=>{o.stopPropagation(),this.dispatchEvent(new CustomEvent(r,{bubbles:!0,composed:!0,detail:o.detail}))})})}disconnectedCallback(){super.disconnectedCallback(),this.getContainer().remove()}render(){return m`<slot @slotchange=${this._handleSlotChange}></slot>`}}"
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
"kind": "variable",
|
|
177
|
-
"name": "
|
|
178
|
-
"default": "class extends v{constructor(){super(...arguments);this.size=\"flex\";this.showCloseButton=!0;this._animationState=\"entering\";this._isVisible=!1;this._handleCloseClick=()=>{this._startExitAnimation()}}startExitAnimation(){this._startExitAnimation()}connectedCallback(){super.connectedCallback(),document.body.style.overflow=\"hidden\",this._startEnterAnimation()}disconnectedCallback(){super.disconnectedCallback(),document.body.style.overflow=\"\",this._animationTimeout&&clearTimeout(this._animationTimeout)}_startEnterAnimation(){this._animationState=\"entering\",this._isVisible=!0,requestAnimationFrame(()=>{this._animationTimeout=window.setTimeout(()=>{this._animationState=\"entered\"},500)})}_startExitAnimation(){this._animationTimeout&&clearTimeout(this._animationTimeout),this._animationState=\"exiting\",this._animationTimeout=window.setTimeout(()=>{this._animationState=\"exited\",this._isVisible=!1,this.dispatchEvent(new CustomEvent(\"primer-dialog-close\",{bubbles:!0,composed:!0}))},500)}render(){return this._isVisible?m`<div class=${
|
|
177
|
+
"name": "Re",
|
|
178
|
+
"default": "class extends v{constructor(){super(...arguments);this.size=\"flex\";this.showCloseButton=!0;this._animationState=\"entering\";this._isVisible=!1;this._handleCloseClick=()=>{this._startExitAnimation()}}startExitAnimation(){this._startExitAnimation()}connectedCallback(){super.connectedCallback(),document.body.style.overflow=\"hidden\",this._startEnterAnimation()}disconnectedCallback(){super.disconnectedCallback(),document.body.style.overflow=\"\",this._animationTimeout&&clearTimeout(this._animationTimeout)}_startEnterAnimation(){this._animationState=\"entering\",this._isVisible=!0,requestAnimationFrame(()=>{this._animationTimeout=window.setTimeout(()=>{this._animationState=\"entered\"},500)})}_startExitAnimation(){this._animationTimeout&&clearTimeout(this._animationTimeout),this._animationState=\"exiting\",this._animationTimeout=window.setTimeout(()=>{this._animationState=\"exited\",this._isVisible=!1,this.dispatchEvent(new CustomEvent(\"primer-dialog-close\",{bubbles:!0,composed:!0}))},500)}render(){return this._isVisible?m`<div class=${ie({backdrop:!0,\"backdrop--entering\":this._animationState===\"entering\",\"backdrop--entered\":this._animationState===\"entered\",\"backdrop--exiting\":this._animationState===\"exiting\"})} @click=${e=>{e.preventDefault()}} ><div class=${ie({dialog:!0,[this.size]:!0,\"dialog--entering\":this._animationState===\"entering\",\"dialog--entered\":this._animationState===\"entered\",\"dialog--exiting\":this._animationState===\"exiting\"})} ><div class=\"header\">${this.showCloseButton?m`<primer-button variant=\"tertiary\" @click=${this._handleCloseClick} ><primer-icon name=\"close\"></primer-icon></primer-button>`:\"\"}</div><div class=\"content\"><slot></slot></div></div></div>`:m``}}"
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
"kind": "variable",
|
|
182
|
-
"name": "
|
|
183
|
-
"default": "class extends v{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.klarnaCategories=null;this.disabled=!1;this.selectedCategory=null;this.isExpanded=!1;this.headerAriaLabel=E(\"pay_with\",{id:\"pay_with\"});this._paymentMethodManagerTask=new D(this,{task:async([e,r])=>{if(!e||!r)return
|
|
182
|
+
"name": "oe",
|
|
183
|
+
"default": "class extends v{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.klarnaCategories=null;this.disabled=!1;this.selectedCategory=null;this.isExpanded=!1;this.headerAriaLabel=E(\"pay_with\",{id:\"pay_with\"});this._paymentMethodManagerTask=new D(this,{task:async([e,r])=>{if(!e||!r)return L;let o=await r.getCDNAssets(\"KLARNA\");return{manager:e.manager,klarnaIcon:o?.assets?.icon?`${o.goatCdnUrl}/${o.assets.icon}`:\"\"}},args:()=>[this.paymentManagers.get(\"KLARNA\"),this.headlessUtils]});this.toggleExpand=()=>{this.disabled||(this.isExpanded=!this.isExpanded,this.isExpanded||(this.selectedCategory=null))}}async startKlarnaPayment(){if(!(!this._paymentMethodManagerTask.value||!this.selectedCategory))try{await this._paymentMethodManagerTask.value.manager.start({paymentMethodCategoryId:this.selectedCategory})}catch(e){P.errorWithDatadog(\"Failed to start Klarna payment\",{error:e})}}async renderSelectedCategory(){if(!(!this._paymentMethodManagerTask.value||!this.selectedCategory||!this.klarnaContainer))try{this.klarnaContainer.innerHTML=\"\",await this._paymentMethodManagerTask.value.manager.renderCategory({containerId:this.klarnaContainer,paymentMethodCategoryId:this.selectedCategory,onHeightChange:e=>{e>0&&(this.klarnaContainer.style.height=`${e}px`)}})}catch(e){P.errorWithDatadog(\"Failed to render Klarna category\",{error:e})}}selectCategory(e){this.disabled||(this.selectedCategory=e,this.renderSelectedCategory())}updated(e){e.has(\"selectedCategory\")&&this.selectedCategory&&this.renderSelectedCategory()}renderCategorySelection(){let e=this.klarnaCategories?.categories||[];return this.klarnaCategories?.isLoading||!1?m`<div class=\"loading\"><primer-spinner size=\"small\"></primer-spinner></div>`:m`<div class=\"category-selection\">${e.map(o=>m`<button class=${ie({\"category-button\":!0,selected:o.id===this.selectedCategory})} @click=${()=>{this.selectCategory(o.id)}} ?disabled=${this.disabled} >${o.name}</button>`)}</div>`}renderExpandedContent(){return m` ${this.renderCategorySelection()} ${this.selectedCategory?m`<div id=\"klarna-category-container\" class=\"klarna-category-container\" ></div>`:g}<button class=${ie({\"klarna-pay-button\":!0,loading:!!this.sdkState?.isProcessing,disabled:!this.selectedCategory||this.disabled})} ?disabled=${!this.selectedCategory||this.sdkState?.isProcessing||this.disabled} @click=${()=>this.startKlarnaPayment()} >${E(\"confirm\",{id:\"confirm\"})}</button>`}render(){return this._paymentMethodManagerTask.render({error:e=>{let r=e instanceof Error?e.message:\"Unknown error in Klarna\";return m`<div class=\"error\"> Error loading Klarna: ${r}</div>`},complete:({manager:e,klarnaIcon:r})=>e?m`<div class=\"klarna-container ${this.isExpanded?\"expanded\":\"\"}\"><div class=\"klarna-button-header\"><primer-button buttonType=\"button\" variant=\"secondary\" class=\"klarna-button\" @click=${this.toggleExpand} aria-expanded=${this.isExpanded} aria-controls=\"collapsable-content\" aria-label=${this.headerAriaLabel} ?disabled=${this.disabled} ><img src=${r} alt=\"Klarna logo\" /><span>${E(\"pay_with\",{id:\"pay_with\"})} Klarna</span><span class=\"klarna-accordion-icon ${this.isExpanded?\"expanded\":\"\"}\" > ▼ </span></primer-button></div><div class=\"klarna-expanded-content ${this.isExpanded?\"visible\":\"\"}\" ><div class=\"klarna-accordion-content\">${this.renderExpandedContent()}</div></div></div>`:g})}}"
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
"kind": "variable",
|
|
187
|
-
"name": "
|
|
188
|
-
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return
|
|
187
|
+
"name": "ze",
|
|
188
|
+
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return L;let r=this.paymentManagers.get(e);if(!r)throw new Error(`No manager found for payment method type ${e}`);if(r.type!==\"GOOGLE_PAY\")throw new Error(\"Invalid payment method type for Google Pay component\");return r.manager}}),this.renderButtonTask=new D(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return L;await this.updateComplete;let r=e.createButton();return await r.render(this.shadowRoot?.getRootNode(),{style:{shadowRoot:!0}}),this.disabled&&await r.setDisabled(this.disabled),this.disabled&&this.shadowRoot&&(await this.updateComplete,Si(this.disabled,this.shadowRoot)),r}})}attributeChangedCallback(e,r,o){if(super.attributeChangedCallback(e,r,o),e===\"disabled\"&&r!==o){let n=o!==null,a=this.renderButtonTask.value;a&&a.setDisabled(n)}}updated(e){e.has(\"disabled\")&&this.shadowRoot&&Si(this.disabled,this.shadowRoot)}render(){return g}}"
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
"kind": "variable",
|
|
192
|
-
"name": "
|
|
193
|
-
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=
|
|
192
|
+
"name": "Ke",
|
|
193
|
+
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Rt();this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return L;let r=this.paymentManagers.get(e);if(!r)throw new Error(`No manager found for payment method type ${e}`);if(r.type!==\"APPLE_PAY\")throw new Error(\"Invalid payment method type for Apple Pay component\");return r.manager}}),this.renderButtonTask=new D(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return L;await this.updateComplete;let r=this.buttonContainerRef.value;if(!r)throw new Error(\"Button container not found\");let o=e.createButton(),n=xi(r);return await o.render(r,{style:{buttonHeight:n}}),this.disabled&&await o.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,Wt(this.disabled,this.buttonContainerRef)),o}})}attributeChangedCallback(e,r,o){if(super.attributeChangedCallback(e,r,o),e===\"disabled\"&&r!==o){let n=o!==null,a=this.renderButtonTask.value;a&&a.setDisabled(n)}}updated(e){e.has(\"disabled\")&&Wt(this.disabled,this.buttonContainerRef)}render(){return m`<div class=\"native-button-container\" ${vt(this.buttonContainerRef)} ></div>`}}"
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"kind": "variable",
|
|
197
|
-
"name": "
|
|
198
|
-
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=
|
|
197
|
+
"name": "Ge",
|
|
198
|
+
"default": "class extends v{constructor(){super();this.paymentManagers=new Map;this.disabled=!1;this.buttonContainerRef=Rt();this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return L;let r=this.paymentManagers.get(e);if(!r)throw new Error(`No manager found for payment method type ${e}`);if(r.type!==\"PAYPAL\")throw new Error(\"Invalid payment method type for PayPal component\");return r.manager}}),this.renderButtonTask=new D(this,{args:()=>[this.loadManagerTask.value],task:async([e])=>{if(!e)return L;await this.updateComplete;let r=this.buttonContainerRef.value;if(!r)throw new Error(\"Button container not found\");let o=e.createButton(),n=xi(this),a=vs(n),s=55;return n>s&&P.warn(`PayPal button height (${n}px) exceeds maximum allowed height of ${s}px. Button will be capped at ${s}px. This is a PayPal SDK limitation.`),await o.render(r,{style:{buttonHeight:a}}),this.disabled&&await o.setDisabled(this.disabled),this.disabled&&(await this.updateComplete,Wt(this.disabled,this.buttonContainerRef)),o}})}attributeChangedCallback(e,r,o){if(super.attributeChangedCallback(e,r,o),e===\"disabled\"&&r!==o){let n=o!==null,a=this.renderButtonTask.value;a&&a.setDisabled(n)}}updated(e){e.has(\"disabled\")&&Wt(this.disabled,this.buttonContainerRef)}render(){return m`<div class=\"native-button-container\" ${vt(this.buttonContainerRef)} ></div>`}}"
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
"kind": "variable",
|
|
202
|
-
"name": "
|
|
203
|
-
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentManagers=new Map;this.currentState=\"collapsed\";this.blikCode=\"\";this.errorMessage=\"\";this.pollingDuration=0;this.pollingTimer=null;this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return
|
|
202
|
+
"name": "Ee",
|
|
203
|
+
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentManagers=new Map;this.currentState=\"collapsed\";this.blikCode=\"\";this.errorMessage=\"\";this.pollingDuration=0;this.pollingTimer=null;this.loadManagerTask=new D(this,{args:()=>[this.paymentMethod?.type],task:([e])=>{if(!e)return L;let r=this.paymentManagers.get(e);if(!r)throw new Error(\"BLIK payment method manager not initialized\");if(r.type!==\"ADYEN_BLIK\")throw new Error(\"Invalid payment method type for BLIK component\");return r.manager}});this.handleButtonClick=async()=>{if(this.disabled)return;if(this.currentState===\"expanded-input\"){this.handleCollapse();return}if(this.currentState!==\"collapsed\")return;let e=this.paymentMethod?.type;if(!e){this.errorMessage=E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"}),this.currentState=\"error\",P.error(\"Payment method type not available\");return}let r=this.paymentManagers.get(e);if(!r||r.type!==\"ADYEN_BLIK\"){this.errorMessage=E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"}),this.currentState=\"error\",P.error(\"Manager not available when expanding BLIK form\");return}this.currentState=\"expanded-input\",await this.updateComplete,this.shadowRoot?.querySelector(\"#blik-code\")?.focus()};this.handleCollapse=()=>{this.currentState=\"collapsed\",this.blikCode=\"\",this.errorMessage=\"\",this.stopPollingTimer()};this.handleInput=e=>{let r=e.target,o=r.value,a=o.replace(/\\D/g,\"\").slice(0,6);o!==a&&(r.value=a),this.blikCode=a,this.currentState===\"error\"&&(this.currentState=\"expanded-input\",this.errorMessage=\"\"),a.length===6&&this.submitBlikCode()};this.handleRetry=async()=>{this.currentState=\"expanded-input\",this.errorMessage=\"\",this.blikCode=\"\",await this.updateComplete,this.shadowRoot?.querySelector(\"#blik-code\")?.focus()}}startPollingTimer(){this.pollingDuration=0,this.pollingTimer=window.setInterval(()=>{this.pollingDuration+=1},1e3)}stopPollingTimer(){this.pollingTimer!==null&&(window.clearInterval(this.pollingTimer),this.pollingTimer=null),this.pollingDuration=0}async submitBlikCode(){if(this.blikCode.length!==6){this.errorMessage=E(\"sixDigitCodeErrorTooShort\",{id:\"sixDigitCodeErrorTooShort\"}),this.currentState=\"error\";return}let e=this.loadManagerTask.value;if(!e){this.errorMessage=\"BLIK payment method not initialized\",this.currentState=\"error\",P.error(\"BLIK manager not available via loadManagerTask\");return}this.currentState=\"loading\",this.errorMessage=\"\",this.startPollingTimer();try{await e.start({blikCode:this.blikCode}),this.stopPollingTimer(),this.currentState=\"collapsed\",this.blikCode=\"\"}catch(r){this.stopPollingTimer(),this.currentState=\"error\",this.errorMessage=r instanceof Error?r.message:E(\"tokenizationError\",{id:\"tokenizationError\"}),P.errorWithDatadog(\"BLIK payment failed\",{error:r instanceof Error?{message:r.message,name:r.name}:\"Unknown error\"})}}renderCollapsed(){return m`<primer-button class=\"blik-button\" @click=${this.handleButtonClick} ?disabled=${this.disabled} aria-label=\"${E(\"pay_with\",{id:\"pay_with\"})} BLIK\" aria-expanded=\"${this.currentState!==\"collapsed\"}\" title=\"BLIK\" ><span class=\"image-container\"><img src=\"https://goat-assets.production.core.primer.io/button/blik/inverted.png\" alt=\"BLIK\" /></span></primer-button>`}renderExpandedInput(){return m`<div class=\"blik-expanded-content\"><div class=\"blik-content-wrapper\"><div class=\"blik-input-wrapper\"><label for=\"blik-code\" class=\"blik-label\">${E(\"getCodeFromBankingApp\",{id:\"getCodeFromBankingApp\"})}</label><input id=\"blik-code\" type=\"text\" inputmode=\"numeric\" pattern=\"[0-9]*\" maxlength=\"6\" class=\"blik-input\" .value=\"${this.blikCode}\" @input=\"${this.handleInput}\" ?disabled=\"${this.disabled}\" placeholder=\"000000\" aria-label=\"${E(\"sixDigitCodeLabel\",{id:\"sixDigitCodeLabel\"})}\" autocomplete=\"off\" spellcheck=\"false\" /></div></div></div>`}renderLoading(){return m`<div class=\"blik-expanded-content\"><div class=\"blik-content-wrapper\"><div class=\"blik-loading\"><primer-spinner size=\"medium\"></primer-spinner>${this.pollingDuration>30?m`<div class=\"blik-timeout-warning\"> This is taking longer than expected... </div>`:g}</div></div></div>`}renderError(){return m`<div class=\"blik-expanded-content\"><div class=\"blik-content-wrapper\"><div class=\"blik-error\"><div class=\"blik-error-message\" role=\"alert\">${this.errorMessage||E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}</div><button class=\"blik-retry-button\" @click=\"${this.handleRetry}\" ?disabled=\"${this.disabled}\" >${E(\"retry_button\",{id:\"retry_button\"})}</button></div></div></div>`}renderExpandedState(){switch(this.currentState){case\"expanded-input\":return this.renderExpandedInput();case\"loading\":return this.renderLoading();case\"error\":return this.renderError();default:return g}}disconnectedCallback(){super.disconnectedCallback(),this.stopPollingTimer()}render(){return m`<div class=\"blik-container ${this.currentState!==\"collapsed\"?\"expanded\":\"\"}\" >${this.renderCollapsed()} ${this.currentState!==\"collapsed\"?this.renderExpandedState():g}</div>`}}"
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
"kind": "variable",
|
|
207
|
-
"name": "
|
|
208
|
-
"default": "class extends v{constructor(){super(...arguments);this.type=void 0;this.disabled=!1;this.paymentMethods=null;this.analyticsUtils=null;this.handleClick=()=>{this.paymentMethods?.get(this.type)?.managerType!==\"CARD\"&&this.sendPaymentMethodSelectionEvent()}}sendPaymentMethodSelectionEvent(){this.type&&
|
|
207
|
+
"name": "Oe",
|
|
208
|
+
"default": "class extends v{constructor(){super(...arguments);this.type=void 0;this.disabled=!1;this.paymentMethods=null;this.analyticsUtils=null;this.handleClick=()=>{this.paymentMethods?.get(this.type)?.managerType!==\"CARD\"&&this.sendPaymentMethodSelectionEvent()}}sendPaymentMethodSelectionEvent(){this.type&&Z({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:this.type})}render(){if(!this.type)return g;let e=this.paymentMethods?.get(this.type);if(!e)return g;let r;switch(e?.managerType){case\"CARD\":r=m`<primer-card-form ?disabled=${this.disabled} ></primer-card-form>`;break;case\"NATIVE\":{let o=e.type;o===vr.GOOGLE_PAY?r=m`<primer-google-pay .paymentMethod=${e} ?disabled=${this.disabled} ></primer-google-pay>`:o===vr.APPLE_PAY?r=m`<primer-apple-pay .paymentMethod=${e} ?disabled=${this.disabled} ></primer-apple-pay>`:o===vr.PAYPAL?r=m`<primer-paypal .paymentMethod=${e} ?disabled=${this.disabled} ></primer-paypal>`:o===vr.ADYEN_BLIK&&(r=m`<primer-blik .paymentMethod=${e} ?disabled=${this.disabled} ></primer-blik>`);break}case\"REDIRECT\":r=m`<primer-redirect-payment .paymentMethod=${e} ?disabled=${this.disabled} ></primer-redirect-payment>`;break;case\"KLARNA\":r=m`<primer-klarna ?disabled=${this.disabled} ></primer-klarna>`;break;case\"ACH\":r=m`<primer-dynamic-payment .paymentMethod=${e} ></primer-dynamic-payment>`;break;default:return g}return m`<div @click=${this.handleClick}>${r}</div>`}}"
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
"kind": "variable",
|
|
212
|
-
"name": "
|
|
213
|
-
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentMethods=null;this.clientOptions=null}getFilteredMethods(){if(!this.paymentMethods)return[];let e=this.paymentMethods.toArray();if(this.include){let r=this.include.split(\",\").map(o=>o.trim());e=e.filter(o=>r.includes(o.type))}if(this.exclude){let r=this.exclude.split(\",\").map(o=>o.trim());e=e.filter(o=>!r.includes(o.type))}return e}render(){let e=this.getFilteredMethods();return e.length===0?
|
|
212
|
+
"name": "Ie",
|
|
213
|
+
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentMethods=null;this.clientOptions=null}getFilteredMethods(){if(!this.paymentMethods)return[];let e=this.paymentMethods.toArray();if(this.include){let r=this.include.split(\",\").map(o=>o.trim());e=e.filter(o=>r.includes(o.type))}if(this.exclude){let r=this.exclude.split(\",\").map(o=>o.trim());e=e.filter(o=>!r.includes(o.type))}return e}render(){let e=this.getFilteredMethods();return e.length===0?g:m`<div class=\"payment-methods-container\">${e.map(r=>m`<primer-payment-method type=\"${r.type}\" ?disabled=\"${this.disabled||this.clientOptions?.disabledPayments===!0}\" ></primer-payment-method>`)}</div>`}}"
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
"kind": "variable",
|
|
217
|
-
"name": "
|
|
218
|
-
"default": "class extends v{constructor(){super(...arguments);this.formController=new
|
|
217
|
+
"name": "xe",
|
|
218
|
+
"default": "class extends v{constructor(){super(...arguments);this.formController=new _i(this,e=>this._paymentMethodManagerTask.value.setAndValidate(e));this.paymentManagers=new Map;this.sdkState=void 0;this.clientOptions=void 0;this.screen=\"form\";this.isSubmitting=!1;this._paymentMethodManagerTask=new D(this,{task:([e])=>e!==\"STRIPE_ACH\"?L:this.paymentManagers.get(e)?.manager,args:()=>[this.paymentMethod?.type]})}_handleInput(e,r){let o=e.target;this.formController.setFieldValue(r,o.value)}_handleBlur(e){this.formController.setFieldTouched(e)}_handleError(e){this.dispatchEvent(new CustomEvent(\"primer-ach-error\",{bubbles:!0,composed:!0,detail:{error:e instanceof Error?e:new Error(typeof e==\"string\"?e:\"Unknown error occurred\")}}))}async _handleSubmitButtonClick(e){if(!this.isSubmitting){this.isSubmitting=!0;try{let r=await e.start(this.formController.formData);if(!r||r.valid)return await this._handleCollectBankAccountDetails(e);r&&this.formController.setValidation(r,!0)}catch(r){this._handleError(r)}finally{this.isSubmitting=!1}}}async _handleCollectBankAccountDetails(e){try{await e.collectBankAccountDetails(),this.screen=\"mandate\",this.dispatchEvent(new CustomEvent(\"primer-ach-bank-details-collected\",{bubbles:!0,composed:!0}))}catch(r){this._handleError(r)}}async _handleConfirmMandate(){if(this._paymentMethodManagerTask.value){this.isSubmitting=!0;try{await this._paymentMethodManagerTask.value.confirmMandate(),this.dispatchEvent(new CustomEvent(\"primer-ach-mandate-confirmed\",{bubbles:!0,composed:!0}))}catch(e){this._handleError(e)}finally{this.isSubmitting=!1}}}async _handleDeclineMandate(){if(this._paymentMethodManagerTask.value){this.isSubmitting=!0;try{await this._paymentMethodManagerTask.value.declineMandate(),this.dispatchEvent(new CustomEvent(\"primer-ach-mandate-declined\",{bubbles:!0,composed:!0}))}catch(e){this._handleError(e)}finally{this.isSubmitting=!1}}}renderForm(e){return m`<h2>${E(\"payWithAch\",{id:\"payWithAch\"})}</h2><p>${E(\"stripe_ach_user_details_collection_subtitle_label\",{id:\"stripe_ach_user_details_collection_subtitle_label\"})}</p><form @submit=${r=>r.preventDefault()}><div class=\"form-row\"><primer-input-wrapper .hasError=${this.formController.hasError.firstName} ><primer-input-label slot=\"label\">${E(\"stripe_ach_user_details_collection_first_name_label\",{id:\"stripe_ach_user_details_collection_first_name_label\"})}</primer-input-label><primer-input slot=\"input\" .value=${this.formController.formState.firstName.value} @input=${r=>this._handleInput(r,\"firstName\")} @blur=${()=>this._handleBlur(\"firstName\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.firstName?this.formController.formState.firstName.error:g}</primer-input-error></primer-input-wrapper><primer-input-wrapper .hasError=${this.formController.hasError.lastName} ><primer-input-label slot=\"label\">${E(\"stripe_ach_user_details_collection_last_name_label\",{id:\"stripe_ach_user_details_collection_last_name_label\"})}</primer-input-label><primer-input slot=\"input\" .value=${this.formController.formState.lastName.value} @input=${r=>this._handleInput(r,\"lastName\")} @blur=${()=>this._handleBlur(\"lastName\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.lastName?this.formController.formState.lastName.error:g}</primer-input-error></primer-input-wrapper></div><primer-input-wrapper .hasError=${this.formController.hasError.emailAddress} ><primer-input-label slot=\"label\">${E(\"stripe_ach_user_details_collection_email_address_label\",{id:\"stripe_ach_user_details_collection_email_address_label\"})}</primer-input-label><primer-input slot=\"input\" type=\"email\" .value=${this.formController.formState.emailAddress.value} @input=${r=>this._handleInput(r,\"emailAddress\")} @blur=${()=>this._handleBlur(\"emailAddress\")} ?disabled=${this.isSubmitting} ></primer-input><primer-input-error slot=\"error\">${this.formController.hasError.emailAddress?this.formController.formState.emailAddress.error:g}</primer-input-error></primer-input-wrapper><p>${E(\"stripe_ach_user_details_collection_data_usage_label\",{id:\"stripe_ach_user_details_collection_data_usage_label\"})}</p><primer-button buttonType=\"submit\" variant=\"primary\" @click=${()=>this._handleSubmitButtonClick(e)} ?disabled=${this.isSubmitting} ?loading=${this.isSubmitting} >${E(\"stripe_ach_user_details_collection_continue_button\",{id:\"stripe_ach_user_details_collection_continue_button\"})}</primer-button></form>`}renderMandate(){return m`<h2>${E(\"payWithAch\",{id:\"payWithAch\"})}</h2><p>${this.clientOptions?.stripe?.mandateData.fullMandateText??E(\"stripe_ach_mandate_template_web\",{id:\"stripe_ach_mandate_template_web\"}).replace(/\\{merchantName\\}/g,this.clientOptions?.stripe?.mandateData.merchantName??\"Merchant\")}</p><div class=\"button-group\"><primer-button variant=\"primary\" @click=${this._handleConfirmMandate.bind(this)} ?disabled=${this.isSubmitting} ?loading=${this.isSubmitting} >${E(\"stripe_ach_mandate_accept_button\",{id:\"stripe_ach_mandate_accept_button\"})}</primer-button><primer-button variant=\"tertiary\" @click=${this._handleDeclineMandate.bind(this)} ?disabled=${this.isSubmitting} >${E(\"stripe_ach_mandate_cancel_payment_button\",{id:\"stripe_ach_mandate_cancel_payment_button\"})}</primer-button></div>`}render(){return this._paymentMethodManagerTask.render({complete:e=>e?this.screen===\"form\"?this.renderForm(e):this.renderMandate():g})}}"
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
221
|
"kind": "variable",
|
|
222
|
-
"name": "
|
|
223
|
-
"default": "class extends v{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.open=!1;this._paymentMethodManagerTask=new D(this,{task:([e,r])=>!e||!r?
|
|
222
|
+
"name": "ke",
|
|
223
|
+
"default": "class extends v{constructor(){super(...arguments);this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this.open=!1;this._paymentMethodManagerTask=new D(this,{task:([e,r])=>!e||!r?L:r.get(e)?.manager,args:()=>[this.paymentMethod?.type,this.paymentManagers]});this._getAssetsTask=new D(this,{task:([e,r])=>{if(!e||!r)return L;let o=r.getPaymentMethodConfiguration(e);return o?{backgroundColor:o.displayMetadata.button.backgroundColor.colored,name:o.name,displayName:this._legacyGetButtonLabel(o.displayMetadata.button.text),iconUrl:o.displayMetadata.button.iconUrl.colored||o.displayMetadata.button.iconUrl.light||o.displayMetadata.button.iconUrl.dark}:L},args:()=>[this.paymentMethod?.type,this.headlessUtils]});this._setupTasks=new D(this,{task:([e,r])=>!e||!r?L:{paymentMethodManager:e,assetsConfig:r},args:()=>[this._paymentMethodManagerTask.value,this._getAssetsTask.value]})}_legacyGetButtonLabel(e){if(!e)return;let r=e?Ar(e):\"\";return r===\"payWith\"&&(r=\"pay_with\"),E(r,{id:r})}start(){this._paymentMethodManagerTask.value&&(this.open=!0)}renderDialog(){return this.open?m`<primer-portal><primer-dialog @primer-dialog-close=\"${()=>this.open=!1}\"><primer-ach-payment .paymentMethod=${this.paymentMethod} @primer-ach-error=${()=>this.open=!1} @primer-ach-mandate-confirmed=${()=>this.open=!1} @primer-ach-mandate-declined=${()=>this.open=!1} ></primer-ach-payment></primer-dialog></primer-portal>`:g}render(){return this._setupTasks.render({error:()=>g,complete:({assetsConfig:e})=>(this.style.setProperty(\"--dynamic-payment-button-bg-color\",e.backgroundColor),m`<primer-button @click=\"${()=>this.start()}\" class=${ie({loading:!!this.sdkState?.isProcessing,reverse:!0})} title=\"${E(\"pay_with\",{id:\"pay_with\"})} ${e.name}\" ><span class=\"image-container\"><img src=\"${e.iconUrl}\" alt=\"${e.name}\" /></span>${e.displayName}</primer-button>${this.renderDialog()} `)})}}"
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
226
|
"kind": "variable",
|
|
227
|
-
"name": "
|
|
228
|
-
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this._paymentMethodManagerTask=new D(this,{task:([e,r])=>!e||!r?
|
|
227
|
+
"name": "Ne",
|
|
228
|
+
"default": "class extends v{constructor(){super(...arguments);this.disabled=!1;this.paymentManagers=new Map;this.sdkState=null;this.headlessUtils=null;this._paymentMethodManagerTask=new D(this,{task:([e,r])=>!e||!r?L:r.get(e)?.manager,args:()=>[this.paymentMethod?.type,this.paymentManagers]});this._getAssetsTask=new D(this,{task:([e,r])=>{if(!e||!r)return L;let o=r.getPaymentMethodConfiguration(e);if(!o)return L;let n=o.displayMetadata.button.backgroundColor.colored??o.displayMetadata.button.backgroundColor.light,a=o.displayMetadata.button.iconPositionRelativeToText||\"START\";return{backgroundColor:n,name:o.name,displayName:this._legacyGetButtonLabel(o.displayMetadata.button.text),iconUrl:o.displayMetadata.button.iconUrl.colored??o.displayMetadata.button.iconUrl.light,iconPosition:a}},args:()=>[this.paymentMethod?.type,this.headlessUtils]});this._setupTasks=new D(this,{task:([e,r])=>!e||!r?L:{paymentMethodManager:e,assetsConfig:r},args:()=>[this._paymentMethodManagerTask.value,this._getAssetsTask.value]})}_legacyGetButtonLabel(e){if(!e)return;let r=e?Ar(e):\"\";return r===\"payWith\"&&(r=\"pay_with\"),E(r,{id:r})}startRedirectPayment(){this.disabled||this._paymentMethodManagerTask.value&&this._paymentMethodManagerTask.value.start()}render(){return this._setupTasks.render({error:()=>g,complete:({assetsConfig:e})=>{this.style.setProperty(\"--redirect-payment-button-bg-color\",e.backgroundColor);let r={loading:!!this.sdkState?.isProcessing,\"icon-end\":e.iconPosition===\"END\",\"image-only\":!e.displayName},o=e.displayName?m`<span class=\"image-container\"><img src=\"${e.iconUrl}\" alt=\"${e.name}\" /></span><span class=\"button-text\">${e.displayName}</span>`:m`<span class=\"image-container\"><img src=\"${e.iconUrl}\" alt=\"${e.name}\" /></span>`;return m`<primer-button @click=\"${()=>this.startRedirectPayment()}\" class=${ie(r)} title=\"${E(\"pay_with\",{id:\"pay_with\"})} ${e.name}\" ?disabled=${this.disabled} >${o}</primer-button>`}})}}"
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
"kind": "variable",
|
|
232
|
-
"name": "
|
|
233
|
-
"default": "class extends v{constructor(){super(...arguments);this.configuration=null;this.headlessUtils=null;this.formData={};this.errors={};this.touchedFields=new Set;this.dirtyFields=new Set;this.focusedField=null;this.submitted=!1;this.countryOptions=[];this._initializationTask=new D(this,{task:async([e,r])=>{if(!e||!r)return
|
|
232
|
+
"name": "ne",
|
|
233
|
+
"default": "class extends v{constructor(){super(...arguments);this.configuration=null;this.headlessUtils=null;this.formData={};this.errors={};this.touchedFields=new Set;this.dirtyFields=new Set;this.focusedField=null;this.submitted=!1;this.countryOptions=[];this._initializationTask=new D(this,{task:async([e,r])=>{if(!e||!r)return L;let o=this.extractFieldConfig(e);return await this.initializeCountryOptions(),o},args:()=>[this.configuration,this.headlessUtils]})}connectedCallback(){super.connectedCallback(),this._initializationTask.value}extractFieldConfig(e){if(e?.checkoutModules){let r=e.checkoutModules.find(o=>o.type===\"BILLING_ADDRESS\");if(r?.options){let o=r.options;return Object.keys(Wo).reduce((n,a)=>({...n,[a]:o[a]??!1}),{})}}return this.defaultFieldConfig}async initializeCountryOptions(){try{let e=jo(\"en\");this.countryOptions=[...e.map(([n,a])=>({value:n,label:a}))],this.requestUpdate(\"countryOptions\");let r=Mo();if(r===\"en\"||r===\"en-GB\"||r.startsWith(\"en-\"))return;if(await Ts(r)){let n=jo(r);this.countryOptions=[...n.map(([a,s])=>({value:a,label:s}))],this.requestUpdate(\"countryOptions\")}}catch(e){P.errorWithDatadog(\"Failed to load country locale\",{error:e})}}get fieldConfig(){return this.extractFieldConfig(this.configuration)}get defaultFieldConfig(){return Object.keys(Wo).reduce((e,r)=>({...e,[r]:!1}),{})}get shouldShowForm(){return this.fieldConfig.postalCode}handleInput(e,r){this.formData={...this.formData,[e]:r},this.dirtyFields.add(e),(this.submitted||this.dirtyFields.has(e)&&this.touchedFields.has(e))&&this.validateField(e),this.dispatchEvent(new CustomEvent(\"primer-billing-address-change\",{detail:this.formData,bubbles:!0,composed:!0}))}handleFocus(e){this.focusedField=e}handleBlur(e){this.focusedField=null,this.touchedFields.add(e),this.validateField(e)}validateField(e){let r=this.formData[e],o=this.fieldConfig[e];if(!o){delete this.errors[e];return}if(o&&(!r||r.trim()===\"\")){let n=`${e}ErrorRequired`;this.errors={...this.errors,[e]:E(\"This field is required\",{id:n})}}else{let n={...this.errors};delete n[e],this.errors=n}}validateForm(){return Object.keys(Wo).forEach(e=>{let r=e;this.fieldConfig[r]&&this.validateField(r)}),Object.keys(this.errors).length===0}async validateForSubmission(){if(!this.shouldShowForm)return!0;this.submitted=!0,Object.keys(this.fieldConfig).forEach(r=>{this.fieldConfig[r]&&this.touchedFields.add(r)});let e=this.validateForm();return this.requestUpdate(),await this.updateComplete,e}async submitToSDK(){if(this.headlessUtils?.setBillingAddress)try{return await this.headlessUtils.setBillingAddress(this.formData),this.dispatchEvent(new CustomEvent(\"primer-billing-address-submit\",{detail:this.formData,bubbles:!0,composed:!0})),!0}catch(e){return P.errorWithDatadog(\"Failed to set billing address\",{error:e}),!1}return!0}shouldShowError(e){let r=!!this.errors[e],o=this.dirtyFields.has(e),n=this.touchedFields.has(e);return r&&(this.submitted||o&&n)}render(){return this._initializationTask.render({pending:()=>g,error:()=>g,complete:()=>this.shouldShowForm?(this.removeAttribute(\"hidden\"),m`<div class=\"billing-address-form\"><div class=\"billing-address-title\">${E(\"Billing address\",{id:\"billingAddressLabel\"})}</div>${k(this.fieldConfig.countryCode,()=>m`<primer-input-wrapper .focusWithin=${this.focusedField===\"countryCode\"} .hasError=${this.shouldShowError(\"countryCode\")} ><primer-input-label slot=\"label\">${E(\"Country code\",{id:\"countryCodeLabel\"})}</primer-input-label><primer-select slot=\"input\" id=\"countryCode\" name=\"countryCode\" .value=${this.formData.countryCode||\"\"} .options=${this.countryOptions} .hasError=${this.shouldShowError(\"countryCode\")} placeholder=${E(\"Select a country\",{id:\"countrySelectPlaceholder\"})} @input=${e=>this.handleInput(\"countryCode\",e.detail)} @focus=${()=>this.handleFocus(\"countryCode\")} @blur=${()=>this.handleBlur(\"countryCode\")} ></primer-select>${k(this.shouldShowError(\"countryCode\"),()=>m`<primer-input-error slot=\"error\">${this.errors.countryCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${k(this.fieldConfig.firstName||this.fieldConfig.lastName,()=>m`<div class=\"billing-address-row\">${k(this.fieldConfig.firstName,()=>m`<primer-input-wrapper .focusWithin=${this.focusedField===\"firstName\"} .hasError=${this.shouldShowError(\"firstName\")} ><primer-input-label slot=\"label\">${E(\"First name\",{id:\"firstNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"firstName\" name=\"firstName\" type=\"text\" .value=${this.formData.firstName||\"\"} placeholder=${E(\"First name\",{id:\"firstNamePlaceholder\"})} @input=${e=>this.handleInput(\"firstName\",e.detail)} @focus=${()=>this.handleFocus(\"firstName\")} @blur=${()=>this.handleBlur(\"firstName\")} ></primer-input>${k(this.shouldShowError(\"firstName\"),()=>m`<primer-input-error slot=\"error\">${this.errors.firstName}</primer-input-error>`)}</primer-input-wrapper>`)} ${k(this.fieldConfig.lastName,()=>m`<primer-input-wrapper .focusWithin=${this.focusedField===\"lastName\"} .hasError=${this.shouldShowError(\"lastName\")} ><primer-input-label slot=\"label\">${E(\"Last name\",{id:\"lastNameLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"lastName\" name=\"lastName\" type=\"text\" .value=${this.formData.lastName||\"\"} placeholder=${E(\"Last name\",{id:\"lastNamePlaceholder\"})} @input=${e=>this.handleInput(\"lastName\",e.detail)} @focus=${()=>this.handleFocus(\"lastName\")} @blur=${()=>this.handleBlur(\"lastName\")} ></primer-input>${k(this.shouldShowError(\"lastName\"),()=>m`<primer-input-error slot=\"error\">${this.errors.lastName}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${k(this.fieldConfig.addressLine1,()=>m`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine1\"} .hasError=${this.shouldShowError(\"addressLine1\")} ><primer-input-label slot=\"label\">${E(\"Address line 1\",{id:\"addressLine1\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine1\" name=\"addressLine1\" type=\"text\" .value=${this.formData.addressLine1||\"\"} placeholder=${E(\"Address line 1\",{id:\"addressLine1Placeholder\"})} @input=${e=>this.handleInput(\"addressLine1\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine1\")} @blur=${()=>this.handleBlur(\"addressLine1\")} ></primer-input>${k(this.shouldShowError(\"addressLine1\"),()=>m`<primer-input-error slot=\"error\">${this.errors.addressLine1}</primer-input-error>`)}</primer-input-wrapper>`)} ${k(this.fieldConfig.addressLine2,()=>m`<primer-input-wrapper .focusWithin=${this.focusedField===\"addressLine2\"} .hasError=${this.shouldShowError(\"addressLine2\")} ><primer-input-label slot=\"label\">${E(\"Address line 2\",{id:\"addressLine2\"})}</primer-input-label><primer-input slot=\"input\" id=\"addressLine2\" name=\"addressLine2\" type=\"text\" .value=${this.formData.addressLine2||\"\"} placeholder=${E(\"Address line 2\",{id:\"addressLine2Placeholder\"})} @input=${e=>this.handleInput(\"addressLine2\",e.detail)} @focus=${()=>this.handleFocus(\"addressLine2\")} @blur=${()=>this.handleBlur(\"addressLine2\")} ></primer-input>${k(this.shouldShowError(\"addressLine2\"),()=>m`<primer-input-error slot=\"error\">${this.errors.addressLine2}</primer-input-error>`)}</primer-input-wrapper>`)} ${k(this.fieldConfig.postalCode||this.fieldConfig.city,()=>m`<div class=\"billing-address-row\">${k(this.fieldConfig.postalCode,()=>m`<primer-input-wrapper .focusWithin=${this.focusedField===\"postalCode\"} .hasError=${this.shouldShowError(\"postalCode\")} ><primer-input-label slot=\"label\">${E(\"Postal code\",{id:\"postalCodeLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"postalCode\" name=\"postalCode\" type=\"text\" .value=${this.formData.postalCode||\"\"} placeholder=${E(\"90210\",{id:\"postalCodePlaceholder\"})} @input=${e=>this.handleInput(\"postalCode\",e.detail)} @focus=${()=>this.handleFocus(\"postalCode\")} @blur=${()=>this.handleBlur(\"postalCode\")} ></primer-input>${k(this.shouldShowError(\"postalCode\"),()=>m`<primer-input-error slot=\"error\">${this.errors.postalCode}</primer-input-error>`)}</primer-input-wrapper>`)} ${k(this.fieldConfig.city,()=>m`<primer-input-wrapper .focusWithin=${this.focusedField===\"city\"} .hasError=${this.shouldShowError(\"city\")} ><primer-input-label slot=\"label\">${E(\"City\",{id:\"cityLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"city\" name=\"city\" type=\"text\" .value=${this.formData.city||\"\"} placeholder=${E(\"Cape Town\",{id:\"cityPlaceholder\"})} @input=${e=>this.handleInput(\"city\",e.detail)} @focus=${()=>this.handleFocus(\"city\")} @blur=${()=>this.handleBlur(\"city\")} ></primer-input>${k(this.shouldShowError(\"city\"),()=>m`<primer-input-error slot=\"error\">${this.errors.city}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`)} ${k(this.fieldConfig.state,()=>m`<primer-input-wrapper .focusWithin=${this.focusedField===\"state\"} .hasError=${this.shouldShowError(\"state\")} ><primer-input-label slot=\"label\">${E(\"State / Region / County\",{id:\"stateLabel\"})}</primer-input-label><primer-input slot=\"input\" id=\"state\" name=\"state\" type=\"text\" .value=${this.formData.state||\"\"} placeholder=${E(\"State / Region / County\",{id:\"statePlaceholder\"})} @input=${e=>this.handleInput(\"state\",e.detail)} @focus=${()=>this.handleFocus(\"state\")} @blur=${()=>this.handleBlur(\"state\")} ></primer-input>${k(this.shouldShowError(\"state\"),()=>m`<primer-input-error slot=\"error\">${this.errors.state}</primer-input-error>`)}</primer-input-wrapper>`)}</div>`):(this.setAttribute(\"hidden\",\"\"),g)})}}"
|
|
234
234
|
},
|
|
235
235
|
{
|
|
236
236
|
"kind": "variable",
|
|
237
|
-
"name": "
|
|
238
|
-
"default": "class extends v{constructor(){super();this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.isEditMode=!1;this.deletePaymentMethodId=null;this.isDeleting=!1;this.errorMessage=\"\";this.animationDuration=300;this.deleteAssetConfig=null;this.handleToggleEditMode=e=>{this.isEditMode=e.detail,this.deletePaymentMethodId=null,this.isEditMode&&this.vaultItemContext&&this.vaultItemContext.setSelectedVaultedPaymentMethod(null)};this.handleDeletePaymentMethod=async e=>{if(this.deletePaymentMethodId=e.detail,this.deletePaymentMethodId&&this.vaultManagerContext&&this.headlessUtils){let r=this.vaultManagerContext.vaultedPaymentMethods.find(o=>o.id===this.deletePaymentMethodId);r&&(this.deleteAssetConfig=await
|
|
237
|
+
"name": "ae",
|
|
238
|
+
"default": "class extends v{constructor(){super();this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.isEditMode=!1;this.deletePaymentMethodId=null;this.isDeleting=!1;this.errorMessage=\"\";this.animationDuration=300;this.deleteAssetConfig=null;this.handleToggleEditMode=e=>{this.isEditMode=e.detail,this.deletePaymentMethodId=null,this.isEditMode&&this.vaultItemContext&&this.vaultItemContext.setSelectedVaultedPaymentMethod(null)};this.handleDeletePaymentMethod=async e=>{if(this.deletePaymentMethodId=e.detail,this.deletePaymentMethodId&&this.vaultManagerContext&&this.headlessUtils){let r=this.vaultManagerContext.vaultedPaymentMethods.find(o=>o.id===this.deletePaymentMethodId);r&&(this.deleteAssetConfig=await Ti(r,this.headlessUtils,this.vaultManagerContext))}};this.handleCancelDelete=()=>{this.deletePaymentMethodId=null,this.deleteAssetConfig=null};this.handleConfirmDelete=async()=>{if(!this.vaultManagerContext?.deleteVaultedPaymentMethod||!this.deletePaymentMethodId){this.errorMessage=E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"});return}try{this.isDeleting=!0,await this.vaultManagerContext.deleteVaultedPaymentMethod(this.deletePaymentMethodId),this.deletePaymentMethodId=null,this.deleteAssetConfig=null}catch(e){this.errorMessage=e instanceof Error?e.message:E(\"something_went_wrong_error\",{id:\"something_went_wrong_error\"})}finally{this.isDeleting=!1}};this.handlePaymentError=e=>{let r=e.detail?.error;this.errorMessage=r instanceof Error?r.message:E(\"payment_processing_error\",{id:\"payment_processing_error\"})};this.handleCloseError=()=>{this.errorMessage=\"\"};new qt(this,{defaultOptions:{keyframeOptions:{duration:Number(getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-duration\").trim().replace(\"ms\",\"\")),easing:getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-easing\").trim()}}})}getAnimationConfig(){return{keyframeOptions:{duration:this.animationDuration,easing:getComputedStyle(document.documentElement).getPropertyValue(\"--primer-animation-easing\").trim(),fill:\"both\"}}}getPaymentMethodName(e){if(!this.vaultManagerContext)return\"\";let r=this.vaultManagerContext.vaultedPaymentMethods.find(o=>o.id===e);if(!r)return\"\";try{return qo(r).description||\"\"}catch{return\"\"}}renderLoadingOverlay(){return m`<div class=\"loading-overlay\" ${bt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ><primer-spinner size=\"medium\" color=\"var(--primer-color-loader)\" ></primer-spinner></div>`}renderDeleteConfirmation(){if(!this.deletePaymentMethodId||!this.deleteAssetConfig)return g;let e=this.getPaymentMethodName(this.deletePaymentMethodId);return m`<div class=\"delete-confirmation-container\"><primer-button disabled variant=\"secondary\"><primer-payment-method-content .assetConfig=${this.deleteAssetConfig} ></primer-payment-method-content></primer-button><primer-vault-delete-confirmation .isDeleting=${this.isDeleting} .paymentMethodId=${this.deletePaymentMethodId} .paymentMethodName=${e} @confirm-delete=${this.handleConfirmDelete} @cancel-delete=${this.handleCancelDelete} ${bt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-delete-confirmation></div>`}renderPaymentMethodItem(e){return this.deletePaymentMethodId===e.id?g:m`<primer-vault-payment-method-item .paymentMethod=${e} .isEditMode=${this.isEditMode} @delete-payment-method=${this.handleDeletePaymentMethod} ${bt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-payment-method-item>`}renderPaymentMethodList(){let e=this.vaultManagerContext?.vaultedPaymentMethods||[],r=!this.isEditMode&&e.length>0&&!this.deletePaymentMethodId;return m`<div class=\"payment-methods-list\">${e.map(o=>this.renderPaymentMethodItem(o))} ${k(r,()=>m`<div class=\"submit-button-container\"><primer-vault-payment-submit class=\"submit-button\" @primer-vault-payment-error=${this.handlePaymentError} ${bt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-payment-submit></div>`,()=>g)}</div>`}render(){if(!this.vaultManagerContext?.enabled)return g;let e=this.vaultManagerContext.vaultedPaymentMethods.length>0,r=this.vaultManagerContext.isLoading,o=this.vaultManagerContext.isUpdating;return m` ${k(!this.vaultManagerContext?.showEmptyState&&!e,()=>g,()=>m`<slot name=\"vault-empty-state\"><div class=\"vault-manager ${o?\"is-updating\":\"\"}\"><primer-vault-manager-header .isEditMode=${this.isEditMode} .hasPaymentMethods=${e} @toggle-edit-mode=${this.handleToggleEditMode} ></primer-vault-manager-header>${k(this.errorMessage,()=>m`<primer-vault-error-message .errorMessage=${this.errorMessage} @close-error=${this.handleCloseError} ${bt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-error-message>`,()=>g)}<div class=\"vault-manager-content\">${k(!r&&!e,()=>m`<div class=\"content-container\"><primer-vault-empty-state ${bt({...this.getAnimationConfig(),properties:[\"opacity\"],in:[{opacity:0},{opacity:1}],out:[{opacity:1},{opacity:0}]})} ></primer-vault-empty-state></div>`,()=>g)} ${k(!r&&e,()=>m`<div class=\"content-container\">${k(this.deletePaymentMethodId,()=>this.renderDeleteConfirmation(),()=>this.renderPaymentMethodList())}</div>`,()=>g)}</div>${k(o,()=>this.renderLoadingOverlay(),()=>g)}</div></slot>`)} `}}"
|
|
239
239
|
},
|
|
240
240
|
{
|
|
241
241
|
"kind": "variable",
|
|
242
|
-
"name": "
|
|
243
|
-
"default": "class extends v{constructor(){super(...arguments);this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.paymentMethod=null;this.isEditMode=!1;this._getAssetsTask=new D(this,{task:async([e,r,o])=>await
|
|
242
|
+
"name": "Ce",
|
|
243
|
+
"default": "class extends v{constructor(){super(...arguments);this.vaultManagerContext=null;this.vaultItemContext=null;this.headlessUtils=null;this.paymentMethod=null;this.isEditMode=!1;this._getAssetsTask=new D(this,{task:async([e,r,o])=>await Ti(e,r,o),args:()=>[this.paymentMethod,this.headlessUtils,this.vaultManagerContext]});this.handleClick=()=>{this.isEditMode||!this.vaultManagerContext||!this.paymentMethod||(this.isSelected()?this.vaultItemContext?.setSelectedVaultedPaymentMethod(null):this.vaultItemContext?.setSelectedVaultedPaymentMethod(this.paymentMethod))};this.handleDeleteClick=e=>{e.stopPropagation(),this.dispatchEvent(new CustomEvent(\"delete-payment-method\",{detail:this.paymentMethod?.id,bubbles:!0,composed:!0}))}}isSelected(){if(!this.vaultManagerContext||!this.paymentMethod)return!1;let e=this.vaultItemContext?.selectedVaultedPaymentMethod;return!!e&&e.id===this.paymentMethod.id}render(){return this._getAssetsTask.render({error:()=>g,complete:e=>{let r=this.isSelected()?\"checked\":\"default\",o=!1,n=e?.description;return m`<div class=\"payment-method-wrapper\"><div class=\"payment-method-container\"><primer-button variant=\"secondary\" class=\"payment-method-button ${e.shouldShowCVV?\"with-cvv\":\"\"}\" selectable ?disabled=${this.isEditMode} selectionState=${r} .flex=${o} @click=${this.handleClick} ><primer-payment-method-content .assetConfig=${e} ></primer-payment-method-content>${k(e.shouldShowCVV&&this.isSelected()&&!this.isEditMode,()=>m`<div class=\"payment-method-row mt-2\"><span class=\"flex-center\"><primer-icon name=\"lock\" size=\"sm\"></primer-icon><span class=\"payment-method-subtitle\"> Input the card CVV for a secure payment</span ></span><span class=\"cell-2\"><primer-vault-cvv-input .paymentMethod=\"${this.paymentMethod}\" ><span slot=\"label\"></span></primer-vault-cvv-input></span></div>`,()=>g)}</primer-button>${this.isEditMode?m`<primer-button variant=\"tertiary\" class=\"delete-button\" @click=${this.handleDeleteClick} aria-label=${`${E(\"delete\",{id:\"delete\"})} ${n}`} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></primer-button>`:g}</div></div>`}})}}"
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
"kind": "variable",
|
|
247
|
-
"name": "
|
|
248
|
-
"default": "class extends v{constructor(){super(...arguments);this.isEditMode=!1;this.hasPaymentMethods=!1;this.toggleEditMode=()=>{this.dispatchEvent(new CustomEvent(\"toggle-edit-mode\",{detail:!this.isEditMode,bubbles:!0,composed:!0}))}}render(){return m`<div class=\"vault-manager-header\"><h3>${E(\"previouslyUsed\",{id:\"previouslyUsed\"})}</h3>${this.hasPaymentMethods?m`<primer-button variant=\"tertiary\" class=\"edit-button ${this.isEditMode?\"active\":\"\"}\" @click=${this.toggleEditMode} aria-label=${this.isEditMode?E(\"confirm\",{id:\"confirm\"}):E(\"editPaymentMethods\",{id:\"editPaymentMethods\"})} >${this.isEditMode?m`<primer-icon name=\"checkmark\" size=\"sm\"></primer-icon>`:m`<primer-icon name=\"edit\" size=\"sm\"></primer-icon>`}</primer-button>`:
|
|
247
|
+
"name": "De",
|
|
248
|
+
"default": "class extends v{constructor(){super(...arguments);this.isEditMode=!1;this.hasPaymentMethods=!1;this.toggleEditMode=()=>{this.dispatchEvent(new CustomEvent(\"toggle-edit-mode\",{detail:!this.isEditMode,bubbles:!0,composed:!0}))}}render(){return m`<div class=\"vault-manager-header\"><h3>${E(\"previouslyUsed\",{id:\"previouslyUsed\"})}</h3>${this.hasPaymentMethods?m`<primer-button variant=\"tertiary\" class=\"edit-button ${this.isEditMode?\"active\":\"\"}\" @click=${this.toggleEditMode} aria-label=${this.isEditMode?E(\"confirm\",{id:\"confirm\"}):E(\"editPaymentMethods\",{id:\"editPaymentMethods\"})} >${this.isEditMode?m`<primer-icon name=\"checkmark\" size=\"sm\"></primer-icon>`:m`<primer-icon name=\"edit\" size=\"sm\"></primer-icon>`}</primer-button>`:g}</div>`}}"
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
"kind": "variable",
|
|
252
|
-
"name": "
|
|
252
|
+
"name": "_e",
|
|
253
253
|
"default": "class extends v{constructor(){super(...arguments);this.isDeleting=!1;this.paymentMethodId=\"\";this.paymentMethodName=\"\";this.vaultManager=null;this.handleConfirmClick=()=>{this.dispatchEvent(new CustomEvent(\"confirm-delete\",{bubbles:!0,composed:!0}))};this.handleCancelClick=()=>{this.dispatchEvent(new CustomEvent(\"cancel-delete\",{bubbles:!0,composed:!0}))}}render(){return m`<div class=\"delete-confirmation\"><p class=\"delete-confirmation-text\"> Are you sure you want to delete this payment method? </p><div class=\"delete-actions\"><primer-button variant=\"secondary\" @click=${this.handleCancelClick} ?disabled=${this.isDeleting} >${E(\"cancel\",{id:\"cancel\"})}</primer-button><primer-button @click=${this.handleConfirmClick} ?disabled=${this.isDeleting} >${this.isDeleting?E(\"deleting\",{id:\"deleting\"}):E(\"confirmVaultedPaymentMethodDeletion\",{id:\"confirmVaultedPaymentMethodDeletion\"})}</primer-button></div></div>`}}"
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"kind": "variable",
|
|
257
|
-
"name": "
|
|
257
|
+
"name": "rt",
|
|
258
258
|
"default": "class extends v{render(){return m`<div class=\"empty-state\"><p>${E(\"savedPaymentMethodsEmpty\",{id:\"savedPaymentMethodsEmpty\"})}</p></div>`}}"
|
|
259
259
|
},
|
|
260
260
|
{
|
|
261
261
|
"kind": "variable",
|
|
262
|
-
"name": "
|
|
262
|
+
"name": "je",
|
|
263
263
|
"default": "class extends v{constructor(){super(...arguments);this.errorMessage=\"\";this.handleDismiss=()=>{this.dispatchEvent(new CustomEvent(\"close-error\",{bubbles:!0,composed:!0}))}}render(){return m`<div class=\"error-message\"><div class=\"error-content\"><primer-icon name=\"warning\" size=\"sm\" color=\"var(--primer-color-red-500)\" ></primer-icon><p>${this.errorMessage}</p></div><button @click=${this.handleDismiss} aria-label=${E(\"closeErrorMessage\",{id:\"closeErrorMessage\"})} ><primer-icon name=\"close\" size=\"sm\"></primer-icon></button></div>`}}"
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
266
|
"kind": "variable",
|
|
267
|
-
"name": "
|
|
268
|
-
"default": "class extends v{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.headlessInstance=null;this.sdkState=null;this.vaultItemContext=null;this.vaultManager=null;this.clientOptions=null;this.variant=\"primary\";this.disabled=!1;this.handleClick=async e=>{if(e.preventDefault(),!this.isButtonDisabled)try{await this.vaultManager?.startVaultedPaymentFlow()}catch(r){let o=new CustomEvent(\"primer-vault-payment-error\",{bubbles:!0,composed:!0,detail:{error:r}});this.dispatchEvent(o)}}}get buttonText(){return this._userAssignedProps.has(\"buttonText\")?this._internalButtonText:E(\"pay\",{id:\"pay\"})}set buttonText(e){let r=this.buttonText;e!==\"\"?(this._userAssignedProps.add(\"buttonText\"),this._internalButtonText=e):(this._userAssignedProps.delete(\"buttonText\"),this._internalButtonText=\"\"),this.requestUpdate(\"buttonText\",r)}get isButtonDisabled(){return!!(this.disabled||!this.vaultItemContext?.selectedVaultedPaymentMethod||this.vaultManager?.isLoading)}render(){let e=this.clientOptions?.submitButton?.amountVisible?this.headlessInstance?.getUIOrderAmount():null,r=e?` ${e}`:
|
|
267
|
+
"name": "Q",
|
|
268
|
+
"default": "class extends v{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.headlessInstance=null;this.sdkState=null;this.vaultItemContext=null;this.vaultManager=null;this.clientOptions=null;this.variant=\"primary\";this.disabled=!1;this.handleClick=async e=>{if(e.preventDefault(),!this.isButtonDisabled)try{await this.vaultManager?.startVaultedPaymentFlow()}catch(r){let o=new CustomEvent(\"primer-vault-payment-error\",{bubbles:!0,composed:!0,detail:{error:r}});this.dispatchEvent(o)}}}get buttonText(){return this._userAssignedProps.has(\"buttonText\")?this._internalButtonText:E(\"pay\",{id:\"pay\"})}set buttonText(e){let r=this.buttonText;e!==\"\"?(this._userAssignedProps.add(\"buttonText\"),this._internalButtonText=e):(this._userAssignedProps.delete(\"buttonText\"),this._internalButtonText=\"\"),this.requestUpdate(\"buttonText\",r)}get isButtonDisabled(){return!!(this.disabled||!this.vaultItemContext?.selectedVaultedPaymentMethod||this.vaultManager?.isLoading)}render(){let e=this.clientOptions?.submitButton?.amountVisible?this.headlessInstance?.getUIOrderAmount():null,r=e?` ${e}`:g;return m`<primer-button buttonType=\"submit\" variant=${this.variant} @click=${this.handleClick} .disabled=${this.isButtonDisabled} .loading=${this.sdkState?.isProcessing} data-submit >${this.buttonText}${r}</primer-button>`}}"
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
"kind": "variable",
|
|
272
|
-
"name": "
|
|
273
|
-
"default": "class extends v{constructor(){super();this.vaultManagerFormContext=null;this.vaultManagerCvvContext=null;this.computedStyles=null;this.paymentMethod=null;this.cvvError=null;this.cvvInputIsDirty=!1;this.cvvInputIsBlurred=!1;this.cvvInput=null;this.isFocused=!1;this._setupCVVIframe=new D(this,{task:([e,r])=>!e||!r||e.paymentMethodType!==\"PAYMENT_CARD\"||!e.paymentInstrumentData?.network||r.createCvvInput===null?
|
|
272
|
+
"name": "W",
|
|
273
|
+
"default": "class extends v{constructor(){super();this.vaultManagerFormContext=null;this.vaultManagerCvvContext=null;this.computedStyles=null;this.paymentMethod=null;this.cvvError=null;this.cvvInputIsDirty=!1;this.cvvInputIsBlurred=!1;this.cvvInput=null;this.isFocused=!1;this._setupCVVIframe=new D(this,{task:([e,r])=>!e||!r||e.paymentMethodType!==\"PAYMENT_CARD\"||!e.paymentInstrumentData?.network||r.createCvvInput===null?L:{network:e.paymentInstrumentData.network,createCvvInput:r.createCvvInput},args:()=>[this.paymentMethod,this.vaultManagerFormContext]});this.cvvContainerId=`cvv-container-${Math.random().toString(36).substring(2,9)}`,new D(this,{task:async([e])=>{if(!e)return L;await this.updateComplete;let r=this.renderRoot.querySelector(`#${this.cvvContainerId}`);if(!r)return;let o=Ni(this.computedStyles),n=o?{input:{base:o}}:void 0,a={cardNetwork:e.network,container:r,name:\"cvv\",placeholder:\"123\",style:n,ariaLabel:E(\"CVV\",{id:\"cardCVV\"})};this.cvvInput=await e.createCvvInput?.(a)??null,this.cvvInput&&(this.cvvInput.focus(),this.cvvError=this.cvvInput.metadata.errorCode||null,this.vaultManagerCvvContext?.setCvvInput(this.cvvInput),this.cvvInput.addListener(\"change\",()=>{this.onCvvInputChange()}),this.cvvInput.addListener(\"blur\",()=>{this.onBlur()}),this.cvvInput.addListener(\"focus\",()=>{this.onFocus()}))},args:()=>[this._setupCVVIframe.value]})}disconnectedCallback(){super.disconnectedCallback(),this.cvvInput&&(this.cvvInput.remove(),this.cvvInput=null,this.cvvError=null,this.vaultManagerCvvContext?.setCvvInput(null))}onCvvInputChange(){!this.cvvInput||!this.vaultManagerCvvContext||(this.cvvInputIsDirty=!0,this.cvvError=this.cvvInput.metadata.errorCode||null)}onBlur(){this.cvvInput&&(this.cvvInputIsBlurred=!0,this.cvvError=this.cvvInput.metadata.errorCode||null,this.isFocused=!1)}onFocus(){this.isFocused=!0}render(){return this._setupCVVIframe.render({error:()=>g,complete:()=>m`<div class=\"cvv-input-container\"><primer-input-wrapper .focusWithin=${this.isFocused} .hasError=${!!this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred)} ><slot name=\"label\" slot=\"label\"><primer-input-label>CVV</primer-input-label></slot><div slot=\"input\" id=\"${this.cvvContainerId}\"></div>${k(this.cvvError&&(this.vaultManagerCvvContext?.formIsDirty||this.cvvInputIsDirty&&this.cvvInputIsBlurred),()=>m`<primer-input-error slot=\"error\">${E(this.cvvError,{id:this.cvvError})}</primer-input-error>`)}</primer-input-wrapper></div>`})}}"
|
|
274
274
|
},
|
|
275
275
|
{
|
|
276
276
|
"kind": "variable",
|
|
277
|
-
"name": "
|
|
278
|
-
"default": "class extends v{constructor(){super(...arguments);this.assetConfig=null}render(){if(!this.assetConfig)return
|
|
277
|
+
"name": "We",
|
|
278
|
+
"default": "class extends v{constructor(){super(...arguments);this.assetConfig=null}render(){if(!this.assetConfig)return g;let e=this.assetConfig.description,r=this.assetConfig.icon,o=k(this.assetConfig.icon,()=>m`<img class=\"payment-method-icon\" src=${r} alt=${e} />`,()=>m`<div class=\"payment-method-icon payment-method-icon-generic\"><primer-icon name=\"payment-card\" size=\"sm\"></primer-icon></div>`);return this.assetConfig.type===\"paypal\"?m`<span class=\"payment-method-card\"><div class=\"payment-method-row\"><span class=\"payment-method-header\" >${this.assetConfig.fullName}</span ></div><div class=\"payment-method-row\"><span class=\"flex\">${o}<span class=\"payment-method-subtitle\" >${this.assetConfig.paymentMethodType}</span ></span></div></span>`:this.assetConfig.type===\"other\"&&this.assetConfig.paymentMethodType!==\"ACH\"?m`<div class=\"payment-method-card-other\"><div class=\"left-column\"><div class=\"payment-method-header\">${this.assetConfig.fullName}</div><div class=\"flex\">${o}<span class=\"payment-method-subtitle\" >${this.assetConfig.paymentMethodType}</span ></div></div><div class=\"payment-method-right-column-text\">${this.assetConfig.email||`\\u2022\\u2022\\u2022\\u2022 ${this.assetConfig.last4}`}</div></div>`:this.assetConfig.type===\"other\"&&this.assetConfig.paymentMethodType===\"ACH\"?m`<span class=\"payment-method-card\"><div class=\"payment-method-row\"><span class=\"payment-method-header\" >${this.assetConfig.fullName}</span ><span class=\"payment-method-header cell-2\" >•••• ${this.assetConfig.last4}</span ></div><div class=\"payment-method-row\"><span class=\"flex\">${o}<span class=\"payment-method-subtitle\" >${this.assetConfig.bankName}</span ></span><span class=\"payment-method-subtitle cell-2\" >${this.assetConfig.accountType}</span ></div></span>`:this.assetConfig.type===\"card\"?m`<span class=\"payment-method-card\"><div class=\"payment-method-row\"><span class=\"payment-method-header\" >${this.assetConfig.cardholderName}</span ><span class=\"payment-method-header cell-2\" >•••• ${this.assetConfig.last4}</span ></div><div class=\"payment-method-row\"><span class=\"flex\">${o}<span class=\"payment-method-subtitle\" >${this.assetConfig.network}</span ></span><span class=\"payment-method-subtitle cell-2\" >${this.assetConfig.expiresDate}</span ></div></span>`:g}}"
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
"kind": "variable",
|
|
282
|
-
"name": "
|
|
283
|
-
"default": "class extends v{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.formErrorMessage=null;this.paymentMethodSelectionSent=!1;this.paymentManagers=new Map;this.clientOptions=null;this.headlessUtils=null;this.analyticsUtils=null;this.contextEventsController=null;this.cardFormProvider=new
|
|
282
|
+
"name": "ee",
|
|
283
|
+
"default": "class extends v{constructor(){super(...arguments);this.hideLabels=!1;this.disabled=!1;this.hasAssignedContent=!1;this.selectedCardNetwork=null;this.formErrorMessage=null;this.paymentMethodSelectionSent=!1;this.paymentManagers=new Map;this.clientOptions=null;this.headlessUtils=null;this.analyticsUtils=null;this.contextEventsController=null;this.cardFormProvider=new K(this,{context:Jt,initialValue:null});this.eventsController=new Bt(this);this._contextCardSubmitListener=null;this._isHandlingContextEvent=!1;this.inputControllers=new Map;this.setupCardFormTask=new D(this,{task:([e])=>{if(!e?.manager)return L;let{manager:r}=e,o=r.createHostedInputs(),{cardNumberInput:n,expiryInput:a,cvvInput:s}=o;return this.cardFormProvider.setValue({cardholderNameInput:o.cardholderNameInput,cardNumberInput:n,expiryInput:a,cvvInput:s,setCardholderName:l=>{r.setCardholderName(l),this.shouldRequireCardholderName&&r.validate?.().then(c=>{let f=c?.validationErrors?.find(A=>A.name===Zs.cardholderName),h=this.inputControllers.get(\"cardholderName\");h&&h.updateMetaFromValidation({valid:!1,error:f?.message||f?.error||null,errorCode:f?.message||f?.error||null})})},setCardNetwork:l=>{this.selectedCardNetwork=l},validate:()=>r.validate(),submit:l=>r.submit(l),hideLabels:this.hideLabels,disabled:this.disabled,setSubmissionState:l=>{this.inputControllers.forEach(c=>{c.setSubmitted(l)})},propagateValidationErrors:l=>{l&&l.forEach(c=>{let u=c.field||c.name,f=c.message||c.error,h=Zs[u];if(h){let A=this.inputControllers.get(h);if(A){let C={valid:!1,error:f,errorCode:f};A.updateMetaFromValidation(C)}}})},registerInputController:(l,c)=>{this.inputControllers.set(l,c)},unregisterInputController:l=>{this.inputControllers.delete(l)},onUserInteraction:()=>{this.sendPaymentMethodSelectionEvent(),this.checkAndSendPaymentDetailsEnteredEvent()}}),!0},args:()=>[this.paymentManagers.get(\"PAYMENT_CARD\")]});this.paymentDetailsEnteredSent=!1;this.handleSlotButtonClick=e=>{let o=e.target.closest(\"button, primer-button\");if(!o)return;let n=o;this.isSubmitButton(n)&&(e.preventDefault(),this.submitCardPayment())};this.handleDirectSubmit=e=>{e.stopPropagation(),this.submitCardPayment()};this.handleContextCardSubmit=e=>{if(!this._isHandlingContextEvent){this._isHandlingContextEvent=!0;try{e.target!==this&&(e.stopPropagation(),this.submitCardPayment())}finally{this._isHandlingContextEvent=!1}}};this.onSlotChange=e=>{let o=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=o.length>0};this.handleFormSubmit=e=>{e.preventDefault(),e.stopPropagation(),this.submitCardPayment()}}updated(e){if(super.updated(e),(e.has(\"hideLabels\")||e.has(\"disabled\"))&&this.cardFormProvider.value&&this.cardFormProvider.setValue({...this.cardFormProvider.value,hideLabels:this.hideLabels,disabled:this.disabled}),e.has(\"contextEventsController\")){let r=e.get(\"contextEventsController\");r?.host&&this._contextCardSubmitListener&&r.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener),this.setupContextEventListeners()}}get shouldShowCardholderName(){let e=this.clientOptions?.card?.cardholderName;return typeof e?.visible==\"boolean\"?e.visible:!0}get shouldRequireCardholderName(){if(!this.shouldShowCardholderName)return!1;let e=this.clientOptions?.card?.cardholderName;return typeof e?.required==\"boolean\"?e.required:!0}sendPaymentMethodSelectionEvent(){this.paymentMethodSelectionSent||(this.paymentMethodSelectionSent=!0,Z({eventName:\"PAYMENT_METHOD_SELECTION\",paymentMethod:\"PAYMENT_CARD\"}))}checkAndSendPaymentDetailsEnteredEvent(){if(this.paymentDetailsEnteredSent)return;let e=this.inputControllers.get(\"cardNumber\"),r=this.inputControllers.get(\"expire\"),o=this.inputControllers.get(\"cvv\"),n=e?.meta?.dirty===!0,a=r?.meta?.dirty===!0,s=o?.meta?.dirty===!0,l=!0;this.shouldRequireCardholderName&&(l=this.inputControllers.get(\"cardholderName\")?.meta?.dirty===!0),n&&a&&s&&l&&(this.sendPaymentDetailsEnteredEvent(),this.paymentDetailsEnteredSent=!0)}sendPaymentDetailsEnteredEvent(){Z({eventName:\"PAYMENT_DETAILS_ENTERED\",paymentMethod:\"PAYMENT_CARD\"})}connectedCallback(){super.connectedCallback(),this.addEventListener(\"click\",this.handleSlotButtonClick),this.addEventListener(\"primer:card-submit\",this.handleDirectSubmit),this._contextCardSubmitListener=e=>{this.handleContextCardSubmit(e)},this.setupContextEventListeners()}disconnectedCallback(){this.removeEventListener(\"click\",this.handleSlotButtonClick),this.removeEventListener(\"primer:card-submit\",this.handleDirectSubmit),this.cleanupContextEventListeners(),super.disconnectedCallback()}setupContextEventListeners(){this.contextEventsController?.host&&this._contextCardSubmitListener&&this.contextEventsController.host.addEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}cleanupContextEventListeners(){this.contextEventsController?.host&&this._contextCardSubmitListener&&this.contextEventsController.host.removeEventListener(\"primer:card-submit\",this._contextCardSubmitListener)}isSubmitButton(e){let r=e.tagName.toLowerCase(),o=r===\"button\",n=r===\"primer-button\";return o&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))||n&&(e.getAttribute(\"type\")===\"submit\"||e.hasAttribute(\"data-submit\"))}async submitCardPayment(){let e=this.cardFormProvider.value;if(!e||this.disabled)return;this.formErrorMessage=null,e.setSubmissionState?.(!0);let r=this.querySelector(\"primer-billing-address\")||this.renderRoot.querySelector(\"primer-billing-address\"),o=!0;r&&(o=await r.validateForSubmission());let n=await e.validate?.();if(n?.valid&&o){if(r&&!await r.submitToSDK()){let c=E(\"tokenizationError\",{id:\"tokenizationError\"});this.formErrorMessage=c,this.eventsController.dispatchFormSubmitErrors([{field:\"billingAddress\",name:\"billingAddress\",error:\"BILLING_ADDRESS_SUBMISSION_FAILED\",message:c}]);return}let a=this.selectedCardNetwork?{cardNetwork:this.selectedCardNetwork}:void 0;await e.submit?.(a);let s={success:!0};this.eventsController.dispatchFormSubmitSuccess(s)}else{let a=n?.validationErrors;e.propagateValidationErrors?.(a||[]),this.cardFormProvider.setValue({...e,errors:a}),this.eventsController.dispatchFormSubmitErrors(a)}}render(){return this.setupCardFormTask.status===ut.ERROR||this.setupCardFormTask.status===ut.INITIAL?g:m`<form @submit=${this.handleFormSubmit}><slot name=\"card-form-content\" @slotchange=${this.onSlotChange}></slot>${this.setupCardFormTask.render({complete:()=>k(this.hasAssignedContent,()=>g,()=>m`<div class=\"card-form\"><primer-input-card-number></primer-input-card-number><div class=\"card-form-row\"><primer-input-card-expiry></primer-input-card-expiry><primer-input-cvv></primer-input-cvv></div>${k(this.shouldShowCardholderName,()=>m`<primer-input-card-holder-name></primer-input-card-holder-name>`,()=>g)}<primer-billing-address></primer-billing-address></div><primer-card-form-submit></primer-card-form-submit><primer-error-message message=\"${this.formErrorMessage||\"\"}\" ?visible=\"${!!this.formErrorMessage}\" ></primer-error-message>`)})}</form>`}}"
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
286
|
"kind": "variable",
|
|
287
|
-
"name": "
|
|
288
|
-
"default": "class extends
|
|
287
|
+
"name": "it",
|
|
288
|
+
"default": "class extends pe{constructor(){super();this.config={inputType:\"cardNumber\",containerSelector:\"#cardNumber\",errorName:\"cardNumber-card\",translations:{label:{id:\"cardNumber\",defaultMessage:\"Card Number\"},placeholder:\"4111 1111 1111 1111\",ariaLabel:{id:\"cardNumber\",defaultMessage:\"Card Number\"}}};this.handleNetworkSelected=e=>{let{network:r}=e.detail;this.cardFormContext&&this.cardFormContext.setCardNetwork(r)};this.childUpdated()}renderInput(){if(this.hostedInputController.setupTask.status===ut.ERROR)return g;let e=this.getError();return m`<primer-input-wrapper .focusWithin=\"${this.hostedInputController.meta.active}\" .hasError=${!!e} >${k(!this.cardFormContext?.hideLabels,()=>m`<primer-input-label slot=\"label\" >${this.label}</primer-input-label >`,()=>g)}<div slot=\"input\" class=\"card-number-container\" aria-label=\"${this.ariaLabel}\" ><div id=\"${this.config.containerSelector.substring(1)}\"></div><div class=\"network-selector-container\"><primer-card-network-selector @network-selected=${this.handleNetworkSelected} ></primer-card-network-selector></div></div>${k(e,r=>m`<primer-input-error slot=\"error\">${E(r,{id:r})}</primer-input-error>`,()=>g)}</primer-input-wrapper>`}render(){return this.renderInput()}}"
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
"kind": "variable",
|
|
292
|
-
"name": "
|
|
293
|
-
"default": "class extends
|
|
292
|
+
"name": "ot",
|
|
293
|
+
"default": "class extends pe{constructor(){super();this.config={inputType:\"cvv\",containerSelector:\"#cvv\",errorName:\"cvv-card\",translations:{label:\"CVV\",placeholder:\"123\"}};this.childUpdated()}render(){return this.renderInput()}}"
|
|
294
294
|
},
|
|
295
295
|
{
|
|
296
296
|
"kind": "variable",
|
|
297
|
-
"name": "
|
|
298
|
-
"default": "class extends
|
|
297
|
+
"name": "nt",
|
|
298
|
+
"default": "class extends pe{constructor(){super();this.config={inputType:\"expire\",containerSelector:\"#expiry\",errorName:\"expiryDate-card\",translations:{label:{id:\"cardExpiry\",defaultMessage:\"Expiry Date\"},placeholder:{id:\"cardExpiryPlaceholder\",defaultMessage:\"MM/YY\"},ariaLabel:{id:\"cardExpiry\",defaultMessage:\"Expiry Date\"}}};this.childUpdated()}render(){return this.renderInput()}}"
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
"kind": "variable",
|
|
302
|
-
"name": "
|
|
303
|
-
"default": "class extends
|
|
302
|
+
"name": "at",
|
|
303
|
+
"default": "class extends pe{constructor(){super();this.config={inputType:\"cardholderName\",containerSelector:\"#cardFormName\",errorName:\"cardholderName\",translations:{label:{id:\"cardholderNameLabel\",defaultMessage:\"Cardholder Name\"},placeholder:{id:\"cardholderNamePlaceholder\",defaultMessage:\"Name on card\"},ariaLabel:{id:\"cardholderNameLabel\",defaultMessage:\"Cardholder Name\"}},onInput:e=>this.handleInput(e)};this.childUpdated()}handleInput(e){this.cardFormContext?.setCardholderName?.(e)}render(){return this.renderInput()}}"
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
"kind": "variable",
|
|
307
|
-
"name": "
|
|
308
|
-
"default": "class extends v{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.headlessUtils=null;this.clientOptions=null;this.sdkState=null;this.cardFormContext=null;this.analyticsUtils=null;this.contextEventsController=null;this.variant=\"primary\";this.disabled=!1;this.handleClick=e=>{if(e.preventDefault(),this.disabled)return;
|
|
307
|
+
"name": "q",
|
|
308
|
+
"default": "class extends v{constructor(){super(...arguments);this._userAssignedProps=new Set;this._internalButtonText=\"\";this.headlessUtils=null;this.clientOptions=null;this.sdkState=null;this.cardFormContext=null;this.analyticsUtils=null;this.contextEventsController=null;this.variant=\"primary\";this.disabled=!1;this.handleClick=e=>{if(e.preventDefault(),this.disabled)return;Z({eventName:\"PAYMENT_SUBMITTED\",paymentMethod:\"PAYMENT_CARD\"});let r=new CustomEvent(\"primer:card-submit\",{bubbles:!0,composed:!0,detail:{source:\"primer-card-form-submit\"}});this.dispatchEvent(r)}}get buttonText(){return this._userAssignedProps.has(\"buttonText\")?this._internalButtonText:E(\"pay\",{id:\"pay\"})}set buttonText(e){let r=this.buttonText;e!==\"\"?(this._userAssignedProps.add(\"buttonText\"),this._internalButtonText=e):(this._userAssignedProps.delete(\"buttonText\"),this._internalButtonText=\"\"),this.requestUpdate(\"buttonText\",r)}get submitButtonConfig(){return this.clientOptions?.submitButton??null}get shouldShowBuiltInButton(){return this.submitButtonConfig?.useBuiltInButton??!0}render(){if(!this.shouldShowBuiltInButton)return g;let e=this.submitButtonConfig?.amountVisible?this.headlessUtils?.getUIOrderAmount():null,r=e?` ${e}`:g,o=this.disabled||this.cardFormContext?.disabled||!1;return m`<primer-button type=\"submit\" variant=${this.variant} ?disabled=${o} @click=${this.handleClick} .loading=${!!this.sdkState?.isProcessing} data-submit >${this.buttonText}${r}</primer-button>`}}"
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
311
|
"kind": "variable",
|
|
312
|
-
"name": "
|
|
313
|
-
"default": "class extends v{constructor(){super(...arguments);this.cardNetworks=null;this.headlessUtils=null;this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=
|
|
312
|
+
"name": "me",
|
|
313
|
+
"default": "class extends v{constructor(){super(...arguments);this.cardNetworks=null;this.headlessUtils=null;this.selectedCardNetwork=null;this.isDropdownOpen=!1;this.focusedNetworkIndex=0;this.isKeyboardNavigation=!1;this.buttonRef=Rt();this.dropdownRef=Rt();this.networkOptionRefs=[];this.toggleDropdown=e=>{this.isKeyboardNavigation=!1,e.stopPropagation(),this.getSelectableNetworks().length>1&&(this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))};this.handleClickOutside=e=>{this.isDropdownOpen&&(this.contains(e.target)||(this.isDropdownOpen=!1,this.isKeyboardNavigation=!1))};this.handleMouseMove=()=>{this.isKeyboardNavigation&&(this.isKeyboardNavigation=!1)};this.handleKeyDown=e=>{if(!(!(this.getSelectableNetworks().length>1)||!(this.contains(e.target)||this===e.target||this.isDropdownOpen&&e.target===document.body)))switch(this.isKeyboardNavigation=!0,e.key){case\"ArrowDown\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex+1)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"ArrowUp\":e.preventDefault(),this.isDropdownOpen?(this.focusedNetworkIndex=(this.focusedNetworkIndex-1+this.getSelectableNetworks().length)%this.getSelectableNetworks().length,this.focusNetworkOption()):(this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Enter\":case\" \":this.isDropdownOpen&&this.focusedNetworkIndex>=0?(e.preventDefault(),this.selectNetwork(e,this.getSelectableNetworks()[this.focusedNetworkIndex])):!this.isDropdownOpen&&this.buttonRef.value===document.activeElement&&(e.preventDefault(),this.isDropdownOpen=!0,this.focusedNetworkIndex=this.getSelectedNetworkIndex());break;case\"Escape\":this.isDropdownOpen&&(e.preventDefault(),this.isDropdownOpen=!1,this.buttonRef.value?.focus());break;case\"Tab\":this.isDropdownOpen&&(this.isDropdownOpen=!1);break}};this.handleDocumentKeyDown=e=>{this.isDropdownOpen&&this.handleKeyDown(e)}}getNetworkIconUrl(e){return this.headlessUtils?.getCardNetworkAsset(e.network)?.cardUrl}getSelectableNetworks(){return this.cardNetworks?.selectableCardNetworks||[]}getDetectedNetwork(){return this.selectedCardNetwork??(this.cardNetworks?.detectedCardNetwork||null)}getSelectedNetworkIndex(){let e=this.getDetectedNetwork();if(!e)return 0;let r=this.getSelectableNetworks().findIndex(o=>o.network===e.network);return r>=0?r:0}selectNetwork(e,r){e.stopPropagation(),this.selectedCardNetwork=r,this.isDropdownOpen=!1,this.buttonRef.value?.focus(),this.cardNetworks&&this.dispatchEvent(new CustomEvent(\"network-selected\",{detail:{network:r.network},bubbles:!0,composed:!0}))}focusNetworkOption(){requestAnimationFrame(()=>{this.networkOptionRefs[this.focusedNetworkIndex]&&this.networkOptionRefs[this.focusedNetworkIndex].focus()})}setNetworkOptionRef(e,r){this.networkOptionRefs[r]=e}connectedCallback(){super.connectedCallback(),setTimeout(()=>{document.addEventListener(\"click\",this.handleClickOutside),document.addEventListener(\"mousemove\",this.handleMouseMove),this.addEventListener(\"keydown\",this.handleKeyDown),document.addEventListener(\"keydown\",this.handleDocumentKeyDown)},0)}disconnectedCallback(){document.removeEventListener(\"click\",this.handleClickOutside),document.removeEventListener(\"keydown\",this.handleDocumentKeyDown),document.removeEventListener(\"mousemove\",this.handleMouseMove),this.removeEventListener(\"keydown\",this.handleKeyDown),super.disconnectedCallback()}render(){if(this.cardNetworks?.isLoading)return m`<primer-spinner size=\"small\" compact></primer-spinner>`;let e=this.getSelectableNetworks();if(!this.getDetectedNetwork()&&e.length===0)return m`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let r=this.getDetectedNetwork()||(e.length>0?e[0]:null);if(!r)return m`<primer-icon name=\"payment-card\" size=\"sm\"></primer-icon>`;let o=e.length>1;return m`<button ${vt(this.buttonRef)} class=\"network-selector\" @click=${this.toggleDropdown} @keydown=${n=>{(n.key===\" \"||n.key===\"Enter\")&&o&&(n.preventDefault(),this.isDropdownOpen=!this.isDropdownOpen,this.isDropdownOpen&&(this.focusedNetworkIndex=this.getSelectedNetworkIndex()))}} aria-label=${o?`Selected card network: ${r.displayName}. Click to change.`:`Card network: ${r.displayName}`} aria-expanded=${o?this.isDropdownOpen:g} aria-haspopup=${o?\"true\":g} aria-controls=${o?\"network-dropdown\":g} ><img class=\"network-icon\" src=${this.getNetworkIconUrl(r)} alt=${r.displayName} />${k(o,()=>m`<primer-icon class=\"caret ${this.isDropdownOpen?\"open\":\"\"}\" size=\"sm\" name=\"chevron-down\" ></primer-icon>`,()=>g)}</button>${k(this.isDropdownOpen,()=>m`<div ${vt(this.dropdownRef)} id=\"network-dropdown\" class=\"dropdown open\" role=\"listbox\" aria-label=\"Select card network\" >${e.map((n,a)=>m`<div ${vt(s=>this.setNetworkOptionRef(s,a))} class=\"network-option ${this.isKeyboardNavigation&&a===this.focusedNetworkIndex?\"focused\":\"\"}\" @click=${s=>this.selectNetwork(s,n)} @keydown=${s=>{(s.key===\"Enter\"||s.key===\" \")&&this.selectNetwork(s,n)}} role=\"option\" aria-selected=${n.network===r.network} tabindex=\"${a===this.focusedNetworkIndex?\"0\":\"-1\"}\" ><img class=\"network-option-icon\" src=${this.getNetworkIconUrl(n)} alt=${n.displayName} /><span class=\"network-name\">${n.displayName}</span>${k(n.network===r.network,()=>m`<primer-icon class=\"checkmark\" name=\"checkmark\" size=\"sm\" ></primer-icon>`,()=>g)}</div>`)}</div>`,()=>g)} `}}"
|
|
314
314
|
},
|
|
315
315
|
{
|
|
316
316
|
"kind": "variable",
|
|
317
|
-
"name": "
|
|
318
|
-
"default": "class extends v{constructor(){super(...arguments);this.vaultManager=null}render(){if(this.vaultManager?.isLoading)return
|
|
317
|
+
"name": "Ct",
|
|
318
|
+
"default": "class extends v{constructor(){super(...arguments);this.vaultManager=null}render(){if(this.vaultManager?.isLoading)return g;let e=this.vaultManager?.showEmptyState||this.vaultManager?.vaultedPaymentMethods.length;return!this.vaultManager||!this.vaultManager.enabled||!e?m`<slot name=\"other-payments\"></slot>`:m`<div class=\"other-payment-methods-container\"><primer-collapsable buttonVariant=\"secondary\" .expanded=\"${this.vaultManager?.vaultedPaymentMethods.length===0}\" .header=\"${E(\"navigateToPaymentMethods\",{id:\"navigateToPaymentMethods\"})}\" ><div class=\"other-payment-methods-content\"><slot name=\"other-payments\"></slot></div></primer-collapsable></div>`}}"
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
"kind": "variable",
|
|
322
|
-
"name": "
|
|
322
|
+
"name": "Zt",
|
|
323
323
|
"default": "class extends v{render(){return m`<primer-checkout-state type=\"complete\"></primer-checkout-state>`}}"
|
|
324
324
|
},
|
|
325
325
|
{
|
|
326
326
|
"kind": "variable",
|
|
327
|
-
"name": "
|
|
327
|
+
"name": "Ot",
|
|
328
328
|
"default": "class extends v{constructor(){super(...arguments);this.sdkState=null}render(){return m`<primer-checkout-state type=\"failure\" description=${this.sdkState?.primerJsError?.message||\"\"} ></primer-checkout-state>`}}"
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
331
|
"kind": "variable",
|
|
332
|
-
"name": "
|
|
333
|
-
"default": "class extends v{constructor(){super(...arguments);this.showProcessingErrors=!0}get shouldShowError(){return!this.sdkState||this.sdkState.isProcessing?!1:!!(this.sdkState.paymentFailure&&this.showProcessingErrors)}render(){return this.sdkState?m`<primer-error-message message=\"${E(this.sdkState.paymentFailure?.message??\"\",{id:\"tokenizationError\"})}\" ?visible=\"${this.shouldShowError}\" ></primer-error-message>`:
|
|
332
|
+
"name": "st",
|
|
333
|
+
"default": "class extends v{constructor(){super(...arguments);this.showProcessingErrors=!0}get shouldShowError(){return!this.sdkState||this.sdkState.isProcessing?!1:!!(this.sdkState.paymentFailure&&this.showProcessingErrors)}render(){return this.sdkState?m`<primer-error-message message=\"${E(this.sdkState.paymentFailure?.message??\"\",{id:\"tokenizationError\"})}\" ?visible=\"${this.shouldShowError}\" ></primer-error-message>`:g}}"
|
|
334
334
|
},
|
|
335
335
|
{
|
|
336
336
|
"kind": "variable",
|
|
337
|
-
"name": "
|
|
338
|
-
"default": "class extends v{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let o=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=o.length>0,this.requestUpdate()};this.paymentMethods=null;this.sdkState=null;this.clientOptions=null}render(){return this.sdkState?.isSuccessful?m`<slot name=\"checkout-complete\"><primer-checkout-complete></primer-checkout-complete></slot>`:m`<slot name=\"payments\" @slotchange=${this.onSlotChange}></slot>${k(this.hasAssignedContent,()=>
|
|
337
|
+
"name": "qe",
|
|
338
|
+
"default": "class extends v{constructor(){super(...arguments);this.hasAssignedContent=!1;this.onSlotChange=e=>{let o=e.target.assignedNodes({flatten:!0});this.hasAssignedContent=o.length>0,this.requestUpdate()};this.paymentMethods=null;this.sdkState=null;this.clientOptions=null}render(){return this.sdkState?.isSuccessful?m`<slot name=\"checkout-complete\"><primer-checkout-complete></primer-checkout-complete></slot>`:m`<slot name=\"payments\" @slotchange=${this.onSlotChange}></slot>${k(this.hasAssignedContent,()=>g,()=>m`<div class=${ie({\"primer-is-processing\":!!this.sdkState?.isProcessing})} ><primer-vault-manager></primer-vault-manager><primer-show-other-payments><div slot=\"other-payments\" class=\"primer-main-list\">${this.paymentMethods?.toArray().map(e=>m`<primer-payment-method type=${e.type} ?disabled=${this.clientOptions?.disabledPayments===!0} ></primer-payment-method>`)}</div></primer-show-other-payments><primer-error-message-container></primer-error-message-container></div>`)} `}}"
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"kind": "function",
|
|
342
|
-
"name": "
|
|
342
|
+
"name": "nk"
|
|
343
343
|
}
|
|
344
344
|
],
|
|
345
345
|
"exports": [
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
"kind": "js",
|
|
364
364
|
"name": "AchPayment",
|
|
365
365
|
"declaration": {
|
|
366
|
-
"name": "
|
|
366
|
+
"name": "xe",
|
|
367
367
|
"module": "dist/primer-loader.js"
|
|
368
368
|
}
|
|
369
369
|
},
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
"kind": "js",
|
|
372
372
|
"name": "ApplePay",
|
|
373
373
|
"declaration": {
|
|
374
|
-
"name": "
|
|
374
|
+
"name": "Ke",
|
|
375
375
|
"module": "dist/primer-loader.js"
|
|
376
376
|
}
|
|
377
377
|
},
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
"kind": "js",
|
|
380
380
|
"name": "BillingAddress",
|
|
381
381
|
"declaration": {
|
|
382
|
-
"name": "
|
|
382
|
+
"name": "ne",
|
|
383
383
|
"module": "dist/primer-loader.js"
|
|
384
384
|
}
|
|
385
385
|
},
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
"kind": "js",
|
|
388
388
|
"name": "Blik",
|
|
389
389
|
"declaration": {
|
|
390
|
-
"name": "
|
|
390
|
+
"name": "Ee",
|
|
391
391
|
"module": "dist/primer-loader.js"
|
|
392
392
|
}
|
|
393
393
|
},
|
|
@@ -395,7 +395,7 @@
|
|
|
395
395
|
"kind": "js",
|
|
396
396
|
"name": "Button",
|
|
397
397
|
"declaration": {
|
|
398
|
-
"name": "
|
|
398
|
+
"name": "ye",
|
|
399
399
|
"module": "dist/primer-loader.js"
|
|
400
400
|
}
|
|
401
401
|
},
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
"kind": "js",
|
|
404
404
|
"name": "CardForm",
|
|
405
405
|
"declaration": {
|
|
406
|
-
"name": "
|
|
406
|
+
"name": "ee",
|
|
407
407
|
"module": "dist/primer-loader.js"
|
|
408
408
|
}
|
|
409
409
|
},
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
"kind": "js",
|
|
412
412
|
"name": "CardFormCVV",
|
|
413
413
|
"declaration": {
|
|
414
|
-
"name": "
|
|
414
|
+
"name": "ot",
|
|
415
415
|
"module": "dist/primer-loader.js"
|
|
416
416
|
}
|
|
417
417
|
},
|
|
@@ -419,7 +419,7 @@
|
|
|
419
419
|
"kind": "js",
|
|
420
420
|
"name": "CardFormCardNetworkSelector",
|
|
421
421
|
"declaration": {
|
|
422
|
-
"name": "
|
|
422
|
+
"name": "me",
|
|
423
423
|
"module": "dist/primer-loader.js"
|
|
424
424
|
}
|
|
425
425
|
},
|
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
"kind": "js",
|
|
428
428
|
"name": "CardFormCardNumber",
|
|
429
429
|
"declaration": {
|
|
430
|
-
"name": "
|
|
430
|
+
"name": "it",
|
|
431
431
|
"module": "dist/primer-loader.js"
|
|
432
432
|
}
|
|
433
433
|
},
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
"kind": "js",
|
|
436
436
|
"name": "CardFormError",
|
|
437
437
|
"declaration": {
|
|
438
|
-
"name": "
|
|
438
|
+
"name": "et",
|
|
439
439
|
"module": "dist/primer-loader.js"
|
|
440
440
|
}
|
|
441
441
|
},
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
"kind": "js",
|
|
444
444
|
"name": "CardFormExpiry",
|
|
445
445
|
"declaration": {
|
|
446
|
-
"name": "
|
|
446
|
+
"name": "nt",
|
|
447
447
|
"module": "dist/primer-loader.js"
|
|
448
448
|
}
|
|
449
449
|
},
|
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
"kind": "js",
|
|
452
452
|
"name": "CardFormName",
|
|
453
453
|
"declaration": {
|
|
454
|
-
"name": "
|
|
454
|
+
"name": "at",
|
|
455
455
|
"module": "dist/primer-loader.js"
|
|
456
456
|
}
|
|
457
457
|
},
|
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
"kind": "js",
|
|
460
460
|
"name": "CardFormSubmit",
|
|
461
461
|
"declaration": {
|
|
462
|
-
"name": "
|
|
462
|
+
"name": "q",
|
|
463
463
|
"module": "dist/primer-loader.js"
|
|
464
464
|
}
|
|
465
465
|
},
|
|
@@ -467,7 +467,7 @@
|
|
|
467
467
|
"kind": "js",
|
|
468
468
|
"name": "Collapsable",
|
|
469
469
|
"declaration": {
|
|
470
|
-
"name": "
|
|
470
|
+
"name": "be",
|
|
471
471
|
"module": "dist/primer-loader.js"
|
|
472
472
|
}
|
|
473
473
|
},
|
|
@@ -475,7 +475,7 @@
|
|
|
475
475
|
"kind": "js",
|
|
476
476
|
"name": "Dialog",
|
|
477
477
|
"declaration": {
|
|
478
|
-
"name": "
|
|
478
|
+
"name": "Re",
|
|
479
479
|
"module": "dist/primer-loader.js"
|
|
480
480
|
}
|
|
481
481
|
},
|
|
@@ -483,7 +483,7 @@
|
|
|
483
483
|
"kind": "js",
|
|
484
484
|
"name": "DynamicPayment",
|
|
485
485
|
"declaration": {
|
|
486
|
-
"name": "
|
|
486
|
+
"name": "ke",
|
|
487
487
|
"module": "dist/primer-loader.js"
|
|
488
488
|
}
|
|
489
489
|
},
|
|
@@ -491,7 +491,7 @@
|
|
|
491
491
|
"kind": "js",
|
|
492
492
|
"name": "ErrorMessage",
|
|
493
493
|
"declaration": {
|
|
494
|
-
"name": "
|
|
494
|
+
"name": "He",
|
|
495
495
|
"module": "dist/primer-loader.js"
|
|
496
496
|
}
|
|
497
497
|
},
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
"kind": "js",
|
|
500
500
|
"name": "ErrorMessageContainer",
|
|
501
501
|
"declaration": {
|
|
502
|
-
"name": "
|
|
502
|
+
"name": "st",
|
|
503
503
|
"module": "dist/primer-loader.js"
|
|
504
504
|
}
|
|
505
505
|
},
|
|
@@ -507,7 +507,7 @@
|
|
|
507
507
|
"kind": "js",
|
|
508
508
|
"name": "GooglePay",
|
|
509
509
|
"declaration": {
|
|
510
|
-
"name": "
|
|
510
|
+
"name": "ze",
|
|
511
511
|
"module": "dist/primer-loader.js"
|
|
512
512
|
}
|
|
513
513
|
},
|
|
@@ -515,7 +515,7 @@
|
|
|
515
515
|
"kind": "js",
|
|
516
516
|
"name": "InitializedPayments",
|
|
517
517
|
"declaration": {
|
|
518
|
-
"name": "
|
|
518
|
+
"name": "Qr",
|
|
519
519
|
"module": "dist/primer-loader.js"
|
|
520
520
|
}
|
|
521
521
|
},
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
"kind": "js",
|
|
524
524
|
"name": "InitializedVaultedPayments",
|
|
525
525
|
"declaration": {
|
|
526
|
-
"name": "
|
|
526
|
+
"name": "ei",
|
|
527
527
|
"module": "dist/primer-loader.js"
|
|
528
528
|
}
|
|
529
529
|
},
|
|
@@ -531,7 +531,7 @@
|
|
|
531
531
|
"kind": "js",
|
|
532
532
|
"name": "Input",
|
|
533
533
|
"declaration": {
|
|
534
|
-
"name": "
|
|
534
|
+
"name": "F",
|
|
535
535
|
"module": "dist/primer-loader.js"
|
|
536
536
|
}
|
|
537
537
|
},
|
|
@@ -539,7 +539,7 @@
|
|
|
539
539
|
"kind": "js",
|
|
540
540
|
"name": "InputLabel",
|
|
541
541
|
"declaration": {
|
|
542
|
-
"name": "
|
|
542
|
+
"name": "Qe",
|
|
543
543
|
"module": "dist/primer-loader.js"
|
|
544
544
|
}
|
|
545
545
|
},
|
|
@@ -547,7 +547,7 @@
|
|
|
547
547
|
"kind": "js",
|
|
548
548
|
"name": "InputWrapper",
|
|
549
549
|
"declaration": {
|
|
550
|
-
"name": "
|
|
550
|
+
"name": "Be",
|
|
551
551
|
"module": "dist/primer-loader.js"
|
|
552
552
|
}
|
|
553
553
|
},
|
|
@@ -555,7 +555,7 @@
|
|
|
555
555
|
"kind": "js",
|
|
556
556
|
"name": "PayPal",
|
|
557
557
|
"declaration": {
|
|
558
|
-
"name": "
|
|
558
|
+
"name": "Ge",
|
|
559
559
|
"module": "dist/primer-loader.js"
|
|
560
560
|
}
|
|
561
561
|
},
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
"kind": "js",
|
|
564
564
|
"name": "PaymentMethod",
|
|
565
565
|
"declaration": {
|
|
566
|
-
"name": "
|
|
566
|
+
"name": "Oe",
|
|
567
567
|
"module": "dist/primer-loader.js"
|
|
568
568
|
}
|
|
569
569
|
},
|
|
@@ -571,7 +571,7 @@
|
|
|
571
571
|
"kind": "js",
|
|
572
572
|
"name": "PaymentMethodContainer",
|
|
573
573
|
"declaration": {
|
|
574
|
-
"name": "
|
|
574
|
+
"name": "Ie",
|
|
575
575
|
"module": "dist/primer-loader.js"
|
|
576
576
|
}
|
|
577
577
|
},
|
|
@@ -579,7 +579,7 @@
|
|
|
579
579
|
"kind": "js",
|
|
580
580
|
"name": "PaymentMethodContentComponent",
|
|
581
581
|
"declaration": {
|
|
582
|
-
"name": "
|
|
582
|
+
"name": "We",
|
|
583
583
|
"module": "dist/primer-loader.js"
|
|
584
584
|
}
|
|
585
585
|
},
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
"kind": "js",
|
|
588
588
|
"name": "Portal",
|
|
589
589
|
"declaration": {
|
|
590
|
-
"name": "
|
|
590
|
+
"name": "ft",
|
|
591
591
|
"module": "dist/primer-loader.js"
|
|
592
592
|
}
|
|
593
593
|
},
|
|
@@ -595,7 +595,7 @@
|
|
|
595
595
|
"kind": "js",
|
|
596
596
|
"name": "PortalDialog",
|
|
597
597
|
"declaration": {
|
|
598
|
-
"name": "
|
|
598
|
+
"name": "ce",
|
|
599
599
|
"module": "dist/primer-loader.js"
|
|
600
600
|
}
|
|
601
601
|
},
|
|
@@ -603,7 +603,7 @@
|
|
|
603
603
|
"kind": "js",
|
|
604
604
|
"name": "PrimerCheckoutComplete",
|
|
605
605
|
"declaration": {
|
|
606
|
-
"name": "
|
|
606
|
+
"name": "Zt",
|
|
607
607
|
"module": "dist/primer-loader.js"
|
|
608
608
|
}
|
|
609
609
|
},
|
|
@@ -611,7 +611,7 @@
|
|
|
611
611
|
"kind": "js",
|
|
612
612
|
"name": "PrimerCheckoutComponent",
|
|
613
613
|
"declaration": {
|
|
614
|
-
"name": "
|
|
614
|
+
"name": "Pe",
|
|
615
615
|
"module": "dist/primer-loader.js"
|
|
616
616
|
}
|
|
617
617
|
},
|
|
@@ -619,7 +619,7 @@
|
|
|
619
619
|
"kind": "js",
|
|
620
620
|
"name": "PrimerCheckoutFailure",
|
|
621
621
|
"declaration": {
|
|
622
|
-
"name": "
|
|
622
|
+
"name": "Ot",
|
|
623
623
|
"module": "dist/primer-loader.js"
|
|
624
624
|
}
|
|
625
625
|
},
|
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
"kind": "js",
|
|
628
628
|
"name": "PrimerCheckoutState",
|
|
629
629
|
"declaration": {
|
|
630
|
-
"name": "
|
|
630
|
+
"name": "tt",
|
|
631
631
|
"module": "dist/primer-loader.js"
|
|
632
632
|
}
|
|
633
633
|
},
|
|
@@ -635,7 +635,7 @@
|
|
|
635
635
|
"kind": "js",
|
|
636
636
|
"name": "PrimerIcon",
|
|
637
637
|
"declaration": {
|
|
638
|
-
"name": "
|
|
638
|
+
"name": "Fe",
|
|
639
639
|
"module": "dist/primer-loader.js"
|
|
640
640
|
}
|
|
641
641
|
},
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
"kind": "js",
|
|
644
644
|
"name": "PrimerKlarna",
|
|
645
645
|
"declaration": {
|
|
646
|
-
"name": "
|
|
646
|
+
"name": "oe",
|
|
647
647
|
"module": "dist/primer-loader.js"
|
|
648
648
|
}
|
|
649
649
|
},
|
|
@@ -651,7 +651,7 @@
|
|
|
651
651
|
"kind": "js",
|
|
652
652
|
"name": "PrimerMain",
|
|
653
653
|
"declaration": {
|
|
654
|
-
"name": "
|
|
654
|
+
"name": "qe",
|
|
655
655
|
"module": "dist/primer-loader.js"
|
|
656
656
|
}
|
|
657
657
|
},
|
|
@@ -659,7 +659,7 @@
|
|
|
659
659
|
"kind": "js",
|
|
660
660
|
"name": "RedirectPayment",
|
|
661
661
|
"declaration": {
|
|
662
|
-
"name": "
|
|
662
|
+
"name": "Ne",
|
|
663
663
|
"module": "dist/primer-loader.js"
|
|
664
664
|
}
|
|
665
665
|
},
|
|
@@ -667,7 +667,7 @@
|
|
|
667
667
|
"kind": "js",
|
|
668
668
|
"name": "Select",
|
|
669
669
|
"declaration": {
|
|
670
|
-
"name": "
|
|
670
|
+
"name": "ve",
|
|
671
671
|
"module": "dist/primer-loader.js"
|
|
672
672
|
}
|
|
673
673
|
},
|
|
@@ -675,7 +675,7 @@
|
|
|
675
675
|
"kind": "js",
|
|
676
676
|
"name": "ShowOtherPayments",
|
|
677
677
|
"declaration": {
|
|
678
|
-
"name": "
|
|
678
|
+
"name": "Ct",
|
|
679
679
|
"module": "dist/primer-loader.js"
|
|
680
680
|
}
|
|
681
681
|
},
|
|
@@ -683,7 +683,7 @@
|
|
|
683
683
|
"kind": "js",
|
|
684
684
|
"name": "Spinner",
|
|
685
685
|
"declaration": {
|
|
686
|
-
"name": "
|
|
686
|
+
"name": "Ye",
|
|
687
687
|
"module": "dist/primer-loader.js"
|
|
688
688
|
}
|
|
689
689
|
},
|
|
@@ -691,7 +691,7 @@
|
|
|
691
691
|
"kind": "js",
|
|
692
692
|
"name": "VaultCvvInput",
|
|
693
693
|
"declaration": {
|
|
694
|
-
"name": "
|
|
694
|
+
"name": "W",
|
|
695
695
|
"module": "dist/primer-loader.js"
|
|
696
696
|
}
|
|
697
697
|
},
|
|
@@ -699,7 +699,7 @@
|
|
|
699
699
|
"kind": "js",
|
|
700
700
|
"name": "VaultDeleteConfirmation",
|
|
701
701
|
"declaration": {
|
|
702
|
-
"name": "
|
|
702
|
+
"name": "_e",
|
|
703
703
|
"module": "dist/primer-loader.js"
|
|
704
704
|
}
|
|
705
705
|
},
|
|
@@ -707,7 +707,7 @@
|
|
|
707
707
|
"kind": "js",
|
|
708
708
|
"name": "VaultEmptyState",
|
|
709
709
|
"declaration": {
|
|
710
|
-
"name": "
|
|
710
|
+
"name": "rt",
|
|
711
711
|
"module": "dist/primer-loader.js"
|
|
712
712
|
}
|
|
713
713
|
},
|
|
@@ -715,7 +715,7 @@
|
|
|
715
715
|
"kind": "js",
|
|
716
716
|
"name": "VaultErrorMessage",
|
|
717
717
|
"declaration": {
|
|
718
|
-
"name": "
|
|
718
|
+
"name": "je",
|
|
719
719
|
"module": "dist/primer-loader.js"
|
|
720
720
|
}
|
|
721
721
|
},
|
|
@@ -723,7 +723,7 @@
|
|
|
723
723
|
"kind": "js",
|
|
724
724
|
"name": "VaultManager",
|
|
725
725
|
"declaration": {
|
|
726
|
-
"name": "
|
|
726
|
+
"name": "ae",
|
|
727
727
|
"module": "dist/primer-loader.js"
|
|
728
728
|
}
|
|
729
729
|
},
|
|
@@ -731,7 +731,7 @@
|
|
|
731
731
|
"kind": "js",
|
|
732
732
|
"name": "VaultManagerHeader",
|
|
733
733
|
"declaration": {
|
|
734
|
-
"name": "
|
|
734
|
+
"name": "De",
|
|
735
735
|
"module": "dist/primer-loader.js"
|
|
736
736
|
}
|
|
737
737
|
},
|
|
@@ -739,7 +739,7 @@
|
|
|
739
739
|
"kind": "js",
|
|
740
740
|
"name": "VaultPaymentMethodItem",
|
|
741
741
|
"declaration": {
|
|
742
|
-
"name": "
|
|
742
|
+
"name": "Ce",
|
|
743
743
|
"module": "dist/primer-loader.js"
|
|
744
744
|
}
|
|
745
745
|
},
|
|
@@ -747,7 +747,7 @@
|
|
|
747
747
|
"kind": "js",
|
|
748
748
|
"name": "VaultPaymentSubmit",
|
|
749
749
|
"declaration": {
|
|
750
|
-
"name": "
|
|
750
|
+
"name": "Q",
|
|
751
751
|
"module": "dist/primer-loader.js"
|
|
752
752
|
}
|
|
753
753
|
},
|
|
@@ -755,7 +755,7 @@
|
|
|
755
755
|
"kind": "js",
|
|
756
756
|
"name": "injectDarkTheme",
|
|
757
757
|
"declaration": {
|
|
758
|
-
"name": "
|
|
758
|
+
"name": "Bc",
|
|
759
759
|
"module": "dist/primer-loader.js"
|
|
760
760
|
}
|
|
761
761
|
},
|
|
@@ -763,7 +763,7 @@
|
|
|
763
763
|
"kind": "js",
|
|
764
764
|
"name": "injectLightTheme",
|
|
765
765
|
"declaration": {
|
|
766
|
-
"name": "
|
|
766
|
+
"name": "Yc",
|
|
767
767
|
"module": "dist/primer-loader.js"
|
|
768
768
|
}
|
|
769
769
|
},
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
"kind": "js",
|
|
772
772
|
"name": "injectLoaderStyles",
|
|
773
773
|
"declaration": {
|
|
774
|
-
"name": "
|
|
774
|
+
"name": "Wa",
|
|
775
775
|
"module": "dist/primer-loader.js"
|
|
776
776
|
}
|
|
777
777
|
},
|
|
@@ -779,7 +779,7 @@
|
|
|
779
779
|
"kind": "js",
|
|
780
780
|
"name": "injectThemeStyles",
|
|
781
781
|
"declaration": {
|
|
782
|
-
"name": "
|
|
782
|
+
"name": "qa",
|
|
783
783
|
"module": "dist/primer-loader.js"
|
|
784
784
|
}
|
|
785
785
|
},
|
|
@@ -787,7 +787,7 @@
|
|
|
787
787
|
"kind": "js",
|
|
788
788
|
"name": "loadPrimer",
|
|
789
789
|
"declaration": {
|
|
790
|
-
"name": "
|
|
790
|
+
"name": "nk",
|
|
791
791
|
"module": "dist/primer-loader.js"
|
|
792
792
|
}
|
|
793
793
|
}
|