@qonto/embed-sdk 0.64.1 → 0.64.2

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.
Files changed (91) hide show
  1. package/dist/cards/client/cards.client.d.ts +1 -1
  2. package/dist/cards/client/cards.client.d.ts.map +1 -1
  3. package/dist/index.umd.js +81 -81
  4. package/dist/mocks/handlers.d.ts.map +1 -1
  5. package/dist/node_modules/.pnpm/{@lit_reactive-element@2.1.1 → @lit_reactive-element@2.1.2}/node_modules/@lit/reactive-element/decorators/property.js +1 -1
  6. package/dist/node_modules/.pnpm/{@lit_reactive-element@2.1.1 → @lit_reactive-element@2.1.2}/node_modules/@lit/reactive-element/reactive-element.js +1 -1
  7. package/dist/node_modules/.pnpm/{lit-element@4.2.1 → lit-element@4.2.2}/node_modules/lit-element/lit-element.js +2 -2
  8. package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/lit-html.js +1 -1
  9. package/dist/node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js +1 -0
  10. package/dist/server/cards/client/cards.client.d.ts +1 -1
  11. package/dist/server/cards/client/cards.client.d.ts.map +1 -1
  12. package/dist/server/index.server.umd.js +1 -1
  13. package/dist/server/mocks/handlers.d.ts.map +1 -1
  14. package/dist/server/node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js +1 -0
  15. package/dist/server/src/beneficiaries/shared/beneficiaries.api.js +1 -1
  16. package/dist/server/src/sepa-transfers/bulk-transfers/server/bulk-transfers.server.js +1 -1
  17. package/dist/server/src/sepa-transfers/server/sepa-transfers.server.js +1 -1
  18. package/dist/src/beneficiaries/shared/beneficiaries.api.js +1 -1
  19. package/dist/src/cards/client/cards.client.js +1 -1
  20. package/dist/src/cards/shared/cards.serializer.js +1 -1
  21. package/dist/src/iframe/iframe-message-builder.js +1 -1
  22. package/dist/src/sepa-transfers/bulk-transfers/client/bulk-transfers.client.js +1 -1
  23. package/dist/src/sepa-transfers/client/sepa-transfers.client.js +1 -1
  24. package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.js +1 -1
  25. package/dist/src/ui/customizable-components/amount-field/qonto-amount-field.styles.js +1 -1
  26. package/dist/src/ui/customizable-components/badge-status/qonto-badge-status.js +1 -1
  27. package/dist/src/ui/customizable-components/badge-status/qonto-badge-status.styles.js +1 -1
  28. package/dist/src/ui/customizable-components/beneficiary-card/qonto-beneficiary-card.js +1 -1
  29. package/dist/src/ui/customizable-components/beneficiary-card/qonto-beneficiary-card.styles.js +1 -1
  30. package/dist/src/ui/customizable-components/button/qonto-button.js +1 -1
  31. package/dist/src/ui/customizable-components/button/qonto-button.styles.js +1 -1
  32. package/dist/src/ui/customizable-components/icons/icon-checkmark-rounded-filled.js +1 -1
  33. package/dist/src/ui/customizable-components/icons/icon-clock-filled.js +1 -1
  34. package/dist/src/ui/customizable-components/icons/icon-declined.js +1 -1
  35. package/dist/src/ui/customizable-components/icons/icon-error-filled.js +1 -1
  36. package/dist/src/ui/customizable-components/icons/icon-in-progress.js +1 -1
  37. package/dist/src/ui/customizable-components/icons/icon-warning.js +1 -1
  38. package/dist/src/ui/customizable-components/lottie-player/qonto-lottie-player.js +1 -1
  39. package/dist/src/ui/customizable-components/lottie-player/qonto-lottie-player.styles.js +1 -1
  40. package/dist/src/ui/customizable-components/select-field/qonto-option.js +1 -1
  41. package/dist/src/ui/customizable-components/select-field/qonto-select-field.js +1 -1
  42. package/dist/src/ui/customizable-components/select-field/qonto-select-field.styles.js +1 -1
  43. package/dist/src/ui/customizable-components/skeleton-loader/qonto-skeleton-loader-line.js +1 -1
  44. package/dist/src/ui/customizable-components/skeleton-loader/qonto-skeleton-loader-line.styles.js +1 -1
  45. package/dist/src/ui/customizable-components/styles/component-styles/table-styles.js +1 -1
  46. package/dist/src/ui/customizable-components/text/qonto-text-body.js +1 -1
  47. package/dist/src/ui/customizable-components/text/qonto-text-body.styles.js +1 -1
  48. package/dist/src/ui/customizable-components/text/qonto-text-heading.js +1 -1
  49. package/dist/src/ui/customizable-components/text/qonto-text-heading.styles.js +1 -1
  50. package/dist/src/ui/customizable-components/text-field/qonto-text-field.js +1 -1
  51. package/dist/src/ui/customizable-components/text-field/qonto-text-field.styles.js +1 -1
  52. package/dist/src/ui/ui-elements/list-utils/list.utils.js +1 -1
  53. package/dist/src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js +1 -1
  54. package/dist/src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.styles.js +1 -1
  55. package/dist/src/ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.utils.js +1 -1
  56. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.js +1 -1
  57. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.styles.js +1 -1
  58. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/beneficiary-selection-page.utils.js +1 -1
  59. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page.js +1 -1
  60. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-details-page.styles.js +1 -1
  61. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-error-page.js +1 -1
  62. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-error-page.styles.js +1 -1
  63. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-success-page.js +1 -1
  64. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-success-page.styles.js +1 -1
  65. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.js +1 -1
  66. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.styles.js +1 -1
  67. package/dist/src/ui/ui-elements/sepa-transfer-creation/pages/transfer-summary-page.utils.js +1 -1
  68. package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.js +1 -1
  69. package/dist/src/ui/ui-elements/sepa-transfer-creation/sepa-transfer-creation.styles.js +1 -1
  70. package/dist/src/ui/ui-elements/transaction-list/transaction-list.js +1 -1
  71. package/dist/src/ui/ui-elements/transfer-list/transfer-list.js +1 -1
  72. package/package.json +18 -18
  73. package/dist/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +0 -1
  74. package/dist/server/node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js +0 -1
  75. /package/dist/node_modules/.pnpm/{@lit_reactive-element@2.1.1 → @lit_reactive-element@2.1.2}/node_modules/@lit/reactive-element/css-tag.js +0 -0
  76. /package/dist/node_modules/.pnpm/{@lit_reactive-element@2.1.1 → @lit_reactive-element@2.1.2}/node_modules/@lit/reactive-element/decorators/base.js +0 -0
  77. /package/dist/node_modules/.pnpm/{@lit_reactive-element@2.1.1 → @lit_reactive-element@2.1.2}/node_modules/@lit/reactive-element/decorators/custom-element.js +0 -0
  78. /package/dist/node_modules/.pnpm/{@lit_reactive-element@2.1.1 → @lit_reactive-element@2.1.2}/node_modules/@lit/reactive-element/decorators/query.js +0 -0
  79. /package/dist/node_modules/.pnpm/{@lit_reactive-element@2.1.1 → @lit_reactive-element@2.1.2}/node_modules/@lit/reactive-element/decorators/state.js +0 -0
  80. /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/async-directive.js +0 -0
  81. /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/directive-helpers.js +0 -0
  82. /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/directive.js +0 -0
  83. /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/directives/ref.js +0 -0
  84. /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/directives/unsafe-html.js +0 -0
  85. /package/dist/node_modules/.pnpm/{lit-html@3.3.1 → lit-html@3.3.2}/node_modules/lit-html/static.js +0 -0
  86. /package/dist/node_modules/.pnpm/{uuid@11.1.0/node_modules/uuid/dist/esm-browser → uuid@13.0.0/node_modules/uuid/dist}/native.js +0 -0
  87. /package/dist/node_modules/.pnpm/{uuid@11.1.0/node_modules/uuid/dist/esm-browser → uuid@13.0.0/node_modules/uuid/dist}/rng.js +0 -0
  88. /package/dist/node_modules/.pnpm/{uuid@11.1.0/node_modules/uuid/dist/esm-browser → uuid@13.0.0/node_modules/uuid/dist}/stringify.js +0 -0
  89. /package/dist/server/node_modules/.pnpm/{uuid@11.1.0/node_modules/uuid/dist/esm-browser → uuid@13.0.0/node_modules/uuid/dist}/native.js +0 -0
  90. /package/dist/server/node_modules/.pnpm/{uuid@11.1.0/node_modules/uuid/dist/esm-browser → uuid@13.0.0/node_modules/uuid/dist}/rng.js +0 -0
  91. /package/dist/server/node_modules/.pnpm/{uuid@11.1.0/node_modules/uuid/dist/esm-browser → uuid@13.0.0/node_modules/uuid/dist}/stringify.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/mocks/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACtB,MAAM,2CAA2C,CAAC;AAGnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAMhE,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,2CAA2C,CAAC;AAInD,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EAEpB,eAAe,EAEf,8BAA8B,EAC/B,MAAM,4DAA4D,CAAC;AAEpE,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAIrF,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAK3D,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA+BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,sBAchC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,qBAY/B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,qBAAqB,EAe1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,sBAkBpC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,sBAAsB,EAqBrE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,sBAqBxC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,sBAAsB,EAoBrE,CAAC;AAEF,eAAO,MAAM,wBAAwB,iEAC2B,CAAC;AAEjE,eAAO,MAAM,YAAY,EAAE,cAuD1B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,qBA2CzC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA8EzD,CAAC;AAGF,eAAO,MAAM,kCAAkC,WAAW,CAAC;AAE3D,eAAO,MAAM,wBAAwB,EAAE,WAYtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAKtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,8BAKnC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,oBAAoB,CAAC,eAAe,CAI7E,CAAC;AAEJ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;CAiB1C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;CAiB7C,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;CAuBzC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX,eAAO,MAAM,WAAW,6BA26BvB,CAAC"}
1
+ {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/mocks/handlers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACtB,MAAM,2CAA2C,CAAC;AAGnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAMhE,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,2CAA2C,CAAC;AAInD,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EAEpB,eAAe,EAEf,8BAA8B,EAC/B,MAAM,4DAA4D,CAAC;AAEpE,OAAO,KAAK,EAEV,sBAAsB,EACvB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAIrF,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAK3D,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA+BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,sBAchC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,qBAY/B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,qBAAqB,EAe1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,sBAkBpC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,sBAAsB,EAqBrE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,sBAqBxC,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,sBAAsB,EAoBrE,CAAC;AAEF,eAAO,MAAM,wBAAwB,iEAC2B,CAAC;AAEjE,eAAO,MAAM,YAAY,EAAE,cAuD1B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,qBA2CzC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,qBAAqB,EA8EzD,CAAC;AAGF,eAAO,MAAM,kCAAkC,WAAW,CAAC;AAE3D,eAAO,MAAM,wBAAwB,EAAE,WAYtC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,eAKtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,8BAKnC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,oBAAoB,CAAC,eAAe,CAI7E,CAAC;AAEJ,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;CAiB1C,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;CAiB7C,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;CAuBzC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;CAI/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX,eAAO,MAAM,WAAW,6BA67BvB,CAAC"}
@@ -0,0 +1 @@
1
+ import r from"./native.js";import n from"./rng.js";import{unsafeStringify as t}from"./stringify.js";function o(o,m,e){return r.randomUUID?r.randomUUID():function(r){const o=(r=r||{}).random??r.rng?.()??n();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=15&o[6]|64,o[8]=63&o[8]|128,t(o)}(o)}export{o as default};
@@ -1 +1 @@
1
- import{buildPaginationParams as e}from"../../common/api-pagination/api-pagination.js";import{makeNetworkCall as n}from"../../common/network/network.js";import{serializeToNewBeneficiaryDataObject as i}from"./beneficiaries.serializer.js";import a from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";const s="/v2/sepa/beneficiaries";function o({paginationSettings:n,accessToken:i,stagingToken:a}){const o={method:"GET",headers:{accessToken:i,stagingToken:a}},t=e(n),c=t.size?`?${t.toString()}`:"";return{path:`${s}${c}`,options:o}}async function t({paginationSettings:e,accessToken:i,stagingToken:a}){const s=o({paginationSettings:e,accessToken:i,stagingToken:a}),{beneficiaries:t,meta:c}=await n(s);return{beneficiaries:t,meta:c}}function c({beneficiaryId:e,accessToken:n,stagingToken:i}){return{path:`${s}/${e}`,options:{method:"GET",headers:{accessToken:n,stagingToken:i}}}}async function r({accessToken:e,stagingToken:i,beneficiaryId:a}){const s=c({beneficiaryId:a,accessToken:e,stagingToken:i}),{beneficiary:o}=await n(s);return o}function g({beneficiary:e,accessToken:n,stagingToken:o,idempotencyKey:t=a()}){return{path:s,options:{method:"POST",headers:{accessToken:n,stagingToken:o,idempotencyKey:t},body:{beneficiary:i(e)}}}}async function T({beneficiary:e,accessToken:i,stagingToken:s,idempotencyKey:o=a()}){const t=g({beneficiary:e,accessToken:i,stagingToken:s,idempotencyKey:o}),{beneficiary:c}=await n(t);return c}function f({beneficiaryIds:e,accessToken:n,stagingToken:i}){return{path:`${s}/untrust`,options:{method:"PATCH",headers:{accessToken:n,stagingToken:i},body:{ids:e}}}}async function y({beneficiaryIds:e,accessToken:i,stagingToken:a}){const s=f({beneficiaryIds:e,accessToken:i,stagingToken:a}),{beneficiaries:o}=await n(s);return o}function d({beneficiaryParamsBeingEdited:e,accessToken:n,stagingToken:i,idempotencyKey:a,mfaPreference:o}){const{name:t,email:c,activityTag:r}=e,g={method:"PATCH",headers:{accessToken:n,stagingToken:i,idempotencyKey:a,mfaPreference:o},body:{beneficiary:{name:t,email:c,activity_tag:r}}};return{path:`${s}/${e.id}`,options:g}}async function k({beneficiaryParamsBeingEdited:e,accessToken:i,stagingToken:a,idempotencyKey:s,mfaPreference:o}){const t=d({beneficiaryParamsBeingEdited:e,accessToken:i,stagingToken:a,idempotencyKey:s,mfaPreference:o}),{beneficiary:c}=await n(t);return c}export{T as addBeneficiary,t as getBeneficiaries,r as getBeneficiary,g as prepareAddBeneficiaryCall,o as prepareGetBeneficiariesCall,c as prepareGetBeneficiaryCall,f as prepareUntrustBeneficiaryCall,d as prepareUpdateBeneficiaryCall,y as untrustBeneficiaries,k as updateBeneficiary};
1
+ import{buildPaginationParams as e}from"../../common/api-pagination/api-pagination.js";import{makeNetworkCall as n}from"../../common/network/network.js";import{serializeToNewBeneficiaryDataObject as i}from"./beneficiaries.serializer.js";import a from"../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js";const o="/v2/sepa/beneficiaries";function s({paginationSettings:n,accessToken:i,stagingToken:a}){const s={method:"GET",headers:{accessToken:i,stagingToken:a}},t=e(n),c=t.size?`?${t.toString()}`:"";return{path:`${o}${c}`,options:s}}async function t({paginationSettings:e,accessToken:i,stagingToken:a}){const o=s({paginationSettings:e,accessToken:i,stagingToken:a}),{beneficiaries:t,meta:c}=await n(o);return{beneficiaries:t,meta:c}}function c({beneficiaryId:e,accessToken:n,stagingToken:i}){return{path:`${o}/${e}`,options:{method:"GET",headers:{accessToken:n,stagingToken:i}}}}async function r({accessToken:e,stagingToken:i,beneficiaryId:a}){const o=c({beneficiaryId:a,accessToken:e,stagingToken:i}),{beneficiary:s}=await n(o);return s}function g({beneficiary:e,accessToken:n,stagingToken:s,idempotencyKey:t=a()}){return{path:o,options:{method:"POST",headers:{accessToken:n,stagingToken:s,idempotencyKey:t},body:{beneficiary:i(e)}}}}async function T({beneficiary:e,accessToken:i,stagingToken:o,idempotencyKey:s=a()}){const t=g({beneficiary:e,accessToken:i,stagingToken:o,idempotencyKey:s}),{beneficiary:c}=await n(t);return c}function f({beneficiaryIds:e,accessToken:n,stagingToken:i}){return{path:`${o}/untrust`,options:{method:"PATCH",headers:{accessToken:n,stagingToken:i},body:{ids:e}}}}async function y({beneficiaryIds:e,accessToken:i,stagingToken:a}){const o=f({beneficiaryIds:e,accessToken:i,stagingToken:a}),{beneficiaries:s}=await n(o);return s}function d({beneficiaryParamsBeingEdited:e,accessToken:n,stagingToken:i,idempotencyKey:a,mfaPreference:s}){const{name:t,email:c,activityTag:r}=e,g={method:"PATCH",headers:{accessToken:n,stagingToken:i,idempotencyKey:a,mfaPreference:s},body:{beneficiary:{name:t,email:c,activity_tag:r}}};return{path:`${o}/${e.id}`,options:g}}async function k({beneficiaryParamsBeingEdited:e,accessToken:i,stagingToken:a,idempotencyKey:o,mfaPreference:s}){const t=d({beneficiaryParamsBeingEdited:e,accessToken:i,stagingToken:a,idempotencyKey:o,mfaPreference:s}),{beneficiary:c}=await n(t);return c}export{T as addBeneficiary,t as getBeneficiaries,r as getBeneficiary,g as prepareAddBeneficiaryCall,s as prepareGetBeneficiariesCall,c as prepareGetBeneficiaryCall,f as prepareUntrustBeneficiaryCall,d as prepareUpdateBeneficiaryCall,y as untrustBeneficiaries,k as updateBeneficiary};
@@ -1 +1 @@
1
- import{serializePaginationResponse as n}from"../../../common/api-pagination/api-pagination.js";import"../../../common/auth/auth.js";import{validatePresenceOfAuthToken as s}from"../../../common/auth/auth.validate.js";import{VOP_DECISIONS as e}from"../../../common/constants.js";import{verifySepaPayees as a,createBulkTransfer as t,getBulkTransfer as o,getBulkTransfers as r}from"../shared/bulk-transfers.api.js";import{serializeToBulkVopVerificationResult as i,serializeBulkTransfer as c}from"../shared/bulk-transfers.serializer.js";import{validateCreateBulkTransferParams as m,validateBulkTransferParams as u}from"../shared/bulk-transfers.validate.js";import k from"../../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function f(e){const{accessToken:a,stagingToken:t,paginationSettings:o}=e?.operationSettings||{},i=a||s(),m=await r({accessToken:i,stagingToken:t,paginationSettings:o}),u=m.bulkTransfers?.map(c),k=n(m.meta);return{bulkTransfers:u,...k?{meta:k}:{}}}async function T({bulkTransferSettings:n,operationSettings:e}){const a=u(n?.bulkTransferId),{accessToken:t,stagingToken:r}=e||{},i=t||s(),m=await o({accessToken:i,stagingToken:r,bulkTransferId:a});return c(m)}async function*p({bulkTransferSettings:n,operationSettings:o}){const{accessToken:r,stagingToken:u,scaSessionToken:f,idempotencyKey:T}=o||{},p=r||s(),g=T||k(),l=m(n),d=new Map;for(const n of l.bulkTransfers){const s=n.beneficiary;if(s){const n=s.iban;n&&!d.has(n)&&d.set(n,{name:s.name,iban:n})}}const b=Array.from(d.values()),y=await a({sepaPayees:b,accessToken:p,stagingToken:u});if((yield y.requests.map(i))===e.REJECT)return;const S=await t({bulkTransfers:l.bulkTransfers,bankAccountId:l.bankAccountId,accessToken:p,stagingToken:u,scaSessionToken:f,idempotencyKey:g});return{bulkTransfer:c(S),meta:{idempotencyKey:g}}}export{p as createBulkTransfer,T as getBulkTransfer,f as getBulkTransfers};
1
+ import{serializePaginationResponse as n}from"../../../common/api-pagination/api-pagination.js";import"../../../common/auth/auth.js";import{validatePresenceOfAuthToken as s}from"../../../common/auth/auth.validate.js";import{VOP_DECISIONS as e}from"../../../common/constants.js";import{verifySepaPayees as a,createBulkTransfer as t,getBulkTransfer as o,getBulkTransfers as r}from"../shared/bulk-transfers.api.js";import{serializeToBulkVopVerificationResult as i,serializeBulkTransfer as c}from"../shared/bulk-transfers.serializer.js";import{validateCreateBulkTransferParams as m,validateBulkTransferParams as u}from"../shared/bulk-transfers.validate.js";import k from"../../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js";async function f(e){const{accessToken:a,stagingToken:t,paginationSettings:o}=e?.operationSettings||{},i=a||s(),m=await r({accessToken:i,stagingToken:t,paginationSettings:o}),u=m.bulkTransfers?.map(c),k=n(m.meta);return{bulkTransfers:u,...k?{meta:k}:{}}}async function T({bulkTransferSettings:n,operationSettings:e}){const a=u(n?.bulkTransferId),{accessToken:t,stagingToken:r}=e||{},i=t||s(),m=await o({accessToken:i,stagingToken:r,bulkTransferId:a});return c(m)}async function*p({bulkTransferSettings:n,operationSettings:o}){const{accessToken:r,stagingToken:u,scaSessionToken:f,idempotencyKey:T}=o||{},p=r||s(),g=T||k(),l=m(n),d=new Map;for(const n of l.bulkTransfers){const s=n.beneficiary;if(s){const n=s.iban;n&&!d.has(n)&&d.set(n,{name:s.name,iban:n})}}const b=Array.from(d.values()),y=await a({sepaPayees:b,accessToken:p,stagingToken:u});if((yield y.requests.map(i))===e.REJECT)return;const S=await t({bulkTransfers:l.bulkTransfers,bankAccountId:l.bankAccountId,accessToken:p,stagingToken:u,scaSessionToken:f,idempotencyKey:g});return{bulkTransfer:c(S),meta:{idempotencyKey:g}}}export{p as createBulkTransfer,T as getBulkTransfer,f as getBulkTransfers};
@@ -1 +1 @@
1
- import{request as e}from"../../auth-links/auth-links.js";import{serializePaginationResponse as n}from"../../common/api-pagination/api-pagination.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as s}from"../../common/auth/auth.validate.js";import{VOP_DECISIONS as a,AUTH_LINK_ACTIONS as t}from"../../common/constants.js";import{cancelSepaTransfer as o,verifySepaPayee as r,createSepaTransfer as i,getSepaTransfer as c,getSepaTransfers as p}from"../shared/sepa-transfers.api.js";import{serializeToVopVerificationResult as f,serializeSepaTransfer as g}from"../shared/sepa-transfers.serializer.js";import{decorateUrlWithExtraParams as T,findBeneficiary as m}from"../shared/sepa-transfers.utils.js";import{validateGetSepaTransferCreationFlowLinkParams as k,validateCancelSepaTransferParams as u,validateTransferBeneficiaryParams as S,validateCreateSepaTransferParams as d,validateGetSepaTransferParams as l}from"../shared/sepa-transfers.validate.js";import y from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function h(e){const{accessToken:a,stagingToken:t,paginationSettings:o}=e?.operationSettings||{},r=a||s(),i=await p({accessToken:r,stagingToken:t,paginationSettings:o}),c=i.transfers.map(g),f=n(i.meta);return{transfers:c,...f?{meta:f}:{}}}async function j({sepaTransferSettings:e,operationSettings:n}){const a=l(e?.sepaTransferId),{accessToken:t,stagingToken:o}=n||{},r=t||s(),i=await c({sepaTransferId:a,accessToken:r,stagingToken:o});return g(i)}async function w({sepaTransferSettings:e,operationSettings:n}){const a=u(e?.sepaTransferId),{accessToken:t,stagingToken:r}=n||{},i=t||s();await o({sepaTransferId:a,accessToken:i,stagingToken:r})}async function*E({sepaTransferSettings:e,operationSettings:n}){const{accessToken:t,stagingToken:o,scaSessionToken:c,idempotencyKey:p}=n||{},T=t||s(),k=p||y();S(e);const u=e?.beneficiary?e.beneficiary:await m({sepaTransferSettings:e,operationSettings:n}),l={name:u.name,iban:u.iban},h=await r({sepaPayee:l,accessToken:T,stagingToken:o}),j=yield f(h);let w;if("string"==typeof j){if(j===a.REJECT)return}else{if(j.vopDecision===a.REJECT)return;w=j.sepaTransferSettings}const E={...e,...w};d(E);const b={...E,beneficiary:u},v=await i({transfer:b,vopProofToken:h.proof_token.token,accessToken:T,stagingToken:o,scaSessionToken:c,idempotencyKey:k});return{transfer:g(v),meta:{idempotencyKey:k}}}async function b({sepaTransferSettings:n,operationSettings:a}){const o=k(n),{accessToken:r,stagingToken:i}=a||{},c=r||s(),p=await e({requestSettings:{action:t.SEPA_TRANSFER_CREATE,callbackUrl:o},operationSettings:{stagingToken:i,accessToken:c}});return{...p,url:T(p.url,a)}}export{w as cancelSepaTransfer,E as createSepaTransfer,j as getSepaTransfer,b as getSepaTransferCreationFlowLink,h as getSepaTransfers};
1
+ import{request as e}from"../../auth-links/auth-links.js";import{serializePaginationResponse as n}from"../../common/api-pagination/api-pagination.js";import"../../common/auth/auth.js";import{validatePresenceOfAuthToken as s}from"../../common/auth/auth.validate.js";import{VOP_DECISIONS as a,AUTH_LINK_ACTIONS as t}from"../../common/constants.js";import{cancelSepaTransfer as o,verifySepaPayee as r,createSepaTransfer as i,getSepaTransfer as c,getSepaTransfers as p}from"../shared/sepa-transfers.api.js";import{serializeToVopVerificationResult as f,serializeSepaTransfer as g}from"../shared/sepa-transfers.serializer.js";import{decorateUrlWithExtraParams as T,findBeneficiary as m}from"../shared/sepa-transfers.utils.js";import{validateGetSepaTransferCreationFlowLinkParams as k,validateCancelSepaTransferParams as u,validateTransferBeneficiaryParams as S,validateCreateSepaTransferParams as d,validateGetSepaTransferParams as l}from"../shared/sepa-transfers.validate.js";import y from"../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js";async function h(e){const{accessToken:a,stagingToken:t,paginationSettings:o}=e?.operationSettings||{},r=a||s(),i=await p({accessToken:r,stagingToken:t,paginationSettings:o}),c=i.transfers.map(g),f=n(i.meta);return{transfers:c,...f?{meta:f}:{}}}async function j({sepaTransferSettings:e,operationSettings:n}){const a=l(e?.sepaTransferId),{accessToken:t,stagingToken:o}=n||{},r=t||s(),i=await c({sepaTransferId:a,accessToken:r,stagingToken:o});return g(i)}async function E({sepaTransferSettings:e,operationSettings:n}){const a=u(e?.sepaTransferId),{accessToken:t,stagingToken:r}=n||{},i=t||s();await o({sepaTransferId:a,accessToken:i,stagingToken:r})}async function*w({sepaTransferSettings:e,operationSettings:n}){const{accessToken:t,stagingToken:o,scaSessionToken:c,idempotencyKey:p}=n||{},T=t||s(),k=p||y();S(e);const u=e?.beneficiary?e.beneficiary:await m({sepaTransferSettings:e,operationSettings:n}),l={name:u.name,iban:u.iban},h=await r({sepaPayee:l,accessToken:T,stagingToken:o}),j=yield f(h);let E;if("string"==typeof j){if(j===a.REJECT)return}else{if(j.vopDecision===a.REJECT)return;E=j.sepaTransferSettings}const w={...e,...E};d(w);const b={...w,beneficiary:u},v=await i({transfer:b,vopProofToken:h.proof_token.token,accessToken:T,stagingToken:o,scaSessionToken:c,idempotencyKey:k});return{transfer:g(v),meta:{idempotencyKey:k}}}async function b({sepaTransferSettings:n,operationSettings:a}){const o=k(n),{accessToken:r,stagingToken:i}=a||{},c=r||s(),p=await e({requestSettings:{action:t.SEPA_TRANSFER_CREATE,callbackUrl:o},operationSettings:{stagingToken:i,accessToken:c}});return{...p,url:T(p.url,a)}}export{E as cancelSepaTransfer,w as createSepaTransfer,j as getSepaTransfer,b as getSepaTransferCreationFlowLink,h as getSepaTransfers};
@@ -1 +1 @@
1
- import{buildPaginationParams as e}from"../../common/api-pagination/api-pagination.js";import{makeNetworkCall as n}from"../../common/network/network.js";import{serializeToNewBeneficiaryDataObject as i}from"./beneficiaries.serializer.js";import o from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";const a="/v2/sepa/beneficiaries";function t({paginationSettings:n,accessToken:i,stagingToken:o}){const t={method:"GET",headers:{accessToken:i,stagingToken:o}},s=e(n),c=s.size?`?${s.toString()}`:"";return{path:`${a}${c}`,options:t}}async function s({paginationSettings:e,accessToken:i,stagingToken:o}){const a=t({paginationSettings:e,accessToken:i,stagingToken:o}),{beneficiaries:s,meta:c}=await n(a);return{beneficiaries:s,meta:c}}function c({beneficiaryId:e,accessToken:n,stagingToken:i}){return{path:`${a}/${e}`,options:{method:"GET",headers:{accessToken:n,stagingToken:i}}}}async function r({accessToken:e,stagingToken:i,beneficiaryId:o}){const a=c({beneficiaryId:o,accessToken:e,stagingToken:i}),{beneficiary:t}=await n(a);return t}function g({beneficiary:e,accessToken:n,stagingToken:t,idempotencyKey:s=o()}){return{path:a,options:{method:"POST",headers:{accessToken:n,stagingToken:t,idempotencyKey:s},body:{beneficiary:i(e)}}}}function m({beneficiaryIds:e,accessToken:n,stagingToken:i}){return{path:`${a}/untrust`,options:{method:"PATCH",headers:{accessToken:n,stagingToken:i},body:{ids:e}}}}function T({beneficiaryParamsBeingEdited:e,accessToken:n,stagingToken:i,idempotencyKey:o,mfaPreference:t}){const{name:s,email:c,activityTag:r}=e,g={method:"PATCH",headers:{accessToken:n,stagingToken:i,idempotencyKey:o,mfaPreference:t},body:{beneficiary:{name:s,email:c,activity_tag:r}}};return{path:`${a}/${e.id}`,options:g}}export{s as getBeneficiaries,r as getBeneficiary,g as prepareAddBeneficiaryCall,t as prepareGetBeneficiariesCall,c as prepareGetBeneficiaryCall,m as prepareUntrustBeneficiaryCall,T as prepareUpdateBeneficiaryCall};
1
+ import{buildPaginationParams as e}from"../../common/api-pagination/api-pagination.js";import{makeNetworkCall as n}from"../../common/network/network.js";import{serializeToNewBeneficiaryDataObject as i}from"./beneficiaries.serializer.js";import o from"../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js";const a="/v2/sepa/beneficiaries";function t({paginationSettings:n,accessToken:i,stagingToken:o}){const t={method:"GET",headers:{accessToken:i,stagingToken:o}},s=e(n),c=s.size?`?${s.toString()}`:"";return{path:`${a}${c}`,options:t}}async function s({paginationSettings:e,accessToken:i,stagingToken:o}){const a=t({paginationSettings:e,accessToken:i,stagingToken:o}),{beneficiaries:s,meta:c}=await n(a);return{beneficiaries:s,meta:c}}function c({beneficiaryId:e,accessToken:n,stagingToken:i}){return{path:`${a}/${e}`,options:{method:"GET",headers:{accessToken:n,stagingToken:i}}}}async function r({accessToken:e,stagingToken:i,beneficiaryId:o}){const a=c({beneficiaryId:o,accessToken:e,stagingToken:i}),{beneficiary:t}=await n(a);return t}function g({beneficiary:e,accessToken:n,stagingToken:t,idempotencyKey:s=o()}){return{path:a,options:{method:"POST",headers:{accessToken:n,stagingToken:t,idempotencyKey:s},body:{beneficiary:i(e)}}}}function T({beneficiaryIds:e,accessToken:n,stagingToken:i}){return{path:`${a}/untrust`,options:{method:"PATCH",headers:{accessToken:n,stagingToken:i},body:{ids:e}}}}function m({beneficiaryParamsBeingEdited:e,accessToken:n,stagingToken:i,idempotencyKey:o,mfaPreference:t}){const{name:s,email:c,activityTag:r}=e,g={method:"PATCH",headers:{accessToken:n,stagingToken:i,idempotencyKey:o,mfaPreference:t},body:{beneficiary:{name:s,email:c,activity_tag:r}}};return{path:`${a}/${e.id}`,options:g}}export{s as getBeneficiaries,r as getBeneficiary,g as prepareAddBeneficiaryCall,t as prepareGetBeneficiariesCall,c as prepareGetBeneficiaryCall,T as prepareUntrustBeneficiaryCall,m as prepareUpdateBeneficiaryCall};
@@ -1 +1 @@
1
- import{tracker as e}from"../../common/analytics/analytics-tracker.js";import{authManager as r}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../../common/auth/auth.validate.js";import{callProxyFunction as n}from"../../common/common.utils.js";import{validateClientOperationSettings as o}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as i}from"../../errors/InvalidParametersError.js";import{buildIframeUrl as s,createIframe as a}from"../../iframe/iframe-manager.js";import{prepareGetCardIframeUrl as d,prepareGetCardCall as c,prepareGetCardsCall as p}from"../shared/cards.api.js";import{createEmbedUI as m}from"../shared/cards.helper.js";import{serializeUnlockCardPayload as g,serializeCard as u,serializeOrderCardPayload as l}from"../shared/cards.serializer.js";import{validateDisplayCardParams as y,validateUnlockCardParams as f,validateOrderCardParams as k,validateGetCardParams as h}from"../shared/cards.validate.js";async function w(r){e.cardsList();const t=r?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new i("membershipId must be a string");const{proxyRequestFunction:s,proxyEndpointDescriptor:a,stagingToken:d}=o(r?.operationSettings,'Client-side card operations require either proxyEndpointDescriptor or proxyRequestFunction. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),c=p({membershipId:t,stagingToken:d});return(await n({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards.map((e=>u(e)))}async function b({cardSettings:r,operationSettings:t}){e.cardsGet(),h(r);const s=r.cardId,{proxyRequestFunction:a,proxyEndpointDescriptor:d,stagingToken:p}=o(t,'Client-side card operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),m=c({cardId:s,stagingToken:p}),g=(await n({proxyFunction:a,proxyEndpointDescriptor:d,networkCallDescriptor:m})).body.cards;if(Array.isArray(g)&&g.length>0)return u(g[0]);throw new i("Unable to retrieve card data")}async function x(n){e.cardsOrder();const o=t(),{uiParentElementId:d,debugMode:c}=n.operationSettings;if(!d)throw new i("uiParentElementId is required");k(n.cardSettings);const p=s({accessToken:o,stagingToken:r.getStagingToken()||void 0,debugMode:c}),m=await a({iframeUrl:p,parentElementId:d}),g=l(n.cardSettings),y=await m.postMessage(g);return m.destroy(),u(y)}async function E(n){e.cardsUnlock();const o=t(),{uiParentElementId:d,debugMode:c}=n.operationSettings;if(!d)throw new i("uiParentElementId is required");f(n.cardSettings);const p=s({accessToken:o,stagingToken:r.getStagingToken()||void 0,debugMode:c}),m=await a({iframeUrl:p,parentElementId:d}),l=g(n),y=await m.postMessage(l);return m.destroy(),u(y)}async function I(r){e.cardsDisplay();const{uiParentElementId:o,accessToken:s,stagingToken:a,debugMode:c,mfaPreference:p,proxyRequestFunction:g,proxyEndpointDescriptor:u}=r.operationSettings;if(!o)throw new i("uiParentElementId is required");if(y(r.cardSettings),g||u){const e=d({stagingToken:a}),t=(await n({proxyFunction:g,proxyEndpointDescriptor:u,networkCallDescriptor:e})).body.embed_auth_link;return m({decorationParams:r.cardSettings,operationSettings:{uiParentElementId:o,debugMode:c},cardIframeUrl:t.url})}{const e=s||t(),{getCardIframeURL:n}=await import("../shared/cards.api.js"),i=await n({...r.cardSettings,accessToken:e,stagingToken:a});return m({decorationParams:r.cardSettings,operationSettings:{uiParentElementId:o,debugMode:c},cardIframeUrl:i.url})}}export{I as displayCard,b as getCard,w as getCards,x as orderCard,E as unlockCard};
1
+ import{tracker as e}from"../../common/analytics/analytics-tracker.js";import{authManager as r}from"../../common/auth/auth.js";import{validatePresenceOfAuthToken as t}from"../../common/auth/auth.validate.js";import{callProxyFunction as n}from"../../common/common.utils.js";import{validateOperationSettingsParams as o,validateClientOperationSettings as i}from"../../validation/operation-settings-validation.js";import{InvalidParametersError as s}from"../../errors/InvalidParametersError.js";import{buildIframeUrl as a,createIframe as d}from"../../iframe/iframe-manager.js";import{prepareGetCardIframeUrl as c,prepareGetCardCall as p,prepareGetCardsCall as m}from"../shared/cards.api.js";import{createEmbedUI as u}from"../shared/cards.helper.js";import{serializeUnlockCardPayload as g,serializeCard as l,serializeOrderCardPayload as y}from"../shared/cards.serializer.js";import{validateDisplayCardParams as f,validateUnlockCardParams as k,validateOrderCardParams as h,validateGetCardParams as w}from"../shared/cards.validate.js";async function b(r){e.cardsList();const t=r?.cardSettings?.membershipId;if(t&&"string"!=typeof t)throw new s("membershipId must be a string");const{proxyRequestFunction:o,proxyEndpointDescriptor:a,stagingToken:d}=i(r?.operationSettings,'Client-side card operations require either proxyEndpointDescriptor or proxyRequestFunction. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),c=m({membershipId:t,stagingToken:d});return(await n({proxyFunction:o,proxyEndpointDescriptor:a,networkCallDescriptor:c})).body.cards.map((e=>l(e)))}async function I({cardSettings:r,operationSettings:t}){e.cardsGet(),w(r);const o=r.cardId,{proxyRequestFunction:a,proxyEndpointDescriptor:d,stagingToken:c}=i(t,'Client-side card operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/cards/server" only in server-side/backend environments.'),m=p({cardId:o,stagingToken:c}),u=(await n({proxyFunction:a,proxyEndpointDescriptor:d,networkCallDescriptor:m})).body.cards;if(Array.isArray(u)&&u.length>0)return l(u[0]);throw new s("Unable to retrieve card data")}async function x(n){e.cardsOrder();const o=t(),{uiParentElementId:i,debugMode:c}=n.operationSettings;if(!i)throw new s("uiParentElementId is required");h(n.cardSettings);const p=a({accessToken:o,stagingToken:r.getStagingToken()||void 0,debugMode:c}),m=await d({iframeUrl:p,parentElementId:i}),u=y(n.cardSettings),g=await m.postMessage(u);return m.destroy(),l(g)}async function E(n){e.cardsUnlock();const o=t(),{uiParentElementId:i,debugMode:c}=n.operationSettings;if(!i)throw new s("uiParentElementId is required");k(n.cardSettings);const p=a({accessToken:o,stagingToken:r.getStagingToken()||void 0,debugMode:c}),m=await d({iframeUrl:p,parentElementId:i}),u=g(n),y=await m.postMessage(u);return m.destroy(),l(y)}async function S(r){e.cardsDisplay();const{uiParentElementId:i,accessToken:a,stagingToken:d,debugMode:p,mfaPreference:m,proxyRequestFunction:g,proxyEndpointDescriptor:l}=o(r.operationSettings,{requiresUI:!0});if(!i)throw new s("uiParentElementId is required");if(f(r.cardSettings),g||l){const e=c({stagingToken:d}),t=(await n({proxyFunction:g,proxyEndpointDescriptor:l,networkCallDescriptor:e})).body.embed_auth_link;return u({decorationParams:r.cardSettings,operationSettings:{uiParentElementId:i,debugMode:p},cardIframeUrl:t.url})}{const e=a||t(),{getCardIframeURL:n}=await import("../shared/cards.api.js"),o=await n({...r.cardSettings,accessToken:e,stagingToken:d});return u({decorationParams:r.cardSettings,operationSettings:{uiParentElementId:i,debugMode:p},cardIframeUrl:o.url})}}export{S as displayCard,I as getCard,b as getCards,x as orderCard,E as unlockCard};
@@ -1 +1 @@
1
- import{isVirtualCardOrderSettings as t}from"./cards.helper.js";import{ACTIONS as i}from"../../common/constants.js";import{CardCategories as a}from"./cards.types.js";import n from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";function e(a){return t(a)?function(t){const a=s(t.categories);return{actionId:i.CARD_ORDER,actionData:{idempotencyKey:n(),body:{card:{payment_monthly_limit:t.monthlyLimit,payment_daily_limit:t.dailyLimit,payment_daily_limit_option:t.hasDailyLimit,payment_transaction_limit:t.transactionLimit,payment_transaction_limit_option:t.hasTransactionLimit,active_days:t.activeDays||[],holder_id:t.membershipId,organization_id:t.organizationId,bank_account_id:t.bankAccountId,categories:a,card_level:t.cardLevel}}}}}(a):function(t){const a=s(t.categories);return{actionId:i.CARD_ORDER,actionData:{idempotencyKey:n(),body:{card:{payment_monthly_limit:t.monthlyLimit,payment_daily_limit:t.dailyLimit,payment_daily_limit_option:t.hasDailyLimit,payment_transaction_limit:t.transactionLimit,payment_transaction_limit_option:t.hasTransactionLimit,active_days:t.activeDays||[],holder_id:t.membershipId,organization_id:t.organizationId,bank_account_id:t.bankAccountId,categories:a,card_level:t.cardLevel,card_design:t.cardDesign,..."plus"===t.cardLevel&&{type_of_print:t.typeOfPrint},ship_to_business_address:t.shipToBusiness,atm_option:t.hasAtmOption,nfc_option:t.hasNfcOption,foreign_option:t.hasForeignPaymentOption,online_option:t.hasOnlinePaymentOption,atm_daily_limit:t.atmDailyLimit,atm_monthly_limit:t.atmMonthlyLimit,...!t.shipToBusiness&&{address:{contact_name:t.address?.contactName,first_line:t.address?.firstLine,second_line:t.address?.secondLine,third_line:t.address?.thirdLine,zipcode:t.address?.zipCode,city:t.address?.city,country:t.address?.country}}}}}}}(a)}function o(t){return{id:t.id,nickname:t.nickname,embossedName:t.embossed_name,status:t.status,maskPan:t.mask_pan,expMonth:parseInt(t.exp_month,10),expYear:parseInt(t.exp_year,10),lastActivityAt:new Date(t.last_activity_at),lastDigits:t.last_digits,shipToBusiness:t.ship_to_business,atmOption:t.atm_option,atmDailyLimitOption:t.atm_daily_limit_option,nfcOption:t.nfc_option,onlineOption:t.online_option,foreignOption:t.foreign_option,atmMonthlyLimit:t.atm_monthly_limit,atmMonthlySpent:t.atm_monthly_spent,atmDailyLimit:t.atm_daily_limit,atmDailySpent:t.atm_daily_spent,paymentMonthlyLimit:t.payment_monthly_limit,paymentMonthlySpent:t.payment_monthly_spent,paymentDailyLimit:t.payment_daily_limit,paymentDailySpent:t.payment_daily_spent,paymentDailyLimitOption:t.payment_daily_limit_option,paymentTransactionLimit:t.payment_transaction_limit,paymentTransactionLimitOption:t.payment_transaction_limit_option,activeDays:t.active_days,holderId:t.holder_id,bankAccountId:t.bank_account_id,organizationId:t.organization_id,updatedAt:new Date(t.updated_at),createdAt:new Date(t.created_at),shippedAt:new Date(t.shipped_at),cardType:t.card_type,cardLevel:t.card_level,paymentLifespanLimit:t.payment_lifespan_limit,paymentLifespanSpent:t.payment_lifespan_spent,preExpiresAt:new Date(t.pre_expires_at),categories:t.categories,renewed:t.renewed,renewal:t.renewal,...t.parent_card_summary&&{parentCardSummary:{id:t.parent_card_summary.id,lastDigits:t.parent_card_summary.last_digits}},hadOperation:t.had_operation,hadPinOperation:t.had_pin_operation,cardDesign:t.card_design,typeOfPrint:t.type_of_print,upsold:t.upsold,upsell:t.upsell,discardOn:new Date(t.discard_on),reordered:t.reordered}}function s(t){const i=Object.values(a);return(t||[]).filter((t=>i.includes(t)))}function d(t){return{actionId:i.CARD_UNLOCK,actionData:{body:{cardId:t.cardSettings.cardId}}}}export{s as filterValidCategories,o as serializeCard,e as serializeOrderCardPayload,d as serializeUnlockCardPayload};
1
+ import{isVirtualCardOrderSettings as t}from"./cards.helper.js";import{ACTIONS as i}from"../../common/constants.js";import{CardCategories as a}from"./cards.types.js";import n from"../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js";function e(a){return t(a)?function(t){const a=s(t.categories);return{actionId:i.CARD_ORDER,actionData:{idempotencyKey:n(),body:{card:{payment_monthly_limit:t.monthlyLimit,payment_daily_limit:t.dailyLimit,payment_daily_limit_option:t.hasDailyLimit,payment_transaction_limit:t.transactionLimit,payment_transaction_limit_option:t.hasTransactionLimit,active_days:t.activeDays||[],holder_id:t.membershipId,organization_id:t.organizationId,bank_account_id:t.bankAccountId,categories:a,card_level:t.cardLevel}}}}}(a):function(t){const a=s(t.categories);return{actionId:i.CARD_ORDER,actionData:{idempotencyKey:n(),body:{card:{payment_monthly_limit:t.monthlyLimit,payment_daily_limit:t.dailyLimit,payment_daily_limit_option:t.hasDailyLimit,payment_transaction_limit:t.transactionLimit,payment_transaction_limit_option:t.hasTransactionLimit,active_days:t.activeDays||[],holder_id:t.membershipId,organization_id:t.organizationId,bank_account_id:t.bankAccountId,categories:a,card_level:t.cardLevel,card_design:t.cardDesign,..."plus"===t.cardLevel&&{type_of_print:t.typeOfPrint},ship_to_business_address:t.shipToBusiness,atm_option:t.hasAtmOption,nfc_option:t.hasNfcOption,foreign_option:t.hasForeignPaymentOption,online_option:t.hasOnlinePaymentOption,atm_daily_limit:t.atmDailyLimit,atm_monthly_limit:t.atmMonthlyLimit,...!t.shipToBusiness&&{address:{contact_name:t.address?.contactName,first_line:t.address?.firstLine,second_line:t.address?.secondLine,third_line:t.address?.thirdLine,zipcode:t.address?.zipCode,city:t.address?.city,country:t.address?.country}}}}}}}(a)}function o(t){return{id:t.id,nickname:t.nickname,embossedName:t.embossed_name,status:t.status,maskPan:t.mask_pan,expMonth:parseInt(t.exp_month,10),expYear:parseInt(t.exp_year,10),lastActivityAt:new Date(t.last_activity_at),lastDigits:t.last_digits,shipToBusiness:t.ship_to_business,atmOption:t.atm_option,atmDailyLimitOption:t.atm_daily_limit_option,nfcOption:t.nfc_option,onlineOption:t.online_option,foreignOption:t.foreign_option,atmMonthlyLimit:t.atm_monthly_limit,atmMonthlySpent:t.atm_monthly_spent,atmDailyLimit:t.atm_daily_limit,atmDailySpent:t.atm_daily_spent,paymentMonthlyLimit:t.payment_monthly_limit,paymentMonthlySpent:t.payment_monthly_spent,paymentDailyLimit:t.payment_daily_limit,paymentDailySpent:t.payment_daily_spent,paymentDailyLimitOption:t.payment_daily_limit_option,paymentTransactionLimit:t.payment_transaction_limit,paymentTransactionLimitOption:t.payment_transaction_limit_option,activeDays:t.active_days,holderId:t.holder_id,bankAccountId:t.bank_account_id,organizationId:t.organization_id,updatedAt:new Date(t.updated_at),createdAt:new Date(t.created_at),shippedAt:new Date(t.shipped_at),cardType:t.card_type,cardLevel:t.card_level,paymentLifespanLimit:t.payment_lifespan_limit,paymentLifespanSpent:t.payment_lifespan_spent,preExpiresAt:new Date(t.pre_expires_at),categories:t.categories,renewed:t.renewed,renewal:t.renewal,...t.parent_card_summary&&{parentCardSummary:{id:t.parent_card_summary.id,lastDigits:t.parent_card_summary.last_digits}},hadOperation:t.had_operation,hadPinOperation:t.had_pin_operation,cardDesign:t.card_design,typeOfPrint:t.type_of_print,upsold:t.upsold,upsell:t.upsell,discardOn:new Date(t.discard_on),reordered:t.reordered}}function s(t){const i=Object.values(a);return(t||[]).filter((t=>i.includes(t)))}function d(t){return{actionId:i.CARD_UNLOCK,actionData:{body:{cardId:t.cardSettings.cardId}}}}export{s as filterValidCategories,o as serializeCard,e as serializeOrderCardPayload,d as serializeUnlockCardPayload};
@@ -1 +1 @@
1
- import{operationSettingsManager as e}from"../common/operation-settings/operation-settings.js";import o from"../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";function t({actionId:t,actionData:n}){const r=e.getMFAPreference();return{actionId:t,actionData:{...n,scaPreference:n.scaPreference||r,idempotencyKey:n.idempotencyKey||o()}}}export{t as buildIframeMessage};
1
+ import{operationSettingsManager as e}from"../common/operation-settings/operation-settings.js";import o from"../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js";function t({actionId:t,actionData:n}){const i=e.getMFAPreference();return{actionId:t,actionData:{...n,scaPreference:n.scaPreference||i,idempotencyKey:n.idempotencyKey||o()}}}export{t as buildIframeMessage};
@@ -1 +1 @@
1
- import{tracker as e}from"../../../common/analytics/analytics-tracker.js";import{serializePaginationResponse as r}from"../../../common/api-pagination/api-pagination.js";import{authManager as n}from"../../../common/auth/auth.js";import{callProxyFunction as o}from"../../../common/common.utils.js";import{VOP_DECISIONS as t}from"../../../common/constants.js";import{isRunningInBrowser as s}from"../../../common/runtime/runtime.validation.js";import{validateClientOperationSettings as i}from"../../../validation/operation-settings-validation.js";import{InvalidRuntimeError as a,RUNTIME_ENVIRONMENT as p}from"../../../errors/InvalidRuntimeError.js";import{prepareCreateBulkTransferCall as c,prepareGetBulkTransferCall as u,prepareGetBulkTransfersCall as m,prepareVerifySepaPayeesCall as d}from"../shared/bulk-transfers.api.js";import{serializeToBulkVopVerificationResult as y,serializeBulkTransfer as l}from"../shared/bulk-transfers.serializer.js";import{validateCreateBulkTransferParams as f,validateBulkTransferParams as b}from"../shared/bulk-transfers.validate.js";import k from"../../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function x(n){e.sepaTransferBulkList();const{proxyRequestFunction:t,proxyEndpointDescriptor:s,paginationSettings:a}=i(n?.operationSettings,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.'),p=m({paginationSettings:a}),c=await o({proxyFunction:t,proxyEndpointDescriptor:s,networkCallDescriptor:p}),u=c.body.bulk_transfers.map(l),d=r(c.body.meta);return{bulkTransfers:u,...d?{meta:d}:{}}}async function v({bulkTransferSettings:r,operationSettings:n}){e.sepaTransferBulkGet();const t=b(r?.bulkTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:a}=i(n,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.'),p=u({bulkTransferId:t}),c=await o({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:p});return l(c.body.bulk_transfer)}async function*g({bulkTransferSettings:r,operationSettings:u}){e.sepaTransferBulkCreate();const{proxyRequestFunction:m,proxyEndpointDescriptor:b}=i(u,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.');if(!s())throw new a(p.BROWSER);const x=n.getStagingToken(),v=u?.idempotencyKey||k();f(r);const g=new Map;for(const e of r.bulkTransfers){const r=e.beneficiary.iban;r&&!g.has(r)&&g.set(r,{name:e.beneficiary.name,iban:r})}const w=Array.from(g.values()),D=await async function({sepaPayees:e,proxyRequestFunction:r,proxyEndpointDescriptor:n}){const t=d({sepaPayees:e});return(await o({proxyFunction:r,proxyEndpointDescriptor:n,networkCallDescriptor:t})).body}({sepaPayees:w,proxyRequestFunction:m,proxyEndpointDescriptor:b});if((yield D.requests.map(y))===t.REJECT)return;const E=c({bulkTransfers:r.bulkTransfers,bankAccountId:r.bankAccountId,stagingToken:x||void 0,idempotencyKey:v}),q=(await o({proxyFunction:m,proxyEndpointDescriptor:b,networkCallDescriptor:E})).body.bulk_transfer;return{bulkTransfer:l(q),meta:{idempotencyKey:v}}}export{g as createBulkTransfer,v as getBulkTransfer,x as getBulkTransfers};
1
+ import{tracker as e}from"../../../common/analytics/analytics-tracker.js";import{serializePaginationResponse as r}from"../../../common/api-pagination/api-pagination.js";import{authManager as n}from"../../../common/auth/auth.js";import{callProxyFunction as o}from"../../../common/common.utils.js";import{VOP_DECISIONS as t}from"../../../common/constants.js";import{isRunningInBrowser as s}from"../../../common/runtime/runtime.validation.js";import{validateClientOperationSettings as i}from"../../../validation/operation-settings-validation.js";import{InvalidRuntimeError as a,RUNTIME_ENVIRONMENT as p}from"../../../errors/InvalidRuntimeError.js";import{prepareCreateBulkTransferCall as c,prepareGetBulkTransferCall as u,prepareGetBulkTransfersCall as m,prepareVerifySepaPayeesCall as d}from"../shared/bulk-transfers.api.js";import{serializeToBulkVopVerificationResult as y,serializeBulkTransfer as l}from"../shared/bulk-transfers.serializer.js";import{validateCreateBulkTransferParams as f,validateBulkTransferParams as k}from"../shared/bulk-transfers.validate.js";import b from"../../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js";async function x(n){e.sepaTransferBulkList();const{proxyRequestFunction:t,proxyEndpointDescriptor:s,paginationSettings:a}=i(n?.operationSettings,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.'),p=m({paginationSettings:a}),c=await o({proxyFunction:t,proxyEndpointDescriptor:s,networkCallDescriptor:p}),u=c.body.bulk_transfers.map(l),d=r(c.body.meta);return{bulkTransfers:u,...d?{meta:d}:{}}}async function v({bulkTransferSettings:r,operationSettings:n}){e.sepaTransferBulkGet();const t=k(r?.bulkTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:a}=i(n,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.'),p=u({bulkTransferId:t}),c=await o({proxyFunction:s,proxyEndpointDescriptor:a,networkCallDescriptor:p});return l(c.body.bulk_transfer)}async function*g({bulkTransferSettings:r,operationSettings:u}){e.sepaTransferBulkCreate();const{proxyRequestFunction:m,proxyEndpointDescriptor:k}=i(u,'Client-side bulk transfer operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/bulk-transfers/server" only in server-side/backend environments.');if(!s())throw new a(p.BROWSER);const x=n.getStagingToken(),v=u?.idempotencyKey||b();f(r);const g=new Map;for(const e of r.bulkTransfers){const r=e.beneficiary.iban;r&&!g.has(r)&&g.set(r,{name:e.beneficiary.name,iban:r})}const D=Array.from(g.values()),E=await async function({sepaPayees:e,proxyRequestFunction:r,proxyEndpointDescriptor:n}){const t=d({sepaPayees:e});return(await o({proxyFunction:r,proxyEndpointDescriptor:n,networkCallDescriptor:t})).body}({sepaPayees:D,proxyRequestFunction:m,proxyEndpointDescriptor:k});if((yield E.requests.map(y))===t.REJECT)return;const q=c({bulkTransfers:r.bulkTransfers,bankAccountId:r.bankAccountId,stagingToken:x||void 0,idempotencyKey:v}),w=(await o({proxyFunction:m,proxyEndpointDescriptor:k,networkCallDescriptor:q})).body.bulk_transfer;return{bulkTransfer:l(w),meta:{idempotencyKey:v}}}export{g as createBulkTransfer,v as getBulkTransfer,x as getBulkTransfers};
@@ -1 +1 @@
1
- import{authLinks as e}from"../../auth-links/index.js";import{tracker as r}from"../../common/analytics/analytics-tracker.js";import{serializePaginationResponse as o}from"../../common/api-pagination/api-pagination.js";import{authManager as n}from"../../common/auth/auth.js";import{callProxyFunction as t}from"../../common/common.utils.js";import{VOP_DECISIONS as s,HTTP_CODES as i,AUTH_LINK_ACTIONS as a}from"../../common/constants.js";import{isRunningInBrowser as p}from"../../common/runtime/runtime.validation.js";import{validateClientOperationSettings as c}from"../../validation/operation-settings-validation.js";import{EmbedApiError as d}from"../../errors/EmbedApiError.js";import{InvalidParametersError as m}from"../../errors/InvalidParametersError.js";import{InvalidRuntimeError as u,RUNTIME_ENVIRONMENT as y}from"../../errors/InvalidRuntimeError.js";import{serializePreconditionRequiredResponse as f}from"../../sca/sca.serializer.js";import{prepareCreateSepaTransferCall as l,prepareCancelSepaTransferCall as x,prepareGetSepaTransferCall as k,prepareGetSepaTransfersCall as E,prepareVerifySepaPayeeCall as g}from"../shared/sepa-transfers.api.js";import{serializeToVopVerificationResult as v,serializeSepaTransfer as b}from"../shared/sepa-transfers.serializer.js";import{findBeneficiary as w,createSepaTransferScaElement as q,waitForSepaTransferScaResult as D,decorateUrlWithExtraParams as S}from"../shared/sepa-transfers.utils.js";import{validateTransferBeneficiaryParams as T,validateCreateSepaTransferParams as F,validateGetSepaTransferCreationFlowLinkParams as R,validateCancelSepaTransferParams as h,validateGetSepaTransferParams as C}from"../shared/sepa-transfers.validate.js";import"../../ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js";import j from"../../../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js";async function I(e){r.sepaTransferList();const{proxyRequestFunction:n,proxyEndpointDescriptor:s,paginationSettings:i}=c(e?.operationSettings,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=E({paginationSettings:i}),p=await t({proxyFunction:n,proxyEndpointDescriptor:s,networkCallDescriptor:a}),d=p.body.transfers.map(b),m=o(p.body.meta);return{transfers:d,...m?{meta:m}:{}}}async function P({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferGet();const n=C(e?.sepaTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(o,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=k({sepaTransferId:n}),p=await t({proxyFunction:s,proxyEndpointDescriptor:i,networkCallDescriptor:a});return b(p.body.transfer)}async function*U({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferCreate();const{proxyRequestFunction:a,proxyEndpointDescriptor:x,uiParentElementId:k,locale:E}=c(o),S=n.getStagingToken(),R=o?.idempotencyKey||j();let h;T(e);const C=await w({sepaTransferSettings:e,operationSettings:o}),I={name:C.name,iban:C.iban},P=await async function({sepaPayee:e,operationSettings:r}){const{proxyRequestFunction:o,proxyEndpointDescriptor:n}=c(r,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),s=g({sepaPayee:e}),i=await t({proxyFunction:o,proxyEndpointDescriptor:n,networkCallDescriptor:s});return i.body}({sepaPayee:I,operationSettings:o}),U=yield v(P);let _;if("string"==typeof U){if(U===s.REJECT)return}else{if(U.vopDecision===s.REJECT)return;_=U.sepaTransferSettings}const A={...e,..._};F(A);const K={...A,beneficiary:C};if(K.beneficiary?.trusted){const e=l({transfer:K,vopProofToken:P.proof_token.token,idempotencyKey:R});h=(await t({proxyFunction:a,proxyEndpointDescriptor:x,networkCallDescriptor:e})).body.transfer}else{if(!p())throw new u(y.BROWSER);if(!k)throw new m("operationSettings.uiParentElementId is required for creating transfers to untrusted beneficiaries. This operation requires UI interaction for SCA.");const e=l({transfer:K,vopProofToken:P.proof_token.token,stagingToken:S||void 0,idempotencyKey:R});let r;try{h=(await t({proxyFunction:a,proxyEndpointDescriptor:x,networkCallDescriptor:e})).body.transfer}catch(e){if(!(e instanceof d&&e.code===i.PRECONDITION_REQUIRED))throw e;r=f(e.data.body).scaSessionToken}const o=q({networkCallDescriptor:e,scaSessionToken:r,operationSettings:{uiParentElementId:k,proxyRequestFunction:a,locale:E}});try{h=await D(o)}finally{o.remove()}}return{transfer:b(h),meta:{idempotencyKey:R}}}async function _({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferCancel();const n=h(e?.sepaTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(o,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=x({sepaTransferId:n});await t({proxyFunction:s,proxyEndpointDescriptor:i,networkCallDescriptor:a})}async function A({sepaTransferSettings:o,operationSettings:n}){r.sepaTransferCreationFlowLink();const t=R(o),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(n,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),p=await e.request({requestSettings:{action:a.SEPA_TRANSFER_CREATE,callbackUrl:t},operationSettings:{proxyRequestFunction:s,proxyEndpointDescriptor:i}});return{...p,url:S(p.url,n)}}export{_ as cancelSepaTransfer,U as createSepaTransfer,P as getSepaTransfer,A as getSepaTransferCreationFlowLink,I as getSepaTransfers};
1
+ import{authLinks as e}from"../../auth-links/index.js";import{tracker as r}from"../../common/analytics/analytics-tracker.js";import{serializePaginationResponse as o}from"../../common/api-pagination/api-pagination.js";import{authManager as n}from"../../common/auth/auth.js";import{callProxyFunction as t}from"../../common/common.utils.js";import{VOP_DECISIONS as s,HTTP_CODES as i,AUTH_LINK_ACTIONS as a}from"../../common/constants.js";import{isRunningInBrowser as p}from"../../common/runtime/runtime.validation.js";import{validateClientOperationSettings as c}from"../../validation/operation-settings-validation.js";import{EmbedApiError as d}from"../../errors/EmbedApiError.js";import{InvalidParametersError as u}from"../../errors/InvalidParametersError.js";import{InvalidRuntimeError as m,RUNTIME_ENVIRONMENT as y}from"../../errors/InvalidRuntimeError.js";import{serializePreconditionRequiredResponse as f}from"../../sca/sca.serializer.js";import{prepareCreateSepaTransferCall as l,prepareCancelSepaTransferCall as x,prepareGetSepaTransferCall as k,prepareGetSepaTransfersCall as E,prepareVerifySepaPayeeCall as g}from"../shared/sepa-transfers.api.js";import{serializeToVopVerificationResult as v,serializeSepaTransfer as b}from"../shared/sepa-transfers.serializer.js";import{findBeneficiary as w,createSepaTransferScaElement as q,waitForSepaTransferScaResult as D,decorateUrlWithExtraParams as S}from"../shared/sepa-transfers.utils.js";import{validateTransferBeneficiaryParams as T,validateCreateSepaTransferParams as F,validateGetSepaTransferCreationFlowLinkParams as R,validateCancelSepaTransferParams as h,validateGetSepaTransferParams as C}from"../shared/sepa-transfers.validate.js";import"../../ui/ui-elements/sca-passkey/qonto-sca-passkey-waiting.js";import j from"../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist/v4.js";async function I(e){r.sepaTransferList();const{proxyRequestFunction:n,proxyEndpointDescriptor:s,paginationSettings:i}=c(e?.operationSettings,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=E({paginationSettings:i}),p=await t({proxyFunction:n,proxyEndpointDescriptor:s,networkCallDescriptor:a}),d=p.body.transfers.map(b),u=o(p.body.meta);return{transfers:d,...u?{meta:u}:{}}}async function P({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferGet();const n=C(e?.sepaTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(o,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=k({sepaTransferId:n}),p=await t({proxyFunction:s,proxyEndpointDescriptor:i,networkCallDescriptor:a});return b(p.body.transfer)}async function*U({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferCreate();const{proxyRequestFunction:a,proxyEndpointDescriptor:x,uiParentElementId:k,locale:E}=c(o),S=n.getStagingToken(),R=o?.idempotencyKey||j();let h;T(e);const C=await w({sepaTransferSettings:e,operationSettings:o}),I={name:C.name,iban:C.iban},P=await async function({sepaPayee:e,operationSettings:r}){const{proxyRequestFunction:o,proxyEndpointDescriptor:n}=c(r,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),s=g({sepaPayee:e}),i=await t({proxyFunction:o,proxyEndpointDescriptor:n,networkCallDescriptor:s});return i.body}({sepaPayee:I,operationSettings:o}),U=yield v(P);let _;if("string"==typeof U){if(U===s.REJECT)return}else{if(U.vopDecision===s.REJECT)return;_=U.sepaTransferSettings}const A={...e,..._};F(A);const K={...A,beneficiary:C};if(K.beneficiary?.trusted){const e=l({transfer:K,vopProofToken:P.proof_token.token,idempotencyKey:R});h=(await t({proxyFunction:a,proxyEndpointDescriptor:x,networkCallDescriptor:e})).body.transfer}else{if(!p())throw new m(y.BROWSER);if(!k)throw new u("operationSettings.uiParentElementId is required for creating transfers to untrusted beneficiaries. This operation requires UI interaction for SCA.");const e=l({transfer:K,vopProofToken:P.proof_token.token,stagingToken:S||void 0,idempotencyKey:R});let r;try{h=(await t({proxyFunction:a,proxyEndpointDescriptor:x,networkCallDescriptor:e})).body.transfer}catch(e){if(!(e instanceof d&&e.code===i.PRECONDITION_REQUIRED))throw e;r=f(e.data.body).scaSessionToken}const o=q({networkCallDescriptor:e,scaSessionToken:r,operationSettings:{uiParentElementId:k,proxyRequestFunction:a,locale:E}});try{h=await D(o)}finally{o.remove()}}return{transfer:b(h),meta:{idempotencyKey:R}}}async function _({sepaTransferSettings:e,operationSettings:o}){r.sepaTransferCancel();const n=h(e?.sepaTransferId),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(o,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),a=x({sepaTransferId:n});await t({proxyFunction:s,proxyEndpointDescriptor:i,networkCallDescriptor:a})}async function A({sepaTransferSettings:o,operationSettings:n}){r.sepaTransferCreationFlowLink();const t=R(o),{proxyRequestFunction:s,proxyEndpointDescriptor:i}=c(n,'Client-side operations require either proxyRequestFunction or proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use "@qonto/embed-sdk/sepa-transfers/server" only in server-side/backend environments.'),p=await e.request({requestSettings:{action:a.SEPA_TRANSFER_CREATE,callbackUrl:t},operationSettings:{proxyRequestFunction:s,proxyEndpointDescriptor:i}});return{...p,url:S(p.url,n)}}export{_ as cancelSepaTransfer,U as createSepaTransfer,P as getSepaTransfer,A as getSepaTransferCreationFlowLink,I as getSepaTransfers};
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as s}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{qontoAmountFieldStyles as o}from"./qonto-amount-field.styles.js";import{formatAmount as r,parseAmount as d}from"./qonto-amount-field.utils.js";import"../styles/styles.css.js";let u=class extends s{constructor(){super(...arguments),this.id="",this.label="",this.currency="EUR",this.placeholder="0.00",this.disabled=!1,this.locale="en",this._value=0,this.error=!1,this.errorMessage="",this.displayValue="",this.isFocused=!1,this.decimalPlaces=2}get value(){return this._value}set value(e){const t="number"==typeof e?e:Number(e);this._value=isNaN(t)?0:t,this.requestUpdate("value")}get hasValue(){return 0!==this.value}get hasError(){return this.error||this.errorMessage.length>0}connectedCallback(){super.connectedCallback(),this.updateDisplayValue()}updated(e){(e.has("value")||e.has("locale"))&&this.updateDisplayValue()}updateDisplayValue(){this.isFocused||(this.displayValue=r(this.value,this.locale,this.decimalPlaces))}showRawValueForEditing(){this.displayValue=0===this.value?"":this.value.toFixed(this.decimalPlaces)}handleFocus(){this.isFocused=!0,this.showRawValueForEditing()}handleBlur(){this.isFocused=!1,this.updateDisplayValue()}handleInput(e){const t=e.target.value;this.value=d(t),this.displayValue=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}handleChange(e){const t=e.target.value;this.value=d(t),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}render(){return t`
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as s}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js";import{qontoAmountFieldStyles as o}from"./qonto-amount-field.styles.js";import{formatAmount as r,parseAmount as d}from"./qonto-amount-field.utils.js";import"../styles/styles.css.js";let u=class extends s{constructor(){super(...arguments),this.id="",this.label="",this.currency="EUR",this.placeholder="0.00",this.disabled=!1,this.locale="en",this._value=0,this.error=!1,this.errorMessage="",this.displayValue="",this.isFocused=!1,this.decimalPlaces=2}get value(){return this._value}set value(e){const t="number"==typeof e?e:Number(e);this._value=isNaN(t)?0:t,this.requestUpdate("value")}get hasValue(){return 0!==this.value}get hasError(){return this.error||this.errorMessage.length>0}connectedCallback(){super.connectedCallback(),this.updateDisplayValue()}updated(e){(e.has("value")||e.has("locale"))&&this.updateDisplayValue()}updateDisplayValue(){this.isFocused||(this.displayValue=r(this.value,this.locale,this.decimalPlaces))}showRawValueForEditing(){this.displayValue=0===this.value?"":this.value.toFixed(this.decimalPlaces)}handleFocus(){this.isFocused=!0,this.showRawValueForEditing()}handleBlur(){this.isFocused=!1,this.updateDisplayValue()}handleInput(e){const t=e.target.value;this.value=d(t),this.displayValue=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:this.value},bubbles:!0,composed:!0}))}handleChange(e){const t=e.target.value;this.value=d(t),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}render(){return t`
2
2
  <div data-amount-field-wrapper data-error="${this.hasError}">
3
3
  ${this.label?t`<label data-label for=${this.id}>${this.label}</label>`:null}
4
4
  <div data-field>
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const e=o`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const e=o`
2
2
  :host {
3
3
  font-family: var(--qonto-embed-font-family);
4
4
 
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import"../styles/styles.css.js";import{qontoBadgeStatusStyles as s}from"./qonto-badge-status.styles.js";import{iconCheckmarkRoundedFilled as r}from"../icons/icon-checkmark-rounded-filled.js";import{iconClockFilled as n}from"../icons/icon-clock-filled.js";import{iconDeclined as m}from"../icons/icon-declined.js";import{iconErrorFilled as d}from"../icons/icon-error-filled.js";import{iconInProgress as p}from"../icons/icon-in-progress.js";import{iconWarning as c}from"../icons/icon-warning.js";const a={ERROR:"error",INACTIVE:"inactive",IN_PROGRESS:"in-progress",VALIDATED:"validated",WAITING:"waiting",DECLINED:"declined"},u={error:d,inactive:null,"in-progress":p,validated:r,waiting:n,warning:c,declined:m};let _=class extends o{constructor(){super(...arguments),this.level="waiting"}render(){return t`<span data-level="${this.level}">
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import"../styles/styles.css.js";import{qontoBadgeStatusStyles as s}from"./qonto-badge-status.styles.js";import{iconCheckmarkRoundedFilled as r}from"../icons/icon-checkmark-rounded-filled.js";import{iconClockFilled as n}from"../icons/icon-clock-filled.js";import{iconDeclined as m}from"../icons/icon-declined.js";import{iconErrorFilled as d}from"../icons/icon-error-filled.js";import{iconInProgress as p}from"../icons/icon-in-progress.js";import{iconWarning as c}from"../icons/icon-warning.js";const a={ERROR:"error",INACTIVE:"inactive",IN_PROGRESS:"in-progress",VALIDATED:"validated",WAITING:"waiting",DECLINED:"declined"},u={error:d,inactive:null,"in-progress":p,validated:r,waiting:n,warning:c,declined:m};let _=class extends o{constructor(){super(...arguments),this.level="waiting"}render(){return t`<span data-level="${this.level}">
2
2
  ${u[this.level]}
3
3
  <slot></slot>
4
4
  </span>`}};_.styles=s,e([i({type:String})],_.prototype,"level",void 0),_=e([l("qonto-badge-status")],_);export{a as BADGE_LEVELS,_ as QontoBadgeStatus};
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const e=o`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const e=o`
2
2
  span {
3
3
  --badge-border: 1px solid var(--border-tertiary);
4
4
  --badge-default-font-color: var(
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as r}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{query as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";import{formatIBAN as l}from"../../ui-elements/sepa-transfer-creation/sepa-transfer-creation.utils.js";import{qontoBeneficiaryCardStyles as m}from"./qonto-beneficiary-card.styles.js";import"../styles/styles.css.js";let a=class extends o{constructor(){super(...arguments),this.beneficiaryName="",this.iban="",this.currency="",this.hasFooterContent=!1}checkSlotContent(){if(!this.footerSlot)return;const e=this.footerSlot.assignedElements({flatten:!0});this.hasFooterContent=e.length>0}firstUpdated(){this.checkSlotContent()}render(){return t` <div class="card" ?data-has-footer=${this.hasFooterContent}>
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{state as r}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js";import{query as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/query.js";import{formatIBAN as l}from"../../ui-elements/sepa-transfer-creation/sepa-transfer-creation.utils.js";import{qontoBeneficiaryCardStyles as m}from"./qonto-beneficiary-card.styles.js";import"../styles/styles.css.js";let a=class extends o{constructor(){super(...arguments),this.beneficiaryName="",this.iban="",this.currency="",this.hasFooterContent=!1}checkSlotContent(){if(!this.footerSlot)return;const e=this.footerSlot.assignedElements({flatten:!0});this.hasFooterContent=e.length>0}firstUpdated(){this.checkSlotContent()}render(){return t` <div class="card" ?data-has-footer=${this.hasFooterContent}>
2
2
  <div class="content">
3
3
  <div class="beneficiary-info">
4
4
  <div class="beneficiary-name">${this.beneficiaryName}</div>
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const r=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const r=e`
2
2
  :host {
3
3
  --bg-color: var(
4
4
  --qonto-embed-beneficiary-card-background-color,
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{qontoButtonStyles as m}from"./qonto-button.styles.js";import"../styles/styles.css.js";let i=class extends o{constructor(){super(...arguments),this.variant="primary",this.disabled=!1}render(){return t`<button
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{qontoButtonStyles as m}from"./qonto-button.styles.js";import"../styles/styles.css.js";let i=class extends o{constructor(){super(...arguments),this.variant="primary",this.disabled=!1}render(){return t`<button
2
2
  data-variant="${this.variant}"
3
3
  .disabled=${this.disabled}
4
4
  >
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const r=o`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const r=o`
2
2
  button {
3
3
  --focus-outline-color: var(--border-accent-low);
4
4
  --bg-color: var(--qonto-embed-color-primary, var(--background-primary));
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";const l=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";const l=e`
2
2
  <svg
3
3
  fill="none"
4
4
  viewBox="0 0 12 12"
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";const l=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";const l=e`
2
2
  <svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden=true>
3
3
  <path
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";const t=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";const t=e`
2
2
  <svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" aria-hidden=true>
3
3
  <path
4
4
  d="M0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8Z"
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";const l=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";const l=e`
2
2
  <svg fill="none" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden=true>
3
3
  <path
4
4
  clip-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";const l=e`<svg
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";const l=e`<svg
2
2
  fill="none"
3
3
  viewBox="0 0 12 12"
4
4
  xmlns="http://www.w3.org/2000/svg"
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";const l=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{svg as e}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";const l=e`
2
2
  <svg
3
3
  fill="none"
4
4
  viewBox="0 0 12 12"
@@ -1 +1 @@
1
- import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as e}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as i}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{createRef as a,ref as s}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/ref.js";import l from"../../../../_virtual/lottie.js";import{qontoLottiePlayerStyles as m}from"./qonto-lottie-player.styles.js";import"../styles/styles.css.js";let r=class extends i{constructor(){super(...arguments),this.containerRef=a()}firstUpdated(){this.loadAnimation()}updated(t){t.has("animationData")&&this.loadAnimation()}disconnectedCallback(){super.disconnectedCallback(),this.destroyAnimation()}loadAnimation(){this.containerRef.value&&(this.destroyAnimation(),this.animationData&&this.renderAnimation(this.animationData))}renderAnimation(t){this.containerRef.value&&(this.animation=l.loadAnimation({container:this.containerRef.value,renderer:"svg",loop:!0,autoplay:!0,animationData:t}))}destroyAnimation(){this.animation&&(this.animation.destroy(),this.animation=void 0)}render(){return e`<div ${s(this.containerRef)} data-lottie-container></div>`}};r.styles=m,t([n({type:Object})],r.prototype,"animationData",void 0),r=t([o("qonto-lottie-player")],r);export{r as QontoLottiePlayer};
1
+ import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as e}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as i}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{createRef as a,ref as s}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/ref.js";import l from"../../../../_virtual/lottie.js";import{qontoLottiePlayerStyles as m}from"./qonto-lottie-player.styles.js";import"../styles/styles.css.js";let r=class extends i{constructor(){super(...arguments),this.containerRef=a()}firstUpdated(){this.loadAnimation()}updated(t){t.has("animationData")&&this.loadAnimation()}disconnectedCallback(){super.disconnectedCallback(),this.destroyAnimation()}loadAnimation(){this.containerRef.value&&(this.destroyAnimation(),this.animationData&&this.renderAnimation(this.animationData))}renderAnimation(t){this.containerRef.value&&(this.animation=l.loadAnimation({container:this.containerRef.value,renderer:"svg",loop:!0,autoplay:!0,animationData:t}))}destroyAnimation(){this.animation&&(this.animation.destroy(),this.animation=void 0)}render(){return e`<div ${s(this.containerRef)} data-lottie-container></div>`}};r.styles=m,t([n({type:Object})],r.prototype,"animationData",void 0),r=t([o("qonto-lottie-player")],r);export{r as QontoLottiePlayer};
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const t=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const t=e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{css as m}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";let i=class extends o{constructor(){super(...arguments),this.value="",this.disabled=!1,this.selected=!1,this.focused=!1}render(){return t`<slot></slot>`}};i.styles=m`
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{css as m}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";let i=class extends o{constructor(){super(...arguments),this.value="",this.disabled=!1,this.selected=!1,this.focused=!1}render(){return t`<slot></slot>`}};i.styles=m`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{query as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";import"./qonto-option.js";import{qontoSelectFieldStyles as d}from"./qonto-select-field.styles.js";import"../styles/styles.css.js";let r=class extends o{constructor(){super(...arguments),this.id=crypto.randomUUID(),this.label="",this.placeholder="Select an option",this.value="",this.disabled=!1,this.error=!1,this.errorMessage="",this.readonly=!1,this.isOpen=!1,this.focusedIndex=-1,this.optionElements=[],this.handleClickOutside=e=>{const t=e.target;this.contains(t)||this.closeDropdown()}}get hasError(){return this.error||this.errorMessage.length>0}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleClickOutside)}firstUpdated(){this.handleSlotChange();const e=this.shadowRoot?.querySelector("[data-trigger]");e&&e.addEventListener("click",(e=>{this.toggleDropdown(e)}),!0)}handleSlotChange(){this.optionElements=Array.from(this.querySelectorAll("qonto-option")),this.updateOptionStates()}updateOptionStates(){this.optionElements.forEach(((e,t)=>{e.selected=e.value===this.value,e.focused=t===this.focusedIndex}))}scrollFocusedOptionIntoView(){if(this.focusedIndex<0||this.focusedIndex>=this.optionElements.length)return;const e=this.optionElements[this.focusedIndex];e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}updated(e){super.updated(e),(e.has("value")||e.has("focusedIndex"))&&(this.updateOptionStates(),e.has("focusedIndex")&&this.isOpen&&requestAnimationFrame((()=>{this.scrollFocusedOptionIntoView()})))}toggleDropdown(e){if(!this.disabled&&!this.readonly)if(e&&(e.stopPropagation(),e.preventDefault()),this.isOpen=!this.isOpen,this.isOpen){const e=this.optionElements.findIndex((e=>e.value===this.value));this.focusedIndex=e>=0?e:0}else this.focusedIndex=-1}closeDropdown(){this.isOpen=!1,this.focusedIndex=-1}selectOption(e){this.disabled||this.readonly||e.disabled||(this.value=e.value,this.closeDropdown(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})))}handleKeyDown(e){if(!this.disabled&&!this.readonly)switch(e.key){case"Enter":case" ":e.preventDefault(),this.isOpen?this.focusedIndex>=0&&this.focusedIndex<this.optionElements.length&&this.selectOption(this.optionElements[this.focusedIndex]):this.toggleDropdown();break;case"Escape":e.preventDefault(),this.closeDropdown(),this.triggerElement?.focus();break;case"ArrowDown":e.preventDefault(),this.isOpen?this.focusedIndex=Math.min(this.focusedIndex+1,this.optionElements.length-1):this.toggleDropdown();break;case"ArrowUp":e.preventDefault(),this.isOpen&&(this.focusedIndex=Math.max(this.focusedIndex-1,0));break;case"Home":e.preventDefault(),this.isOpen&&(this.focusedIndex=0);break;case"End":e.preventDefault(),this.isOpen&&(this.focusedIndex=this.optionElements.length-1)}}renderSelectedDisplay(){const e=this.optionElements.find((e=>e.value===this.value));if(e){const o=e.cloneNode(!0);return o.removeAttribute("data-focused"),t`<div data-selected-content part="selected-content">
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{state as n}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js";import{query as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/query.js";import"./qonto-option.js";import{qontoSelectFieldStyles as d}from"./qonto-select-field.styles.js";import"../styles/styles.css.js";let r=class extends o{constructor(){super(...arguments),this.id=crypto.randomUUID(),this.label="",this.placeholder="Select an option",this.value="",this.disabled=!1,this.error=!1,this.errorMessage="",this.readonly=!1,this.isOpen=!1,this.focusedIndex=-1,this.optionElements=[],this.handleClickOutside=e=>{const t=e.target;this.contains(t)||this.closeDropdown()}}get hasError(){return this.error||this.errorMessage.length>0}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.handleClickOutside)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.handleClickOutside)}firstUpdated(){this.handleSlotChange();const e=this.shadowRoot?.querySelector("[data-trigger]");e&&e.addEventListener("click",(e=>{this.toggleDropdown(e)}),!0)}handleSlotChange(){this.optionElements=Array.from(this.querySelectorAll("qonto-option")),this.updateOptionStates()}updateOptionStates(){this.optionElements.forEach(((e,t)=>{e.selected=e.value===this.value,e.focused=t===this.focusedIndex}))}scrollFocusedOptionIntoView(){if(this.focusedIndex<0||this.focusedIndex>=this.optionElements.length)return;const e=this.optionElements[this.focusedIndex];e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}updated(e){super.updated(e),(e.has("value")||e.has("focusedIndex"))&&(this.updateOptionStates(),e.has("focusedIndex")&&this.isOpen&&requestAnimationFrame((()=>{this.scrollFocusedOptionIntoView()})))}toggleDropdown(e){if(!this.disabled&&!this.readonly)if(e&&(e.stopPropagation(),e.preventDefault()),this.isOpen=!this.isOpen,this.isOpen){const e=this.optionElements.findIndex((e=>e.value===this.value));this.focusedIndex=e>=0?e:0}else this.focusedIndex=-1}closeDropdown(){this.isOpen=!1,this.focusedIndex=-1}selectOption(e){this.disabled||this.readonly||e.disabled||(this.value=e.value,this.closeDropdown(),this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})))}handleKeyDown(e){if(!this.disabled&&!this.readonly)switch(e.key){case"Enter":case" ":e.preventDefault(),this.isOpen?this.focusedIndex>=0&&this.focusedIndex<this.optionElements.length&&this.selectOption(this.optionElements[this.focusedIndex]):this.toggleDropdown();break;case"Escape":e.preventDefault(),this.closeDropdown(),this.triggerElement?.focus();break;case"ArrowDown":e.preventDefault(),this.isOpen?this.focusedIndex=Math.min(this.focusedIndex+1,this.optionElements.length-1):this.toggleDropdown();break;case"ArrowUp":e.preventDefault(),this.isOpen&&(this.focusedIndex=Math.max(this.focusedIndex-1,0));break;case"Home":e.preventDefault(),this.isOpen&&(this.focusedIndex=0);break;case"End":e.preventDefault(),this.isOpen&&(this.focusedIndex=this.optionElements.length-1)}}renderSelectedDisplay(){const e=this.optionElements.find((e=>e.value===this.value));if(e){const o=e.cloneNode(!0);return o.removeAttribute("data-focused"),t`<div data-selected-content part="selected-content">
2
2
  ${Array.from(o.childNodes).map((e=>t`${e.cloneNode(!0)}`))}
3
3
  </div>`}return t`<span data-placeholder part="placeholder"
4
4
  >${this.placeholder}</span
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const o=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const o=e`
2
2
  :host {
3
3
  font-family: var(--qonto-embed-font-family);
4
4
 
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{qontoSkeletonLoaderLineStyles as i}from"./qonto-skeleton-loader-line.styles.js";import"../styles/styles.css.js";let r=class extends o{constructor(){super(...arguments),this.standalone=!1}render(){return t`<div
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as o}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as s}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{qontoSkeletonLoaderLineStyles as i}from"./qonto-skeleton-loader-line.styles.js";import"../styles/styles.css.js";let r=class extends o{constructor(){super(...arguments),this.standalone=!1}render(){return t`<div
2
2
  class="skeleton-line"
3
3
  style="
4
4
  ${this.width?`width: ${this.width};`:""}
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const o=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const o=e`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -1,4 +1,4 @@
1
- import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const o=e`
1
+ import"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const o=e`
2
2
  :host {
3
3
  --default-table-border: 1px solid var(--border-tertiary);
4
4
 
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as l}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{qontoTextBodyStyles as r}from"./qonto-text-body.styles.js";let s=class extends l{constructor(){super(...arguments),this.variant="primary",this.displayLevel="body"}render(){return t`<p
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as l}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{qontoTextBodyStyles as r}from"./qonto-text-body.styles.js";let s=class extends l{constructor(){super(...arguments),this.variant="primary",this.displayLevel="body"}render(){return t`<p
2
2
  data-variant=${this.variant}
3
3
  data-display-level=${this.displayLevel}
4
4
  >
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const t=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const t=e`
2
2
  p {
3
3
  margin: 0;
4
4
  font-size: var(--qonto-embed-content-font-size, var(--body-1-font-size));
@@ -1 +1 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as t}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{unsafeStatic as m,html as s}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/static.js";import{qontoTextHeadingStyles as n}from"./qonto-text-heading.styles.js";let i=class extends t{constructor(){super(...arguments),this.level=1}willUpdate(e){var t;e.has("level")&&("number"==typeof(t=this.level)&&t>=1&&t<=6||(console.warn("Invalid level property was received by qonto-text-heading, defaulting to level=1"),this.level=1))}render(){const e=`h${this.level}`;return s`<${m(e)}><slot></slot></${m(e)}>`}};i.styles=n,e([o({type:Number})],i.prototype,"level",void 0),i=e([l("qonto-text-heading")],i);export{i as QontoTextHeading};
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as t}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as o}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{unsafeStatic as m,html as s}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/static.js";import{qontoTextHeadingStyles as n}from"./qonto-text-heading.styles.js";let i=class extends t{constructor(){super(...arguments),this.level=1}willUpdate(e){var t;e.has("level")&&("number"==typeof(t=this.level)&&t>=1&&t<=6||(console.warn("Invalid level property was received by qonto-text-heading, defaulting to level=1"),this.level=1))}render(){const e=`h${this.level}`;return s`<${m(e)}><slot></slot></${m(e)}>`}};i.styles=n,e([o({type:Number})],i.prototype,"level",void 0),i=e([l("qonto-text-heading")],i);export{i as QontoTextHeading};
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const t=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const t=e`
2
2
  :is(h1, h2, h3, h4, h5, h6) {
3
3
  --heading-line-height: var(
4
4
  --qonto-embed-content-line-height,
@@ -1,4 +1,4 @@
1
- import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as r}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{qontoTextFieldStyles as o}from"./qonto-text-field.styles.js";import"../styles/styles.css.js";let s=class extends r{constructor(){super(...arguments),this.id="",this.label="",this.placeholder="Placeholder",this.value="",this.disabled=!1,this.error=!1,this.errorMessage=""}get hasError(){return this.error||this.errorMessage.length>0}handleInput(e){const t=e.target;this.value=t.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}render(){return t`
1
+ import{__decorate as e}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as t}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as r}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{qontoTextFieldStyles as o}from"./qonto-text-field.styles.js";import"../styles/styles.css.js";let s=class extends r{constructor(){super(...arguments),this.id="",this.label="",this.placeholder="Placeholder",this.value="",this.disabled=!1,this.error=!1,this.errorMessage=""}get hasError(){return this.error||this.errorMessage.length>0}handleInput(e){const t=e.target;this.value=t.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0}))}render(){return t`
2
2
  <div data-text-field-wrapper data-error="${this.hasError}">
3
3
  ${this.label?t`<label data-label data-hidden=${!this.label} for=${this.id}
4
4
  >${this.label}</label
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/css-tag.js";const o=e`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{css as e}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/css-tag.js";const o=e`
2
2
  :host {
3
3
  font-family: var(--qonto-embed-font-family);
4
4
 
@@ -1 +1 @@
1
- import"../../customizable-components/skeleton-loader/qonto-skeleton-loader-line.js";import{unsafeHTML as o}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/unsafe-html.js";function e(e=3){const n=Array.from({length:e},(()=>'\n <tr>\n <td><qonto-skeleton-loader-line width="80px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="120px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="150px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="100px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="60px"></qonto-skeleton-loader-line></td>\n </tr>\n ')).join("");return o(n)}export{e as renderLoadingTableRowsMarkup};
1
+ import"../../customizable-components/skeleton-loader/qonto-skeleton-loader-line.js";import{unsafeHTML as o}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/directives/unsafe-html.js";function e(e=3){const n=Array.from({length:e},(()=>'\n <tr>\n <td><qonto-skeleton-loader-line width="80px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="120px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="150px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="100px"></qonto-skeleton-loader-line></td>\n <td><qonto-skeleton-loader-line width="60px"></qonto-skeleton-loader-line></td>\n </tr>\n ')).join("");return o(n)}export{e as renderLoadingTableRowsMarkup};
@@ -1,4 +1,4 @@
1
- import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{str as e}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/str-tag.js";import{msg as o}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as i}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";import{html as n}from"../../../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";import{LitElement as s}from"../../../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as r}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";import{callProxyFunction as p}from"../../../common/common.utils.js";import{environmentManager as m}from"../../../common/environment/environment-manager.js";import{makeNetworkCall as c}from"../../../common/network/network.js";import d from"../../animations/generic_sca_approval.json.js";import{renderTestingScaHelper as u}from"./qonto-sca-passkey-waiting.utils.js";import{qontoScaPasskeyWaitingStyles as h}from"./qonto-sca-passkey-waiting.styles.js";import"../../customizable-components/lottie-player/qonto-lottie-player.js";import"../../customizable-components/button/qonto-button.js";import"../../customizable-components/text/qonto-text-heading.js";import"../../customizable-components/text/qonto-text-body.js";import"../../customizable-components/styles/styles.css.js";import{pollScaSession as b}from"../../../sca/sca.js";let g=class extends s{constructor(){super(...arguments),this.phoneLast4Digits="",this.isResending=!1,this.isLinkCopied=!1}connectedCallback(){super.connectedCallback(),this.startPolling()}disconnectedCallback(){super.disconnectedCallback(),this.stopPolling()}async startPolling(){try{this.pollingGenerator=b({scaSettings:{scaSessionToken:this.networkCallDescriptor?.options.headers.scaSessionToken},operationSettings:this.operationSettings});let t=await this.pollingGenerator.next();for(;!t.done;)await new Promise((t=>setTimeout(t,3e3))),t=await this.pollingGenerator.next();"allow"===t.value.result?await this.executeNetworkCall():"deny"===t.value.result&&this.handleAbortClick()}catch(t){console.error(t),this.dispatchEvent(new CustomEvent("sca-error",{detail:{error:t},bubbles:!0,composed:!0}))}}stopPolling(){this.pollingGenerator?.return({result:"waiting",canceledAt:(new Date).toISOString()})}async executeNetworkCall(){if(this.networkCallDescriptor)try{let t;if(this.operationSettings?.proxyRequestFunction||this.operationSettings?.proxyEndpointDescriptor){t=(await p({proxyFunction:this.operationSettings?.proxyRequestFunction,networkCallDescriptor:this.networkCallDescriptor,proxyEndpointDescriptor:this.operationSettings?.proxyEndpointDescriptor})).body}else t=await c(this.networkCallDescriptor);this.dispatchEvent(new CustomEvent("sca-success",{detail:{result:t},bubbles:!0,composed:!0}))}catch(t){this.dispatchEvent(new CustomEvent("sca-error",{detail:{error:t},bubbles:!0,composed:!0}))}else console.warn("No network call descriptor provided")}async handleResendClick(){this.isResending||(this.isResending=!0,this.dispatchEvent(new CustomEvent("resend-request",{bubbles:!0,composed:!0})),await this.stopPolling(),this.startPolling(),setTimeout((()=>{this.isResending=!1}),2e3))}handleAbortClick(){this.stopPolling(),this.dispatchEvent(new CustomEvent("sca-abort",{detail:{result:"User aborted SCA"},bubbles:!0,composed:!0}))}render(){return n`
1
+ import{__decorate as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.39.0_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js";import{str as e}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/str-tag.js";import{msg as o}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as i}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/reactive-element.js";import{html as n}from"../../../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/lit-html.js";import{LitElement as s}from"../../../../node_modules/.pnpm/lit-element@4.2.2/node_modules/lit-element/lit-element.js";import{customElement as l}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as r}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/property.js";import{state as a}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.2/node_modules/@lit/reactive-element/decorators/state.js";import{callProxyFunction as p}from"../../../common/common.utils.js";import{environmentManager as m}from"../../../common/environment/environment-manager.js";import{makeNetworkCall as c}from"../../../common/network/network.js";import d from"../../animations/generic_sca_approval.json.js";import{renderTestingScaHelper as u}from"./qonto-sca-passkey-waiting.utils.js";import{qontoScaPasskeyWaitingStyles as h}from"./qonto-sca-passkey-waiting.styles.js";import"../../customizable-components/lottie-player/qonto-lottie-player.js";import"../../customizable-components/button/qonto-button.js";import"../../customizable-components/text/qonto-text-heading.js";import"../../customizable-components/text/qonto-text-body.js";import"../../customizable-components/styles/styles.css.js";import{pollScaSession as b}from"../../../sca/sca.js";let g=class extends s{constructor(){super(...arguments),this.phoneLast4Digits="",this.isResending=!1,this.isLinkCopied=!1}connectedCallback(){super.connectedCallback(),this.startPolling()}disconnectedCallback(){super.disconnectedCallback(),this.stopPolling()}async startPolling(){try{this.pollingGenerator=b({scaSettings:{scaSessionToken:this.networkCallDescriptor?.options.headers.scaSessionToken},operationSettings:this.operationSettings});let t=await this.pollingGenerator.next();for(;!t.done;)await new Promise((t=>setTimeout(t,3e3))),t=await this.pollingGenerator.next();"allow"===t.value.result?await this.executeNetworkCall():"deny"===t.value.result&&this.handleAbortClick()}catch(t){console.error(t),this.dispatchEvent(new CustomEvent("sca-error",{detail:{error:t},bubbles:!0,composed:!0}))}}stopPolling(){this.pollingGenerator?.return({result:"waiting",canceledAt:(new Date).toISOString()})}async executeNetworkCall(){if(this.networkCallDescriptor)try{let t;if(this.operationSettings?.proxyRequestFunction||this.operationSettings?.proxyEndpointDescriptor){t=(await p({proxyFunction:this.operationSettings?.proxyRequestFunction,networkCallDescriptor:this.networkCallDescriptor,proxyEndpointDescriptor:this.operationSettings?.proxyEndpointDescriptor})).body}else t=await c(this.networkCallDescriptor);this.dispatchEvent(new CustomEvent("sca-success",{detail:{result:t},bubbles:!0,composed:!0}))}catch(t){this.dispatchEvent(new CustomEvent("sca-error",{detail:{error:t},bubbles:!0,composed:!0}))}else console.warn("No network call descriptor provided")}async handleResendClick(){this.isResending||(this.isResending=!0,this.dispatchEvent(new CustomEvent("resend-request",{bubbles:!0,composed:!0})),await this.stopPolling(),this.startPolling(),setTimeout((()=>{this.isResending=!1}),2e3))}handleAbortClick(){this.stopPolling(),this.dispatchEvent(new CustomEvent("sca-abort",{detail:{result:"User aborted SCA"},bubbles:!0,composed:!0}))}render(){return n`
2
2
  <qonto-button
3
3
  variant="ghost"
4
4
  data-close-button