@imtbl/sdk 1.15.6 → 1.15.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blockchain_data.js +2 -2
- package/dist/browser/checkout/BridgeWidget-2efbd9ad.js +1 -0
- package/dist/browser/checkout/{OnRampWidget-8e8b8819.js → OnRampWidget-a66e7fa3.js} +1 -1
- package/dist/browser/checkout/SaleWidget-3c62a591.js +2 -0
- package/dist/browser/checkout/{SpendingCapHero-800633cb.js → SpendingCapHero-f79df11e.js} +1 -1
- package/dist/browser/checkout/{SwapWidget-4214431b.js → SwapWidget-c978d4a4.js} +1 -1
- package/dist/browser/checkout/{TopUpView-c90cfc04.js → TopUpView-16db081a.js} +1 -1
- package/dist/browser/checkout/{WalletWidget-c00d8723.js → WalletWidget-a5c469ba.js} +1 -1
- package/dist/browser/checkout/{auto-track-6525038f.js → auto-track-639217b4.js} +1 -1
- package/dist/browser/checkout/balance-123191fd.js +1 -0
- package/dist/browser/checkout/index-0246bdc8.js +1 -0
- package/dist/browser/checkout/{index-41e34266.js → index-0e73c11a.js} +1 -1
- package/dist/browser/checkout/{index-32df522a.js → index-2141407f.js} +1 -1
- package/dist/browser/checkout/{index-89152f0a.js → index-4b1d2f64.js} +12 -12
- package/dist/browser/checkout/{index-6817e91e.js → index-4c08daa5.js} +17 -17
- package/dist/browser/checkout/{index-b0776e1e.js → index-7c3b9755.js} +1 -1
- package/dist/browser/checkout/{index-ac189cb1.js → index-92d189dd.js} +1 -1
- package/dist/browser/checkout/{index-3e347faa.js → index-9c24e104.js} +1 -1
- package/dist/browser/checkout/{index.umd-fc914ede.js → index.umd-ccd06a86.js} +1 -1
- package/dist/browser/checkout/{retry-06ea349a.js → retry-428bd9ee.js} +1 -1
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/browser/checkout/{useTransakEvents-2b588362.js → useTransakEvents-c01d9b36.js} +1 -1
- package/dist/browser/checkout/widgets-esm.js +1 -1
- package/dist/browser/checkout/widgets.js +61 -61
- package/dist/checkout.d.ts +2 -0
- package/dist/checkout.js +18 -11
- package/dist/config.js +1 -1
- package/dist/index.browser.js +5 -5
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +22 -14
- package/dist/index.d.ts +2 -0
- package/dist/index.js +22 -14
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +5 -4
- package/dist/x.js +3 -3
- package/package.json +1 -1
- package/dist/browser/checkout/BridgeWidget-6e7e7a05.js +0 -1
- package/dist/browser/checkout/SaleWidget-7d3e4b1b.js +0 -2
- package/dist/browser/checkout/balance-c7e1bedb.js +0 -1
- package/dist/browser/checkout/index-e0bf7c42.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bW as r,bX as e}from"./index-4c08daa5.js";for(var t={},n={},o=[],a=0;a<64;)o[a]=0|4294967296*Math.sin(++a%Math.PI);var i=r(Object.freeze({__proto__:null,default:function(r){var e,t,n,i=[e=1732584193,t=4023233417,~e,~t],u=[],f=unescape(encodeURI(r))+"",c=f.length;for(r=--c/4+2|15,u[--r]=8*c;~c;)u[c>>2]|=f.charCodeAt(c)<<8*c--;for(a=f=0;a<r;a+=16){for(c=i;f<64;c=[n=c[3],e+((n=c[0]+[e&t|~e&n,n&e|~n&t,e^t^n,t^(e|~n)][c=f>>4]+o[f]+~~u[a|15&[f,5*f+1,3*f+5,7*f][c]])<<(c=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*c+f++%4])|n>>>-c),e,t])e=0|c[1],t=c[2];for(f=4;f;)i[--f]+=c[f]}for(r="";f<32;)r+=(i[f>>3]>>4*(1^f++)&15).toString(16);return r}})),u={exports:{}};u.exports=function(r,e,t,n,o){for(e=e.split?e.split("."):e,n=0;n<e.length;n++)r=r?r[e[n]]:o;return r===o?t:r};var f=u.exports,c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;
|
|
2
2
|
/**
|
|
3
3
|
* @license Apache-2.0
|
|
4
4
|
*
|
|
@@ -204,7 +204,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
|
|
|
204
204
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
205
205
|
* See the License for the specific language governing permissions and
|
|
206
206
|
* limitations under the License.
|
|
207
|
-
*/var G=M,L=function(r){var e,t,n;if(null==r)return J.call(r);t=r[H],e=C(r,H);try{r[H]=void 0}catch(e){return J.call(r)}return n=J.call(r),e?r[H]=t:delete r[H],n},D=U()?L:G,
|
|
207
|
+
*/var G=M,L=function(r){var e,t,n;if(null==r)return J.call(r);t=r[H],e=C(r,H);try{r[H]=void 0}catch(e){return J.call(r)}return n=J.call(r),e?r[H]=t:delete r[H],n},D=U()?L:G,W=D,R="function"==typeof Uint32Array;
|
|
208
208
|
/**
|
|
209
209
|
* @license Apache-2.0
|
|
210
210
|
*
|
|
@@ -221,7 +221,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
|
|
|
221
221
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
222
222
|
* See the License for the specific language governing permissions and
|
|
223
223
|
* limitations under the License.
|
|
224
|
-
*/var
|
|
224
|
+
*/var V="function"==typeof Uint32Array?Uint32Array:null,B=function(r){return R&&r instanceof Uint32Array||"[object Uint32Array]"===W(r)},Q=V;
|
|
225
225
|
/**
|
|
226
226
|
* @license Apache-2.0
|
|
227
227
|
*
|
|
@@ -273,7 +273,7 @@ function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}();
|
|
|
273
273
|
* See the License for the specific language governing permissions and
|
|
274
274
|
* limitations under the License.
|
|
275
275
|
*/
|
|
276
|
-
function(){throw new Error("not implemented")},
|
|
276
|
+
function(){throw new Error("not implemented")},X=Y()?q:z,K=D,Z="function"==typeof Float64Array;
|
|
277
277
|
/**
|
|
278
278
|
* @license Apache-2.0
|
|
279
279
|
*
|
|
@@ -290,7 +290,7 @@ function(){throw new Error("not implemented")},K=Y()?q:z,X=D,Z="function"==typeo
|
|
|
290
290
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
291
291
|
* See the License for the specific language governing permissions and
|
|
292
292
|
* limitations under the License.
|
|
293
|
-
*/var $="function"==typeof Float64Array?Float64Array:null,rr=function(r){return Z&&r instanceof Float64Array||"[object Float64Array]"===
|
|
293
|
+
*/var $="function"==typeof Float64Array?Float64Array:null,rr=function(r){return Z&&r instanceof Float64Array||"[object Float64Array]"===K(r)},er=$;
|
|
294
294
|
/**
|
|
295
295
|
* @license Apache-2.0
|
|
296
296
|
*
|
|
@@ -514,7 +514,7 @@ function(){throw new Error("not implemented")},Or={uint16:_r()?Ar:jr,uint8:vr};
|
|
|
514
514
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
515
515
|
* See the License for the specific language governing permissions and
|
|
516
516
|
* limitations under the License.
|
|
517
|
-
*/!0===Sr?(kr=1,Nr=0):(kr=0,Nr=1);var Er=
|
|
517
|
+
*/!0===Sr?(kr=1,Nr=0):(kr=0,Nr=1);var Er=X,Ur={HIGH:kr,LOW:Nr},Ir=new ar(1),Pr=new Er(Ir.buffer),Mr=Ur.HIGH,Fr=Ur.LOW;
|
|
518
518
|
/**
|
|
519
519
|
* @license Apache-2.0
|
|
520
520
|
*
|
|
@@ -565,7 +565,7 @@ function(){throw new Error("not implemented")},Or={uint16:_r()?Ar:jr,uint8:vr};
|
|
|
565
565
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
566
566
|
* See the License for the specific language governing permissions and
|
|
567
567
|
* limitations under the License.
|
|
568
|
-
*/S(Cr,"assign",xr);var Hr=Cr,Jr=
|
|
568
|
+
*/S(Cr,"assign",xr);var Hr=Cr,Jr=X,Gr=!0===Sr?1:0,Lr=new ar(1),Dr=new Jr(Lr.buffer);
|
|
569
569
|
/**
|
|
570
570
|
* @license Apache-2.0
|
|
571
571
|
*
|
|
@@ -582,7 +582,7 @@ function(){throw new Error("not implemented")},Or={uint16:_r()?Ar:jr,uint8:vr};
|
|
|
582
582
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
583
583
|
* See the License for the specific language governing permissions and
|
|
584
584
|
* limitations under the License.
|
|
585
|
-
*/var
|
|
585
|
+
*/var Wr,Rr,Vr=function(r){return Lr[0]=r,Dr[Gr]};
|
|
586
586
|
/**
|
|
587
587
|
* @license Apache-2.0
|
|
588
588
|
*
|
|
@@ -599,7 +599,7 @@ function(){throw new Error("not implemented")},Or={uint16:_r()?Ar:jr,uint8:vr};
|
|
|
599
599
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
600
600
|
* See the License for the specific language governing permissions and
|
|
601
601
|
* limitations under the License.
|
|
602
|
-
*/!0===Sr?(
|
|
602
|
+
*/!0===Sr?(Wr=1,Rr=0):(Wr=0,Rr=1);var Br=X,Qr={HIGH:Wr,LOW:Rr},Yr=new ar(1),qr=new Br(Yr.buffer),zr=Qr.HIGH,Xr=Qr.LOW;
|
|
603
603
|
/**
|
|
604
604
|
* @license Apache-2.0
|
|
605
605
|
*
|
|
@@ -616,7 +616,7 @@ function(){throw new Error("not implemented")},Or={uint16:_r()?Ar:jr,uint8:vr};
|
|
|
616
616
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
617
617
|
* See the License for the specific language governing permissions and
|
|
618
618
|
* limitations under the License.
|
|
619
|
-
*/var
|
|
619
|
+
*/var Kr=function(r,e){return qr[zr]=r,qr[Xr]=e,Yr[0]},Zr=Kr,$r=Hr,re=Vr,ee=Zr,te=[0,0];
|
|
620
620
|
/**
|
|
621
621
|
* @license Apache-2.0
|
|
622
622
|
*
|
|
@@ -719,7 +719,7 @@ function(r){return Math.abs(r)};
|
|
|
719
719
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
720
720
|
* See the License for the specific language governing permissions and
|
|
721
721
|
* limitations under the License.
|
|
722
|
-
*/S(ce,"assign",ue);var le=
|
|
722
|
+
*/S(ce,"assign",ue);var le=Vr;
|
|
723
723
|
/**
|
|
724
724
|
* @license Apache-2.0
|
|
725
725
|
*
|
|
@@ -770,4 +770,4 @@ function(r){return Math.abs(r)};
|
|
|
770
770
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
771
771
|
* See the License for the specific language governing permissions and
|
|
772
772
|
* limitations under the License.
|
|
773
|
-
*/ke.dset=function(r,e,t){e.split&&(e=e.split("."));for(var n,o,a=0,i=e.length,u=r;a<i&&"__proto__"!==(o=e[a++])&&"constructor"!==o&&"prototype"!==o;)u=u[o]=a===i?t:typeof(n=u[o])==typeof e?n:0*e[a]!=0||~(""+e[a]).indexOf(".")?{}:[]};var Ne={},Se=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.unset=void 0;var Ee=Se(f);Ne.unset=function(r,e){if((0,Ee.default)(r,e)){for(var t=e.split("."),n=t.pop();t.length&&"\\"===t[t.length-1].slice(-1);)n=t.pop().slice(0,-1)+"."+n;for(;t.length;)r=r[e=t.shift()];return delete r[n]}return!0};var Ue=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:!0});var Ie=Ue(i),Pe=Ue(f),Me=Ue(Oe),Fe=ke,xe=Ne;function Te(r,e){He(r,e.drop,(function(r,e){e.forEach((function(e){return delete r[e]}))}))}function Ce(r,e){He(r,e.allow,(function(r,e){Object.keys(r).forEach((function(t){e.includes(t)||delete r[t]}))}))}function He(r,e,t){Object.entries(e).forEach((function(e){var n=e[0],o=e[1],a=function(r){"object"==typeof r&&null!==r&&t(r,o)},i=""===n?r:(0,Pe.default)(r,n);Array.isArray(i)?i.forEach(a):a(i)}))}function Je(r,e){var t=JSON.parse(JSON.stringify(r));for(var n in e.map)if(e.map.hasOwnProperty(n)){var o=e.map[n],a=n.split("."),i=void 0;if(a.length>1?(a.pop(),i=(0,Pe.default)(t,a.join("."))):i=r,"object"==typeof i){if(o.copy){var u=(0,Pe.default)(t,o.copy);void 0!==u&&(0,Fe.dset)(r,n,u)}else if(o.move){var f=(0,Pe.default)(t,o.move);void 0!==f&&(0,Fe.dset)(r,n,f),(0,xe.unset)(r,o.move)}else o.hasOwnProperty("set")&&(0,Fe.dset)(r,n,o.set);if(o.to_string){var c=(0,Pe.default)(r,n);if("string"==typeof c||"object"==typeof c&&null!==c)continue;void 0!==c?(0,Fe.dset)(r,n,JSON.stringify(c)):(0,Fe.dset)(r,n,"undefined")}}}}function Ge(r,e){return!(e.sample.percent<=0)&&(e.sample.percent>=1||(e.sample.path?function(r,e){var t=(0,Pe.default)(r,e.sample.path),n=(0,Ie.default)(JSON.stringify(t)),o=-64,a=[];Le(n.slice(0,8),a);for(var i=0,u=0;u<64&&1!==a[u];u++)i++;if(0!==i){var f=[];Le(n.slice(9,16),f),o-=i,a.splice(0,i),f.splice(64-i),a=a.concat(f)}return a[63]=0===a[63]?1:0,(0,Me.default)(parseInt(a.join(""),2),o)<e.sample.percent}(r,e):(t=e.sample.percent,Math.random()<=t)));var t}function Le(r,e){for(var t=0;t<8;t++)for(var n=r[t],o=128;o>=1;o/=2)n-o>=0?(n-=o,e.push(1)):e.push(0)}n.default=function(r,e){for(var t=r,n=0,o=e;n<o.length;n++){var a=o[n];switch(a.type){case"drop":return null;case"drop_properties":Te(t,a.config);break;case"allow_properties":Ce(t,a.config);break;case"sample_event":if(Ge(t,a.config))break;return null;case"map_properties":Je(t,a.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(a.type,'" is unsupported.'))}}return t};var De={},
|
|
773
|
+
*/ke.dset=function(r,e,t){e.split&&(e=e.split("."));for(var n,o,a=0,i=e.length,u=r;a<i&&"__proto__"!==(o=e[a++])&&"constructor"!==o&&"prototype"!==o;)u=u[o]=a===i?t:typeof(n=u[o])==typeof e?n:0*e[a]!=0||~(""+e[a]).indexOf(".")?{}:[]};var Ne={},Se=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.unset=void 0;var Ee=Se(f);Ne.unset=function(r,e){if((0,Ee.default)(r,e)){for(var t=e.split("."),n=t.pop();t.length&&"\\"===t[t.length-1].slice(-1);)n=t.pop().slice(0,-1)+"."+n;for(;t.length;)r=r[e=t.shift()];return delete r[n]}return!0};var Ue=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(n,"__esModule",{value:!0});var Ie=Ue(i),Pe=Ue(f),Me=Ue(Oe),Fe=ke,xe=Ne;function Te(r,e){He(r,e.drop,(function(r,e){e.forEach((function(e){return delete r[e]}))}))}function Ce(r,e){He(r,e.allow,(function(r,e){Object.keys(r).forEach((function(t){e.includes(t)||delete r[t]}))}))}function He(r,e,t){Object.entries(e).forEach((function(e){var n=e[0],o=e[1],a=function(r){"object"==typeof r&&null!==r&&t(r,o)},i=""===n?r:(0,Pe.default)(r,n);Array.isArray(i)?i.forEach(a):a(i)}))}function Je(r,e){var t=JSON.parse(JSON.stringify(r));for(var n in e.map)if(e.map.hasOwnProperty(n)){var o=e.map[n],a=n.split("."),i=void 0;if(a.length>1?(a.pop(),i=(0,Pe.default)(t,a.join("."))):i=r,"object"==typeof i){if(o.copy){var u=(0,Pe.default)(t,o.copy);void 0!==u&&(0,Fe.dset)(r,n,u)}else if(o.move){var f=(0,Pe.default)(t,o.move);void 0!==f&&(0,Fe.dset)(r,n,f),(0,xe.unset)(r,o.move)}else o.hasOwnProperty("set")&&(0,Fe.dset)(r,n,o.set);if(o.to_string){var c=(0,Pe.default)(r,n);if("string"==typeof c||"object"==typeof c&&null!==c)continue;void 0!==c?(0,Fe.dset)(r,n,JSON.stringify(c)):(0,Fe.dset)(r,n,"undefined")}}}}function Ge(r,e){return!(e.sample.percent<=0)&&(e.sample.percent>=1||(e.sample.path?function(r,e){var t=(0,Pe.default)(r,e.sample.path),n=(0,Ie.default)(JSON.stringify(t)),o=-64,a=[];Le(n.slice(0,8),a);for(var i=0,u=0;u<64&&1!==a[u];u++)i++;if(0!==i){var f=[];Le(n.slice(9,16),f),o-=i,a.splice(0,i),f.splice(64-i),a=a.concat(f)}return a[63]=0===a[63]?1:0,(0,Me.default)(parseInt(a.join(""),2),o)<e.sample.percent}(r,e):(t=e.sample.percent,Math.random()<=t)));var t}function Le(r,e){for(var t=0;t<8;t++)for(var n=r[t],o=128;o>=1;o/=2)n-o>=0?(n-=o,e.push(1)):e.push(0)}n.default=function(r,e){for(var t=r,n=0,o=e;n<o.length;n++){var a=o[n];switch(a.type){case"drop":return null;case"drop_properties":Te(t,a.config);break;case"allow_properties":Ce(t,a.config);break;case"sample_event":if(Ge(t,a.config))break;return null;case"map_properties":Je(t,a.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(a.type,'" is unsupported.'))}}return t};var De={},We=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(De,"__esModule",{value:!0});var Re=We(f);function Ve(r,e){if(!Array.isArray(r))return!0===Be(r,e);var t=r[0];switch(t){case"!":return!Ve(r[1],e);case"or":for(var n=1;n<r.length;n++)if(Ve(r[n],e))return!0;return!1;case"and":for(n=1;n<r.length;n++)if(!Ve(r[n],e))return!1;return!0;case"=":case"!=":return function(r,e,t,n){Qe(r)&&(r=Ve(r,n));Qe(e)&&(e=Ve(e,n));"object"==typeof r&&"object"==typeof e&&(r=JSON.stringify(r),e=JSON.stringify(e));switch(t){case"=":return r===e;case"!=":return r!==e;default:throw new Error("Invalid operator in compareItems: ".concat(t))}}(Be(r[1],e),Be(r[2],e),t,e);case"<=":case"<":case">":case">=":return function(r,e,t,n){Qe(r)&&(r=Ve(r,n));Qe(e)&&(e=Ve(e,n));if("number"!=typeof r||"number"!=typeof e)return!1;switch(t){case"<=":return r<=e;case">=":return r>=e;case"<":return r<e;case">":return r>e;default:throw new Error("Invalid operator in compareNumbers: ".concat(t))}}(Be(r[1],e),Be(r[2],e),t,e);case"in":return function(r,e,t){return void 0!==e.find((function(e){return Be(e,t)===r}))}(Be(r[1],e),Be(r[2],e),e);case"contains":return function(r,e){if("string"!=typeof r||"string"!=typeof e)return!1;return-1!==r.indexOf(e)}(Be(r[1],e),Be(r[2],e));case"match":return function(r,e){if("string"!=typeof r||"string"!=typeof e)return!1;return function(r,e){var t,n;r:for(;r.length>0;){var o=void 0,a=void 0;if(o=(t=Ye(r)).star,a=t.chunk,r=t.pattern,o&&""===a)return!0;var i=qe(a,e),u=i.t,f=i.ok,c=i.err;if(c)return!1;if(!f||!(0===u.length||r.length>0)){if(o)for(var l=0;l<e.length;l++){if(u=(n=qe(a,e.slice(l+1))).t,f=n.ok,c=n.err,f){if(0===r.length&&u.length>0)continue;e=u;continue r}if(c)return!1}return!1}e=u}return 0===e.length}(e,r)}(Be(r[1],e),Be(r[2],e));case"lowercase":var o=Be(r[1],e);return"string"!=typeof o?null:o.toLowerCase();case"typeof":return typeof Be(r[1],e);case"length":return function(r){if(null===r)return 0;if(!Array.isArray(r)&&"string"!=typeof r)return NaN;return r.length}(Be(r[1],e));default:throw new Error("FQL IR could not evaluate for token: ".concat(t))}}function Be(r,e){return Array.isArray(r)?r:"object"==typeof r?r.value:(0,Re.default)(e,r)}function Qe(r){return!!Array.isArray(r)&&(("lowercase"===r[0]||"length"===r[0]||"typeof"===r[0])&&2===r.length||("contains"===r[0]||"match"===r[0])&&3===r.length)}function Ye(r){for(var e={star:!1,chunk:"",pattern:""};r.length>0&&"*"===r[0];)r=r.slice(1),e.star=!0;var t,n=!1;r:for(t=0;t<r.length;t++)switch(r[t]){case"\\":t+1<r.length&&t++;break;case"[":n=!0;break;case"]":n=!1;break;case"*":if(!n)break r}return e.chunk=r.slice(0,t),e.pattern=r.slice(t),e}function qe(r,e){for(var t,n,o={t:"",ok:!1,err:!1};r.length>0;){if(0===e.length)return o;switch(r[0]){case"[":var a=e[0];e=e.slice(1);var i=!0;(r=r.slice(1)).length>0&&"^"===r[0]&&(i=!1,r=r.slice(1));for(var u=!1,f=0;;){if(r.length>0&&"]"===r[0]&&f>0){r=r.slice(1);break}var c,l="";if(c=(t=ze(r)).char,r=t.newChunk,t.err)return o;if(l=c,"-"===r[0]&&(l=(n=ze(r.slice(1))).char,r=n.newChunk,n.err))return o;c<=a&&a<=l&&(u=!0),f++}if(u!==i)return o;break;case"?":e=e.slice(1),r=r.slice(1);break;case"\\":if(0===(r=r.slice(1)).length)return o.err=!0,o;default:if(r[0]!==e[0])return o;e=e.slice(1),r=r.slice(1)}}return o.t=e,o.ok=!0,o.err=!1,o}function ze(r){var e={char:"",newChunk:"",err:!1};return 0===r.length||"-"===r[0]||"]"===r[0]||"\\"===r[0]&&0===(r=r.slice(1)).length?(e.err=!0,e):(e.char=r[0],e.newChunk=r.slice(1),0===e.newChunk.length&&(e.err=!0),e)}De.default=function(r,e){if(!e)throw new Error("No matcher supplied!");switch(e.type){case"all":return!0;case"fql":return function(r,e){if(!r)return!1;try{r=JSON.parse(r)}catch(e){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(r,'": ').concat(e))}var t=Ve(r,e);if("boolean"!=typeof t)return!1;return t}(e.ir,r);default:throw new Error("Matcher of type ".concat(e.type," unsupported."))}};var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0});var Ke=function(){function r(r){this.rules=[],this.rules=r||[]}return r.prototype.getRulesByDestinationName=function(r){for(var e=[],t=0,n=this.rules;t<n.length;t++){var o=n[t];o.destinationName!==r&&void 0!==o.destinationName||e.push(o)}return e},r}();Xe.default=Ke,function(r){var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(r,"__esModule",{value:!0}),r.Store=r.matches=r.transform=void 0;var o=n;Object.defineProperty(r,"transform",{enumerable:!0,get:function(){return t(o).default}});var a=De;Object.defineProperty(r,"matches",{enumerable:!0,get:function(){return t(a).default}});var i=Xe;Object.defineProperty(r,"Store",{enumerable:!0,get:function(){return t(i).default}})}(t);var Ze=function(r){return function(e){var n=e.payload,o=e.integration,a=e.next;new t.Store(r).getRulesByDestinationName(o).forEach((function(r){for(var e=r.matchers,o=r.transformers,i=0;i<e.length;i++)if(t.matches(n.obj,e[i])&&(n.obj=t.transform(n.obj,o[i]),null===n.obj))return a(null)})),a(n)}};export{Ze as tsubMiddleware};
|