<commit_before>/*** @license
 * Copyright 2016 Nexstream Sdn Bhd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
***/
"use strict";window.KonnectedPay=window.KonnectedPay||{},function(){var e="https://pay.appxtream.com",n=function(e){var n=function(n){if(null==e[n])throw new Error(n+" is required!")},t=function(n){if(!/^[0-9]+(\.?[0-9]+)$/.test(e[n]))throw new Error(n+" must be a valid number!")};n("merchantId"),n("clientSecret"),n("amount"),n("transId"),n("currencyCode"),n("fullName"),n("email"),n("userId"),t("amount")},t=function(e){for(var n=e.split("&"),t={},o=0;o<n.length;o++){var r=n[o].split("="),a=decodeURIComponent(r[0]);r.length>1?t[a]=decodeURIComponent(r[1]):t[a]=!0}return t},o=function(){var e=location.href.match(/^[^?]+\?([^#]+)/);return e?t(e[1]):{}},r=function(){var e=location.hash;return e?t(e.substr(1)):{}};KonnectedPay.VERSION="1.1.1",KonnectedPay.requestPayment=function(e,t){n(e);var o=e.amount;"string"==typeof o&&(o=parseFloat(o));var r="https://pay.appxtream.com/payment?tranId="+encodeURIComponent(e.transId)+"&amount="+encodeURIComponent(o.toFixed(2))+"&currencyCode="+encodeURIComponent(e.currencyCode)+"&merchantId="+encodeURIComponent(e.merchantId)+"&device="+encodeURIComponent(navigator.userAgent)+"&os=browser&fullname="+encodeURIComponent(e.fullName)+"&email="+encodeURIComponent(e.email)+"&userId="+encodeURIComponent(e.userId);null!=e.rememberCard&&(r+="&rememberCard="+(e.rememberCard?"true":"false")),null!=e.returnUrl&&(r+="&return="+encodeURIComponent(e.returnUrl)),null!=e.responseMethod&&(r+="&returnMethod="+encodeURIComponent(e.responseMethod)),"_blank"!=t?location.assign(r):window.open(r,"_blank","menubar=no,toolbar=no,location=no,personalbar=no,directories=no")},KonnectedPay.getPaymentResults=function(e){var n;switch(e.toLowerCase()){case"get":n=o().KonnectedPayResp;break;case"hash":n=r().KonnectedPayResp;break;case"post":throw new Error("Please retrieve POST results on your server");default:throw new Error("Invalid method")}if(!n)return null;try{return JSON.parse(n)}catch(t){throw new Error("Invalid results: "+n)}},KonnectedPay.getTokens=function(n,t,o){var r=e+"/payment/token/"+encodeURIComponent(t)+"?clientSecret="+encodeURIComponent(n),a=new XMLHttpRequest;a.onreadystatechange=function(){switch(a.readyState){case 4:if(a.status<200||a.status>=300)o(!1,"Failed to retrieve tokens");else{try{var e=JSON.parse(this.responseText);if(null===e&&(e=[]),"object"!=typeof e||!(e instanceof Array))throw new Error("Response should be an array")}catch(n){return void o(!1,n&&n.message||"Invalid response from server")}o(!0,e.map(function(e){return{token:e.token,maskCard:e.maskCard,maskCardType:e.maskCardType}}))}}},a.open("GET",r),a.send()},KonnectedPay.deleteToken=function(n,t,o,r){var a=e+"/payment/token/"+encodeURIComponent(t)+"/"+encodeURIComponent(o)+"?clientSecret="+encodeURIComponent(n),s=new XMLHttpRequest;s.onreadystatechange=function(){switch(s.readyState){case 4:if(s.status>=200&&s.status<300)r(!0);else{var e;try{e=JSON.parse(this.responseText)}catch(n){}r(!1,e&&e.error||"Failed to delete token")}}},s.open("DELETE",a),s.send()}}();
<commit_msg>Updated minimised JS file<commit_after>/*** @license
 * Copyright 2016 Nexstream Sdn Bhd
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
***/
"use strict";window.KonnectedPay=window.KonnectedPay||{},function(){var e="https://pay.appxtream.com",n=function(e){var n=function(n){if(null==e[n])throw new Error(n+" is required!")},t=function(n){if(!/^[0-9]+(\.?[0-9]+)$/.test(e[n]))throw new Error(n+" must be a valid number!")};n("merchantId"),n("clientSecret"),n("amount"),n("transId"),n("currencyCode"),n("fullName"),n("email"),n("userId"),t("amount")},t=function(e){for(var n=e.split("&"),t={},o=0;o<n.length;o++){var r=n[o].split("="),a=decodeURIComponent(r[0]);r.length>1?t[a]=decodeURIComponent(r[1]):t[a]=!0}return t},o=function(){var e=location.href.match(/^[^?]+\?([^#]+)/);return e?t(e[1]):{}},r=function(){var e=location.hash;return e?t(e.substr(1)):{}};KonnectedPay.VERSION="1.2.0",KonnectedPay.requestPayment=function(e,t){n(e);var o=e.amount;"string"==typeof o&&(o=parseFloat(o));var r="https://pay.appxtream.com/payment?tranId="+encodeURIComponent(e.transId)+"&amount="+encodeURIComponent(o.toFixed(2))+"&currencyCode="+encodeURIComponent(e.currencyCode)+"&merchantId="+encodeURIComponent(e.merchantId)+"&device="+encodeURIComponent(navigator.userAgent)+"&os=browser&fullname="+encodeURIComponent(e.fullName)+"&email="+encodeURIComponent(e.email)+"&userId="+encodeURIComponent(e.userId);null!=e.rememberCard&&(r+="&rememberCard="+(e.rememberCard?"true":"false")),null!=e.returnUrl&&(r+="&return="+encodeURIComponent(e.returnUrl)),null!=e.responseMethod&&(r+="&returnMethod="+encodeURIComponent(e.responseMethod)),null!=e.token&&(r+="&token="+encodeURIComponent(e.token)),"_blank"!=t?location.assign(r):window.open(r,"_blank","menubar=no,toolbar=no,location=no,personalbar=no,directories=no")},KonnectedPay.getPaymentResults=function(e){var n;switch(e.toLowerCase()){case"get":n=o().KonnectedPayResp;break;case"hash":n=r().KonnectedPayResp;break;case"post":throw new Error("Please retrieve POST results on your server");default:throw new Error("Invalid method")}if(!n)return null;try{return JSON.parse(n)}catch(t){throw new Error("Invalid results: "+n)}},KonnectedPay.getTokens=function(n,t,o){var r=e+"/payment/token/"+encodeURIComponent(t)+"?clientSecret="+encodeURIComponent(n),a=new XMLHttpRequest;a.onreadystatechange=function(){switch(a.readyState){case 4:if(a.status<200||a.status>=300)o(!1,"Failed to retrieve tokens");else{try{var e=JSON.parse(this.responseText);if(null===e&&(e=[]),"object"!=typeof e||!(e instanceof Array))throw new Error("Response should be an array")}catch(n){return void o(!1,n&&n.message||"Invalid response from server")}o(!0,e.map(function(e){return{token:e.token,maskCard:e.maskCard,maskCardType:e.maskCardType}}))}}},a.open("GET",r),a.send()},KonnectedPay.deleteToken=function(n,t,o,r){var a=e+"/payment/token/"+encodeURIComponent(t)+"/"+encodeURIComponent(o)+"?clientSecret="+encodeURIComponent(n),s=new XMLHttpRequest;s.onreadystatechange=function(){switch(s.readyState){case 4:if(s.status>=200&&s.status<300)r(!0);else{var e;try{e=JSON.parse(this.responseText)}catch(n){}r(!1,e&&e.error||"Failed to delete token")}}},s.open("DELETE",a),s.send()}}();

{'fraction_non_alphanumeric': 0.22107269262183502, 'fraction_numerical': 0.011434794445956983, 'mean_word_length': 11.667241379310346, 'pattern_counts': {'":': 8, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5360600', 'n_tokens_mistral': 2558, 'n_tokens_neox': 2598, 'n_words': 315}