Commit be99e06f authored by minhnguyengp1's avatar minhnguyengp1
Browse files

Initial commit

parents
../jiti/bin/jiti.js
\ No newline at end of file
../jsesc/bin/jsesc
\ No newline at end of file
../json5/lib/cli.js
\ No newline at end of file
../loose-envify/cli.js
\ No newline at end of file
../nanoid/bin/nanoid.cjs
\ No newline at end of file
../@babel/parser/bin/babel-parser.js
\ No newline at end of file
../resolve/bin/resolve
\ No newline at end of file
../rollup/dist/bin/rollup
\ No newline at end of file
../sass/sass.js
\ No newline at end of file
../semver/bin/semver.js
\ No newline at end of file
../sucrase/bin/sucrase
\ No newline at end of file
../sucrase/bin/sucrase-node
\ No newline at end of file
../tailwindcss/lib/cli.js
\ No newline at end of file
../tailwindcss/lib/cli.js
\ No newline at end of file
../update-browserslist-db/cli.js
\ No newline at end of file
../vite/bin/vite.js
\ No newline at end of file
This diff is collapsed.
import "./chunk-TCQZMY3T.js";
// node_modules/@emailjs/browser/es/store/store.js
var store = {
_origin: "https://api.emailjs.com"
};
// node_modules/@emailjs/browser/es/methods/init/init.js
var init = (publicKey, origin = "https://api.emailjs.com") => {
store._userID = publicKey;
store._origin = origin;
};
// node_modules/@emailjs/browser/es/utils/validateParams.js
var validateParams = (publicKey, serviceID, templateID) => {
if (!publicKey) {
throw "The public key is required. Visit https://dashboard.emailjs.com/admin/account";
}
if (!serviceID) {
throw "The service ID is required. Visit https://dashboard.emailjs.com/admin";
}
if (!templateID) {
throw "The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";
}
return true;
};
// node_modules/@emailjs/browser/es/models/EmailJSResponseStatus.js
var EmailJSResponseStatus = class {
constructor(httpResponse) {
this.status = httpResponse ? httpResponse.status : 0;
this.text = httpResponse ? httpResponse.responseText : "Network Error";
}
};
// node_modules/@emailjs/browser/es/api/sendPost.js
var sendPost = (url, data, headers = {}) => {
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.addEventListener("load", ({ target }) => {
const responseStatus = new EmailJSResponseStatus(target);
if (responseStatus.status === 200 || responseStatus.text === "OK") {
resolve(responseStatus);
} else {
reject(responseStatus);
}
});
xhr.addEventListener("error", ({ target }) => {
reject(new EmailJSResponseStatus(target));
});
xhr.open("POST", store._origin + url, true);
Object.keys(headers).forEach((key) => {
xhr.setRequestHeader(key, headers[key]);
});
xhr.send(data);
});
};
// node_modules/@emailjs/browser/es/methods/send/send.js
var send = (serviceID, templateID, templatePrams, publicKey) => {
const uID = publicKey || store._userID;
validateParams(uID, serviceID, templateID);
const params = {
lib_version: "3.11.0",
user_id: uID,
service_id: serviceID,
template_id: templateID,
template_params: templatePrams
};
return sendPost("/api/v1.0/email/send", JSON.stringify(params), {
"Content-type": "application/json"
});
};
// node_modules/@emailjs/browser/es/methods/sendForm/sendForm.js
var findHTMLForm = (form) => {
let currentForm;
if (typeof form === "string") {
currentForm = document.querySelector(form);
} else {
currentForm = form;
}
if (!currentForm || currentForm.nodeName !== "FORM") {
throw "The 3rd parameter is expected to be the HTML form element or the style selector of form";
}
return currentForm;
};
var sendForm = (serviceID, templateID, form, publicKey) => {
const uID = publicKey || store._userID;
const currentForm = findHTMLForm(form);
validateParams(uID, serviceID, templateID);
const formData = new FormData(currentForm);
formData.append("lib_version", "3.11.0");
formData.append("service_id", serviceID);
formData.append("template_id", templateID);
formData.append("user_id", uID);
return sendPost("/api/v1.0/email/send-form", formData);
};
// node_modules/@emailjs/browser/es/index.js
var es_default = {
init,
send,
sendForm
};
export {
es_default as default,
init,
send,
sendForm
};
//# sourceMappingURL=@emailjs_browser.js.map
{
"version": 3,
"sources": ["../../@emailjs/browser/es/store/store.js", "../../@emailjs/browser/es/methods/init/init.js", "../../@emailjs/browser/es/utils/validateParams.js", "../../@emailjs/browser/es/models/EmailJSResponseStatus.js", "../../@emailjs/browser/es/api/sendPost.js", "../../@emailjs/browser/es/methods/send/send.js", "../../@emailjs/browser/es/methods/sendForm/sendForm.js", "../../@emailjs/browser/es/index.js"],
"sourcesContent": ["export const store = {\n _origin: 'https://api.emailjs.com',\n};\n", "import { store } from '../../store/store';\n/**\n * Initiation\n * @param {string} publicKey - set the EmailJS public key\n * @param {string} origin - set the EmailJS origin\n */\nexport const init = (publicKey, origin = 'https://api.emailjs.com') => {\n store._userID = publicKey;\n store._origin = origin;\n};\n", "export const validateParams = (publicKey, serviceID, templateID) => {\n if (!publicKey) {\n throw 'The public key is required. Visit https://dashboard.emailjs.com/admin/account';\n }\n if (!serviceID) {\n throw 'The service ID is required. Visit https://dashboard.emailjs.com/admin';\n }\n if (!templateID) {\n throw 'The template ID is required. Visit https://dashboard.emailjs.com/admin/templates';\n }\n return true;\n};\n", "export class EmailJSResponseStatus {\n constructor(httpResponse) {\n this.status = httpResponse ? httpResponse.status : 0;\n this.text = httpResponse ? httpResponse.responseText : 'Network Error';\n }\n}\n", "import { EmailJSResponseStatus } from '../models/EmailJSResponseStatus';\nimport { store } from '../store/store';\nexport const sendPost = (url, data, headers = {}) => {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.addEventListener('load', ({ target }) => {\n const responseStatus = new EmailJSResponseStatus(target);\n if (responseStatus.status === 200 || responseStatus.text === 'OK') {\n resolve(responseStatus);\n }\n else {\n reject(responseStatus);\n }\n });\n xhr.addEventListener('error', ({ target }) => {\n reject(new EmailJSResponseStatus(target));\n });\n xhr.open('POST', store._origin + url, true);\n Object.keys(headers).forEach((key) => {\n xhr.setRequestHeader(key, headers[key]);\n });\n xhr.send(data);\n });\n};\n", "import { store } from '../../store/store';\nimport { validateParams } from '../../utils/validateParams';\nimport { sendPost } from '../../api/sendPost';\n/**\n * Send a template to the specific EmailJS service\n * @param {string} serviceID - the EmailJS service ID\n * @param {string} templateID - the EmailJS template ID\n * @param {object} templatePrams - the template params, what will be set to the EmailJS template\n * @param {string} publicKey - the EmailJS public key\n * @returns {Promise<EmailJSResponseStatus>}\n */\nexport const send = (serviceID, templateID, templatePrams, publicKey) => {\n const uID = publicKey || store._userID;\n validateParams(uID, serviceID, templateID);\n const params = {\n lib_version: '3.11.0',\n user_id: uID,\n service_id: serviceID,\n template_id: templateID,\n template_params: templatePrams,\n };\n return sendPost('/api/v1.0/email/send', JSON.stringify(params), {\n 'Content-type': 'application/json',\n });\n};\n", "import { store } from '../../store/store';\nimport { validateParams } from '../../utils/validateParams';\nimport { sendPost } from '../../api/sendPost';\nconst findHTMLForm = (form) => {\n let currentForm;\n if (typeof form === 'string') {\n currentForm = document.querySelector(form);\n }\n else {\n currentForm = form;\n }\n if (!currentForm || currentForm.nodeName !== 'FORM') {\n throw 'The 3rd parameter is expected to be the HTML form element or the style selector of form';\n }\n return currentForm;\n};\n/**\n * Send a form the specific EmailJS service\n * @param {string} serviceID - the EmailJS service ID\n * @param {string} templateID - the EmailJS template ID\n * @param {string | HTMLFormElement} form - the form element or selector\n * @param {string} publicKey - the EmailJS public key\n * @returns {Promise<EmailJSResponseStatus>}\n */\nexport const sendForm = (serviceID, templateID, form, publicKey) => {\n const uID = publicKey || store._userID;\n const currentForm = findHTMLForm(form);\n validateParams(uID, serviceID, templateID);\n const formData = new FormData(currentForm);\n formData.append('lib_version', '3.11.0');\n formData.append('service_id', serviceID);\n formData.append('template_id', templateID);\n formData.append('user_id', uID);\n return sendPost('/api/v1.0/email/send-form', formData);\n};\n", "import { init } from './methods/init/init';\nimport { send } from './methods/send/send';\nimport { sendForm } from './methods/sendForm/sendForm';\nexport { init, send, sendForm };\nexport default {\n init,\n send,\n sendForm,\n};\n"],
"mappings": ";;;AAAO,IAAM,QAAQ;AAAA,EACjB,SAAS;AACb;;;ACIO,IAAM,OAAO,CAAC,WAAW,SAAS,8BAA8B;AACnE,QAAM,UAAU;AAChB,QAAM,UAAU;AACpB;;;ACTO,IAAM,iBAAiB,CAAC,WAAW,WAAW,eAAe;AAChE,MAAI,CAAC,WAAW;AACZ,UAAM;AAAA,EACV;AACA,MAAI,CAAC,WAAW;AACZ,UAAM;AAAA,EACV;AACA,MAAI,CAAC,YAAY;AACb,UAAM;AAAA,EACV;AACA,SAAO;AACX;;;ACXO,I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AS,cAAc,IAAI;AAAA,EAC7C,OACK;AACD,kBAAc;AAAA,EAClB;AACA,MAAI,CAAC,eAAe,YAAY,aAAa,QAAQ;AACjD,UAAM;AAAA,EACV;AACA,SAAO;AACX;AASO,IAAM,WAAW,CAAC,WAAW,YAAY,MAAM,cAAc;AAChE,QAAM,MAAM,aAAa,MAAM;AAC/B,QAAM,cAAc,aAAa,IAAI;AACrC,iBAAe,KAAK,WAAW,UAAU;AACzC,QAAM,WAAW,IAAI,SAAS,WAAW;AACzC,WAAS,OAAO,eAAe,QAAQ;AACvC,WAAS,OAAO,cAAc,SAAS;AACvC,WAAS,OAAO,eAAe,UAAU;AACzC,WAAS,OAAO,WAAW,GAAG;AAC9B,SAAO,SAAS,6BAA6B,QAAQ;AACzD;;;AC9BA,IAAO,aAAQ;AAAA,EACX;AAAA,EACA;AAAA,EACA;AACJ;",
"names": []
}
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment