diff --git a/.github/workflows/RunTest.yml b/.github/workflows/RunTest.yml new file mode 100644 index 0000000..c4e574d --- /dev/null +++ b/.github/workflows/RunTest.yml @@ -0,0 +1,25 @@ +name: Run Test + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm install diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5693cd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules +.env +package-lock.json diff --git a/.replit b/.replit new file mode 100644 index 0000000..f764e23 --- /dev/null +++ b/.replit @@ -0,0 +1,22 @@ + +run = "nix-shell build.nix" +entrypoint = "index.js" + +language = "nodejs" + +[nix] +channel="stable-21_11" + +[packager] +language = "nodejs" + +[packager.features] +packageSearch = true +guessImports = true + +[languages.nodejs] +pattern = "**/*.js" +syntax = "nodejs" + +[languages.nodejs.languageServer] +start = [ "typescript-language-server", "--stdio" ] \ No newline at end of file diff --git a/Alpis.js b/Alpis.js new file mode 100644 index 0000000..fba0741 --- /dev/null +++ b/Alpis.js @@ -0,0 +1,11 @@ +//_______________________ ┏ Info β”“ _______________________\\ +// +// Credit : AlipBot +// +// Note +// Jangan Jual SC ini , +// Jangan Buang Text ini, +// Siapa Mahu Upload Jangan Lupa Credit :), +// Siapa Tidak Letak Credit Akan Ambil Tindakan +// +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ diff --git a/README.md b/README.md new file mode 100644 index 0000000..b9a2da4 --- /dev/null +++ b/README.md @@ -0,0 +1,172 @@ + +

+ +

+

+ +

+

+ +

+

+ + + + + + + +   +

+ + +* # TUTORIAL πŸ“Œ + + +* ## STEP 1 +Forks Github Ini Klick Di Bawah + +[![Fork](https://telegra.ph/file/0ac5b4f21a7c153f3bfc7.png)](https://github.com/AlipBot/api-alpis/fork) + + +* ## STEP 2 +Buat Account Mongodb Dan Buat Database Klick Di Bawah + +[![Deploy to Render](https://telegra.ph/file/1bc5c9749e8a46d167619.png)](https://www.mongodb.com/cloud/atlas/register) + +* ## STEP 3 + +Buat Email SMTP + + [`Tutorial Cara buat Email SMTP FREE Click ME`](https://www.youtube.com/watch?v=1YXVdyVuFGA)
+ +* ## STEP 4 + + Buat Account Render Klick Di bawah + +[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://dashboard.render.com/) + +Buat Web Service Baru + +Connect Account Github + +Connect repository Github Yang Kamu Fork Tadi + +Build Command Paste +``` +npm install +``` + +Start Command Paste + +``` +npm start +``` + +Klick Advanced Dan + +Tambah Environment Variable + +``` +mongodb = "Key Database mongodb Kamu" +sendemail = 'Email SMTP' +fromsendemail = 'EMAIL SMTP sama dengan atas' +sendpwmail = "Password EMAIL SMTP" + +GET APIKEY RECAPTCHA From https://www.google.com/recaptcha/admin/create + +recaptcha_key_1 = 'Key recaptchaV1 Kamu' +recaptcha_key_2 = 'Key recaptchaV2 Kamu' +``` + + +Lepastu + +Tekan Create web service + +lepas siap deploy add domain website kamu ke file setting dan buat key recaptcha kamu +copy paste kat Environment Variable di + +``` +recaptcha_key_1 = 'Key recaptchaV1 Kamu' +recaptcha_key_2 = 'Key recaptchaV2 Kamu' +``` + +* ## Tutorial Youtube + + + + [`Tutorial In Youtube`](https://youtu.be/5K3YYuq7QoI)
+ +* ## SETTING βš™οΈ +File Setting ``setting.js`` + +[`Tukar Nama Creator Disini`](https://github.com/AlipBot/Api-Alpis/blob/master/settings.js#:~:text=creator%20%3D%20%27-,%E4%B9%82%F0%9D%98%BC%F0%9D%99%A1%F0%9D%99%9E%F0%9D%99%A5%E4%B9%82,-%27%20//%20Nama)
+[`Tukar Port Disini`](https://github.com/AlipBot/Api-Alpis/blob/master/settings.js#:~:text=port%20%3D-,8080,-//port%20host)
+[`Tukar Limit Apikey Disini`](https://github.com/AlipBot/Api-Alpis/blob/master/settings.js#:~:text=LimitApikey%20%3D-,200,-//%20Limit%20Apikey%20default)
+ + +## Command Untuk Editing + +``` + npm start +``` + or + +``` + npm run node +``` + +* ## FEATURE LIST πŸ’‘ + + +| FEATURE MY SCRIPT |🌱| +| ------------- | ------------- | +| Login |βœ”οΈ| +| Sing Up |βœ”οΈ| +| NO TEMP Email |βœ”οΈ| +| Anti Spam Email |βœ”οΈ| +| Verification Email |βœ”οΈ| +| Change Password |βœ”οΈ| +| DATABASE |βœ”οΈ| +| Limit Apikey And Auto Reset |βœ”οΈ| +| Anti Error |βœ”οΈ| + + + +| FEATURE API |🌱| +| ------------- | ------------- | +| Dowloader |βœ”οΈ| +| Text Pro |βœ”οΈ| +| Photooxy |βœ”οΈ| +| Sound Of Text |βœ”οΈ| +| Search |βœ”οΈ| +| Random Gambar |βœ”οΈ| +| Game |βœ”οΈ| +| Maker |βœ”οΈ| +| Link Short |βœ”οΈ| +| Information |βœ”οΈ| +| Tools |βœ”οΈ| +| Islamic |βœ”οΈ| + + +* ## Hasil Deploy🌍 + +[`alpis.eu.org `](https://alpis.eu.org)
+ + +* ## Support Deploy Free +
+ + + + +## ``Credit πŸ’³ Script`` + + + +[`AlipBot`](https://github.com/AlipBot)
+ + + +``Halal Rest API`` diff --git a/asset/Alpis.js b/asset/Alpis.js new file mode 100644 index 0000000..fba0741 --- /dev/null +++ b/asset/Alpis.js @@ -0,0 +1,11 @@ +//_______________________ ┏ Info β”“ _______________________\\ +// +// Credit : AlipBot +// +// Note +// Jangan Jual SC ini , +// Jangan Buang Text ini, +// Siapa Mahu Upload Jangan Lupa Credit :), +// Siapa Tidak Letak Credit Akan Ambil Tindakan +// +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ diff --git a/asset/font/Alpis.js b/asset/font/Alpis.js new file mode 100644 index 0000000..fba0741 --- /dev/null +++ b/asset/font/Alpis.js @@ -0,0 +1,11 @@ +//_______________________ ┏ Info β”“ _______________________\\ +// +// Credit : AlipBot +// +// Note +// Jangan Jual SC ini , +// Jangan Buang Text ini, +// Siapa Mahu Upload Jangan Lupa Credit :), +// Siapa Tidak Letak Credit Akan Ambil Tindakan +// +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ diff --git a/asset/font/Creme.ttf b/asset/font/Creme.ttf new file mode 100644 index 0000000..0cb0551 Binary files /dev/null and b/asset/font/Creme.ttf differ diff --git a/asset/font/SF-Pro.ttf b/asset/font/SF-Pro.ttf new file mode 100644 index 0000000..5ae2faf Binary files /dev/null and b/asset/font/SF-Pro.ttf differ diff --git a/asset/image/Alpis.js b/asset/image/Alpis.js new file mode 100644 index 0000000..fba0741 --- /dev/null +++ b/asset/image/Alpis.js @@ -0,0 +1,11 @@ +//_______________________ ┏ Info β”“ _______________________\\ +// +// Credit : AlipBot +// +// Note +// Jangan Jual SC ini , +// Jangan Buang Text ini, +// Siapa Mahu Upload Jangan Lupa Credit :), +// Siapa Tidak Letak Credit Akan Ambil Tindakan +// +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ diff --git a/asset/image/attp.gif b/asset/image/attp.gif new file mode 100644 index 0000000..43c6c07 Binary files /dev/null and b/asset/image/attp.gif differ diff --git a/asset/image/wbg1.jpg b/asset/image/wbg1.jpg new file mode 100644 index 0000000..dcc331b Binary files /dev/null and b/asset/image/wbg1.jpg differ diff --git a/build.nix b/build.nix new file mode 100644 index 0000000..f88cf45 --- /dev/null +++ b/build.nix @@ -0,0 +1,18 @@ +# DO NOT CHANGE THIS FILE + +with import { }; +stdenv.mkDerivation { + name = "env"; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ + libpng + libjpeg + libuuid + ]; + + shellHook = '' + LD=$CC + + nix-shell run.nix + ''; +} \ No newline at end of file diff --git a/controller/passportLocal.js b/controller/passportLocal.js new file mode 100644 index 0000000..926ee27 --- /dev/null +++ b/controller/passportLocal.js @@ -0,0 +1,40 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const user = require('../model/user'); +const bcryptjs = require('bcryptjs'); +var localStrategy = require('passport-local').Strategy; + +module.exports = function (passport) { + passport.use(new localStrategy({ usernameField: 'email' }, (email, password, done) => { + user.findOne({ email: email }, (err, data) => { + if (err) throw err; + if (!data) { + return done(null, false, { message: "User Doesn't Exist !" }); + } + bcryptjs.compare(password, data.password, (err, match) => { + if (err) { + return done(null, false); + } + if (!match) { + return done(null, false, { message: "Password Doesn't match !" }); + } + if (match) { + return done(null, data); + } + }) + }) + })); + + passport.serializeUser(function (user, done) { + done(null, user.id); + }); + + passport.deserializeUser(function (id, done) { + user.findById(id, function (err, user) { + done(err, user); + }); + }); + +} + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Make By AlipBot β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ diff --git a/controller/sendMail.js b/controller/sendMail.js new file mode 100644 index 0000000..a76bcbb --- /dev/null +++ b/controller/sendMail.js @@ -0,0 +1,416 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +require('../settings') +const nodemailer = require("nodemailer"); + +var smtpTransport = nodemailer.createTransport({ + service: servicesmtp, + auth: { + user: sendemail, + pass: sendpwmail, + }, +}); + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Send Reset Emailβ”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +module.exports.sendResetEmail = async (email, token) => { + return new Promise(async(resolve, rejecet) => { + + var url = `http://${domain}/reset-password?token=` + token; + + await smtpTransport.sendMail({ + from: fromsendemail, + to: email, + subject: "MENETAPKAN SEMULA KATA LALUAN ANDA", + html: ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + Logo + +
+ +
+ + + + + +
+

Menetapkan Semula Kata Laluan Anda

+
+ +
+ + + + + + + + + + + + + + + + +
+

+ Masalah melog masuk?
Menetapkan semula kata laluan anda adalah mudah.

Hanya tekan butang di bawah dan ikut arahan. Kami akan membantu anda beroperasi dalam masa yang singkat.

+
+ + + + +
+ + + + +
+ Menetapkan semula kata laluan +
+
+
+

Aliff,
${domain}

+
+ +
+ + + + + + + +
+

Jika anda tidak membuat permintaan ini, sila abaikan e-mel ini..

+
+ +
+ + + + + ` + }, (error, info) => { + if (error) { + resolve('error') + console.log(`[!] Warning SMTP error ,Limit Habis`); + } else{ + resolve() + } + }); + + }) + +} + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Send Verify Email β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +module.exports.sendVerifyEmail = async (email, token) => { + return new Promise(async(resolve, rejecet) => { + var url = `http://${domain}/verifyemail?token=` + token; + + await smtpTransport.sendMail({ + from: fromsendemail, + to: email, + subject: "SAHKAN EMAIL ANDA", + html: ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + Logo + +
+ +
+ + + + + +
+

Sahkan Alamat E-mel Anda

+
+ +
+ + + + + + + + + + + + + + + + +
+

Terima kasih kerana guna rest api alpis, Sila tekan button di bawah untuk sahkan akaun anda.

+
+ + + + +
+ + + + +
+ Sahkan E-mel +
+
+
+

Aliff,
${domain}

+
+ +
+ + + + + + + +
+

Anda menerima e-mel ini kerana kami menerima permintaan untuk pengesahan akaun untuk akaun anda. Jika anda tidak meminta pengesahan akaun anda boleh memadamkan e-mel ini dengan selamat.

+
+ +
+ + + + + `, +}, (error, info) => { + if (error) { + resolve('error') + console.log(`[!] Warning SMTP error ,Limit Habis`); + } else{ + resolve() + } +}); + +}) + +} + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Make by Alip β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..9eafecf --- /dev/null +++ b/index.js @@ -0,0 +1,140 @@ +//_______________________ ┏ Info β”“ _______________________\\ +// +// Credit : AlipBot +// +// Note +// Jangan Jual SC ini , +// Jangan Buang Text ini, +// Siapa Mahu Upload Jangan Lupa Credit :), +// Siapa Tidak Letak Credit Akan Ambil Tindakan +// +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +require("./settings"); +const express = require("express"); +const app = express(); +const favicon = require("serve-favicon"); +const path = require("path"); +const cookieParser = require("cookie-parser"); +const createError = require("http-errors"); +const mongoose = require("mongoose"); +const expressSession = require("express-session"); +const MemoryStore = require("memorystore")(expressSession); +const passport = require("passport"); +const flash = require("connect-flash"); +const csrf = require("csurf"); +const cron = require("node-cron"); +const bodyParser = require("body-parser"); +const User = require("./model/user"); +const dataweb = require("./model/DataWeb"); + +//_______________________ ┏ Funtion β”“ _______________________\\ + +async function resetapi() { + await User.updateMany({}, { $set: { limitApikey: LimitApikey } }); + console.log("RESET LIMIT DONE"); +} + +async function ResetRequestToday() { + await dataweb.updateOne( + {}, + { + RequestToday: 0, + } + ); + console.log("RESET Request Today DONE"); +} + +//_______________________ ┏ Code β”“ _______________________\\ + +(cors = require("cors")), (secure = require("ssl-express-www")); +app.use(favicon(path.join(__dirname, "public", "images", "favicon.ico"))); +var main = require("./routes/main"), + api = require("./routes/api"); +app.set("view engine", "ejs"); +app.set("views", __dirname + "/view"); +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: true })); + +//_______________________ ┏ Connect Database β”“ _______________________\\ + +mongoose.set("strictQuery", false); +mongoose + .connect(keymongodb, { useNewUrlParser: true, useUnifiedTopology: true }) + .then(async () => { + console.log("Connected !"); + let limit = await dataweb.findOne(); + if (limit === null) { + let obj = { RequestToday: 0 }; + await dataweb.create(obj); + console.log("DATA WEBSITE Sussces Create"); + } + }); + +//_______________________ ┏ CronJob For Reset Limit β”“ _______________________\\ + +// Reset Request Today Setiap sehari +cron.schedule( + "0 0 0 * * *", + () => { + ResetRequestToday(); + }, + { + scheduled: true, + timezone: "Asia/Jakarta", + } +); + +//Reset All User Apikey Limit setiap sebulan +cron.schedule( + "0 0 1 * *", + () => { + resetapi(); + }, + { + scheduled: true, + timezone: "Asia/Jakarta", + } +); + +//_______________________ ┏ Code β”“ _______________________\\ + +app.use(cookieParser("random")); +app.use( + expressSession({ + secret: "random", + resave: true, + saveUninitialized: true, + maxAge: 24 * 60 * 60 * 1000, + store: new MemoryStore(), + }) +); +app.use(csrf()); +app.use(passport.initialize()); +app.use(express.static("public")); +app.use(passport.session()); +app.set("trust proxy", true); +app.set("json spaces", 2); +app.use(cors()); +app.use(secure); +app.use(flash()); +app.use(function (req, res, next) { + res.locals.success_messages = req.flash("success_messages"); + res.locals.error_messages = req.flash("error_messages"); + res.locals.error = req.flash("error"); + next(); +}); +app.use("/", main); +app.use("/", api); +app.use(function (req, res, next) { + next(createError(404)); +}); +app.use(function (err, req, res, next) { + res.render("404"); +}); + +module.exports = app; + +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ diff --git a/lib/Alpis.js b/lib/Alpis.js new file mode 100644 index 0000000..fba0741 --- /dev/null +++ b/lib/Alpis.js @@ -0,0 +1,11 @@ +//_______________________ ┏ Info β”“ _______________________\\ +// +// Credit : AlipBot +// +// Note +// Jangan Jual SC ini , +// Jangan Buang Text ini, +// Siapa Mahu Upload Jangan Lupa Credit :), +// Siapa Tidak Letak Credit Akan Ambil Tindakan +// +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ diff --git a/lib/api/Alpis.js b/lib/api/Alpis.js new file mode 100644 index 0000000..fba0741 --- /dev/null +++ b/lib/api/Alpis.js @@ -0,0 +1,11 @@ +//_______________________ ┏ Info β”“ _______________________\\ +// +// Credit : AlipBot +// +// Note +// Jangan Jual SC ini , +// Jangan Buang Text ini, +// Siapa Mahu Upload Jangan Lupa Credit :), +// Siapa Tidak Letak Credit Akan Ambil Tindakan +// +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ diff --git a/lib/api/apidl.js b/lib/api/apidl.js new file mode 100644 index 0000000..43f744b --- /dev/null +++ b/lib/api/apidl.js @@ -0,0 +1,1197 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const cheerio = require("cheerio") +const axios = require("axios") +const qs = require("qs") +const fetch = require('node-fetch') +const FormData = require('form-data') +const request = require("request") +var export_data = require("./export"); +const { rest } = require("lodash") +const e = require("connect-flash") + + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Funtion β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +function parseFileSize(size) { + return parseFloat(size) * (/GB/i.test(size) + ? 1000000 + : /MB/i.test(size) + ? 1000 + : /KB/i.test(size) + ? 1 + : /bytes?/i.test(size) + ? 0.001 + : /B/i.test(size) + ? 0.1 + : 0); +} + +//―――――――――――――――――――――――――――――――――――――――――― ┏ ApiDl By Alip β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + + +function zippyshare(url) { + return new Promise(async(resolve, reject) => { + const [_, __, host, ___, id] = url.split('/'); + var _a, _b, _c; + if (!/zippyshare\.com/.test(url)) return resolve() + if (host == 'www32.zippyshare.com') { + const res = await axios.get(url); + const $ = cheerio.load(res.data); + const filename = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(4)').text() + const filesizeH = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(7)').text() + const filesize = (0, parseFileSize)(filesizeH); + const aploud = $('#lrbox > div:nth-child(2) > div:nth-child(1) > font:nth-child(10)').text() + const urlId = (_c = (_b = /\((.*?)\)/i.exec((_a = $.html().split('document.getElementById(\'dlbutton\').href =')[1]) === null || _a === void 0 ? void 0 : _a.split(';')[0])) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.trim(); + if (!urlId) { + resolve() + } + const urlIdRes = eval(urlId); + const _url = `https://${host}/d/${id}/${urlIdRes}/${filename}`; + const url2 = `https://${host}/i/${id}/${urlIdRes}/${filename}` + const result = { + url: _url, + url2, + filename, + filesizeH, + filesize, + aploud + }; + return resolve(result); + + }else{ + + const res = await axios.get(url); + const $ = cheerio.load(res.data); + const $lrbox = $('#lrbox > div.left'); + const filename = $lrbox.find('font').eq(2).text().trim(); + const $div = $lrbox.find('div').eq(0).find('div').eq(0); + const filesizeH = $div.find('font').eq(1).text().trim(); + const filesize = (0, parseFileSize)(filesizeH); + const aploud = $div.find('font').eq(3).text().trim(); + const lastDownload = $div.find('font').eq(5).text().trim(); + const urlId = (_c = (_b = /\((.*?)\)/i.exec((_a = $.html().split('document.getElementById(\'dlbutton\').href =')[1]) === null || _a === void 0 ? void 0 : _a.split(';')[0])) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.trim(); + if (!urlId) { + resolve() + } + const urlIdRes = eval(urlId); + const _url = `https://${host}/d/${id}/${urlIdRes}/${filename}`; + const result = { + url: _url, + filename, + filesizeH, + filesize, + upload_date: aploud, + lastDownload + }; + return resolve(result); + } + }) +} + +function mediafiredl(url) { + return new Promise(async(resolve, reject) => { + var a, b; + if (!/https?:\/\/(www\.)?mediafire\.com/.test(url)) return resolve() + const data = await axios.get(url).catch(function (error) {}) + if (!data) { + resolve() + } else { + const $ = cheerio.load(data.data); + const Url = ($('#downloadButton').attr('href') || '').trim(); + const url2 = ($('#download_link > a.retry').attr('href') || '').trim(); + const $intro = $('div.dl-info > div.intro'); + const filename = $intro.find('div.filename').text().trim(); + const filetype = $intro.find('div.filetype > span').eq(0).text().trim(); + const ext = ((b = (a = /\(\.(.*?)\)/.exec($intro.find('div.filetype > span').eq(1).text())) === null || a === void 0 ? void 0 : a[1]) === null || b === void 0 ? void 0 : b.trim()) || 'bin'; + const $li = $('div.dl-info > ul.details > li'); + const aploud = $li.eq(1).find('span').text().trim(); + const filesizeH = $li.eq(0).find('span').text().trim(); + const filesize = (0, parseFileSize)(filesizeH); + const result = { + url: Url || url2, + url2, + filename, + filetype, + ext, + upload_date: aploud, + filesizeH, + filesize + }; + resolve(result) + } + + }) +} + + +function sfilemobiSearch(query, page = 1) { + return new Promise(async(resolve, reject) => { + const html = await axios.get(`https://sfile.mobi/search.php?q=${query}&page=${page}`) + const $ = cheerio.load(html.data); + const results = []; + $('div > div > div > div.list').each((_, el) => { + var _a, _b; + const $el = $(el); + const url = $el.find('a').attr('href'); + const filename = $el.find('a').text(); + const icon = $el.find('img').attr('src'); + const type = (_a = /\/smallicon\/(.*?)\.svg/.exec(icon)) === null || _a === void 0 ? void 0 : _a[1]; + const filesizeH = (_b = /\((.*?)\)/.exec($el.text())) === null || _b === void 0 ? void 0 : _b[1]; + const filesize = filesizeH && (0, parseFileSize)(filesizeH); + if (filename && url) { + results.push({ + url, + filename, + icon: icon, + type: type, + filesizeH: filesizeH, + filesize: filesize + }); + } + }); + if (!results.length) { + resolve() + } + return resolve(results) + }) +} + + +function sfilemobi(url) { + return new Promise(async(resolve, reject) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + if (!/sfile\.mobi/i.test(url)) return resolve() + const html = await axios.get(url).catch(function (error) {}) + if (!html) { + resolve(); + }else{ + const $ = cheerio.load(html.data); + const $k = (_a = /var z = (.*?);/i.exec($.html())) === null || _a === void 0 ? void 0 : _a[1]; + const urlPage = (((_d = (((_b = /var db = "(.*?)"/i.exec($.html())) === null || _b === void 0 ? void 0 : _b[1]) || ((_c = /var sf = "(.*?)"/i.exec($.html())) === null || _c === void 0 ? void 0 : _c[1]))) === null || _d === void 0 ? void 0 : _d.replace(/\\(\\)?/gi, '')) || + $('#download').attr('href')) + `&k=${$k}`; + const filename = $('div.intro-container > img').attr('alt') || $('div.intro-container > h1').text(); + const icon = $('div.intro-container > img').attr('src'); + const type = (_e = /\/smallicon\/(.*?)\.svg/.exec(icon)) === null || _e === void 0 ? void 0 : _e[1]; + const $list = $('div.list'); + const mimetype = (_f = $list.eq(0).text().split('-')[1]) === null || _f === void 0 ? void 0 : _f.trim(); + const aploud = (_g = $list.eq(2).text().split('Uploaded:')[1]) === null || _g === void 0 ? void 0 : _g.trim(); + const $aploud = $list.eq(1).find('a'); + const aploudby = $aploud.eq(0).text(); + const aploudbyUrl = $aploud.eq(0).attr('href'); + const aploudon = $aploud.eq(1).text(); + const aploudonUrl = $aploud.eq(1).attr('href'); + const decs = $('body > div.w3-row-padding.w3-container.w3-white > div > div:nth-child(1) > div:nth-child(6) ').text() + const downloads = parseInt((_h = $list.eq(3).text().split('Downloads:')[1]) === null || _h === void 0 ? void 0 : _h.trim()); + const filesizeH = (_j = /\((.*?)\)/i.exec($('#download').text())) === null || _j === void 0 ? void 0 : _j[1]; + const filesize = filesizeH && (0, parseFileSize)(filesizeH); + const results = { + url: urlPage, + decs, + filename, + icon, + type, + mimetype, + upload_date: aploud, + upload_by: aploudby, + upload_byUrl: aploudbyUrl, + upload_don: aploudon, + upload_donUrl: aploudonUrl, + downloads_count: downloads, + filesizeH, + filesize: filesize + }; + resolve(results); + } + }) +} + +function musically(URL) { + return new Promise((resolve, rejecet) => { + axios.get('https://musicaldown.com/id', { + headers: { + 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36' + } + }).then(res => { + const $ = cheerio.load(res.data) + const url_name = $("#link_url").attr("name") + const token_name = $("#submit-form > div").find("div:nth-child(1) > input[type=hidden]:nth-child(2)").attr("name") + const token_ = $("#submit-form > div").find("div:nth-child(1) > input[type=hidden]:nth-child(2)").attr("value") + const verify = $("#submit-form > div").find("div:nth-child(1) > input[type=hidden]:nth-child(3)").attr("value") + let data = { + [`${url_name}`]: URL, + [`${token_name}`]: token_, + verify: verify + } + axios.request({ + url: 'https://musicaldown.com/id/download', + method: 'post', + data: new URLSearchParams(Object.entries(data)), + headers: { + 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', + 'cookie': res.headers["set-cookie"] + } + }).then(respon => { + const ch = cheerio.load(respon.data) + + if(!ch('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l4.center-align > div > div > img').attr('src')){ + + let hasil = [] + ch('body > div.welcome.section > div > div:nth-child(3) > div > div.row > div').each(function (a, b) { + hasil.push({ + url: ch(b).find('img').attr('src'), + url_download: ch(b).find('a').attr('href') + }) + }) + + let result = { + audio: ch('body > div.welcome.section > div > div:nth-child(3) > div > a.btn.waves-effect.waves-light.orange.download').attr('href'), + photo: hasil + } + if (!result.photo[0]){ + resolve() + }else{ + resolve(result) + } + + }else{ + + axios.request({ + url: 'https://musicaldown.com/id/mp3', + method: 'post', + headers: { + 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', + 'cookie': res.headers["set-cookie"] + } + }).then(resaudio => { + const hc = cheerio.load(resaudio.data) + const result = { + pp: ch('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l4.center-align > div > div > img').attr('src'), + username: ch('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l4.center-align > div > h2:nth-child(2) > b').text(), + description: ch('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l4.center-align > div > h2:nth-child(3)').text(), + video: ch('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l8 > a:nth-child(3)').attr('href'), + video2: ch('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l8 > a:nth-child(5)').attr('href'), + video_HD: ch('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l8 > a:nth-child(7)').attr('href'), + video_watermark: ch('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l8 > a:nth-child(9)').attr('href'), + audio: hc('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l8 > a:nth-child(6)').attr('href'), + audio_Download: hc('body > div.welcome.section > div > div:nth-child(3) > div.col.s12.l8 > a.btn.waves-effect.waves-light.orange.download').attr('href') + } + resolve(result) + }) + } + }) +}) +}) +} + +function ringtone(title) { + return new Promise((resolve, reject) => { + axios.get('https://meloboom.com/en/search/'+title) + .then((get) => { + let $ = cheerio.load(get.data) + let hasil = [] + $('#__next > main > section > div.jsx-2244708474.container > div > div > div > div:nth-child(4) > div > div > div > ul > li').each(function (a, b) { + hasil.push({ title: $(b).find('h4').text(), source: 'https://meloboom.com/'+$(b).find('a').attr('href'), audio: $(b).find('audio').attr('src') }) + }) + resolve(hasil) + }).catch(reject) + }) +} + + +function aiovideodl(link) { + return new Promise((resolve, reject) => { + axios({ + url: 'https://aiovideodl.ml/', + method: 'GET', + headers: { + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653" + } + }).then((src) => { + let a = cheerio.load(src.data) + let token = a('#token').attr('value') + axios({ + url: 'https://aiovideodl.ml/wp-json/aio-dl/video-data/', + method: 'POST', + headers: { + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "cookie": "PHPSESSID=69ce1f8034b1567b99297eee2396c308; _ga=GA1.2.1360894709.1632723147; _gid=GA1.2.1782417082.1635161653" + }, + data: new URLSearchParams(Object.entries({ 'url': link, 'token': token })) + }).then(({ data }) => { + + resolve(data.medias) + }, + (error) => { + resolve() + } + ) + + }) + .catch(reject) + }) +} + +function wikimedia(title) { + return new Promise((resolve, reject) => { + axios.get(`https://commons.wikimedia.org/w/index.php?search=${title}&title=Special:MediaSearch&go=Go&type=image`) + .then((res) => { + let $ = cheerio.load(res.data) + let hasil = [] + $('.sdms-search-results__list-wrapper > div > a').each(function (a, b) { + hasil.push({ + title: $(b).find('img').attr('alt'), + source: $(b).attr('href'), + image: $(b).find('img').attr('data-src') || $(b).find('img').attr('src') + }) + }) + + resolve(hasil) + }) + .catch(reject) + }) +} + +function wallpaper(title, page = '1') { + return new Promise((resolve, reject) => { + const random = [1,2,3,4,5,6,7,8,9,10] + let randomgambar = random[Math.floor(Math.random() * random.length)] + axios.get(`https://www.besthdwallpaper.com/search?CurrentPage=${randomgambar}&q=${title}`) + .then(({ data }) => { + let $ = cheerio.load(data) + let hasil = [] + $('div.grid-item').each(function (a, b) { + hasil.push({ + title: $(b).find('div.info > a > h3').text(), + type: $(b).find('div.info > a:nth-child(2)').text(), + source: 'https://www.besthdwallpaper.com'+$(b).find('div > a:nth-child(3)').attr('href'), + image: $(b).find('picture > source:nth-child(2)').attr('srcset') + }) + }) + + resolve(hasil) + }) + .catch(reject) + }) +} + + +function covid(){ + return new Promise(async(resolve, reject) => { + axios.get('https://covid19.go.id/') + .then(({ data }) => { + const $ = cheerio.load(data) + const hasil = []; + $('#case > div > div > div > div > div:nth-child(2)').each(function(a,b) { + const pindo = $(b).find('div:nth-child(3) > strong').text() + const mindo = $(b).find('div:nth-child(5) > strong').text() + const sindo = $(b).find('div:nth-child(4) > strong').text() + const upindo = $(b).find('div.pt-4.text-color-black.text-1').text().trim() + $('#case > div > div > div > div > div:nth-child(1)').each(function(c,d) { + const neg = $(d).find('div:nth-child(3) > strong').text() + const pglo = $(d).find('div:nth-child(4) > strong').text() + const nglo = $(d).find('div:nth-child(5) > strong').text() + const up = $(d).find('div.pt-4.text-color-grey.text-1').text().trim() + const result = { + indo : { + positif_indo: pindo, + meninggal_indo: mindo, + sembuh_indo: sindo, + update_indo: upindo.split(':')[1] + }, + global: { + negara: neg, + positif: pglo, + meninggal: nglo, + update: up.split(':')[1].split('\n')[0] + + } + } + hasil.push(result) + }) + }) + resolve(hasil) + }) + .catch(reject) + }) +} + + + +function tebakgambar() { + return new Promise(async(resolve, reject) => { + axios.get('https://jawabantebakgambar.net/all-answers/') + .then(({ data }) => { + const $ = cheerio.load(data) + const result = []; + let random = Math.floor(Math.random() * 2836) + 2; + let link2 = 'https://jawabantebakgambar.net' + $(`#images > li:nth-child(${random}) > a`).each(function(a, b) { + const img = link2 + $(b).find('img').attr('data-src') + const jwb = $(b).find('img').attr('alt') + result.push({ + image: img, + jawaban: jwb + }) + let res = result[Math.floor(Math.random() * result.length)] + resolve(res) + }) + }) + .catch(reject) + }) +} + +function surah(no){ + return new Promise(async(resolve, reject) => { + axios.get('https://kalam.sindonews.com/surah/' + no) + .then(({ data }) => { + const $ = cheerio.load(data) + + const result = []; + const ar = []; + const id = []; + const lt = []; + $('div.ayat-arab').each(function(a, b) { + ar.push($(b).text()) + }) + $('li > div.ayat-text').each(function(e, f) { + id.push($(f).text().replace(',','').trim()) }) + $('div.ayat-latin').each(function(g, h) { + lt.push($(h).text().trim()) }) + for(let i = 0; i < ar.length ; i++){ + result.push({ + arab: ar[i], + rumi: id[i], + latin: lt[i], + }) + } + var ya = $('body > main > div.container > div.content.clearfix > div.news.col-md-9 > section > div.list-content.clearfix > div:nth-child(1) > div.ayat-title > h1').text() + if (!ya ) { + resolve() + }else{ + resolve(result) + } + + }) + .catch(reject) + }) +} +function sholat(NO) { + return new Promise(async(resolve, reject) =>{ + axios.get('https://kalam.sindonews.com/jadwalsholat/' + NO).then(({ data }) => { + const $ = cheerio.load(data) + const result = {}; + $('div.imsakiyah-content').each(function(a, b) { + result.Tanggal = $(b).find('tr:nth-child(1) > td:nth-child(1)').text() + result.imsak = $(b).find('tr:nth-child(1) > td:nth-child(2)').text() + result.subuh = $(b).find('tr:nth-child(1) > td:nth-child(3)').text() + result.zuhur = $(b).find('tr:nth-child(1) > td:nth-child(4)').text() + result.ashar = $(b).find('tr:nth-child(1) > td:nth-child(5)').text() + result.maghrib = $(b).find('tr:nth-child(1) > td:nth-child(6)').text() + result.isya = $(b).find('tr:nth-child(1) > td:nth-child(7)').text() + }) + resolve(result) + }) + .catch(reject) + }) +} + +function lirik(link,title){ + return new Promise(async(resolve, reject) => { + axios.get(link).then(async({ data }) => { + const $ = cheerio.load(data) + const hasil = {}; + hasil.tajuk = title + hasil.artis = $('#site > div > div > div > main > div > div > div.mxm-track-banner.top > div > div > div > div.col-sm-10.col-md-8.col-ml-9.col-lg-9.static-position > div.track-title-header > div.mxm-track-title > h2 > span > a').text() + hasil.thumb = 'https:' + $('div.col-sm-1.col-md-2.col-ml-3.col-lg-3.static-position > div > div > div').find('img').attr('src') + $('div.col-sm-10.col-md-8.col-ml-6.col-lg-6 > div.mxm-lyrics').each(function(a,b) { + hasil.lirik = $(b).find('span > p > span').text() +'\n' + $(b).find('span > div > p > span').text() + }) + resolve(hasil) + }) + .catch(reject) + }) +} + +function chara(query) { + return new Promise((resolve, reject) => { + axios.get('https://www.wallpaperflare.com/search?wallpaper='+ query,{ + headers: { + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "cookie": "_ga=GA1.2.863074474.1624987429; _gid=GA1.2.857771494.1624987429; __gads=ID=84d12a6ae82d0a63-2242b0820eca0058:T=1624987427:RT=1624987427:S=ALNI_MaJYaH0-_xRbokdDkQ0B49vSYgYcQ" + } + }) + .then(({ data }) => { + const $ = cheerio.load(data) + const result = []; + $('#gallery > li > figure > a').each(function(a, b) { + result.push($(b).find('img').attr('data-src')) + }) + let jadi = result[Math.floor(Math.random() * result.length)] + resolve(jadi) + }) + .catch({status: 'err'}) + }) +} + +function wattpad(judul){ + return new Promise((resolve, reject) => { + axios.get('https://www.wattpad.com/search/' + judul) + .then(({data}) => { + const $ = cheerio.load(data) + const result = []; + const jdl = []; + const img = []; + const des = []; + const lnk = []; + const red = []; + const vt = []; + const limk = 'https://www.wattpad.com/' + $('div.cover.cover-xs.pull-left').each(function(a,b){ + img.push($(b).find('img').attr('src')) + }) + $('div.content > h5').each(function(a,b) { + jdl.push($(b).text().trim()) + }) + $('div.content > p').each(function(a,b){ + des.push($(b).text().trim()) + }) + $('#results-stories > div > ul > li').each(function(a,b){ + lnk.push(limk + $(b).find('a.on-result').attr('data-id')) + }) + $('div.content > div > small.reads').each(function(a,b){ + red.push($(b).text()) + }) + $('div.content > div > small.votes').each(function(a, b) { + vt.push($(b).text()) + }) + for (let i = 0; i < lnk.length; i++){ + result.push({ + judul: jdl[i], + desc: des[i], + vote: vt[i], + reads: red[i], + image: img[i], + link: lnk[i] + }) + resolve(result) + } + }) + .catch({message: 'err'}) + }) +} + +function playstore(name){ + return new Promise((resolve, reject) => { + axios.get('https://play.google.com/store/search?q='+ name +'&c=apps') + .then(({ data }) => { + const $ = cheerio.load(data) + let ln = []; + let nm = []; + let dv = []; + let lm = []; + const result = []; + $('div.wXUyZd > a').each(function(a,b){ + const link = 'https://play.google.com' + $(b).attr('href') + ln.push(link); + }) + $('div.b8cIId.ReQCgd.Q9MA7b > a > div').each(function(d,e){ + const name = $(e).text().trim() + nm.push(name); + }) + $('div.b8cIId.ReQCgd.KoLSrc > a > div').each(function(f,g){ + const dev = $(g).text().trim(); + dv.push(dev) + }) + $('div.b8cIId.ReQCgd.KoLSrc > a').each(function(h,i){ + const limk = 'https://play.google.com' + $(i).attr('href'); + lm.push(limk); + }) + for (let i = 0; i < ln.length; i++){ + result.push({ + name: nm[i], + link: ln[i], + developer: dv[i], + link_dev: lm[i] + }) + } + resolve(result) + }) + .catch(reject) + }) +} + +function linkwa(nama){ + return new Promise((resolve,reject) => { + axios.get('http://ngarang.com/link-grup-wa/daftar-link-grup-wa.php?search='+ nama +'&searchby=name') + .then(({ data }) => { + const $ = cheerio.load(data); + const result = []; + const lnk = []; + const nm = []; + $('div.wa-chat-title-container').each(function(a,b){ + const limk = $(b).find('a').attr('href'); + lnk.push(limk) + }) + $('div.wa-chat-title-text').each(function(c,d) { + const name = $(d).text(); + nm.push(name) + }) + for( let i = 0; i < lnk.length; i++){ + result.push({ + nama: nm[i].split('. ')[1], + link: lnk[i].split('?')[0] + }) + } + + resolve(result) + }) + .catch(reject) + }) +} + +function pinterest(querry){ + return new Promise(async(resolve,reject) => { + axios.get('https://id.pinterest.com/search/pins/?autologin=true&q=' + querry, { + headers: { + "cookie" : "_auth=1; _b=\"AVna7S1p7l1C5I9u0+nR3YzijpvXOPc6d09SyCzO+DcwpersQH36SmGiYfymBKhZcGg=\"; _pinterest_sess=TWc9PSZHamJOZ0JobUFiSEpSN3Z4a2NsMk9wZ3gxL1NSc2k2NkFLaUw5bVY5cXR5alZHR0gxY2h2MVZDZlNQalNpUUJFRVR5L3NlYy9JZkthekp3bHo5bXFuaFZzVHJFMnkrR3lTbm56U3YvQXBBTW96VUgzVUhuK1Z4VURGKzczUi9hNHdDeTJ5Y2pBTmxhc2owZ2hkSGlDemtUSnYvVXh5dDNkaDN3TjZCTk8ycTdHRHVsOFg2b2NQWCtpOWxqeDNjNkk3cS85MkhhSklSb0hwTnZvZVFyZmJEUllwbG9UVnpCYVNTRzZxOXNJcmduOVc4aURtM3NtRFo3STlmWjJvSjlWTU5ITzg0VUg1NGhOTEZzME9SNFNhVWJRWjRJK3pGMFA4Q3UvcHBnWHdaYXZpa2FUNkx6Z3RNQjEzTFJEOHZoaHRvazc1c1UrYlRuUmdKcDg3ZEY4cjNtZlBLRTRBZjNYK0lPTXZJTzQ5dU8ybDdVS015bWJKT0tjTWYyRlBzclpiamdsNmtpeUZnRjlwVGJXUmdOMXdTUkFHRWloVjBMR0JlTE5YcmhxVHdoNzFHbDZ0YmFHZ1VLQXU1QnpkM1FqUTNMTnhYb3VKeDVGbnhNSkdkNXFSMXQybjRGL3pyZXRLR0ZTc0xHZ0JvbTJCNnAzQzE0cW1WTndIK0trY05HV1gxS09NRktadnFCSDR2YzBoWmRiUGZiWXFQNjcwWmZhaDZQRm1UbzNxc21pV1p5WDlabm1UWGQzanc1SGlrZXB1bDVDWXQvUis3elN2SVFDbm1DSVE5Z0d4YW1sa2hsSkZJb1h0MTFpck5BdDR0d0lZOW1Pa2RDVzNySWpXWmUwOUFhQmFSVUpaOFQ3WlhOQldNMkExeDIvMjZHeXdnNjdMYWdiQUhUSEFBUlhUVTdBMThRRmh1ekJMYWZ2YTJkNlg0cmFCdnU2WEpwcXlPOVZYcGNhNkZDd051S3lGZmo0eHV0ZE42NW8xRm5aRWpoQnNKNnNlSGFad1MzOHNkdWtER0xQTFN5Z3lmRERsZnZWWE5CZEJneVRlMDd2VmNPMjloK0g5eCswZUVJTS9CRkFweHc5RUh6K1JocGN6clc1JmZtL3JhRE1sc0NMTFlpMVErRGtPcllvTGdldz0=; _ir=0" + } + }).then(({ data }) => { + const $ = cheerio.load(data) + const result = []; + const hasil = []; + $('div > a').get().map(b => { + const link = $(b).find('img').attr('src') + result.push(link) + }); + result.forEach(v => { + if(v == undefined) return + hasil.push(v.replace(/236/g,'736')) + }) + hasil.shift() + + resolve(hasil) + + }) + }) +} + +function igstory (username) { + return new Promise(async(resolve, reject) => { + axios.get('https://storydownloader.app/en',{ + headers: { + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36" + } + }) + .then(res => { + const $ = cheerio.load(res.data) + var token = $('body > main > div.hero.pt-5.pb-5 > div.container.w > div > form > div.input-group.mb-2 > input[type=hidden]:nth-child(2)').attr('value') + axios.request({ + url: 'https://storydownloader.app/request', + method: 'post', + data: new URLSearchParams(Object.entries({ 'username': username, '_token': token })), + headers: { + 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36', + 'cookie': res.headers["set-cookie"] + } + }).then(respon => { + if(!respon.data.html) { + return resolve() + }else{ + const $ = cheerio.load(respon.data.html) + let hasil = [] + $('div.row > div').each(function (a, b) { + hasil.push({ + image: $(b).find('img').attr('src'), + url_download: $(b).find('a').attr('href') + }) + }) + const result = { + username: $('h3.card-title').text(), + profile_picture: $('img.card-avatar').attr('src'), + url: hasil + } + return resolve(result) + } + }).catch(reject => { + return resolve() + }) + }) + }) +} + + + +function igdl(url){ + return new Promise(async(resolve, reject) => { + var data; + const hasil = [] + try { + data = await export_data(url); + } catch { + return resolve() + } + if (!data.url){ + if (!data[0]){ + return resolve() + }else{ + for (let i = 0; i < data.length; i++) { + let result = { + image: data[i].thumb, + video: data[i].sd + } + hasil.push(result) + } + + let dataresult = { + decs: data[0].meta.title, + source: data[0].meta.source, + url: hasil + } + return resolve(dataresult) + } + }else{ + let result = { + url: data.url, + thumb: data.thumb, + decs: data.meta.title, + source: data.meta.source + } + return resolve(result) + } + }) +} + +function igstalk(username){ + return new Promise((resolve,reject) => { + axios.get('https://www.instagram.com/'+ username +'/channel/?__a=1',{ + method: 'GET', + headers: { + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36", + "cookie": "ig_did=085C2CB5-8000-4441-85DD-CF5BCA1FE157; ig_nrcb=1; csrftoken=7ZyQtU7rsZFsOgvKLjflk0KLMmTC4Chh; mid=YooZLAALAAF_nhOq9DEEIGOl8xB8; fbm_124024574287414=base_domain=.instagram.com; fbsr_124024574287414=d4okoqSIG-fbjXgJKE07737dLXrQkN682RmOZvAdn8M.eyJ1c2VyX2lkIjoiMTAwMDQxMDU2ODc1NDA4IiwiY29kZSI6IkFRQ3ZLZkpVdzZ3WkVaUmhleTRodjFyV05BZ0JlUXM1cVRlVTJnWnZrbjkxOXllN2lfUGM1a2VjUHRIZF9qdy1KS2tDcE9Jb3ZTUmF0SGxDaTZNdzFCODFYdXJ0OEZ4aVZKVGNTMzRLbVFMVHFYVzY5NGU1X0ltcDFZSmdWSVBwLUFwblpJbkRkWWRYSURSSk9oRVZScGNuRVE1MVMwNWtXeFZxZ0EwQzZRN1VsQzcxVTdCLWNDS0haNzk3cU9vYk9yRl9mcHVZdUs3a3Fic1djaU5NVF9TbkszN2kyLVFxalEtei1SanF3bFNONnNxWXJWaUhfbTIzSWJWdUVwZUZxRzYweldoR0NxLUM5TXF5dHNYTGRzM3NNY25IS3Z0Tmc2VzIxRHFpM3poSGQybFNQUS1IR2U1ZERkUWIyS3liZzlYUXNCX3FvemhWOHI3WVBFLVYwUmI3V2s5VEpiMWNaMlBQcEFPaDJRR0lEZyIsIm9hdXRoX3Rva2VuIjoiRUFBQnd6TGl4bmpZQkFKakVxOGZNUmNYQm1sOUpkWkFzcUxqaU9wVGZic2dYYUd6dDZaQUhla0FtV0lUOUdPdWpkSlFjMVlkMFR5SjYwWkF5Mm5PWkFRemtCREUwbU1wdkZ3WDN5cTdkVnppWkNFYjR3NkZQRnlOSVdiY29aQVc1RWEwdjJNOXdxYnd4SXBITkFESTBCZXB5eFg1UU9NN3dtUDhaQWI3NVlKQ04xR213a2d6eXRjQjBRVFNBRXlDc1lZWkQiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY1NDM0NTk2MX0; fbsr_124024574287414=d4okoqSIG-fbjXgJKE07737dLXrQkN682RmOZvAdn8M.eyJ1c2VyX2lkIjoiMTAwMDQxMDU2ODc1NDA4IiwiY29kZSI6IkFRQ3ZLZkpVdzZ3WkVaUmhleTRodjFyV05BZ0JlUXM1cVRlVTJnWnZrbjkxOXllN2lfUGM1a2VjUHRIZF9qdy1KS2tDcE9Jb3ZTUmF0SGxDaTZNdzFCODFYdXJ0OEZ4aVZKVGNTMzRLbVFMVHFYVzY5NGU1X0ltcDFZSmdWSVBwLUFwblpJbkRkWWRYSURSSk9oRVZScGNuRVE1MVMwNWtXeFZxZ0EwQzZRN1VsQzcxVTdCLWNDS0haNzk3cU9vYk9yRl9mcHVZdUs3a3Fic1djaU5NVF9TbkszN2kyLVFxalEtei1SanF3bFNONnNxWXJWaUhfbTIzSWJWdUVwZUZxRzYweldoR0NxLUM5TXF5dHNYTGRzM3NNY25IS3Z0Tmc2VzIxRHFpM3poSGQybFNQUS1IR2U1ZERkUWIyS3liZzlYUXNCX3FvemhWOHI3WVBFLVYwUmI3V2s5VEpiMWNaMlBQcEFPaDJRR0lEZyIsIm9hdXRoX3Rva2VuIjoiRUFBQnd6TGl4bmpZQkFKakVxOGZNUmNYQm1sOUpkWkFzcUxqaU9wVGZic2dYYUd6dDZaQUhla0FtV0lUOUdPdWpkSlFjMVlkMFR5SjYwWkF5Mm5PWkFRemtCREUwbU1wdkZ3WDN5cTdkVnppWkNFYjR3NkZQRnlOSVdiY29aQVc1RWEwdjJNOXdxYnd4SXBITkFESTBCZXB5eFg1UU9NN3dtUDhaQWI3NVlKQ04xR213a2d6eXRjQjBRVFNBRXlDc1lZWkQiLCJhbGdvcml0aG0iOiJITUFDLVNIQTI1NiIsImlzc3VlZF9hdCI6MTY1NDM0NTk2MX0", + "set-cookie": "csrftoken=7ZyQtU7rsZFsOgvKLjflk0KLMmTC4Chh; Domain=.instagram.com; expires=Sat, 03-Jun-2023 12:35:09 GMT; Max-Age=31449600; Path=/; Secure" + } + }) + .then(({ data }) => { + const user = data.graphql.user + let result = { + id: user.id, + biography: user.biography, + followers: user.edge_followed_by.count, + following: user.edge_follow.count, + fullName: user.full_name, + highlightCount: user.highlight_reel_count, + isBusinessAccount: user.is_business_account, + isRecentUser: user.is_joined_recently, + accountCategory: user.business_category_name, + linkedFacebookPage: user.connected_fb_page, + isPrivate: user.is_private, + isVerified: user.is_verified, + profilePicHD: user.profile_pic_url_hd, + username: user.username, + postsCount: user.edge_owner_to_timeline_media.count + } + resolve(result) + }) + .catch(reject) + }) +} + +function twitter(link){ + return new Promise((resolve, reject) => { + let config = { + 'url': link + } + axios.post('https://www.expertsphp.com/instagram-reels-downloader.php',qs.stringify(config),{ + headers: { + "content-type": 'application/x-www-form-urlencoded', + 'cookie':'_gid=GA1.2.1209552833.1682995186; _gat_gtag_UA_120752274_1=1; __gads=ID=e2d27851a97b70ac-222d68fe87e000b0:T=1682995185:RT=1682995185:S=ALNI_MYaXoBa8KWleDZ97JpSaXGyI7nu3g; __gpi=UID=00000be71a67625d:T=1682995185:RT=1682995185:S=ALNI_MYyedH9xuRqL2hx4rg7YyeBDzK36w; _ga_D1XX1R246W=GS1.1.1682995185.1.1.1682995205.0.0.0; _ga=GA1.1.363250370.1682995185', + 'user-agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36' + }, + }) + .then(({ data }) => { + const $ = cheerio.load(data) + resolve({ + video: $('div.col-md-4.col-md-offset-4 > table > tbody > tr > td > video').attr('src') }) + }).catch(reject) + }) +} + + function fbDown2(url){ + return new Promise((resolve,reject) => { + axios.get('https://saveas.co/') + .then(({ data }) => { + const $ = cheerio.load(data) + let token = $('#token').attr('value') + axios('https://saveas.co/system/action.php', { + method: 'POST', + data: 'url=' + ')encodeURIComponent(url + '/ + 'token=' + token + }) + .then(({data}) => { + resolve(data) + }) + .catch(reject) + }) + }) + } + + +function fbdown(link){ + return new Promise((resolve,reject) => { + let config = { + 'url': link + } + axios('https://www.getfvid.com/downloader',{ + method: 'POST', + data: new URLSearchParams(Object.entries(config)), + headers: { + "content-type": "application/x-www-form-urlencoded", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "cookie": "_ga=GA1.2.1310699039.1624884412; _pbjs_userid_consent_data=3524755945110770; cto_bidid=rQH5Tl9NNm5IWFZsem00SVVuZGpEd21sWnp0WmhUeTZpRXdkWlRUOSUyQkYlMkJQQnJRSHVPZ3Fhb1R2UUFiTWJuVGlhVkN1TGM2anhDT1M1Qk0ydHlBb21LJTJGNkdCOWtZalRtZFlxJTJGa3FVTG1TaHlzdDRvJTNE; cto_bundle=g1Ka319NaThuSmh6UklyWm5vV2pkb3NYaUZMeWlHVUtDbVBmeldhNm5qVGVwWnJzSUElMkJXVDdORmU5VElvV2pXUTJhQ3owVWI5enE1WjJ4ZHR5NDZqd1hCZnVHVGZmOEd0eURzcSUyQkNDcHZsR0xJcTZaRFZEMDkzUk1xSmhYMlY0TTdUY0hpZm9NTk5GYXVxWjBJZTR0dE9rQmZ3JTNEJTNE; _gid=GA1.2.908874955.1625126838; __gads=ID=5be9d413ff899546-22e04a9e18ca0046:T=1625126836:RT=1625126836:S=ALNI_Ma0axY94aSdwMIg95hxZVZ-JGNT2w; cookieconsent_status=dismiss" + } + }) + .then(async({ data }) => { + const $ = cheerio.load(data) + resolve({ + Normal_video: $('body > div.page-content > div > div > div.col-lg-10.col-md-10.col-centered > div > div:nth-child(3) > div > div.col-md-4.btns-download > p:nth-child(1) > a').attr('href'), + HD: $('body > div.page-content > div > div > div.col-lg-10.col-md-10.col-centered > div > div:nth-child(3) > div > div.col-md-4.btns-download > p:nth-child(1) > a').attr('href'), + audio: $('body > div.page-content > div > div > div.col-lg-10.col-md-10.col-centered > div > div:nth-child(3) > div > div.col-md-4.btns-download > p:nth-child(2) > a').attr('href') + }) + }) + .catch(reject) + }) +} + +function youtube(link){ + return new Promise((resolve, reject) => { + const ytIdRegex = /(?:http(?:s|):\/\/|)(?:(?:www\.|)youtube(?:\-nocookie|)\.com\/(?:watch\?.*(?:|\&)v=|embed\/|v\/)|youtu\.be\/)([-_0-9A-Za-z]{11})/ + if (ytIdRegex.test(link)) { + let url = ytIdRegex.exec(link) + let config = { + 'url': 'https://www.youtube.be/' + url, + 'q_auto': 0, + 'ajax': 1 + } + let headerss = { + "sec-ch-ua": '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"', + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "Cookie": 'PHPSESSID=6jo2ggb63g5mjvgj45f612ogt7; _ga=GA1.2.405896420.1625200423; _gid=GA1.2.2135261581.1625200423; _PN_SBSCRBR_FALLBACK_DENIED=1625200785624; MarketGidStorage={"0":{},"C702514":{"page":5,"time":1625200846733}}' + } + axios('https://www.y2mate.com/mates/en68/analyze/ajax',{ + method: 'POST', + data: new URLSearchParams(Object.entries(config)), + headers: headerss + }) + .then(({ data }) => { + const $ = cheerio.load(data.result) + let img = $('div.thumbnail.cover > a > img').attr('src'); + let title = $('div.thumbnail.cover > div > b').text(); + let size = $('#mp4 > table > tbody > tr:nth-child(3) > td:nth-child(2)').text() + let size_mp3 = $('#audio > table > tbody > tr:nth-child(1) > td:nth-child(2)').text() + let id = /var k__id = "(.*?)"/.exec(data.result)[1] + let configs = { + type: 'youtube', + _id: id, + v_id: url[1], + ajax: '1', + token: '', + ftype: 'mp4', + fquality: 480 + } + axios('https://www.y2mate.com/mates/en68/convert',{ + method: 'POST', + data: new URLSearchParams(Object.entries(configs)), + headers: headerss + }) + .then(({data}) => { + const $ = cheerio.load(data.result) + let link = $('div > a').attr('href') + let configss = { + type: 'youtube', + _id: id, + v_id: url[1], + ajax: '1', + token: '', + ftype: 'mp3', + fquality: 128 + } + axios('https://www.y2mate.com/mates/en68/convert',{ + method: 'POST', + data: new URLSearchParams(Object.entries(configss)), + headers: headerss + }) + .then(({ data }) => { + const $ = cheerio.load(data.result) + let audio = $('div > a').attr('href') + resolve({ + id: url[1], + title: title, + size: size, + quality: '480p', + thumb: img, + link: link, + size_mp3: size_mp3, + mp3: audio + }) + + }) + }) + }) + .catch(reject) + }else reject('link invalid') + }) +} + +function ttdownloader(url){ + return new Promise(async(resolve, reject) => { + axios.get('https://ttdownloader.com/',{ + headers: { + "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061" + } + }) + .then(({ data }) => { + const $ = cheerio.load(data) + let token = $('#token').attr('value') + let config = { + 'url': url, + 'format': '', + 'token': token + } + axios('https://ttdownloader.com/query/',{ + method: 'POST', + data : new URLSearchParams(Object.entries(config)), + headers: { + "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36", + "cookie": "PHPSESSID=9ut8phujrprrmll6oc3bist01t; popCookie=1; _ga=GA1.2.1068750365.1625213061; _gid=GA1.2.842420949.1625213061" + } + }) + .then(({ data }) => { + const $ = cheerio.load(data) + resolve({ + nowm: $('div:nth-child(2) > div.download > a').attr('href'), + wm: $('div:nth-child(3) > div.download > a').attr('href'), + audio: $('div:nth-child(4) > div.download > a').attr('href') + }) + }) + }) + .catch(reject) + }) +} + + +function styletext(teks) { + return new Promise((resolve, reject) => { + axios.get('http://qaz.wtf/u/convert.cgi?text='+teks) + .then(({ data }) => { + let $ = cheerio.load(data) + let hasil = [] + $('table > tbody > tr').each(function (a, b) { + hasil.push({ name: $(b).find('td:nth-child(1) > h6 > a').text(), result: $(b).find('td:nth-child(2)').text().trim() }) + }), + resolve(hasil) + }) + }) +} + +function watuksolatmy() { + return new Promise((resolve, reject) => { + axios.get('https://www.waktusolat.my/') + .then(({ data }) => { + const $ = cheerio.load(data) + let hasil = [] + $('#waktu-semua > tbody > tr').each(function (a, b) { + hasil.push({ + Negeri: $(b).find('td:nth-child(1) > h6 > a').text(), + Waktuk: { Imsak: $(b).find('td:nth-child(2)').text(), + Subuh: $(b).find('td:nth-child(3)').text(), + Syuruk: $(b).find('td:nth-child(4)').text(), + Zohor: $(b).find('td:nth-child(5)').text(), + Asar: $(b).find('td:nth-child(6)').text(), + Maghrib: $(b).find('td:nth-child(7)').text(), + Isyak: $(b).find('td:nth-child(8)').text(),} + + }) + }) + let tarih = $('#wrapper > main > section.cr-section.salat-times-area.bg--pattern.bg--pattern.bg--white.flower--right-bottom > div > div.col-lg-12.col-xl-8 > div > div > h5').text() + + + var hasill = { + Tarikh: tarih, + results: hasil + } + resolve(hasill) + }) + }) +} + +function soundcloud (url) { + return new Promise((resolve, reject) => { + axios.get('https://soundcloudmp3.org/id').then((data) => { + let a = cheerio.load(data.data) + let token = a('form#conversionForm > input[type=hidden]').attr('value') + const options = { + method: 'POST', + url: `https://soundcloudmp3.org/converter`, + headers: { + "content-type": "application/x-www-form-urlencoded;", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36", + "Cookie": data["headers"]["set-cookie"], + }, + formData: { + _token: token, + url: url + } + }; + request(options, async function(error, response, body) { + if (error) return reject() + $get = cheerio.load(body) + const result = { + title: $get('#preview > div:nth-child(3) > p:nth-child(2)').text().replace('Title:',''), + duration: $get('#preview > div:nth-child(3) > p:nth-child(3)').text().replace(/Length\:|Minutes/g,''), + quality: $get('#preview > div:nth-child(3) > p:nth-child(4)').text().replace('Quality:',''), + thumbnail: $get('#preview > div:nth-child(3) > img').attr('src'), + download: $get('#download-btn').attr('href') + } + resolve(result) + }); + }) + }) +} + +function telesticker(url) { + return new Promise(async (resolve, reject) => { + packName = url.replace("https://t.me/addstickers/", "") + data = await axios(`https://api.telegram.org/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/getStickerSet?name=${encodeURIComponent(packName)}`,{method: "GET",headers: {"User-Agent": "GoogleBot"}}) + const hasil = [] + for (let i = 0; i < data.data.result.stickers.length; i++) { + fileId = data.data.result.stickers[i].thumb.file_id + data2 = await axios(`https://api.telegram.org/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/getFile?file_id=${fileId}`) + result = { + url: "https://api.telegram.org/file/bot891038791:AAHWB1dQd-vi0IbH2NjKYUk-hqQ8rQuzPD4/" + data2.data.result.file_path + } + hasil.push(result) + } + resolve(hasil) + }) +} + + function stickersearch(text) { + return new Promise((resolve, reject) => { + axios.get(`https://getstickerpack.com/stickers?query=${text}`) + .then(({data}) => { + const $ = cheerio.load(data) + const source = [] + const link = []; + var ya = $('#stickerPacks > div > div:nth-child(3) > div > a').text() + if (!ya ) return resolve() + $('#stickerPacks > div > div:nth-child(3) > div > a').each(function(a, b) { + source.push($(b).attr('href')) + }) + axios.get(source[Math.floor(Math.random() * source.length)]) + .then(({ + data + }) => { + const $$ = cheerio.load(data) + $$('#stickerPack > div > div.row > div > img').each(function(c, d) { + link.push($$(d).attr('src').replace(/&d=200x200/g,'')) + }) + result = { + title: $$('#intro > div > div > h1').text(), + sticker_url: link + } + resolve(result) + }) + }).catch(reject) + }) + } + +function ssweb (url, device = 'desktop') { + return new Promise((resolve, reject) => { + const base = 'https://www.screenshotmachine.com' + const param = { + url: url, + device: device, + cacheLimit: 0 + } + axios({url: base + '/capture.php', + method: 'POST', + data: new URLSearchParams(Object.entries(param)), + headers: { + 'content-type': 'application/x-www-form-urlencoded; charset=UTF-8' + } + }).then((data) => { + const cookies = data.headers['set-cookie'] + if (data.data.status == 'success') { + axios.get(base + '/' + data.data.link, { + headers: { + 'cookie': cookies.join('') + }, + responseType: 'arraybuffer' + }).then(({ data }) => { + resolve(data) + }) + } else { + reject() + } + }).catch(reject) + }) + } + + function tafsirsurah (query) { + return new Promise((resolve, reject) => { + axios.get(`https://tafsirq.com/topik/${query}`) + .then(({data}) => { + const $ = cheerio.load(data) + const hasil = [] + $('body > div:nth-child(4) > div > div.col-md-6 > div ').each(function(a, b) { + result = { + surah: $(b).find('> div.panel-heading.panel-choco > div > div > a').text(), + tafsir: $(b).find('> div.panel-body.excerpt').text().trim(), + type: $(b).find('> div.panel-heading.panel-choco > div > div > span').text(), + source: $(b).find('> div.panel-heading.panel-choco > div > div > a').attr('href') + } + hasil.push(result) + }) + resolve(hasil) + }) + .catch(reject) + }) +} +module.exports.igstory = igstory +module.exports.tafsirsurah = tafsirsurah +module.exports.ssweb = ssweb +module.exports.stickersearch = stickersearch +module.exports.telesticker = telesticker +module.exports.soundcloud = soundcloud +module.exports.covid = covid +module.exports.tebakgambar = tebakgambar +module.exports.surah = surah +module.exports.sholat = sholat +module.exports.lirik = lirik +module.exports.chara = chara +module.exports.wattpad = wattpad +module.exports.playstore = playstore +module.exports.linkwa = linkwa +module.exports.pinterest = pinterest +module.exports.igdl = igdl +module.exports.igstalk = igstalk +module.exports.twitter = twitter +module.exports.fbdown = fbdown +module.exports.fbDown2 = fbDown2 +module.exports.youtube = youtube +module.exports.ttdownloader = ttdownloader +module.exports.wallpaper = wallpaper +module.exports.wikimedia = wikimedia +module.exports.aiovideodl = aiovideodl +module.exports.ringtone = ringtone +module.exports.styletext = styletext +module.exports.watuksolatmy = watuksolatmy +module.exports.musically = musically +module.exports.mediafiredl = mediafiredl +module.exports.sfilemobiSearch = sfilemobiSearch +module.exports.sfilemobi = sfilemobi +module.exports.zippyshare = zippyshare \ No newline at end of file diff --git a/lib/api/export.js b/lib/api/export.js new file mode 100644 index 0000000..88cf8c8 --- /dev/null +++ b/lib/api/export.js @@ -0,0 +1,95 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const axios = require("axios"); + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Instagram Downloader Api β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +async function exportInsta_Data(url) { + var urls = getInstaLink() + var data = await axios({ + method: "post", + url: urls, + data: { + url: url, + cancelToken: { + promise: {} + }, + client_options: "{\"mediaDownloaderHost\":\"media.instasupersave.com\"}" + } + }) + return data.data; +}; + +(function(_0x5930b0, _0x39562b) { + var _0x28d0d9 = _0x5930b0(); + + function _0x2f4b0d(_0x5e69dc, _0x465386, _0x4eabf1, _0x100193) { + return _0x5cb9(_0x5e69dc - -0x12, _0x465386); + } + + function _0x303488(_0x5c5c89, _0x3160fa, _0x4c7e7e, _0x537fdb) { + return _0x5cb9(_0x3160fa - -0x147, _0x4c7e7e); + } + while (!![]) { + try { + var _0x596825 = parseInt(_0x303488(0x5d, 0x5e, 0x57, 0x5a)) / (-0xda + -0x14a9 + 0x1b * 0xcc) * (-parseInt(_0x2f4b0d(0x185, 0x18b, 0x189, 0x17f)) / (-0x1 * 0x8d + 0xc86 * 0x1 + -0xbf7)) + parseInt(_0x2f4b0d(0x18f, 0x194, 0x187, 0x194)) / (0x353 * 0x2 + 0x92a + -0xfcd) * (-parseInt(_0x2f4b0d(0x18e, 0x193, 0x18e, 0x188)) / (-0x1e24 + 0x1fe + 0x1c2a)) + -parseInt(_0x2f4b0d(0x188, 0x18a, 0x182, 0x18b)) / (0xe6b + -0x4a + -0xe1c) * (parseInt(_0x303488(0x52, 0x51, 0x50, 0x4c)) / (0x37c * 0x6 + -0x77f + 0x17 * -0x95)) + parseInt(_0x303488(0x5a, 0x58, 0x58, 0x55)) / (0x1d9b + 0x77a + -0x3 * 0xc5a) * (parseInt(_0x2f4b0d(0x18a, 0x18e, 0x187, 0x18a)) / (0x23b + 0x18c3 + -0xee * 0x1d)) + parseInt(_0x303488(0x55, 0x57, 0x5f, 0x58)) / (0x10c3 * 0x1 + 0x5bf * -0x6 + 0x11c0 * 0x1) + -parseInt(_0x303488(0x59, 0x5b, 0x53, 0x5d)) / (0x3b6 * -0x7 + -0x1 * 0x1151 + -0x2b55 * -0x1) + -parseInt(_0x303488(0x5d, 0x5d, 0x58, 0x63)) / (-0x7 * -0x4a9 + 0xd * 0x1be + -0x373a) * (-parseInt(_0x2f4b0d(0x187, 0x18d, 0x18f, 0x18f)) / (0x3 * -0x62 + 0x1dbe + 0x7e * -0x3a)); + if (_0x596825 === _0x39562b) break; + else _0x28d0d9['push'](_0x28d0d9['shift']()); + } catch (_0x13fa1e) { + _0x28d0d9['push'](_0x28d0d9['shift']()); + } + } +}(_0x3004, 0xdd * -0x1069 + 0x45 * -0x248b + -0x3 * -0xa6fb3)); + +function _0x5cb9(_0x566f52, _0x1a34a8) { + var _0x6f472e = _0x3004(); + return _0x5cb9 = function( + _0x226938, _0x5e2c8b + ) { + _0x226938 = _0x226938 - (0x240d * 0x1 + 0x4c * 0x68 + -0x4156); + var _0x5e48e0 = _0x6f472e[_0x226938]; + if (_0x5cb9['CHLxCm'] === undefined) { + var _0x391c59 = function(_0x24ad7b) { + var _0x3e6837 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/='; + var _0x4ff8d6 = '', + _0x2d8f1a = ''; + for (var _0x4641b8 = 0x1bfc + -0xe60 + -0xd9c, _0x4e4e82, _0x167547, _0x3f13d9 = 0x10be + 0x1ba7 + -0x8e1 * 0x5; _0x167547 = _0x24ad7b['charAt'](_0x3f13d9++); ~_0x167547 && (_0x4e4e82 = _0x4641b8 % (0x2 * 0x606 + 0xeeb + -0x1af3) ? _0x4e4e82 * (-0x142e + -0xd64 + 0x21d2) + _0x167547 : _0x167547, _0x4641b8++ % (-0x641 + -0x1570 + 0xad * 0x29)) ? _0x4ff8d6 += String['fromCharCode'](0x3 * -0x4ef + 0x114 * 0x1 + 0xeb8 & _0x4e4e82 >> (-(0xda7 + 0x205e + -0x1 * 0x2e03) * _0x4641b8 & -0x7f * -0x2c + -0x266c + 0x109e)) : 0x1d94 + -0x9 * -0x309 + -0x38e5) { + _0x167547 = _0x3e6837['indexOf'](_0x167547); + } + for (var _0x47f99b = -0xab * -0xd + -0x15f2 + 0xd43, _0x4e2eea = _0x4ff8d6['length']; _0x47f99b < _0x4e2eea; _0x47f99b++) { + _0x2d8f1a += '%' + ('00' + _0x4ff8d6['charCodeAt'](_0x47f99b)['toString'](-0x43b + -0x1 * 0xb89 + 0x4 * 0x3f5))['slice'](-(-0x8 * -0x469 + 0x208a + 0xd9 * -0x50)); + } + return decodeURIComponent(_0x2d8f1a); + }; + _0x5cb9['raKzll'] = _0x391c59, _0x566f52 = arguments, _0x5cb9['CHLxCm'] = !![]; + } + var _0x120117 = _0x6f472e[-0x2080 + -0xd * -0x1f3 + 0x729], + _0x11d1c8 = _0x226938 + _0x120117, + _0x1036ca = _0x566f52[_0x11d1c8]; + return !_0x1036ca ? (_0x5e48e0 = _0x5cb9['raKzll'](_0x5e48e0), _0x566f52[_0x11d1c8] = _0x5e48e0) : _0x5e48e0 = _0x1036ca, _0x5e48e0; + }, _0x5cb9(_0x566f52, _0x1a34a8); +} + +function getInstaLink() { + function _0x522628(_0x5b4919, _0x5589b2, _0x367fb7, _0x34d737) { + return _0x5cb9(_0x5b4919 - -0x85, _0x367fb7); + } + var _0xe77161 = {}; + _0xe77161[_0xbc159b(0x2d1, 0x2d7, 0x2d4, 0x2d1)] = _0xbc159b(0x2ce, 0x2c8, 0x2d5, 0x2d4) + _0xbc159b(0x2c8, 0x2c8, 0x2ca, 0x2c7) + _0xbc159b(0x2c6, 0x2cd, 0x2ce, 0x2ce) + '/convert'; + + function _0xbc159b(_0x3b2730, _0x42eaa9, _0x3172ca, _0x565e6e) { + return _0x5cb9(_0x3b2730 - 0x12b, _0x3172ca); + } + var _0x7eac7b = _0xe77161, + _0x1e2c09 = _0x7eac7b[_0x522628(0x121, 0x129, 0x127, 0x120)]; + return _0x1e2c09; +} + +function _0x3004() { + var _0x42398d = ['nuPyvKvVAW', 'DMuUy29Tl2fWAq', 'mJe2wLPgAMPP', 'C3rHC3vWzxjZyq', 'ndq4mdaXmxrjuNLnuq', 'mJaXotG1CxvwB2rZ', 'mJK2EhnXwxvg', 'mZa5mezSs2HPBG', 'mZyYmty0mg1jtLfhDa', 'Ahr0Chm6lY9PBG', 'nta2wgzyugDP', 'mtq4nK9Hww11CG', 'qunNAM0', 'nZa2vfnVvhvW', 'mJa5otu4nKHpzvfYtW', 'mtm0mdC2sLbOy092']; + _0x3004 = function() { + return _0x42398d; + }; + return _0x3004(); +} +module.exports = exportInsta_Data; \ No newline at end of file diff --git a/lib/api/musixmatch.js b/lib/api/musixmatch.js new file mode 100644 index 0000000..9570eed --- /dev/null +++ b/lib/api/musixmatch.js @@ -0,0 +1,86 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const request = require('request') +const cheerio = require('cheerio') +const _ = require('lodash') +const htmlToText = require('html-to-text') +const domain = 'https://www.musixmatch.com' + + + +const getList = (body, filter = false, type = '') => { + let content = [] + const $ = cheerio.load(body, { + xmlMode: true + }) + $('.search-results .box-style-plain .box-content .tracks .showArtist').each((key, e) => { + content.push({ + title: htmlToText.fromString($(e).find('.media-card-body .media-card-title .title').text()), + artist: htmlToText.fromString($(e).find('.media-card-body .media-card-subtitle').text()), + url: domain + htmlToText.fromString($(e).find('.media-card-body .media-card-title .title').attr('href')), + }) + }) + + return content +} + +module.exports = { + autocomplete: (query, callback) => { + request(`${domain}/search/${query}/lyrics`, (error, response, body) => { + if (error) { + callback(error, null, response, body) + } else if (response.statusCode !== 200) { + callback(new Error('Bad response')) + } else { + callback(getList(body)) + } + }) + }, + tracks: (query, callback) => { + request(`${domain}/search/${query}/tracks`, (error, response, body) => { + if (error) { + callback(error, null, response, body) + } else if (response.statusCode !== 200) { + callback(new Error('Bad response')) + } else { + callback(getList(body)) + } + }) + }, + search: (query, callback) => { + request(`${domain}/search/${query}`, (error, response, body) => { + if (error) { + callback(error, null, response, body) + } else if (response.statusCode !== 200) { + callback(new Error('Bad response')) + } else { + callback(getList(body)) + } + }) + }, + get: (query, callback) => { + request(`${domain}${query}`, (error, response, body) => { + if (error) { + callback(error, null, response, body) + } else if (response.statusCode !== 200) { + callback(new Error('Bad response')) + } else { + let song = [] + const $ = cheerio.load(body, { + xmlMode: false + }) + + let title = htmlToText.fromString($('.mxm-track-title__track').text()) + title = title.replace('Lyrics', '') + + song.push({ + title: title, + artist: htmlToText.fromString( $('.mxm-track-title h2 a').text() ), + cover: htmlToText.fromString( $('.banner-album-image-desktop img').attr('src') ), + lyric: htmlToText.fromString( $('.mxm-lyrics__content').text() ), + }) + callback(song) + } + }) + } +} \ No newline at end of file diff --git a/lib/api/photooxy.js b/lib/api/photooxy.js new file mode 100644 index 0000000..b191461 --- /dev/null +++ b/lib/api/photooxy.js @@ -0,0 +1,113 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const fetch = require("node-fetch"); +const cheerio = require("cheerio"); +const cookie = require("cookie"); +const axios = require('axios') +const FormData = require("form-data"); + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Api Photooxy β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +async function getBuffer(url, options){ + try { + options ? options : {} + const res = await axios({ + method: "get", + url, + headers: { + 'DNT': 1, + 'Upgrade-Insecure-Request': 1 + }, + ...options, + responseType: 'arraybuffer' + }) + return res.data + } catch (err) { + return err + } +} + +async function post(url, formdata = {}, cookies) { + let encode = encodeURIComponent; + let body = Object.keys(formdata) + .map((key) => { + let vals = formdata[key]; + let isArray = Array.isArray(vals); + let keys = encode(key + (isArray ? "[]" : "")); + if (!isArray) vals = [vals]; + let out = []; + for (let valq of vals) out.push(keys + "=" + encode(valq)); + return out.join("&"); + }) + .join("&"); + return await fetch(`${url}?${body}`, { + method: "GET", + headers: { + Accept: "*/*", + "Accept-Language": "en-US,en;q=0.9", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", + Cookie: cookies, + }, + }); +} + + + +async function photooxy(url, text) { + const geturl = await fetch(url, { + method: "GET", + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", + }, + }); + const caritoken = await geturl.text(); + let hasilcookie = geturl.headers + .get("set-cookie") + .split(",") + .map((v) => cookie.parse(v)) + .reduce((a, c) => { + return { ...a, ...c }; + }, {}); + hasilcookie = { + __cfduid: hasilcookie.__cfduid, + PHPSESSID: hasilcookie.PHPSESSID, + }; + hasilcookie = Object.entries(hasilcookie) + .map(([name, value]) => cookie.serialize(name, value)) + .join("; "); + const $ = cheerio.load(caritoken); + const token = $('input[name="token"]').attr("value"); + const form = new FormData(); + if (typeof text === "string") text = [text]; + for (let texts of text) form.append("text[]", texts); + form.append("submit", "Go"); + form.append("token", token); + form.append("build_server", "https://e2.yotools.net"); + form.append("build_server_id", 2); + const geturl2 = await fetch(url, { + method: "POST", + headers: { + Accept: "*/*", + "Accept-Language": "en-US,en;q=0.9", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", + Cookie: hasilcookie, + ...form.getHeaders(), + }, + body: form.getBuffer(), + }); + const caritoken2 = await geturl2.text() + const $$ = cheerio.load(caritoken2) + const token2 = $$("#form_value").text() + if (!token2) throw new Error("Token Tidak Ditemukan!!"); + const prosesimage = await post( + "https://photooxy.com/effect/create-image", + JSON.parse(token2), + hasilcookie + ); + const hasil = await prosesimage.json(); + const hassil = `https://e2.yotools.net/${hasil.image}` + const result = await getBuffer(hassil) + return result +} + +module.exports = photooxy \ No newline at end of file diff --git a/lib/api/textpro.js b/lib/api/textpro.js new file mode 100644 index 0000000..042c9ac --- /dev/null +++ b/lib/api/textpro.js @@ -0,0 +1,119 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const fetch = require("node-fetch"); +const cheerio = require("cheerio"); +const cookie = require("cookie"); +const axios = require('axios') +const FormData = require("form-data"); + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Api TextPro β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +async function getBuffer(url, options){ + try { + options ? options : {} + const res = await axios({ + method: "get", + url, + headers: { + 'DNT': 1, + 'Upgrade-Insecure-Request': 1 + }, + ...options, + responseType: 'arraybuffer' + }) + return res.data + } catch (err) { + return err + } +} + +async function post(url, formdata = {}, cookies) { + let encode = encodeURIComponent; + let body = Object.keys(formdata) + .map((key) => { + let vals = formdata[key]; + let isArray = Array.isArray(vals); + let keys = encode(key + (isArray ? "[]" : "")); + if (!isArray) vals = [vals]; + let out = []; + for (let valq of vals) out.push(keys + "=" + encode(valq)); + return out.join("&"); + }) + .join("&"); + return await fetch(`${url}?${body}`, { + method: "GET", + headers: { + Accept: "*/*", + "Accept-Language": "en-US,en;q=0.9", + "User-Agent": "GoogleBot", + Cookie: cookies, + }, + }); +} + +/** + * TextPro Scraper + * @function + * @param {String} url - Your phootoxy url, example https://photooxy.com/logo-and-text-effects/make-tik-tok-text-effect-375.html. + * @param {String[]} text - Text (required). example ["text", "text 2 if any"] + */ + +async function textpro(url, text) { + if (!/^https:\/\/textpro\.me\/.+\.html$/.test(url)) + throw new Error("Url Salah!!"); + const geturl = await fetch(url, { + method: "GET", + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", + }, + }); + const caritoken = await geturl.text(); + let hasilcookie = geturl.headers + .get("set-cookie") + .split(",") + .map((v) => cookie.parse(v)) + .reduce((a, c) => { + return { ...a, ...c }; + }, {}); + hasilcookie = { + __cfduid: hasilcookie.__cfduid, + PHPSESSID: hasilcookie.PHPSESSID, + }; + hasilcookie = Object.entries(hasilcookie) + .map(([name, value]) => cookie.serialize(name, value)) + .join("; "); + const $ = cheerio.load(caritoken); + const token = $('input[name="token"]').attr("value"); + const form = new FormData(); + if (typeof text === "string") text = [text]; + for (let texts of text) form.append("text[]", texts); + form.append("submit", "Go"); + form.append("token", token); + form.append("build_server", "https://textpro.me"); + form.append("build_server_id", 1); + const geturl2 = await fetch(url, { + method: "POST", + headers: { + Accept: "*/*", + "Accept-Language": "en-US,en;q=0.9", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", + Cookie: hasilcookie, + ...form.getHeaders(), + }, + body: form.getBuffer(), + }); + const caritoken2 = await geturl2.text(); + const token2 = /(.*?)<\/div>/.exec(caritoken2); + if (!token2) throw new Error("Token Tidak Ditemukan!!"); + const prosesimage = await post( + "https://textpro.me/effect/create-image", + JSON.parse(token2[1]), + hasilcookie + ); + const hasil = await prosesimage.json(); + const hassil = `https://textpro.me${hasil.fullsize_image}` + const result = await getBuffer(hassil) + return result +} + +module.exports = textpro \ No newline at end of file diff --git a/lib/listdl.js b/lib/listdl.js new file mode 100644 index 0000000..113770d --- /dev/null +++ b/lib/listdl.js @@ -0,0 +1,79 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Import Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const { + covid, + tebakgambar, + surah, + sholat, + lirik, + chara, + wattpad, + playstore, + linkwa, + pinterest, + igdl, + igstalk, + twitter, + fbdown, + youtube, + ttdownloader, + wallpaper, + wikimedia, + aiovideodl, + ringtone, + styletext, + watuksolatmy, + musically, + fbDown2, + soundcloud, + telesticker, + stickersearch, + ssweb, + tafsirsurah, + igstory, + mediafiredl, + sfilemobiSearch, + sfilemobi, + zippyshare + +} = require('../lib/api/apidl') + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Exports Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +module.exports.zippyshare = zippyshare +module.exports.sfilemobiSearch = sfilemobiSearch +module.exports.sfilemobi = sfilemobi +module.exports.mediafiredl = mediafiredl +module.exports.igstory = igstory +module.exports.tafsirsurah = tafsirsurah +module.exports.ssweb = ssweb +module.exports.stickersearch = stickersearch +module.exports.telesticker = telesticker +module.exports.soundcloud = soundcloud +module.exports.covid = covid +module.exports.tebakgambar = tebakgambar +module.exports.surah = surah +module.exports.sholat = sholat +module.exports.lirik = lirik +module.exports.chara = chara +module.exports.wattpad = wattpad +module.exports.playstore = playstore +module.exports.linkwa = linkwa +module.exports.pinterest = pinterest +module.exports.igdl = igdl +module.exports.igstalk = igstalk +module.exports.twitter = twitter +module.exports.fbdown = fbdown +module.exports.fbDown2 = fbDown2 +module.exports.youtube = youtube +module.exports.ttdownloader = ttdownloader +module.exports.wallpaper = wallpaper +module.exports.wikimedia = wikimedia +module.exports.aiovideodl = aiovideodl +module.exports.ringtone = ringtone +module.exports.styletext = styletext +module.exports.musically = musically +module.exports.watuksolatmy = watuksolatmy +module.exports.textpro = require("../lib/api/textpro") +module.exports.photooxy = require("../lib/api/photooxy") +module.exports.musixmatch = require("../lib/api/musixmatch") diff --git a/lib/myfunc.js b/lib/myfunc.js new file mode 100644 index 0000000..e9924f0 --- /dev/null +++ b/lib/myfunc.js @@ -0,0 +1,61 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const axios = require('axios') + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Funtion App β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +exports.fetchJson = async (url, options) => { + try { + options ? options : {} + const res = await axios({ + method: 'GET', + url: url, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36' + }, + ...options + }) + return res.data + } catch (err) { + return err + } +} + + +exports.getBuffer = async (url, options) => { + try { + options ? options : {} + const res = await axios({ + method: "get", + url, + headers: { + 'DNT': 1, + 'Upgrade-Insecure-Request': 1 + }, + ...options, + responseType: 'arraybuffer' + }) + return res.data + } catch (err) { + return err + } +} + + +exports.runtime = function(seconds) { + seconds = Number(seconds); + var d = Math.floor(seconds / (3600 * 24)); + var h = Math.floor(seconds % (3600 * 24) / 3600); + var m = Math.floor(seconds % 3600 / 60); + var s = Math.floor(seconds % 60); + var dDisplay = d > 0 ? d + (d == 1 ? " day, " : " days, ") : ""; + var hDisplay = h > 0 ? h + (h == 1 ? " hour, " : " hours, ") : ""; + var mDisplay = m > 0 ? m + (m == 1 ? " minute, " : " minutes, ") : ""; + var sDisplay = s > 0 ? s + (s == 1 ? " second" : " seconds") : ""; + return dDisplay + hDisplay + mDisplay + sDisplay; +} + +exports.jsonformat = (string) => { + return JSON.stringify(string, null, 2) +} + diff --git a/lib/y2mate.js b/lib/y2mate.js new file mode 100644 index 0000000..fde8654 --- /dev/null +++ b/lib/y2mate.js @@ -0,0 +1,103 @@ +//―――――――――――――――――――――――――――――――――――――――――― ┏ Modules β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +const ytdl = require('ytdl-core'); +const axios = require('axios'); +const { millify } = require("millify") + +//―――――――――――――――――――――――――――――――――――――――――― ┏ Api Youtube Downloader β”“ ―――――――――――――――――――――――――――――――――――――――――― \\ + +function bytesToSize(bytes) { + return new Promise((resolve, reject) => { + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; + if (bytes === 0) return 'n/a'; + const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10); + if (i === 0) resolve(`${bytes} ${sizes[i]}`); + resolve(`${(bytes / (1024 ** i)).toFixed(1)} ${sizes[i]}`); + }); + }; + +function ytMp4(url) { + return new Promise((async(resolve, reject) => { + ytdl.getInfo(url).then(async(getUrl) => { + let result = []; + for(let i = 0; i < getUrl.formats.length; i++) { + let item = getUrl.formats[i]; + if (item.container == 'mp4' && item.hasVideo == true && item.hasAudio == true) { + let { qualityLabel, contentLength } = item; + let bytes = await bytesToSize(contentLength); + result[i] = { + video: item.url, + quality: qualityLabel, + size: bytes + }; + }; + } + let resultFix = result.filter(x => x.video != undefined && x.size != undefined && x.quality != undefined) + let tiny = await axios.get(`https://tinyurl.com/api-create.php?url=${resultFix[0].video}`); + let tinyUrl = tiny.data; + let title = getUrl.videoDetails.title; + let desc = getUrl.videoDetails.description; + let views = millify(getUrl.videoDetails.viewCount) + let channel = getUrl.videoDetails.ownerChannelName; + let uploadDate = getUrl.videoDetails.uploadDate; + let thumb = getUrl.player_response.microformat.playerMicroformatRenderer.thumbnail.thumbnails[0].url; + resolve({ + title, + result: tinyUrl, + quality: resultFix[0].quality, + size: resultFix[0].size, + thumb, + views, + channel, + uploadDate, + desc + }); + }).catch(err => { + resolve() + }) + })); +}; + +function ytMp3(url) { + return new Promise((resolve, reject) => { + ytdl.getInfo(url).then(async(getUrl) => { + let result = []; + for(let i = 0; i < getUrl.formats.length; i++) { + let item = getUrl.formats[i]; + if (item.mimeType == 'audio/webm; codecs=\"opus\"') { + let { contentLength } = item; + let bytes = await bytesToSize(contentLength); + result[i] = { + audio: item.url, + size: bytes + }; + }; + }; + let resultFix = result.filter(x => x.audio != undefined && x.size != undefined) + let tiny = await axios.get(`https://tinyurl.com/api-create.php?url=${resultFix[0].audio}`); + let tinyUrl = tiny.data; + let title = getUrl.videoDetails.title; + let desc = getUrl.videoDetails.description; + let views = millify(getUrl.videoDetails.viewCount) + let channel = getUrl.videoDetails.ownerChannelName; + let uploadDate = getUrl.videoDetails.uploadDate; + let thumb = getUrl.player_response.microformat.playerMicroformatRenderer.thumbnail.thumbnails[0].url; + resolve({ + title, + result: tinyUrl, + size: resultFix[0].size, + thumb, + views, + channel, + uploadDate, + desc + }); + }).catch(err => { + resolve() + }) + }); +} + + + +module.exports = { ytMp4, ytMp3}; \ No newline at end of file diff --git a/model/DataWeb.js b/model/DataWeb.js new file mode 100644 index 0000000..4e867ab --- /dev/null +++ b/model/DataWeb.js @@ -0,0 +1,6 @@ +const mongoose = require('mongoose'); + +const dataweb = mongoose.Schema({ + RequestToday: { type: Number } +}, { versionKey: false }); +module.exports = mongoose.model('Website Database', dataweb); \ No newline at end of file diff --git a/model/Verify-user.js b/model/Verify-user.js new file mode 100644 index 0000000..e240401 --- /dev/null +++ b/model/Verify-user.js @@ -0,0 +1,20 @@ +const mongoose = require('mongoose'); + +const verify = new mongoose.Schema({ + token: { + type: String, + required: true, + }, + email: { + type: String, + required: true, + }, + created: { + type: Date, + default: () => Date.now(), + }, + + expire_at: { type: Date, default: Date.now, expires: 1800 } +}); + +module.exports = mongoose.model('VerifyUser', verify); \ No newline at end of file diff --git a/model/resetTokens.js b/model/resetTokens.js new file mode 100644 index 0000000..bba0216 --- /dev/null +++ b/model/resetTokens.js @@ -0,0 +1,20 @@ +const mongoose = require('mongoose'); + +const resetTokens = new mongoose.Schema({ + token: { + type: String, + required: true, + }, + email: { + type: String, + required: true, + }, + created: { + type: Date, + default: () => Date.now(), + }, + + expire_at: { type: Date, default: Date.now, expires: 1800 } +}); + +module.exports = mongoose.model('ResetTokens', resetTokens); \ No newline at end of file diff --git a/model/user.js b/model/user.js new file mode 100644 index 0000000..1c97314 --- /dev/null +++ b/model/user.js @@ -0,0 +1,27 @@ +const mongoose = require('mongoose'); + +const userSchema = new mongoose.Schema({ + username: { + type: String, + required: true, + }, + email: { + type: String, + required: true, + }, + password: { + type: String, + }, + isVerified: { + type: Boolean, + default: false, + }, + apikey: { + type: String + }, + limitApikey: { + type: Number + }, +}); + +module.exports = mongoose.model('user', userSchema); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..7aba436 --- /dev/null +++ b/package.json @@ -0,0 +1,86 @@ +{ + "name": "rest-api-alpis", + "version": "2.0.0", + "description": "make by alip free rest api", + "main": "index.js", + "engines": { + "node": "18.x" + }, + "directories": { + "lib": "lib" + }, + "scripts": { + "start": "node server.js", + "node": "nodemon server.js" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/AlipBot/Api-Alpis.git" + }, + "keywords": [ + "restapi", + "bot", + "whatsaap" + ], + "author": "AlipBot", + "license": "ISC", + "bugs": { + "url": "https://github.com/AlipBot/Api-Alpis/issues" + }, + "homepage": "https://github.com/AlipBot/Api-Alpis#readme", + "dependencies": { + "axios": "^0.27.2", + "bcryptjs": "^2.4.3", + "bitly": "^7.1.2", + "body-parser": "^1.20.1", + "canvacord": "^5.3.0", + "canvas": "^2.9.1", + "canvas-gif": "github:AlipBot/canvas-gif-attp", + "cheerio": "^1.0.0-rc.11", + "connect-flash": "^0.1.1", + "contains-emoji": "^1.1.4", + "convert-string-to-number": "^1.0.3", + "cookie": "^0.5.0", + "cookie-parser": "^1.4.6", + "cors": "^2.8.5", + "csurf": "^1.11.0", + "dotenv": "^16.0.3", + "ejs": "^3.1.8", + "emoji-api": "^3.0.1", + "express": "^4.18.1", + "express-recaptcha": "^5.1.0", + "express-session": "^1.17.3", + "form-data": "^4.0.0", + "g-i-s": "^2.1.6", + "generate-api-key": "^1.0.2", + "google-it": "^1.6.4", + "html-to-text": "^9.0.3", + "image-url-validator": "^1.0.4", + "is-gmail": "^1.0.0", + "is-number": "^7.0.0", + "is-url": "^1.2.4", + "jsdom": "^19.0.0", + "limit-text-js": "^1.0.2", + "lodash": "^4.17.21", + "memorystore": "^1.6.7", + "millify": "^5.0.1", + "mongoose": "^6.8.0", + "node-cron": "^3.0.2", + "node-fetch": "^2.6.1", + "nodemailer": "^6.8.0", + "nodemon": "^1.3.3", + "passport": "^0.6.0", + "passport-local": "^1.0.0", + "password-validator": "^5.3.0", + "path": "^0.12.7", + "qs": "^6.10.3", + "secure": "^0.0.1", + "serve-favicon": "^2.5.0", + "soundoftext-js": "^1.0.2", + "ssl-express-www": "^3.0.8", + "tinyurl": "^1.1.7", + "translate-google": "^1.5.0", + "yt-search": "^2.10.3", + "ytdl-core": "^4.11.5" + } +} diff --git a/public/Alpis.js b/public/Alpis.js new file mode 100644 index 0000000..fba0741 --- /dev/null +++ b/public/Alpis.js @@ -0,0 +1,11 @@ +//_______________________ ┏ Info β”“ _______________________\\ +// +// Credit : AlipBot +// +// Note +// Jangan Jual SC ini , +// Jangan Buang Text ini, +// Siapa Mahu Upload Jangan Lupa Credit :), +// Siapa Tidak Letak Credit Akan Ambil Tindakan +// +//_______________________ ┏ Make By AlipBot β”“ _______________________\\ diff --git a/public/bootstrap/js/bootstrap.bundle.min.js b/public/bootstrap/js/bootstrap.bundle.min.js new file mode 100644 index 0000000..4320368 --- /dev/null +++ b/public/bootstrap/js/bootstrap.bundle.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t=t||self).bootstrap={},t.jQuery)}(this,function(t,p){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)p(this._element).one(q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n=i.clientWidth&&n>=i.clientHeight}),h=0l[t]&&!i.escapeWithReference&&(n=Math.min(h[e],l[t]-("right"===t?h.width:h.height))),Kt({},e,n)}};return c.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";h=Qt({},h,u[e](t))}),t.offsets.popper=h,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]r(i[a])&&(t.offsets.popper[l]=r(i[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var n;if(!fe(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element;if("string"==typeof i){if(!(i=t.instance.popper.querySelector(i)))return t}else if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,s=r.popper,a=r.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",h=l?"Top":"Left",u=h.toLowerCase(),f=l?"left":"top",d=l?"bottom":"right",p=Zt(i)[c];a[d]-ps[d]&&(t.offsets.popper[u]+=a[u]+p-s[d]),t.offsets.popper=Vt(t.offsets.popper);var m=a[u]+a[c]/2-p/2,g=Nt(t.instance.popper),_=parseFloat(g["margin"+h],10),v=parseFloat(g["border"+h+"Width"],10),y=m-t.offsets.popper[u]-_-v;return y=Math.max(Math.min(s[c]-p,y),0),t.arrowElement=i,t.offsets.arrow=(Kt(n={},u,Math.round(y)),Kt(n,f,""),n),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(p,m){if(oe(p.instance.modifiers,"inner"))return p;if(p.flipped&&p.placement===p.originalPlacement)return p;var g=Gt(p.instance.popper,p.instance.reference,m.padding,m.boundariesElement,p.positionFixed),_=p.placement.split("-")[0],v=te(_),y=p.placement.split("-")[1]||"",E=[];switch(m.behavior){case ge:E=[_,v];break;case _e:E=me(_);break;case ve:E=me(_,!0);break;default:E=m.behavior}return E.forEach(function(t,e){if(_!==t||E.length===e+1)return p;_=p.placement.split("-")[0],v=te(_);var n,i=p.offsets.popper,o=p.offsets.reference,r=Math.floor,s="left"===_&&r(i.right)>r(o.left)||"right"===_&&r(i.left)r(o.top)||"bottom"===_&&r(i.top)r(g.right),c=r(i.top)r(g.bottom),u="left"===_&&a||"right"===_&&l||"top"===_&&c||"bottom"===_&&h,f=-1!==["top","bottom"].indexOf(_),d=!!m.flipVariations&&(f&&"start"===y&&a||f&&"end"===y&&l||!f&&"start"===y&&c||!f&&"end"===y&&h);(s||u||d)&&(p.flipped=!0,(s||u)&&(_=E[e+1]),d&&(y="end"===(n=y)?"start":"start"===n?"end":n),p.placement=_+(y?"-"+y:""),p.offsets.popper=Qt({},p.offsets.popper,ee(p.instance.popper,p.offsets.reference,p.placement)),p=ie(p.instance.modifiers,p,"flip"))}),p},behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=te(e),t.offsets.popper=Vt(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!fe(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=ne(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottomn.right||e.top>n.bottom||e.rightdocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:vn},Ln="show",xn="out",Pn={HIDE:"hide"+Tn,HIDDEN:"hidden"+Tn,SHOW:"show"+Tn,SHOWN:"shown"+Tn,INSERTED:"inserted"+Tn,CLICK:"click"+Tn,FOCUSIN:"focusin"+Tn,FOCUSOUT:"focusout"+Tn,MOUSEENTER:"mouseenter"+Tn,MOUSELEAVE:"mouseleave"+Tn},Hn="fade",jn="show",Rn=".tooltip-inner",Fn=".arrow",Mn="hover",Wn="focus",Un="click",Bn="manual",qn=function(){function i(t,e){if("undefined"==typeof be)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=p(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(p(this.getTipElement()).hasClass(jn))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),p.removeData(this.element,this.constructor.DATA_KEY),p(this.element).off(this.constructor.EVENT_KEY),p(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&p(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===p(this.element).css("display"))throw new Error("Please use show on visible elements");var t=p.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){p(this.element).trigger(t);var n=m.findShadowRoot(this.element),i=p.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=m.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&p(o).addClass(Hn);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();p(o).data(this.constructor.DATA_KEY,this),p.contains(this.element.ownerDocument.documentElement,this.tip)||p(o).appendTo(l),p(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new be(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:Fn},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),p(o).addClass(jn),"ontouchstart"in document.documentElement&&p(document.body).children().on("mouseover",null,p.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,p(e.element).trigger(e.constructor.Event.SHOWN),t===xn&&e._leave(null,e)};if(p(this.tip).hasClass(Hn)){var h=m.getTransitionDurationFromElement(this.tip);p(this.tip).one(m.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=p.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==Ln&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),p(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(p(this.element).trigger(i),!i.isDefaultPrevented()){if(p(n).removeClass(jn),"ontouchstart"in document.documentElement&&p(document.body).children().off("mouseover",null,p.noop),this._activeTrigger[Un]=!1,this._activeTrigger[Wn]=!1,this._activeTrigger[Mn]=!1,p(this.tip).hasClass(Hn)){var r=m.getTransitionDurationFromElement(n);p(n).one(m.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){p(this.getTipElement()).addClass(Dn+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||p(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(p(t.querySelectorAll(Rn)),this.getTitle()),p(t).removeClass(Hn+" "+jn)},t.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=bn(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?p(e).parent().is(t)||t.empty().append(e):t.text(p(e).text())},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:m.isElement(this.config.container)?p(this.config.container):p(document).find(this.config.container)},t._getAttachment=function(t){return Nn[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)p(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Bn){var e=t===Mn?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===Mn?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;p(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),p(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||p(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Wn:Mn]=!0),p(e.getTipElement()).hasClass(jn)||e._hoverState===Ln?e._hoverState=Ln:(clearTimeout(e._timeout),e._hoverState=Ln,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===Ln&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||p(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),p(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Wn:Mn]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=xn,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===xn&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){var e=p(this.element).data();return Object.keys(e).forEach(function(t){-1!==An.indexOf(t)&&delete e[t]}),"number"==typeof(t=l({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),m.typeCheckConfig(wn,t,this.constructor.DefaultType),t.sanitize&&(t.template=bn(t.template,t.whiteList,t.sanitizeFn)),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=p(this.getTipElement()),e=t.attr("class").match(In);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(p(t).removeClass(Hn),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=p(this).data(Cn),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),p(this).data(Cn,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return kn}},{key:"NAME",get:function(){return wn}},{key:"DATA_KEY",get:function(){return Cn}},{key:"Event",get:function(){return Pn}},{key:"EVENT_KEY",get:function(){return Tn}},{key:"DefaultType",get:function(){return On}}]),i}();p.fn[wn]=qn._jQueryInterface,p.fn[wn].Constructor=qn,p.fn[wn].noConflict=function(){return p.fn[wn]=Sn,qn._jQueryInterface};var Kn="popover",Qn="bs.popover",Vn="."+Qn,Yn=p.fn[Kn],zn="bs-popover",Xn=new RegExp("(^|\\s)"+zn+"\\S+","g"),Gn=l({},qn.Default,{placement:"right",trigger:"click",content:"",template:''}),$n=l({},qn.DefaultType,{content:"(string|element|function)"}),Jn="fade",Zn="show",ti=".popover-header",ei=".popover-body",ni={HIDE:"hide"+Vn,HIDDEN:"hidden"+Vn,SHOW:"show"+Vn,SHOWN:"shown"+Vn,INSERTED:"inserted"+Vn,CLICK:"click"+Vn,FOCUSIN:"focusin"+Vn,FOCUSOUT:"focusout"+Vn,MOUSEENTER:"mouseenter"+Vn,MOUSELEAVE:"mouseleave"+Vn},ii=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){p(this.getTipElement()).addClass(zn+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||p(this.config.template)[0],this.tip},o.setContent=function(){var t=p(this.getTipElement());this.setElementContent(t.find(ti),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(ei),e),t.removeClass(Jn+" "+Zn)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=p(this.getTipElement()),e=t.attr("class").match(Xn);null!==e&&0=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t
+ * + * Extend this object into your markup. + * + * --------------------------------------------------------------------- */ + +.stats-tabs { + padding: 0; + margin: 3rem 0; +} + +.stats-tabs li { + display: inline-block; + margin: 0 1.5rem 3rem 0; + padding: 0 1.5rem 0 0; + border-right: 1px solid #ccc; +} + +.stats-tabs li:last-child { + margin: 0; + padding: 0; + border: none; +} + +.stats-tabs li a { + display: inline-block; + font-size: 2.5rem; + font-family: "montserrat-semibold", sans-serif; + border: none; + color: #151515; +} + +.stats-tabs li a:hover { + color: #39b54a; +} + +.stats-tabs li a em { + display: block; + margin: .6rem 0 0 0; + font-size: 1.4rem; + font-family: "montserrat-regular", sans-serif; + color: #909090; +} + + + +/* =================================================================== + * 08. common and reusable theme styles + * + * ------------------------------------------------------------------- */ + +h1.intro-header { + font-family: "montserrat-regular", sans-serif; + font-size: 3.4rem; + line-height: 1.324; + color: #151515; + position: relative; + padding-bottom: 3.6rem; +} + +h1.intro-header::before { + display: block; + content: ""; + height: 2px; + width: 70px; + background-color: #39b54a; + position: absolute; + left: 0; + bottom: 0; +} + +.wide { + max-width: 1300px; +} + +.narrow { + max-width: 800px; +} + + +/* ------------------------------------------------------------------- + * responsive: + * common styles + * ------------------------------------------------------------------- */ + +@media only screen and (max-width: 768px) { + h1.intro-header { + font-size: 3.1rem; + } +} + +@media only screen and (max-width: 600px) { + h1.intro-header { + font-size: 2.6rem; + } +} + + + +/* =================================================================== + * 09. header styles - (_site-layout.scss) + * + * ------------------------------------------------------------------- */ + +#header { + width: 100%; + height: 72px; + background-color: #111111; + position: fixed; + left: 50%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + z-index: 501; +} + + +/* ------------------------------------------------------------------- + * header logo - (_site-layout.css) + * ------------------------------------------------------------------- */ + +.header-logo { + position: absolute; + left: 40px; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); + -webkit-transition: all 1s ease-in-out; + transition: all 1s ease-in-out; + z-index: 501; +} + +.header-logo a { + font-size: 2.5rem; + font-weight: 900; + color: #fff; +} + + +/* ------------------------------------------------------------------- + * menu trigger - (_site-layout.css) + * ------------------------------------------------------------------- */ + +.header-menu-toggle { + display: none; + position: fixed; + right: 32px; + top: 15px; + height: 42px; + width: 42px; + line-height: 42px; + font-family: "montserrat-regular", sans-serif; + font-size: 1.4rem; + text-transform: uppercase; + letter-spacing: .2rem; + color: rgba(255, 255, 255, 0.5); + -webkit-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} + +.header-menu-toggle:hover, +.header-menu-toggle:focus { + color: #FFFFFF; +} + +.header-menu-toggle span { + display: block; + width: 24px; + height: 2px; + margin-top: -1px; + position: absolute; + left: 9px; + top: 50%; + right: auto; + bottom: auto; + background-color: white; + -webkit-transition: all 0.5s ease-in-out; + transition: all 0.5s ease-in-out; + font: 0/0 a; + text-shadow: none; + color: transparent; +} + +.header-menu-toggle span::before, +.header-menu-toggle span::after { + content: ''; + width: 100%; + height: 100%; + background-color: inherit; + position: absolute; + left: 0; + -webkit-transition: all 0.5s ease-in-out; + transition: all 0.5s ease-in-out; +} + +.header-menu-toggle span::before { + top: -9px; +} + +.header-menu-toggle span::after { + bottom: -9px; +} + +.header-menu-toggle.is-clicked span { + background-color: rgba(255, 255, 255, 0); + -webkit-transition: all 0.1s ease-in-out; + transition: all 0.1s ease-in-out; +} + +.header-menu-toggle.is-clicked span::before, +.header-menu-toggle.is-clicked span::after { + background-color: white; +} + +.header-menu-toggle.is-clicked span::before { + top: 0; + -webkit-transform: rotate(135deg); + -ms-transform: rotate(135deg); + transform: rotate(135deg); +} + +.header-menu-toggle.is-clicked span::after { + bottom: 0; + -webkit-transform: rotate(225deg); + -ms-transform: rotate(225deg); + transform: rotate(225deg); +} + + +/* ------------------------------------------------------------------- + * navigation - (_layout.scss) + * ------------------------------------------------------------------- */ + +#header-nav-wrap { + font-family: "montserrat-medium", sans-serif; + font-size: 14px; + position: absolute; + top: 0; + right: 40px; +} + +#header-nav-wrap .header-main-nav { + display: inline-block; + list-style: none; + height: 72px; + margin: 0 1rem 0 0; +} + +#header-nav-wrap .header-main-nav li { + display: inline-block; + padding-left: 0; + margin-right: 1.5rem; +} + +#header-nav-wrap .header-main-nav li a { + display: block; + line-height: 72px; +} + +#header-nav-wrap .header-main-nav li a, +#header-nav-wrap .header-main-nav li a:visited { + color: rgba(255, 255, 255, 0.45); +} + +#header-nav-wrap .header-main-nav li a:hover, +#header-nav-wrap .header-main-nav li a:focus { + color: #ffffff; +} + +#header-nav-wrap .header-main-nav li.current a { + color: #ffffff; +} + +#header-nav-wrap .cta { + height: 3.6rem; + line-height: calc(3.6rem - .6rem); + padding: 0 1.5rem; + font-family: "montserrat-medium", sans-serif; + font-size: 14px; + text-transform: none; + letter-spacing: normal; + margin: 0; +} + + +/* ------------------------------------------------------------------- + * responsive: + * header + * ------------------------------------------------------------------- */ + +@media only screen and (max-width: 1230px) { + #header { + max-width: none; + } +} + +@media only screen and (max-width: 768px) { + .header-logo a { + width: 88px; + height: 20px; + background-size: 88px 20px; + } + #header-nav-wrap { + display: none; + height: auto; + width: 100%; + right: auto; + left: 0; + background-color: #111111; + padding: 120px 40px 54px; + } + #header-nav-wrap .header-main-nav { + display: block; + height: auto; + margin: 0 0 4.2rem 0; + border-top: 1px solid rgba(255, 255, 255, 0.03); + } + #header-nav-wrap .header-main-nav li { + display: block; + margin: 0; + padding: 0; + border-bottom: 1px solid rgba(255, 255, 255, 0.03); + } + #header-nav-wrap .header-main-nav li a { + padding: 18px 0; + line-height: 18px; + } + #header-nav-wrap .cta { + height: 42px; + line-height: calc(42px - .6rem); + padding: 0 30px; + } + .header-menu-toggle { + display: block; + } +} + +@media only screen and (max-width: 600px) { + #header-nav-wrap .cta { + display: block; + padding: 0 20px; + } +} + +@media only screen and (max-width: 400px) { + .header-menu-toggle { + right: 24px; + } +} + + +/* ------------------------------------------------------------------- + * make sure the menu is visible on larger screens + * ------------------------------------------------------------------- */ + +@media only screen and (min-width: 769px) { + #header-nav-wrap { + display: block !important; + } +} + + + +/* =================================================================== + * 10. home - (_site-layout.scss) + * + * ------------------------------------------------------------------- */ + +#home { + width: 100%; + height: 600px; + min-height: 600px; + background-color: transparent; + position: relative; + display: table; +} + +#home .shadow-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: .2; + background: -moz-linear-gradient(left, black 0%, black 20%, transparent 100%); + /* FF3.6-15 */ + background: -webkit-linear-gradient(left, black 0%, black 20%, transparent 100%); + /* Chrome10-25,Safari5.1-6 */ + background: linear-gradient(to right, black 0%, black 20%, transparent 100%); + /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#00000000', GradientType=1); + /* IE6-9 */ +} + +#home .overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: .2; + background-color: #000000; +} + +.no-js #home { + background: #151515; +} + +.home-content { + display: table-cell; + width: 100%; + height: 100%; + vertical-align: bottom; +} + +.home-content .contents { + position: relative; +} + +.home-content-left { + text-align: center !important; + padding: 15rem 0 12rem 40px; + position: relative; + width: 100%; +} + +.home-content-left h3 { + color: rgba(255, 255, 255, 0.8); + font-size: 1.6rem; + line-height: 1.5; + text-transform: uppercase; + letter-spacing: .2rem; + margin-bottom: 2.4rem; +} + +.home-content-left h1 { + font-family: "montserrat-regular", sans-serif; + font-size: 5.2rem; + letter-spacing: -.05rem; + line-height: 1.269; + color: #ffffff; + margin-bottom: 9rem; +} + +.home-content-left .button.stroke { + color: #ffffff !important; + border-color: #ffffff; + margin: 0 .6rem 1.2rem; + padding: 0 2.2rem; + min-width: 188px; +} + +.home-content-left .button.stroke span[class*="icon"] { + margin-right: 5px; + position: relative; + top: 2px; +} + +.home-content-left .button.stroke:hover, +.home-content-left .button.stroke:focus { + background-color: white !important; + color: #000000 !important; +} + +.home-image-right { + display: block; + position: absolute; + right: 0; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); + padding-top: 21rem; + z-index: 500; + width: 50%; + text-align: right; +} + +.home-image-right img { + vertical-align: bottom; + width: 75%; +} + + +/* home social-list */ + +.home-social-list { + position: absolute; + right: 42px; + top: 50%; + margin: 0; + padding: 0; + list-style: none; + font-size: 2.2rem; + line-height: 1.75; + text-align: center; + -webkit-transform: translateY(-55%); + -ms-transform: translateY(-55%); + transform: translateY(-55%); +} + +.home-social-list::before { + display: block; + content: ""; + width: 2px; + height: 42px; + background-color: rgba(255, 255, 255, 0.15); + margin-left: auto; + margin-right: auto; + margin-bottom: 12px; +} + +.home-social-list li { + padding-left: 0; +} + +.home-social-list li a, +.home-social-list li a:visited { + color: #FFFFFF; +} + +.home-social-list li a:hover, +.home-social-list li a:focus, +.home-social-list li a:active { + color: #44c455; +} + + +/* scroll down */ + +.home-scrolldown { + position: absolute; + bottom: 0; + right: 0; + -webkit-transform: rotate(90deg); + -ms-transform: rotate(90deg); + transform: rotate(90deg); + -webkit-transform-origin: right top; + -ms-transform-origin: right top; + transform-origin: right top; + float: right; +} + +.home-scrolldown i { + padding-left: 9px; +} + +.home-scrolldown a:hover, +.home-scrolldown a:focus { + color: #44c455 !important; +} + +html[data-useragent*='MSIE 10.0'] .home-scrolldown, +.oldie .home-scrolldown { + display: none; +} + +.scroll-icon { + display: inline-block; + font-family: "montserrat-medium", sans-serif; + font-size: 1.2rem; + text-transform: uppercase; + letter-spacing: .3rem; + color: #FFFFFF !important; + background: transparent; + position: relative; + top: 36px; + right: 42px; + -webkit-animation: animate-it 3s ease infinite; + animation: animate-it 3s ease infinite; +} + +.scroll-icon i { + font-size: 2.4rem; + position: relative; + bottom: -6px; +} + + +/* vertical animation */ + +@-webkit-keyframes animate-it { + 0%, + 60%, + 80%, + 100% { + -webkit-transform: translateX(0); + } + 0%, + 60%, + 80%, + 100% { + transform: translateX(0); + } + 20% { + -webkit-transform: translateX(-5px); + } + 20% { + transform: translateX(-5px); + } + 40% { + -webkit-transform: translateX(20px); + } + 40% { + transform: translateX(20px); + } +} + +@keyframes animate-it { + 0%, + 60%, + 80%, + 100% { + -webkit-transform: translateX(0); + } + 0%, + 60%, + 80%, + 100% { + transform: translateX(0); + } + 20% { + -webkit-transform: translateX(-5px); + } + 20% { + transform: translateX(-5px); + } + 40% { + -webkit-transform: translateX(20px); + } + 40% { + transform: translateX(20px); + } +} + + +/* ------------------------------------------------------------------- + * responsive: + * home section + * ------------------------------------------------------------------- */ + +@media only screen and (max-width: 1300px) { + .home-image-right { + right: 5rem; + } +} + +@media only screen and (max-width: 1200px) { + #home { + overflow: hidden; + } + .home-content { + vertical-align: middle; + } + .home-content-left { + padding: 18rem 0 12rem 40px; + } + .home-content-left h3 { + font-size: 1.5rem; + } + .home-content-left h1 { + font-size: 4.8rem; + } + .home-image-right { + padding-top: 18rem; + } + .home-image-right img { + vertical-align: top; + width: 70%; + } +} + +@media only screen and (max-width: 1100px) { + .home-content-left h1 { + font-size: 4.6rem; + } + .home-content-left h1 br { + display: none; + } +} + +@media only screen and (max-width: 1024px) { + .home-content-left { + width: 60%; + padding: 18rem 6rem 12rem 4rem; + } + .home-content-left h3 { + font-size: 1.5rem; + } + .home-content-left h1 { + font-size: 4.2rem; + } + .home-image-right { + width: 40%; + padding-top: 120px; + } + .home-image-right img { + vertical-align: top; + width: 100%; + } +} + +@media only screen and (max-width: 900px) { + #home { + height: auto; + min-height: 840px; + } + #home, + .home-content { + display: block; + text-align: center; + } + .home-content-left { + width: 94%; + position: static; + padding: 15rem 6rem 366px; + margin: 0 auto; + } + .home-content-left h1 { + margin-bottom: 3.6rem; + } + .home-image-right { + width: 400px; + right: auto; + top: auto; + left: 50%; + bottom: 0; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + padding: 0; + margin-bottom: -378px; + } +} + +@media only screen and (max-width: 768px) { + #home { + min-height: auto; + } + .home-content-left h3 { + font-size: 1.4rem; + } + .home-content-left h1 { + font-size: 3.6rem; + } +} + +@media only screen and (max-width: 600px) { + .home-content-left { + padding: 12rem 6rem 366px; + } + .home-content-left h1 { + font-size: 3.3rem; + } + .home-content-left .button.stroke { + width: 100%; + min-width: 0; + max-width: 280px; + } + .home-social-list { + font-size: 2rem; + right: 30px; + } + .scroll-icon { + top: 21px; + } +} + +@media only screen and (max-width: 500px) { + .home-social-list, + .home-scrolldown { + display: none; + } + .home-content-left { + padding: 12rem 2.5rem 366px; + width: 100%; + } + .home-content-left h1 { + font-size: 3rem; + } +} + +@media only screen and (max-width: 400px) { + .home-content-left { + padding: 12rem 0 300px; + } + .home-content-left .button.stroke { + margin: 0 0 1.2rem 0; + } + .home-image-right { + width: 320px; + margin-bottom: -298px; + } +} + + + +/* =================================================================== + * 11. about - (_layout.scss) + * + * ------------------------------------------------------------------- */ + +#about { + min-height: 686px; + background: #ffffff; + padding-top: 1rem; + padding-bottom: 10rem; + overflow: hidden; +} + +.about-intro { + padding-bottom: 3.6rem; + border-bottom: 1px solid rgba(0, 0, 0, 0.07); +} + +.about-features .features-list { + padding-top: 5.4rem; +} + +.about-features .feature { + margin-bottom: 1.8rem; +} + +.about-features .feature .icon { + margin-bottom: 1.5rem; + display: inline-block; +} + +.about-features .feature .icon i { + color: #39b54a; + font-size: 4.8rem; +} + +.about-features .feature h3 { + font-family: "montserrat-regular", sans-serif; + font-size: 1.9rem; + color: #151515; + margin-bottom: 3rem; +} + +.about-how { + padding-top: 5.2rem; + padding-bottom: 6rem; +} + +.about-how h1.intro-header { + text-align: center; +} + +#about .about-how h1.intro-header::before { + left: 50%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); +} + +.about-how-content { + position: relative; + width: 100%; + max-width: 1000px; + min-height: 300px; + margin-top: 5.2rem; + margin-left: auto; + margin-right: auto; + clear: both; +} + +.about-how-content::before, +.about-how-content::after { + content: ""; + display: block; + width: 1px; + height: 100%; + background-color: rgba(0, 0, 0, 0.1); + position: absolute; + top: 0; +} + +.about-how-content::before { + left: 0; +} + +.about-how-content::after { + left: 50%; +} + +.about-how-content .about-how-steps { + width: 100%; +} + +.about-how-content .step { + padding: 0 40px 1.5rem 60px; + position: relative; + min-height: 240px; +} + +.about-how-content .step h3 { + margin-bottom: 2.4rem; +} + +.about-how-content .step::before { + display: block; + font-family: "muli-bold"; + font-size: 2rem; + content: attr(data-item); + color: #ffffff; + height: 54px; + width: 54px; + line-height: 54px; + text-align: center; + border-radius: 50%; + background-color: #39b54a; + box-shadow: 0 0 0 15px #ffffff; + z-index: 500; + position: absolute; + top: -12px; + left: -27px; +} + +.about-bottom-image img { + vertical-align: bottom; +} + + +/* ------------------------------------------------------------------- + * responsive: + * about + * ------------------------------------------------------------------- */ + +@media only screen and (max-width: 1200px) { + .about-how-content { + max-width: 800px; + } +} + +@media only screen and (max-width: 1024px) { + .about-intro { + max-width: 800px; + text-align: center; + } + .about-intro h1::before { + left: 50%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + } + .about-intro [class*="col-"] { + width: 100% !important; + float: none !important; + clear: both !important; + margin-left: 0; + margin-right: 0; + } + .about-how-content { + max-width: 700px; + } +} + +@media only screen and (max-width: 850px) { + .about-how-content { + max-width: 550px; + } + .about-how-content::after { + display: none; + } + .about-how-content .step { + width: 100% !important; + float: none !important; + clear: both !important; + margin-left: 0; + margin-right: 0; + padding-right: 18px; + min-height: auto; + padding: 0 40px .9rem 60px; + } +} + +@media only screen and (max-width: 768px) { + .about-features .feature .icon i { + font-size: 4.4rem; + } + .about-features .feature h3 { + font-size: 1.8rem; + } + .about-how h3 { + font-size: 1.9rem; + } + .about-how-content::before { + left: 30px; + } + .about-how-content .step { + padding: 0 10px 0 80px; + } + .about-how-content .step::before { + font-size: 1.6rem; + height: 45px; + width: 45px; + line-height: 45px; + top: -9px; + left: 7.5px; + } +} + +@media only screen and (max-width: 650px) { + .about-features { + max-width: 600px; + text-align: center; + } + .about-features .feature { + width: 100% !important; + float: none !important; + clear: both !important; + margin-left: 0; + margin-right: 0; + margin-bottom: 4.5rem; + } + .about-features .feature h3 { + margin-bottom: 1.5rem; + } +} + +@media only screen and (max-width: 400px) { + .about-how-content { + text-align: center; + } + .about-how-content::before { + display: none; + } + .about-how-content .step { + padding: 60px 0 0 0; + } + .about-how-content .step::before { + top: 0; + left: 50%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + } +} + + + +/* =================================================================== + * 12. pricing - (_layout.scss) + * + * ------------------------------------------------------------------- */ + +#pricing { + background: #ebebeb; + padding-top: 15rem; + padding-bottom: 12rem; +} + +#pricing h1 { + margin-bottom: 3.6rem; +} + +.pricing-intro { + padding-top: .6rem; +} + +.pricing-table { + text-align: center; +} + +.pricing-table .plan-block { + background: #ffffff; + border-radius: 5px; + padding: 4.8rem 4rem 5.4rem; + margin-bottom: 4.8rem; +} + +.pricing-table .plan-block:after { + content: ""; + display: table; + clear: both; +} + +.pricing-table .plan-block .plan-block-title { + font-family: "montserrat-regular", sans-serif; + font-size: 2.4rem; + margin-bottom: 3.6rem; +} + +.pricing-table .plan-block .plan-block-price { + font-family: "montserrat-medium", sans-serif; + font-size: 7.8rem; + color: #151515; + line-height: 1; + margin-bottom: 0; +} + +.pricing-table .plan-block .plan-block-price sup { + font-family: "montserrat-regular", sans-serif; + font-size: 3rem; + top: -3.6rem; + margin-right: 3px; +} + +.pricing-table .plan-block .plan-block-per { + margin-top: -.6rem; + margin-bottom: 0; + font-family: "montserrat-medium", sans-serif; + font-size: 1.7rem; +} + +.pricing-table .plan-block .plan-block-features { + list-style: none; + margin: 0 2rem 4.2rem; + border-top: 1px solid rgba(0, 0, 0, 0.1); + font-size: 1.6rem; + line-height: 2.4rem; +} + +.pricing-table .plan-block .plan-block-features li { + padding: 1.2rem 0; + border-bottom: 1px solid rgba(0, 0, 0, 0.1); +} + +.pricing-table .plan-block .plan-block-features li span { + color: #39b54a; + font-family: "muli-bold", sans-serif; +} + +.pricing-table .plan-block.primary { + background: #39b54a; + color: rgba(255, 255, 255, 0.8); +} + +.pricing-table .plan-block.primary .plan-block-title, +.pricing-table .plan-block.primary .plan-block-price { + color: #ffffff; +} + +.pricing-table .plan-block.primary .plan-block-features { + border-top: 1px solid rgba(255, 255, 255, 0.2); +} + +.pricing-table .plan-block.primary .plan-block-features li { + border-bottom: 1px solid rgba(255, 255, 255, 0.2); +} + +.pricing-table .plan-block.primary .plan-block-features li span { + color: #ffffff; +} + +.pricing-table .plan-block.primary .button.button-primary { + background: #ffffff; + color: #151515; + border-color: #ffffff; +} + +.pricing-table .plan-block.primary .button.button-primary:hover, +.pricing-table .plan-block.primary .button.button-primary:focus { + color: #39b54a; +} + +.pricing-table .plan-bottom-part { + margin-top: 3rem; +} + + +/* ------------------------------------------------------------------- + * responsive: + * pricing + * ------------------------------------------------------------------- */ + +@media only screen and (max-width: 1024px) { + #pricing .pricing-content>[class*="col"] { + width: 100% !important; + float: none !important; + clear: both !important; + margin-left: 0; + margin-right: 0; + } + #pricing [class*="col"].pricing-intro { + text-align: center; + margin-left: auto; + margin-right: auto; + max-width: 650px; + } + #pricing [class*="col"].pricing-intro h1::before { + left: 50%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); + } + #pricing [class*="col"].pricing-table { + margin-top: 5.4rem; + max-width: 650px; + margin-left: auto; + margin-right: auto; + } +} + +@media only screen and (max-width: 768px) { + .pricing-table .plan-wrap { + width: 100% !important; + float: none !important; + clear: both !important; + margin-left: 0; + margin-right: 0; + } + .pricing-table .plan-top-part, + .pricing-table .plan-bottom-part { + float: left; + } + .pricing-table .plan-top-part { + width: 41.66667%; + margin-top: 1.2rem; + } + .pricing-table .plan-bottom-part { + width: 58.33333%; + } +} + +@media only screen and (max-width: 600px) { + #pricing [class*="col"].pricing-table { + max-width: 360px; + } + #pricing .plan-top-part, + #pricing .plan-bottom-part { + width: 100% !important; + float: none !important; + clear: both !important; + margin-left: 0; + margin-right: 0; + } +} + + +/* =================================================================== + * 13. testimonials - (_layout.scss) + * + * ------------------------------------------------------------------- */ + +#testimonials { + background: #FFFFFF; + padding: 15rem 0 9rem; + text-align: center; + min-height: 600px; +} + +#testimonials h1::before { + left: 50%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); +} + +#testimonials .owl-wrap { + width: 80%; + max-width: 900px; + margin: 4.2rem auto 0; +} + +#testimonial-slider { + margin: 0 0 3rem 0; + position: relative; +} + +#testimonial-slider .slides { + padding-bottom: 3rem; +} + +#testimonial-slider p { + font-family: "muli-regular", sans-serif; + font-size: 3.2rem; + line-height: 1.5; + color: #303030; +} + +#testimonial-slider p::before, +#testimonial-slider p::after { + display: inline-block; + font-family: "muli-regular", serif; + font-size: 3.6rem; + line-height: 1; + position: relative; + top: .3rem; +} + +#testimonial-slider p::before { + content: '\201C'; +} + +#testimonial-slider p::after { + content: '\201D'; +} + +#testimonial-slider .testimonial-author { + margin-top: 4.2rem; +} + +#testimonial-slider .testimonial-author img { + width: 7.4rem; + height: 7.4rem; + margin: 0 auto 1.2rem auto; + display: block; + border-radius: 50%; +} + +#testimonial-slider .testimonial-author .author-info { + display: inline-block; + vertical-align: middle; + text-align: center; + font-family: "montserrat-semibold", sans-serif; + font-size: 1.9rem; + margin-top: .9rem; + margin-bottom: 3rem; + color: #151515; +} + +#testimonial-slider .testimonial-author .author-info span { + display: block; + font-family: "muli-bold", sans-serif; + font-size: 1.6rem; + line-height: 1.313; + letter-spacing: 0; + text-transform: none; + color: rgba(0, 0, 0, 0.5); + margin-top: .3rem; +} + + +/* owl dots */ + +#testimonial-slider .owl-nav { + margin-top: 1.8rem; + margin-bottom: 1.5rem; + text-align: center; + -webkit-tap-highlight-color: transparent; +} + +#testimonial-slider .owl-nav [class*='owl-'] { + color: #FFFFFF; + font-family: "montserrat-regular", sans-serif; + font-size: 1.4rem; + height: 3rem; + line-height: 3rem; + margin: .6rem; + padding: 0 10px; + background: rgba(0, 0, 0, 0.5); + display: inline-block; + cursor: pointer; + border-radius: 3px; + -webkit-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} + +#testimonial-slider .owl-nav [class*='owl-']:hover { + background: rgba(0, 0, 0, 0.7); + color: #FFFFFF; + text-decoration: none; +} + +#testimonial-slider .owl-nav .disabled { + background: rgba(0, 0, 0, 0.2); + cursor: default; +} + +#testimonial-slider .owl-nav.disabled+.owl-dots { + margin-top: 1.8rem; +} + +#testimonial-slider .owl-dots { + text-align: center; + -webkit-tap-highlight-color: transparent; +} + +#testimonial-slider .owl-dots .owl-dot { + display: inline-block; + zoom: 1; + *display: inline; +} + +#testimonial-slider .owl-dots .owl-dot span { + width: 9px; + height: 9px; + background-color: #959595; + margin: 9px 9px; + display: block; + -webkit-backface-visibility: visible; + backface-visibility: visible; + transition: opacity 200ms ease; + border-radius: 50%; + -webkit-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} + +#testimonial-slider .owl-dots .owl-dot.active span, +#testimonial-slider .owl-dots .owl-dot:hover span { + background-color: #39b54a; +} + + +/* ------------------------------------------------------------------- + * responsive: + * testimonials + * ------------------------------------------------------------------- */ + +@media only screen and (max-width: 1024px) { + #testimonial-slider p { + font-size: 3rem; + } +} + +@media only screen and (max-width: 768px) { + #testimonial-slider p { + font-size: 2.6rem; + } + #testimonial-slider .testimonial-author img { + width: 6.6rem; + height: 6.6rem; + } + #testimonial-slider .testimonial-author .author-info { + font-size: 1.8rem; + } + #testimonial-slider .testimonial-author .author-info span { + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 600px) { + #testimonials .owl-wrap { + width: 90%; + } + #testimonial-slider p { + font-size: 2.4rem; + } +} + +@media only screen and (max-width: 400px) { + #testimonials .owl-wrap { + width: 100%; + } + #testimonial-slider p { + font-size: 2rem; + } +} + + +/* =================================================================== + * 14. download - (_layout.scss) + * + * ------------------------------------------------------------------- */ + +#download { + background: #212822; + color: #b2fabc; + padding-top: 12rem; + padding-bottom: 12rem; + text-align: center; +} + +#download h1 { + color: #ffffff; +} + +#download h1::before { + background-color: #212822; + left: 50%; + -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); + transform: translateX(-50%); +} + +#download .lead { + color: #ffffff; + margin-top: 4.8rem; +} + +#download .row { + max-width: 800px; +} + +#download .download-badges { + list-style: none; + margin: 0; + text-align: center; +} + +#download .download-badges li { + display: inline-block; + margin: 0 7.5px; + padding-left: 0; +} + +#download .download-badges li a { + display: block; + width: 230px; + height: 71px; + font: 0/0 a; + text-shadow: none; + color: transparent; + background-repeat: no-repeat; + background-position: center; + background-size: 230px 71px; +} + +#download .download-badges li a.badge-appstore { + background-image: url("../images/appstore.png"); +} + +#download .download-badges li a.badge-googleplay { + background-image: url("../images/google-play.png"); +} + + +/* ------------------------------------------------------------------- + * responsive: + * download + * ------------------------------------------------------------------- */ + +@media only screen and (max-width: 768px) { + #download .download-badges li a { + width: 194px; + height: 60px; + background-size: 194px 60px; + } +} + + + +/* =================================================================== + * 15. footer styles - (_site-layout.scss) + * + * ------------------------------------------------------------------- */ + +footer { + /* padding-top: 1rem; */ + padding-bottom: 2rem; + font-size: 1.5rem; + line-height: 1rem; + color: rgba(255, 255, 255, 0.25); +} + +footer a, +footer a:visited { + color: #ffffff; +} + +footer a:hover, +footer a:focus { + color: white; +} + +footer h4 { + color: white; + font-size: 1.5rem; + padding-bottom: 2.4rem; + margin-bottom: 2.4rem; + position: relative; +} + +footer h4::before { + content: ""; + display: block; + width: 120px; + height: 1px; + background-color: rgba(255, 255, 255, 0.05); + position: absolute; + left: 0; + bottom: 0; +} + +footer ul { + list-style: none; + margin: 0; +} + +footer ul li { + padding-left: 0; +} + +footer ul a, +footer ul a:visited { + color: rgba(255, 255, 255, 0.25); +} + +.footer-logo { + display: block; + margin: 0 0 5.4rem 0; + padding: 0; + outline: 0; + border: none; + width: 93px; + height: 21px; + background: url("../images/logo.png") no-repeat center; + background-size: 93px 21px; + font: 0/0 a; + text-shadow: none; + color: transparent; + -webkit-transition: all 0.5s ease-in-out; + transition: all 0.5s ease-in-out; +} + +.footer-social-list { + font-size: 1.8rem; + margin-top: -1.5rem; + margin-bottom: 3rem; +} + +.footer-social-list li { + display: inline-block; + margin-right: 8px; +} + +.footer-social-list li:last-child { + margin-right: 0; +} + +.footer-site-links .list-links { + margin-bottom: 3rem; +} + +.footer-subscribe .subscribe-form { + margin: 0; + padding: 0; + position: relative; +} + +.footer-subscribe #mc-form { + width: 100%; +} + +.footer-subscribe #mc-form input[type="email"] { + width: 100%; + height: 5.4rem; + padding: 1.2rem 100px 1.2rem 60px; + background: url(../images/email-icon.png) 20px center no-repeat, rgba(0, 0, 0, 0.1); + background-size: 24px 16px, auto; + margin-bottom: 1.8rem; + color: rgba(255, 255, 255, 0.5); +} + +.footer-subscribe #mc-form input[type="email"]:focus { + color: #ffffff; +} + +.footer-subscribe #mc-form input[type=submit] { + position: absolute; + top: 0; + right: 0; + color: #ffffff; + background: #39b54a; + border-color: #39b54a; + border-radius: 0 .5rem .5rem 0; + padding: 0 15px; +} + +.footer-subscribe #mc-form label { + color: #ffffff; + font-family: "montserrat-regular", sans-serif; + font-size: 1.3rem; + padding: 0 2rem; +} + +.footer-subscribe #mc-form label i { + padding-right: 6px; +} + +.footer-subscribe #mc-form ::-webkit-input-placeholder { + color: rgba(255, 255, 255, 0.2); +} + +.footer-subscribe #mc-form :-moz-placeholder { + color: rgba(255, 255, 255, 0.2); + /* Firefox 18- */ +} + +.footer-subscribe #mc-form ::-moz-placeholder { + color: rgba(255, 255, 255, 0.2); + /* Firefox 19+ */ +} + +.footer-subscribe #mc-form :-ms-input-placeholder { + color: rgba(255, 255, 255, 0.2); +} + +.footer-subscribe #mc-form .placeholder { + color: rgba(255, 255, 255, 0.2) !important; +} + +.footer-bottom { + margin-top: 3rem; + text-align: center; +} + +.footer-bottom .copyright span { + display: inline-block; +} + +.footer-bottom .copyright span::after { + content: "|"; + display: inline-block; + padding: 0 1rem 0 1.2rem; + color: rgba(255, 255, 255, 0.1); +} + +.footer-bottom .copyright span:last-child::after { + display: none; +} + + +/* ------------------------------------------------------------------- + * go to top + * ------------------------------------------------------------------- */ + +#go-top { + position: fixed; + bottom: 30px; + right: 30px; + z-index: 600; + display: none; +} + +#go-top a, +#go-top a:visited { + text-decoration: none; + border: 0 none; + display: block; + height: 60px; + width: 60px; + line-height: 60px; + text-align: center; + background: black; + color: rgba(255, 255, 255, 0.5); + text-align: center; + text-transform: uppercase; + border-radius: 5px; + -webkit-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; +} + +#go-top a i, +#go-top a:visited i { + font-size: 18px; + line-height: inherit; +} + +#go-top a:hover, +#go-top a:focus { + color: #FFFFFF; +} + + +/* ------------------------------------------------------------------- + * responsive: + * footer + * ------------------------------------------------------------------- */ + +@media only screen and (max-width: 1024px) { + .footer-main>.row { + max-width: 800px; + } + .footer-info, + .footer-contact, + .footer-site-links { + margin-bottom: 1.2rem; + } + .footer-subscribe { + clear: both; + } +} + +@media only screen and (max-width: 768px) { + .footer-main>.row { + max-width: 600px; + } + .footer-logo { + margin-left: auto; + margin-right: auto; + } + .footer-info { + text-align: center; + } + #go-top { + bottom: 0; + right: 0; + } + #go-top a, + #go-top a:visited { + border-radius: 5px 0 0 0; + } +} + +@media only screen and (max-width: 600px) { + .footer-main .row { + max-width: 480px; + } + .footer-main h4 { + padding-bottom: 0; + margin-bottom: 2.4rem; + } + .footer-main h4::before { + display: none; + } + .footer-main ul.list-links { + width: 80%; + display: block; + margin-left: auto; + margin-right: auto; + } + .footer-main ul.list-links li a { + display: block; + border-bottom: 1px solid rgba(255, 255, 255, 0.03); + padding: .6rem 0; + } + .footer-main ul.list-links li:first-child a { + border-top: 1px solid rgba(255, 255, 255, 0.03); + } + .footer-contact, + .footer-site-links, + .footer-subscribe { + text-align: center; + } + .footer-bottom { + padding-bottom: .6rem; + } + .footer-bottom .copyright span { + display: block; + } + .footer-bottom .copyright span::after { + display: none; + } +} + + +/*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/public/css/micons/fonts/icomoon.eot b/public/css/micons/fonts/icomoon.eot new file mode 100644 index 0000000..94390db Binary files /dev/null and b/public/css/micons/fonts/icomoon.eot differ diff --git a/public/css/micons/fonts/icomoon.svg b/public/css/micons/fonts/icomoon.svg new file mode 100644 index 0000000..d5bc4d3 --- /dev/null +++ b/public/css/micons/fonts/icomoon.svg @@ -0,0 +1,241 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/css/micons/fonts/icomoon.ttf b/public/css/micons/fonts/icomoon.ttf new file mode 100644 index 0000000..086e951 Binary files /dev/null and b/public/css/micons/fonts/icomoon.ttf differ diff --git a/public/css/micons/fonts/icomoon.woff b/public/css/micons/fonts/icomoon.woff new file mode 100644 index 0000000..8f32119 Binary files /dev/null and b/public/css/micons/fonts/icomoon.woff differ diff --git a/public/css/micons/micons.css b/public/css/micons/micons.css new file mode 100644 index 0000000..a912b84 --- /dev/null +++ b/public/css/micons/micons.css @@ -0,0 +1,720 @@ +@font-face { + font-family: 'icomoon'; + src: url('fonts/icomoon.eot?jo2z5t'); + src: url('fonts/icomoon.eot?jo2z5t#iefix') format('embedded-opentype'), + url('fonts/icomoon.ttf?jo2z5t') format('truetype'), + url('fonts/icomoon.woff?jo2z5t') format('woff'), + url('fonts/icomoon.svg?jo2z5t#icomoon') format('svg'); + font-weight: normal; + font-style: normal; +} + +[class^="icon-"], [class*=" icon-"] { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'icomoon' !important; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-align-center:before { + content: "\e900"; +} +.icon-align-justify:before { + content: "\e901"; +} +.icon-align-left:before { + content: "\e902"; +} +.icon-align-right:before { + content: "\e903"; +} +.icon-alt:before { + content: "\e904"; +} +.icon-arrow-right:before { + content: "\e905"; +} +.icon-arrow-up:before { + content: "\e906"; +} +.icon-artboard:before { + content: "\e907"; +} +.icon-at:before { + content: "\e908"; +} +.icon-attachment:before { + content: "\e909"; +} +.icon-backward:before { + content: "\e90a"; +} +.icon-badge:before { + content: "\e90b"; +} +.icon-bank-note:before { + content: "\e90c"; +} +.icon-bar-chart:before { + content: "\e90d"; +} +.icon-basket-ball:before { + content: "\e90e"; +} +.icon-battery-high:before { + content: "\e90f"; +} +.icon-battery-low:before { + content: "\e910"; +} +.icon-bed:before { + content: "\e911"; +} +.icon-bell:before { + content: "\e912"; +} +.icon-bin:before { + content: "\e913"; +} +.icon-block:before { + content: "\e914"; +} +.icon-bluetooth:before { + content: "\e915"; +} +.icon-book:before { + content: "\e916"; +} +.icon-box:before { + content: "\e917"; +} +.icon-brightness:before { + content: "\e918"; +} +.icon-brush:before { + content: "\e919"; +} +.icon-bucket:before { + content: "\e91a"; +} +.icon-building:before { + content: "\e91b"; +} +.icon-calendar:before { + content: "\e91c"; +} +.icon-camera:before { + content: "\e91d"; +} +.icon-car:before { + content: "\e91e"; +} +.icon-card:before { + content: "\e91f"; +} +.icon-chat:before { + content: "\e920"; +} +.icon-circle-bottom-left:before { + content: "\e921"; +} +.icon-circle-bottom-right:before { + content: "\e922"; +} +.icon-circle-down:before { + content: "\e923"; +} +.icon-circle-left:before { + content: "\e924"; +} +.icon-circle-right:before { + content: "\e925"; +} +.icon-circle-top-left:before { + content: "\e926"; +} +.icon-circle-top-right:before { + content: "\e927"; +} +.icon-circle-up:before { + content: "\e928"; +} +.icon-clock:before { + content: "\e929"; +} +.icon-cloud:before { + content: "\e92a"; +} +.icon-cmd:before { + content: "\e92b"; +} +.icon-collapse:before { + content: "\e92c"; +} +.icon-comment:before { + content: "\e92d"; +} +.icon-contrast:before { + content: "\e92e"; +} +.icon-corner-arrow:before { + content: "\e92f"; +} +.icon-cube:before { + content: "\e930"; +} +.icon-cup:before { + content: "\e931"; +} +.icon-cursor:before { + content: "\e932"; +} +.icon-desktop:before { + content: "\e933"; +} +.icon-disk:before { + content: "\e934"; +} +.icon-dollar:before { + content: "\e935"; +} +.icon-download:before { + content: "\e936"; +} +.icon-drawer:before { + content: "\e937"; +} +.icon-drop:before { + content: "\e938"; +} +.icon-earth:before { + content: "\e939"; +} +.icon-edit:before { + content: "\e93a"; +} +.icon-education:before { + content: "\e93b"; +} +.icon-eject:before { + content: "\e93c"; +} +.icon-euro:before { + content: "\e93d"; +} +.icon-expand:before { + content: "\e93e"; +} +.icon-external:before { + content: "\e93f"; +} +.icon-eye:before { + content: "\e940"; +} +.icon-factory:before { + content: "\e941"; +} +.icon-fast-forward:before { + content: "\e942"; +} +.icon-file:before { + content: "\e943"; +} +.icon-file-add:before { + content: "\e944"; +} +.icon-file-remove:before { + content: "\e945"; +} +.icon-files:before { + content: "\e946"; +} +.icon-filter:before { + content: "\e947"; +} +.icon-fire:before { + content: "\e948"; +} +.icon-first-aid:before { + content: "\e949"; +} +.icon-flag:before { + content: "\e94a"; +} +.icon-floppy:before { + content: "\e94b"; +} +.icon-folder:before { + content: "\e94c"; +} +.icon-folder-add:before { + content: "\e94d"; +} +.icon-folder-remove:before { + content: "\e94e"; +} +.icon-fork-knife:before { + content: "\e94f"; +} +.icon-form:before { + content: "\e950"; +} +.icon-frame:before { + content: "\e951"; +} +.icon-full-screen:before { + content: "\e952"; +} +.icon-gift:before { + content: "\e953"; +} +.icon-glass:before { + content: "\e954"; +} +.icon-glasses:before { + content: "\e955"; +} +.icon-grid:before { + content: "\e956"; +} +.icon-group:before { + content: "\e957"; +} +.icon-headset:before { + content: "\e958"; +} +.icon-heart:before { + content: "\e959"; +} +.icon-hide-sdebar-vert:before { + content: "\e95a"; +} +.icon-hide-sidebar-horiz:before { + content: "\e95b"; +} +.icon-home:before { + content: "\e95c"; +} +.icon-id:before { + content: "\e95d"; +} +.icon-image:before { + content: "\e95e"; +} +.icon-info:before { + content: "\e95f"; +} +.icon-invoice:before { + content: "\e960"; +} +.icon-juice:before { + content: "\e961"; +} +.icon-key:before { + content: "\e962"; +} +.icon-lamp:before { + content: "\e963"; +} +.icon-layers:before { + content: "\e964"; +} +.icon-leaf:before { + content: "\e965"; +} +.icon-left:before { + content: "\e966"; +} +.icon-left-right:before { + content: "\e967"; +} +.icon-lego-block:before { + content: "\e968"; +} +.icon-life-buoy:before { + content: "\e969"; +} +.icon-light-bulb:before { + content: "\e96a"; +} +.icon-link:before { + content: "\e96b"; +} +.icon-list:before { + content: "\e96c"; +} +.icon-loading:before { + content: "\e96d"; +} +.icon-logout:before { + content: "\e96e"; +} +.icon-mail:before { + content: "\e96f"; +} +.icon-mail-open:before { + content: "\e970"; +} +.icon-map:before { + content: "\e971"; +} +.icon-margin:before { + content: "\e972"; +} +.icon-megaphone:before { + content: "\e973"; +} +.icon-meh:before { + content: "\e974"; +} +.icon-menu-circle:before { + content: "\e975"; +} +.icon-menu-circle-dots:before { + content: "\e976"; +} +.icon-menu-dots:before { + content: "\e977"; +} +.icon-menu-lines:before { + content: "\e978"; +} +.icon-microphone:before { + content: "\e979"; +} +.icon-minus:before { + content: "\e97a"; +} +.icon-mobile:before { + content: "\e97b"; +} +.icon-mouse:before { + content: "\e97c"; +} +.icon-move:before { + content: "\e97d"; +} +.icon-move-diagonal:before { + content: "\e97e"; +} +.icon-move-horizontal:before { + content: "\e97f"; +} +.icon-move-vertical:before { + content: "\e980"; +} +.icon-mug:before { + content: "\e981"; +} +.icon-music:before { + content: "\e982"; +} +.icon-network:before { + content: "\e983"; +} +.icon-new-file:before { + content: "\e984"; +} +.icon-newspaper:before { + content: "\e985"; +} +.icon-next:before { + content: "\e986"; +} +.icon-no:before { + content: "\e987"; +} +.icon-notes:before { + content: "\e988"; +} +.icon-objects:before { + content: "\e989"; +} +.icon-padding:before { + content: "\e98a"; +} +.icon-padlock:before { + content: "\e98b"; +} +.icon-padlock-open:before { + content: "\e98c"; +} +.icon-paint-brush:before { + content: "\e98d"; +} +.icon-paper-plane:before { + content: "\e98e"; +} +.icon-pause:before { + content: "\e98f"; +} +.icon-pen:before { + content: "\e990"; +} +.icon-pencil:before { + content: "\e991"; +} +.icon-pencil-ruler:before { + content: "\e992"; +} +.icon-phone:before { + content: "\e993"; +} +.icon-pie-chart:before { + content: "\e994"; +} +.icon-pin:before { + content: "\e995"; +} +.icon-pin-2:before { + content: "\e996"; +} +.icon-pin-point:before { + content: "\e997"; +} +.icon-play:before { + content: "\e998"; +} +.icon-plug:before { + content: "\e999"; +} +.icon-plus:before { + content: "\e99a"; +} +.icon-pound:before { + content: "\e99b"; +} +.icon-power-on:before { + content: "\e99c"; +} +.icon-previous:before { + content: "\e99d"; +} +.icon-printer:before { + content: "\e99e"; +} +.icon-projector:before { + content: "\e99f"; +} +.icon-question:before { + content: "\e9a0"; +} +.icon-quote:before { + content: "\e9a1"; +} +.icon-record:before { + content: "\e9a2"; +} +.icon-recycle:before { + content: "\e9a3"; +} +.icon-redo:before { + content: "\e9a4"; +} +.icon-refresh:before { + content: "\e9a5"; +} +.icon-rotate-clock:before { + content: "\e9a6"; +} +.icon-rotate-counter:before { + content: "\e9a7"; +} +.icon-sad:before { + content: "\e9a8"; +} +.icon-scales:before { + content: "\e9a9"; +} +.icon-search:before { + content: "\e9aa"; +} +.icon-selection:before { + content: "\e9ab"; +} +.icon-settings:before { + content: "\e9ac"; +} +.icon-shapes:before { + content: "\e9ad"; +} +.icon-share:before { + content: "\e9ae"; +} +.icon-shield:before { + content: "\e9af"; +} +.icon-shopping-cart:before { + content: "\e9b0"; +} +.icon-show-sidebar-horiz:before { + content: "\e9b1"; +} +.icon-show-sidebar-vert:before { + content: "\e9b2"; +} +.icon-shuffle:before { + content: "\e9b3"; +} +.icon-sign:before { + content: "\e9b4"; +} +.icon-signal:before { + content: "\e9b5"; +} +.icon-skull:before { + content: "\e9b6"; +} +.icon-sliders:before { + content: "\e9b7"; +} +.icon-small-screen:before { + content: "\e9b8"; +} +.icon-smile:before { + content: "\e9b9"; +} +.icon-soap:before { + content: "\e9ba"; +} +.icon-speed-o-meter:before { + content: "\e9bb"; +} +.icon-star:before { + content: "\e9bc"; +} +.icon-stop:before { + content: "\e9bd"; +} +.icon-styling-tools:before { + content: "\e9be"; +} +.icon-suitcase:before { + content: "\e9bf"; +} +.icon-syringe:before { + content: "\e9c0"; +} +.icon-table:before { + content: "\e9c1"; +} +.icon-tag:before { + content: "\e9c2"; +} +.icon-target:before { + content: "\e9c3"; +} +.icon-terminal:before { + content: "\e9c4"; +} +.icon-text:before { + content: "\e9c5"; +} +.icon-thumbs-down:before { + content: "\e9c6"; +} +.icon-thumbs-up:before { + content: "\e9c7"; +} +.icon-thunderbolt:before { + content: "\e9c8"; +} +.icon-tie:before { + content: "\e9c9"; +} +.icon-toggles:before { + content: "\e9ca"; +} +.icon-trophy:before { + content: "\e9cb"; +} +.icon-truck:before { + content: "\e9cc"; +} +.icon-tube:before { + content: "\e9cd"; +} +.icon-tv:before { + content: "\e9ce"; +} +.icon-umbrella:before { + content: "\e9cf"; +} +.icon-undo:before { + content: "\e9d0"; +} +.icon-up:before { + content: "\e9d1"; +} +.icon-update:before { + content: "\e9d2"; +} +.icon-up-down:before { + content: "\e9d3"; +} +.icon-upload:before { + content: "\e9d4"; +} +.icon-user:before { + content: "\e9d5"; +} +.icon-user-add:before { + content: "\e9d6"; +} +.icon-user-remove:before { + content: "\e9d7"; +} +.icon-users:before { + content: "\e9d8"; +} +.icon-video:before { + content: "\e9d9"; +} +.icon-video-camera:before { + content: "\e9da"; +} +.icon-volume-down:before { + content: "\e9db"; +} +.icon-volume-mute:before { + content: "\e9dc"; +} +.icon-volume-up:before { + content: "\e9dd"; +} +.icon-wallet:before { + content: "\e9de"; +} +.icon-wand:before { + content: "\e9df"; +} +.icon-warning:before { + content: "\e9e0"; +} +.icon-wi-fi:before { + content: "\e9e1"; +} +.icon-window:before { + content: "\e9e2"; +} +.icon-wrench:before { + content: "\e9e3"; +} +.icon-yes:before { + content: "\e9e4"; +} +.icon-zoom-in:before { + content: "\e9e5"; +} +.icon-zoom-out:before { + content: "\e9e6"; +} + diff --git a/public/css/style.css b/public/css/style.css new file mode 100644 index 0000000..94f97d6 --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,19 @@ +body.dark-mode { + --bg-opacity: 1; + background-color: #1a202c; + background-color: rgba(26, 32, 44, var(--bg-opacity)); + color: #ffffff; +} + +.card-body { + background-color: #181818; +} + +.sticky-footer { + background-color: #181818; + color: #fff +} + +.sticky-footer a { + color: #fff +} \ No newline at end of file diff --git a/public/css/vendor.css b/public/css/vendor.css new file mode 100644 index 0000000..ba554f4 --- /dev/null +++ b/public/css/vendor.css @@ -0,0 +1,1673 @@ +/* =================================================================== + * + * Dazzle v1.0 Vendor/Third Party CSS + * 04-27-2017 + * ------------------------------------------------------------------ + * + * TOC: + * 01. animate on scroll + * 02. owl carousel + * 03. lity + * + * =================================================================== */ + + +/*! + * 01. animate on scroll + * https://michalsnik.github.io/aos/ + * + */ + +[data-aos][data-aos][data-aos-duration='50'], +body[data-aos-duration='50'] [data-aos] { + transition-duration: 50ms; +} + +[data-aos][data-aos][data-aos-delay='50'], +body[data-aos-delay='50'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='50'].aos-animate, +body[data-aos-delay='50'] [data-aos].aos-animate { + transition-delay: 50ms; +} + +[data-aos][data-aos][data-aos-duration='100'], +body[data-aos-duration='100'] [data-aos] { + transition-duration: .1s; +} + +[data-aos][data-aos][data-aos-delay='100'], +body[data-aos-delay='100'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='100'].aos-animate, +body[data-aos-delay='100'] [data-aos].aos-animate { + transition-delay: .1s; +} + +[data-aos][data-aos][data-aos-duration='150'], +body[data-aos-duration='150'] [data-aos] { + transition-duration: .15s; +} + +[data-aos][data-aos][data-aos-delay='150'], +body[data-aos-delay='150'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='150'].aos-animate, +body[data-aos-delay='150'] [data-aos].aos-animate { + transition-delay: .15s; +} + +[data-aos][data-aos][data-aos-duration='200'], +body[data-aos-duration='200'] [data-aos] { + transition-duration: .2s; +} + +[data-aos][data-aos][data-aos-delay='200'], +body[data-aos-delay='200'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='200'].aos-animate, +body[data-aos-delay='200'] [data-aos].aos-animate { + transition-delay: .2s; +} + +[data-aos][data-aos][data-aos-duration='250'], +body[data-aos-duration='250'] [data-aos] { + transition-duration: .25s; +} + +[data-aos][data-aos][data-aos-delay='250'], +body[data-aos-delay='250'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='250'].aos-animate, +body[data-aos-delay='250'] [data-aos].aos-animate { + transition-delay: .25s; +} + +[data-aos][data-aos][data-aos-duration='300'], +body[data-aos-duration='300'] [data-aos] { + transition-duration: .3s; +} + +[data-aos][data-aos][data-aos-delay='300'], +body[data-aos-delay='300'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='300'].aos-animate, +body[data-aos-delay='300'] [data-aos].aos-animate { + transition-delay: .3s; +} + +[data-aos][data-aos][data-aos-duration='350'], +body[data-aos-duration='350'] [data-aos] { + transition-duration: .35s; +} + +[data-aos][data-aos][data-aos-delay='350'], +body[data-aos-delay='350'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='350'].aos-animate, +body[data-aos-delay='350'] [data-aos].aos-animate { + transition-delay: .35s; +} + +[data-aos][data-aos][data-aos-duration='400'], +body[data-aos-duration='400'] [data-aos] { + transition-duration: .4s; +} + +[data-aos][data-aos][data-aos-delay='400'], +body[data-aos-delay='400'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='400'].aos-animate, +body[data-aos-delay='400'] [data-aos].aos-animate { + transition-delay: .4s; +} + +[data-aos][data-aos][data-aos-duration='450'], +body[data-aos-duration='450'] [data-aos] { + transition-duration: .45s; +} + +[data-aos][data-aos][data-aos-delay='450'], +body[data-aos-delay='450'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='450'].aos-animate, +body[data-aos-delay='450'] [data-aos].aos-animate { + transition-delay: .45s; +} + +[data-aos][data-aos][data-aos-duration='500'], +body[data-aos-duration='500'] [data-aos] { + transition-duration: .5s; +} + +[data-aos][data-aos][data-aos-delay='500'], +body[data-aos-delay='500'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='500'].aos-animate, +body[data-aos-delay='500'] [data-aos].aos-animate { + transition-delay: .5s; +} + +[data-aos][data-aos][data-aos-duration='550'], +body[data-aos-duration='550'] [data-aos] { + transition-duration: .55s; +} + +[data-aos][data-aos][data-aos-delay='550'], +body[data-aos-delay='550'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='550'].aos-animate, +body[data-aos-delay='550'] [data-aos].aos-animate { + transition-delay: .55s; +} + +[data-aos][data-aos][data-aos-duration='600'], +body[data-aos-duration='600'] [data-aos] { + transition-duration: .6s; +} + +[data-aos][data-aos][data-aos-delay='600'], +body[data-aos-delay='600'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='600'].aos-animate, +body[data-aos-delay='600'] [data-aos].aos-animate { + transition-delay: .6s; +} + +[data-aos][data-aos][data-aos-duration='650'], +body[data-aos-duration='650'] [data-aos] { + transition-duration: .65s; +} + +[data-aos][data-aos][data-aos-delay='650'], +body[data-aos-delay='650'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='650'].aos-animate, +body[data-aos-delay='650'] [data-aos].aos-animate { + transition-delay: .65s; +} + +[data-aos][data-aos][data-aos-duration='700'], +body[data-aos-duration='700'] [data-aos] { + transition-duration: .7s; +} + +[data-aos][data-aos][data-aos-delay='700'], +body[data-aos-delay='700'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='700'].aos-animate, +body[data-aos-delay='700'] [data-aos].aos-animate { + transition-delay: .7s; +} + +[data-aos][data-aos][data-aos-duration='750'], +body[data-aos-duration='750'] [data-aos] { + transition-duration: .75s; +} + +[data-aos][data-aos][data-aos-delay='750'], +body[data-aos-delay='750'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='750'].aos-animate, +body[data-aos-delay='750'] [data-aos].aos-animate { + transition-delay: .75s; +} + +[data-aos][data-aos][data-aos-duration='800'], +body[data-aos-duration='800'] [data-aos] { + transition-duration: .8s; +} + +[data-aos][data-aos][data-aos-delay='800'], +body[data-aos-delay='800'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='800'].aos-animate, +body[data-aos-delay='800'] [data-aos].aos-animate { + transition-delay: .8s; +} + +[data-aos][data-aos][data-aos-duration='850'], +body[data-aos-duration='850'] [data-aos] { + transition-duration: .85s; +} + +[data-aos][data-aos][data-aos-delay='850'], +body[data-aos-delay='850'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='850'].aos-animate, +body[data-aos-delay='850'] [data-aos].aos-animate { + transition-delay: .85s; +} + +[data-aos][data-aos][data-aos-duration='900'], +body[data-aos-duration='900'] [data-aos] { + transition-duration: .9s; +} + +[data-aos][data-aos][data-aos-delay='900'], +body[data-aos-delay='900'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='900'].aos-animate, +body[data-aos-delay='900'] [data-aos].aos-animate { + transition-delay: .9s; +} + +[data-aos][data-aos][data-aos-duration='950'], +body[data-aos-duration='950'] [data-aos] { + transition-duration: .95s; +} + +[data-aos][data-aos][data-aos-delay='950'], +body[data-aos-delay='950'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='950'].aos-animate, +body[data-aos-delay='950'] [data-aos].aos-animate { + transition-delay: .95s; +} + +[data-aos][data-aos][data-aos-duration='1000'], +body[data-aos-duration='1000'] [data-aos] { + transition-duration: 1s; +} + +[data-aos][data-aos][data-aos-delay='1000'], +body[data-aos-delay='1000'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1000'].aos-animate, +body[data-aos-delay='1000'] [data-aos].aos-animate { + transition-delay: 1s; +} + +[data-aos][data-aos][data-aos-duration='1050'], +body[data-aos-duration='1050'] [data-aos] { + transition-duration: 1.05s; +} + +[data-aos][data-aos][data-aos-delay='1050'], +body[data-aos-delay='1050'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1050'].aos-animate, +body[data-aos-delay='1050'] [data-aos].aos-animate { + transition-delay: 1.05s; +} + +[data-aos][data-aos][data-aos-duration='1100'], +body[data-aos-duration='1100'] [data-aos] { + transition-duration: 1.1s; +} + +[data-aos][data-aos][data-aos-delay='1100'], +body[data-aos-delay='1100'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1100'].aos-animate, +body[data-aos-delay='1100'] [data-aos].aos-animate { + transition-delay: 1.1s; +} + +[data-aos][data-aos][data-aos-duration='1150'], +body[data-aos-duration='1150'] [data-aos] { + transition-duration: 1.15s; +} + +[data-aos][data-aos][data-aos-delay='1150'], +body[data-aos-delay='1150'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1150'].aos-animate, +body[data-aos-delay='1150'] [data-aos].aos-animate { + transition-delay: 1.15s; +} + +[data-aos][data-aos][data-aos-duration='1200'], +body[data-aos-duration='1200'] [data-aos] { + transition-duration: 1.2s; +} + +[data-aos][data-aos][data-aos-delay='1200'], +body[data-aos-delay='1200'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1200'].aos-animate, +body[data-aos-delay='1200'] [data-aos].aos-animate { + transition-delay: 1.2s; +} + +[data-aos][data-aos][data-aos-duration='1250'], +body[data-aos-duration='1250'] [data-aos] { + transition-duration: 1.25s; +} + +[data-aos][data-aos][data-aos-delay='1250'], +body[data-aos-delay='1250'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1250'].aos-animate, +body[data-aos-delay='1250'] [data-aos].aos-animate { + transition-delay: 1.25s; +} + +[data-aos][data-aos][data-aos-duration='1300'], +body[data-aos-duration='1300'] [data-aos] { + transition-duration: 1.3s; +} + +[data-aos][data-aos][data-aos-delay='1300'], +body[data-aos-delay='1300'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1300'].aos-animate, +body[data-aos-delay='1300'] [data-aos].aos-animate { + transition-delay: 1.3s; +} + +[data-aos][data-aos][data-aos-duration='1350'], +body[data-aos-duration='1350'] [data-aos] { + transition-duration: 1.35s; +} + +[data-aos][data-aos][data-aos-delay='1350'], +body[data-aos-delay='1350'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1350'].aos-animate, +body[data-aos-delay='1350'] [data-aos].aos-animate { + transition-delay: 1.35s; +} + +[data-aos][data-aos][data-aos-duration='1400'], +body[data-aos-duration='1400'] [data-aos] { + transition-duration: 1.4s; +} + +[data-aos][data-aos][data-aos-delay='1400'], +body[data-aos-delay='1400'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1400'].aos-animate, +body[data-aos-delay='1400'] [data-aos].aos-animate { + transition-delay: 1.4s; +} + +[data-aos][data-aos][data-aos-duration='1450'], +body[data-aos-duration='1450'] [data-aos] { + transition-duration: 1.45s; +} + +[data-aos][data-aos][data-aos-delay='1450'], +body[data-aos-delay='1450'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1450'].aos-animate, +body[data-aos-delay='1450'] [data-aos].aos-animate { + transition-delay: 1.45s; +} + +[data-aos][data-aos][data-aos-duration='1500'], +body[data-aos-duration='1500'] [data-aos] { + transition-duration: 1.5s; +} + +[data-aos][data-aos][data-aos-delay='1500'], +body[data-aos-delay='1500'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1500'].aos-animate, +body[data-aos-delay='1500'] [data-aos].aos-animate { + transition-delay: 1.5s; +} + +[data-aos][data-aos][data-aos-duration='1550'], +body[data-aos-duration='1550'] [data-aos] { + transition-duration: 1.55s; +} + +[data-aos][data-aos][data-aos-delay='1550'], +body[data-aos-delay='1550'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1550'].aos-animate, +body[data-aos-delay='1550'] [data-aos].aos-animate { + transition-delay: 1.55s; +} + +[data-aos][data-aos][data-aos-duration='1600'], +body[data-aos-duration='1600'] [data-aos] { + transition-duration: 1.6s; +} + +[data-aos][data-aos][data-aos-delay='1600'], +body[data-aos-delay='1600'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1600'].aos-animate, +body[data-aos-delay='1600'] [data-aos].aos-animate { + transition-delay: 1.6s; +} + +[data-aos][data-aos][data-aos-duration='1650'], +body[data-aos-duration='1650'] [data-aos] { + transition-duration: 1.65s; +} + +[data-aos][data-aos][data-aos-delay='1650'], +body[data-aos-delay='1650'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1650'].aos-animate, +body[data-aos-delay='1650'] [data-aos].aos-animate { + transition-delay: 1.65s; +} + +[data-aos][data-aos][data-aos-duration='1700'], +body[data-aos-duration='1700'] [data-aos] { + transition-duration: 1.7s; +} + +[data-aos][data-aos][data-aos-delay='1700'], +body[data-aos-delay='1700'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1700'].aos-animate, +body[data-aos-delay='1700'] [data-aos].aos-animate { + transition-delay: 1.7s; +} + +[data-aos][data-aos][data-aos-duration='1750'], +body[data-aos-duration='1750'] [data-aos] { + transition-duration: 1.75s; +} + +[data-aos][data-aos][data-aos-delay='1750'], +body[data-aos-delay='1750'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1750'].aos-animate, +body[data-aos-delay='1750'] [data-aos].aos-animate { + transition-delay: 1.75s; +} + +[data-aos][data-aos][data-aos-duration='1800'], +body[data-aos-duration='1800'] [data-aos] { + transition-duration: 1.8s; +} + +[data-aos][data-aos][data-aos-delay='1800'], +body[data-aos-delay='1800'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1800'].aos-animate, +body[data-aos-delay='1800'] [data-aos].aos-animate { + transition-delay: 1.8s; +} + +[data-aos][data-aos][data-aos-duration='1850'], +body[data-aos-duration='1850'] [data-aos] { + transition-duration: 1.85s; +} + +[data-aos][data-aos][data-aos-delay='1850'], +body[data-aos-delay='1850'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1850'].aos-animate, +body[data-aos-delay='1850'] [data-aos].aos-animate { + transition-delay: 1.85s; +} + +[data-aos][data-aos][data-aos-duration='1900'], +body[data-aos-duration='1900'] [data-aos] { + transition-duration: 1.9s; +} + +[data-aos][data-aos][data-aos-delay='1900'], +body[data-aos-delay='1900'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1900'].aos-animate, +body[data-aos-delay='1900'] [data-aos].aos-animate { + transition-delay: 1.9s; +} + +[data-aos][data-aos][data-aos-duration='1950'], +body[data-aos-duration='1950'] [data-aos] { + transition-duration: 1.95s; +} + +[data-aos][data-aos][data-aos-delay='1950'], +body[data-aos-delay='1950'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='1950'].aos-animate, +body[data-aos-delay='1950'] [data-aos].aos-animate { + transition-delay: 1.95s; +} + +[data-aos][data-aos][data-aos-duration='2000'], +body[data-aos-duration='2000'] [data-aos] { + transition-duration: 2s; +} + +[data-aos][data-aos][data-aos-delay='2000'], +body[data-aos-delay='2000'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2000'].aos-animate, +body[data-aos-delay='2000'] [data-aos].aos-animate { + transition-delay: 2s; +} + +[data-aos][data-aos][data-aos-duration='2050'], +body[data-aos-duration='2050'] [data-aos] { + transition-duration: 2.05s; +} + +[data-aos][data-aos][data-aos-delay='2050'], +body[data-aos-delay='2050'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2050'].aos-animate, +body[data-aos-delay='2050'] [data-aos].aos-animate { + transition-delay: 2.05s; +} + +[data-aos][data-aos][data-aos-duration='2100'], +body[data-aos-duration='2100'] [data-aos] { + transition-duration: 2.1s; +} + +[data-aos][data-aos][data-aos-delay='2100'], +body[data-aos-delay='2100'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2100'].aos-animate, +body[data-aos-delay='2100'] [data-aos].aos-animate { + transition-delay: 2.1s; +} + +[data-aos][data-aos][data-aos-duration='2150'], +body[data-aos-duration='2150'] [data-aos] { + transition-duration: 2.15s; +} + +[data-aos][data-aos][data-aos-delay='2150'], +body[data-aos-delay='2150'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2150'].aos-animate, +body[data-aos-delay='2150'] [data-aos].aos-animate { + transition-delay: 2.15s; +} + +[data-aos][data-aos][data-aos-duration='2200'], +body[data-aos-duration='2200'] [data-aos] { + transition-duration: 2.2s; +} + +[data-aos][data-aos][data-aos-delay='2200'], +body[data-aos-delay='2200'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2200'].aos-animate, +body[data-aos-delay='2200'] [data-aos].aos-animate { + transition-delay: 2.2s; +} + +[data-aos][data-aos][data-aos-duration='2250'], +body[data-aos-duration='2250'] [data-aos] { + transition-duration: 2.25s; +} + +[data-aos][data-aos][data-aos-delay='2250'], +body[data-aos-delay='2250'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2250'].aos-animate, +body[data-aos-delay='2250'] [data-aos].aos-animate { + transition-delay: 2.25s; +} + +[data-aos][data-aos][data-aos-duration='2300'], +body[data-aos-duration='2300'] [data-aos] { + transition-duration: 2.3s; +} + +[data-aos][data-aos][data-aos-delay='2300'], +body[data-aos-delay='2300'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2300'].aos-animate, +body[data-aos-delay='2300'] [data-aos].aos-animate { + transition-delay: 2.3s; +} + +[data-aos][data-aos][data-aos-duration='2350'], +body[data-aos-duration='2350'] [data-aos] { + transition-duration: 2.35s; +} + +[data-aos][data-aos][data-aos-delay='2350'], +body[data-aos-delay='2350'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2350'].aos-animate, +body[data-aos-delay='2350'] [data-aos].aos-animate { + transition-delay: 2.35s; +} + +[data-aos][data-aos][data-aos-duration='2400'], +body[data-aos-duration='2400'] [data-aos] { + transition-duration: 2.4s; +} + +[data-aos][data-aos][data-aos-delay='2400'], +body[data-aos-delay='2400'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2400'].aos-animate, +body[data-aos-delay='2400'] [data-aos].aos-animate { + transition-delay: 2.4s; +} + +[data-aos][data-aos][data-aos-duration='2450'], +body[data-aos-duration='2450'] [data-aos] { + transition-duration: 2.45s; +} + +[data-aos][data-aos][data-aos-delay='2450'], +body[data-aos-delay='2450'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2450'].aos-animate, +body[data-aos-delay='2450'] [data-aos].aos-animate { + transition-delay: 2.45s; +} + +[data-aos][data-aos][data-aos-duration='2500'], +body[data-aos-duration='2500'] [data-aos] { + transition-duration: 2.5s; +} + +[data-aos][data-aos][data-aos-delay='2500'], +body[data-aos-delay='2500'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2500'].aos-animate, +body[data-aos-delay='2500'] [data-aos].aos-animate { + transition-delay: 2.5s; +} + +[data-aos][data-aos][data-aos-duration='2550'], +body[data-aos-duration='2550'] [data-aos] { + transition-duration: 2.55s; +} + +[data-aos][data-aos][data-aos-delay='2550'], +body[data-aos-delay='2550'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2550'].aos-animate, +body[data-aos-delay='2550'] [data-aos].aos-animate { + transition-delay: 2.55s; +} + +[data-aos][data-aos][data-aos-duration='2600'], +body[data-aos-duration='2600'] [data-aos] { + transition-duration: 2.6s; +} + +[data-aos][data-aos][data-aos-delay='2600'], +body[data-aos-delay='2600'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2600'].aos-animate, +body[data-aos-delay='2600'] [data-aos].aos-animate { + transition-delay: 2.6s; +} + +[data-aos][data-aos][data-aos-duration='2650'], +body[data-aos-duration='2650'] [data-aos] { + transition-duration: 2.65s; +} + +[data-aos][data-aos][data-aos-delay='2650'], +body[data-aos-delay='2650'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2650'].aos-animate, +body[data-aos-delay='2650'] [data-aos].aos-animate { + transition-delay: 2.65s; +} + +[data-aos][data-aos][data-aos-duration='2700'], +body[data-aos-duration='2700'] [data-aos] { + transition-duration: 2.7s; +} + +[data-aos][data-aos][data-aos-delay='2700'], +body[data-aos-delay='2700'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2700'].aos-animate, +body[data-aos-delay='2700'] [data-aos].aos-animate { + transition-delay: 2.7s; +} + +[data-aos][data-aos][data-aos-duration='2750'], +body[data-aos-duration='2750'] [data-aos] { + transition-duration: 2.75s; +} + +[data-aos][data-aos][data-aos-delay='2750'], +body[data-aos-delay='2750'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2750'].aos-animate, +body[data-aos-delay='2750'] [data-aos].aos-animate { + transition-delay: 2.75s; +} + +[data-aos][data-aos][data-aos-duration='2800'], +body[data-aos-duration='2800'] [data-aos] { + transition-duration: 2.8s; +} + +[data-aos][data-aos][data-aos-delay='2800'], +body[data-aos-delay='2800'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2800'].aos-animate, +body[data-aos-delay='2800'] [data-aos].aos-animate { + transition-delay: 2.8s; +} + +[data-aos][data-aos][data-aos-duration='2850'], +body[data-aos-duration='2850'] [data-aos] { + transition-duration: 2.85s; +} + +[data-aos][data-aos][data-aos-delay='2850'], +body[data-aos-delay='2850'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2850'].aos-animate, +body[data-aos-delay='2850'] [data-aos].aos-animate { + transition-delay: 2.85s; +} + +[data-aos][data-aos][data-aos-duration='2900'], +body[data-aos-duration='2900'] [data-aos] { + transition-duration: 2.9s; +} + +[data-aos][data-aos][data-aos-delay='2900'], +body[data-aos-delay='2900'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2900'].aos-animate, +body[data-aos-delay='2900'] [data-aos].aos-animate { + transition-delay: 2.9s; +} + +[data-aos][data-aos][data-aos-duration='2950'], +body[data-aos-duration='2950'] [data-aos] { + transition-duration: 2.95s; +} + +[data-aos][data-aos][data-aos-delay='2950'], +body[data-aos-delay='2950'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='2950'].aos-animate, +body[data-aos-delay='2950'] [data-aos].aos-animate { + transition-delay: 2.95s; +} + +[data-aos][data-aos][data-aos-duration='3000'], +body[data-aos-duration='3000'] [data-aos] { + transition-duration: 3s; +} + +[data-aos][data-aos][data-aos-delay='3000'], +body[data-aos-delay='3000'] [data-aos] { + transition-delay: 0; +} + +[data-aos][data-aos][data-aos-delay='3000'].aos-animate, +body[data-aos-delay='3000'] [data-aos].aos-animate { + transition-delay: 3s; +} + +[data-aos][data-aos][data-aos-easing=linear], +body[data-aos-easing=linear] [data-aos] { + transition-timing-function: cubic-bezier(0.25, 0.25, 0.75, 0.75); +} + +[data-aos][data-aos][data-aos-easing=ease], +body[data-aos-easing=ease] [data-aos] { + transition-timing-function: ease; +} + +[data-aos][data-aos][data-aos-easing=ease-in], +body[data-aos-easing=ease-in] [data-aos] { + transition-timing-function: ease-in; +} + +[data-aos][data-aos][data-aos-easing=ease-out], +body[data-aos-easing=ease-out] [data-aos] { + transition-timing-function: ease-out; +} + +[data-aos][data-aos][data-aos-easing=ease-in-out], +body[data-aos-easing=ease-in-out] [data-aos] { + transition-timing-function: ease-in-out; +} + +[data-aos][data-aos][data-aos-easing=ease-in-back], +body[data-aos-easing=ease-in-back] [data-aos] { + transition-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045); +} + +[data-aos][data-aos][data-aos-easing=ease-out-back], +body[data-aos-easing=ease-out-back] [data-aos] { + transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); +} + +[data-aos][data-aos][data-aos-easing=ease-in-out-back], +body[data-aos-easing=ease-in-out-back] [data-aos] { + transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); +} + +[data-aos][data-aos][data-aos-easing=ease-in-sine], +body[data-aos-easing=ease-in-sine] [data-aos] { + transition-timing-function: cubic-bezier(0.47, 0, 0.745, 0.715); +} + +[data-aos][data-aos][data-aos-easing=ease-out-sine], +body[data-aos-easing=ease-out-sine] [data-aos] { + transition-timing-function: cubic-bezier(0.39, 0.575, 0.565, 1); +} + +[data-aos][data-aos][data-aos-easing=ease-in-out-sine], +body[data-aos-easing=ease-in-out-sine] [data-aos] { + transition-timing-function: cubic-bezier(0.445, 0.05, 0.55, 0.95); +} + +[data-aos][data-aos][data-aos-easing=ease-in-quad], +body[data-aos-easing=ease-in-quad] [data-aos] { + transition-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); +} + +[data-aos][data-aos][data-aos-easing=ease-out-quad], +body[data-aos-easing=ease-out-quad] [data-aos] { + transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); +} + +[data-aos][data-aos][data-aos-easing=ease-in-out-quad], +body[data-aos-easing=ease-in-out-quad] [data-aos] { + transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955); +} + +[data-aos][data-aos][data-aos-easing=ease-in-cubic], +body[data-aos-easing=ease-in-cubic] [data-aos] { + transition-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); +} + +[data-aos][data-aos][data-aos-easing=ease-out-cubic], +body[data-aos-easing=ease-out-cubic] [data-aos] { + transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); +} + +[data-aos][data-aos][data-aos-easing=ease-in-out-cubic], +body[data-aos-easing=ease-in-out-cubic] [data-aos] { + transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955); +} + +[data-aos][data-aos][data-aos-easing=ease-in-quart], +body[data-aos-easing=ease-in-quart] [data-aos] { + transition-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); +} + +[data-aos][data-aos][data-aos-easing=ease-out-quart], +body[data-aos-easing=ease-out-quart] [data-aos] { + transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); +} + +[data-aos][data-aos][data-aos-easing=ease-in-out-quart], +body[data-aos-easing=ease-in-out-quart] [data-aos] { + transition-timing-function: cubic-bezier(0.455, 0.03, 0.515, 0.955); +} + +[data-aos^=fade][data-aos^=fade] { + opacity: 0; + transition-property: opacity, transform; +} + +[data-aos^=fade][data-aos^=fade].aos-animate { + opacity: 1; + transform: translate(0); +} + +[data-aos=fade-up] { + transform: translateY(100px); +} + +[data-aos=fade-down] { + transform: translateY(-100px); +} + +[data-aos=fade-right] { + transform: translate(-100px); +} + +[data-aos=fade-left] { + transform: translate(100px); +} + +[data-aos=fade-up-right] { + transform: translate(-100px, 100px); +} + +[data-aos=fade-up-left] { + transform: translate(100px, 100px); +} + +[data-aos=fade-down-right] { + transform: translate(-100px, -100px); +} + +[data-aos=fade-down-left] { + transform: translate(100px, -100px); +} + +[data-aos^=zoom][data-aos^=zoom] { + opacity: 0; + transition-property: opacity, transform; +} + +[data-aos^=zoom][data-aos^=zoom].aos-animate { + opacity: 1; + transform: translate(0) scale(1); +} + +[data-aos=zoom-in] { + transform: scale(0.6); +} + +[data-aos=zoom-in-up] { + transform: translateY(100px) scale(0.6); +} + +[data-aos=zoom-in-down] { + transform: translateY(-100px) scale(0.6); +} + +[data-aos=zoom-in-right] { + transform: translate(-100px) scale(0.6); +} + +[data-aos=zoom-in-left] { + transform: translate(100px) scale(0.6); +} + +[data-aos=zoom-out] { + transform: scale(1.2); +} + +[data-aos=zoom-out-up] { + transform: translateY(100px) scale(1.2); +} + +[data-aos=zoom-out-down] { + transform: translateY(-100px) scale(1.2); +} + +[data-aos=zoom-out-right] { + transform: translate(-100px) scale(1.2); +} + +[data-aos=zoom-out-left] { + transform: translate(100px) scale(1.2); +} + +[data-aos^=slide][data-aos^=slide] { + transition-property: transform; +} + +[data-aos^=slide][data-aos^=slide].aos-animate { + transform: translate(0); +} + +[data-aos=slide-up] { + transform: translateY(100%); +} + +[data-aos=slide-down] { + transform: translateY(-100%); +} + +[data-aos=slide-right] { + transform: translateX(-100%); +} + +[data-aos=slide-left] { + transform: translateX(100%); +} + +[data-aos^=flip][data-aos^=flip] { + backface-visibility: hidden; + transition-property: transform; +} + +[data-aos=flip-left] { + transform: perspective(2500px) rotateY(-100deg); +} + +[data-aos=flip-left].aos-animate { + transform: perspective(2500px) rotateY(0); +} + +[data-aos=flip-right] { + transform: perspective(2500px) rotateY(100deg); +} + +[data-aos=flip-right].aos-animate { + transform: perspective(2500px) rotateY(0); +} + +[data-aos=flip-up] { + transform: perspective(2500px) rotateX(-100deg); +} + +[data-aos=flip-up].aos-animate { + transform: perspective(2500px) rotateX(0); +} + +[data-aos=flip-down] { + transform: perspective(2500px) rotateX(100deg); +} + +[data-aos=flip-down].aos-animate { + transform: perspective(2500px) rotateX(0); +} + + +/*# sourceMappingURL=aos.css.map*/ + + +/** + * 02. owl carousel v2.2.0 + * Copyright 2013-2016 David Deutsch + * Licensed under MIT (https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE) + */ + + +/* + * Owl Carousel - Core + */ + +.owl-carousel { + display: none; + width: 100%; + -webkit-tap-highlight-color: transparent; + /* position relative and z-index fix webkit rendering fonts issue */ + position: relative; + z-index: 1; +} + +.owl-carousel .owl-stage { + position: relative; + -ms-touch-action: pan-Y; +} + +.owl-carousel .owl-stage:after { + content: "."; + display: block; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +.owl-carousel .owl-stage-outer { + position: relative; + overflow: hidden; + /* fix for flashing background */ + -webkit-transform: translate3d(0px, 0px, 0px); +} + +.owl-carousel .owl-item { + position: relative; + min-height: 1px; + float: left; + -webkit-backface-visibility: hidden; + -webkit-tap-highlight-color: transparent; + -webkit-touch-callout: none; +} + +.owl-carousel .owl-item img { + display: block; + width: 100%; + -webkit-transform-style: preserve-3d; +} + +.owl-carousel .owl-nav.disabled, +.owl-carousel .owl-dots.disabled { + display: none; +} + +.owl-carousel .owl-nav .owl-prev, +.owl-carousel .owl-nav .owl-next, +.owl-carousel .owl-dot { + cursor: pointer; + cursor: hand; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.owl-carousel.owl-loaded { + display: block; +} + +.owl-carousel.owl-loading { + opacity: 0; + display: block; +} + +.owl-carousel.owl-hidden { + opacity: 0; +} + +.owl-carousel.owl-refresh .owl-item { + visibility: hidden; +} + +.owl-carousel.owl-drag .owl-item { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.owl-carousel.owl-grab { + cursor: move; + cursor: grab; +} + +.owl-carousel.owl-rtl { + direction: rtl; +} + +.owl-carousel.owl-rtl .owl-item { + float: right; +} + + +/* No Js */ + +.no-js .owl-carousel { + display: block; +} + + +/* + * Owl Carousel - Animate Plugin + */ + +.owl-carousel .animated { + -webkit-animation-duration: 1000ms; + animation-duration: 1000ms; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; +} + +.owl-carousel .owl-animated-in { + z-index: 0; +} + +.owl-carousel .owl-animated-out { + z-index: 1; +} + +.owl-carousel .fadeOut { + -webkit-animation-name: fadeOut; + animation-name: fadeOut; +} + +@-webkit-keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +@keyframes fadeOut { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + + +/* + * Owl Carousel - Auto Height Plugin + */ + +.owl-height { + transition: height 500ms ease-in-out; +} + + +/* + * Owl Carousel - Lazy Load Plugin + */ + +.owl-carousel .owl-item .owl-lazy { + opacity: 0; + transition: opacity 400ms ease; +} + +.owl-carousel .owl-item img.owl-lazy { + -webkit-transform-style: preserve-3d; + transform-style: preserve-3d; +} + + +/* + * Owl Carousel - Video Plugin + */ + +.owl-carousel .owl-video-wrapper { + position: relative; + height: 100%; + background: #000; +} + +.owl-carousel .owl-video-play-icon { + position: absolute; + height: 80px; + width: 80px; + left: 50%; + top: 50%; + margin-left: -40px; + margin-top: -40px; + background: url("owl.video.play.png") no-repeat; + cursor: pointer; + z-index: 1; + -webkit-backface-visibility: hidden; + transition: -webkit-transform 100ms ease; + transition: transform 100ms ease; +} + +.owl-carousel .owl-video-play-icon:hover { + -webkit-transform: scale(1.3, 1.3); + -ms-transform: scale(1.3, 1.3); + transform: scale(1.3, 1.3); +} + +.owl-carousel .owl-video-playing .owl-video-tn, +.owl-carousel .owl-video-playing .owl-video-play-icon { + display: none; +} + +.owl-carousel .owl-video-tn { + opacity: 0; + height: 100%; + background-position: center center; + background-repeat: no-repeat; + background-size: contain; + transition: opacity 400ms ease; +} + +.owl-carousel .owl-video-frame { + position: relative; + z-index: 1; + height: 100%; + width: 100%; +} + + +/*! + * 03. lity - v1.6.6 - 2016-04-22 + * http://sorgalla.com/lity/ + * Copyright (c) 2016 Jan Sorgalla; Licensed MIT */ + +.lity { + z-index: 9990; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + white-space: nowrap; + background: #ffffff; + background: white; + outline: none !important; + opacity: 0; + -webkit-transition: opacity 0.3s ease; + -o-transition: opacity 0.3s ease; + transition: opacity 0.3s ease; +} + +.lity.lity-opened { + opacity: 1; +} + +.lity.lity-closed { + opacity: 0; +} + +.lity * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.lity-wrap { + z-index: 9990; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + text-align: center; + outline: none !important; +} + +.lity-wrap:before { + content: ''; + display: inline-block; + height: 100%; + vertical-align: middle; + margin-right: -0.25em; +} + +.lity-loader { + z-index: 9991; + color: #333; + position: absolute; + top: 50%; + margin-top: -0.8em; + width: 100%; + text-align: center; + font-size: 14px; + font-family: Arial, Helvetica, sans-serif; + opacity: 0; + -webkit-transition: opacity 0.3s ease; + -o-transition: opacity 0.3s ease; + transition: opacity 0.3s ease; +} + +.lity-loading .lity-loader { + opacity: 1; +} + +.lity-container { + z-index: 9992; + position: relative; + text-align: left; + vertical-align: middle; + display: inline-block; + white-space: normal; + max-width: 100%; + max-height: 100%; + outline: none !important; +} + +.lity-content { + z-index: 9993; + width: 100%; + -webkit-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + -webkit-transition: -webkit-transform 0.3s ease; + -o-transition: -o-transform 0.3s ease; + transition: transform 0.3s ease; +} + +.lity-loading .lity-content, +.lity-closed .lity-content { + -webkit-transform: scale(0.8); + -ms-transform: scale(0.8); + -o-transform: scale(0.8); + transform: scale(0.8); +} + +.lity-content:after { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + display: block; + right: 0; + width: auto; + height: auto; + z-index: -1; +} + +.lity-close { + z-index: 9994; + width: 42px; + height: 42px; + position: fixed; + text-align: center !important; + right: 20px; + top: 20px; + -webkit-appearance: none; + cursor: pointer; + text-decoration: none; + text-align: center; + padding: 0; + margin: 0; + color: black; + font-style: normal; + font-size: 30px; + font-family: Arial, sans-serif; + line-height: 42px; + border: 0; + background: transparent; + outline: none; + -webkit-box-shadow: none; + box-shadow: none; + font: 0/0 a; + text-shadow: none; + color: transparent; + border-radius: 50%; +} + +.lity-close::before, +.lity-close::after { + display: block; + content: ""; + height: 20px; + width: 2px; + background-color: black; + position: absolute; + top: 11px; + left: 20px; +} + +.lity-close::before { + -webkit-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + transform: rotate(-45deg); +} + +.lity-close::after { + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +.lity-close::-moz-focus-inner { + border: 0; + padding: 0; +} + +.lity-close:hover, +.lity-close:focus, +.lity-close:active, +.lity-close:visited { + text-decoration: none; + text-align: center; + padding: 0; + color: #fff; + font-style: normal; + font-size: 30px; + font-family: Arial, sans-serif; + line-height: 36px; + border: 0; + background: transparent; + outline: none; + -webkit-box-shadow: none; + box-shadow: none; + font: 0/0 a; + text-shadow: none; + color: transparent; +} + +.lity-close:hover::before, +.lity-close:hover::after, +.lity-close:focus::before, +.lity-close:focus::after, +.lity-close:active::before, +.lity-close:active::after, +.lity-close:visited::before, +.lity-close:visited::after { + background-color: #39b54a; +} + + +/* Image */ + +.lity-image img { + max-width: 100%; + display: block; + line-height: 0; + border: 0; +} + + +/* iFrame */ + +.lity-iframe .lity-container { + width: 100%; + max-width: 964px; +} + +.lity-iframe-container { + width: 100%; + height: 0; + padding-top: 56.25%; + overflow: auto; + pointer-events: auto; + -webkit-transform: translateZ(0); + transform: translateZ(0); + -webkit-overflow-scrolling: touch; +} + +.lity-iframe-container iframe { + position: absolute; + display: block; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #000; +} + +.lity-hide { + display: none; +} + + +/*# sourceMappingURL=vendor.css.map */ \ No newline at end of file diff --git a/public/efek-salju.js b/public/efek-salju.js new file mode 100644 index 0000000..8fe8ebc --- /dev/null +++ b/public/efek-salju.js @@ -0,0 +1,495 @@ +/* + DHTML Snowstorm! OO-style Jascript-based Snow effect + ---------------------------------------------------- + Version 1.4.20091115 (Previous rev: v1.3.20081215) + Code by Scott Schiller - http://schillmania.com + ---------------------------------------------------- + + Initializes after body onload() by default (via addEventHandler() call at bottom.) + To customize properties, edit below or override configuration after this script + has run (but before body.onload), eg. snowStorm.snowStick = false; + +*/ + +var snowStorm = null; + +function SnowStorm() { + + // --- PROPERTIES --- + + this.flakesMax = 128; // Limit total amount of snow made (falling + sticking) + this.flakesMaxActive = 64; // Limit amount of snow falling at once (less = lower CPU use) + this.animationInterval = 33; // Theoretical "miliseconds per frame" measurement. 20 = fast + smooth, but high CPU use. 50 = more conservative, but slower + this.flakeBottom = null; // Integer for Y axis snow limit, 0 or null for "full-screen" snow effect + this.targetElement = null; // element which snow will be appended to (document body if null/undefined) - can be an element ID string, or a DOM node reference + this.followMouse = true; // Snow will change movement with the user's mouse + this.snowColor = '#fff'; // Don't eat (or use?) yellow snow. + this.snowCharacter = '•'; // • = bullet, · is square on some systems etc. + this.snowStick = true; // Whether or not snow should "stick" at the bottom. When off, will never collect. + this.useMeltEffect = true; // When recycling fallen snow (or rarely, when falling), have it "melt" and fade out if browser supports it + this.useTwinkleEffect = false; // Allow snow to randomly "flicker" in and out of view while falling + this.usePositionFixed = false; // true = snow not affected by window scroll. may increase CPU load, disabled by default - if enabled, used only where supported + + // --- less-used bits --- + + this.flakeLeftOffset = 0; // amount to subtract from edges of container + this.flakeRightOffset = 0; // amount to subtract from edges of container + this.flakeWidth = 8; // max pixel width for snow element + this.flakeHeight = 8; // max pixel height for snow element + this.vMaxX = 5; // Maximum X velocity range for snow + this.vMaxY = 4; // Maximum Y velocity range + this.zIndex = 0; // CSS stacking order applied to each snowflake + + // --- End of user section --- + + // jslint global declarations + /*global window, document, navigator, clearInterval, setInterval */ + + var addEvent = (typeof(window.attachEvent)=='undefined'?function(o,evtName,evtHandler) { + return o.addEventListener(evtName,evtHandler,false); + }:function(o,evtName,evtHandler) { + return o.attachEvent('on'+evtName,evtHandler); + }); + + var removeEvent = (typeof(window.attachEvent)=='undefined'?function(o,evtName,evtHandler) { + return o.removeEventListener(evtName,evtHandler,false); + }:function(o,evtName,evtHandler) { + return o.detachEvent('on'+evtName,evtHandler); + }); + + function rnd(n,min) { + if (isNaN(min)) { + min = 0; + } + return (Math.random()*n)+min; + } + + function plusMinus(n) { + return (parseInt(rnd(2),10)==1?n*-1:n); + } + + var s = this; + var storm = this; + this.timers = []; + this.flakes = []; + this.disabled = false; + this.active = false; + + var isIE = navigator.userAgent.match(/msie/i); + var isIE6 = navigator.userAgent.match(/msie 6/i); + var isOldIE = (isIE && (isIE6 || navigator.userAgent.match(/msie 5/i))); + var isWin9X = navigator.appVersion.match(/windows 98/i); + var isiPhone = navigator.userAgent.match(/iphone/i); + var isBackCompatIE = (isIE && document.compatMode == 'BackCompat'); + var noFixed = ((isBackCompatIE || isIE6 || isiPhone)?true:false); + var screenX = null; + var screenX2 = null; + var screenY = null; + var scrollY = null; + var vRndX = null; + var vRndY = null; + var windOffset = 1; + var windMultiplier = 2; + var flakeTypes = 6; + var fixedForEverything = false; + var opacitySupported = (function(){ + try { + document.createElement('div').style.opacity = '0.5'; + } catch (e) { + return false; + } + return true; + })(); + var docFrag = document.createDocumentFragment(); + if (s.flakeLeftOffset === null) { + s.flakeLeftOffset = 0; + } + if (s.flakeRightOffset === null) { + s.flakeRightOffset = 0; + } + + this.meltFrameCount = 20; + this.meltFrames = []; + for (var i=0; i=0 && s.vX<0.2) { + s.vX = 0.2; + } else if (s.vX<0 && s.vX>-0.2) { + s.vX = -0.2; + } + if (s.vY>=0 && s.vY<0.2) { + s.vY = 0.2; + } + }; + + this.move = function() { + var vX = s.vX*windOffset; + s.x += vX; + s.y += (s.vY*s.vAmp); + if (s.x >= screenX || screenX-s.x < storm.flakeWidth) { // X-axis scroll check + s.x = 0; + } else if (vX < 0 && s.x-storm.flakeLeftOffset<0-storm.flakeWidth) { + s.x = screenX-storm.flakeWidth-1; // flakeWidth; + } + s.refresh(); + var yDiff = screenY+scrollY-s.y; + if (yDiff0.998) { + // ~1/1000 chance of melting mid-air, with each frame + s.melting = true; + s.melt(); + // only incrementally melt one frame + // s.melting = false; + } + if (storm.useTwinkleEffect) { + if (!s.twinkleFrame) { + if (Math.random()>0.9) { + s.twinkleFrame = parseInt(Math.random()*20,10); + } + } else { + s.twinkleFrame--; + s.o.style.visibility = (s.twinkleFrame && s.twinkleFrame%2===0?'hidden':'visible'); + } + } + } + }; + + this.animate = function() { + // main animation loop + // move, check status, die etc. + s.move(); + }; + + this.setVelocities = function() { + s.vX = vRndX+rnd(storm.vMaxX*0.12,0.1); + s.vY = vRndY+rnd(storm.vMaxY*0.12,0.1); + }; + + this.setOpacity = function(o,opacity) { + if (!opacitySupported) { + return false; + } + o.style.opacity = opacity; + }; + + this.melt = function() { + if (!storm.useMeltEffect || !s.melting) { + s.recycle(); + } else { + if (s.meltFrame < s.meltFrameCount) { + s.meltFrame++; + s.setOpacity(s.o,s.meltFrames[s.meltFrame]); + s.o.style.fontSize = s.fontSize-(s.fontSize*(s.meltFrame/s.meltFrameCount))+'px'; + s.o.style.lineHeight = storm.flakeHeight+2+(storm.flakeHeight*0.75*(s.meltFrame/s.meltFrameCount))+'px'; + } else { + s.recycle(); + } + } + }; + + this.recycle = function() { + s.o.style.display = 'none'; + s.o.style.position = (fixedForEverything?'fixed':'absolute'); + s.o.style.bottom = 'auto'; + s.setVelocities(); + s.vCheck(); + s.meltFrame = 0; + s.melting = false; + s.setOpacity(s.o,1); + s.o.style.padding = '0px'; + s.o.style.margin = '0px'; + s.o.style.fontSize = s.fontSize+'px'; + s.o.style.lineHeight = (storm.flakeHeight+2)+'px'; + s.o.style.textAlign = 'center'; + s.o.style.verticalAlign = 'baseline'; + s.x = parseInt(rnd(screenX-storm.flakeWidth-20),10); + s.y = parseInt(rnd(screenY)*-1,10)-storm.flakeHeight; + s.refresh(); + s.o.style.display = 'block'; + s.active = 1; + }; + + this.recycle(); // set up x/y coords etc. + this.refresh(); + + }; + + this.snow = function() { + var active = 0; + var used = 0; + var waiting = 0; + var flake = null; + for (var i=s.flakes.length; i--;) { + if (s.flakes[i].active == 1) { + s.flakes[i].move(); + active++; + } else if (s.flakes[i].active === 0) { + used++; + } else { + waiting++; + } + if (s.flakes[i].melting) { + s.flakes[i].melt(); + } + } + if (actives.flakesMaxActive) { + s.flakes[s.flakes.length-1].active = -1; + } + } + storm.targetElement.appendChild(docFrag); + }; + + this.timerInit = function() { + s.timers = (!isWin9X?[setInterval(s.snow,s.animationInterval)]:[setInterval(s.snow,s.animationInterval*3),setInterval(s.snow,s.animationInterval)]); + }; + + this.init = function() { + s.randomizeWind(); + s.createSnow(s.flakesMax); // create initial batch + addEvent(window,'resize',s.resizeHandler); + addEvent(window,'scroll',s.scrollHandler); + if (!isOldIE) { + addEvent(window,'blur',s.freeze); + addEvent(window,'focus',s.resume); + } + s.resizeHandler(); + s.scrollHandler(); + if (s.followMouse) { + addEvent(document,'mousemove',s.mouseMove); + } + s.animationInterval = Math.max(20,s.animationInterval); + s.timerInit(); + }; + + var didInit = false; + + this.start = function(bFromOnLoad) { + if (!didInit) { + didInit = true; + } else if (bFromOnLoad) { + // already loaded and running + return true; + } + if (typeof s.targetElement == 'string') { + var targetID = s.targetElement; + s.targetElement = document.getElementById(targetID); + if (!s.targetElement) { + throw new Error('Snowstorm: Unable to get targetElement "'+targetID+'"'); + } + } + if (!s.targetElement) { + s.targetElement = (!isIE?(document.documentElement?document.documentElement:document.body):document.body); + } + if (s.targetElement != document.documentElement && s.targetElement != document.body) { + s.resizeHandler = s.resizeHandlerAlt; // re-map handler to get element instead of screen dimensions + } + s.resizeHandler(); // get bounding box elements + s.usePositionFixed = (s.usePositionFixed && !noFixed); // whether or not position:fixed is supported + fixedForEverything = s.usePositionFixed; + if (screenX && screenY && !s.disabled) { + s.init(); + s.active = true; + } + }; + + function doStart() { + s.start(true); + } + + if (document.addEventListener) { + // safari 3.0.4 doesn't do DOMContentLoaded, maybe others - use a fallback to be safe. + document.addEventListener('DOMContentLoaded',doStart,false); + window.addEventListener('load',doStart,false); + } else { + addEvent(window,'load',doStart); + } + +} + +snowStorm = new SnowStorm(); diff --git a/public/font/FontAwesome.otf b/public/font/FontAwesome.otf new file mode 100644 index 0000000..401ec0f Binary files /dev/null and b/public/font/FontAwesome.otf differ diff --git a/public/font/IcoMoon-Free.ttf b/public/font/IcoMoon-Free.ttf new file mode 100644 index 0000000..5691944 Binary files /dev/null and b/public/font/IcoMoon-Free.ttf differ diff --git a/public/font/Nunito-Regular.ttf b/public/font/Nunito-Regular.ttf new file mode 100644 index 0000000..1e3b176 Binary files /dev/null and b/public/font/Nunito-Regular.ttf differ diff --git a/public/font/Poppins-Black.ttf b/public/font/Poppins-Black.ttf new file mode 100644 index 0000000..5a22bff Binary files /dev/null and b/public/font/Poppins-Black.ttf differ diff --git a/public/font/Poppins-BlackItalic.ttf b/public/font/Poppins-BlackItalic.ttf new file mode 100644 index 0000000..92c213b Binary files /dev/null and b/public/font/Poppins-BlackItalic.ttf differ diff --git a/public/font/Poppins-Bold.ttf b/public/font/Poppins-Bold.ttf new file mode 100644 index 0000000..1170ea9 Binary files /dev/null and b/public/font/Poppins-Bold.ttf differ diff --git a/public/font/Poppins-BoldItalic.ttf b/public/font/Poppins-BoldItalic.ttf new file mode 100644 index 0000000..ca3d660 Binary files /dev/null and b/public/font/Poppins-BoldItalic.ttf differ diff --git a/public/font/Poppins-ExtraBold.ttf b/public/font/Poppins-ExtraBold.ttf new file mode 100644 index 0000000..9e7b797 Binary files /dev/null and b/public/font/Poppins-ExtraBold.ttf differ diff --git a/public/font/Poppins-ExtraBoldItalic.ttf b/public/font/Poppins-ExtraBoldItalic.ttf new file mode 100644 index 0000000..f6f0da6 Binary files /dev/null and b/public/font/Poppins-ExtraBoldItalic.ttf differ diff --git a/public/font/Poppins-ExtraLight.ttf b/public/font/Poppins-ExtraLight.ttf new file mode 100644 index 0000000..20fe902 Binary files /dev/null and b/public/font/Poppins-ExtraLight.ttf differ diff --git a/public/font/Poppins-ExtraLightItalic.ttf b/public/font/Poppins-ExtraLightItalic.ttf new file mode 100644 index 0000000..9b6cab6 Binary files /dev/null and b/public/font/Poppins-ExtraLightItalic.ttf differ diff --git a/public/font/Poppins-Italic.ttf b/public/font/Poppins-Italic.ttf new file mode 100644 index 0000000..2776f0f Binary files /dev/null and b/public/font/Poppins-Italic.ttf differ diff --git a/public/font/Poppins-Light.ttf b/public/font/Poppins-Light.ttf new file mode 100644 index 0000000..1e74b8a Binary files /dev/null and b/public/font/Poppins-Light.ttf differ diff --git a/public/font/Poppins-LightItalic.ttf b/public/font/Poppins-LightItalic.ttf new file mode 100644 index 0000000..7751c04 Binary files /dev/null and b/public/font/Poppins-LightItalic.ttf differ diff --git a/public/font/Poppins-Medium.ttf b/public/font/Poppins-Medium.ttf new file mode 100644 index 0000000..9896e36 Binary files /dev/null and b/public/font/Poppins-Medium.ttf differ diff --git a/public/font/Poppins-MediumItalic.ttf b/public/font/Poppins-MediumItalic.ttf new file mode 100644 index 0000000..8d50134 Binary files /dev/null and b/public/font/Poppins-MediumItalic.ttf differ diff --git a/public/font/Poppins-Regular.ttf b/public/font/Poppins-Regular.ttf new file mode 100644 index 0000000..850d03e Binary files /dev/null and b/public/font/Poppins-Regular.ttf differ diff --git a/public/font/Poppins-SemiBold.ttf b/public/font/Poppins-SemiBold.ttf new file mode 100644 index 0000000..5a9ad7a Binary files /dev/null and b/public/font/Poppins-SemiBold.ttf differ diff --git a/public/font/Poppins-SemiBoldItalic.ttf b/public/font/Poppins-SemiBoldItalic.ttf new file mode 100644 index 0000000..41dfba1 Binary files /dev/null and b/public/font/Poppins-SemiBoldItalic.ttf differ diff --git a/public/font/Poppins-Thin.ttf b/public/font/Poppins-Thin.ttf new file mode 100644 index 0000000..20a6950 Binary files /dev/null and b/public/font/Poppins-Thin.ttf differ diff --git a/public/font/Poppins-ThinItalic.ttf b/public/font/Poppins-ThinItalic.ttf new file mode 100644 index 0000000..b563916 Binary files /dev/null and b/public/font/Poppins-ThinItalic.ttf differ diff --git a/public/font/fontawesome-webfont.eot b/public/font/fontawesome-webfont.eot new file mode 100644 index 0000000..e9f60ca Binary files /dev/null and b/public/font/fontawesome-webfont.eot differ diff --git a/public/font/fontawesome-webfont.svg b/public/font/fontawesome-webfont.svg new file mode 100644 index 0000000..855c845 --- /dev/null +++ b/public/font/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/font/fontawesome-webfont.ttf b/public/font/fontawesome-webfont.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/public/font/fontawesome-webfont.ttf differ diff --git a/public/font/fontawesome-webfont.woff b/public/font/fontawesome-webfont.woff new file mode 100644 index 0000000..400014a Binary files /dev/null and b/public/font/fontawesome-webfont.woff differ diff --git a/public/font/fontawesome-webfont.woff2 b/public/font/fontawesome-webfont.woff2 new file mode 100644 index 0000000..4d13fc6 Binary files /dev/null and b/public/font/fontawesome-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-black-webfont.woff b/public/fonts/montserrat/montserrat-black-webfont.woff new file mode 100644 index 0000000..f57ccc8 Binary files /dev/null and b/public/fonts/montserrat/montserrat-black-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-black-webfont.woff2 b/public/fonts/montserrat/montserrat-black-webfont.woff2 new file mode 100644 index 0000000..cb63d56 Binary files /dev/null and b/public/fonts/montserrat/montserrat-black-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-bold-webfont.woff b/public/fonts/montserrat/montserrat-bold-webfont.woff new file mode 100644 index 0000000..41efe34 Binary files /dev/null and b/public/fonts/montserrat/montserrat-bold-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-bold-webfont.woff2 b/public/fonts/montserrat/montserrat-bold-webfont.woff2 new file mode 100644 index 0000000..37c8bb2 Binary files /dev/null and b/public/fonts/montserrat/montserrat-bold-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-extrabold-webfont.woff b/public/fonts/montserrat/montserrat-extrabold-webfont.woff new file mode 100644 index 0000000..e0596c0 Binary files /dev/null and b/public/fonts/montserrat/montserrat-extrabold-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-extrabold-webfont.woff2 b/public/fonts/montserrat/montserrat-extrabold-webfont.woff2 new file mode 100644 index 0000000..502da06 Binary files /dev/null and b/public/fonts/montserrat/montserrat-extrabold-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-extralight-webfont.woff b/public/fonts/montserrat/montserrat-extralight-webfont.woff new file mode 100644 index 0000000..fdc8d35 Binary files /dev/null and b/public/fonts/montserrat/montserrat-extralight-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-extralight-webfont.woff2 b/public/fonts/montserrat/montserrat-extralight-webfont.woff2 new file mode 100644 index 0000000..a1b8777 Binary files /dev/null and b/public/fonts/montserrat/montserrat-extralight-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-light-webfont.woff b/public/fonts/montserrat/montserrat-light-webfont.woff new file mode 100644 index 0000000..c067266 Binary files /dev/null and b/public/fonts/montserrat/montserrat-light-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-light-webfont.woff2 b/public/fonts/montserrat/montserrat-light-webfont.woff2 new file mode 100644 index 0000000..27956b1 Binary files /dev/null and b/public/fonts/montserrat/montserrat-light-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-medium-webfont.woff b/public/fonts/montserrat/montserrat-medium-webfont.woff new file mode 100644 index 0000000..ef33bae Binary files /dev/null and b/public/fonts/montserrat/montserrat-medium-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-medium-webfont.woff2 b/public/fonts/montserrat/montserrat-medium-webfont.woff2 new file mode 100644 index 0000000..0f6c0ce Binary files /dev/null and b/public/fonts/montserrat/montserrat-medium-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-regular-webfont.woff b/public/fonts/montserrat/montserrat-regular-webfont.woff new file mode 100644 index 0000000..b7760ba Binary files /dev/null and b/public/fonts/montserrat/montserrat-regular-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-regular-webfont.woff2 b/public/fonts/montserrat/montserrat-regular-webfont.woff2 new file mode 100644 index 0000000..dff68f2 Binary files /dev/null and b/public/fonts/montserrat/montserrat-regular-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-semibold-webfont.woff b/public/fonts/montserrat/montserrat-semibold-webfont.woff new file mode 100644 index 0000000..2cc339b Binary files /dev/null and b/public/fonts/montserrat/montserrat-semibold-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-semibold-webfont.woff2 b/public/fonts/montserrat/montserrat-semibold-webfont.woff2 new file mode 100644 index 0000000..f130433 Binary files /dev/null and b/public/fonts/montserrat/montserrat-semibold-webfont.woff2 differ diff --git a/public/fonts/montserrat/montserrat-thin-webfont.woff b/public/fonts/montserrat/montserrat-thin-webfont.woff new file mode 100644 index 0000000..d424dd7 Binary files /dev/null and b/public/fonts/montserrat/montserrat-thin-webfont.woff differ diff --git a/public/fonts/montserrat/montserrat-thin-webfont.woff2 b/public/fonts/montserrat/montserrat-thin-webfont.woff2 new file mode 100644 index 0000000..1d0a0ff Binary files /dev/null and b/public/fonts/montserrat/montserrat-thin-webfont.woff2 differ diff --git a/public/fonts/muli/muli-bold-webfont.woff b/public/fonts/muli/muli-bold-webfont.woff new file mode 100644 index 0000000..32daef1 Binary files /dev/null and b/public/fonts/muli/muli-bold-webfont.woff differ diff --git a/public/fonts/muli/muli-bold-webfont.woff2 b/public/fonts/muli/muli-bold-webfont.woff2 new file mode 100644 index 0000000..2738937 Binary files /dev/null and b/public/fonts/muli/muli-bold-webfont.woff2 differ diff --git a/public/fonts/muli/muli-bolditalic-webfont.woff b/public/fonts/muli/muli-bolditalic-webfont.woff new file mode 100644 index 0000000..0ad75aa Binary files /dev/null and b/public/fonts/muli/muli-bolditalic-webfont.woff differ diff --git a/public/fonts/muli/muli-bolditalic-webfont.woff2 b/public/fonts/muli/muli-bolditalic-webfont.woff2 new file mode 100644 index 0000000..3234d8a Binary files /dev/null and b/public/fonts/muli/muli-bolditalic-webfont.woff2 differ diff --git a/public/fonts/muli/muli-extrabold-webfont.woff b/public/fonts/muli/muli-extrabold-webfont.woff new file mode 100644 index 0000000..2cf4046 Binary files /dev/null and b/public/fonts/muli/muli-extrabold-webfont.woff differ diff --git a/public/fonts/muli/muli-extrabold-webfont.woff2 b/public/fonts/muli/muli-extrabold-webfont.woff2 new file mode 100644 index 0000000..18b183e Binary files /dev/null and b/public/fonts/muli/muli-extrabold-webfont.woff2 differ diff --git a/public/fonts/muli/muli-extrabolditalic-webfont.woff b/public/fonts/muli/muli-extrabolditalic-webfont.woff new file mode 100644 index 0000000..d4a48f4 Binary files /dev/null and b/public/fonts/muli/muli-extrabolditalic-webfont.woff differ diff --git a/public/fonts/muli/muli-extrabolditalic-webfont.woff2 b/public/fonts/muli/muli-extrabolditalic-webfont.woff2 new file mode 100644 index 0000000..f38baeb Binary files /dev/null and b/public/fonts/muli/muli-extrabolditalic-webfont.woff2 differ diff --git a/public/fonts/muli/muli-extralight-webfont.woff b/public/fonts/muli/muli-extralight-webfont.woff new file mode 100644 index 0000000..5ce46f5 Binary files /dev/null and b/public/fonts/muli/muli-extralight-webfont.woff differ diff --git a/public/fonts/muli/muli-extralight-webfont.woff2 b/public/fonts/muli/muli-extralight-webfont.woff2 new file mode 100644 index 0000000..2daf1f3 Binary files /dev/null and b/public/fonts/muli/muli-extralight-webfont.woff2 differ diff --git a/public/fonts/muli/muli-extralightitalic-webfont.woff b/public/fonts/muli/muli-extralightitalic-webfont.woff new file mode 100644 index 0000000..f647587 Binary files /dev/null and b/public/fonts/muli/muli-extralightitalic-webfont.woff differ diff --git a/public/fonts/muli/muli-extralightitalic-webfont.woff2 b/public/fonts/muli/muli-extralightitalic-webfont.woff2 new file mode 100644 index 0000000..44f9428 Binary files /dev/null and b/public/fonts/muli/muli-extralightitalic-webfont.woff2 differ diff --git a/public/fonts/muli/muli-italic-webfont.woff b/public/fonts/muli/muli-italic-webfont.woff new file mode 100644 index 0000000..1360b41 Binary files /dev/null and b/public/fonts/muli/muli-italic-webfont.woff differ diff --git a/public/fonts/muli/muli-italic-webfont.woff2 b/public/fonts/muli/muli-italic-webfont.woff2 new file mode 100644 index 0000000..3f66f5b Binary files /dev/null and b/public/fonts/muli/muli-italic-webfont.woff2 differ diff --git a/public/fonts/muli/muli-light-webfont.woff b/public/fonts/muli/muli-light-webfont.woff new file mode 100644 index 0000000..d1d238b Binary files /dev/null and b/public/fonts/muli/muli-light-webfont.woff differ diff --git a/public/fonts/muli/muli-light-webfont.woff2 b/public/fonts/muli/muli-light-webfont.woff2 new file mode 100644 index 0000000..0b3520e Binary files /dev/null and b/public/fonts/muli/muli-light-webfont.woff2 differ diff --git a/public/fonts/muli/muli-lightitalic-webfont.woff b/public/fonts/muli/muli-lightitalic-webfont.woff new file mode 100644 index 0000000..3c46c3f Binary files /dev/null and b/public/fonts/muli/muli-lightitalic-webfont.woff differ diff --git a/public/fonts/muli/muli-lightitalic-webfont.woff2 b/public/fonts/muli/muli-lightitalic-webfont.woff2 new file mode 100644 index 0000000..0c707b1 Binary files /dev/null and b/public/fonts/muli/muli-lightitalic-webfont.woff2 differ diff --git a/public/fonts/muli/muli-regular-webfont.woff b/public/fonts/muli/muli-regular-webfont.woff new file mode 100644 index 0000000..74f602b Binary files /dev/null and b/public/fonts/muli/muli-regular-webfont.woff differ diff --git a/public/fonts/muli/muli-regular-webfont.woff2 b/public/fonts/muli/muli-regular-webfont.woff2 new file mode 100644 index 0000000..e329023 Binary files /dev/null and b/public/fonts/muli/muli-regular-webfont.woff2 differ diff --git a/public/fonts/muli/muli-semibold-webfont.woff b/public/fonts/muli/muli-semibold-webfont.woff new file mode 100644 index 0000000..02cad39 Binary files /dev/null and b/public/fonts/muli/muli-semibold-webfont.woff differ diff --git a/public/fonts/muli/muli-semibold-webfont.woff2 b/public/fonts/muli/muli-semibold-webfont.woff2 new file mode 100644 index 0000000..664108e Binary files /dev/null and b/public/fonts/muli/muli-semibold-webfont.woff2 differ diff --git a/public/fonts/muli/muli-semibolditalic-webfont.woff b/public/fonts/muli/muli-semibolditalic-webfont.woff new file mode 100644 index 0000000..43b58a7 Binary files /dev/null and b/public/fonts/muli/muli-semibolditalic-webfont.woff differ diff --git a/public/fonts/muli/muli-semibolditalic-webfont.woff2 b/public/fonts/muli/muli-semibolditalic-webfont.woff2 new file mode 100644 index 0000000..dc0e9fc Binary files /dev/null and b/public/fonts/muli/muli-semibolditalic-webfont.woff2 differ diff --git a/public/images/bg.jpg b/public/images/bg.jpg new file mode 100644 index 0000000..9ae5675 Binary files /dev/null and b/public/images/bg.jpg differ diff --git a/public/images/favicon.ico b/public/images/favicon.ico new file mode 100644 index 0000000..2975224 Binary files /dev/null and b/public/images/favicon.ico differ diff --git a/public/images/icon.png b/public/images/icon.png new file mode 100644 index 0000000..95e77bb Binary files /dev/null and b/public/images/icon.png differ diff --git a/public/js/.DS_Store b/public/js/.DS_Store new file mode 100644 index 0000000..84bb8f2 Binary files /dev/null and b/public/js/.DS_Store differ diff --git a/public/js/bootstrap.bundle.js b/public/js/bootstrap.bundle.js new file mode 100644 index 0000000..9bea2ea --- /dev/null +++ b/public/js/bootstrap.bundle.js @@ -0,0 +1,6433 @@ +/*! + * Bootstrap v4.1.0 (https://getbootstrap.com/) + * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) : + typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) : + (factory((global.bootstrap = {}),global.jQuery)); +}(this, (function (exports,$) { 'use strict'; + + $ = $ && $.hasOwnProperty('default') ? $['default'] : $; + + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + return Constructor; + } + + function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + } + + function _objectSpread(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] != null ? arguments[i] : {}; + var ownKeys = Object.keys(source); + + if (typeof Object.getOwnPropertySymbols === 'function') { + ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { + return Object.getOwnPropertyDescriptor(source, sym).enumerable; + })); + } + + ownKeys.forEach(function (key) { + _defineProperty(target, key, source[key]); + }); + } + + return target; + } + + function _inheritsLoose(subClass, superClass) { + subClass.prototype = Object.create(superClass.prototype); + subClass.prototype.constructor = subClass; + subClass.__proto__ = superClass; + } + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): util.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Util = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Private TransitionEnd Helpers + * ------------------------------------------------------------------------ + */ + var TRANSITION_END = 'transitionend'; + var MAX_UID = 1000000; + var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) + + function toType(obj) { + return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); + } + + function getSpecialTransitionEndEvent() { + return { + bindType: TRANSITION_END, + delegateType: TRANSITION_END, + handle: function handle(event) { + if ($$$1(event.target).is(this)) { + return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params + } + + return undefined; // eslint-disable-line no-undefined + } + }; + } + + function transitionEndEmulator(duration) { + var _this = this; + + var called = false; + $$$1(this).one(Util.TRANSITION_END, function () { + called = true; + }); + setTimeout(function () { + if (!called) { + Util.triggerTransitionEnd(_this); + } + }, duration); + return this; + } + + function setTransitionEndSupport() { + $$$1.fn.emulateTransitionEnd = transitionEndEmulator; + $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); + } + /** + * -------------------------------------------------------------------------- + * Public Util Api + * -------------------------------------------------------------------------- + */ + + + var Util = { + TRANSITION_END: 'bsTransitionEnd', + getUID: function getUID(prefix) { + do { + // eslint-disable-next-line no-bitwise + prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here + } while (document.getElementById(prefix)); + + return prefix; + }, + getSelectorFromElement: function getSelectorFromElement(element) { + var selector = element.getAttribute('data-target'); + + if (!selector || selector === '#') { + selector = element.getAttribute('href') || ''; + } + + try { + var $selector = $$$1(document).find(selector); + return $selector.length > 0 ? selector : null; + } catch (err) { + return null; + } + }, + getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { + if (!element) { + return 0; + } // Get transition-duration of the element + + + var transitionDuration = $$$1(element).css('transition-duration'); + var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found + + if (!floatTransitionDuration) { + return 0; + } // If multiple durations are defined, take the first + + + transitionDuration = transitionDuration.split(',')[0]; + return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER; + }, + reflow: function reflow(element) { + return element.offsetHeight; + }, + triggerTransitionEnd: function triggerTransitionEnd(element) { + $$$1(element).trigger(TRANSITION_END); + }, + // TODO: Remove in v5 + supportsTransitionEnd: function supportsTransitionEnd() { + return Boolean(TRANSITION_END); + }, + isElement: function isElement(obj) { + return (obj[0] || obj).nodeType; + }, + typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { + for (var property in configTypes) { + if (Object.prototype.hasOwnProperty.call(configTypes, property)) { + var expectedTypes = configTypes[property]; + var value = config[property]; + var valueType = value && Util.isElement(value) ? 'element' : toType(value); + + if (!new RegExp(expectedTypes).test(valueType)) { + throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); + } + } + } + } + }; + setTransitionEndSupport(); + return Util; + }($); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): alert.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Alert = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'alert'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.alert'; + var EVENT_KEY = "." + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var Selector = { + DISMISS: '[data-dismiss="alert"]' + }; + var Event = { + CLOSE: "close" + EVENT_KEY, + CLOSED: "closed" + EVENT_KEY, + CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY + }; + var ClassName = { + ALERT: 'alert', + FADE: 'fade', + SHOW: 'show' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var Alert = + /*#__PURE__*/ + function () { + function Alert(element) { + this._element = element; + } // Getters + + + var _proto = Alert.prototype; + + // Public + _proto.close = function close(element) { + element = element || this._element; + + var rootElement = this._getRootElement(element); + + var customEvent = this._triggerCloseEvent(rootElement); + + if (customEvent.isDefaultPrevented()) { + return; + } + + this._removeElement(rootElement); + }; + + _proto.dispose = function dispose() { + $$$1.removeData(this._element, DATA_KEY); + this._element = null; + }; // Private + + + _proto._getRootElement = function _getRootElement(element) { + var selector = Util.getSelectorFromElement(element); + var parent = false; + + if (selector) { + parent = $$$1(selector)[0]; + } + + if (!parent) { + parent = $$$1(element).closest("." + ClassName.ALERT)[0]; + } + + return parent; + }; + + _proto._triggerCloseEvent = function _triggerCloseEvent(element) { + var closeEvent = $$$1.Event(Event.CLOSE); + $$$1(element).trigger(closeEvent); + return closeEvent; + }; + + _proto._removeElement = function _removeElement(element) { + var _this = this; + + $$$1(element).removeClass(ClassName.SHOW); + + if (!$$$1(element).hasClass(ClassName.FADE)) { + this._destroyElement(element); + + return; + } + + var transitionDuration = Util.getTransitionDurationFromElement(element); + $$$1(element).one(Util.TRANSITION_END, function (event) { + return _this._destroyElement(element, event); + }).emulateTransitionEnd(transitionDuration); + }; + + _proto._destroyElement = function _destroyElement(element) { + $$$1(element).detach().trigger(Event.CLOSED).remove(); + }; // Static + + + Alert._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var $element = $$$1(this); + var data = $element.data(DATA_KEY); + + if (!data) { + data = new Alert(this); + $element.data(DATA_KEY, data); + } + + if (config === 'close') { + data[config](this); + } + }); + }; + + Alert._handleDismiss = function _handleDismiss(alertInstance) { + return function (event) { + if (event) { + event.preventDefault(); + } + + alertInstance.close(this); + }; + }; + + _createClass(Alert, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }]); + + return Alert; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + + $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $$$1.fn[NAME] = Alert._jQueryInterface; + $$$1.fn[NAME].Constructor = Alert; + + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; + return Alert._jQueryInterface; + }; + + return Alert; + }($); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): button.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Button = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'button'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.button'; + var EVENT_KEY = "." + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var ClassName = { + ACTIVE: 'active', + BUTTON: 'btn', + FOCUS: 'focus' + }; + var Selector = { + DATA_TOGGLE_CARROT: '[data-toggle^="button"]', + DATA_TOGGLE: '[data-toggle="buttons"]', + INPUT: 'input', + ACTIVE: '.active', + BUTTON: '.btn' + }; + var Event = { + CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, + FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY) + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var Button = + /*#__PURE__*/ + function () { + function Button(element) { + this._element = element; + } // Getters + + + var _proto = Button.prototype; + + // Public + _proto.toggle = function toggle() { + var triggerChangeEvent = true; + var addAriaPressed = true; + var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0]; + + if (rootElement) { + var input = $$$1(this._element).find(Selector.INPUT)[0]; + + if (input) { + if (input.type === 'radio') { + if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) { + triggerChangeEvent = false; + } else { + var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0]; + + if (activeElement) { + $$$1(activeElement).removeClass(ClassName.ACTIVE); + } + } + } + + if (triggerChangeEvent) { + if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { + return; + } + + input.checked = !$$$1(this._element).hasClass(ClassName.ACTIVE); + $$$1(input).trigger('change'); + } + + input.focus(); + addAriaPressed = false; + } + } + + if (addAriaPressed) { + this._element.setAttribute('aria-pressed', !$$$1(this._element).hasClass(ClassName.ACTIVE)); + } + + if (triggerChangeEvent) { + $$$1(this._element).toggleClass(ClassName.ACTIVE); + } + }; + + _proto.dispose = function dispose() { + $$$1.removeData(this._element, DATA_KEY); + this._element = null; + }; // Static + + + Button._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $$$1(this).data(DATA_KEY); + + if (!data) { + data = new Button(this); + $$$1(this).data(DATA_KEY, data); + } + + if (config === 'toggle') { + data[config](); + } + }); + }; + + _createClass(Button, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }]); + + return Button; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + event.preventDefault(); + var button = event.target; + + if (!$$$1(button).hasClass(ClassName.BUTTON)) { + button = $$$1(button).closest(Selector.BUTTON); + } + + Button._jQueryInterface.call($$$1(button), 'toggle'); + }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + var button = $$$1(event.target).closest(Selector.BUTTON)[0]; + $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $$$1.fn[NAME] = Button._jQueryInterface; + $$$1.fn[NAME].Constructor = Button; + + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; + return Button._jQueryInterface; + }; + + return Button; + }($); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): carousel.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Carousel = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'carousel'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.carousel'; + var EVENT_KEY = "." + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key + + var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key + + var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch + + var Default = { + interval: 5000, + keyboard: true, + slide: false, + pause: 'hover', + wrap: true + }; + var DefaultType = { + interval: '(number|boolean)', + keyboard: 'boolean', + slide: '(boolean|string)', + pause: '(string|boolean)', + wrap: 'boolean' + }; + var Direction = { + NEXT: 'next', + PREV: 'prev', + LEFT: 'left', + RIGHT: 'right' + }; + var Event = { + SLIDE: "slide" + EVENT_KEY, + SLID: "slid" + EVENT_KEY, + KEYDOWN: "keydown" + EVENT_KEY, + MOUSEENTER: "mouseenter" + EVENT_KEY, + MOUSELEAVE: "mouseleave" + EVENT_KEY, + TOUCHEND: "touchend" + EVENT_KEY, + LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY, + CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY + }; + var ClassName = { + CAROUSEL: 'carousel', + ACTIVE: 'active', + SLIDE: 'slide', + RIGHT: 'carousel-item-right', + LEFT: 'carousel-item-left', + NEXT: 'carousel-item-next', + PREV: 'carousel-item-prev', + ITEM: 'carousel-item' + }; + var Selector = { + ACTIVE: '.active', + ACTIVE_ITEM: '.active.carousel-item', + ITEM: '.carousel-item', + NEXT_PREV: '.carousel-item-next, .carousel-item-prev', + INDICATORS: '.carousel-indicators', + DATA_SLIDE: '[data-slide], [data-slide-to]', + DATA_RIDE: '[data-ride="carousel"]' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var Carousel = + /*#__PURE__*/ + function () { + function Carousel(element, config) { + this._items = null; + this._interval = null; + this._activeElement = null; + this._isPaused = false; + this._isSliding = false; + this.touchTimeout = null; + this._config = this._getConfig(config); + this._element = $$$1(element)[0]; + this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0]; + + this._addEventListeners(); + } // Getters + + + var _proto = Carousel.prototype; + + // Public + _proto.next = function next() { + if (!this._isSliding) { + this._slide(Direction.NEXT); + } + }; + + _proto.nextWhenVisible = function nextWhenVisible() { + // Don't call next when the page isn't visible + // or the carousel or its parent isn't visible + if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') { + this.next(); + } + }; + + _proto.prev = function prev() { + if (!this._isSliding) { + this._slide(Direction.PREV); + } + }; + + _proto.pause = function pause(event) { + if (!event) { + this._isPaused = true; + } + + if ($$$1(this._element).find(Selector.NEXT_PREV)[0]) { + Util.triggerTransitionEnd(this._element); + this.cycle(true); + } + + clearInterval(this._interval); + this._interval = null; + }; + + _proto.cycle = function cycle(event) { + if (!event) { + this._isPaused = false; + } + + if (this._interval) { + clearInterval(this._interval); + this._interval = null; + } + + if (this._config.interval && !this._isPaused) { + this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); + } + }; + + _proto.to = function to(index) { + var _this = this; + + this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0]; + + var activeIndex = this._getItemIndex(this._activeElement); + + if (index > this._items.length - 1 || index < 0) { + return; + } + + if (this._isSliding) { + $$$1(this._element).one(Event.SLID, function () { + return _this.to(index); + }); + return; + } + + if (activeIndex === index) { + this.pause(); + this.cycle(); + return; + } + + var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; + + this._slide(direction, this._items[index]); + }; + + _proto.dispose = function dispose() { + $$$1(this._element).off(EVENT_KEY); + $$$1.removeData(this._element, DATA_KEY); + this._items = null; + this._config = null; + this._element = null; + this._interval = null; + this._isPaused = null; + this._isSliding = null; + this._activeElement = null; + this._indicatorsElement = null; + }; // Private + + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default, config); + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + }; + + _proto._addEventListeners = function _addEventListeners() { + var _this2 = this; + + if (this._config.keyboard) { + $$$1(this._element).on(Event.KEYDOWN, function (event) { + return _this2._keydown(event); + }); + } + + if (this._config.pause === 'hover') { + $$$1(this._element).on(Event.MOUSEENTER, function (event) { + return _this2.pause(event); + }).on(Event.MOUSELEAVE, function (event) { + return _this2.cycle(event); + }); + + if ('ontouchstart' in document.documentElement) { + // If it's a touch-enabled device, mouseenter/leave are fired as + // part of the mouse compatibility events on first tap - the carousel + // would stop cycling until user tapped out of it; + // here, we listen for touchend, explicitly pause the carousel + // (as if it's the second time we tap on it, mouseenter compat event + // is NOT fired) and after a timeout (to allow for mouse compatibility + // events to fire) we explicitly restart cycling + $$$1(this._element).on(Event.TOUCHEND, function () { + _this2.pause(); + + if (_this2.touchTimeout) { + clearTimeout(_this2.touchTimeout); + } + + _this2.touchTimeout = setTimeout(function (event) { + return _this2.cycle(event); + }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval); + }); + } + } + }; + + _proto._keydown = function _keydown(event) { + if (/input|textarea/i.test(event.target.tagName)) { + return; + } + + switch (event.which) { + case ARROW_LEFT_KEYCODE: + event.preventDefault(); + this.prev(); + break; + + case ARROW_RIGHT_KEYCODE: + event.preventDefault(); + this.next(); + break; + + default: + } + }; + + _proto._getItemIndex = function _getItemIndex(element) { + this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM)); + return this._items.indexOf(element); + }; + + _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { + var isNextDirection = direction === Direction.NEXT; + var isPrevDirection = direction === Direction.PREV; + + var activeIndex = this._getItemIndex(activeElement); + + var lastItemIndex = this._items.length - 1; + var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; + + if (isGoingToWrap && !this._config.wrap) { + return activeElement; + } + + var delta = direction === Direction.PREV ? -1 : 1; + var itemIndex = (activeIndex + delta) % this._items.length; + return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; + }; + + _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { + var targetIndex = this._getItemIndex(relatedTarget); + + var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]); + + var slideEvent = $$$1.Event(Event.SLIDE, { + relatedTarget: relatedTarget, + direction: eventDirectionName, + from: fromIndex, + to: targetIndex + }); + $$$1(this._element).trigger(slideEvent); + return slideEvent; + }; + + _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { + if (this._indicatorsElement) { + $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); + + var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; + + if (nextIndicator) { + $$$1(nextIndicator).addClass(ClassName.ACTIVE); + } + } + }; + + _proto._slide = function _slide(direction, element) { + var _this3 = this; + + var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0]; + + var activeElementIndex = this._getItemIndex(activeElement); + + var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); + + var nextElementIndex = this._getItemIndex(nextElement); + + var isCycling = Boolean(this._interval); + var directionalClassName; + var orderClassName; + var eventDirectionName; + + if (direction === Direction.NEXT) { + directionalClassName = ClassName.LEFT; + orderClassName = ClassName.NEXT; + eventDirectionName = Direction.LEFT; + } else { + directionalClassName = ClassName.RIGHT; + orderClassName = ClassName.PREV; + eventDirectionName = Direction.RIGHT; + } + + if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) { + this._isSliding = false; + return; + } + + var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); + + if (slideEvent.isDefaultPrevented()) { + return; + } + + if (!activeElement || !nextElement) { + // Some weirdness is happening, so we bail + return; + } + + this._isSliding = true; + + if (isCycling) { + this.pause(); + } + + this._setActiveIndicatorElement(nextElement); + + var slidEvent = $$$1.Event(Event.SLID, { + relatedTarget: nextElement, + direction: eventDirectionName, + from: activeElementIndex, + to: nextElementIndex + }); + + if ($$$1(this._element).hasClass(ClassName.SLIDE)) { + $$$1(nextElement).addClass(orderClassName); + Util.reflow(nextElement); + $$$1(activeElement).addClass(directionalClassName); + $$$1(nextElement).addClass(directionalClassName); + var transitionDuration = Util.getTransitionDurationFromElement(activeElement); + $$$1(activeElement).one(Util.TRANSITION_END, function () { + $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE); + $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName); + _this3._isSliding = false; + setTimeout(function () { + return $$$1(_this3._element).trigger(slidEvent); + }, 0); + }).emulateTransitionEnd(transitionDuration); + } else { + $$$1(activeElement).removeClass(ClassName.ACTIVE); + $$$1(nextElement).addClass(ClassName.ACTIVE); + this._isSliding = false; + $$$1(this._element).trigger(slidEvent); + } + + if (isCycling) { + this.cycle(); + } + }; // Static + + + Carousel._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $$$1(this).data(DATA_KEY); + + var _config = _objectSpread({}, Default, $$$1(this).data()); + + if (typeof config === 'object') { + _config = _objectSpread({}, _config, config); + } + + var action = typeof config === 'string' ? config : _config.slide; + + if (!data) { + data = new Carousel(this, _config); + $$$1(this).data(DATA_KEY, data); + } + + if (typeof config === 'number') { + data.to(config); + } else if (typeof action === 'string') { + if (typeof data[action] === 'undefined') { + throw new TypeError("No method named \"" + action + "\""); + } + + data[action](); + } else if (_config.interval) { + data.pause(); + data.cycle(); + } + }); + }; + + Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { + var selector = Util.getSelectorFromElement(this); + + if (!selector) { + return; + } + + var target = $$$1(selector)[0]; + + if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) { + return; + } + + var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data()); + + var slideIndex = this.getAttribute('data-slide-to'); + + if (slideIndex) { + config.interval = false; + } + + Carousel._jQueryInterface.call($$$1(target), config); + + if (slideIndex) { + $$$1(target).data(DATA_KEY).to(slideIndex); + } + + event.preventDefault(); + }; + + _createClass(Carousel, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }]); + + return Carousel; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); + $$$1(window).on(Event.LOAD_DATA_API, function () { + $$$1(Selector.DATA_RIDE).each(function () { + var $carousel = $$$1(this); + + Carousel._jQueryInterface.call($carousel, $carousel.data()); + }); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $$$1.fn[NAME] = Carousel._jQueryInterface; + $$$1.fn[NAME].Constructor = Carousel; + + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; + return Carousel._jQueryInterface; + }; + + return Carousel; + }($); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): collapse.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Collapse = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'collapse'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.collapse'; + var EVENT_KEY = "." + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var Default = { + toggle: true, + parent: '' + }; + var DefaultType = { + toggle: 'boolean', + parent: '(string|element)' + }; + var Event = { + SHOW: "show" + EVENT_KEY, + SHOWN: "shown" + EVENT_KEY, + HIDE: "hide" + EVENT_KEY, + HIDDEN: "hidden" + EVENT_KEY, + CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY + }; + var ClassName = { + SHOW: 'show', + COLLAPSE: 'collapse', + COLLAPSING: 'collapsing', + COLLAPSED: 'collapsed' + }; + var Dimension = { + WIDTH: 'width', + HEIGHT: 'height' + }; + var Selector = { + ACTIVES: '.show, .collapsing', + DATA_TOGGLE: '[data-toggle="collapse"]' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var Collapse = + /*#__PURE__*/ + function () { + function Collapse(element, config) { + this._isTransitioning = false; + this._element = element; + this._config = this._getConfig(config); + this._triggerArray = $$$1.makeArray($$$1("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); + var tabToggles = $$$1(Selector.DATA_TOGGLE); + + for (var i = 0; i < tabToggles.length; i++) { + var elem = tabToggles[i]; + var selector = Util.getSelectorFromElement(elem); + + if (selector !== null && $$$1(selector).filter(element).length > 0) { + this._selector = selector; + + this._triggerArray.push(elem); + } + } + + this._parent = this._config.parent ? this._getParent() : null; + + if (!this._config.parent) { + this._addAriaAndCollapsedClass(this._element, this._triggerArray); + } + + if (this._config.toggle) { + this.toggle(); + } + } // Getters + + + var _proto = Collapse.prototype; + + // Public + _proto.toggle = function toggle() { + if ($$$1(this._element).hasClass(ClassName.SHOW)) { + this.hide(); + } else { + this.show(); + } + }; + + _proto.show = function show() { + var _this = this; + + if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) { + return; + } + + var actives; + var activesData; + + if (this._parent) { + actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"" + this._config.parent + "\"]")); + + if (actives.length === 0) { + actives = null; + } + } + + if (actives) { + activesData = $$$1(actives).not(this._selector).data(DATA_KEY); + + if (activesData && activesData._isTransitioning) { + return; + } + } + + var startEvent = $$$1.Event(Event.SHOW); + $$$1(this._element).trigger(startEvent); + + if (startEvent.isDefaultPrevented()) { + return; + } + + if (actives) { + Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide'); + + if (!activesData) { + $$$1(actives).data(DATA_KEY, null); + } + } + + var dimension = this._getDimension(); + + $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); + this._element.style[dimension] = 0; + + if (this._triggerArray.length > 0) { + $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); + } + + this.setTransitioning(true); + + var complete = function complete() { + $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); + _this._element.style[dimension] = ''; + + _this.setTransitioning(false); + + $$$1(_this._element).trigger(Event.SHOWN); + }; + + var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); + var scrollSize = "scroll" + capitalizedDimension; + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + this._element.style[dimension] = this._element[scrollSize] + "px"; + }; + + _proto.hide = function hide() { + var _this2 = this; + + if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) { + return; + } + + var startEvent = $$$1.Event(Event.HIDE); + $$$1(this._element).trigger(startEvent); + + if (startEvent.isDefaultPrevented()) { + return; + } + + var dimension = this._getDimension(); + + this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; + Util.reflow(this._element); + $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); + + if (this._triggerArray.length > 0) { + for (var i = 0; i < this._triggerArray.length; i++) { + var trigger = this._triggerArray[i]; + var selector = Util.getSelectorFromElement(trigger); + + if (selector !== null) { + var $elem = $$$1(selector); + + if (!$elem.hasClass(ClassName.SHOW)) { + $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); + } + } + } + } + + this.setTransitioning(true); + + var complete = function complete() { + _this2.setTransitioning(false); + + $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); + }; + + this._element.style[dimension] = ''; + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + }; + + _proto.setTransitioning = function setTransitioning(isTransitioning) { + this._isTransitioning = isTransitioning; + }; + + _proto.dispose = function dispose() { + $$$1.removeData(this._element, DATA_KEY); + this._config = null; + this._parent = null; + this._element = null; + this._triggerArray = null; + this._isTransitioning = null; + }; // Private + + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default, config); + config.toggle = Boolean(config.toggle); // Coerce string values + + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + }; + + _proto._getDimension = function _getDimension() { + var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH); + return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; + }; + + _proto._getParent = function _getParent() { + var _this3 = this; + + var parent = null; + + if (Util.isElement(this._config.parent)) { + parent = this._config.parent; // It's a jQuery object + + if (typeof this._config.parent.jquery !== 'undefined') { + parent = this._config.parent[0]; + } + } else { + parent = $$$1(this._config.parent)[0]; + } + + var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; + $$$1(parent).find(selector).each(function (i, element) { + _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); + }); + return parent; + }; + + _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { + if (element) { + var isOpen = $$$1(element).hasClass(ClassName.SHOW); + + if (triggerArray.length > 0) { + $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); + } + } + }; // Static + + + Collapse._getTargetFromElement = function _getTargetFromElement(element) { + var selector = Util.getSelectorFromElement(element); + return selector ? $$$1(selector)[0] : null; + }; + + Collapse._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var $this = $$$1(this); + var data = $this.data(DATA_KEY); + + var _config = _objectSpread({}, Default, $this.data(), typeof config === 'object' && config); + + if (!data && _config.toggle && /show|hide/.test(config)) { + _config.toggle = false; + } + + if (!data) { + data = new Collapse(this, _config); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } + + data[config](); + } + }); + }; + + _createClass(Collapse, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }]); + + return Collapse; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + // preventDefault only for elements (which change the URL) not inside the collapsible element + if (event.currentTarget.tagName === 'A') { + event.preventDefault(); + } + + var $trigger = $$$1(this); + var selector = Util.getSelectorFromElement(this); + $$$1(selector).each(function () { + var $target = $$$1(this); + var data = $target.data(DATA_KEY); + var config = data ? 'toggle' : $trigger.data(); + + Collapse._jQueryInterface.call($target, config); + }); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $$$1.fn[NAME] = Collapse._jQueryInterface; + $$$1.fn[NAME].Constructor = Collapse; + + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; + return Collapse._jQueryInterface; + }; + + return Collapse; + }($); + + /**! + * @fileOverview Kickass library to create and place poppers near their reference elements. + * @version 1.14.1 + * @license + * Copyright (c) 2016 Federico Zivolo and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined'; + var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; + var timeoutDuration = 0; + for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { + if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { + timeoutDuration = 1; + break; + } + } + + function microtaskDebounce(fn) { + var called = false; + return function () { + if (called) { + return; + } + called = true; + window.Promise.resolve().then(function () { + called = false; + fn(); + }); + }; + } + + function taskDebounce(fn) { + var scheduled = false; + return function () { + if (!scheduled) { + scheduled = true; + setTimeout(function () { + scheduled = false; + fn(); + }, timeoutDuration); + } + }; + } + + var supportsMicroTasks = isBrowser && window.Promise; + + /** + * Create a debounced version of a method, that's asynchronously deferred + * but called in the minimum time possible. + * + * @method + * @memberof Popper.Utils + * @argument {Function} fn + * @returns {Function} + */ + var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; + + /** + * Check if the given variable is a function + * @method + * @memberof Popper.Utils + * @argument {Any} functionToCheck - variable to check + * @returns {Boolean} answer to: is a function? + */ + function isFunction(functionToCheck) { + var getType = {}; + return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; + } + + /** + * Get CSS computed property of the given element + * @method + * @memberof Popper.Utils + * @argument {Eement} element + * @argument {String} property + */ + function getStyleComputedProperty(element, property) { + if (element.nodeType !== 1) { + return []; + } + // NOTE: 1 DOM access here + var css = getComputedStyle(element, null); + return property ? css[property] : css; + } + + /** + * Returns the parentNode or the host of the element + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} parent + */ + function getParentNode(element) { + if (element.nodeName === 'HTML') { + return element; + } + return element.parentNode || element.host; + } + + /** + * Returns the scrolling parent of the given element + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} scroll parent + */ + function getScrollParent(element) { + // Return body, `getScroll` will take care to get the correct `scrollTop` from it + if (!element) { + return document.body; + } + + switch (element.nodeName) { + case 'HTML': + case 'BODY': + return element.ownerDocument.body; + case '#document': + return element.body; + } + + // Firefox want us to check `-x` and `-y` variations as well + + var _getStyleComputedProp = getStyleComputedProperty(element), + overflow = _getStyleComputedProp.overflow, + overflowX = _getStyleComputedProp.overflowX, + overflowY = _getStyleComputedProp.overflowY; + + if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { + return element; + } + + return getScrollParent(getParentNode(element)); + } + + /** + * Tells if you are running Internet Explorer + * @method + * @memberof Popper.Utils + * @argument {number} version to check + * @returns {Boolean} isIE + */ + var cache = {}; + + var isIE = function () { + var version = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all'; + + version = version.toString(); + if (cache.hasOwnProperty(version)) { + return cache[version]; + } + switch (version) { + case '11': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1; + break; + case '10': + cache[version] = navigator.appVersion.indexOf('MSIE 10') !== -1; + break; + case 'all': + cache[version] = navigator.userAgent.indexOf('Trident') !== -1 || navigator.userAgent.indexOf('MSIE') !== -1; + break; + } + + //Set IE + cache.all = cache.all || Object.keys(cache).some(function (key) { + return cache[key]; + }); + return cache[version]; + }; + + /** + * Returns the offset parent of the given element + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} offset parent + */ + function getOffsetParent(element) { + if (!element) { + return document.documentElement; + } + + var noOffsetParent = isIE(10) ? document.body : null; + + // NOTE: 1 DOM access here + var offsetParent = element.offsetParent; + // Skip hidden elements which don't have an offsetParent + while (offsetParent === noOffsetParent && element.nextElementSibling) { + offsetParent = (element = element.nextElementSibling).offsetParent; + } + + var nodeName = offsetParent && offsetParent.nodeName; + + if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { + return element ? element.ownerDocument.documentElement : document.documentElement; + } + + // .offsetParent will return the closest TD or TABLE in case + // no offsetParent is present, I hate this job... + if (['TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { + return getOffsetParent(offsetParent); + } + + return offsetParent; + } + + function isOffsetContainer(element) { + var nodeName = element.nodeName; + + if (nodeName === 'BODY') { + return false; + } + return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; + } + + /** + * Finds the root node (document, shadowDOM root) of the given element + * @method + * @memberof Popper.Utils + * @argument {Element} node + * @returns {Element} root node + */ + function getRoot(node) { + if (node.parentNode !== null) { + return getRoot(node.parentNode); + } + + return node; + } + + /** + * Finds the offset parent common to the two provided nodes + * @method + * @memberof Popper.Utils + * @argument {Element} element1 + * @argument {Element} element2 + * @returns {Element} common offset parent + */ + function findCommonOffsetParent(element1, element2) { + // This check is needed to avoid errors in case one of the elements isn't defined for any reason + if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { + return document.documentElement; + } + + // Here we make sure to give as "start" the element that comes first in the DOM + var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; + var start = order ? element1 : element2; + var end = order ? element2 : element1; + + // Get common ancestor container + var range = document.createRange(); + range.setStart(start, 0); + range.setEnd(end, 0); + var commonAncestorContainer = range.commonAncestorContainer; + + // Both nodes are inside #document + + if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { + if (isOffsetContainer(commonAncestorContainer)) { + return commonAncestorContainer; + } + + return getOffsetParent(commonAncestorContainer); + } + + // one of the nodes is inside shadowDOM, find which one + var element1root = getRoot(element1); + if (element1root.host) { + return findCommonOffsetParent(element1root.host, element2); + } else { + return findCommonOffsetParent(element1, getRoot(element2).host); + } + } + + /** + * Gets the scroll value of the given element in the given side (top and left) + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @argument {String} side `top` or `left` + * @returns {number} amount of scrolled pixels + */ + function getScroll(element) { + var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; + + var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; + var nodeName = element.nodeName; + + if (nodeName === 'BODY' || nodeName === 'HTML') { + var html = element.ownerDocument.documentElement; + var scrollingElement = element.ownerDocument.scrollingElement || html; + return scrollingElement[upperSide]; + } + + return element[upperSide]; + } + + /* + * Sum or subtract the element scroll values (left and top) from a given rect object + * @method + * @memberof Popper.Utils + * @param {Object} rect - Rect object you want to change + * @param {HTMLElement} element - The element from the function reads the scroll values + * @param {Boolean} subtract - set to true if you want to subtract the scroll values + * @return {Object} rect - The modifier rect object + */ + function includeScroll(rect, element) { + var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var scrollTop = getScroll(element, 'top'); + var scrollLeft = getScroll(element, 'left'); + var modifier = subtract ? -1 : 1; + rect.top += scrollTop * modifier; + rect.bottom += scrollTop * modifier; + rect.left += scrollLeft * modifier; + rect.right += scrollLeft * modifier; + return rect; + } + + /* + * Helper to detect borders of a given element + * @method + * @memberof Popper.Utils + * @param {CSSStyleDeclaration} styles + * Result of `getStyleComputedProperty` on the given element + * @param {String} axis - `x` or `y` + * @return {number} borders - The borders size of the given axis + */ + + function getBordersSize(styles, axis) { + var sideA = axis === 'x' ? 'Left' : 'Top'; + var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; + + return parseFloat(styles['border' + sideA + 'Width'], 10) + parseFloat(styles['border' + sideB + 'Width'], 10); + } + + function getSize(axis, body, html, computedStyle) { + return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? html['offset' + axis] + computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')] + computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')] : 0); + } + + function getWindowSizes() { + var body = document.body; + var html = document.documentElement; + var computedStyle = isIE(10) && getComputedStyle(html); + + return { + height: getSize('Height', body, html, computedStyle), + width: getSize('Width', body, html, computedStyle) + }; + } + + var classCallCheck = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + }; + + var createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + + + + + var defineProperty = function (obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + + return obj; + }; + + var _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + + return target; + }; + + /** + * Given element offsets, generate an output similar to getBoundingClientRect + * @method + * @memberof Popper.Utils + * @argument {Object} offsets + * @returns {Object} ClientRect like output + */ + function getClientRect(offsets) { + return _extends({}, offsets, { + right: offsets.left + offsets.width, + bottom: offsets.top + offsets.height + }); + } + + /** + * Get bounding client rect of given element + * @method + * @memberof Popper.Utils + * @param {HTMLElement} element + * @return {Object} client rect + */ + function getBoundingClientRect(element) { + var rect = {}; + + // IE10 10 FIX: Please, don't ask, the element isn't + // considered in DOM in some circumstances... + // This isn't reproducible in IE10 compatibility mode of IE11 + try { + if (isIE(10)) { + rect = element.getBoundingClientRect(); + var scrollTop = getScroll(element, 'top'); + var scrollLeft = getScroll(element, 'left'); + rect.top += scrollTop; + rect.left += scrollLeft; + rect.bottom += scrollTop; + rect.right += scrollLeft; + } else { + rect = element.getBoundingClientRect(); + } + } catch (e) {} + + var result = { + left: rect.left, + top: rect.top, + width: rect.right - rect.left, + height: rect.bottom - rect.top + }; + + // subtract scrollbar size from sizes + var sizes = element.nodeName === 'HTML' ? getWindowSizes() : {}; + var width = sizes.width || element.clientWidth || result.right - result.left; + var height = sizes.height || element.clientHeight || result.bottom - result.top; + + var horizScrollbar = element.offsetWidth - width; + var vertScrollbar = element.offsetHeight - height; + + // if an hypothetical scrollbar is detected, we must be sure it's not a `border` + // we make this check conditional for performance reasons + if (horizScrollbar || vertScrollbar) { + var styles = getStyleComputedProperty(element); + horizScrollbar -= getBordersSize(styles, 'x'); + vertScrollbar -= getBordersSize(styles, 'y'); + + result.width -= horizScrollbar; + result.height -= vertScrollbar; + } + + return getClientRect(result); + } + + function getOffsetRectRelativeToArbitraryNode(children, parent) { + var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + var isIE10 = isIE(10); + var isHTML = parent.nodeName === 'HTML'; + var childrenRect = getBoundingClientRect(children); + var parentRect = getBoundingClientRect(parent); + var scrollParent = getScrollParent(children); + + var styles = getStyleComputedProperty(parent); + var borderTopWidth = parseFloat(styles.borderTopWidth, 10); + var borderLeftWidth = parseFloat(styles.borderLeftWidth, 10); + + // In cases where the parent is fixed, we must ignore negative scroll in offset calc + if (fixedPosition && parent.nodeName === 'HTML') { + parentRect.top = Math.max(parentRect.top, 0); + parentRect.left = Math.max(parentRect.left, 0); + } + var offsets = getClientRect({ + top: childrenRect.top - parentRect.top - borderTopWidth, + left: childrenRect.left - parentRect.left - borderLeftWidth, + width: childrenRect.width, + height: childrenRect.height + }); + offsets.marginTop = 0; + offsets.marginLeft = 0; + + // Subtract margins of documentElement in case it's being used as parent + // we do this only on HTML because it's the only element that behaves + // differently when margins are applied to it. The margins are included in + // the box of the documentElement, in the other cases not. + if (!isIE10 && isHTML) { + var marginTop = parseFloat(styles.marginTop, 10); + var marginLeft = parseFloat(styles.marginLeft, 10); + + offsets.top -= borderTopWidth - marginTop; + offsets.bottom -= borderTopWidth - marginTop; + offsets.left -= borderLeftWidth - marginLeft; + offsets.right -= borderLeftWidth - marginLeft; + + // Attach marginTop and marginLeft because in some circumstances we may need them + offsets.marginTop = marginTop; + offsets.marginLeft = marginLeft; + } + + if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { + offsets = includeScroll(offsets, parent); + } + + return offsets; + } + + function getViewportOffsetRectRelativeToArtbitraryNode(element) { + var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var html = element.ownerDocument.documentElement; + var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); + var width = Math.max(html.clientWidth, window.innerWidth || 0); + var height = Math.max(html.clientHeight, window.innerHeight || 0); + + var scrollTop = !excludeScroll ? getScroll(html) : 0; + var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; + + var offset = { + top: scrollTop - relativeOffset.top + relativeOffset.marginTop, + left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, + width: width, + height: height + }; + + return getClientRect(offset); + } + + /** + * Check if the given element is fixed or is inside a fixed parent + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @argument {Element} customContainer + * @returns {Boolean} answer to "isFixed?" + */ + function isFixed(element) { + var nodeName = element.nodeName; + if (nodeName === 'BODY' || nodeName === 'HTML') { + return false; + } + if (getStyleComputedProperty(element, 'position') === 'fixed') { + return true; + } + return isFixed(getParentNode(element)); + } + + /** + * Finds the first parent of an element that has a transformed property defined + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Element} first transformed parent or documentElement + */ + + function getFixedPositionOffsetParent(element) { + // This check is needed to avoid errors in case one of the elements isn't defined for any reason + if (!element || !element.parentElement || isIE()) { + return document.documentElement; + } + var el = element.parentElement; + while (el && getStyleComputedProperty(el, 'transform') === 'none') { + el = el.parentElement; + } + return el || document.documentElement; + } + + /** + * Computed the boundaries limits and return them + * @method + * @memberof Popper.Utils + * @param {HTMLElement} popper + * @param {HTMLElement} reference + * @param {number} padding + * @param {HTMLElement} boundariesElement - Element used to define the boundaries + * @param {Boolean} fixedPosition - Is in fixed position mode + * @returns {Object} Coordinates of the boundaries + */ + function getBoundaries(popper, reference, padding, boundariesElement) { + var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + + // NOTE: 1 DOM access here + + var boundaries = { top: 0, left: 0 }; + var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); + + // Handle viewport case + if (boundariesElement === 'viewport') { + boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); + } else { + // Handle other cases based on DOM element used as boundaries + var boundariesNode = void 0; + if (boundariesElement === 'scrollParent') { + boundariesNode = getScrollParent(getParentNode(reference)); + if (boundariesNode.nodeName === 'BODY') { + boundariesNode = popper.ownerDocument.documentElement; + } + } else if (boundariesElement === 'window') { + boundariesNode = popper.ownerDocument.documentElement; + } else { + boundariesNode = boundariesElement; + } + + var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); + + // In case of HTML, we need a different computation + if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { + var _getWindowSizes = getWindowSizes(), + height = _getWindowSizes.height, + width = _getWindowSizes.width; + + boundaries.top += offsets.top - offsets.marginTop; + boundaries.bottom = height + offsets.top; + boundaries.left += offsets.left - offsets.marginLeft; + boundaries.right = width + offsets.left; + } else { + // for all the other DOM elements, this one is good + boundaries = offsets; + } + } + + // Add paddings + boundaries.left += padding; + boundaries.top += padding; + boundaries.right -= padding; + boundaries.bottom -= padding; + + return boundaries; + } + + function getArea(_ref) { + var width = _ref.width, + height = _ref.height; + + return width * height; + } + + /** + * Utility used to transform the `auto` placement to the placement with more + * available space. + * @method + * @memberof Popper.Utils + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { + var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; + + if (placement.indexOf('auto') === -1) { + return placement; + } + + var boundaries = getBoundaries(popper, reference, padding, boundariesElement); + + var rects = { + top: { + width: boundaries.width, + height: refRect.top - boundaries.top + }, + right: { + width: boundaries.right - refRect.right, + height: boundaries.height + }, + bottom: { + width: boundaries.width, + height: boundaries.bottom - refRect.bottom + }, + left: { + width: refRect.left - boundaries.left, + height: boundaries.height + } + }; + + var sortedAreas = Object.keys(rects).map(function (key) { + return _extends({ + key: key + }, rects[key], { + area: getArea(rects[key]) + }); + }).sort(function (a, b) { + return b.area - a.area; + }); + + var filteredAreas = sortedAreas.filter(function (_ref2) { + var width = _ref2.width, + height = _ref2.height; + return width >= popper.clientWidth && height >= popper.clientHeight; + }); + + var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; + + var variation = placement.split('-')[1]; + + return computedPlacement + (variation ? '-' + variation : ''); + } + + /** + * Get offsets to the reference element + * @method + * @memberof Popper.Utils + * @param {Object} state + * @param {Element} popper - the popper element + * @param {Element} reference - the reference element (the popper will be relative to this) + * @param {Element} fixedPosition - is in fixed position mode + * @returns {Object} An object containing the offsets which will be applied to the popper + */ + function getReferenceOffsets(state, popper, reference) { + var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, reference); + return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); + } + + /** + * Get the outer sizes of the given element (offset size + margins) + * @method + * @memberof Popper.Utils + * @argument {Element} element + * @returns {Object} object containing width and height properties + */ + function getOuterSizes(element) { + var styles = getComputedStyle(element); + var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom); + var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight); + var result = { + width: element.offsetWidth + y, + height: element.offsetHeight + x + }; + return result; + } + + /** + * Get the opposite placement of the given one + * @method + * @memberof Popper.Utils + * @argument {String} placement + * @returns {String} flipped placement + */ + function getOppositePlacement(placement) { + var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; + return placement.replace(/left|right|bottom|top/g, function (matched) { + return hash[matched]; + }); + } + + /** + * Get offsets to the popper + * @method + * @memberof Popper.Utils + * @param {Object} position - CSS position the Popper will get applied + * @param {HTMLElement} popper - the popper element + * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) + * @param {String} placement - one of the valid placement options + * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper + */ + function getPopperOffsets(popper, referenceOffsets, placement) { + placement = placement.split('-')[0]; + + // Get popper node sizes + var popperRect = getOuterSizes(popper); + + // Add position, width and height to our offsets object + var popperOffsets = { + width: popperRect.width, + height: popperRect.height + }; + + // depending by the popper placement we have to compute its offsets slightly differently + var isHoriz = ['right', 'left'].indexOf(placement) !== -1; + var mainSide = isHoriz ? 'top' : 'left'; + var secondarySide = isHoriz ? 'left' : 'top'; + var measurement = isHoriz ? 'height' : 'width'; + var secondaryMeasurement = !isHoriz ? 'height' : 'width'; + + popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; + if (placement === secondarySide) { + popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; + } else { + popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; + } + + return popperOffsets; + } + + /** + * Mimics the `find` method of Array + * @method + * @memberof Popper.Utils + * @argument {Array} arr + * @argument prop + * @argument value + * @returns index or -1 + */ + function find(arr, check) { + // use native find if supported + if (Array.prototype.find) { + return arr.find(check); + } + + // use `filter` to obtain the same behavior of `find` + return arr.filter(check)[0]; + } + + /** + * Return the index of the matching object + * @method + * @memberof Popper.Utils + * @argument {Array} arr + * @argument prop + * @argument value + * @returns index or -1 + */ + function findIndex(arr, prop, value) { + // use native findIndex if supported + if (Array.prototype.findIndex) { + return arr.findIndex(function (cur) { + return cur[prop] === value; + }); + } + + // use `find` + `indexOf` if `findIndex` isn't supported + var match = find(arr, function (obj) { + return obj[prop] === value; + }); + return arr.indexOf(match); + } + + /** + * Loop trough the list of modifiers and run them in order, + * each of them will then edit the data object. + * @method + * @memberof Popper.Utils + * @param {dataObject} data + * @param {Array} modifiers + * @param {String} ends - Optional modifier name used as stopper + * @returns {dataObject} + */ + function runModifiers(modifiers, data, ends) { + var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); + + modifiersToRun.forEach(function (modifier) { + if (modifier['function']) { + // eslint-disable-line dot-notation + console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); + } + var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation + if (modifier.enabled && isFunction(fn)) { + // Add properties to offsets to make them a complete clientRect object + // we do this before each modifier to make sure the previous one doesn't + // mess with these values + data.offsets.popper = getClientRect(data.offsets.popper); + data.offsets.reference = getClientRect(data.offsets.reference); + + data = fn(data, modifier); + } + }); + + return data; + } + + /** + * Updates the position of the popper, computing the new offsets and applying + * the new style.
+ * Prefer `scheduleUpdate` over `update` because of performance reasons. + * @method + * @memberof Popper + */ + function update() { + // if popper is destroyed, don't perform any further update + if (this.state.isDestroyed) { + return; + } + + var data = { + instance: this, + styles: {}, + arrowStyles: {}, + attributes: {}, + flipped: false, + offsets: {} + }; + + // compute reference element offsets + data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); + + // compute auto placement, store placement inside the data object, + // modifiers will be able to edit `placement` if needed + // and refer to originalPlacement to know the original value + data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); + + // store the computed placement inside `originalPlacement` + data.originalPlacement = data.placement; + + data.positionFixed = this.options.positionFixed; + + // compute the popper offsets + data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); + data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; + + // run the modifiers + data = runModifiers(this.modifiers, data); + + // the first `update` will call `onCreate` callback + // the other ones will call `onUpdate` callback + if (!this.state.isCreated) { + this.state.isCreated = true; + this.options.onCreate(data); + } else { + this.options.onUpdate(data); + } + } + + /** + * Helper used to know if the given modifier is enabled. + * @method + * @memberof Popper.Utils + * @returns {Boolean} + */ + function isModifierEnabled(modifiers, modifierName) { + return modifiers.some(function (_ref) { + var name = _ref.name, + enabled = _ref.enabled; + return enabled && name === modifierName; + }); + } + + /** + * Get the prefixed supported property name + * @method + * @memberof Popper.Utils + * @argument {String} property (camelCase) + * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) + */ + function getSupportedPropertyName(property) { + var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; + var upperProp = property.charAt(0).toUpperCase() + property.slice(1); + + for (var i = 0; i < prefixes.length; i++) { + var prefix = prefixes[i]; + var toCheck = prefix ? '' + prefix + upperProp : property; + if (typeof document.body.style[toCheck] !== 'undefined') { + return toCheck; + } + } + return null; + } + + /** + * Destroy the popper + * @method + * @memberof Popper + */ + function destroy() { + this.state.isDestroyed = true; + + // touch DOM only if `applyStyle` modifier is enabled + if (isModifierEnabled(this.modifiers, 'applyStyle')) { + this.popper.removeAttribute('x-placement'); + this.popper.style.position = ''; + this.popper.style.top = ''; + this.popper.style.left = ''; + this.popper.style.right = ''; + this.popper.style.bottom = ''; + this.popper.style.willChange = ''; + this.popper.style[getSupportedPropertyName('transform')] = ''; + } + + this.disableEventListeners(); + + // remove the popper if user explicity asked for the deletion on destroy + // do not use `remove` because IE11 doesn't support it + if (this.options.removeOnDestroy) { + this.popper.parentNode.removeChild(this.popper); + } + return this; + } + + /** + * Get the window associated with the element + * @argument {Element} element + * @returns {Window} + */ + function getWindow(element) { + var ownerDocument = element.ownerDocument; + return ownerDocument ? ownerDocument.defaultView : window; + } + + function attachToScrollParents(scrollParent, event, callback, scrollParents) { + var isBody = scrollParent.nodeName === 'BODY'; + var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; + target.addEventListener(event, callback, { passive: true }); + + if (!isBody) { + attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); + } + scrollParents.push(target); + } + + /** + * Setup needed event listeners used to update the popper position + * @method + * @memberof Popper.Utils + * @private + */ + function setupEventListeners(reference, options, state, updateBound) { + // Resize event listener on window + state.updateBound = updateBound; + getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); + + // Scroll event listener on scroll parents + var scrollElement = getScrollParent(reference); + attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); + state.scrollElement = scrollElement; + state.eventsEnabled = true; + + return state; + } + + /** + * It will add resize/scroll events and start recalculating + * position of the popper element when they are triggered. + * @method + * @memberof Popper + */ + function enableEventListeners() { + if (!this.state.eventsEnabled) { + this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); + } + } + + /** + * Remove event listeners used to update the popper position + * @method + * @memberof Popper.Utils + * @private + */ + function removeEventListeners(reference, state) { + // Remove resize event listener on window + getWindow(reference).removeEventListener('resize', state.updateBound); + + // Remove scroll event listener on scroll parents + state.scrollParents.forEach(function (target) { + target.removeEventListener('scroll', state.updateBound); + }); + + // Reset state + state.updateBound = null; + state.scrollParents = []; + state.scrollElement = null; + state.eventsEnabled = false; + return state; + } + + /** + * It will remove resize/scroll events and won't recalculate popper position + * when they are triggered. It also won't trigger onUpdate callback anymore, + * unless you call `update` method manually. + * @method + * @memberof Popper + */ + function disableEventListeners() { + if (this.state.eventsEnabled) { + cancelAnimationFrame(this.scheduleUpdate); + this.state = removeEventListeners(this.reference, this.state); + } + } + + /** + * Tells if a given input is a number + * @method + * @memberof Popper.Utils + * @param {*} input to check + * @return {Boolean} + */ + function isNumeric(n) { + return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); + } + + /** + * Set the style to the given popper + * @method + * @memberof Popper.Utils + * @argument {Element} element - Element to apply the style to + * @argument {Object} styles + * Object with a list of properties and values which will be applied to the element + */ + function setStyles(element, styles) { + Object.keys(styles).forEach(function (prop) { + var unit = ''; + // add unit if the value is numeric and is one of the following + if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { + unit = 'px'; + } + element.style[prop] = styles[prop] + unit; + }); + } + + /** + * Set the attributes to the given popper + * @method + * @memberof Popper.Utils + * @argument {Element} element - Element to apply the attributes to + * @argument {Object} styles + * Object with a list of properties and values which will be applied to the element + */ + function setAttributes(element, attributes) { + Object.keys(attributes).forEach(function (prop) { + var value = attributes[prop]; + if (value !== false) { + element.setAttribute(prop, attributes[prop]); + } else { + element.removeAttribute(prop); + } + }); + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} data.styles - List of style properties - values to apply to popper element + * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The same data object + */ + function applyStyle(data) { + // any property present in `data.styles` will be applied to the popper, + // in this way we can make the 3rd party modifiers add custom styles to it + // Be aware, modifiers could override the properties defined in the previous + // lines of this modifier! + setStyles(data.instance.popper, data.styles); + + // any property present in `data.attributes` will be applied to the popper, + // they will be set as HTML attributes of the element + setAttributes(data.instance.popper, data.attributes); + + // if arrowElement is defined and arrowStyles has some properties + if (data.arrowElement && Object.keys(data.arrowStyles).length) { + setStyles(data.arrowElement, data.arrowStyles); + } + + return data; + } + + /** + * Set the x-placement attribute before everything else because it could be used + * to add margins to the popper margins needs to be calculated to get the + * correct popper offsets. + * @method + * @memberof Popper.modifiers + * @param {HTMLElement} reference - The reference element used to position the popper + * @param {HTMLElement} popper - The HTML element used as popper + * @param {Object} options - Popper.js options + */ + function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { + // compute reference element offsets + var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); + + // compute auto placement, store placement inside the data object, + // modifiers will be able to edit `placement` if needed + // and refer to originalPlacement to know the original value + var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); + + popper.setAttribute('x-placement', placement); + + // Apply `position` to popper before anything else because + // without the position applied we can't guarantee correct computations + setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); + + return options; + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function computeStyle(data, options) { + var x = options.x, + y = options.y; + var popper = data.offsets.popper; + + // Remove this legacy support in Popper.js v2 + + var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) { + return modifier.name === 'applyStyle'; + }).gpuAcceleration; + if (legacyGpuAccelerationOption !== undefined) { + console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); + } + var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; + + var offsetParent = getOffsetParent(data.instance.popper); + var offsetParentRect = getBoundingClientRect(offsetParent); + + // Styles + var styles = { + position: popper.position + }; + + // floor sides to avoid blurry text + var offsets = { + left: Math.floor(popper.left), + top: Math.floor(popper.top), + bottom: Math.floor(popper.bottom), + right: Math.floor(popper.right) + }; + + var sideA = x === 'bottom' ? 'top' : 'bottom'; + var sideB = y === 'right' ? 'left' : 'right'; + + // if gpuAcceleration is set to `true` and transform is supported, + // we use `translate3d` to apply the position to the popper we + // automatically use the supported prefixed version if needed + var prefixedProperty = getSupportedPropertyName('transform'); + + // now, let's make a step back and look at this code closely (wtf?) + // If the content of the popper grows once it's been positioned, it + // may happen that the popper gets misplaced because of the new content + // overflowing its reference element + // To avoid this problem, we provide two options (x and y), which allow + // the consumer to define the offset origin. + // If we position a popper on top of a reference element, we can set + // `x` to `top` to make the popper grow towards its top instead of + // its bottom. + var left = void 0, + top = void 0; + if (sideA === 'bottom') { + top = -offsetParentRect.height + offsets.bottom; + } else { + top = offsets.top; + } + if (sideB === 'right') { + left = -offsetParentRect.width + offsets.right; + } else { + left = offsets.left; + } + if (gpuAcceleration && prefixedProperty) { + styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; + styles[sideA] = 0; + styles[sideB] = 0; + styles.willChange = 'transform'; + } else { + // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties + var invertTop = sideA === 'bottom' ? -1 : 1; + var invertLeft = sideB === 'right' ? -1 : 1; + styles[sideA] = top * invertTop; + styles[sideB] = left * invertLeft; + styles.willChange = sideA + ', ' + sideB; + } + + // Attributes + var attributes = { + 'x-placement': data.placement + }; + + // Update `data` attributes, styles and arrowStyles + data.attributes = _extends({}, attributes, data.attributes); + data.styles = _extends({}, styles, data.styles); + data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles); + + return data; + } + + /** + * Helper used to know if the given modifier depends from another one.
+ * It checks if the needed modifier is listed and enabled. + * @method + * @memberof Popper.Utils + * @param {Array} modifiers - list of modifiers + * @param {String} requestingName - name of requesting modifier + * @param {String} requestedName - name of requested modifier + * @returns {Boolean} + */ + function isModifierRequired(modifiers, requestingName, requestedName) { + var requesting = find(modifiers, function (_ref) { + var name = _ref.name; + return name === requestingName; + }); + + var isRequired = !!requesting && modifiers.some(function (modifier) { + return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; + }); + + if (!isRequired) { + var _requesting = '`' + requestingName + '`'; + var requested = '`' + requestedName + '`'; + console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); + } + return isRequired; + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function arrow(data, options) { + var _data$offsets$arrow; + + // arrow depends on keepTogether in order to work + if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { + return data; + } + + var arrowElement = options.element; + + // if arrowElement is a string, suppose it's a CSS selector + if (typeof arrowElement === 'string') { + arrowElement = data.instance.popper.querySelector(arrowElement); + + // if arrowElement is not found, don't run the modifier + if (!arrowElement) { + return data; + } + } else { + // if the arrowElement isn't a query selector we must check that the + // provided DOM node is child of its popper node + if (!data.instance.popper.contains(arrowElement)) { + console.warn('WARNING: `arrow.element` must be child of its popper element!'); + return data; + } + } + + var placement = data.placement.split('-')[0]; + var _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + + var isVertical = ['left', 'right'].indexOf(placement) !== -1; + + var len = isVertical ? 'height' : 'width'; + var sideCapitalized = isVertical ? 'Top' : 'Left'; + var side = sideCapitalized.toLowerCase(); + var altSide = isVertical ? 'left' : 'top'; + var opSide = isVertical ? 'bottom' : 'right'; + var arrowElementSize = getOuterSizes(arrowElement)[len]; + + // + // extends keepTogether behavior making sure the popper and its + // reference have enough pixels in conjuction + // + + // top/left side + if (reference[opSide] - arrowElementSize < popper[side]) { + data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); + } + // bottom/right side + if (reference[side] + arrowElementSize > popper[opSide]) { + data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; + } + data.offsets.popper = getClientRect(data.offsets.popper); + + // compute center of the popper + var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; + + // Compute the sideValue using the updated popper offsets + // take popper margin in account because we don't have this info available + var css = getStyleComputedProperty(data.instance.popper); + var popperMarginSide = parseFloat(css['margin' + sideCapitalized], 10); + var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width'], 10); + var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; + + // prevent arrowElement from being placed not contiguously to its popper + sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); + + data.arrowElement = arrowElement; + data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); + + return data; + } + + /** + * Get the opposite placement variation of the given one + * @method + * @memberof Popper.Utils + * @argument {String} placement variation + * @returns {String} flipped placement variation + */ + function getOppositeVariation(variation) { + if (variation === 'end') { + return 'start'; + } else if (variation === 'start') { + return 'end'; + } + return variation; + } + + /** + * List of accepted placements to use as values of the `placement` option.
+ * Valid placements are: + * - `auto` + * - `top` + * - `right` + * - `bottom` + * - `left` + * + * Each placement can have a variation from this list: + * - `-start` + * - `-end` + * + * Variations are interpreted easily if you think of them as the left to right + * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` + * is right.
+ * Vertically (`left` and `right`), `start` is top and `end` is bottom. + * + * Some valid examples are: + * - `top-end` (on top of reference, right aligned) + * - `right-start` (on right of reference, top aligned) + * - `bottom` (on bottom, centered) + * - `auto-right` (on the side with more space available, alignment depends by placement) + * + * @static + * @type {Array} + * @enum {String} + * @readonly + * @method placements + * @memberof Popper + */ + var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; + + // Get rid of `auto` `auto-start` and `auto-end` + var validPlacements = placements.slice(3); + + /** + * Given an initial placement, returns all the subsequent placements + * clockwise (or counter-clockwise). + * + * @method + * @memberof Popper.Utils + * @argument {String} placement - A valid placement (it accepts variations) + * @argument {Boolean} counter - Set to true to walk the placements counterclockwise + * @returns {Array} placements including their variations + */ + function clockwise(placement) { + var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var index = validPlacements.indexOf(placement); + var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); + return counter ? arr.reverse() : arr; + } + + var BEHAVIORS = { + FLIP: 'flip', + CLOCKWISE: 'clockwise', + COUNTERCLOCKWISE: 'counterclockwise' + }; + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function flip(data, options) { + // if `inner` modifier is enabled, we can't use the `flip` modifier + if (isModifierEnabled(data.instance.modifiers, 'inner')) { + return data; + } + + if (data.flipped && data.placement === data.originalPlacement) { + // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides + return data; + } + + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); + + var placement = data.placement.split('-')[0]; + var placementOpposite = getOppositePlacement(placement); + var variation = data.placement.split('-')[1] || ''; + + var flipOrder = []; + + switch (options.behavior) { + case BEHAVIORS.FLIP: + flipOrder = [placement, placementOpposite]; + break; + case BEHAVIORS.CLOCKWISE: + flipOrder = clockwise(placement); + break; + case BEHAVIORS.COUNTERCLOCKWISE: + flipOrder = clockwise(placement, true); + break; + default: + flipOrder = options.behavior; + } + + flipOrder.forEach(function (step, index) { + if (placement !== step || flipOrder.length === index + 1) { + return data; + } + + placement = data.placement.split('-')[0]; + placementOpposite = getOppositePlacement(placement); + + var popperOffsets = data.offsets.popper; + var refOffsets = data.offsets.reference; + + // using floor because the reference offsets may contain decimals we are not going to consider here + var floor = Math.floor; + var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); + + var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); + var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); + var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); + var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); + + var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; + + // flip the variation if required + var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; + var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); + + if (overlapsRef || overflowsBoundaries || flippedVariation) { + // this boolean to detect any flip loop + data.flipped = true; + + if (overlapsRef || overflowsBoundaries) { + placement = flipOrder[index + 1]; + } + + if (flippedVariation) { + variation = getOppositeVariation(variation); + } + + data.placement = placement + (variation ? '-' + variation : ''); + + // this object contains `position`, we want to preserve it along with + // any additional property we may add in the future + data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); + + data = runModifiers(data.instance.modifiers, data, 'flip'); + } + }); + return data; + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function keepTogether(data) { + var _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + + var placement = data.placement.split('-')[0]; + var floor = Math.floor; + var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; + var side = isVertical ? 'right' : 'bottom'; + var opSide = isVertical ? 'left' : 'top'; + var measurement = isVertical ? 'width' : 'height'; + + if (popper[side] < floor(reference[opSide])) { + data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; + } + if (popper[opSide] > floor(reference[side])) { + data.offsets.popper[opSide] = floor(reference[side]); + } + + return data; + } + + /** + * Converts a string containing value + unit into a px value number + * @function + * @memberof {modifiers~offset} + * @private + * @argument {String} str - Value + unit string + * @argument {String} measurement - `height` or `width` + * @argument {Object} popperOffsets + * @argument {Object} referenceOffsets + * @returns {Number|String} + * Value in pixels, or original string if no values were extracted + */ + function toValue(str, measurement, popperOffsets, referenceOffsets) { + // separate value from unit + var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); + var value = +split[1]; + var unit = split[2]; + + // If it's not a number it's an operator, I guess + if (!value) { + return str; + } + + if (unit.indexOf('%') === 0) { + var element = void 0; + switch (unit) { + case '%p': + element = popperOffsets; + break; + case '%': + case '%r': + default: + element = referenceOffsets; + } + + var rect = getClientRect(element); + return rect[measurement] / 100 * value; + } else if (unit === 'vh' || unit === 'vw') { + // if is a vh or vw, we calculate the size based on the viewport + var size = void 0; + if (unit === 'vh') { + size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); + } else { + size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); + } + return size / 100 * value; + } else { + // if is an explicit pixel unit, we get rid of the unit and keep the value + // if is an implicit unit, it's px, and we return just the value + return value; + } + } + + /** + * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. + * @function + * @memberof {modifiers~offset} + * @private + * @argument {String} offset + * @argument {Object} popperOffsets + * @argument {Object} referenceOffsets + * @argument {String} basePlacement + * @returns {Array} a two cells array with x and y offsets in numbers + */ + function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { + var offsets = [0, 0]; + + // Use height if placement is left or right and index is 0 otherwise use width + // in this way the first offset will use an axis and the second one + // will use the other one + var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; + + // Split the offset string to obtain a list of values and operands + // The regex addresses values with the plus or minus sign in front (+10, -20, etc) + var fragments = offset.split(/(\+|\-)/).map(function (frag) { + return frag.trim(); + }); + + // Detect if the offset string contains a pair of values or a single one + // they could be separated by comma or space + var divider = fragments.indexOf(find(fragments, function (frag) { + return frag.search(/,|\s/) !== -1; + })); + + if (fragments[divider] && fragments[divider].indexOf(',') === -1) { + console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); + } + + // If divider is found, we divide the list of values and operands to divide + // them by ofset X and Y. + var splitRegex = /\s*,\s*|\s+/; + var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; + + // Convert the values with units to absolute pixels to allow our computations + ops = ops.map(function (op, index) { + // Most of the units rely on the orientation of the popper + var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; + var mergeWithPrevious = false; + return op + // This aggregates any `+` or `-` sign that aren't considered operators + // e.g.: 10 + +5 => [10, +, +5] + .reduce(function (a, b) { + if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { + a[a.length - 1] = b; + mergeWithPrevious = true; + return a; + } else if (mergeWithPrevious) { + a[a.length - 1] += b; + mergeWithPrevious = false; + return a; + } else { + return a.concat(b); + } + }, []) + // Here we convert the string values into number values (in px) + .map(function (str) { + return toValue(str, measurement, popperOffsets, referenceOffsets); + }); + }); + + // Loop trough the offsets arrays and execute the operations + ops.forEach(function (op, index) { + op.forEach(function (frag, index2) { + if (isNumeric(frag)) { + offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); + } + }); + }); + return offsets; + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @argument {Number|String} options.offset=0 + * The offset value as described in the modifier description + * @returns {Object} The data object, properly modified + */ + function offset(data, _ref) { + var offset = _ref.offset; + var placement = data.placement, + _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + + var basePlacement = placement.split('-')[0]; + + var offsets = void 0; + if (isNumeric(+offset)) { + offsets = [+offset, 0]; + } else { + offsets = parseOffset(offset, popper, reference, basePlacement); + } + + if (basePlacement === 'left') { + popper.top += offsets[0]; + popper.left -= offsets[1]; + } else if (basePlacement === 'right') { + popper.top += offsets[0]; + popper.left += offsets[1]; + } else if (basePlacement === 'top') { + popper.left += offsets[0]; + popper.top -= offsets[1]; + } else if (basePlacement === 'bottom') { + popper.left += offsets[0]; + popper.top += offsets[1]; + } + + data.popper = popper; + return data; + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function preventOverflow(data, options) { + var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); + + // If offsetParent is the reference element, we really want to + // go one step up and use the next offsetParent as reference to + // avoid to make this modifier completely useless and look like broken + if (data.instance.reference === boundariesElement) { + boundariesElement = getOffsetParent(boundariesElement); + } + + var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); + options.boundaries = boundaries; + + var order = options.priority; + var popper = data.offsets.popper; + + var check = { + primary: function primary(placement) { + var value = popper[placement]; + if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { + value = Math.max(popper[placement], boundaries[placement]); + } + return defineProperty({}, placement, value); + }, + secondary: function secondary(placement) { + var mainSide = placement === 'right' ? 'left' : 'top'; + var value = popper[mainSide]; + if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { + value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); + } + return defineProperty({}, mainSide, value); + } + }; + + order.forEach(function (placement) { + var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; + popper = _extends({}, popper, check[side](placement)); + }); + + data.offsets.popper = popper; + + return data; + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function shift(data) { + var placement = data.placement; + var basePlacement = placement.split('-')[0]; + var shiftvariation = placement.split('-')[1]; + + // if shift shiftvariation is specified, run the modifier + if (shiftvariation) { + var _data$offsets = data.offsets, + reference = _data$offsets.reference, + popper = _data$offsets.popper; + + var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; + var side = isVertical ? 'left' : 'top'; + var measurement = isVertical ? 'width' : 'height'; + + var shiftOffsets = { + start: defineProperty({}, side, reference[side]), + end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) + }; + + data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]); + } + + return data; + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by update method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function hide(data) { + if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { + return data; + } + + var refRect = data.offsets.reference; + var bound = find(data.instance.modifiers, function (modifier) { + return modifier.name === 'preventOverflow'; + }).boundaries; + + if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { + // Avoid unnecessary DOM access if visibility hasn't changed + if (data.hide === true) { + return data; + } + + data.hide = true; + data.attributes['x-out-of-boundaries'] = ''; + } else { + // Avoid unnecessary DOM access if visibility hasn't changed + if (data.hide === false) { + return data; + } + + data.hide = false; + data.attributes['x-out-of-boundaries'] = false; + } + + return data; + } + + /** + * @function + * @memberof Modifiers + * @argument {Object} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {Object} The data object, properly modified + */ + function inner(data) { + var placement = data.placement; + var basePlacement = placement.split('-')[0]; + var _data$offsets = data.offsets, + popper = _data$offsets.popper, + reference = _data$offsets.reference; + + var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; + + var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; + + popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); + + data.placement = getOppositePlacement(placement); + data.offsets.popper = getClientRect(popper); + + return data; + } + + /** + * Modifier function, each modifier can have a function of this type assigned + * to its `fn` property.
+ * These functions will be called on each update, this means that you must + * make sure they are performant enough to avoid performance bottlenecks. + * + * @function ModifierFn + * @argument {dataObject} data - The data object generated by `update` method + * @argument {Object} options - Modifiers configuration and options + * @returns {dataObject} The data object, properly modified + */ + + /** + * Modifiers are plugins used to alter the behavior of your poppers.
+ * Popper.js uses a set of 9 modifiers to provide all the basic functionalities + * needed by the library. + * + * Usually you don't want to override the `order`, `fn` and `onLoad` props. + * All the other properties are configurations that could be tweaked. + * @namespace modifiers + */ + var modifiers = { + /** + * Modifier used to shift the popper on the start or end of its reference + * element.
+ * It will read the variation of the `placement` property.
+ * It can be one either `-end` or `-start`. + * @memberof modifiers + * @inner + */ + shift: { + /** @prop {number} order=100 - Index used to define the order of execution */ + order: 100, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: shift + }, + + /** + * The `offset` modifier can shift your popper on both its axis. + * + * It accepts the following units: + * - `px` or unitless, interpreted as pixels + * - `%` or `%r`, percentage relative to the length of the reference element + * - `%p`, percentage relative to the length of the popper element + * - `vw`, CSS viewport width unit + * - `vh`, CSS viewport height unit + * + * For length is intended the main axis relative to the placement of the popper.
+ * This means that if the placement is `top` or `bottom`, the length will be the + * `width`. In case of `left` or `right`, it will be the height. + * + * You can provide a single value (as `Number` or `String`), or a pair of values + * as `String` divided by a comma or one (or more) white spaces.
+ * The latter is a deprecated method because it leads to confusion and will be + * removed in v2.
+ * Additionally, it accepts additions and subtractions between different units. + * Note that multiplications and divisions aren't supported. + * + * Valid examples are: + * ``` + * 10 + * '10%' + * '10, 10' + * '10%, 10' + * '10 + 10%' + * '10 - 5vh + 3%' + * '-10px + 5vh, 5px - 6%' + * ``` + * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap + * > with their reference element, unfortunately, you will have to disable the `flip` modifier. + * > More on this [reading this issue](https://github.com/FezVrasta/popper.js/issues/373) + * + * @memberof modifiers + * @inner + */ + offset: { + /** @prop {number} order=200 - Index used to define the order of execution */ + order: 200, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: offset, + /** @prop {Number|String} offset=0 + * The offset value as described in the modifier description + */ + offset: 0 + }, + + /** + * Modifier used to prevent the popper from being positioned outside the boundary. + * + * An scenario exists where the reference itself is not within the boundaries.
+ * We can say it has "escaped the boundaries" β€” or just "escaped".
+ * In this case we need to decide whether the popper should either: + * + * - detach from the reference and remain "trapped" in the boundaries, or + * - if it should ignore the boundary and "escape with its reference" + * + * When `escapeWithReference` is set to`true` and reference is completely + * outside its boundaries, the popper will overflow (or completely leave) + * the boundaries in order to remain attached to the edge of the reference. + * + * @memberof modifiers + * @inner + */ + preventOverflow: { + /** @prop {number} order=300 - Index used to define the order of execution */ + order: 300, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: preventOverflow, + /** + * @prop {Array} [priority=['left','right','top','bottom']] + * Popper will try to prevent overflow following these priorities by default, + * then, it could overflow on the left and on top of the `boundariesElement` + */ + priority: ['left', 'right', 'top', 'bottom'], + /** + * @prop {number} padding=5 + * Amount of pixel used to define a minimum distance between the boundaries + * and the popper this makes sure the popper has always a little padding + * between the edges of its container + */ + padding: 5, + /** + * @prop {String|HTMLElement} boundariesElement='scrollParent' + * Boundaries used by the modifier, can be `scrollParent`, `window`, + * `viewport` or any DOM element. + */ + boundariesElement: 'scrollParent' + }, + + /** + * Modifier used to make sure the reference and its popper stay near eachothers + * without leaving any gap between the two. Expecially useful when the arrow is + * enabled and you want to assure it to point to its reference element. + * It cares only about the first axis, you can still have poppers with margin + * between the popper and its reference element. + * @memberof modifiers + * @inner + */ + keepTogether: { + /** @prop {number} order=400 - Index used to define the order of execution */ + order: 400, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: keepTogether + }, + + /** + * This modifier is used to move the `arrowElement` of the popper to make + * sure it is positioned between the reference element and its popper element. + * It will read the outer size of the `arrowElement` node to detect how many + * pixels of conjuction are needed. + * + * It has no effect if no `arrowElement` is provided. + * @memberof modifiers + * @inner + */ + arrow: { + /** @prop {number} order=500 - Index used to define the order of execution */ + order: 500, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: arrow, + /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ + element: '[x-arrow]' + }, + + /** + * Modifier used to flip the popper's placement when it starts to overlap its + * reference element. + * + * Requires the `preventOverflow` modifier before it in order to work. + * + * **NOTE:** this modifier will interrupt the current update cycle and will + * restart it if it detects the need to flip the placement. + * @memberof modifiers + * @inner + */ + flip: { + /** @prop {number} order=600 - Index used to define the order of execution */ + order: 600, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: flip, + /** + * @prop {String|Array} behavior='flip' + * The behavior used to change the popper's placement. It can be one of + * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid + * placements (with optional variations). + */ + behavior: 'flip', + /** + * @prop {number} padding=5 + * The popper will flip if it hits the edges of the `boundariesElement` + */ + padding: 5, + /** + * @prop {String|HTMLElement} boundariesElement='viewport' + * The element which will define the boundaries of the popper position, + * the popper will never be placed outside of the defined boundaries + * (except if keepTogether is enabled) + */ + boundariesElement: 'viewport' + }, + + /** + * Modifier used to make the popper flow toward the inner of the reference element. + * By default, when this modifier is disabled, the popper will be placed outside + * the reference element. + * @memberof modifiers + * @inner + */ + inner: { + /** @prop {number} order=700 - Index used to define the order of execution */ + order: 700, + /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ + enabled: false, + /** @prop {ModifierFn} */ + fn: inner + }, + + /** + * Modifier used to hide the popper when its reference element is outside of the + * popper boundaries. It will set a `x-out-of-boundaries` attribute which can + * be used to hide with a CSS selector the popper when its reference is + * out of boundaries. + * + * Requires the `preventOverflow` modifier before it in order to work. + * @memberof modifiers + * @inner + */ + hide: { + /** @prop {number} order=800 - Index used to define the order of execution */ + order: 800, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: hide + }, + + /** + * Computes the style that will be applied to the popper element to gets + * properly positioned. + * + * Note that this modifier will not touch the DOM, it just prepares the styles + * so that `applyStyle` modifier can apply it. This separation is useful + * in case you need to replace `applyStyle` with a custom implementation. + * + * This modifier has `850` as `order` value to maintain backward compatibility + * with previous versions of Popper.js. Expect the modifiers ordering method + * to change in future major versions of the library. + * + * @memberof modifiers + * @inner + */ + computeStyle: { + /** @prop {number} order=850 - Index used to define the order of execution */ + order: 850, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: computeStyle, + /** + * @prop {Boolean} gpuAcceleration=true + * If true, it uses the CSS 3d transformation to position the popper. + * Otherwise, it will use the `top` and `left` properties. + */ + gpuAcceleration: true, + /** + * @prop {string} [x='bottom'] + * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. + * Change this if your popper should grow in a direction different from `bottom` + */ + x: 'bottom', + /** + * @prop {string} [x='left'] + * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. + * Change this if your popper should grow in a direction different from `right` + */ + y: 'right' + }, + + /** + * Applies the computed styles to the popper element. + * + * All the DOM manipulations are limited to this modifier. This is useful in case + * you want to integrate Popper.js inside a framework or view library and you + * want to delegate all the DOM manipulations to it. + * + * Note that if you disable this modifier, you must make sure the popper element + * has its position set to `absolute` before Popper.js can do its work! + * + * Just disable this modifier and define you own to achieve the desired effect. + * + * @memberof modifiers + * @inner + */ + applyStyle: { + /** @prop {number} order=900 - Index used to define the order of execution */ + order: 900, + /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ + enabled: true, + /** @prop {ModifierFn} */ + fn: applyStyle, + /** @prop {Function} */ + onLoad: applyStyleOnLoad, + /** + * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier + * @prop {Boolean} gpuAcceleration=true + * If true, it uses the CSS 3d transformation to position the popper. + * Otherwise, it will use the `top` and `left` properties. + */ + gpuAcceleration: undefined + } + }; + + /** + * The `dataObject` is an object containing all the informations used by Popper.js + * this object get passed to modifiers and to the `onCreate` and `onUpdate` callbacks. + * @name dataObject + * @property {Object} data.instance The Popper.js instance + * @property {String} data.placement Placement applied to popper + * @property {String} data.originalPlacement Placement originally defined on init + * @property {Boolean} data.flipped True if popper has been flipped by flip modifier + * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper. + * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier + * @property {Object} data.styles Any CSS property defined here will be applied to the popper, it expects the JavaScript nomenclature (eg. `marginBottom`) + * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow, it expects the JavaScript nomenclature (eg. `marginBottom`) + * @property {Object} data.boundaries Offsets of the popper boundaries + * @property {Object} data.offsets The measurements of popper, reference and arrow elements. + * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values + * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values + * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 + */ + + /** + * Default options provided to Popper.js constructor.
+ * These can be overriden using the `options` argument of Popper.js.
+ * To override an option, simply pass as 3rd argument an object with the same + * structure of this object, example: + * ``` + * new Popper(ref, pop, { + * modifiers: { + * preventOverflow: { enabled: false } + * } + * }) + * ``` + * @type {Object} + * @static + * @memberof Popper + */ + var Defaults = { + /** + * Popper's placement + * @prop {Popper.placements} placement='bottom' + */ + placement: 'bottom', + + /** + * Set this to true if you want popper to position it self in 'fixed' mode + * @prop {Boolean} positionFixed=false + */ + positionFixed: false, + + /** + * Whether events (resize, scroll) are initially enabled + * @prop {Boolean} eventsEnabled=true + */ + eventsEnabled: true, + + /** + * Set to true if you want to automatically remove the popper when + * you call the `destroy` method. + * @prop {Boolean} removeOnDestroy=false + */ + removeOnDestroy: false, + + /** + * Callback called when the popper is created.
+ * By default, is set to no-op.
+ * Access Popper.js instance with `data.instance`. + * @prop {onCreate} + */ + onCreate: function onCreate() {}, + + /** + * Callback called when the popper is updated, this callback is not called + * on the initialization/creation of the popper, but only on subsequent + * updates.
+ * By default, is set to no-op.
+ * Access Popper.js instance with `data.instance`. + * @prop {onUpdate} + */ + onUpdate: function onUpdate() {}, + + /** + * List of modifiers used to modify the offsets before they are applied to the popper. + * They provide most of the functionalities of Popper.js + * @prop {modifiers} + */ + modifiers: modifiers + }; + + /** + * @callback onCreate + * @param {dataObject} data + */ + + /** + * @callback onUpdate + * @param {dataObject} data + */ + + // Utils + // Methods + var Popper = function () { + /** + * Create a new Popper.js instance + * @class Popper + * @param {HTMLElement|referenceObject} reference - The reference element used to position the popper + * @param {HTMLElement} popper - The HTML element used as popper. + * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) + * @return {Object} instance - The generated Popper.js instance + */ + function Popper(reference, popper) { + var _this = this; + + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + classCallCheck(this, Popper); + + this.scheduleUpdate = function () { + return requestAnimationFrame(_this.update); + }; + + // make update() debounced, so that it only runs at most once-per-tick + this.update = debounce(this.update.bind(this)); + + // with {} we create a new object with the options inside it + this.options = _extends({}, Popper.Defaults, options); + + // init state + this.state = { + isDestroyed: false, + isCreated: false, + scrollParents: [] + }; + + // get reference and popper elements (allow jQuery wrappers) + this.reference = reference && reference.jquery ? reference[0] : reference; + this.popper = popper && popper.jquery ? popper[0] : popper; + + // Deep merge modifiers options + this.options.modifiers = {}; + Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { + _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); + }); + + // Refactoring modifiers' list (Object => Array) + this.modifiers = Object.keys(this.options.modifiers).map(function (name) { + return _extends({ + name: name + }, _this.options.modifiers[name]); + }) + // sort the modifiers by order + .sort(function (a, b) { + return a.order - b.order; + }); + + // modifiers have the ability to execute arbitrary code when Popper.js get inited + // such code is executed in the same order of its modifier + // they could add new properties to their options configuration + // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! + this.modifiers.forEach(function (modifierOptions) { + if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { + modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); + } + }); + + // fire the first update to position the popper in the right place + this.update(); + + var eventsEnabled = this.options.eventsEnabled; + if (eventsEnabled) { + // setup event listeners, they will take care of update the position in specific situations + this.enableEventListeners(); + } + + this.state.eventsEnabled = eventsEnabled; + } + + // We can't use class properties because they don't get listed in the + // class prototype and break stuff like Sinon stubs + + + createClass(Popper, [{ + key: 'update', + value: function update$$1() { + return update.call(this); + } + }, { + key: 'destroy', + value: function destroy$$1() { + return destroy.call(this); + } + }, { + key: 'enableEventListeners', + value: function enableEventListeners$$1() { + return enableEventListeners.call(this); + } + }, { + key: 'disableEventListeners', + value: function disableEventListeners$$1() { + return disableEventListeners.call(this); + } + + /** + * Schedule an update, it will run on the next UI update available + * @method scheduleUpdate + * @memberof Popper + */ + + + /** + * Collection of utilities useful when writing custom modifiers. + * Starting from version 1.7, this method is available only if you + * include `popper-utils.js` before `popper.js`. + * + * **DEPRECATION**: This way to access PopperUtils is deprecated + * and will be removed in v2! Use the PopperUtils module directly instead. + * Due to the high instability of the methods contained in Utils, we can't + * guarantee them to follow semver. Use them at your own risk! + * @static + * @private + * @type {Object} + * @deprecated since version 1.8 + * @member Utils + * @memberof Popper + */ + + }]); + return Popper; + }(); + + /** + * The `referenceObject` is an object that provides an interface compatible with Popper.js + * and lets you use it as replacement of a real DOM node.
+ * You can use this method to position a popper relatively to a set of coordinates + * in case you don't have a DOM node to use as reference. + * + * ``` + * new Popper(referenceObject, popperNode); + * ``` + * + * NB: This feature isn't supported in Internet Explorer 10 + * @name referenceObject + * @property {Function} data.getBoundingClientRect + * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. + * @property {number} data.clientWidth + * An ES6 getter that will return the width of the virtual reference element. + * @property {number} data.clientHeight + * An ES6 getter that will return the height of the virtual reference element. + */ + + + Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; + Popper.placements = placements; + Popper.Defaults = Defaults; + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): dropdown.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Dropdown = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'dropdown'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.dropdown'; + var EVENT_KEY = "." + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key + + var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key + + var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key + + var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key + + var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key + + var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) + + var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); + var Event = { + HIDE: "hide" + EVENT_KEY, + HIDDEN: "hidden" + EVENT_KEY, + SHOW: "show" + EVENT_KEY, + SHOWN: "shown" + EVENT_KEY, + CLICK: "click" + EVENT_KEY, + CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, + KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY, + KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY + }; + var ClassName = { + DISABLED: 'disabled', + SHOW: 'show', + DROPUP: 'dropup', + DROPRIGHT: 'dropright', + DROPLEFT: 'dropleft', + MENURIGHT: 'dropdown-menu-right', + MENULEFT: 'dropdown-menu-left', + POSITION_STATIC: 'position-static' + }; + var Selector = { + DATA_TOGGLE: '[data-toggle="dropdown"]', + FORM_CHILD: '.dropdown form', + MENU: '.dropdown-menu', + NAVBAR_NAV: '.navbar-nav', + VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' + }; + var AttachmentMap = { + TOP: 'top-start', + TOPEND: 'top-end', + BOTTOM: 'bottom-start', + BOTTOMEND: 'bottom-end', + RIGHT: 'right-start', + RIGHTEND: 'right-end', + LEFT: 'left-start', + LEFTEND: 'left-end' + }; + var Default = { + offset: 0, + flip: true, + boundary: 'scrollParent', + reference: 'toggle', + display: 'dynamic' + }; + var DefaultType = { + offset: '(number|string|function)', + flip: 'boolean', + boundary: '(string|element)', + reference: '(string|element)', + display: 'string' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var Dropdown = + /*#__PURE__*/ + function () { + function Dropdown(element, config) { + this._element = element; + this._popper = null; + this._config = this._getConfig(config); + this._menu = this._getMenuElement(); + this._inNavbar = this._detectNavbar(); + + this._addEventListeners(); + } // Getters + + + var _proto = Dropdown.prototype; + + // Public + _proto.toggle = function toggle() { + if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) { + return; + } + + var parent = Dropdown._getParentFromElement(this._element); + + var isActive = $$$1(this._menu).hasClass(ClassName.SHOW); + + Dropdown._clearMenus(); + + if (isActive) { + return; + } + + var relatedTarget = { + relatedTarget: this._element + }; + var showEvent = $$$1.Event(Event.SHOW, relatedTarget); + $$$1(parent).trigger(showEvent); + + if (showEvent.isDefaultPrevented()) { + return; + } // Disable totally Popper.js for Dropdown in Navbar + + + if (!this._inNavbar) { + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)'); + } + + var referenceElement = this._element; + + if (this._config.reference === 'parent') { + referenceElement = parent; + } else if (Util.isElement(this._config.reference)) { + referenceElement = this._config.reference; // Check if it's jQuery element + + if (typeof this._config.reference.jquery !== 'undefined') { + referenceElement = this._config.reference[0]; + } + } // If boundary is not `scrollParent`, then set position to `static` + // to allow the menu to "escape" the scroll parent's boundaries + // https://github.com/twbs/bootstrap/issues/24251 + + + if (this._config.boundary !== 'scrollParent') { + $$$1(parent).addClass(ClassName.POSITION_STATIC); + } + + this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); + } // If this is a touch-enabled device we add extra + // empty mouseover listeners to the body's immediate children; + // only needed because of broken event delegation on iOS + // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html + + + if ('ontouchstart' in document.documentElement && $$$1(parent).closest(Selector.NAVBAR_NAV).length === 0) { + $$$1(document.body).children().on('mouseover', null, $$$1.noop); + } + + this._element.focus(); + + this._element.setAttribute('aria-expanded', true); + + $$$1(this._menu).toggleClass(ClassName.SHOW); + $$$1(parent).toggleClass(ClassName.SHOW).trigger($$$1.Event(Event.SHOWN, relatedTarget)); + }; + + _proto.dispose = function dispose() { + $$$1.removeData(this._element, DATA_KEY); + $$$1(this._element).off(EVENT_KEY); + this._element = null; + this._menu = null; + + if (this._popper !== null) { + this._popper.destroy(); + + this._popper = null; + } + }; + + _proto.update = function update() { + this._inNavbar = this._detectNavbar(); + + if (this._popper !== null) { + this._popper.scheduleUpdate(); + } + }; // Private + + + _proto._addEventListeners = function _addEventListeners() { + var _this = this; + + $$$1(this._element).on(Event.CLICK, function (event) { + event.preventDefault(); + event.stopPropagation(); + + _this.toggle(); + }); + }; + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, this.constructor.Default, $$$1(this._element).data(), config); + Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); + return config; + }; + + _proto._getMenuElement = function _getMenuElement() { + if (!this._menu) { + var parent = Dropdown._getParentFromElement(this._element); + + this._menu = $$$1(parent).find(Selector.MENU)[0]; + } + + return this._menu; + }; + + _proto._getPlacement = function _getPlacement() { + var $parentDropdown = $$$1(this._element).parent(); + var placement = AttachmentMap.BOTTOM; // Handle dropup + + if ($parentDropdown.hasClass(ClassName.DROPUP)) { + placement = AttachmentMap.TOP; + + if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { + placement = AttachmentMap.TOPEND; + } + } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) { + placement = AttachmentMap.RIGHT; + } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) { + placement = AttachmentMap.LEFT; + } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { + placement = AttachmentMap.BOTTOMEND; + } + + return placement; + }; + + _proto._detectNavbar = function _detectNavbar() { + return $$$1(this._element).closest('.navbar').length > 0; + }; + + _proto._getPopperConfig = function _getPopperConfig() { + var _this2 = this; + + var offsetConf = {}; + + if (typeof this._config.offset === 'function') { + offsetConf.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {}); + return data; + }; + } else { + offsetConf.offset = this._config.offset; + } + + var popperConfig = { + placement: this._getPlacement(), + modifiers: { + offset: offsetConf, + flip: { + enabled: this._config.flip + }, + preventOverflow: { + boundariesElement: this._config.boundary + } + } // Disable Popper.js if we have a static display + + }; + + if (this._config.display === 'static') { + popperConfig.modifiers.applyStyle = { + enabled: false + }; + } + + return popperConfig; + }; // Static + + + Dropdown._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $$$1(this).data(DATA_KEY); + + var _config = typeof config === 'object' ? config : null; + + if (!data) { + data = new Dropdown(this, _config); + $$$1(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } + + data[config](); + } + }); + }; + + Dropdown._clearMenus = function _clearMenus(event) { + if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { + return; + } + + var toggles = $$$1.makeArray($$$1(Selector.DATA_TOGGLE)); + + for (var i = 0; i < toggles.length; i++) { + var parent = Dropdown._getParentFromElement(toggles[i]); + + var context = $$$1(toggles[i]).data(DATA_KEY); + var relatedTarget = { + relatedTarget: toggles[i] + }; + + if (!context) { + continue; + } + + var dropdownMenu = context._menu; + + if (!$$$1(parent).hasClass(ClassName.SHOW)) { + continue; + } + + if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $$$1.contains(parent, event.target)) { + continue; + } + + var hideEvent = $$$1.Event(Event.HIDE, relatedTarget); + $$$1(parent).trigger(hideEvent); + + if (hideEvent.isDefaultPrevented()) { + continue; + } // If this is a touch-enabled device we remove the extra + // empty mouseover listeners we added for iOS support + + + if ('ontouchstart' in document.documentElement) { + $$$1(document.body).children().off('mouseover', null, $$$1.noop); + } + + toggles[i].setAttribute('aria-expanded', 'false'); + $$$1(dropdownMenu).removeClass(ClassName.SHOW); + $$$1(parent).removeClass(ClassName.SHOW).trigger($$$1.Event(Event.HIDDEN, relatedTarget)); + } + }; + + Dropdown._getParentFromElement = function _getParentFromElement(element) { + var parent; + var selector = Util.getSelectorFromElement(element); + + if (selector) { + parent = $$$1(selector)[0]; + } + + return parent || element.parentNode; + }; // eslint-disable-next-line complexity + + + Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { + // If not input/textarea: + // - And not a key in REGEXP_KEYDOWN => not a dropdown command + // If input/textarea: + // - If space key => not a dropdown command + // - If key is other than escape + // - If key is not up or down => not a dropdown command + // - If trigger inside the menu => not a dropdown command + if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $$$1(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { + return; + } + + event.preventDefault(); + event.stopPropagation(); + + if (this.disabled || $$$1(this).hasClass(ClassName.DISABLED)) { + return; + } + + var parent = Dropdown._getParentFromElement(this); + + var isActive = $$$1(parent).hasClass(ClassName.SHOW); + + if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { + if (event.which === ESCAPE_KEYCODE) { + var toggle = $$$1(parent).find(Selector.DATA_TOGGLE)[0]; + $$$1(toggle).trigger('focus'); + } + + $$$1(this).trigger('click'); + return; + } + + var items = $$$1(parent).find(Selector.VISIBLE_ITEMS).get(); + + if (items.length === 0) { + return; + } + + var index = items.indexOf(event.target); + + if (event.which === ARROW_UP_KEYCODE && index > 0) { + // Up + index--; + } + + if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { + // Down + index++; + } + + if (index < 0) { + index = 0; + } + + items[index].focus(); + }; + + _createClass(Dropdown, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType; + } + }]); + + return Dropdown; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + + $$$1(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + event.preventDefault(); + event.stopPropagation(); + + Dropdown._jQueryInterface.call($$$1(this), 'toggle'); + }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { + e.stopPropagation(); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $$$1.fn[NAME] = Dropdown._jQueryInterface; + $$$1.fn[NAME].Constructor = Dropdown; + + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; + return Dropdown._jQueryInterface; + }; + + return Dropdown; + }($, Popper); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): modal.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Modal = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'modal'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.modal'; + var EVENT_KEY = "." + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key + + var Default = { + backdrop: true, + keyboard: true, + focus: true, + show: true + }; + var DefaultType = { + backdrop: '(boolean|string)', + keyboard: 'boolean', + focus: 'boolean', + show: 'boolean' + }; + var Event = { + HIDE: "hide" + EVENT_KEY, + HIDDEN: "hidden" + EVENT_KEY, + SHOW: "show" + EVENT_KEY, + SHOWN: "shown" + EVENT_KEY, + FOCUSIN: "focusin" + EVENT_KEY, + RESIZE: "resize" + EVENT_KEY, + CLICK_DISMISS: "click.dismiss" + EVENT_KEY, + KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY, + MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY, + MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY, + CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY + }; + var ClassName = { + SCROLLBAR_MEASURER: 'modal-scrollbar-measure', + BACKDROP: 'modal-backdrop', + OPEN: 'modal-open', + FADE: 'fade', + SHOW: 'show' + }; + var Selector = { + DIALOG: '.modal-dialog', + DATA_TOGGLE: '[data-toggle="modal"]', + DATA_DISMISS: '[data-dismiss="modal"]', + FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', + STICKY_CONTENT: '.sticky-top', + NAVBAR_TOGGLER: '.navbar-toggler' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var Modal = + /*#__PURE__*/ + function () { + function Modal(element, config) { + this._config = this._getConfig(config); + this._element = element; + this._dialog = $$$1(element).find(Selector.DIALOG)[0]; + this._backdrop = null; + this._isShown = false; + this._isBodyOverflowing = false; + this._ignoreBackdropClick = false; + this._scrollbarWidth = 0; + } // Getters + + + var _proto = Modal.prototype; + + // Public + _proto.toggle = function toggle(relatedTarget) { + return this._isShown ? this.hide() : this.show(relatedTarget); + }; + + _proto.show = function show(relatedTarget) { + var _this = this; + + if (this._isTransitioning || this._isShown) { + return; + } + + if ($$$1(this._element).hasClass(ClassName.FADE)) { + this._isTransitioning = true; + } + + var showEvent = $$$1.Event(Event.SHOW, { + relatedTarget: relatedTarget + }); + $$$1(this._element).trigger(showEvent); + + if (this._isShown || showEvent.isDefaultPrevented()) { + return; + } + + this._isShown = true; + + this._checkScrollbar(); + + this._setScrollbar(); + + this._adjustDialog(); + + $$$1(document.body).addClass(ClassName.OPEN); + + this._setEscapeEvent(); + + this._setResizeEvent(); + + $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { + return _this.hide(event); + }); + $$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { + $$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { + if ($$$1(event.target).is(_this._element)) { + _this._ignoreBackdropClick = true; + } + }); + }); + + this._showBackdrop(function () { + return _this._showElement(relatedTarget); + }); + }; + + _proto.hide = function hide(event) { + var _this2 = this; + + if (event) { + event.preventDefault(); + } + + if (this._isTransitioning || !this._isShown) { + return; + } + + var hideEvent = $$$1.Event(Event.HIDE); + $$$1(this._element).trigger(hideEvent); + + if (!this._isShown || hideEvent.isDefaultPrevented()) { + return; + } + + this._isShown = false; + var transition = $$$1(this._element).hasClass(ClassName.FADE); + + if (transition) { + this._isTransitioning = true; + } + + this._setEscapeEvent(); + + this._setResizeEvent(); + + $$$1(document).off(Event.FOCUSIN); + $$$1(this._element).removeClass(ClassName.SHOW); + $$$1(this._element).off(Event.CLICK_DISMISS); + $$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS); + + if (transition) { + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $$$1(this._element).one(Util.TRANSITION_END, function (event) { + return _this2._hideModal(event); + }).emulateTransitionEnd(transitionDuration); + } else { + this._hideModal(); + } + }; + + _proto.dispose = function dispose() { + $$$1.removeData(this._element, DATA_KEY); + $$$1(window, document, this._element, this._backdrop).off(EVENT_KEY); + this._config = null; + this._element = null; + this._dialog = null; + this._backdrop = null; + this._isShown = null; + this._isBodyOverflowing = null; + this._ignoreBackdropClick = null; + this._scrollbarWidth = null; + }; + + _proto.handleUpdate = function handleUpdate() { + this._adjustDialog(); + }; // Private + + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default, config); + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + }; + + _proto._showElement = function _showElement(relatedTarget) { + var _this3 = this; + + var transition = $$$1(this._element).hasClass(ClassName.FADE); + + if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { + // Don't move modal's DOM position + document.body.appendChild(this._element); + } + + this._element.style.display = 'block'; + + this._element.removeAttribute('aria-hidden'); + + this._element.scrollTop = 0; + + if (transition) { + Util.reflow(this._element); + } + + $$$1(this._element).addClass(ClassName.SHOW); + + if (this._config.focus) { + this._enforceFocus(); + } + + var shownEvent = $$$1.Event(Event.SHOWN, { + relatedTarget: relatedTarget + }); + + var transitionComplete = function transitionComplete() { + if (_this3._config.focus) { + _this3._element.focus(); + } + + _this3._isTransitioning = false; + $$$1(_this3._element).trigger(shownEvent); + }; + + if (transition) { + var transitionDuration = Util.getTransitionDurationFromElement(this._element); + $$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); + } else { + transitionComplete(); + } + }; + + _proto._enforceFocus = function _enforceFocus() { + var _this4 = this; + + $$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop + .on(Event.FOCUSIN, function (event) { + if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) { + _this4._element.focus(); + } + }); + }; + + _proto._setEscapeEvent = function _setEscapeEvent() { + var _this5 = this; + + if (this._isShown && this._config.keyboard) { + $$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event) { + if (event.which === ESCAPE_KEYCODE) { + event.preventDefault(); + + _this5.hide(); + } + }); + } else if (!this._isShown) { + $$$1(this._element).off(Event.KEYDOWN_DISMISS); + } + }; + + _proto._setResizeEvent = function _setResizeEvent() { + var _this6 = this; + + if (this._isShown) { + $$$1(window).on(Event.RESIZE, function (event) { + return _this6.handleUpdate(event); + }); + } else { + $$$1(window).off(Event.RESIZE); + } + }; + + _proto._hideModal = function _hideModal() { + var _this7 = this; + + this._element.style.display = 'none'; + + this._element.setAttribute('aria-hidden', true); + + this._isTransitioning = false; + + this._showBackdrop(function () { + $$$1(document.body).removeClass(ClassName.OPEN); + + _this7._resetAdjustments(); + + _this7._resetScrollbar(); + + $$$1(_this7._element).trigger(Event.HIDDEN); + }); + }; + + _proto._removeBackdrop = function _removeBackdrop() { + if (this._backdrop) { + $$$1(this._backdrop).remove(); + this._backdrop = null; + } + }; + + _proto._showBackdrop = function _showBackdrop(callback) { + var _this8 = this; + + var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; + + if (this._isShown && this._config.backdrop) { + this._backdrop = document.createElement('div'); + this._backdrop.className = ClassName.BACKDROP; + + if (animate) { + $$$1(this._backdrop).addClass(animate); + } + + $$$1(this._backdrop).appendTo(document.body); + $$$1(this._element).on(Event.CLICK_DISMISS, function (event) { + if (_this8._ignoreBackdropClick) { + _this8._ignoreBackdropClick = false; + return; + } + + if (event.target !== event.currentTarget) { + return; + } + + if (_this8._config.backdrop === 'static') { + _this8._element.focus(); + } else { + _this8.hide(); + } + }); + + if (animate) { + Util.reflow(this._backdrop); + } + + $$$1(this._backdrop).addClass(ClassName.SHOW); + + if (!callback) { + return; + } + + if (!animate) { + callback(); + return; + } + + var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); + $$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); + } else if (!this._isShown && this._backdrop) { + $$$1(this._backdrop).removeClass(ClassName.SHOW); + + var callbackRemove = function callbackRemove() { + _this8._removeBackdrop(); + + if (callback) { + callback(); + } + }; + + if ($$$1(this._element).hasClass(ClassName.FADE)) { + var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); + + $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); + } else { + callbackRemove(); + } + } else if (callback) { + callback(); + } + }; // ---------------------------------------------------------------------- + // the following methods are used to handle overflowing modals + // todo (fat): these should probably be refactored out of modal.js + // ---------------------------------------------------------------------- + + + _proto._adjustDialog = function _adjustDialog() { + var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; + + if (!this._isBodyOverflowing && isModalOverflowing) { + this._element.style.paddingLeft = this._scrollbarWidth + "px"; + } + + if (this._isBodyOverflowing && !isModalOverflowing) { + this._element.style.paddingRight = this._scrollbarWidth + "px"; + } + }; + + _proto._resetAdjustments = function _resetAdjustments() { + this._element.style.paddingLeft = ''; + this._element.style.paddingRight = ''; + }; + + _proto._checkScrollbar = function _checkScrollbar() { + var rect = document.body.getBoundingClientRect(); + this._isBodyOverflowing = rect.left + rect.right < window.innerWidth; + this._scrollbarWidth = this._getScrollbarWidth(); + }; + + _proto._setScrollbar = function _setScrollbar() { + var _this9 = this; + + if (this._isBodyOverflowing) { + // Note: DOMNode.style.paddingRight returns the actual value or '' if not set + // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set + // Adjust fixed content padding + $$$1(Selector.FIXED_CONTENT).each(function (index, element) { + var actualPadding = $$$1(element)[0].style.paddingRight; + var calculatedPadding = $$$1(element).css('padding-right'); + $$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); + }); // Adjust sticky content margin + + $$$1(Selector.STICKY_CONTENT).each(function (index, element) { + var actualMargin = $$$1(element)[0].style.marginRight; + var calculatedMargin = $$$1(element).css('margin-right'); + $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); + }); // Adjust navbar-toggler margin + + $$$1(Selector.NAVBAR_TOGGLER).each(function (index, element) { + var actualMargin = $$$1(element)[0].style.marginRight; + var calculatedMargin = $$$1(element).css('margin-right'); + $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px"); + }); // Adjust body padding + + var actualPadding = document.body.style.paddingRight; + var calculatedPadding = $$$1(document.body).css('padding-right'); + $$$1(document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); + } + }; + + _proto._resetScrollbar = function _resetScrollbar() { + // Restore fixed content padding + $$$1(Selector.FIXED_CONTENT).each(function (index, element) { + var padding = $$$1(element).data('padding-right'); + + if (typeof padding !== 'undefined') { + $$$1(element).css('padding-right', padding).removeData('padding-right'); + } + }); // Restore sticky content and navbar-toggler margin + + $$$1(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) { + var margin = $$$1(element).data('margin-right'); + + if (typeof margin !== 'undefined') { + $$$1(element).css('margin-right', margin).removeData('margin-right'); + } + }); // Restore body padding + + var padding = $$$1(document.body).data('padding-right'); + + if (typeof padding !== 'undefined') { + $$$1(document.body).css('padding-right', padding).removeData('padding-right'); + } + }; + + _proto._getScrollbarWidth = function _getScrollbarWidth() { + // thx d.walsh + var scrollDiv = document.createElement('div'); + scrollDiv.className = ClassName.SCROLLBAR_MEASURER; + document.body.appendChild(scrollDiv); + var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; + document.body.removeChild(scrollDiv); + return scrollbarWidth; + }; // Static + + + Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { + return this.each(function () { + var data = $$$1(this).data(DATA_KEY); + + var _config = _objectSpread({}, Modal.Default, $$$1(this).data(), typeof config === 'object' && config); + + if (!data) { + data = new Modal(this, _config); + $$$1(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } + + data[config](relatedTarget); + } else if (_config.show) { + data.show(relatedTarget); + } + }); + }; + + _createClass(Modal, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }]); + + return Modal; + }(); + /** + * ------------------------------------------------------------------------ + * Data Api implementation + * ------------------------------------------------------------------------ + */ + + + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + var _this10 = this; + + var target; + var selector = Util.getSelectorFromElement(this); + + if (selector) { + target = $$$1(selector)[0]; + } + + var config = $$$1(target).data(DATA_KEY) ? 'toggle' : _objectSpread({}, $$$1(target).data(), $$$1(this).data()); + + if (this.tagName === 'A' || this.tagName === 'AREA') { + event.preventDefault(); + } + + var $target = $$$1(target).one(Event.SHOW, function (showEvent) { + if (showEvent.isDefaultPrevented()) { + // Only register focus restorer if modal will actually get shown + return; + } + + $target.one(Event.HIDDEN, function () { + if ($$$1(_this10).is(':visible')) { + _this10.focus(); + } + }); + }); + + Modal._jQueryInterface.call($$$1(target), config, this); + }); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + $$$1.fn[NAME] = Modal._jQueryInterface; + $$$1.fn[NAME].Constructor = Modal; + + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; + return Modal._jQueryInterface; + }; + + return Modal; + }($); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): tooltip.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Tooltip = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'tooltip'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.tooltip'; + var EVENT_KEY = "." + DATA_KEY; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var CLASS_PREFIX = 'bs-tooltip'; + var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); + var DefaultType = { + animation: 'boolean', + template: 'string', + title: '(string|element|function)', + trigger: 'string', + delay: '(number|object)', + html: 'boolean', + selector: '(string|boolean)', + placement: '(string|function)', + offset: '(number|string)', + container: '(string|element|boolean)', + fallbackPlacement: '(string|array)', + boundary: '(string|element)' + }; + var AttachmentMap = { + AUTO: 'auto', + TOP: 'top', + RIGHT: 'right', + BOTTOM: 'bottom', + LEFT: 'left' + }; + var Default = { + animation: true, + template: '', + trigger: 'hover focus', + title: '', + delay: 0, + html: false, + selector: false, + placement: 'top', + offset: 0, + container: false, + fallbackPlacement: 'flip', + boundary: 'scrollParent' + }; + var HoverState = { + SHOW: 'show', + OUT: 'out' + }; + var Event = { + HIDE: "hide" + EVENT_KEY, + HIDDEN: "hidden" + EVENT_KEY, + SHOW: "show" + EVENT_KEY, + SHOWN: "shown" + EVENT_KEY, + INSERTED: "inserted" + EVENT_KEY, + CLICK: "click" + EVENT_KEY, + FOCUSIN: "focusin" + EVENT_KEY, + FOCUSOUT: "focusout" + EVENT_KEY, + MOUSEENTER: "mouseenter" + EVENT_KEY, + MOUSELEAVE: "mouseleave" + EVENT_KEY + }; + var ClassName = { + FADE: 'fade', + SHOW: 'show' + }; + var Selector = { + TOOLTIP: '.tooltip', + TOOLTIP_INNER: '.tooltip-inner', + ARROW: '.arrow' + }; + var Trigger = { + HOVER: 'hover', + FOCUS: 'focus', + CLICK: 'click', + MANUAL: 'manual' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var Tooltip = + /*#__PURE__*/ + function () { + function Tooltip(element, config) { + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)'); + } // private + + + this._isEnabled = true; + this._timeout = 0; + this._hoverState = ''; + this._activeTrigger = {}; + this._popper = null; // Protected + + this.element = element; + this.config = this._getConfig(config); + this.tip = null; + + this._setListeners(); + } // Getters + + + var _proto = Tooltip.prototype; + + // Public + _proto.enable = function enable() { + this._isEnabled = true; + }; + + _proto.disable = function disable() { + this._isEnabled = false; + }; + + _proto.toggleEnabled = function toggleEnabled() { + this._isEnabled = !this._isEnabled; + }; + + _proto.toggle = function toggle(event) { + if (!this._isEnabled) { + return; + } + + if (event) { + var dataKey = this.constructor.DATA_KEY; + var context = $$$1(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $$$1(event.currentTarget).data(dataKey, context); + } + + context._activeTrigger.click = !context._activeTrigger.click; + + if (context._isWithActiveTrigger()) { + context._enter(null, context); + } else { + context._leave(null, context); + } + } else { + if ($$$1(this.getTipElement()).hasClass(ClassName.SHOW)) { + this._leave(null, this); + + return; + } + + this._enter(null, this); + } + }; + + _proto.dispose = function dispose() { + clearTimeout(this._timeout); + $$$1.removeData(this.element, this.constructor.DATA_KEY); + $$$1(this.element).off(this.constructor.EVENT_KEY); + $$$1(this.element).closest('.modal').off('hide.bs.modal'); + + if (this.tip) { + $$$1(this.tip).remove(); + } + + this._isEnabled = null; + this._timeout = null; + this._hoverState = null; + this._activeTrigger = null; + + if (this._popper !== null) { + this._popper.destroy(); + } + + this._popper = null; + this.element = null; + this.config = null; + this.tip = null; + }; + + _proto.show = function show() { + var _this = this; + + if ($$$1(this.element).css('display') === 'none') { + throw new Error('Please use show on visible elements'); + } + + var showEvent = $$$1.Event(this.constructor.Event.SHOW); + + if (this.isWithContent() && this._isEnabled) { + $$$1(this.element).trigger(showEvent); + var isInTheDom = $$$1.contains(this.element.ownerDocument.documentElement, this.element); + + if (showEvent.isDefaultPrevented() || !isInTheDom) { + return; + } + + var tip = this.getTipElement(); + var tipId = Util.getUID(this.constructor.NAME); + tip.setAttribute('id', tipId); + this.element.setAttribute('aria-describedby', tipId); + this.setContent(); + + if (this.config.animation) { + $$$1(tip).addClass(ClassName.FADE); + } + + var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; + + var attachment = this._getAttachment(placement); + + this.addAttachmentClass(attachment); + var container = this.config.container === false ? document.body : $$$1(this.config.container); + $$$1(tip).data(this.constructor.DATA_KEY, this); + + if (!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)) { + $$$1(tip).appendTo(container); + } + + $$$1(this.element).trigger(this.constructor.Event.INSERTED); + this._popper = new Popper(this.element, tip, { + placement: attachment, + modifiers: { + offset: { + offset: this.config.offset + }, + flip: { + behavior: this.config.fallbackPlacement + }, + arrow: { + element: Selector.ARROW + }, + preventOverflow: { + boundariesElement: this.config.boundary + } + }, + onCreate: function onCreate(data) { + if (data.originalPlacement !== data.placement) { + _this._handlePopperPlacementChange(data); + } + }, + onUpdate: function onUpdate(data) { + _this._handlePopperPlacementChange(data); + } + }); + $$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra + // empty mouseover listeners to the body's immediate children; + // only needed because of broken event delegation on iOS + // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html + + if ('ontouchstart' in document.documentElement) { + $$$1(document.body).children().on('mouseover', null, $$$1.noop); + } + + var complete = function complete() { + if (_this.config.animation) { + _this._fixTransition(); + } + + var prevHoverState = _this._hoverState; + _this._hoverState = null; + $$$1(_this.element).trigger(_this.constructor.Event.SHOWN); + + if (prevHoverState === HoverState.OUT) { + _this._leave(null, _this); + } + }; + + if ($$$1(this.tip).hasClass(ClassName.FADE)) { + var transitionDuration = Util.getTransitionDurationFromElement(this.tip); + $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + } else { + complete(); + } + } + }; + + _proto.hide = function hide(callback) { + var _this2 = this; + + var tip = this.getTipElement(); + var hideEvent = $$$1.Event(this.constructor.Event.HIDE); + + var complete = function complete() { + if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { + tip.parentNode.removeChild(tip); + } + + _this2._cleanTipClass(); + + _this2.element.removeAttribute('aria-describedby'); + + $$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN); + + if (_this2._popper !== null) { + _this2._popper.destroy(); + } + + if (callback) { + callback(); + } + }; + + $$$1(this.element).trigger(hideEvent); + + if (hideEvent.isDefaultPrevented()) { + return; + } + + $$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra + // empty mouseover listeners we added for iOS support + + if ('ontouchstart' in document.documentElement) { + $$$1(document.body).children().off('mouseover', null, $$$1.noop); + } + + this._activeTrigger[Trigger.CLICK] = false; + this._activeTrigger[Trigger.FOCUS] = false; + this._activeTrigger[Trigger.HOVER] = false; + + if ($$$1(this.tip).hasClass(ClassName.FADE)) { + var transitionDuration = Util.getTransitionDurationFromElement(tip); + $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); + } else { + complete(); + } + + this._hoverState = ''; + }; + + _proto.update = function update() { + if (this._popper !== null) { + this._popper.scheduleUpdate(); + } + }; // Protected + + + _proto.isWithContent = function isWithContent() { + return Boolean(this.getTitle()); + }; + + _proto.addAttachmentClass = function addAttachmentClass(attachment) { + $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); + }; + + _proto.getTipElement = function getTipElement() { + this.tip = this.tip || $$$1(this.config.template)[0]; + return this.tip; + }; + + _proto.setContent = function setContent() { + var $tip = $$$1(this.getTipElement()); + this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); + $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); + }; + + _proto.setElementContent = function setElementContent($element, content) { + var html = this.config.html; + + if (typeof content === 'object' && (content.nodeType || content.jquery)) { + // Content is a DOM node or a jQuery + if (html) { + if (!$$$1(content).parent().is($element)) { + $element.empty().append(content); + } + } else { + $element.text($$$1(content).text()); + } + } else { + $element[html ? 'html' : 'text'](content); + } + }; + + _proto.getTitle = function getTitle() { + var title = this.element.getAttribute('data-original-title'); + + if (!title) { + title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; + } + + return title; + }; // Private + + + _proto._getAttachment = function _getAttachment(placement) { + return AttachmentMap[placement.toUpperCase()]; + }; + + _proto._setListeners = function _setListeners() { + var _this3 = this; + + var triggers = this.config.trigger.split(' '); + triggers.forEach(function (trigger) { + if (trigger === 'click') { + $$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { + return _this3.toggle(event); + }); + } else if (trigger !== Trigger.MANUAL) { + var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; + var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; + $$$1(_this3.element).on(eventIn, _this3.config.selector, function (event) { + return _this3._enter(event); + }).on(eventOut, _this3.config.selector, function (event) { + return _this3._leave(event); + }); + } + + $$$1(_this3.element).closest('.modal').on('hide.bs.modal', function () { + return _this3.hide(); + }); + }); + + if (this.config.selector) { + this.config = _objectSpread({}, this.config, { + trigger: 'manual', + selector: '' + }); + } else { + this._fixTitle(); + } + }; + + _proto._fixTitle = function _fixTitle() { + var titleType = typeof this.element.getAttribute('data-original-title'); + + if (this.element.getAttribute('title') || titleType !== 'string') { + this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); + this.element.setAttribute('title', ''); + } + }; + + _proto._enter = function _enter(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || $$$1(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $$$1(event.currentTarget).data(dataKey, context); + } + + if (event) { + context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; + } + + if ($$$1(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { + context._hoverState = HoverState.SHOW; + return; + } + + clearTimeout(context._timeout); + context._hoverState = HoverState.SHOW; + + if (!context.config.delay || !context.config.delay.show) { + context.show(); + return; + } + + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.SHOW) { + context.show(); + } + }, context.config.delay.show); + }; + + _proto._leave = function _leave(event, context) { + var dataKey = this.constructor.DATA_KEY; + context = context || $$$1(event.currentTarget).data(dataKey); + + if (!context) { + context = new this.constructor(event.currentTarget, this._getDelegateConfig()); + $$$1(event.currentTarget).data(dataKey, context); + } + + if (event) { + context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; + } + + if (context._isWithActiveTrigger()) { + return; + } + + clearTimeout(context._timeout); + context._hoverState = HoverState.OUT; + + if (!context.config.delay || !context.config.delay.hide) { + context.hide(); + return; + } + + context._timeout = setTimeout(function () { + if (context._hoverState === HoverState.OUT) { + context.hide(); + } + }, context.config.delay.hide); + }; + + _proto._isWithActiveTrigger = function _isWithActiveTrigger() { + for (var trigger in this._activeTrigger) { + if (this._activeTrigger[trigger]) { + return true; + } + } + + return false; + }; + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, this.constructor.Default, $$$1(this.element).data(), config); + + if (typeof config.delay === 'number') { + config.delay = { + show: config.delay, + hide: config.delay + }; + } + + if (typeof config.title === 'number') { + config.title = config.title.toString(); + } + + if (typeof config.content === 'number') { + config.content = config.content.toString(); + } + + Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); + return config; + }; + + _proto._getDelegateConfig = function _getDelegateConfig() { + var config = {}; + + if (this.config) { + for (var key in this.config) { + if (this.constructor.Default[key] !== this.config[key]) { + config[key] = this.config[key]; + } + } + } + + return config; + }; + + _proto._cleanTipClass = function _cleanTipClass() { + var $tip = $$$1(this.getTipElement()); + var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); + + if (tabClass !== null && tabClass.length > 0) { + $tip.removeClass(tabClass.join('')); + } + }; + + _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(data) { + this._cleanTipClass(); + + this.addAttachmentClass(this._getAttachment(data.placement)); + }; + + _proto._fixTransition = function _fixTransition() { + var tip = this.getTipElement(); + var initConfigAnimation = this.config.animation; + + if (tip.getAttribute('x-placement') !== null) { + return; + } + + $$$1(tip).removeClass(ClassName.FADE); + this.config.animation = false; + this.hide(); + this.show(); + this.config.animation = initConfigAnimation; + }; // Static + + + Tooltip._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $$$1(this).data(DATA_KEY); + + var _config = typeof config === 'object' && config; + + if (!data && /dispose|hide/.test(config)) { + return; + } + + if (!data) { + data = new Tooltip(this, _config); + $$$1(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } + + data[config](); + } + }); + }; + + _createClass(Tooltip, null, [{ + key: "VERSION", + get: function get() { + return VERSION; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }, { + key: "NAME", + get: function get() { + return NAME; + } + }, { + key: "DATA_KEY", + get: function get() { + return DATA_KEY; + } + }, { + key: "Event", + get: function get() { + return Event; + } + }, { + key: "EVENT_KEY", + get: function get() { + return EVENT_KEY; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType; + } + }]); + + return Tooltip; + }(); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + + $$$1.fn[NAME] = Tooltip._jQueryInterface; + $$$1.fn[NAME].Constructor = Tooltip; + + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; + return Tooltip._jQueryInterface; + }; + + return Tooltip; + }($, Popper); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): popover.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var Popover = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'popover'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.popover'; + var EVENT_KEY = "." + DATA_KEY; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var CLASS_PREFIX = 'bs-popover'; + var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); + + var Default = _objectSpread({}, Tooltip.Default, { + placement: 'right', + trigger: 'click', + content: '', + template: '' + }); + + var DefaultType = _objectSpread({}, Tooltip.DefaultType, { + content: '(string|element|function)' + }); + + var ClassName = { + FADE: 'fade', + SHOW: 'show' + }; + var Selector = { + TITLE: '.popover-header', + CONTENT: '.popover-body' + }; + var Event = { + HIDE: "hide" + EVENT_KEY, + HIDDEN: "hidden" + EVENT_KEY, + SHOW: "show" + EVENT_KEY, + SHOWN: "shown" + EVENT_KEY, + INSERTED: "inserted" + EVENT_KEY, + CLICK: "click" + EVENT_KEY, + FOCUSIN: "focusin" + EVENT_KEY, + FOCUSOUT: "focusout" + EVENT_KEY, + MOUSEENTER: "mouseenter" + EVENT_KEY, + MOUSELEAVE: "mouseleave" + EVENT_KEY + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var Popover = + /*#__PURE__*/ + function (_Tooltip) { + _inheritsLoose(Popover, _Tooltip); + + function Popover() { + return _Tooltip.apply(this, arguments) || this; + } + + var _proto = Popover.prototype; + + // Overrides + _proto.isWithContent = function isWithContent() { + return this.getTitle() || this._getContent(); + }; + + _proto.addAttachmentClass = function addAttachmentClass(attachment) { + $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); + }; + + _proto.getTipElement = function getTipElement() { + this.tip = this.tip || $$$1(this.config.template)[0]; + return this.tip; + }; + + _proto.setContent = function setContent() { + var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events + + this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); + + var content = this._getContent(); + + if (typeof content === 'function') { + content = content.call(this.element); + } + + this.setElementContent($tip.find(Selector.CONTENT), content); + $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); + }; // Private + + + _proto._getContent = function _getContent() { + return this.element.getAttribute('data-content') || this.config.content; + }; + + _proto._cleanTipClass = function _cleanTipClass() { + var $tip = $$$1(this.getTipElement()); + var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); + + if (tabClass !== null && tabClass.length > 0) { + $tip.removeClass(tabClass.join('')); + } + }; // Static + + + Popover._jQueryInterface = function _jQueryInterface(config) { + return this.each(function () { + var data = $$$1(this).data(DATA_KEY); + + var _config = typeof config === 'object' ? config : null; + + if (!data && /destroy|hide/.test(config)) { + return; + } + + if (!data) { + data = new Popover(this, _config); + $$$1(this).data(DATA_KEY, data); + } + + if (typeof config === 'string') { + if (typeof data[config] === 'undefined') { + throw new TypeError("No method named \"" + config + "\""); + } + + data[config](); + } + }); + }; + + _createClass(Popover, null, [{ + key: "VERSION", + // Getters + get: function get() { + return VERSION; + } + }, { + key: "Default", + get: function get() { + return Default; + } + }, { + key: "NAME", + get: function get() { + return NAME; + } + }, { + key: "DATA_KEY", + get: function get() { + return DATA_KEY; + } + }, { + key: "Event", + get: function get() { + return Event; + } + }, { + key: "EVENT_KEY", + get: function get() { + return EVENT_KEY; + } + }, { + key: "DefaultType", + get: function get() { + return DefaultType; + } + }]); + + return Popover; + }(Tooltip); + /** + * ------------------------------------------------------------------------ + * jQuery + * ------------------------------------------------------------------------ + */ + + + $$$1.fn[NAME] = Popover._jQueryInterface; + $$$1.fn[NAME].Constructor = Popover; + + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; + return Popover._jQueryInterface; + }; + + return Popover; + }($); + + /** + * -------------------------------------------------------------------------- + * Bootstrap (v4.1.0): scrollspy.js + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * -------------------------------------------------------------------------- + */ + + var ScrollSpy = function ($$$1) { + /** + * ------------------------------------------------------------------------ + * Constants + * ------------------------------------------------------------------------ + */ + var NAME = 'scrollspy'; + var VERSION = '4.1.0'; + var DATA_KEY = 'bs.scrollspy'; + var EVENT_KEY = "." + DATA_KEY; + var DATA_API_KEY = '.data-api'; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; + var Default = { + offset: 10, + method: 'auto', + target: '' + }; + var DefaultType = { + offset: 'number', + method: 'string', + target: '(string|element)' + }; + var Event = { + ACTIVATE: "activate" + EVENT_KEY, + SCROLL: "scroll" + EVENT_KEY, + LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY + }; + var ClassName = { + DROPDOWN_ITEM: 'dropdown-item', + DROPDOWN_MENU: 'dropdown-menu', + ACTIVE: 'active' + }; + var Selector = { + DATA_SPY: '[data-spy="scroll"]', + ACTIVE: '.active', + NAV_LIST_GROUP: '.nav, .list-group', + NAV_LINKS: '.nav-link', + NAV_ITEMS: '.nav-item', + LIST_ITEMS: '.list-group-item', + DROPDOWN: '.dropdown', + DROPDOWN_ITEMS: '.dropdown-item', + DROPDOWN_TOGGLE: '.dropdown-toggle' + }; + var OffsetMethod = { + OFFSET: 'offset', + POSITION: 'position' + /** + * ------------------------------------------------------------------------ + * Class Definition + * ------------------------------------------------------------------------ + */ + + }; + + var ScrollSpy = + /*#__PURE__*/ + function () { + function ScrollSpy(element, config) { + var _this = this; + + this._element = element; + this._scrollElement = element.tagName === 'BODY' ? window : element; + this._config = this._getConfig(config); + this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " " + Selector.DROPDOWN_ITEMS); + this._offsets = []; + this._targets = []; + this._activeTarget = null; + this._scrollHeight = 0; + $$$1(this._scrollElement).on(Event.SCROLL, function (event) { + return _this._process(event); + }); + this.refresh(); + + this._process(); + } // Getters + + + var _proto = ScrollSpy.prototype; + + // Public + _proto.refresh = function refresh() { + var _this2 = this; + + var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; + var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; + var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; + this._offsets = []; + this._targets = []; + this._scrollHeight = this._getScrollHeight(); + var targets = $$$1.makeArray($$$1(this._selector)); + targets.map(function (element) { + var target; + var targetSelector = Util.getSelectorFromElement(element); + + if (targetSelector) { + target = $$$1(targetSelector)[0]; + } + + if (target) { + var targetBCR = target.getBoundingClientRect(); + + if (targetBCR.width || targetBCR.height) { + // TODO (fat): remove sketch reliance on jQuery position/offset + return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector]; + } + } + + return null; + }).filter(function (item) { + return item; + }).sort(function (a, b) { + return a[0] - b[0]; + }).forEach(function (item) { + _this2._offsets.push(item[0]); + + _this2._targets.push(item[1]); + }); + }; + + _proto.dispose = function dispose() { + $$$1.removeData(this._element, DATA_KEY); + $$$1(this._scrollElement).off(EVENT_KEY); + this._element = null; + this._scrollElement = null; + this._config = null; + this._selector = null; + this._offsets = null; + this._targets = null; + this._activeTarget = null; + this._scrollHeight = null; + }; // Private + + + _proto._getConfig = function _getConfig(config) { + config = _objectSpread({}, Default, config); + + if (typeof config.target !== 'string') { + var id = $$$1(config.target).attr('id'); + + if (!id) { + id = Util.getUID(NAME); + $$$1(config.target).attr('id', id); + } + + config.target = "#" + id; + } + + Util.typeCheckConfig(NAME, config, DefaultType); + return config; + }; + + _proto._getScrollTop = function _getScrollTop() { + return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; + }; + + _proto._getScrollHeight = function _getScrollHeight() { + return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); + }; + + _proto._getOffsetHeight = function _getOffsetHeight() { + return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; + }; + + _proto._process = function _process() { + var scrollTop = this._getScrollTop() + this._config.offset; + + var scrollHeight = this._getScrollHeight(); + + var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); + + if (this._scrollHeight !== scrollHeight) { + this.refresh(); + } + + if (scrollTop >= maxScroll) { + var target = this._targets[this._targets.length - 1]; + + if (this._activeTarget !== target) { + this._activate(target); + } + + return; + } + + if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { + this._activeTarget = null; + + this._clear(); + + return; + } + + for (var i = this._offsets.length; i--;) { + var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); + + if (isActiveTarget) { + this._activate(this._targets[i]); + } + } + }; + + _proto._activate = function _activate(target) { + this._activeTarget = target; + + this._clear(); + + var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style + + + queries = queries.map(function (selector) { + return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]"); + }); + var $link = $$$1(queries.join(',')); + + if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { + $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); + $link.addClass(ClassName.ACTIVE); + } else { + // Set triggered link as active + $link.addClass(ClassName.ACTIVE); // Set triggered links parents as active + // With both