whoami7 - Manager
:
/
home
/
dataiclx
/
vielorbe.com
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
surecart
/
Upload File:
files >> //home/dataiclx/vielorbe.com/wp-content/plugins/surecart/dist/components/surecart/p-930ac855.js.map
{"version":3,"names":["maybeUpdateProcessor","ids","availableProcessors","map","processor_type","availableManualPaymentMethods","id","includes","selectedProcessor","length","maybeUpdateMethod","availableMethodTypes","method","onChangeCheckout","onChangeProcessor","onChange"],"sources":["src/store/processors/watchers.ts"],"sourcesContent":["/**\n * Internal dependencies.\n */\nimport { onChange as onChangeCheckout } from '../checkout';\nimport { onChange as onChangeProcessor, state as selectedProcessor } from '../selected-processor';\nimport { availableManualPaymentMethods, availableMethodTypes, availableProcessors } from './getters';\nimport { onChange } from './store';\n\n/**\n * Look through available processors and maybe switch if the processor has been removed.\n */\nconst maybeUpdateProcessor = () => {\n // get array of manual and regular processors ids.\n const ids = [...availableProcessors().map(({ processor_type }) => processor_type), ...availableManualPaymentMethods().map(({ id }) => id)];\n // selected processor is available.\n if (ids.includes(selectedProcessor.id)) return;\n // set to first if we have one, otherwise unset.\n selectedProcessor.id = ids?.length ? ids?.[0] : null;\n};\n\n/**\n * Look through available methods and maybe switch if the processor has been removed.\n */\nconst maybeUpdateMethod = () => {\n // get method ids.\n const ids = (availableMethodTypes() || []).map(({ id }) => id);\n // if the processor is not mollie, unset the method.\n if (selectedProcessor?.id !== 'mollie') {\n selectedProcessor.method = null;\n return;\n }\n // selected method is available\n if (ids.includes(selectedProcessor.method)) return;\n // if the current method is not available, set the first method.\n selectedProcessor.method = ids?.length ? ids?.[0] : null;\n};\n\n// when the checkout changes, maybe update selection.\nonChangeCheckout('checkout', () => {\n maybeUpdateProcessor();\n maybeUpdateMethod();\n});\nonChangeProcessor('id', () => maybeUpdateProcessor());\n\n// when processors and methods are first loaded, select first one.\nonChange('processors', () => maybeUpdateProcessor());\nonChange('methods', () => maybeUpdateMethod());\n"],"mappings":"mIAWA,MAAMA,EAAuB,KAE3B,MAAMC,EAAM,IAAIC,IAAsBC,KAAI,EAAGC,oBAAqBA,OAAoBC,IAAgCF,KAAI,EAAGG,QAASA,KAEtI,GAAIL,EAAIM,SAASC,EAAkBF,IAAK,OAExCE,EAAkBF,IAAKL,IAAG,MAAHA,SAAG,SAAHA,EAAKQ,QAASR,IAAG,MAAHA,SAAG,SAAHA,EAAM,GAAK,IAAI,EAMtD,MAAMS,EAAoB,KAExB,MAAMT,GAAOU,KAA0B,IAAIR,KAAI,EAAGG,QAASA,IAE3D,IAAIE,IAAiB,MAAjBA,SAAiB,SAAjBA,EAAmBF,MAAO,SAAU,CACtCE,EAAkBI,OAAS,KAC3B,M,CAGF,GAAIX,EAAIM,SAASC,EAAkBI,QAAS,OAE5CJ,EAAkBI,QAASX,IAAG,MAAHA,SAAG,SAAHA,EAAKQ,QAASR,IAAG,MAAHA,SAAG,SAAHA,EAAM,GAAK,IAAI,EAI1DY,EAAiB,YAAY,KAC3Bb,IACAU,GAAmB,IAErBI,EAAkB,MAAM,IAAMd,MAG9Be,EAAS,cAAc,IAAMf,MAC7Be,EAAS,WAAW,IAAML","ignoreList":[]}
Copyright ©2021 || Defacer Indonesia