whoami7 - Manager
:
/
home
/
dataiclx
/
vielorbe.com
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
components
/
Upload File:
files >> //home/dataiclx/vielorbe.com/wp-content/plugins/surecart/dist/components/components/getters5.js.map
{"file":"getters5.js","mappings":";;;;;AAGA,MAAM,EAAE,UAAU,EAAE,GAAG,kBAAkB,EAAE,CAAC;MA2BtC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,WAAW,CAClD;IACE,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,EAAE;IACX,oBAAoB,EAAE,EAAE;IACxB,QAAQ,EAAE;QACR,UAAU,EAAE,EAAE;KACf;IACD,SAAS,EAAE;QACT,UAAU,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC;QAC9D,oBAAoB,EAAE,EAAE;QACxB,cAAc,EAAE;YACd,MAAM,EAAE,CAAC,YAAY,EAAE,QAAQ,CAAC;SACjC;KACF;IACD,SAAS,EAAE;QACT,MAAM,EAAE,SAAS;KAClB;IACD,MAAM,EAAE;QACN,MAAM,EAAE;YACN,cAAc,EAAE,KAAK;SACtB;KACF;IACD,GAAG,UAAU;CACd,EACD,CAAC,QAAQ,EAAE,QAAQ;IACjB,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC/D,CAAC;;ACrDH;;;;MAIa,mBAAmB,GAAG,MACjC,WAAW,CAAC,KAAK,CAAC,UAAU,EAAE,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC;KACxE,MAAM,CAAC,SAAS,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,OAAM,CAAAA,OAAa,aAAbA,OAAa,uBAAbA,OAAa,CAAE,IAAI,MAAK,MAAM,CAAC,CAAC;KAC9E,MAAM,CAAC,SAAS,IAAI,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ources":["src/store/processors/store.ts","src/store/processors/getters.ts"],"sourcesContent":["import { createStore } from '@stencil/store';\nimport { ManualPaymentMethod, PaymentMethodType, Processor } from '../../types';\nimport { getSerializedState } from '@store/utils';\nconst { processors } = getSerializedState();\n\ninterface Store {\n processors: Processor[];\n methods: PaymentMethodType[];\n manualPaymentMethods: ManualPaymentMethod[];\n disabled: {\n processors: string[];\n };\n sortOrder: {\n processors: string[];\n manualPaymentMethods: string[];\n paymentMethods: {\n mollie: string[];\n };\n };\n instances: {\n stripe?: any;\n stripeElements: any;\n };\n config: {\n stripe: {\n paymentElement: boolean;\n };\n };\n}\n\nconst { state, onChange, on, dispose } = createStore<Store>(\n {\n processors: [],\n methods: [],\n manualPaymentMethods: [],\n disabled: {\n processors: [],\n },\n sortOrder: {\n processors: ['stripe', 'paystack', 'paypal', 'mollie', 'mock'],\n manualPaymentMethods: [],\n paymentMethods: {\n mollie: ['creditcard', 'paypal'],\n },\n },\n instances: {\n stripe: undefined,\n },\n config: {\n stripe: {\n paymentElement: false,\n },\n },\n ...processors,\n },\n (newValue, oldValue) => {\n return JSON.stringify(newValue) !== JSON.stringify(oldValue);\n },\n);\n\nexport default state;\nexport { state, onChange, on, dispose };\n","import { sortByArray } from '../../functions/util';\nimport state from './store';\nimport { state as checkoutState } from '@store/checkout';\n\n/**\n * Gets a sorted array of available processors based on\n * checkout mode, recurring requirements, and if mollie is enabled.\n */\nexport const availableProcessors = () =>\n sortByArray(state.processors, 'processor_type', state.sortOrder.processors) // sort.\n .filter(processor => processor?.live_mode === (checkoutState?.mode === 'live')) // match mode.\n .filter(processor => !(state.disabled.processors || []).includes(processor.processor_type)) // make sure it's not disabled.\n .filter(processor => (!!checkoutState?.checkout?.reusable_payment_method_required ? !!processor?.recurring_enabled : true)) // recurring.\n .filter((processor, _, filtered) => (filtered.some(p => p.processor_type === 'mollie') ? processor.processor_type === 'mollie' || processor.processor_type === 'mock' : true)); // only allow mollie if preset.\n\n/**\n * Gets the processor by type\n *\n * @param {string} type The processor type.\n *\n * @returns {Object | null} The processor data.\n */\nexport const getProcessorByType = (type: string) => availableProcessors().find(({ processor_type }) => processor_type === type);\n\n/**\n * Gets an available processor type.\n */\nexport const getAvailableProcessor = (type: string) => availableProcessors().find(({ processor_type }) => processor_type === type);\n\n/**\n * Check if there is any available credit card processor except the given processor type.\n */\nexport const hasOtherAvailableCreditCardProcessor = (type: string) =>\n availableProcessors().some(({ processor_type }) => processor_type !== type && 'paypal' !== processor_type && 'mock' !== processor_type);\n\n/**\n * Get a sorted array of manual payment methods\n * based on recurring requirements.\n */\nexport const availableManualPaymentMethods = () =>\n sortByArray(state.manualPaymentMethods, 'id', state.sortOrder.manualPaymentMethods)\n .filter(processor => !(state.disabled.processors || []).includes(processor?.id))\n .filter(processor => (!!checkoutState?.checkout?.reusable_payment_method_required ? !!processor?.reusable : true)); // recurring.\n\n/**\n * Get a sorted array of mollie payment method types.\n */\nexport const availableMethodTypes = () =>\n sortByArray(state.methods, 'id', state.sortOrder.paymentMethods.mollie).filter(method => {\n if (method.id === 'applepay') {\n return (window as any)?.ApplePaySession && (window as any)?.ApplePaySession?.canMakePayments?.();\n }\n return true;\n });\n\n/**\n * Get a combined available processor choices (processors + manual payment methods)\n */\nexport const availableProcessorChoices = () => [...availableProcessors(), ...availableManualPaymentMethods()];\n\n/**\n * Do we have multiple processors.\n */\nexport const hasMultipleProcessorChoices = () => availableProcessorChoices()?.length > 1;\n\n/**\n * Get a combined available payment methods (method types + manual payment methods)\n */\nexport const availableMethodChoices = () => [...availableMethodTypes(), ...availableManualPaymentMethods(), ...[getProcessorByType('mock')]].filter(Boolean);\n\n/**\n * Do we have multiple payment methods.\n */\nexport const hasMultipleMethodChoices = () => availableMethodChoices()?.length > 1;\n"],"version":3}
Copyright ©2021 || Defacer Indonesia