hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7344a62c8a6ed88e3129da80f8ea4550a33bd0dd | 3,175 | js | JavaScript | webpack.config.js | Saionaro/dayscalc | d0f3d09fc8ca51bf5a3caf5bc6c1951a8b4a2d98 | [
"MIT"
] | null | null | null | webpack.config.js | Saionaro/dayscalc | d0f3d09fc8ca51bf5a3caf5bc6c1951a8b4a2d98 | [
"MIT"
] | 9 | 2018-09-03T00:48:18.000Z | 2018-10-25T09:03:16.000Z | webpack.config.js | Saionaro/dayscalc | d0f3d09fc8ca51bf5a3caf5bc6c1951a8b4a2d98 | [
"MIT"
] | null | null | null | const Webpack = require('webpack'),
ExtractTextPlugin = require('extract-text-webpack-plugin'),
NODE_ENV = process.env.NODE_ENV || 'development',
isDev = NODE_ENV === 'development',
CleanWebpackPlugin = require('clean-webpack-plugin'),
Path = require('path'),
FileSystem = require('fs'),
critical = require('critical');
const pathsToClean = [
'dist'
];
const cleanOptions = {
exclude: ['manifest.json', 'icons'],
};
module.exports = {
mode: isDev ? 'development' : 'production',
optimization: {
namedModules: true,
minimize: true,
noEmitOnErrors: true,
concatenateModules: true
},
entry: {
app: ['./src/index.js'],
datepicker: ['air-datepicker'],
},
output: {
path: __dirname + '/dist',
publicPath: '/dist/',
filename: isDev ? '[name].bundle.js' : '[name].bundle.[hash].js',
library: '[name]',
libraryTarget: 'var'
},
externals: {
'jquery': 'jQuery'
},
resolve: {
extensions: ['.js', '.less']
},
watch: isDev,
devtool: isDev ? 'sheap-inline-module-source-map' : false,
plugins: [
new CleanWebpackPlugin(pathsToClean, cleanOptions),
new ExtractTextPlugin({
filename: isDev ? 'styles.css' : 'styles.[hash].css',
allChunks: true
}),
new Webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify(NODE_ENV)
}
}),
function() {
this.plugin('done', statsData => {
let stats = statsData.toJson(),
htmlOutput;
if (!stats.errors.length) {
let htmlFileName = 'index.html',
htmlOutput = FileSystem.readFileSync (
Path.join(__dirname, 'src/' + htmlFileName),
'utf8'
);
if (!isDev) {
htmlOutput = htmlOutput.replace (
/<script src=(["'])(.+?)bundle\.js/ig,
'<script src=$1$2bundle\.' + stats.hash + '\.js'
).replace (
/<link rel="stylesheet" href=(["'])(.+?)\.css/,
'<link rel="stylesheet" href="$2.' + stats.hash + '\.css'
);
critical.generate({
base: 'dist/',
src: 'index.html',
dest: 'index.html',
extract: true,
inline: true,
minify: true,
css: [`dist/styles.${!isDev ? `${stats.hash}.` : ''}css`],
});
}
FileSystem.writeFileSync (
Path.join(__dirname, 'dist/', htmlFileName),
htmlOutput
);
}
});
}
],
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/,
use: ['babel-loader', 'eslint-loader']
}, {
test: /\.css|\.less$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'postcss-loader', 'less-loader']
})
}]
}
};
| 29.95283 | 79 | 0.470866 |
7345ede1d7252f54c8f18f925a4de01ad97b637d | 5,481 | js | JavaScript | Scripts/view/misc/Scrollable.js | TMarkov98/BindKraft | 1bfa421fa5dbb6040feb0c48131c2004d29eecdf | [
"MIT"
] | 13 | 2019-03-28T14:48:32.000Z | 2020-12-22T10:38:25.000Z | Scripts/view/misc/Scrollable.js | TMarkov98/BindKraft | 1bfa421fa5dbb6040feb0c48131c2004d29eecdf | [
"MIT"
] | 31 | 2019-04-11T18:04:10.000Z | 2022-03-07T18:30:32.000Z | Scripts/view/misc/Scrollable.js | Cleancodefactory/BindKraft | 1f7bdb00f9cf17c21bdb1dfbe751a353a3a8986e | [
"MIT"
] | 5 | 2019-05-09T13:59:55.000Z | 2020-11-23T08:17:04.000Z | function Scrollable() {
Base.apply(this, arguments);
}
Scrollable.Inherit(Base, "Scrollable");
// Scrollable.Implement(IUIControl);
Scrollable.ImplementProperty("direction", new InitializeStringParameter("Direction - H or V - only the first letter matters","H"));
Scrollable.ImplementProperty("carefor", new InitializeStringParameter("child elements to care for. Null for all of them.",null));
Scrollable.prototype.changedevent = new InitializeEvent("Firest every time the position changes");
Scrollable.ImplementProperty("scrollablecontainer", new Initialize("use plugelement to fill it in", null));
Scrollable.prototype.finalinit = function() {
//
this.on("mouseover", this.onMouseOver);
this.on("mouseout", this.onMouseOut);
if (window.addWheelListener) window.addWheelListener(this.root, Delegate.createWrapper(this, this.$onMouseWheel));
}
Scrollable.prototype.get_direction = function() {
if (this.$direction) {
if (this.$direction.charAt(0).toUpperCase() == "V") return "V";
}
return "H";
}
Scrollable.prototype.get_booldirection = function() { // H is true, V is false
return ((this.get_direction() == "V")?false:true);
}
Scrollable.prototype.$elementsToCareFor = function() {
var els = null;
if (this.get_carefor() != null) {
els = $(this.get_scrollablecontainer()).children(); // We have to filter them, but how? Needs decision.
} else {
els = $(this.get_scrollablecontainer()).children();
}
return els;
}
Scrollable.prototype.onMouseOver = function(e) {
// TODO something?
}
Scrollable.prototype.onMouseOut = function(e) {
// TODO something?
}
Scrollable.prototype.isRectVisible = function(rect) {
if (this.get_booldirection()) { // Horizontal
var curScroll = this.get_scrollablecontainer().scrollLeft;
var width = $(this.get_scrollablecontainer()).width();
if (rect.x - curScroll >= 0) {
if ((rect.x + rect.w - curScroll) <= width) {
return true;
}
}
return false;
} else { // Vertical not implemented
}
}
Scrollable.prototype.$onMouseWheel = function(e) {
if (e != null) {
if (e.deltaY < 0) {
this.moveNext();
} else {
this.movePrev();
}
e.preventDefault();
}
}
Scrollable.prototype.movePrev = function(e, dc, bind) {
if (this.get_booldirection()) { // Horizontal
var curScroll = this.get_scrollablecontainer().scrollLeft;
var itemEls = this.$elementsToCareFor();
var arrRects = [];
var rect;
for (var i = 0; i < itemEls.length; i++) {
rect = new Rect(itemEls[i].offsetLeft,itemEls[i].offsetTop);
rect.w = $(itemEls[i]).width();
rect.h = $(itemEls[i]).height();
arrRects.push(rect);
}
// var b = false;
var firstVisible = -1;
for (i = 0; i < arrRects.length; i++) {
if (this.isRectVisible(arrRects[i])) {
firstVisible = i;
break;
}
}
if (i > 0) {
rect = arrRects[i-1];
this.get_scrollablecontainer().scrollLeft -= (this.get_scrollablecontainer().scrollLeft - rect.x);
}
} else { // Vertical not impl.
}
this.changedevent.invoke(this, null);
}
Scrollable.prototype.moveNext = function(e, dc, bind) {
if (this.get_booldirection()) { // Horizontal
var curScroll = this.get_scrollablecontainer().scrollLeft;
var itemEls = this.$elementsToCareFor();
var width = $(this.get_scrollablecontainer()).width();
var arrRects = [];
var rect;
for (var i = 0; i < itemEls.length; i++) {
rect = new Rect(itemEls[i].offsetLeft,itemEls[i].offsetTop);
rect.w = $(itemEls[i]).width();
rect.h = $(itemEls[i]).height();
arrRects.push(rect);
}
// var b = false;
var firstVisible = -1;
for (i = arrRects.length - 1; i >= 0; i--) {
if (this.isRectVisible(arrRects[i])) {
firstVisible = i;
break;
}
}
if (i < arrRects.length - 1) {
rect = arrRects[i + 1];
this.get_scrollablecontainer().scrollLeft += ((rect.x + rect.w) - (this.get_scrollablecontainer().scrollLeft + width));
}
} else { // Vertical not impl
}
this.changedevent.invoke(this, null);
}
Scrollable.prototype.get_prevactive = function() {
if (this.get_booldirection()) { // Horizontal
var i;
var itemEls = this.$elementsToCareFor();
var rect;
var firstVisible = -1;
for (i = 0; i < itemEls.length; i++) {
rect = new Rect(itemEls[i].offsetLeft,itemEls[i].offsetTop);
rect.w = $(itemEls[i]).width();
rect.h = $(itemEls[i]).height();
if (this.isRectVisible(rect)) {
firstVisible = i;
break;
}
}
if (firstVisible > 0) return true;
} else { // Vertical not implemented
}
return false;
}.Description("Returns true if there are prev elements partialy or fully invisible");
Scrollable.prototype.get_nextactive = function() {
if (this.get_booldirection()) { // Horizontal
var i;
var itemEls = this.$elementsToCareFor();
var rect;
var firstVisible = itemEls.length;
for (i = itemEls.length - 1; i >= 0; i--) {
rect = new Rect(itemEls[i].offsetLeft,itemEls[i].offsetTop);
rect.w = $(itemEls[i]).width();
rect.h = $(itemEls[i]).height();
if (this.isRectVisible(rect)) {
firstVisible = i;
break;
}
}
if (firstVisible < (itemEls.length - 1)) return true;
} else { // Vertical
}
return false;
}.Description("Returns true if there are next elements partialy or fully invisible");
Scrollable.prototype.moveTo = function(e, dc, bind) {
// TODO: write me ;)
this.changedevent.invoke(this, null);
} | 32.241176 | 132 | 0.648787 |
73467626b9532732f5a13d9852daedc1699d4efc | 1,474 | js | JavaScript | test/javascript/cli_runner.js | gesellix/couchdb | 1e37457de4786973558773118e518566760b4720 | [
"Apache-2.0"
] | null | null | null | test/javascript/cli_runner.js | gesellix/couchdb | 1e37457de4786973558773118e518566760b4720 | [
"Apache-2.0"
] | null | null | null | test/javascript/cli_runner.js | gesellix/couchdb | 1e37457de4786973558773118e518566760b4720 | [
"Apache-2.0"
] | null | null | null | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
//
/*
* Futon test suite was designed to be able to run all tests populated into
* couchTests. Here we should only be loading one test, so we'll pop the first
* test off the list and run the test. If more than one item is loaded in the
* test object, return an error.
*/
function runTest() {
CouchDB.reloadConfig();
var count = 0;
var start = new Date().getTime();
if(couchTests.skip) {
quit(2);
}
if(couchTests.elixir) {
quit(3);
}
for(var name in couchTests) {
count++;
}
if (count !== 1) {
console.log('Only one test per file is allowed.');
quit(1);
}
try {
// Add artificial wait for each test of 1 sec
while (new Date().getTime() < start + 1200);
couchTests[name]();
quit(0);
} catch(e) {
console.log("\nError: " + e.message);
fmtStack(e.stack);
quit(1)
}
}
waitForSuccess(CouchDB.isRunning, 'isRunning');
runTest();
| 25.859649 | 80 | 0.664179 |
7346902474289c0a5ed6484218e7d3cfa55bbdb6 | 411 | js | JavaScript | src/main/webapp/resources/script/sysset/sysSet.js | aaiyusi/base | a2396f6534b84d76901605051d9d0f3c843262ce | [
"Apache-2.0"
] | null | null | null | src/main/webapp/resources/script/sysset/sysSet.js | aaiyusi/base | a2396f6534b84d76901605051d9d0f3c843262ce | [
"Apache-2.0"
] | 1 | 2019-12-26T11:07:40.000Z | 2019-12-26T11:07:40.000Z | src/main/webapp/resources/script/sys/sysSet.js | aaiyusi/base | a2396f6534b84d76901605051d9d0f3c843262ce | [
"Apache-2.0"
] | 1 | 2022-01-08T11:33:12.000Z | 2022-01-08T11:33:12.000Z |
$(function(){
});
function change(type){
if(type==1){
$("#iframeInfo").attr("src","erp/resources/views/address/addressManager.jsp");
$("#rate").attr("class","");
$("#address").attr("class","active");
}else if(type==2){
$("#iframeInfo").attr("src","erp/resources/views/rate/rateManager.jsp");
$("#address").attr("class","");
$("#rate").attr("class","active");
}
} | 25.6875 | 84 | 0.545012 |
7346c5d43a63f891b72d0d16a7f6331afebf3bec | 3,388 | js | JavaScript | util.js | JesusisFreedom/generator-ng-webpack | b7fb37f5eebdf902d4d5a97c2c8f7cb40f41072e | [
"MIT"
] | null | null | null | util.js | JesusisFreedom/generator-ng-webpack | b7fb37f5eebdf902d4d5a97c2c8f7cb40f41072e | [
"MIT"
] | null | null | null | util.js | JesusisFreedom/generator-ng-webpack | b7fb37f5eebdf902d4d5a97c2c8f7cb40f41072e | [
"MIT"
] | null | null | null | 'use strict';
var path = require('path');
var fs = require('fs');
module.exports = {
rewrite: rewrite,
rewriteFile: rewriteFile,
appName: appName,
copyTemplates: copyTemplates,
relativeUrl: relativeUrl
};
function rewriteFile (args) {
args.path = args.path || process.cwd();
var fullPath = path.join(args.path, args.file);
args.haystack = fs.readFileSync(fullPath, 'utf8');
var body = rewrite(args);
fs.writeFileSync(fullPath, body);
}
function escapeRegExp (str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
}
function rewrite (args) {
// check if splicable is already in the body text
var re = new RegExp(args.splicable.map(function (line) {
return '\s*' + escapeRegExp(line);
}).join('\n'));
if (re.test(args.haystack)) {
return args.haystack;
}
var lines = args.haystack.split('\n');
var otherwiseLineIndex = 0;
lines.forEach(function (line, i) {
if (line.indexOf(args.needle) !== -1) {
otherwiseLineIndex = i;
}
});
var spaces = 0;
while (lines[otherwiseLineIndex].charAt(spaces) === ' ') {
spaces += 1;
}
var spaceStr = '';
while ((spaces -= 1) >= 0) {
spaceStr += ' ';
}
lines.splice(otherwiseLineIndex, 0, args.splicable.map(function (line) {
return spaceStr + line;
}).join('\n'));
return lines.join('\n');
}
function appName (self) {
var counter = 0, suffix = self.options['app-suffix'];
// Have to check this because of generator bug #386
process.argv.forEach(function(val) {
if (val.indexOf('--app-suffix') > -1) {
counter++;
}
});
if (counter === 0 || (typeof suffix === 'boolean' && suffix)) {
suffix = 'App';
}
return suffix ? self.lodash.classify(suffix) : '';
}
function createFileName (template, name) {
// Find matches for parans
var filterMatches = template.match(/\(([^)]+)\)/g);
var filter = '';
if(filterMatches) {
filter = filterMatches[0].replace('(', '').replace(')', '');
template = template.replace(filterMatches[0], '');
}
return { name: template.replace('name', name), filter: filter };
}
function templateIsUsable (processedName, self) {
var filters = self.config.get('filters') || [];
var include = true;
if(processedName.filter && filters.indexOf(processedName.filter) === -1) {
include = false;
}
var index = processedName.name.lastIndexOf('.');
var ext = processedName.name.slice(index + 1);
var extensions = self.config.get('extensions') || [];
if(extensions.indexOf(ext) >= 0 && include) {
return true;
}
return false;
}
function copyTemplates (self, type, templateDir, configName) {
templateDir = templateDir || path.join(self.sourceRoot(), type);
configName = configName || type + 'Templates';
if(self.config.get(configName)) {
templateDir = path.join(process.cwd(), self.config.get(configName));
}
fs.readdirSync(templateDir)
.forEach(function(template) {
var processedName = createFileName(template, self.name);
var fileName = processedName.name;
var templateFile = path.join(templateDir, template);
if(templateIsUsable(processedName, self)) {
self.template(templateFile, path.join(self.dir, fileName));
}
});
};
function relativeUrl(basePath, targetPath) {
var relativePath = path.relative(basePath, targetPath);
return relativePath.split(path.sep).join('/');
}
| 26.061538 | 76 | 0.637839 |
73477db052ed35f125eab8b74b508d833b18ae45 | 997 | js | JavaScript | src/database/realmDB.js | KunNw0n/BitcoinUnlimitedWeb | a921e24444fa389722ee287c60da1d7b92bcaeca | [
"MIT"
] | 14 | 2016-06-17T15:53:51.000Z | 2021-05-14T21:29:39.000Z | src/database/realmDB.js | KunNw0n/BitcoinUnlimitedWeb | a921e24444fa389722ee287c60da1d7b92bcaeca | [
"MIT"
] | 85 | 2016-01-25T18:31:58.000Z | 2021-08-12T09:22:43.000Z | src/database/realmDB.js | sickpig/BitcoinUnlimitedWeb | f06d55b63c01094492369e5110f5aef25a05f1a0 | [
"MIT"
] | 51 | 2016-02-01T19:44:19.000Z | 2021-05-14T21:29:43.000Z | 'use strict';
import { getDBSchema, getAuthSchema } from './realmSchema.js';
const env = require('dotenv').config();
/**
* [getDB Gets the database name from the .env file, otherwise returns default database names.]
* @param {String} type [Optionally speicfy 'auth', otherwise the public database is assumed.]
* @return {String} [The name of the database.]
*/
const getDB = type => {
try {
return (type == 'auth') ? process.env.DB_AUTH_NAME : process.env.DB_NAME;
} catch(e) {
return (type == 'auth') ? 'realmDBauth.realm' : 'realmDB.realm';
}
}
/**
* [realmDatabase Holds the public database instance.]
* @type {Object}
*/
const realmDatabase = {
path: './databases/' + getDB(),
schema: getDBSchema()
}
/**
* [authDatabase Holds the private Auth database instance.]
* @type {Object}
*/
const authDatabase = {
path: './databases/' + getDB('auth'),
schema: getAuthSchema()
}
module.exports = {
realmDatabase,
authDatabase
}
| 23.738095 | 95 | 0.638917 |
73484c68f74b0db3a00740c83f0bf88477a00721 | 62 | js | JavaScript | src/index.js | chanoch/node-boilerplate | 14b682bddb4f7146ac9366afa64dd8c0d29acce2 | [
"MIT"
] | null | null | null | src/index.js | chanoch/node-boilerplate | 14b682bddb4f7146ac9366afa64dd8c0d29acce2 | [
"MIT"
] | null | null | null | src/index.js | chanoch/node-boilerplate | 14b682bddb4f7146ac9366afa64dd8c0d29acce2 | [
"MIT"
] | null | null | null |
// eslint-ignore-next-line
console.log(process.env.NODE_ENV)
| 15.5 | 33 | 0.774194 |
734852e5740a57f05a5e8ff4783c2de25e04e713 | 34,554 | js | JavaScript | dist/uncompressed/skylark-ace/mode/powershell_highlight_rules.js | skylark-integration/skylark-ace | 60ed5e420774085956e3985dc6f2ebcd6eed2ae0 | [
"MIT"
] | null | null | null | dist/uncompressed/skylark-ace/mode/powershell_highlight_rules.js | skylark-integration/skylark-ace | 60ed5e420774085956e3985dc6f2ebcd6eed2ae0 | [
"MIT"
] | null | null | null | dist/uncompressed/skylark-ace/mode/powershell_highlight_rules.js | skylark-integration/skylark-ace | 60ed5e420774085956e3985dc6f2ebcd6eed2ae0 | [
"MIT"
] | null | null | null | define(function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var PowershellHighlightRules = function() {
// Help Reference: about_Language_Keywords
// https://technet.microsoft.com/en-us/library/hh847744.aspx
var keywords = (
"begin|break|catch|continue|data|do|dynamicparam|else|elseif|end|exit|filter|" +
"finally|for|foreach|from|function|if|in|inlinescript|hidden|parallel|param|" +
"process|return|sequence|switch|throw|trap|try|until|while|workflow"
);
// Command to enumerate all module commands in Windows PowerShell:
// PS C:\> Get-Module -ListAvailable | Select-Object -Unique Name -ExpandProperty Name | Sort-Object |
// ForEach-Object { "// Module $_"; '"' + ((Get-Command -Module $_ | Select-Object -ExpandProperty Name) -join '|') + '|" +' } | clip
var builtinFunctions = (
// Module AppBackgroundTask
"Get-AppBackgroundTask|Start-AppBackgroundTask|Unregister-AppBackgroundTask|Disable-AppBackgroundTaskDiagnosticLog|Enable-AppBackgroundTaskDiagnosticLog|Set-AppBackgroundTaskResourcePolicy|" +
// Module AppLocker
"Get-AppLockerFileInformation|Get-AppLockerPolicy|New-AppLockerPolicy|Set-AppLockerPolicy|Test-AppLockerPolicy|" +
// Module Appx
"Get-AppxLastError|Get-AppxLog|Add-AppxPackage|Add-AppxVolume|Dismount-AppxVolume|Get-AppxDefaultVolume|Get-AppxPackage|Get-AppxPackageManifest|Get-AppxVolume|Mount-AppxVolume|Move-AppxPackage|Remove-AppxPackage|Remove-AppxVolume|Set-AppxDefaultVolume|" +
// Module AssignedAccess
"Clear-AssignedAccess|Get-AssignedAccess|Set-AssignedAccess|" +
// Module BitLocker
"Add-BitLockerKeyProtector|Backup-BitLockerKeyProtector|Clear-BitLockerAutoUnlock|Disable-BitLocker|Disable-BitLockerAutoUnlock|Enable-BitLocker|Enable-BitLockerAutoUnlock|Get-BitLockerVolume|Lock-BitLocker|Remove-BitLockerKeyProtector|Resume-BitLocker|Suspend-BitLocker|Unlock-BitLocker|" +
// Module BitsTransfer
"Add-BitsFile|Complete-BitsTransfer|Get-BitsTransfer|Remove-BitsTransfer|Resume-BitsTransfer|Set-BitsTransfer|Start-BitsTransfer|Suspend-BitsTransfer|" +
// Module BranchCache
"Add-BCDataCacheExtension|Clear-BCCache|Disable-BC|Disable-BCDowngrading|Disable-BCServeOnBattery|Enable-BCDistributed|Enable-BCDowngrading|Enable-BCHostedClient|Enable-BCHostedServer|Enable-BCLocal|Enable-BCServeOnBattery|Export-BCCachePackage|Export-BCSecretKey|Get-BCClientConfiguration|Get-BCContentServerConfiguration|Get-BCDataCache|Get-BCDataCacheExtension|Get-BCHashCache|Get-BCHostedCacheServerConfiguration|Get-BCNetworkConfiguration|Get-BCStatus|Import-BCCachePackage|Import-BCSecretKey|Publish-BCFileContent|Publish-BCWebContent|Remove-BCDataCacheExtension|Reset-BC|Set-BCAuthentication|Set-BCCache|Set-BCDataCacheEntryMaxAge|Set-BCMinSMBLatency|Set-BCSecretKey|" +
// Module CimCmdlets
"Export-BinaryMiLog|Get-CimAssociatedInstance|Get-CimClass|Get-CimInstance|Get-CimSession|Import-BinaryMiLog|Invoke-CimMethod|New-CimInstance|New-CimSession|New-CimSessionOption|Register-CimIndicationEvent|Remove-CimInstance|Remove-CimSession|Set-CimInstance|" +
// Module CIPolicy
"ConvertFrom-CIPolicy|" +
// Module ConfigCI
"Add-SignerRule|Edit-CIPolicyRule|Get-CIPolicy|Get-CIPolicyInfo|Get-SystemDriver|Merge-CIPolicy|New-CIPolicy|New-CIPolicyRule|Remove-CIPolicyRule|Set-CIPolicyVersion|Set-HVCIOptions|Set-RuleOption|" +
// Module Defender
"Add-MpPreference|Get-MpComputerStatus|Get-MpPreference|Get-MpThreat|Get-MpThreatCatalog|Get-MpThreatDetection|Remove-MpPreference|Remove-MpThreat|Set-MpPreference|Start-MpScan|Start-MpWDOScan|Update-MpSignature|" +
// Module DirectAccessClientComponents
"Disable-DAManualEntryPointSelection|Enable-DAManualEntryPointSelection|Get-DAClientExperienceConfiguration|Get-DAEntryPointTableItem|New-DAEntryPointTableItem|Remove-DAEntryPointTableItem|Rename-DAEntryPointTableItem|Reset-DAClientExperienceConfiguration|Reset-DAEntryPointTableItem|Set-DAClientExperienceConfiguration|Set-DAEntryPointTableItem|" +
// Module Dism
"Add-ProvisionedAppxPackage|Apply-WindowsUnattend|Get-ProvisionedAppxPackage|Remove-ProvisionedAppxPackage|Add-AppxProvisionedPackage|Add-WindowsCapability|Add-WindowsDriver|Add-WindowsImage|Add-WindowsPackage|Clear-WindowsCorruptMountPoint|Disable-WindowsOptionalFeature|Dismount-WindowsImage|Enable-WindowsOptionalFeature|Expand-WindowsCustomDataImage|Expand-WindowsImage|Export-WindowsDriver|Export-WindowsImage|Get-AppxProvisionedPackage|Get-WIMBootEntry|Get-WindowsCapability|Get-WindowsDriver|Get-WindowsEdition|Get-WindowsImage|Get-WindowsImageContent|Get-WindowsOptionalFeature|Get-WindowsPackage|Mount-WindowsImage|New-WindowsCustomImage|New-WindowsImage|Optimize-WindowsImage|Remove-AppxProvisionedPackage|Remove-WindowsCapability|Remove-WindowsDriver|Remove-WindowsImage|Remove-WindowsPackage|Repair-WindowsImage|Save-WindowsImage|Set-AppXProvisionedDataFile|Set-WindowsEdition|Set-WindowsProductKey|Split-WindowsImage|Update-WIMBootEntry|Use-WindowsUnattend|" +
// Module DnsClient
"Add-DnsClientNrptRule|Clear-DnsClientCache|Get-DnsClient|Get-DnsClientCache|Get-DnsClientGlobalSetting|Get-DnsClientNrptGlobal|Get-DnsClientNrptPolicy|Get-DnsClientNrptRule|Get-DnsClientServerAddress|Register-DnsClient|Remove-DnsClientNrptRule|Set-DnsClient|Set-DnsClientGlobalSetting|Set-DnsClientNrptGlobal|Set-DnsClientNrptRule|Set-DnsClientServerAddress|Resolve-DnsName|" +
// Module EventTracingManagement
"Add-EtwTraceProvider|Get-AutologgerConfig|Get-EtwTraceProvider|Get-EtwTraceSession|New-AutologgerConfig|New-EtwTraceSession|Remove-AutologgerConfig|Remove-EtwTraceProvider|Remove-EtwTraceSession|Send-EtwTraceSession|Set-AutologgerConfig|Set-EtwTraceProvider|Set-EtwTraceSession|" +
// Module International
"Get-WinAcceptLanguageFromLanguageListOptOut|Get-WinCultureFromLanguageListOptOut|Get-WinDefaultInputMethodOverride|Get-WinHomeLocation|Get-WinLanguageBarOption|Get-WinSystemLocale|Get-WinUILanguageOverride|Get-WinUserLanguageList|New-WinUserLanguageList|Set-Culture|Set-WinAcceptLanguageFromLanguageListOptOut|Set-WinCultureFromLanguageListOptOut|Set-WinDefaultInputMethodOverride|Set-WinHomeLocation|Set-WinLanguageBarOption|Set-WinSystemLocale|Set-WinUILanguageOverride|Set-WinUserLanguageList|" +
// Module iSCSI
"Connect-IscsiTarget|Disconnect-IscsiTarget|Get-IscsiConnection|Get-IscsiSession|Get-IscsiTarget|Get-IscsiTargetPortal|New-IscsiTargetPortal|Register-IscsiSession|Remove-IscsiTargetPortal|Set-IscsiChapSecret|Unregister-IscsiSession|Update-IscsiTarget|Update-IscsiTargetPortal|" +
// Module ISE
"Get-IseSnippet|Import-IseSnippet|New-IseSnippet|" +
// Module Kds
"Add-KdsRootKey|Clear-KdsCache|Get-KdsConfiguration|Get-KdsRootKey|Set-KdsConfiguration|Test-KdsRootKey|" +
// Module Microsoft.PowerShell.Archive
"Compress-Archive|Expand-Archive|" +
// Module Microsoft.PowerShell.Diagnostics
"Export-Counter|Get-Counter|Get-WinEvent|Import-Counter|New-WinEvent|" +
// Module Microsoft.PowerShell.Host
"Start-Transcript|Stop-Transcript|" +
// Module Microsoft.PowerShell.Management
"Add-Computer|Add-Content|Checkpoint-Computer|Clear-Content|Clear-EventLog|Clear-Item|Clear-ItemProperty|Clear-RecycleBin|Complete-Transaction|Convert-Path|Copy-Item|Copy-ItemProperty|Debug-Process|Disable-ComputerRestore|Enable-ComputerRestore|Get-ChildItem|Get-Clipboard|Get-ComputerRestorePoint|Get-Content|Get-ControlPanelItem|Get-EventLog|Get-HotFix|Get-Item|Get-ItemProperty|Get-ItemPropertyValue|Get-Location|Get-Process|Get-PSDrive|Get-PSProvider|Get-Service|Get-Transaction|Get-WmiObject|Invoke-Item|Invoke-WmiMethod|Join-Path|Limit-EventLog|Move-Item|Move-ItemProperty|New-EventLog|New-Item|New-ItemProperty|New-PSDrive|New-Service|New-WebServiceProxy|Pop-Location|Push-Location|Register-WmiEvent|Remove-Computer|Remove-EventLog|Remove-Item|Remove-ItemProperty|Remove-PSDrive|Remove-WmiObject|Rename-Computer|Rename-Item|Rename-ItemProperty|Reset-ComputerMachinePassword|Resolve-Path|Restart-Computer|Restart-Service|Restore-Computer|Resume-Service|Set-Clipboard|Set-Content|Set-Item|Set-ItemProperty|Set-Location|Set-Service|Set-WmiInstance|Show-ControlPanelItem|Show-EventLog|Split-Path|Start-Process|Start-Service|Start-Transaction|Stop-Computer|Stop-Process|Stop-Service|Suspend-Service|Test-ComputerSecureChannel|Test-Connection|Test-Path|Undo-Transaction|Use-Transaction|Wait-Process|Write-EventLog|" +
// Module Microsoft.PowerShell.ODataUtils
"Export-ODataEndpointProxy|" +
// Module Microsoft.PowerShell.Security
"ConvertFrom-SecureString|ConvertTo-SecureString|Get-Acl|Get-AuthenticodeSignature|Get-CmsMessage|Get-Credential|Get-ExecutionPolicy|Get-PfxCertificate|Protect-CmsMessage|Set-Acl|Set-AuthenticodeSignature|Set-ExecutionPolicy|Unprotect-CmsMessage|" +
// Module Microsoft.PowerShell.Utility
"ConvertFrom-SddlString|Format-Hex|Get-FileHash|Import-PowerShellDataFile|New-Guid|New-TemporaryFile|Add-Member|Add-Type|Clear-Variable|Compare-Object|ConvertFrom-Csv|ConvertFrom-Json|ConvertFrom-String|ConvertFrom-StringData|Convert-String|ConvertTo-Csv|ConvertTo-Html|ConvertTo-Json|ConvertTo-Xml|Debug-Runspace|Disable-PSBreakpoint|Disable-RunspaceDebug|Enable-PSBreakpoint|Enable-RunspaceDebug|Export-Alias|Export-Clixml|Export-Csv|Export-FormatData|Export-PSSession|Format-Custom|Format-List|Format-Table|Format-Wide|Get-Alias|Get-Culture|Get-Date|Get-Event|Get-EventSubscriber|Get-FormatData|Get-Host|Get-Member|Get-PSBreakpoint|Get-PSCallStack|Get-Random|Get-Runspace|Get-RunspaceDebug|Get-TraceSource|Get-TypeData|Get-UICulture|Get-Unique|Get-Variable|Group-Object|Import-Alias|Import-Clixml|Import-Csv|Import-LocalizedData|Import-PSSession|Invoke-Expression|Invoke-RestMethod|Invoke-WebRequest|Measure-Command|Measure-Object|New-Alias|New-Event|New-Object|New-TimeSpan|New-Variable|Out-File|Out-GridView|Out-Printer|Out-String|Read-Host|Register-EngineEvent|Register-ObjectEvent|Remove-Event|Remove-PSBreakpoint|Remove-TypeData|Remove-Variable|Select-Object|Select-String|Select-Xml|Send-MailMessage|Set-Alias|Set-Date|Set-PSBreakpoint|Set-TraceSource|Set-Variable|Show-Command|Sort-Object|Start-Sleep|Tee-Object|Trace-Command|Unblock-File|Unregister-Event|Update-FormatData|Update-List|Update-TypeData|Wait-Debugger|Wait-Event|Write-Debug|Write-Error|Write-Host|Write-Information|Write-Output|Write-Progress|Write-Verbose|Write-Warning|" +
// Module Microsoft.WSMan.Management
"Connect-WSMan|Disable-WSManCredSSP|Disconnect-WSMan|Enable-WSManCredSSP|Get-WSManCredSSP|Get-WSManInstance|Invoke-WSManAction|New-WSManInstance|New-WSManSessionOption|Remove-WSManInstance|Set-WSManInstance|Set-WSManQuickConfig|Test-WSMan|" +
// Module MMAgent
"Debug-MMAppPrelaunch|Disable-MMAgent|Enable-MMAgent|Get-MMAgent|Set-MMAgent|" +
// Module MsDtc
"Add-DtcClusterTMMapping|Get-Dtc|Get-DtcAdvancedHostSetting|Get-DtcAdvancedSetting|Get-DtcClusterDefault|Get-DtcClusterTMMapping|Get-DtcDefault|Get-DtcLog|Get-DtcNetworkSetting|Get-DtcTransaction|Get-DtcTransactionsStatistics|Get-DtcTransactionsTraceSession|Get-DtcTransactionsTraceSetting|Install-Dtc|Remove-DtcClusterTMMapping|Reset-DtcLog|Set-DtcAdvancedHostSetting|Set-DtcAdvancedSetting|Set-DtcClusterDefault|Set-DtcClusterTMMapping|Set-DtcDefault|Set-DtcLog|Set-DtcNetworkSetting|Set-DtcTransaction|Set-DtcTransactionsTraceSession|Set-DtcTransactionsTraceSetting|Start-Dtc|Start-DtcTransactionsTraceSession|Stop-Dtc|Stop-DtcTransactionsTraceSession|Test-Dtc|Uninstall-Dtc|Write-DtcTransactionsTraceSession|Complete-DtcDiagnosticTransaction|Join-DtcDiagnosticResourceManager|New-DtcDiagnosticTransaction|Receive-DtcDiagnosticTransaction|Send-DtcDiagnosticTransaction|Start-DtcDiagnosticResourceManager|Stop-DtcDiagnosticResourceManager|Undo-DtcDiagnosticTransaction|" +
// Module NetAdapter
"Disable-NetAdapter|Disable-NetAdapterBinding|Disable-NetAdapterChecksumOffload|Disable-NetAdapterEncapsulatedPacketTaskOffload|Disable-NetAdapterIPsecOffload|Disable-NetAdapterLso|Disable-NetAdapterPacketDirect|Disable-NetAdapterPowerManagement|Disable-NetAdapterQos|Disable-NetAdapterRdma|Disable-NetAdapterRsc|Disable-NetAdapterRss|Disable-NetAdapterSriov|Disable-NetAdapterVmq|Enable-NetAdapter|Enable-NetAdapterBinding|Enable-NetAdapterChecksumOffload|Enable-NetAdapterEncapsulatedPacketTaskOffload|Enable-NetAdapterIPsecOffload|Enable-NetAdapterLso|Enable-NetAdapterPacketDirect|Enable-NetAdapterPowerManagement|Enable-NetAdapterQos|Enable-NetAdapterRdma|Enable-NetAdapterRsc|Enable-NetAdapterRss|Enable-NetAdapterSriov|Enable-NetAdapterVmq|Get-NetAdapter|Get-NetAdapterAdvancedProperty|Get-NetAdapterBinding|Get-NetAdapterChecksumOffload|Get-NetAdapterEncapsulatedPacketTaskOffload|Get-NetAdapterHardwareInfo|Get-NetAdapterIPsecOffload|Get-NetAdapterLso|Get-NetAdapterPacketDirect|Get-NetAdapterPowerManagement|Get-NetAdapterQos|Get-NetAdapterRdma|Get-NetAdapterRsc|Get-NetAdapterRss|Get-NetAdapterSriov|Get-NetAdapterSriovVf|Get-NetAdapterStatistics|Get-NetAdapterVmq|Get-NetAdapterVmqQueue|Get-NetAdapterVPort|New-NetAdapterAdvancedProperty|Remove-NetAdapterAdvancedProperty|Rename-NetAdapter|Reset-NetAdapterAdvancedProperty|Restart-NetAdapter|Set-NetAdapter|Set-NetAdapterAdvancedProperty|Set-NetAdapterBinding|Set-NetAdapterChecksumOffload|Set-NetAdapterEncapsulatedPacketTaskOffload|Set-NetAdapterIPsecOffload|Set-NetAdapterLso|Set-NetAdapterPacketDirect|Set-NetAdapterPowerManagement|Set-NetAdapterQos|Set-NetAdapterRdma|Set-NetAdapterRsc|Set-NetAdapterRss|Set-NetAdapterSriov|Set-NetAdapterVmq|" +
// Module NetConnection
"Get-NetConnectionProfile|Set-NetConnectionProfile|" +
// Module NetEventPacketCapture
"Add-NetEventNetworkAdapter|Add-NetEventPacketCaptureProvider|Add-NetEventProvider|Add-NetEventVmNetworkAdapter|Add-NetEventVmSwitch|Add-NetEventWFPCaptureProvider|Get-NetEventNetworkAdapter|Get-NetEventPacketCaptureProvider|Get-NetEventProvider|Get-NetEventSession|Get-NetEventVmNetworkAdapter|Get-NetEventVmSwitch|Get-NetEventWFPCaptureProvider|New-NetEventSession|Remove-NetEventNetworkAdapter|Remove-NetEventPacketCaptureProvider|Remove-NetEventProvider|Remove-NetEventSession|Remove-NetEventVmNetworkAdapter|Remove-NetEventVmSwitch|Remove-NetEventWFPCaptureProvider|Set-NetEventPacketCaptureProvider|Set-NetEventProvider|Set-NetEventSession|Set-NetEventWFPCaptureProvider|Start-NetEventSession|Stop-NetEventSession|" +
// Module NetLbfo
"Add-NetLbfoTeamMember|Add-NetLbfoTeamNic|Get-NetLbfoTeam|Get-NetLbfoTeamMember|Get-NetLbfoTeamNic|New-NetLbfoTeam|Remove-NetLbfoTeam|Remove-NetLbfoTeamMember|Remove-NetLbfoTeamNic|Rename-NetLbfoTeam|Set-NetLbfoTeam|Set-NetLbfoTeamMember|Set-NetLbfoTeamNic|" +
// Module NetNat
"Add-NetNatExternalAddress|Add-NetNatStaticMapping|Get-NetNat|Get-NetNatExternalAddress|Get-NetNatGlobal|Get-NetNatSession|Get-NetNatStaticMapping|New-NetNat|Remove-NetNat|Remove-NetNatExternalAddress|Remove-NetNatStaticMapping|Set-NetNat|Set-NetNatGlobal|" +
// Module NetQos
"Get-NetQosPolicy|New-NetQosPolicy|Remove-NetQosPolicy|Set-NetQosPolicy|" +
// Module NetSecurity
"Copy-NetFirewallRule|Copy-NetIPsecMainModeCryptoSet|Copy-NetIPsecMainModeRule|Copy-NetIPsecPhase1AuthSet|Copy-NetIPsecPhase2AuthSet|Copy-NetIPsecQuickModeCryptoSet|Copy-NetIPsecRule|Disable-NetFirewallRule|Disable-NetIPsecMainModeRule|Disable-NetIPsecRule|Enable-NetFirewallRule|Enable-NetIPsecMainModeRule|Enable-NetIPsecRule|Find-NetIPsecRule|Get-NetFirewallAddressFilter|Get-NetFirewallApplicationFilter|Get-NetFirewallInterfaceFilter|Get-NetFirewallInterfaceTypeFilter|Get-NetFirewallPortFilter|Get-NetFirewallProfile|Get-NetFirewallRule|Get-NetFirewallSecurityFilter|Get-NetFirewallServiceFilter|Get-NetFirewallSetting|Get-NetIPsecDospSetting|Get-NetIPsecMainModeCryptoSet|Get-NetIPsecMainModeRule|Get-NetIPsecMainModeSA|Get-NetIPsecPhase1AuthSet|Get-NetIPsecPhase2AuthSet|Get-NetIPsecQuickModeCryptoSet|Get-NetIPsecQuickModeSA|Get-NetIPsecRule|New-NetFirewallRule|New-NetIPsecDospSetting|New-NetIPsecMainModeCryptoSet|New-NetIPsecMainModeRule|New-NetIPsecPhase1AuthSet|New-NetIPsecPhase2AuthSet|New-NetIPsecQuickModeCryptoSet|New-NetIPsecRule|Open-NetGPO|Remove-NetFirewallRule|Remove-NetIPsecDospSetting|Remove-NetIPsecMainModeCryptoSet|Remove-NetIPsecMainModeRule|Remove-NetIPsecMainModeSA|Remove-NetIPsecPhase1AuthSet|Remove-NetIPsecPhase2AuthSet|Remove-NetIPsecQuickModeCryptoSet|Remove-NetIPsecQuickModeSA|Remove-NetIPsecRule|Rename-NetFirewallRule|Rename-NetIPsecMainModeCryptoSet|Rename-NetIPsecMainModeRule|Rename-NetIPsecPhase1AuthSet|Rename-NetIPsecPhase2AuthSet|Rename-NetIPsecQuickModeCryptoSet|Rename-NetIPsecRule|Save-NetGPO|Set-NetFirewallAddressFilter|Set-NetFirewallApplicationFilter|Set-NetFirewallInterfaceFilter|Set-NetFirewallInterfaceTypeFilter|Set-NetFirewallPortFilter|Set-NetFirewallProfile|Set-NetFirewallRule|Set-NetFirewallSecurityFilter|Set-NetFirewallServiceFilter|Set-NetFirewallSetting|Set-NetIPsecDospSetting|Set-NetIPsecMainModeCryptoSet|Set-NetIPsecMainModeRule|Set-NetIPsecPhase1AuthSet|Set-NetIPsecPhase2AuthSet|Set-NetIPsecQuickModeCryptoSet|Set-NetIPsecRule|Show-NetFirewallRule|Show-NetIPsecRule|Sync-NetIPsecRule|Update-NetIPsecRule|Get-DAPolicyChange|New-NetIPsecAuthProposal|New-NetIPsecMainModeCryptoProposal|New-NetIPsecQuickModeCryptoProposal|" +
// Module NetSwitchTeam
"Add-NetSwitchTeamMember|Get-NetSwitchTeam|Get-NetSwitchTeamMember|New-NetSwitchTeam|Remove-NetSwitchTeam|Remove-NetSwitchTeamMember|Rename-NetSwitchTeam|" +
// Module NetTCPIP
"Find-NetRoute|Get-NetCompartment|Get-NetIPAddress|Get-NetIPConfiguration|Get-NetIPInterface|Get-NetIPv4Protocol|Get-NetIPv6Protocol|Get-NetNeighbor|Get-NetOffloadGlobalSetting|Get-NetPrefixPolicy|Get-NetRoute|Get-NetTCPConnection|Get-NetTCPSetting|Get-NetTransportFilter|Get-NetUDPEndpoint|Get-NetUDPSetting|New-NetIPAddress|New-NetNeighbor|New-NetRoute|New-NetTransportFilter|Remove-NetIPAddress|Remove-NetNeighbor|Remove-NetRoute|Remove-NetTransportFilter|Set-NetIPAddress|Set-NetIPInterface|Set-NetIPv4Protocol|Set-NetIPv6Protocol|Set-NetNeighbor|Set-NetOffloadGlobalSetting|Set-NetRoute|Set-NetTCPSetting|Set-NetUDPSetting|Test-NetConnection|" +
// Module NetworkConnectivityStatus
"Get-DAConnectionStatus|Get-NCSIPolicyConfiguration|Reset-NCSIPolicyConfiguration|Set-NCSIPolicyConfiguration|" +
// Module NetworkSwitchManager
"Disable-NetworkSwitchEthernetPort|Disable-NetworkSwitchFeature|Disable-NetworkSwitchVlan|Enable-NetworkSwitchEthernetPort|Enable-NetworkSwitchFeature|Enable-NetworkSwitchVlan|Get-NetworkSwitchEthernetPort|Get-NetworkSwitchFeature|Get-NetworkSwitchGlobalData|Get-NetworkSwitchVlan|New-NetworkSwitchVlan|Remove-NetworkSwitchEthernetPortIPAddress|Remove-NetworkSwitchVlan|Restore-NetworkSwitchConfiguration|Save-NetworkSwitchConfiguration|Set-NetworkSwitchEthernetPortIPAddress|Set-NetworkSwitchPortMode|Set-NetworkSwitchPortProperty|Set-NetworkSwitchVlanProperty|" +
// Module NetworkTransition
"Add-NetIPHttpsCertBinding|Disable-NetDnsTransitionConfiguration|Disable-NetIPHttpsProfile|Disable-NetNatTransitionConfiguration|Enable-NetDnsTransitionConfiguration|Enable-NetIPHttpsProfile|Enable-NetNatTransitionConfiguration|Get-Net6to4Configuration|Get-NetDnsTransitionConfiguration|Get-NetDnsTransitionMonitoring|Get-NetIPHttpsConfiguration|Get-NetIPHttpsState|Get-NetIsatapConfiguration|Get-NetNatTransitionConfiguration|Get-NetNatTransitionMonitoring|Get-NetTeredoConfiguration|Get-NetTeredoState|New-NetIPHttpsConfiguration|New-NetNatTransitionConfiguration|Remove-NetIPHttpsCertBinding|Remove-NetIPHttpsConfiguration|Remove-NetNatTransitionConfiguration|Rename-NetIPHttpsConfiguration|Reset-Net6to4Configuration|Reset-NetDnsTransitionConfiguration|Reset-NetIPHttpsConfiguration|Reset-NetIsatapConfiguration|Reset-NetTeredoConfiguration|Set-Net6to4Configuration|Set-NetDnsTransitionConfiguration|Set-NetIPHttpsConfiguration|Set-NetIsatapConfiguration|Set-NetNatTransitionConfiguration|Set-NetTeredoConfiguration|" +
// Module PackageManagement
"Find-Package|Find-PackageProvider|Get-Package|Get-PackageProvider|Get-PackageSource|Import-PackageProvider|Install-Package|Install-PackageProvider|Register-PackageSource|Save-Package|Set-PackageSource|Uninstall-Package|Unregister-PackageSource|" +
// Module PcsvDevice
"Clear-PcsvDeviceLog|Get-PcsvDevice|Get-PcsvDeviceLog|Restart-PcsvDevice|Set-PcsvDeviceBootConfiguration|Set-PcsvDeviceNetworkConfiguration|Set-PcsvDeviceUserPassword|Start-PcsvDevice|Stop-PcsvDevice|" +
// Module Pester
"AfterAll|AfterEach|Assert-MockCalled|Assert-VerifiableMocks|BeforeAll|BeforeEach|Context|Describe|Get-MockDynamicParameters|Get-TestDriveItem|In|InModuleScope|Invoke-Mock|Invoke-Pester|It|Mock|New-Fixture|Set-DynamicParameterVariables|Setup|Should|" +
// Module PKI
"Add-CertificateEnrollmentPolicyServer|Export-Certificate|Export-PfxCertificate|Get-Certificate|Get-CertificateAutoEnrollmentPolicy|Get-CertificateEnrollmentPolicyServer|Get-CertificateNotificationTask|Get-PfxData|Import-Certificate|Import-PfxCertificate|New-CertificateNotificationTask|New-SelfSignedCertificate|Remove-CertificateEnrollmentPolicyServer|Remove-CertificateNotificationTask|Set-CertificateAutoEnrollmentPolicy|Switch-Certificate|Test-Certificate|" +
// Module PnpDevice
"Disable-PnpDevice|Enable-PnpDevice|Get-PnpDevice|Get-PnpDeviceProperty|" +
// Module PowerShellGet
"Find-DscResource|Find-Module|Find-Script|Get-InstalledModule|Get-InstalledScript|Get-PSRepository|Install-Module|Install-Script|New-ScriptFileInfo|Publish-Module|Publish-Script|Register-PSRepository|Save-Module|Save-Script|Set-PSRepository|Test-ScriptFileInfo|Uninstall-Module|Uninstall-Script|Unregister-PSRepository|Update-Module|Update-ModuleManifest|Update-Script|Update-ScriptFileInfo|" +
// Module PrintManagement
"Add-Printer|Add-PrinterDriver|Add-PrinterPort|Get-PrintConfiguration|Get-Printer|Get-PrinterDriver|Get-PrinterPort|Get-PrinterProperty|Get-PrintJob|Read-PrinterNfcTag|Remove-Printer|Remove-PrinterDriver|Remove-PrinterPort|Remove-PrintJob|Rename-Printer|Restart-PrintJob|Resume-PrintJob|Set-PrintConfiguration|Set-Printer|Set-PrinterProperty|Suspend-PrintJob|Write-PrinterNfcTag|" +
// Module PSDesiredStateConfiguration
"Configuration|Disable-DscDebug|Enable-DscDebug|Get-DscConfiguration|Get-DscConfigurationStatus|Get-DscLocalConfigurationManager|Get-DscResource|New-DscChecksum|Remove-DscConfigurationDocument|Restore-DscConfiguration|Stop-DscConfiguration|Invoke-DscResource|Publish-DscConfiguration|Set-DscLocalConfigurationManager|Start-DscConfiguration|Test-DscConfiguration|Update-DscConfiguration|" +
// Module PSDiagnostics
"Disable-PSTrace|Disable-PSWSManCombinedTrace|Disable-WSManTrace|Enable-PSTrace|Enable-PSWSManCombinedTrace|Enable-WSManTrace|Get-LogProperties|Set-LogProperties|Start-Trace|Stop-Trace|" +
// Module PSReadline
"PSConsoleHostReadline|Get-PSReadlineKeyHandler|Get-PSReadlineOption|Remove-PSReadlineKeyHandler|Set-PSReadlineKeyHandler|Set-PSReadlineOption|" +
// Module PSScheduledJob
"Add-JobTrigger|Disable-JobTrigger|Disable-ScheduledJob|Enable-JobTrigger|Enable-ScheduledJob|Get-JobTrigger|Get-ScheduledJob|Get-ScheduledJobOption|New-JobTrigger|New-ScheduledJobOption|Register-ScheduledJob|Remove-JobTrigger|Set-JobTrigger|Set-ScheduledJob|Set-ScheduledJobOption|Unregister-ScheduledJob|" +
// Module PSWorkflow
"New-PSWorkflowSession|New-PSWorkflowExecutionOption|" +
// Module PSWorkflowUtility
"Invoke-AsWorkflow|" +
// Module ScheduledTasks
"Disable-ScheduledTask|Enable-ScheduledTask|Export-ScheduledTask|Get-ClusteredScheduledTask|Get-ScheduledTask|Get-ScheduledTaskInfo|New-ScheduledTask|New-ScheduledTaskAction|New-ScheduledTaskPrincipal|New-ScheduledTaskSettingsSet|New-ScheduledTaskTrigger|Register-ClusteredScheduledTask|Register-ScheduledTask|Set-ClusteredScheduledTask|Set-ScheduledTask|Start-ScheduledTask|Stop-ScheduledTask|Unregister-ClusteredScheduledTask|Unregister-ScheduledTask|" +
// Module SecureBoot
"Confirm-SecureBootUEFI|Format-SecureBootUEFI|Get-SecureBootPolicy|Get-SecureBootUEFI|Set-SecureBootUEFI|" +
// Module SmbShare
"Block-SmbShareAccess|Close-SmbOpenFile|Close-SmbSession|Disable-SmbDelegation|Enable-SmbDelegation|Get-SmbBandwidthLimit|Get-SmbClientConfiguration|Get-SmbClientNetworkInterface|Get-SmbConnection|Get-SmbDelegation|Get-SmbMapping|Get-SmbMultichannelConnection|Get-SmbMultichannelConstraint|Get-SmbOpenFile|Get-SmbServerConfiguration|Get-SmbServerNetworkInterface|Get-SmbSession|Get-SmbShare|Get-SmbShareAccess|Grant-SmbShareAccess|New-SmbMapping|New-SmbMultichannelConstraint|New-SmbShare|Remove-SmbBandwidthLimit|Remove-SmbMapping|Remove-SmbMultichannelConstraint|Remove-SmbShare|Revoke-SmbShareAccess|Set-SmbBandwidthLimit|Set-SmbClientConfiguration|Set-SmbPathAcl|Set-SmbServerConfiguration|Set-SmbShare|Unblock-SmbShareAccess|Update-SmbMultichannelConnection|" +
// Module SmbWitness
"Move-SmbClient|Get-SmbWitnessClient|Move-SmbWitnessClient|" +
// Module StartLayout
"Get-StartApps|Export-StartLayout|Import-StartLayout|" +
// Module Storage
"Disable-PhysicalDiskIndication|Disable-StorageDiagnosticLog|Enable-PhysicalDiskIndication|Enable-StorageDiagnosticLog|Flush-Volume|Get-DiskSNV|Get-PhysicalDiskSNV|Get-StorageEnclosureSNV|Initialize-Volume|Write-FileSystemCache|Add-InitiatorIdToMaskingSet|Add-PartitionAccessPath|Add-PhysicalDisk|Add-TargetPortToMaskingSet|Add-VirtualDiskToMaskingSet|Block-FileShareAccess|Clear-Disk|Clear-FileStorageTier|Clear-StorageDiagnosticInfo|Connect-VirtualDisk|Debug-FileShare|Debug-StorageSubSystem|Debug-Volume|Disable-PhysicalDiskIdentification|Disable-StorageEnclosureIdentification|Disable-StorageHighAvailability|Disconnect-VirtualDisk|Dismount-DiskImage|Enable-PhysicalDiskIdentification|Enable-StorageEnclosureIdentification|Enable-StorageHighAvailability|Format-Volume|Get-DedupProperties|Get-Disk|Get-DiskImage|Get-DiskStorageNodeView|Get-FileIntegrity|Get-FileShare|Get-FileShareAccessControlEntry|Get-FileStorageTier|Get-InitiatorId|Get-InitiatorPort|Get-MaskingSet|Get-OffloadDataTransferSetting|Get-Partition|Get-PartitionSupportedSize|Get-PhysicalDisk|Get-PhysicalDiskStorageNodeView|Get-ResiliencySetting|Get-StorageAdvancedProperty|Get-StorageDiagnosticInfo|Get-StorageEnclosure|Get-StorageEnclosureStorageNodeView|Get-StorageEnclosureVendorData|Get-StorageFaultDomain|Get-StorageFileServer|Get-StorageFirmwareInformation|Get-StorageHealthAction|Get-StorageHealthReport|Get-StorageHealthSetting|Get-StorageJob|Get-StorageNode|Get-StoragePool|Get-StorageProvider|Get-StorageReliabilityCounter|Get-StorageSetting|Get-StorageSubSystem|Get-StorageTier|Get-StorageTierSupportedSize|Get-SupportedClusterSizes|Get-SupportedFileSystems|Get-TargetPort|Get-TargetPortal|Get-VirtualDisk|Get-VirtualDiskSupportedSize|Get-Volume|Get-VolumeCorruptionCount|Get-VolumeScrubPolicy|Grant-FileShareAccess|Hide-VirtualDisk|Initialize-Disk|Mount-DiskImage|New-FileShare|New-MaskingSet|New-Partition|New-StorageFileServer|New-StoragePool|New-StorageSubsystemVirtualDisk|New-StorageTier|New-VirtualDisk|New-VirtualDiskClone|New-VirtualDiskSnapshot|New-Volume|Optimize-StoragePool|Optimize-Volume|Register-StorageSubsystem|Remove-FileShare|Remove-InitiatorId|Remove-InitiatorIdFromMaskingSet|Remove-MaskingSet|Remove-Partition|Remove-PartitionAccessPath|Remove-PhysicalDisk|Remove-StorageFileServer|Remove-StorageHealthSetting|Remove-StoragePool|Remove-StorageTier|Remove-TargetPortFromMaskingSet|Remove-VirtualDisk|Remove-VirtualDiskFromMaskingSet|Rename-MaskingSet|Repair-FileIntegrity|Repair-VirtualDisk|Repair-Volume|Reset-PhysicalDisk|Reset-StorageReliabilityCounter|Resize-Partition|Resize-StorageTier|Resize-VirtualDisk|Revoke-FileShareAccess|Set-Disk|Set-FileIntegrity|Set-FileShare|Set-FileStorageTier|Set-InitiatorPort|Set-Partition|Set-PhysicalDisk|Set-ResiliencySetting|Set-StorageFileServer|Set-StorageHealthSetting|Set-StoragePool|Set-StorageProvider|Set-StorageSetting|Set-StorageSubSystem|Set-StorageTier|Set-VirtualDisk|Set-Volume|Set-VolumeScrubPolicy|Show-VirtualDisk|Start-StorageDiagnosticLog|Stop-StorageDiagnosticLog|Stop-StorageJob|Unblock-FileShareAccess|Unregister-StorageSubsystem|Update-Disk|Update-HostStorageCache|Update-StorageFirmware|Update-StoragePool|Update-StorageProviderCache|Write-VolumeCache|" +
// Module TLS
"Disable-TlsCipherSuite|Disable-TlsSessionTicketKey|Enable-TlsCipherSuite|Enable-TlsSessionTicketKey|Export-TlsSessionTicketKey|Get-TlsCipherSuite|New-TlsSessionTicketKey|" +
// Module TroubleshootingPack
"Get-TroubleshootingPack|Invoke-TroubleshootingPack|" +
// Module TrustedPlatformModule
"Clear-Tpm|ConvertTo-TpmOwnerAuth|Disable-TpmAutoProvisioning|Enable-TpmAutoProvisioning|Get-Tpm|Get-TpmEndorsementKeyInfo|Get-TpmSupportedFeature|Import-TpmOwnerAuth|Initialize-Tpm|Set-TpmOwnerAuth|Unblock-Tpm|" +
// Module VpnClient
"Add-VpnConnection|Add-VpnConnectionRoute|Add-VpnConnectionTriggerApplication|Add-VpnConnectionTriggerDnsConfiguration|Add-VpnConnectionTriggerTrustedNetwork|Get-VpnConnection|Get-VpnConnectionTrigger|New-EapConfiguration|New-VpnServerAddress|Remove-VpnConnection|Remove-VpnConnectionRoute|Remove-VpnConnectionTriggerApplication|Remove-VpnConnectionTriggerDnsConfiguration|Remove-VpnConnectionTriggerTrustedNetwork|Set-VpnConnection|Set-VpnConnectionIPsecConfiguration|Set-VpnConnectionProxy|Set-VpnConnectionTriggerDnsConfiguration|Set-VpnConnectionTriggerTrustedNetwork|" +
// Module Wdac
"Add-OdbcDsn|Disable-OdbcPerfCounter|Disable-WdacBidTrace|Enable-OdbcPerfCounter|Enable-WdacBidTrace|Get-OdbcDriver|Get-OdbcDsn|Get-OdbcPerfCounter|Get-WdacBidTrace|Remove-OdbcDsn|Set-OdbcDriver|Set-OdbcDsn|" +
// Module WindowsDeveloperLicense
"Get-WindowsDeveloperLicense|Show-WindowsDeveloperLicenseRegistration|Unregister-WindowsDeveloperLicense|" +
// Module WindowsErrorReporting
"Disable-WindowsErrorReporting|Enable-WindowsErrorReporting|Get-WindowsErrorReporting|" +
// Module WindowsSearch
"Get-WindowsSearchSetting|Set-WindowsSearchSetting|" +
// Module WindowsUpdate
"Get-WindowsUpdateLog"
);
var keywordMapper = this.createKeywordMapper({
"support.function": builtinFunctions,
"keyword": keywords
}, "identifier");
// Help Reference: about_Operators
// https://technet.microsoft.com/en-us/library/hh847732.aspx
var binaryOperatorsRe = (
// Comparison Operators
"eq|ne|gt|lt|le|ge|like|notlike|match|notmatch|contains|notcontains|in|notin|band|bor|bxor|bnot|" +
"ceq|cne|cgt|clt|cle|cge|clike|cnotlike|cmatch|cnotmatch|ccontains|cnotcontains|cin|cnotin|" +
"ieq|ine|igt|ilt|ile|ige|ilike|inotlike|imatch|inotmatch|icontains|inotcontains|iin|inotin|" +
// Logical Operators
"and|or|xor|not|" +
// String Operators
"split|join|replace|f|" +
"csplit|creplace|" +
"isplit|ireplace|" +
// Type Operators
"is|isnot|as|" +
// Shift Operators
"shl|shr"
);
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
this.$rules = {
"start" : [
{
token : "comment",
regex : "#.*$"
}, {
token : "comment.start",
regex : "<#",
next : "comment"
}, {
token : "string", // single line
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // single line
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "constant.numeric", // hex
regex : "0[xX][0-9a-fA-F]+\\b"
}, {
token : "constant.numeric", // float
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
}, {
token : "constant.language.boolean",
regex : "[$](?:[Tt]rue|[Ff]alse)\\b"
}, {
token : "constant.language",
regex : "[$][Nn]ull\\b"
}, {
token : "variable.instance",
regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b"
}, {
token : keywordMapper,
// TODO: Unicode escape sequences
// TODO: Unicode identifiers
regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b"
}, {
token : "keyword.operator",
regex : "\\-(?:" + binaryOperatorsRe + ")"
}, {
// Arithmetic, Assignment, Redirection, Call, Not & Pipeline Operators
token : "keyword.operator",
regex : "&|\\+|\\-|\\*|\\/|\\%|\\=|\\>|\\&|\\!|\\|"
}, {
token : "lparen",
regex : "[[({]"
}, {
token : "rparen",
regex : "[\\])}]"
}, {
token : "text",
regex : "\\s+"
}
],
"comment" : [
{
token : "comment.end",
regex : "#>",
next : "start"
}, {
token : "doc.comment.tag",
regex : "^\\.\\w+"
}, {
defaultToken : "comment"
}
]
};
};
oop.inherits(PowershellHighlightRules, TextHighlightRules);
exports.PowershellHighlightRules = PowershellHighlightRules;
});
| 132.9 | 3,231 | 0.800486 |
734886bf2e49eb82b1ff0ec43481e143e37b98f6 | 56,660 | js | JavaScript | docs/API/_localization_data_id_8cs.js | vgwb-private/EA4S_Antura_U3D | 4bea1028f6b22b6b3e901414e089602359517168 | [
"CC-BY-4.0"
] | null | null | null | docs/API/_localization_data_id_8cs.js | vgwb-private/EA4S_Antura_U3D | 4bea1028f6b22b6b3e901414e089602359517168 | [
"CC-BY-4.0"
] | null | null | null | docs/API/_localization_data_id_8cs.js | vgwb-private/EA4S_Antura_U3D | 4bea1028f6b22b6b3e901414e089602359517168 | [
"CC-BY-4.0"
] | null | null | null | var _localization_data_id_8cs =
[
[ "LocalizationDataId", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfd", [
[ "None", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6adf97f83acf6453d4a6a4b1070f3754", null ],
[ "Action_ChooseAvatar", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad50e7f25c9312d58eb320026f8a8f551", null ],
[ "Action_ConfirmNewProfile", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9c2df23c247921c262ca00d9cf5b9967", null ],
[ "Action_Createprofile", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5a6995da350331aad245434c81794702", null ],
[ "Action_PressPlay", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5db8b25aa35272cb4f26f9ca18736b02", null ],
[ "AlphabetSong_alphabet_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda89f1650d3dbfb35e417497c625616a77", null ],
[ "AlphabetSong_alphabet_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad92269ca845bfcda7ae5cf108c97bb6f", null ],
[ "AlphabetSong_alphabet_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdabf636286c41041dc1fb735daf9c19283", null ],
[ "AnturaSpace_Custom_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda580cf130969f40393995e351920e1dec", null ],
[ "AnturaSpace_Custom_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaff75e0adfd447a902bef757897feae62", null ],
[ "AnturaSpace_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda31e7eb1e8f7f1f86c8867b35789ba8c0", null ],
[ "AnturaSpace_Intro_Cookie", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4da28dc78cb0f485b6a96b47d67c19f4", null ],
[ "AnturaSpace_Intro_Touch", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda27524ebea001801c0ec86781d761846c", null ],
[ "AnturaSpace_Tuto_Cookie_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad28dbf9e38384d97dc0070b14619d535", null ],
[ "AnturaSpace_Tuto_Cookie_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda0a5e0388985933241d6df7439e0432e2", null ],
[ "AnturaSpace_Tuto_Cookie_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda39b5452d01897118af67d463ac6cd4ba", null ],
[ "Assessment_Classify_Letters", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2cbbd72706b5cdf1d099803302496385", null ],
[ "Assessment_Classify_Letters_Article", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda19a605309a1541d28ebc323241b9fd6d", null ],
[ "Assessment_Classify_Word_Article", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad21c35412d13651e5e539dfdae374b2f", null ],
[ "Assessment_Classify_Word_Nouns", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad562f04cb2586274cd247e0078181b63", null ],
[ "Assessment_Classify_Words_Article", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa7b2ef6a2d9cf8ddbd6b088eb40ef749", null ],
[ "Assessment_Complete_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8346a52d9e49d77eb329c7508b0303bd", null ],
[ "Assessment_Complete_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2a23a00a0ddc59e24a7d5a8cc91e7453", null ],
[ "Assessment_Complete_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1855c1aa4fd7a69267bbf8da80f0a468", null ],
[ "Assessment_Dog_Gone_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda58bbf88e584123f177cc91e7cee54a25", null ],
[ "Assessment_Dog_Gone_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7974593d5f109941476622e62ee4f85a", null ],
[ "Assessment_Dog_Gone_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda678558c5be7c2210080dcf108493d561", null ],
[ "Assessment_Match_Letters_Words", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa01530a54a065f6a5446291a9eeefc87", null ],
[ "Assessment_Match_Sentences", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdafe3de2d9a0bde3ce92c2a95221daa8f2", null ],
[ "Assessment_Match_Word_Image", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda68931bee82b2ae6fa155a80e6e0c82f8", null ],
[ "Assessment_Order_Letters", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaac731fbe627d7ca8889634d8bebc49f0", null ],
[ "Assessment_Push_Dog_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda49c85fc0b22575551fde7a651a70900d", null ],
[ "Assessment_Push_Dog_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacb8a8501d5a104d8c326e2ad02ddf19f", null ],
[ "Assessment_Push_Dog_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda0a95241567afe3b8d9b3fc5c1db636b0", null ],
[ "Assessment_Select_Letter_Image", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5b4f1c47303e05cae4a570ac29801030", null ],
[ "Assessment_Select_Letter_Listen", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6d623f6fd396c13ca11c83c82126f873", null ],
[ "Assessment_Select_Word_Listen", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5a376402e3390e459ba428987351cf89", null ],
[ "Assessment_Select_Words", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4f94373a6d61f70a9e8e9acb97ae5573", null ],
[ "Assessment_Start_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa1eee2c0a57c4f0077fe2f46d667a487", null ],
[ "Assessment_Start_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda61c2bf1a4132595cbd3484e61bfaf034", null ],
[ "Assessment_Start_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaef2ce3abff002156cc8d2a91f6c0a29c", null ],
[ "Assessment_Upset_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae8e650358f6aa9a345a7001bcf2e36cd", null ],
[ "Assessment_Upset_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae726493ab5833716227f0c5f5f570872", null ],
[ "Assessment_Upset_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1a51bfc199e59ba739c7cd53627aec2d", null ],
[ "Assessment_Wrong_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4e561a8b7e9c337fb7a9384a4ff65ab3", null ],
[ "Assessment_Wrong_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa521de8f6caddee42e6fdb8cc953ce8c", null ],
[ "Assessment_Wrong_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1c37ecece8b5ad5b1eebeef195433ed5", null ],
[ "Balloons_counting_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8c9078407bad763abb6f2c29518e00a9", null ],
[ "Balloons_counting_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda49e618295ce2c93f62baeb76a649d593", null ],
[ "Balloons_counting_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdabfacffa3a78bfeaaa2d8009642c5b5bb", null ],
[ "Balloons_letter_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4ad8971193c163043f3abe6af903c938", null ],
[ "Balloons_letter_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2ef57ee8d12457b4581e55a3f507473a", null ],
[ "Balloons_letter_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda87c12f2ce8faefde8c6910281a4b1f65", null ],
[ "Balloons_spelling_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdabde552376bfbbdabc391d97ccd03730f", null ],
[ "Balloons_spelling_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad46785a449d0da506c6e9004a403fdb2", null ],
[ "Balloons_spelling_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7e9a93730324c810772c94b163b6b1e1", null ],
[ "Balloons_words_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacbd4a24cf0d4e29e97a1ae342e7f5c85", null ],
[ "Balloons_words_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4fb6beedc9ba2d14372bfbf299a83c7b", null ],
[ "Balloons_words_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda519b6b71bb2002c367fd519be1b71b34", null ],
[ "Book_Games", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaed9f319f2a762c56439d687bf40d3a7d", null ],
[ "Book_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda3523a19a6f01e1a11d7aab2db27d9e44", null ],
[ "Book_Letters", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5fa79b117f2617c105843da5e2af2588", null ],
[ "Book_Phrases", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda15f89fbfbb7e6684cfb4809a77d60952", null ],
[ "Book_Rewards", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5375490cac5e622847c208cf7a41ac90", null ],
[ "Book_Words", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf118c686a515c2d5ef54b1232c60a300", null ],
[ "ColorTickle_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda23272a9dc96cf64d75aecae5bf1da42c", null ],
[ "ColorTickle_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda02eb7243d91b61bb8582fa382c8e30cd", null ],
[ "ColorTickle_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2bc40dee9b4b02066eed0850c94b202b", null ],
[ "DancingDots_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad506d4b978d12f5dea21493c3f9c8c27", null ],
[ "DancingDots_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdada4479fab5877a28bc2d2b20e724d208", null ],
[ "DancingDots_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6c40cfd35f28ea45052cdc736e5a2843", null ],
[ "AlphabetSong_letters_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9408d3ce1876d9e30e16990ea47e682f", null ],
[ "AlphabetSong_letters_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6efbee599cf7708954f0a00aa8ee7407", null ],
[ "Egg_sequence_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdafa3d0105e153d8d5a06bec864d484aa5", null ],
[ "Egg_sequence_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab31c8c8d68f6d40a81905a9188d55910", null ],
[ "Egg_letters_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda916fa74a36dc7671f798a6696bf49814", null ],
[ "Egg_sequence_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdabb3042605441f3d8c7f0aef90ad0b603", null ],
[ "FastCrowd_alphabet_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda66cdd628dfbdb9012e73c84314c84c1c", null ],
[ "FastCrowd_alphabet_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda896b43838f2830637d03cc1736d697cc", null ],
[ "FastCrowd_alphabet_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4c7fc972f365fb2b3a076010d9ebb9e3", null ],
[ "FastCrowd_counting_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda380049149e7208bcf96c1164db095919", null ],
[ "FastCrowd_counting_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa3ba64f31965af343cbf827e3df0e57a", null ],
[ "FastCrowd_counting_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac3063dfd374637fcec61cf1d250c5992", null ],
[ "FastCrowd_letter_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda48a1260a164a6581049cc9a5057e083c", null ],
[ "FastCrowd_letter_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda341adc6edd6de01a00bcc108eab43f79", null ],
[ "FastCrowd_letter_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac80675c13dd9f049aa6e091764245901", null ],
[ "FastCrowd_spelling_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda268f96633350206ee53c8282e0c3b181", null ],
[ "FastCrowd_spelling_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda40700616498ee691be07796c62df92b2", null ],
[ "FastCrowd_spelling_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda282bd13e8220df060dab2f55e2460afa", null ],
[ "FastCrowd_words_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7eb600aef13a32f2862713a85f87516a", null ],
[ "FastCrowd_words_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda90cff6ce2390b977c13e250258b6dd64", null ],
[ "FastCrowd_words_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad331e45daca3ff83d2ff4d86647cd7fe", null ],
[ "Game_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda994861ea2ed9c7fbcd312c52113fafe7", null ],
[ "HideSeek_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa87492d53191c9555ac571c780fb47f8", null ],
[ "HideSeek_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda027c185334e709024f40bcb4113344a2", null ],
[ "HideSeek_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5f9f4ae66332b890fa0cd947d4a73e3b", null ],
[ "HideSeek_Words_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1b1b3200bb1d9acee70e80addbf9d8be", null ],
[ "HideSeek_Words_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2535f6940d53e509d5aa95a45ef783d4", null ],
[ "HideSeek_Words_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab78ff919104bdbfc07e3e9255f71299d", null ],
[ "Intro_Dog", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda55f09bbf85294d0455efce156665d211", null ],
[ "Intro_Dog_Chase", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2a87657406b0c11b82b968198c631f74", null ],
[ "Intro_Letters_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda902223112cac24d1a2ecf17361e1714b", null ],
[ "Intro_Letters_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda708cfa834154cae69bd6aa7781e0b4ec", null ],
[ "Intro_welcome", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4ba507e2e8fa5435e82fe967f0dbfaa0", null ],
[ "Keeper_AttempsOver", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda3d162389b99f028cf3ac11ab37dd5a63", null ],
[ "Keeper_Bad_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda426a49dac7df0b99933946ec9f1243de", null ],
[ "Keeper_Bad_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4554e48048924f2f7b4df4207e39a797", null ],
[ "Keeper_Bad_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdadf7c5c4eedaf003615f6a0167937996d", null ],
[ "Keeper_Bad_4", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda40a50d262b3865385d4ccfa5156b9ea2", null ],
[ "Keeper_Bad_5", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda60ab57e153d6c7c97348e37d26f9fad6", null ],
[ "Keeper_GetReady", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6987778bd931fe3c7970ad13de45d361", null ],
[ "Keeper_Good_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae25d6e3cc9097e6cf66e40f5dba4b532", null ],
[ "Keeper_Good_10", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac11b570df9ccfe75bc400ec68b2366f4", null ],
[ "Keeper_Good_11", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda23dd3d7e766cd9a577d70e52022f9eb3", null ],
[ "Keeper_Good_12", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdabd59cd93b9c0b23696f0edaedc32e210", null ],
[ "Keeper_Good_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacb661ca2388263c471887d73f0626f0f", null ],
[ "Keeper_Good_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda15844e2287bae98d5092ec5d943b3ba8", null ],
[ "Keeper_Good_4", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda328b3b370342b4eebafed3179299a280", null ],
[ "Keeper_Good_5", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda94d02917c5feb975160ee89ae701c71f", null ],
[ "Keeper_Good_6", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac4c0b4ea030d9ea232cc7a1d3a0f735c", null ],
[ "Keeper_Good_7", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf39e1a8e6ed496587f020c3facfc5d2f", null ],
[ "Keeper_Good_8", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7298ea2c92e4fa70c2b7516b882a4e7d", null ],
[ "Keeper_Good_9", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5e7785093a510c7c3300f1a959cf987e", null ],
[ "Keeper_Last_Attempt_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf06f29c22019f8dd0da7e784ecced1b2", null ],
[ "Keeper_Last_Attempt_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda36cb8fce76910d4ca1829d882d7ac2c1", null ],
[ "Keeper_Last_Attempt_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9ead377c291673e727a1ab37780dc33b", null ],
[ "Keeper_Remember", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf96f1a9db87b2630c04b43f5ce579872", null ],
[ "Keeper_Time_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda236584424327adafb36f84fc548fa06d", null ],
[ "Keeper_Time_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaab00ac10b6d55f6b20157f690f5a08c5", null ],
[ "Keeper_Time_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac209b915d686601282533f58e4b00416", null ],
[ "Keeper_TimeUp", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda79cc9567866fddb052acaa6d424dfc20", null ],
[ "LB_1_01", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda57b6c992bfe6b2cc7ad9a80fa48dd162", null ],
[ "LB_1_02", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaadeebf104d284e2d1c68f09e5bd37fbb", null ],
[ "LB_1_03", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4ba98fa7aa7c70fb198aca62e9e818e6", null ],
[ "LB_1_04", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaada607900ea7e8e6661fa16c7d44cd4d", null ],
[ "LB_1_05", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda76ce06f135b33a85724b44af78cc2837", null ],
[ "LB_1_06", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda40a817b9ba1ed1e73db1f83de8590308", null ],
[ "LB_1_07", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaffc38c0de15703319173f2b8fb3f0d02", null ],
[ "LB_1_08", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaaaa08f7c820480719c6731910b1f8f3b", null ],
[ "LB_1_09", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8e335781a6f4b26e0e3a62c07a1bbe8e", null ],
[ "LB_1_10", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4ecec2c73497ae76504814be69806b93", null ],
[ "LB_1_11", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad580d895ca7cadcdb7dcc0d3f17a56fa", null ],
[ "LB_1_12", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaca3f977641d26529f976bc356c74ed74", null ],
[ "LB_1_13", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1f7e9fd2b67442c95bff5b5f41b98693", null ],
[ "LB_1_14", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2076ffeafb8e80d7e40861b0baebc02e", null ],
[ "LB_2_01", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda755fa8f1665ff39a6dbc15b1c15c795f", null ],
[ "LB_2_02", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad09772cdb8a522f705290b77e9d0e58c", null ],
[ "LB_2_03", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa5c1e182d851d7a325e741debae278e8", null ],
[ "LB_2_04", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda171a7edef54e4e3092eb479c5cc131db", null ],
[ "LB_2_05", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda538efd2db0459a048856e04c53f9a71b", null ],
[ "LB_2_06", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4d06d037592a7cc6a6a363a7f2a552d4", null ],
[ "LB_2_07", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab4b54ae98fd129ab7954da1257c8ef82", null ],
[ "LB_2_08", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf4446ad7c38cb1171e788ec2bfd9e55b", null ],
[ "LB_2_09", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2e98dfe6879849c9f785e0e6cb2d9198", null ],
[ "LB_2_10", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda43e16e3d77d0bd76e23f46d1ea01c631", null ],
[ "LB_2_11", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae1e3c6fa5c4b7edb00a6782417cefa75", null ],
[ "LB_2_12", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda40c13131ac74cee322285fe6ce7f78f5", null ],
[ "LB_2_13", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda18683cf2c5d62d3040a64656cbd92915", null ],
[ "LB_2_14", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda33b7db327e1bcd4a2e0a18d78cba9629", null ],
[ "LB_3_01", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaed0ff58fe3346216cdc0e0b6bf141b55", null ],
[ "LB_3_02", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaff164b6d2175171ee593275026c0110f", null ],
[ "LB_3_03", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae29744833877d26358cb3dbe127a6052", null ],
[ "LB_3_04", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda36b12b0678b7691e2ad6c20085159f3d", null ],
[ "LB_3_05", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7e8e22325de115cb590b22f335796b81", null ],
[ "LB_3_06", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad99199770bcec0a479dad4f4a9b7db6b", null ],
[ "LB_3_07", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacf9f529977afedeef05b9ba376fb9120", null ],
[ "LB_3_08", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad447393bd8fe2fbb01b46d668f338abe", null ],
[ "LB_3_09", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda94023ead5a00a2fa21621a612379ad09", null ],
[ "LB_3_10", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda70aefba1c7feffc8c223b7a42cef9005", null ],
[ "LB_3_11", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda031e994af107fb83421a5a06d696bb5f", null ],
[ "LB_3_12", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda3d367aeec53b2d88b579c1cb011b20ac", null ],
[ "LB_3_13", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda45c8f45b3f3ec783d52852983251efd2", null ],
[ "LB_3_14", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda16046bd882cbc737a7c10b1767edfde1", null ],
[ "LB_4_01", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9c2fbd846352d0756db996fd446a19c4", null ],
[ "LB_4_02", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5a711e40a06598b5c312f0194d312cbe", null ],
[ "LB_4_03", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa79d0684cda3ac13e4c91a21ebd83a80", null ],
[ "LB_4_04", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaae6cf3e4c9a4cd897ff4ef39e24b4621", null ],
[ "LB_4_05", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda704deeda490c17509ab83a861cca9509", null ],
[ "LB_4_06", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad1c5977971ce5901c2bc6f0e5c984362", null ],
[ "LB_4_07", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7b4d798d694041effb4b91ef5a5f50f8", null ],
[ "LB_4_08", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacffa1672548f782975279def71700f1d", null ],
[ "LB_4_09", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7fb8413cd55ac990742c21ac6613b3c6", null ],
[ "LB_4_10", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda17aaa841ed01d12d2e03780e00a81a3c", null ],
[ "LB_4_11", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda237d74bfc65a0868ff2edb4f87a27e9f", null ],
[ "LB_4_12", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaaec3d46b1141702606dcf42560f6687a", null ],
[ "LB_4_13", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda640c4dbd33e586779a79c8eada64c014", null ],
[ "LB_4_14", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2da52d080c3192fe04429222728d0e33", null ],
[ "LB_4_15", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda49e7c8de246c1d59abb40b5270a6ab87", null ],
[ "LB_5_01", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa16467b8b9a002d9b20625011241f3e0", null ],
[ "LB_5_02", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab6f1ab1ebb9209b86d6e04e7116de184", null ],
[ "LB_5_03", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9008530feb3df5cf7cd4d04d19543838", null ],
[ "LB_5_04", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda0f60f7fa5301326365166f680c243052", null ],
[ "LB_5_05", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda25ac9d18b4fb35929f0ef390b27fc613", null ],
[ "LB_5_06", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda33651f4861c37c5aa30ee15dfb6491d9", null ],
[ "LB_5_07", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda455c10cd8776cbe76f29aef0cd7d6265", null ],
[ "LB_5_08", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae54506c5adec229e7a8ba9c697e162ba", null ],
[ "LB_5_09", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6f7c87a41eba1ab23902a23df8eb49dd", null ],
[ "LB_5_10", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa638d4dc2dea8a34fe1950caf0da1c56", null ],
[ "LB_5_11", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4533e338448d79d52ade04342788ae0b", null ],
[ "LB_5_12", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5f0c5d768855a3e2e3caca0179a8a261", null ],
[ "LB_5_13", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda49981848c568237ba819be8e7d257856", null ],
[ "LB_6_01", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda22de50ff6db4883f188643d8efbdc988", null ],
[ "LB_6_02", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac5eb7cb7bb724dc504e21468f4611950", null ],
[ "LB_6_03", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda194b8d06e9c2dbf72038f14acdec4451", null ],
[ "LB_6_04", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6fe401934c60bf37742c8e93fee32376", null ],
[ "LB_6_05", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8d2f692638ac495fb37039a4c9ca1026", null ],
[ "LB_6_06", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaefa05b26fbbc3802a1549c4c3d0a8840", null ],
[ "LB_6_07", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6b9305ca4f996b90d9cf1c7832adeda2", null ],
[ "LB_6_08", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5ca799e1306bad15f9cb0405bd7fd53e", null ],
[ "LB_6_09", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdafec93326b08b6662aec70f74abec19de", null ],
[ "LB_6_10", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaed85ee833f932c7fc629f82e74b8be90", null ],
[ "LB_6_11", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4c73f0a3ace4640a97e5c7aa0acae68b", null ],
[ "LB_6_12", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf3b213662cc8470cf94cea4e35a18f3e", null ],
[ "LB_6_13", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa40d6a79447cc3c6d613c6804ddbc83b", null ],
[ "LB_6_14", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda844e626918edb6411106dd8394c146bc", null ],
[ "LB_6_15", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda38c36591d1e85c42c37093af80106d81", null ],
[ "MakeFriends_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdafcffbff36c9f983c821f30dd3914887e", null ],
[ "MakeFriends_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda49e8c1f2f117f5fd3740e35f18ff41c4", null ],
[ "MakeFriends_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda080099e5896e114d7bbbd864511689f8", null ],
[ "Map_Back_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8435e17548d835667d8fd70af3bd5059", null ],
[ "Map_Back_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1c8f818bed6a434bf276f703e7eb94b0", null ],
[ "Map_Back_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf84059f2989e22192f37d9f2fa8b7d3d", null ],
[ "Map_End_LB_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda73a6419d0881fa32f1cdef0d7676a63a", null ],
[ "Map_End_LB_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda14fa991b27a21dec130b026e7e4016ce", null ],
[ "Map_End_LB_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda25bc2dc0784930610083b3b213692b8e", null ],
[ "Map_EndGame", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda52979e4428885551d9998d883ef07d0d", null ],
[ "Map_EndWorld", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7d771c6d42d9225b83e166cb63aab91d", null ],
[ "Map_First", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8567fbebb2f6582457bb33d9235f5279", null ],
[ "Map_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda106379831334a4c3ab9d870554fbd507", null ],
[ "Map_Intro_AnturaSpace", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad976a55a7ef2f41e02948f78764fbd05", null ],
[ "Map_Intro_Map1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda42137ac1ad9c234af092b868c4407a1e", null ],
[ "Map_Intro_Map2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda50cbbc55af7183a819084c35d5b24753", null ],
[ "Map_Intro_Map3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda719f0b07f575fb149f732585dea33070", null ],
[ "Map_Intro_Map4", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda001f15c7979e564ead8a422682df405e", null ],
[ "Map_Intro_Map5", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5635d4e70d9fb37ebaaa0d7faf6ebb2c", null ],
[ "Map_Intro_Map6", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaef8be0e9d63bc2d0dc01a00fe6caa159", null ],
[ "Map_NewMap", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1db7ec4bbffa7b54be2b42b0eef09abc", null ],
[ "Map_Welcome_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda615084ff834b1bd185c27bd59d5d8a16", null ],
[ "Map_Welcome_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa703cf15ed5f9481d500cca24e5886d9", null ],
[ "Map_Welcome_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab98655e3b657419c8416dcb81ad2c9ac", null ],
[ "Maze_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda11d3da2bd8064dfb267eaab842aedfb7", null ],
[ "Maze_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5774f28f2c3519791e593439d3ff2171", null ],
[ "Maze_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaddc2e7dd5c560519a9729d5193f08a7a", null ],
[ "MissingLetter_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda86e2f3f0cb93fcf2b6f40bde76810376", null ],
[ "MissingLetter_phrases_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad1a3ba7c3e053bf4e6d7da62728075bb", null ],
[ "MissingLetter_phrases_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda422508672b67840863683682b2bc6d02", null ],
[ "MissingLetter_phrases_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda622597889d7152b5cd1cce27895ad2f5", null ],
[ "MissingLetter_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda729a7a77e74136d01dbd9fd44a2d557b", null ],
[ "MissingLetter_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdadfc7b727aef638b8fe5cc9c9f453c856", null ],
[ "MixedLetters_alphabet_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda62f8535df9f44a1af3748f959f748592", null ],
[ "MixedLetters_alphabet_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdadb0e88caf230582d8766b40a64241ec6", null ],
[ "MixedLetters_alphabet_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6683bf790ff77f8fab1611660af7d557", null ],
[ "MixedLetters_spelling_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda55298480d1d95678d033065b1866a307", null ],
[ "MixedLetters_spelling_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa2079c6857786e7097c085b031df72ce", null ],
[ "MixedLetters_spelling_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaaa74b59430dff9b20e8c9762576793ba", null ],
[ "Mood_Question_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1ce0f1414b33d291532d86bab71dc19c", null ],
[ "Mood_Question_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5642cefdd680587d86b8fd72bf5cfb7b", null ],
[ "Mood_Question_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4c7dbbe659fc71fbaae42595b3ee3e60", null ],
[ "ReadingGame_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6e1f35b9d98e84ec9da0cd8591898842", null ],
[ "ReadingGame_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda778442324c16bbe6992c25b0dfc1b95a", null ],
[ "ReadingGame_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9c11ec103dc32f69229d948e564eba74", null ],
[ "Reward_0Star", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacc2bdd9968a1a54234daaebd1be98c77", null ],
[ "Reward_1Star_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda37b92889e889b45f5ff3bac53c439180", null ],
[ "Reward_1Star_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5d5a0058a2c8b38228ba8d99f39eabf4", null ],
[ "Reward_1Star_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4eebabdb51fa836e0d8ffa2de9fbd29b", null ],
[ "Reward_2Star_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdabedf14fad8b27f981231a5b541dccf50", null ],
[ "Reward_2Star_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7eb714b875eac9b70cf95180de6f752f", null ],
[ "Reward_2Star_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7b02ee4d94e5f11fb773d6a4c0793f7f", null ],
[ "Reward_3Star_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4fb3cb482bab34463ae1448a24787ee2", null ],
[ "Reward_3Star_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae364e8f164434dcb8508c256291d3656", null ],
[ "Reward_3Star_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6b729e99b6c9560bfb8176c7b4714f93", null ],
[ "Reward_Big_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda63329d11b5952aa0e8f8a77dfc06d70a", null ],
[ "Reward_Big_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda896a881eb6b5198789e7a1c8c543f311", null ],
[ "Reward_Big_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda57152cb09588c8651a7802fdef1cc80c", null ],
[ "Reward_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac68a7d0559c3d05b4ade1f8e6704522d", null ],
[ "Scanner_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda3c099c2434fd64d34efe645c115d547e", null ],
[ "Scanner_phrase_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4e6c55f3bdceb99bcda385277897ca2d", null ],
[ "Scanner_phrase_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda1c79e739dd3558ae69a23dcdf578b746", null ],
[ "Scanner_phrase_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf171daee0125a268b9f5d2c8ab5a93fe", null ],
[ "Scanner_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda0f952db281fa52461d6c880d896d90b4", null ],
[ "Scanner_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda70cefe90fc25022302c39cc021a7bd4d", null ],
[ "SelectGame_Begin_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda39aa3b1bb80741bab1f6f09d70117959", null ],
[ "SelectGame_Begin_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab800da60dcd0b8cf9a1f9fa87dcd9778", null ],
[ "SelectGame_Begin_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5d7c68bad7fc6647688f8dc1bf2402b3", null ],
[ "SelectGame_Tuto_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae3ed473e8ee2f28556b4eee3657272b0", null ],
[ "SelectGame_Tuto_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6334e64eb7208de8f2bca9c41f77371f", null ],
[ "SelectGame_Tuto_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda234adfe90fea570408fd23f3b82227d5", null ],
[ "SickLetters_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9a00b7a83dc445b31f97b8a635bbb54b", null ],
[ "SickLetters_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8b389e566c01c08a6c880d8deb8d4432", null ],
[ "SickLetters_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8c1722db60ab39c86aed5f01e2cc2c97", null ],
[ "TakeMeHome_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8e9c028b249dda467956679c31e04904", null ],
[ "TakeMeHome_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf4804a45e1a9940b962585aa1a7a1986", null ],
[ "TakeMeHome_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae0b3cec1cd6783bf78329399cfeb0d68", null ],
[ "TakeMeHome_Tuto_Reminder", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4182c8adcf862d5b2bfbac22fe4f800c", null ],
[ "ThrowBalls_Extra_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6807c9ed075aa26074b2f40deabebbe0", null ],
[ "ThrowBalls_Extra_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda81489f0d7647bec4526d1d452d77ce56", null ],
[ "ThrowBalls_letterinword_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae0b57c844985f4774ac319b388909cc5", null ],
[ "ThrowBalls_letterinword_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad47cc3f8078359402967447641ef9051", null ],
[ "ThrowBalls_letters_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda410f450c863e5eefbf6f664b720315ee", null ],
[ "ThrowBalls_letters_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda88609bafe6124e3d6f7a9e0180ede5b8", null ],
[ "ThrowBalls_letters_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae2aaa8d731f90fd238aebc6f869bcbeb", null ],
[ "ThrowBalls_words_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda40f52a6ac41401cf0d7ca6893a317a3d", null ],
[ "ThrowBalls_words_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda77a745328f05daa0026bea8c903e35da", null ],
[ "Tobogan_letters_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda25646070b50c9c32ea912019aac74efd", null ],
[ "Tobogan_letters_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda326907d77343581bdd7aae1d4c8d026a", null ],
[ "Tobogan_letters_Tuto", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda50b95ef15c3c9b5157bd3950c5fefa45", null ],
[ "Tobogan_words_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda8d75165b8145597a74b0044fb23d2f2a", null ],
[ "Tobogan_words_Tuto_Article", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac00442b9c486c37e2e3ac9db7462e329", null ],
[ "Tobogan_words_Tuto_Letter", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaaf2bfdd3d32a058a543a17721339fc70", null ],
[ "Tobogan_words_Tuto_Word", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad0c0e723882f19b4a53d5f37c9663235", null ],
[ "UI_All", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4e1b4926cbf15f0405ce92ccdee25086", null ],
[ "UI_Animals", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda47c060275475350ee2939f1797019c45", null ],
[ "UI_BodyParts", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda53c51c2338c4c4c572fe87b761f77359", null ],
[ "UI_Clothes", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae1cc75e6a7dab3fb4a250d2fa89a2b5f", null ],
[ "UI_Colors", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7a40ea1f2505a7f9da8b074794ad7a28", null ],
[ "UI_Combinations", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac1bacc5533fd14bd1c1ca0ad19799fbd", null ],
[ "UI_Directions", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda222932fdc7ea1aed21e97e9c4d9ff74e", null ],
[ "UI_FamilyMembers", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf04f1c15f446d08387372114f8f4c32b", null ],
[ "UI_Feelings", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacf665be1e6964e059d2b17c3a408b168", null ],
[ "UI_Food", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab74cc421e3a59cb71d7f18b32217a048", null ],
[ "UI_Furniture", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf28a9ad5abfaf4f1ffcf564864881989", null ],
[ "UI_Games", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa9fd8686b34fcb641bd784d3b3b41beb", null ],
[ "UI_Jobs", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac6f0d692591a04dd456f44a32ef69d14", null ],
[ "UI_Letters", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda933b373412aa1f8c89709824763a3736", null ],
[ "UI_Nature", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac4a79adc5affae6184b3df0338d8d345", null ],
[ "UI_Noun", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf57ef676e25806184b7fd08d79d4e401", null ],
[ "UI_Numbers", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5c07d33cafa0c89af5bae6a0b654e136", null ],
[ "UI_People", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda816ff98a72fbe75bac9f9a61fe7213ea", null ],
[ "UI_Phrases", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7cfb1467d017d0159bb34a72eb57e4ed", null ],
[ "UI_Places", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda55704c116c9716482562233f1e9c20ee", null ],
[ "UI_Positions", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf564f7e35bf47d7586d6393154203ca7", null ],
[ "UI_Preposition", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac67a045f58119eee4f93555fb21c05ea", null ],
[ "UI_Special", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf044fb95a82a527cecc19c1a5ac438c3", null ],
[ "UI_Sports", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7a3412c253f06682ef9c9164e4168482", null ],
[ "UI_Symbols", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda139435da6543b1e11d1abb3b8c21ba2d", null ],
[ "UI_Things", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda37393a554c0e1c4332d5127851a0ea3c", null ],
[ "UI_Time", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4284136ddb8ac44bfdc11a9c6ab71a99", null ],
[ "UI_Vehicles", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda0f7e800792b51321553ec8d27a1011fd", null ],
[ "UI_Verb", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda06b9bbbec6294a3c33c5bdf5b0a429f8", null ],
[ "UI_Words", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda0031c245ce11692267ec754eea3e6d48", null ],
[ "UI_LearningBlock", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda98f8602ba6cab2a475a3e6a32438d12b", null ],
[ "UI_None", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac9cdefca1cb0223ad35fee4ace5a6f96", null ],
[ "UI_Player", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac699e80b1620237ffc595a3e05efb48e", null ],
[ "UI_TimeSpent", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad77b39b7c9567721f481ef85f18f0922", null ],
[ "UI_Size", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab657c90c2d1c1f24d5b29981f0eca7e8", null ],
[ "UI_General", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5b214dcdd6437c91ede35bfc04d4f26e", null ],
[ "UI_Conjunctions", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacdce41ab58cf4c538bc588cbdef270a3", null ],
[ "UI_Shapes", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda6fa3fa0c4e9f50203b356ba69ec9e85e", null ],
[ "UI_NumbersOrdinal", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad95c6b806a85f19dd94b6464fc1c4f67", null ],
[ "Egg_letters_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaeaf1089e41cf02e841993dfcc919dea9", null ],
[ "UI_ReservedArea", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda547eb78411b01e352a47650b249524d3", null ],
[ "ReservedArea_DeleteProfile", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdae06ac1a53f5a88c2298fcadf8a97e51b", null ],
[ "ReservedArea_ExportProfile", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda415f4ca7f20e5119b72aab8191027758", null ],
[ "ReservedArea_ReviewProfile", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda005f46621cc524a62aa8042d979cbe97", null ],
[ "ReservedArea_CreateDemoUser", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7edf102c2f9d2f0ed5c9217041049b4b", null ],
[ "ReservedArea_Website", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4ca47315426ea7e51b3914940f190825", null ],
[ "ReservedArea_Privacy", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdacb60b9088d1e962685525188f0a5753e", null ],
[ "ReservedArea_InstallInstructions", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda95e33c27bd1214b250ebf07fcb493f77", null ],
[ "ReservedArea_Rate", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5530a863cfc1824b1a8fc980bcbb4a8f", null ],
[ "ReservedArea_Recommend", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda3b62695cc649cd88800da5a54be2d196", null ],
[ "ReservedArea_UnlockingWaring", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad20d0098cccb610178e5195c9a6a99cf", null ],
[ "ReservedArea_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda90a27f79488984ea53aa2a30eda4279f", null ],
[ "ReservedArea_SectionDescription_Intro", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab04cdc7ec2f9242b26ed1348b6af3215", null ],
[ "ReservedArea_SectionDescription_Error", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac61763e1da9ec3f22cecf20d467b811f", null ],
[ "Profile_Gender", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9d92160abd323241d42769009cd4e92d", null ],
[ "Profile_Avatar", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda640a433e39fbf7ba3bfeaa2ff4725270", null ],
[ "Profile_Color", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda495e7941f32b223d92f1681985d1c55f", null ],
[ "Profile_Age", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda045d6ba5efc54906e45dea1a56825a2a", null ],
[ "Profile_Years_4", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa89dce56a0ca9029b197a6ecae23b3ad", null ],
[ "Profile_Years_5", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab53a35c81e6be65ed0324a1789cf7522", null ],
[ "Profile_Years_6", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad818b560a4bcc8e424dd32d52c603825", null ],
[ "Profile_Years_7", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda26dc001e015390736b18236f0103a24d", null ],
[ "Profile_Years_8", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda40d573ccbf1fd4c05a55eb5ef4835ede", null ],
[ "Profile_Years_9", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2b3a0dc20630e8a32861ade287d639ca", null ],
[ "Profile_Years_10", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa5c98db2064165d6e066243f961f0fa8", null ],
[ "Profile_Years_11", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2f55c6c7e0b3d7d7ac44df0fd6fd5f09", null ],
[ "UI_AreYouSure", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaddf234673a14c583bd9bea210c9e32d7", null ],
[ "UI_Yes", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5c0678d1cd43079f077163797e394d8f", null ],
[ "UI_No", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda4c392f094e922b5330aa7af47e4f381e", null ],
[ "Scanner_Tuto_Antura", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7af2562d84d7739b49d17e7cbaca440f", null ],
[ "Parental_Gate", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdac7c300aa9990e406cec44473a9a63e89", null ],
[ "End_Scene_1_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda2ca436d63c9aded893e53a4f9388e050", null ],
[ "End_Scene_1_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaeb2172cdc58a2355308ee65114890662", null ],
[ "End_Scene_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab32e2879105f194c449d74c5ba8a20de", null ],
[ "End_Scene_3_1", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaade80d439a337700d596ef33b2c8d792", null ],
[ "End_Scene_3_2", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda9696c155451829147fab44166a0b8570", null ],
[ "End_Scene_3_3", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda84a2a9a84e080fccd7029dace12680dd", null ],
[ "UI_Phrases_Questions", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa8d41a19f6fcc8c0b965206438079c3a", null ],
[ "UI_Phrases_Replies", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad882efa1ab65531da4eb2d8783a11e21", null ],
[ "UI_Phrases_Greetings", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaef1655634e8640fd27fbaa928916153f", null ],
[ "UI_Phrases_Years", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda5dbcac711400828caa20a0fe92703b65", null ],
[ "UI_Phrases_Sentences", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda3a1700121d2fd17a7a18299582a8a855", null ],
[ "UI_Phrases_Expressions", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaf9d7ab96145227a239ad25cfc785366d", null ],
[ "MissingLetter_forms_Title", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa7e281da584bd45c9e1eabf0940511eb", null ],
[ "ReservedArea_DemoUserAlreadyExists", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdabb1af28232e079c8b8760b08bf44dc64", null ],
[ "UI_WordCat_Expressions", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdabeddc38b5d0d000706ef83c2e886e6b5", null ],
[ "UI_WordCat_Names", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda7e07180b1e99640268c6a5f0c9539033", null ],
[ "UI_WordCat_Greetings", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda84b5ad60ba37905e1345b7fa403feae3", null ],
[ "UI_WordCat_Verbs", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab8e275dd2f094364affe7f2919485a63", null ],
[ "UI_WordCat_Weather", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda83eae1053a0bb200af697baa688d436c", null ],
[ "UI_WordCat_Adjectives", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda48af039fccc3d05c5afeb1b0e63d9037", null ],
[ "UI_Prompt_rate", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad9ca50add45a1139b3494d6e60fa3353", null ],
[ "UI_Prompt_bugreport", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab47cfd4f634a64fd32b9b75c72972ac5", null ],
[ "UI_Stage_and_Level", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad3851adf4bb9eaeb6b49b6bf52a09421", null ],
[ "UI_Unlocked_Levels", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdab6b71c53a65c6240543fbc74302a8a07", null ],
[ "UI_Journey_duration", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda261cb867619c4f9b0e52afd6dbc02b49", null ],
[ "UI_Playing_time", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdaa80fb72e4d8fc84317700e5d69f7d170", null ],
[ "UI_Games_played", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda63882b86b45b0c2b59e99bf2897f0b5c", null ],
[ "UI_Bones", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda0d9f71dfa33069b5ca00bf077d3f6c10", null ],
[ "UI_Stars", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda73e55d4432dd3dbeb5f8633aced2c635", null ],
[ "UI_Antura_Rewards", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad222230d20554038c0d4135960a5637f", null ],
[ "UI_Unlocked_Letters", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfdad299f24eaa08a586fc156d92d21f00d4", null ],
[ "UI_Unlocked_Words", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda19edc3b2b9677c91fef2d7d7d3dbd242", null ],
[ "UI_Unlocked_Phrases", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda473cb680547f8cfc41581b455fce9164", null ],
[ "UI_Notification_24h", "_localization_data_id_8cs.html#a8e6113158e4b2b91b40c1da0d6f25dfda0d866d452139419d05166748b8fdd261", null ]
] ]
]; | 134.904762 | 157 | 0.838281 |
7348dacd363cfd8b1cccb26359b3610405b85076 | 6,317 | js | JavaScript | src/main/resources/templates/StrategicIndicators/AdditionalScreens/rangeRover/dist/jquery.rangerover.min.js | q-rapids/learning-dashboard | 63b1b46419ca4d9940c863100564ec95e32dcc05 | [
"Apache-2.0"
] | 7 | 2017-07-08T10:38:27.000Z | 2021-06-08T04:07:14.000Z | src/main/resources/templates/StrategicIndicators/AdditionalScreens/rangeRover/dist/jquery.rangerover.min.js | q-rapids/qrapids-dashboard | d15c869faf65df454d48abe3452cb4d7f5b54132 | [
"Apache-2.0"
] | 168 | 2019-01-23T12:05:51.000Z | 2021-09-12T09:19:45.000Z | src/main/resources/templates/StrategicIndicators/AdditionalScreens/rangeRover/dist/jquery.rangerover.min.js | q-rapids/learning-dashboard | 63b1b46419ca4d9940c863100564ec95e32dcc05 | [
"Apache-2.0"
] | 4 | 2019-04-16T00:14:17.000Z | 2021-01-05T21:45:36.000Z | !function(t){var e=function(){this.options={range:!1,mode:"plain",autocalculate:!0,color:"#3498db",step:1,vLabels:!1},this.coordinates={startSkate:{min:0,max:0},endSkate:{min:0,max:0}},this.selector=null,this.startSkate=null,this.endSkate=null,this.progressBar=null,this.enabledSkater=null,this.selected={start:{value:0}},this.setEvendHandlers=function(){var e=this;e.startSkate.on("mousedown touchstart",function(){e.enabledSkater="startSkate"}),e.options.range&&e.endSkate.on("mousedown touchstart",function(){e.enabledSkater="endSkate"}),t(document).on("mouseup touchend",function(){e.checkSelection(null),e.enabledSkater=null}),t(document).on("mousemove touchmove",function(t){if(e.enabledSkater){e.checkSelection(null);var s=t.pageX-e.selector.offset().left;s<e.coordinates[e.enabledSkater].min?s=e.coordinates[e.enabledSkater].min:s>e.coordinates[e.enabledSkater].max&&(s=e.coordinates[e.enabledSkater].max),e[e.enabledSkater].css("left",s)}}),this.progressBar.on("click tap",function(t){e.progressBarSelection(t.pageX)})},this.init=function(){var s=this,a=[];"plain"===this.options.mode&&(s.options.data.size=100,s.options.data=[this.options.data]),s.selector.addClass("ds-container"),s.options.autocalculate&&"categorized"===this.options.mode&&e.autocalculateCategoriesSizes(s.options.data),t.each(s.options.data,function(t,n){var o=n.exclude?e.getExcludedValuesPlain(n):[],i='<div class="ds-category" data-category="'+(n.id||n.name)+'" style="width:'+n.size+"%;"+(n.color?"background:"+n.color:"")+'"><span class="ds-category-title">'+(n.name?n.name:"")+'</span><span class="ds-category-start">'+n.start+"</span>",r=n.end-n.start-o.length,d=s.selector.width()/100*n.size/r,c=0;s.selected.start.value=n.start,"categorized"===s.options.mode&&(s.selected.start.category=n.id||n.name);for(var l=n.start;l<n.end;l++)c=l,l+s.options.step-1>n.end&&(c=n.end),~o.indexOf(l)||(i+='<span class="ds-item" data-year="'+c+'" style="width:'+d*s.options.step+'px">'+(s.options.vLabels&&l!=n.start&&l!=n.end?l:"")+"</span>",l=l+s.options.step-1);t===s.options.data.length-1&&(i+='<span class="ds-category-end">'+n.end+"</span>",s.options.range&&(s.selected.end={},s.selected.end.value=n.end,"categorized"===s.options.mode&&(s.selected.end.category=n.id||n.name))),i+="</div>",a.push(i)});var n='<div class="ds-skate"><span class="ds-skate-year-mark">'+s.selected.start.value+'</span></div><div class="ds-progress">'+a.join("")+" </div>";this.options.range&&(n+='<div class="ds-end-skate"><span class="ds-skate-year-mark">'+s.selected.end.value+"</span></div>"),this.selector.html(n),this.startSkate=this.selector.find(".ds-skate"),this.options.range&&(this.endSkate=this.selector.find(".ds-end-skate")),this.progressBar=this.selector.find(".ds-progress"),this.options.color&&this.progressBar.css("background",this.options.color),this.selector.attr("ondragstart","return false"),this.calculateAndSetCoordinates(),this.setEvendHandlers()},this.checkSelection=function(e){var s,a,n=this,o=null;if(!!e)n.options.range||(o="start"),n.options.range&&parseInt(n.endSkate.css("left"),10)-e<e-parseInt(n.startSkate.css("left"),10)?(n.endSkate.css("left",e),o="end"):(n.startSkate.css("left",e),o="start");else{if(!n[n.enabledSkater])return;e=parseInt(n[n.enabledSkater].css("left"),10)}"endSkate"===n.enabledSkater&&e===this.coordinates.endSkate.max&&("categorized"===n.options.mode?(s=n.options.data[n.options.data.length-1].end,a=n.options.data[n.options.data.length-1].name):s=n.options.data[0].end),s||n.progressBar.find(".ds-item").each(function(o,i){var r=(i=t(i)).offset().left-n.selector.offset().left;if(r<=e&&r+i.width()>e)return s=+i.attr("data-year"),a=i.parent().attr("data-category"),!1}),o=o||(n.enabledSkater?n.enabledSkater.split("Skate")[0]:null),s&&s!==this.selected[o].value&&(n.selected[o].value=+s,"categorized"===n.options.mode&&(n.selected[o].category=a),n.updateSelectedLabels(),n.options.onChange&&"function"==typeof n.options.onChange&&n.onChange())},this.onChange=function(){this.options.onChange(this.selected)},this.progressBarSelection=function(e){this.checkSelection(e-t(".ds-container").offset().left)},this.updateSelectedLabels=function(){this.updateCoordinates(),this.startSkate.children(".ds-skate-year-mark").html(this.selected.start.value),this.options.range&&this.endSkate.children(".ds-skate-year-mark").html(this.selected.end.value)},this.updateCoordinates=function(){this.options.range&&(this.coordinates.startSkate.max=parseInt(this.endSkate.css("left"),10),this.coordinates.endSkate.min=parseInt(this.startSkate.css("left"),10))},this.calculateAndSetCoordinates=function(){this.coordinates.startSkate.max=this.selector.width()-this.startSkate.width()-parseInt(this.startSkate.css("border-width"),10),this.options.range&&(this.coordinates.endSkate.max=this.selector.width()-this.endSkate.width()-parseInt(this.endSkate.css("border-width"),10))},this.select=function(e){if(e!==this.selectedYear){var s=t('.ds-category-item[data-year="'+e+'"]');if(!s.length)return console.warn("RangeRover -> select: element `"+e+"` is not found."),this;var a=s.offset().left;this.skate.css("left",a),this.selectedYear=e,this.updateSelectedYear(),this.options.onChange&&"function"==typeof this.options.onChange&&this.onChange()}return this}};e.autocalculateCategoriesSizes=function(t){var e=t.reduce(function(t,e,s){return 1===s?t.end-t.start+(e.end-e.start):t+(e.end-e.start)});return t.map(function(t){t.size=100/e*(t.end-t.start)})},e.getExcludedValuesPlain=function(e){var s=[];return t.each(e.exclude,function(t,e){if("object"==typeof e&&e.start&&e.end)for(var a=e.start;a<=e.end;a++)s.push(a);else s.push(e)}),s},e.isArray=function(t){if("[object Array]"===Object.prototype.toString.call(t))return!0},t.fn.extend({rangeRover:function(s){var a=new e;if(a.options=t.extend(a.options,s),!a.options.data||e.isArray(a.options.data)&&!a.options.data.length)console.warn("RangeRover -> please provide data");else if("plain"!==a.options.mode||!e.isArray(a.options.data)&&"object"==typeof a.options.data){if("categorized"!==a.options.mode||e.isArray(a.options.data))return a.selector=t(this),a.init(),s.onInit&&"function"==typeof s.onInit&&s.onInit(),a;console.warn("RangeRover -> `data` must be array in `categorized` mode")}else console.warn("RangeRover -> `data` must be object in `plain` mode")}})}(jQuery);
| 3,158.5 | 6,316 | 0.730093 |
73490ad710bf1218c94ba7a0c285012df5f86ab0 | 5,158 | js | JavaScript | packages/framework/src/client/resource-request.js | Automattic/fresh-data | 2a249d42c3570c000fc8aad4375f6dd071ec0c40 | [
"MIT"
] | 38 | 2018-08-31T15:29:45.000Z | 2022-02-10T11:33:36.000Z | packages/framework/src/client/resource-request.js | Automattic/fresh-data | 2a249d42c3570c000fc8aad4375f6dd071ec0c40 | [
"MIT"
] | 100 | 2018-07-10T19:31:38.000Z | 2022-03-26T15:08:20.000Z | packages/framework/src/client/resource-request.js | coderkevin/fresh-data | 53f6257ebacca61dc286054d594ce79f93008dcc | [
"MIT"
] | 8 | 2018-08-06T08:59:22.000Z | 2020-06-25T14:56:13.000Z | import debugFactory from 'debug';
import { isMatch, isNil } from 'lodash';
import { isDateEarlier } from '../utils/dates';
import { SECOND } from '../utils/constants';
const DEFAULT_TIMEOUT = 30 * SECOND;
export const STATUS = {
failed: 'Failed',
inFlight: 'In Flight',
complete: 'Complete',
overdue: 'Overdue',
scheduled: 'Scheduled',
timedOut: 'Timed Out',
unnecessary: 'Unnecessary',
};
export default class ResourceRequest {
/**
* Creates a new Resource Request object.
* @param {Object} requirement The requirement for this request (e.g. freshness/timeout)
* @param {Object} resourceState The current state of this request
* @param {string} resourceName The name of the resource
* @param {string} operation The name of the operation to be performed
* @param {Object} data Data to be sent for the operation
* @param {Date} now The current time
*/
constructor( requirement, resourceState, resourceName, operation, data, now = new Date() ) {
this.debug = debugFactory( 'fresh-data:request(' + resourceName + ' ' + operation + ')' );
this.resourceName = resourceName;
this.operation = operation;
this.data = data;
this.time = calculateRequestTime( requirement, resourceState, now );
this.timeout = requirement.timeout || DEFAULT_TIMEOUT;
this.promise = null;
this.timeRequested = null;
this.timeCompleted = null;
this.error = null;
if ( this.time ) {
const seconds = ( this.time.getTime() - now.getTime() ) / 1000.0;
this.debug( `New request for "${ this.resourceName }" to be fetched in ${ seconds }s` );
}
}
/**
* Append to the current request
* @param {Object} requirement Any additional requirements to combine with the current request
* @param {Object} resourceState The current state for this resource
* @param {Object} data Data to be appended over the current data for this request
* @param {Date} now The current time
* @Return {boolean} True if successful, false if not
*/
append = ( requirement, resourceState, data, now = new Date() ) => {
return this.appendRequirement( requirement, resourceState, now ) &&
this.appendData( data );
}
appendRequirement = ( requirement, resourceState, now = new Date() ) => {
const status = this.getStatus( now );
if ( STATUS.scheduled === status || STATUS.overdue === status ) {
const requestTime = calculateRequestTime( requirement, resourceState, now );
if ( isDateEarlier( this.time, requestTime ) ) {
this.time = requestTime;
const seconds = ( this.time.getTime() - now.getTime() ) / 1000.0;
this.debug( `Rescheduling request for "${ this.resourceName }" to fetched in ${ seconds }s` );
}
this.timeout = Math.min( this.timeout, requirement.timeout || DEFAULT_TIMEOUT );
return true;
}
this.debug( `Cannot add requirement to request with "${ this.getStatus( now ) }" status` );
return false;
}
alreadyHasData = ( newData ) => {
if ( ! newData || this.data === newData ) {
return true;
} else if ( isNil( this.data ) ) {
return false;
}
return isMatch( this.data, newData );
}
appendData = ( newData ) => {
if ( ! this.alreadyHasData( newData ) ) {
this.data = { ...this.data, ...newData };
}
return true;
}
getStatus = ( now = new Date() ) => {
if ( ! this.time ) {
return STATUS.unnecessary;
}
if ( this.timeRequested ) {
if ( this.timeCompleted ) {
if ( this.error ) {
return STATUS.failed;
}
return STATUS.complete;
}
if ( now.getTime() - this.timeRequested > this.timeout ) {
return STATUS.timedOut;
}
return STATUS.inFlight;
}
if ( isDateEarlier( now, this.time ) ) {
return STATUS.overdue;
}
return STATUS.scheduled;
}
getTimeLeft = ( now = new Date() ) => {
return this.time.getTime() - now.getTime();
}
/**
* Checks if a request is ready.
* @param {Date} now The current time.
* @return {boolean} True if the request is ready to be sent, false otherwise.
*/
isReady = ( now = new Date() ) => {
const status = this.getStatus();
if ( STATUS.scheduled === status || STATUS.overdue === status ) {
const timeLeft = this.getTimeLeft( now );
return ( timeLeft <= 0 );
}
return false;
};
requested = ( promise, now = new Date() ) => {
this.debug( `Request for ${ this.resourceName } submitted...` );
this.timeRequested = now;
this.promise = promise;
}
requestComplete = () => {
this.promise = null;
this.timeCompleted = new Date();
const seconds = ( this.timeCompleted.getTime() - this.timeRequested.getTime() ) / 1000.0;
this.debug( `Request for ${ this.resourceName } completed in ${ seconds }s` );
}
requestFailed = ( error ) => {
this.promise = null;
this.timeCompleted = new Date();
this.error = error;
this.debug( `Request for ${ this.resourceName } failed: `, error );
}
}
function calculateRequestTime( requirement, resourceState, now ) {
const { freshness } = requirement;
const { lastReceived } = resourceState;
if ( ! lastReceived ) {
// Never fetched, so fetch now.
return now;
}
if ( freshness ) {
// Fetch after freshness expires.
return new Date( lastReceived.getTime() + freshness );
}
return null;
}
| 30.886228 | 98 | 0.659752 |
734a12a22020d76664df5db3120b0e8ff2fa5da8 | 154 | js | JavaScript | test/chain/b.js | scoutgg/split-require | 3e345e713181a58ad4d06118019e8c057229dfd8 | [
"MIT"
] | 74 | 2017-11-14T15:45:01.000Z | 2020-11-06T10:05:36.000Z | test/chain/b.js | scoutgg/split-require | 3e345e713181a58ad4d06118019e8c057229dfd8 | [
"MIT"
] | 34 | 2017-11-14T15:44:03.000Z | 2021-06-25T15:34:15.000Z | test/chain/b.js | goto-bus-stop/split-require | d077af12f3d2facc3d47edf2a10df3a1954d69ca | [
"MIT"
] | 10 | 2017-11-26T20:26:59.000Z | 2020-09-20T09:48:39.000Z | var splitRequire = require('split-require')
splitRequire('./d', function (err, exports) {
console.log('d', exports)
})
module.exports = 'hello from b'
| 22 | 45 | 0.688312 |
734ad4b4fcd9521168f355571886c2fe57a8b0f6 | 764 | js | JavaScript | assets/paginas/listagemContasPagar.js | LeonardoAlmeidaSoares/KISchool | f98989440d8a460c703a5d792e93ff7401715a6c | [
"MIT"
] | null | null | null | assets/paginas/listagemContasPagar.js | LeonardoAlmeidaSoares/KISchool | f98989440d8a460c703a5d792e93ff7401715a6c | [
"MIT"
] | 8 | 2018-01-09T20:41:21.000Z | 2018-01-22T17:39:12.000Z | assets/paginas/listagemContasPagar.js | LeonardoAlmeidaSoares/KISchool | f98989440d8a460c703a5d792e93ff7401715a6c | [
"MIT"
] | null | null | null | $(function(){
$("#table").dataTable();
$('#table tbody').css("cursor", "pointer").on('click', '.spnDelete', function () {
$.ajax({
url: "delete/",
method: "POST",
data: {
cod: $(this).attr("cod")
},
success: function (response) {
location.reload();
}
});
});
$('#table tbody').css("cursor", "pointer").on('click', '.spnStatus', function () {
$.ajax({
url: "AlterarStatus/",
method: "POST",
data: {
cod: $(this).attr("cod")
},
success: function (response) {
location.reload();
}
});
});
}); | 25.466667 | 86 | 0.373037 |
734c184a17672d528825cf759b4f2dfa5dd4fb69 | 11,511 | js | JavaScript | test/client-stream.js | timsuchanek/undici | 705a5ed98150588762c1dbca3428d460c0a7d5cc | [
"MIT"
] | null | null | null | test/client-stream.js | timsuchanek/undici | 705a5ed98150588762c1dbca3428d460c0a7d5cc | [
"MIT"
] | null | null | null | test/client-stream.js | timsuchanek/undici | 705a5ed98150588762c1dbca3428d460c0a7d5cc | [
"MIT"
] | null | null | null | 'use strict'
const { test } = require('tap')
const { Client, errors } = require('..')
const { createServer } = require('http')
const { PassThrough } = require('stream')
const EE = require('events')
test('stream get', (t) => {
t.plan(7)
const server = createServer((req, res) => {
t.strictEqual('/', req.url)
t.strictEqual('GET', req.method)
t.strictEqual('localhost', req.headers.host)
res.setHeader('content-type', 'text/plain')
res.end('hello')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.close.bind(client))
client.stream({
path: '/',
method: 'GET',
opaque: new PassThrough()
}, ({ statusCode, headers, opaque: pt }) => {
t.strictEqual(statusCode, 200)
t.strictEqual(headers['content-type'], 'text/plain')
const bufs = []
pt.on('data', (buf) => {
bufs.push(buf)
})
pt.on('end', () => {
t.strictEqual('hello', Buffer.concat(bufs).toString('utf8'))
})
return pt
}, (err) => {
t.error(err)
})
})
})
test('stream get skip body', (t) => {
t.plan(12)
const server = createServer((req, res) => {
t.strictEqual('/', req.url)
t.strictEqual('GET', req.method)
t.strictEqual('localhost', req.headers.host)
res.setHeader('content-type', 'text/plain')
res.end('hello')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.close.bind(client))
client.stream({
path: '/',
method: 'GET'
}, ({ statusCode, headers }) => {
t.strictEqual(statusCode, 200)
t.strictEqual(headers['content-type'], 'text/plain')
// Don't return writable. Skip the body.
}, (err) => {
t.error(err)
})
client.stream({
path: '/',
method: 'GET'
}, ({ statusCode, headers }) => {
t.strictEqual(statusCode, 200)
t.strictEqual(headers['content-type'], 'text/plain')
// Don't return writable. Skip the body.
}).then(() => {
t.pass()
})
})
})
test('stream GET destroy res', (t) => {
t.plan(14)
const server = createServer((req, res) => {
t.strictEqual('/', req.url)
t.strictEqual('GET', req.method)
t.strictEqual('localhost', req.headers.host)
res.setHeader('content-type', 'text/plain')
res.end('hello')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.close.bind(client))
client.stream({
path: '/',
method: 'GET'
}, ({ statusCode, headers }) => {
t.strictEqual(statusCode, 200)
t.strictEqual(headers['content-type'], 'text/plain')
const pt = new PassThrough()
.on('error', (err) => {
t.ok(err)
})
.on('data', () => {
pt.destroy(new Error('kaboom'))
})
return pt
}, (err) => {
t.ok(err)
})
client.stream({
path: '/',
method: 'GET'
}, ({ statusCode, headers }) => {
t.strictEqual(statusCode, 200)
t.strictEqual(headers['content-type'], 'text/plain')
let ret = ''
const pt = new PassThrough()
pt.on('data', chunk => {
ret += chunk
}).on('end', () => {
t.strictEqual(ret, 'hello')
})
return pt
}, (err) => {
t.error(err)
})
})
})
test('stream GET remote destroy', (t) => {
t.plan(4)
const server = createServer((req, res) => {
res.write('asd')
setImmediate(() => {
res.destroy()
})
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.close.bind(client))
client.stream({
path: '/',
method: 'GET'
}, () => {
const pt = new PassThrough()
pt.on('error', (err) => {
t.ok(err)
})
return pt
}, (err) => {
t.ok(err)
})
client.stream({
path: '/',
method: 'GET'
}, () => {
const pt = new PassThrough()
pt.on('error', (err) => {
t.ok(err)
})
return pt
}).catch((err) => {
t.ok(err)
})
})
})
test('stream response resume back pressure and non standard error', (t) => {
t.plan(6)
const server = createServer((req, res) => {
res.write(Buffer.alloc(1e3))
setImmediate(() => {
res.write(Buffer.alloc(1e7))
res.end()
})
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.close.bind(client))
const pt = new PassThrough()
client.stream({
path: '/',
method: 'GET',
maxAbortedPayload: 1e5
}, () => {
pt.on('data', () => {
pt.emit('error', new Error('kaboom'))
}).once('error', (err) => {
t.strictEqual(err.message, 'kaboom')
})
return pt
}, (err) => {
t.ok(err)
t.strictEqual(pt.destroyed, true)
})
client.on('disconnect', (err) => {
t.ok(err)
t.pass()
})
client.stream({
path: '/',
method: 'GET'
}, () => {
const pt = new PassThrough()
pt.resume()
return pt
}, (err) => {
t.error(err)
})
})
})
test('stream waits only for writable side', (t) => {
t.plan(2)
const server = createServer((req, res) => {
res.end(Buffer.alloc(1e3))
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.close.bind(client))
const pt = new PassThrough({ autoDestroy: false })
client.stream({
path: '/',
method: 'GET'
}, () => pt, (err) => {
t.error(err)
t.strictEqual(pt.destroyed, false)
})
})
})
test('stream args validation', (t) => {
t.plan(3)
const client = new Client('http://localhost:5000')
client.stream({
path: '/',
method: 'GET'
}, null, (err) => {
t.ok(err instanceof errors.InvalidArgumentError)
})
client.stream(null, null, (err) => {
t.ok(err instanceof errors.InvalidArgumentError)
})
try {
client.stream(null, null, 'asd')
} catch (err) {
t.ok(err instanceof errors.InvalidArgumentError)
}
})
test('stream args validation promise', (t) => {
t.plan(2)
const client = new Client('http://localhost:5000')
client.stream({
path: '/',
method: 'GET'
}, null).catch((err) => {
t.ok(err instanceof errors.InvalidArgumentError)
})
client.stream(null, null).catch((err) => {
t.ok(err instanceof errors.InvalidArgumentError)
})
})
test('stream destroy if not readable', (t) => {
t.plan(2)
const server = createServer((req, res) => {
res.end()
})
t.tearDown(server.close.bind(server))
const pt = new PassThrough()
pt.readable = false
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.destroy.bind(client))
client.stream({
path: '/',
method: 'GET'
}, () => {
return pt
}, (err) => {
t.error(err)
t.strictEqual(pt.destroyed, true)
})
})
})
test('stream server side destroy', (t) => {
t.plan(1)
const server = createServer((req, res) => {
res.destroy()
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.destroy.bind(client))
client.stream({
path: '/',
method: 'GET'
}, () => {
t.fail()
}, (err) => {
t.ok(err instanceof errors.SocketError)
})
})
})
test('stream invalid return', (t) => {
t.plan(1)
const server = createServer((req, res) => {
res.write('asd')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.destroy.bind(client))
client.stream({
path: '/',
method: 'GET'
}, () => {
return {}
}, (err) => {
t.ok(err instanceof errors.InvalidReturnValueError)
})
})
})
test('stream body without destroy', (t) => {
t.plan(1)
const server = createServer((req, res) => {
res.end('asd')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.destroy.bind(client))
client.stream({
path: '/',
method: 'GET'
}, () => {
const pt = new PassThrough({ autoDestroy: false })
pt.destroy = null
pt.resume()
return pt
}, (err) => {
t.error(err)
})
})
})
test('stream factory abort', (t) => {
t.plan(1)
const server = createServer((req, res) => {
res.end('asd')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.destroy.bind(client))
const signal = new EE()
client.stream({
path: '/',
method: 'GET',
signal
}, () => {
signal.emit('abort')
return new PassThrough()
}, (err) => {
t.ok(err instanceof errors.RequestAbortedError)
})
})
})
test('stream factory throw', (t) => {
t.plan(3)
const server = createServer((req, res) => {
res.end('asd')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.destroy.bind(client))
client.stream({
path: '/',
method: 'GET'
}, () => {
throw new Error('asd')
}, (err) => {
t.strictEqual(err.message, 'asd')
})
client.stream({
path: '/',
method: 'GET'
}, () => {
throw new Error('asd')
}, (err) => {
t.strictEqual(err.message, 'asd')
})
client.stream({
path: '/',
method: 'GET'
}, () => {
return new PassThrough()
}, (err) => {
t.error(err)
})
client.on('disconnect', () => {
t.fail()
})
})
})
test('stream CONNECT throw', (t) => {
t.plan(1)
const server = createServer((req, res) => {
res.end('asd')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.destroy.bind(client))
client.stream({
path: '/',
method: 'CONNECT'
}, () => {
}, (err) => {
t.ok(err instanceof errors.NotSupportedError)
})
client.on('disconnect', () => {
t.fail()
})
})
})
test('stream abort after complete', (t) => {
t.plan(1)
const server = createServer((req, res) => {
res.end('asd')
})
t.tearDown(server.close.bind(server))
server.listen(0, () => {
const client = new Client(`http://localhost:${server.address().port}`)
t.tearDown(client.destroy.bind(client))
const pt = new PassThrough()
const signal = new EE()
client.stream({
path: '/',
method: 'GET',
signal
}, () => {
return pt
}, (err) => {
t.error(err)
signal.emit('abort')
})
client.on('disconnect', () => {
t.fail()
})
})
})
| 22.09405 | 76 | 0.538355 |
734d4240014a4b0833f32d23676a9a65adf4c391 | 642 | js | JavaScript | client/features/cart/containers/item/index.js | ionutcirja/pizza-store | 65b41ee2add689121ec189241c403b4262b8f5e5 | [
"MIT"
] | null | null | null | client/features/cart/containers/item/index.js | ionutcirja/pizza-store | 65b41ee2add689121ec189241c403b4262b8f5e5 | [
"MIT"
] | null | null | null | client/features/cart/containers/item/index.js | ionutcirja/pizza-store | 65b41ee2add689121ec189241c403b4262b8f5e5 | [
"MIT"
] | null | null | null | // @flow
import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { bindActionCreators } from 'redux';
import { cartIdSelector } from '../../selectors';
import type { State } from '../../../../types';
import Component from '../../components/item';
import * as Actions from '../../actions';
type Props = {
id: string,
};
const mapStateToProps = (state: State, props: Props) => ({
...cartIdSelector(props.id)(state),
});
const mapDispatchToProps = (dispatch: Dispatch) => ({
actions: bindActionCreators(Actions, dispatch),
});
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Component);
| 24.692308 | 58 | 0.67134 |
734dce539cc02632641c5968b8e891554b98b83c | 491 | js | JavaScript | src/index.js | Cap32/hoist-react-instance-methods | c6e9cec3e916ae16c2e4ededb0c9f768f9ecdcef | [
"MIT"
] | 2 | 2017-03-09T07:12:33.000Z | 2018-10-23T20:03:14.000Z | src/index.js | Cap32/hoist-react-instance-methods | c6e9cec3e916ae16c2e4ededb0c9f768f9ecdcef | [
"MIT"
] | null | null | null | src/index.js | Cap32/hoist-react-instance-methods | c6e9cec3e916ae16c2e4ededb0c9f768f9ecdcef | [
"MIT"
] | null | null | null |
export default function hoistReactInstance(getInstance, methods) {
return (Target) => {
if (typeof getInstance !== 'function' ||
typeof Target !== 'string' // don't hoist over string (html) components
) {
methods && [].concat(methods).forEach((method) => {
Target.prototype[method] = function (...args) {
const element = getInstance(this);
if (element && element[method]) {
return element[method](...args);
}
};
});
}
return Target;
};
}
| 21.347826 | 74 | 0.604888 |
734e13cc9eb00f626291383a26e542983be2d965 | 2,776 | js | JavaScript | check-module.js | gaballester/amazon_ballester | 764c3912e5ebdd21aacc4a4e191a11f26a7ac025 | [
"MIT"
] | null | null | null | check-module.js | gaballester/amazon_ballester | 764c3912e5ebdd21aacc4a4e191a11f26a7ac025 | [
"MIT"
] | null | null | null | check-module.js | gaballester/amazon_ballester | 764c3912e5ebdd21aacc4a4e191a11f26a7ac025 | [
"MIT"
] | null | null | null | hace 4 años y 8 meses
Activa ayer
Vista 14k veces
6
3
¿Cómo puedo saber si está instalado un determinado paquete de npm? Por ejemplo, antes de ejecutar:
npm install -g typescript@2.0.0
¿Cómo puedo saber si ese paquete ya está instalado en la PC?
npm
Compartir
Mejora esta pregunta
Seguir
editada el 7 mar. 17 a las 22:06
Rene Limon
4,49322 medallas de oro1919 medallas de plata3232 medallas de bronce
formulada el 7 mar. 17 a las 22:03
Pablo Ezequiel Inchausti
1,19833 medallas de oro1717 medallas de plata2727 medallas de bronce
¿en qué sistema? –
Rene Limon
el 7 mar. 17 a las 22:06
En el sistema OSX –
Pablo Ezequiel Inchausti
el 7 mar. 17 a las 22:26
Te podes fijar en el package.json si estas haciendo algun proyecto con javascript, en dependencies –
Francisco
el 5 dic. 20 a las 3:24
añade un comentario
4 respuestas
7
Lamentablemente no hay una instrucción como npm check para saber si está instalado actualmente. El comando que te puede servir es ls que te muestra una lista de los paquetes instalados. Este comando es pipable, es decir, que su salida puede integrarse en la entrada de otro comando.
Bash
npm ls | grep typescript
Powershell
npm ls | select-string typescript
Dos
npm ls | findstr "typescript"
Es cierto que lo anterior no es tan rápido; tomará más tiempo mientras más grande sea la lista de paquetes instalados. Sin embargo, puedes crear un script para que haga una búsqueda por nombre de paquete.
Ejemplo
const fs = require('fs');
const readline = require('readline');
const path = require('path');
const DEPS_DIR = path.join(process.cwd(), 'node_modules');
if (!process.argv[2]) { // los dos primeros argumentos son "node" y la ruta del script
return console.log('\x1b[31m', 'Error: nombre de paquete inválido');
}
checkModule(process.argv[2].toLowerCase())
.then(files => {
console.log('\n[+] Packages found:\n');
files.forEach(file => {
let packageInfo = `${DEPS_DIR}/${file}/package.json`;
let reader = readline.createInterface({
input: fs.createReadStream(packageInfo)
});
reader.on('line', line => {
if (line.includes('version')) {
let version = line.split(':')[1].replace(/\s/g, '').replace(/"/g, '');
console.log('\x1b[32m', `${file}@${version}`);
}
});
});
})
.catch(err => {
console.log(err.message);
});
function checkModule(input) {
return new Promise((resolve, reject) => {
fs.readdir(DEPS_DIR, (err, files) => {
if (err) {
reject(
new Error('No existe node_modules en este directorio')
);
} else {
resolve(
files
.filter(file => file.toLowerCase().includes(input))
);
}
});
});
}
| 26.438095 | 282 | 0.667867 |
734ea9a0b23824374cb8916054466a31d9527ac7 | 4,290 | js | JavaScript | packages/osd-ui-framework/doc_site/src/views/table/listing_table.js | mengweieric/OpenSearch-Dashboards | a62dd96f11a5a99bbe73069ccf7cf66d26af67c9 | [
"Apache-2.0"
] | null | null | null | packages/osd-ui-framework/doc_site/src/views/table/listing_table.js | mengweieric/OpenSearch-Dashboards | a62dd96f11a5a99bbe73069ccf7cf66d26af67c9 | [
"Apache-2.0"
] | null | null | null | packages/osd-ui-framework/doc_site/src/views/table/listing_table.js | mengweieric/OpenSearch-Dashboards | a62dd96f11a5a99bbe73069ccf7cf66d26af67c9 | [
"Apache-2.0"
] | null | null | null | /*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import React, { Component } from 'react';
import { KuiButton, KuiButtonIcon, KuiPager, KuiListingTable } from '../../../../components';
import { RIGHT_ALIGNMENT } from '../../../../src/services';
export class ListingTable extends Component {
constructor(props) {
super(props);
this.state = {
selectedRowIds: [],
};
this.rows = [
{
id: '1',
cells: [
<a className="kuiLink" href="#">
Alligator
</a>,
<div className="kuiIcon kuiIcon--success fa-check" />,
'Tue Dec 06 2016 12:56:15 GMT-0800 (PST)',
{
content: '1',
align: RIGHT_ALIGNMENT,
},
],
},
{
id: '2',
cells: [
<a className="kuiLink" href="#">
Boomerang
</a>,
<div className="kuiIcon kuiIcon--success fa-check" />,
'Tue Dec 06 2016 12:56:15 GMT-0800 (PST)',
{
content: '10',
align: RIGHT_ALIGNMENT,
},
],
},
{
id: '3',
cells: [
<a className="kuiLink" href="#">
Celebration
</a>,
<div className="kuiIcon kuiIcon--warning fa-bolt" />,
'Tue Dec 06 2016 12:56:15 GMT-0800 (PST)',
{
content: '100',
align: RIGHT_ALIGNMENT,
},
],
},
{
id: '4',
cells: [
<a className="kuiLink" href="#">
Dog
</a>,
<div className="kuiIcon kuiIcon--error fa-warning" />,
'Tue Dec 06 2016 12:56:15 GMT-0800 (PST)',
{
content: '1000',
align: RIGHT_ALIGNMENT,
},
],
},
];
this.header = [
'Title',
'Status',
'Date created',
{
content: 'Orders of magnitude',
onSort: () => {},
isSorted: true,
isSortAscending: true,
align: RIGHT_ALIGNMENT,
},
];
}
renderPager() {
return (
<KuiPager
startNumber={1}
hasNextPage={true}
hasPreviousPage={false}
endNumber={10}
totalItems={100}
onNextPage={() => {}}
onPreviousPage={() => {}}
/>
);
}
renderToolBarActions() {
return [
<KuiButton key="add" buttonType="primary" aria-label="Add">
Add
</KuiButton>,
<KuiButton
key="settings"
aria-label="Settings"
buttonType="basic"
icon={<KuiButtonIcon type="settings" />}
/>,
<KuiButton
key="menu"
aria-label="Menu"
buttonType="basic"
icon={<KuiButtonIcon type="menu" />}
/>,
];
}
onItemSelectionChanged = (selectedRowIds) => {
this.setState({ selectedRowIds });
};
render() {
return (
<KuiListingTable
pager={this.renderPager()}
toolBarActions={this.renderToolBarActions()}
selectedRowIds={this.state.selectedRowIds}
rows={this.rows}
header={this.header}
onFilter={() => {}}
filter=""
onItemSelectionChanged={this.onItemSelectionChanged}
/>
);
}
}
| 25.235294 | 93 | 0.543357 |
734eadd9740f88834586945454f84966c4307299 | 359,784 | js | JavaScript | node_modules/quasar-framework/dist/umd/quasar.ios.umd.min.js | ipsilondev/js101-editor | f6a30b8744253323664906007df2b9a6f791e9e0 | [
"MIT"
] | null | null | null | node_modules/quasar-framework/dist/umd/quasar.ios.umd.min.js | ipsilondev/js101-editor | f6a30b8744253323664906007df2b9a6f791e9e0 | [
"MIT"
] | null | null | null | node_modules/quasar-framework/dist/umd/quasar.ios.umd.min.js | ipsilondev/js101-editor | f6a30b8744253323664906007df2b9a6f791e9e0 | [
"MIT"
] | 1 | 2018-10-21T16:52:34.000Z | 2018-10-21T16:52:34.000Z | /*!
* Quasar Framework v0.17.12
* (c) 2016-present Razvan Stoenescu
* Released under the MIT License.
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):t.Quasar=e(t.Vue)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e,i="undefined"==typeof window,s=!1,n=i;function o(t){var e=function(t,e){var i=/(edge)\/([\w.]+)/.exec(t)||/(opr)[\/]([\w.]+)/.exec(t)||/(vivaldi)[\/]([\w.]+)/.exec(t)||/(chrome)[\/]([\w.]+)/.exec(t)||/(iemobile)[\/]([\w.]+)/.exec(t)||/(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(t)||/(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(t)||/(webkit)[\/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[\/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[];return{browser:i[5]||i[3]||i[1]||"",version:i[2]||i[4]||"0",versionNumber:i[4]||i[2]||"0",platform:e[0]||""}}(t=(t||navigator.userAgent||navigator.vendor||window.opera).toLowerCase(),function(t){return/(ipad)/.exec(t)||/(ipod)/.exec(t)||/(windows phone)/.exec(t)||/(iphone)/.exec(t)||/(kindle)/.exec(t)||/(silk)/.exec(t)||/(android)/.exec(t)||/(win)/.exec(t)||/(mac)/.exec(t)||/(linux)/.exec(t)||/(cros)/.exec(t)||/(playbook)/.exec(t)||/(bb)/.exec(t)||/(blackberry)/.exec(t)||[]}(t)),o={};return e.browser&&(o[e.browser]=!0,o.version=e.version,o.versionNumber=parseInt(e.versionNumber,10)),e.platform&&(o[e.platform]=!0),(o.android||o.bb||o.blackberry||o.ipad||o.iphone||o.ipod||o.kindle||o.playbook||o.silk||o["windows phone"])&&(o.mobile=!0),(o.ipod||o.ipad||o.iphone)&&(o.ios=!0),o["windows phone"]&&(o.winphone=!0,delete o["windows phone"]),(o.cros||o.mac||o.linux||o.win)&&(o.desktop=!0),(o.chrome||o.opr||o.safari||o.vivaldi)&&(o.webkit=!0),(o.rv||o.iemobile)&&(e.browser="ie",o.ie=!0),o.edge&&(e.browser="edge",o.edge=!0),(o.safari&&o.blackberry||o.bb)&&(e.browser="blackberry",o.blackberry=!0),o.safari&&o.playbook&&(e.browser="playbook",o.playbook=!0),o.opr&&(e.browser="opera",o.opera=!0),o.safari&&o.android&&(e.browser="android",o.android=!0),o.safari&&o.kindle&&(e.browser="kindle",o.kindle=!0),o.safari&&o.silk&&(e.browser="silk",o.silk=!0),o.vivaldi&&(e.browser="vivaldi",o.vivaldi=!0),o.name=e.browser,o.platform=e.platform,i||(window.process&&window.process.versions&&window.process.versions.electron?o.electron=!0:0===document.location.href.indexOf("chrome-extension://")?o.chromeExt=!0:(window._cordovaNative||window.cordova)&&(o.cordova=!0),(s=void 0===o.cordova&&void 0===o.electron&&!!document.querySelector("[data-server-rendered]"))&&(n=!0)),o}function r(){if(void 0!==e)return e;try{if(window.localStorage)return e=!0,!0}catch(t){}return e=!1,!1}function a(){return{has:{touch:!!("ontouchstart"in document.documentElement)||window.navigator.msMaxTouchPoints>0,webStorage:r()},within:{iframe:window.self!==window.top}}}var l={has:{touch:!1,webStorage:!1},within:{iframe:!1},parseSSR:function(t){return t?{is:o(t.req.headers["user-agent"]),has:this.has,within:this.within}:Object.assign({},{is:o()},a())},install:function(t,e,r){var l=this;i?e.server.push(function(t,e){t.platform=l.parseSSR(e.ssr)}):(this.is=o(),s?(e.takeover.push(function(t){n=s=!1,Object.assign(t.platform,a())}),r.util.defineReactive(t,"platform",this)):(Object.assign(this,a()),t.platform=this))}};Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){var i=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var s=Object(t),n=1;n<arguments.length;n++){var o=i[n];if(void 0!==o&&null!==o)for(var r=Object.keys(Object(o)),a=0,l=r.length;a<l;a++){var c=r[a],h=Object.getOwnPropertyDescriptor(o,c);void 0!==h&&h.enumerable&&(s[c]=o[c])}}return s}}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),Array.prototype.includes||(Array.prototype.includes=function(t,e){var i=Object(this),s=parseInt(i.length,10)||0;if(0===s)return!1;var n,o,r=parseInt(e,10)||0;for(r>=0?n=r:(n=s+r)<0&&(n=0);n<s;){if(t===(o=i[n])||t!=t&&o!=o)return!0;n++}return!1}),String.prototype.startsWith||(String.prototype.startsWith=function(t,e){return e=e||0,this.substr(e,t.length)===t}),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var i=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>i.length)&&(e=i.length),e-=t.length;var s=i.indexOf(t,e);return-1!==s&&s===e}),i||("function"!=typeof Element.prototype.matches&&(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.webkitMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),i=0;e[i]&&e[i]!==this;)++i;return Boolean(e[i])}),"function"!=typeof Element.prototype.closest&&(Element.prototype.closest=function(t){for(var e=this;e&&1===e.nodeType;){if(e.matches(t))return e;e=e.parentNode}return null}),[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach(function(t){t.hasOwnProperty("remove")||Object.defineProperty(t,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){null!==this.parentNode&&this.parentNode.removeChild(this)}})})),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,i=Object(this),s=i.length>>>0,n=arguments[1],o=0;o<s;o++)if(e=i[o],t.call(n,e,o,i))return e}});var c={__history:[],add:function(){},remove:function(){},install:function(t,e){var s=this;if(!i&&t.platform.is.cordova){this.add=function(t){s.__history.push(t)},this.remove=function(t){var e=s.__history.indexOf(t);e>=0&&s.__history.splice(e,1)};var n=void 0===e.cordova||!1!==e.cordova.backButtonExit;document.addEventListener("deviceready",function(){document.addEventListener("backbutton",function(){s.__history.length?s.__history.pop().handler():n&&"#/"===window.location.hash?navigator.app.exitApp():window.history.back()},!1)})}}},h={lang:"en-us",label:{clear:"Clear",ok:"OK",cancel:"Cancel",close:"Close",set:"Set",select:"Select",reset:"Reset",remove:"Remove",update:"Update",create:"Create",search:"Search",filter:"Filter",refresh:"Refresh"},date:{days:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),daysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),firstDayOfWeek:0,format24h:!1},pullToRefresh:{pull:"Pull down to refresh",release:"Release to refresh",refresh:"Refreshing..."},table:{noData:"No data available",noResults:"No matching records found",loading:"Loading...",selectedRecords:function(t){return 1===t?"1 record selected.":(0===t?"No":t)+" records selected."},recordsPerPage:"Records per page:",allRows:"All",pagination:function(t,e,i){return t+"-"+e+" of "+i},columns:"Columns"},editor:{url:"URL",bold:"Bold",italic:"Italic",strikethrough:"Strikethrough",underline:"Underline",unorderedList:"Unordered List",orderedList:"Ordered List",subscript:"Subscript",superscript:"Superscript",hyperlink:"Hyperlink",toggleFullscreen:"Toggle Fullscreen",quote:"Quote",left:"Left align",center:"Center align",right:"Right align",justify:"Justify align",print:"Print",outdent:"Decrease indentation",indent:"Increase indentation",removeFormat:"Remove formatting",formatting:"Formatting",fontSize:"Font Size",align:"Align",hr:"Insert Horizontal Rule",undo:"Undo",redo:"Redo",header1:"Header 1",header2:"Header 2",header3:"Header 3",header4:"Header 4",header5:"Header 5",header6:"Header 6",paragraph:"Paragraph",code:"Code",size1:"Very small",size2:"A bit small",size3:"Normal",size4:"Medium-large",size5:"Big",size6:"Very big",size7:"Maximum",defaultFont:"Default Font"},tree:{noNodes:"No nodes available",noResults:"No matching nodes found"}},u={install:function(t,e,s,n){var o=this;i&&e.server.push(function(t,e){var i={lang:t.i18n.lang,dir:t.i18n.rtl?"rtl":"ltr"},s=e.ssr.setHtmlAttrs;"function"==typeof s?s(i):e.ssr.Q_HTML_ATTRS=Object.keys(i).map(function(t){return t+"="+i[t]}).join(" ")}),this.set=function(e){if(void 0===e&&(e=h),e.set=o.set,e.getLocale=o.getLocale,e.rtl=e.rtl||!1,!i){var n=document.documentElement;n.setAttribute("dir",e.rtl?"rtl":"ltr"),n.setAttribute("lang",e.lang)}i||t.i18n?t.i18n=e:s.util.defineReactive(t,"i18n",e),o.name=e.lang,o.lang=e},this.set(n)},getLocale:function(){if(!i){var t=navigator.language||navigator.languages[0]||navigator.browserLanguage||navigator.userLanguage||navigator.systemLanguage;return t?t.toLowerCase():void 0}}};function d(t){var e=t.r,i=t.g,s=t.b,n=t.a,o=void 0!==n;if(e=Math.round(e),i=Math.round(i),s=Math.round(s),e>255||i>255||s>255||o&&n>100)throw new TypeError("Expected 3 numbers below 256 (and optionally one below 100)");return n=o?(256|Math.round(255*n/100)).toString(16).slice(1):"","#"+(s|i<<8|e<<16|1<<24).toString(16).slice(1)+n}function p(t){if("string"!=typeof t)throw new TypeError("Expected a string");3===(t=t.replace(/^#/,"")).length?t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:4===t.length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);var e=parseInt(t,16);return t.length>6?{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:Math.round((255&e)/2.55)}:{r:e>>16,g:e>>8&255,b:255&e}}function f(t){var e,i,s,n,o,r,a,l,c=t.h,h=t.s,u=t.v,d=t.a;switch(r=(u/=100)*(1-(h/=100)),a=u*(1-(o=6*(c/=360)-(n=Math.floor(6*c)))*h),l=u*(1-(1-o)*h),n%6){case 0:e=u,i=l,s=r;break;case 1:e=a,i=u,s=r;break;case 2:e=r,i=u,s=l;break;case 3:e=r,i=a,s=u;break;case 4:e=l,i=r,s=u;break;case 5:e=u,i=r,s=a}return{r:Math.round(255*e),g:Math.round(255*i),b:Math.round(255*s),a:d}}function m(t){var e,i=t.r,s=t.g,n=t.b,o=t.a,r=Math.max(i,s,n),a=Math.min(i,s,n),l=r-a,c=0===r?0:l/r,h=r/255;switch(r){case a:e=0;break;case i:e=s-n+l*(s<n?6:0),e/=6*l;break;case s:e=n-i+2*l,e/=6*l;break;case n:e=i-s+4*l,e/=6*l}return{h:Math.round(360*e),s:Math.round(100*c),v:Math.round(100*h),a:o}}var g=/^\s*rgb(a)?\s*\((\s*(\d+)\s*,\s*?){2}(\d+)\s*,?\s*([01]?\.?\d*?)?\s*\)\s*$/;function v(t){if("string"!=typeof t)throw new TypeError("Expected a string");var e=g.exec(t);if(e){var i={r:Math.max(255,parseInt(e[2],10)),g:Math.max(255,parseInt(e[3],10)),b:Math.max(255,parseInt(e[4],10))};return e[1]&&(i.a=Math.max(1,parseFloat(e[5]))),i}return p(t)}function b(t,e){if("string"!=typeof t)throw new TypeError("Expected a string as color");if("number"!=typeof e)throw new TypeError("Expected a numeric percent");var i=v(t),s=e<0?0:255,n=Math.abs(e)/100,o=i.r,r=i.g,a=i.b;return"#"+(16777216+65536*(Math.round((s-o)*n)+o)+256*(Math.round((s-r)*n)+r)+(Math.round((s-a)*n)+a)).toString(16).slice(1)}function _(t,e,i){if(void 0===i&&(i=document.body),"string"!=typeof t)throw new TypeError("Expected a string as color");if("string"!=typeof e)throw new TypeError("Expected a string as value");if(!(i instanceof Element))throw new TypeError("Expected a DOM element");switch(i.style.setProperty("--q-color-"+t,e),t){case"negative":case"warning":i.style.setProperty("--q-color-"+t+"-l",b(e,46));break;case"light":i.style.setProperty("--q-color-"+t+"-d",b(e,-10))}}function y(t,e){if(void 0===e&&(e=document.body),"string"!=typeof t)throw new TypeError("Expected a string as color");if(!(e instanceof Element))throw new TypeError("Expected a DOM element");return getComputedStyle(e).getPropertyValue("--q-color-"+t).trim()||null}var w={rgbToHex:d,hexToRgb:p,hsvToRgb:f,rgbToHsv:m,textToRgb:v,lighten:b,luminosity:function(t){if("string"!=typeof t&&(!t||void 0===t.r))throw new TypeError("Expected a string or a {r, g, b} object as color");var e="string"==typeof t?v(t):t,i=e.r/255,s=e.g/255,n=e.b/255;return.2126*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.7152*(s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setBrand:_,getBrand:y};function C(t,e){var i=t.is,s=t.has,n=t.within,o=["ios",i.desktop?"desktop":"mobile",s.touch?"touch":"no-touch","platform-"+(i.ios?"ios":"mat")];if(i.cordova&&(o.push("cordova"),i.ios&&(void 0===e.cordova||!1!==e.cordova.iosStatusBarPadding))){var r=window.devicePixelRatio||1,a=window.screen.width*r,l=window.screen.height*r;1125===a&&2436===l&&o.push("q-ios-statusbar-x"),1125===a&&2001===l||o.push("q-ios-statusbar-padding")}return n.iframe&&o.push("within-iframe"),i.electron&&o.push("electron"),o}var x={install:function(t,e,s){i?e.server.push(function(t,e){var i=C(t.platform,s),n=e.ssr.setBodyClasses;"function"==typeof n?n(i):e.ssr.Q_BODY_CLASSES=i.join(" ")}):(s.brand&&function(t){for(var e in t)_(e,t[e])}(s.brand),function(t,e){var i=C(t,e);t.is.ie&&11===t.is.versionNumber?i.forEach(function(t){return document.body.classList.add(t)}):document.body.classList.add.apply(document.body.classList,i),t.is.ios&&document.body.addEventListener("touchstart",function(){})}(t.platform,s))}},k={name:"material-icons",type:{positive:"check_circle",negative:"warning",info:"info",warning:"priority_high"},arrow:{up:"arrow_upward",right:"arrow_forward",down:"arrow_downward",left:"arrow_back"},chevron:{left:"chevron_left",right:"chevron_right"},pullToRefresh:{arrow:"arrow_downward",refresh:"refresh"},search:{icon:"search",clear:"cancel",clearInverted:"clear"},carousel:{left:"chevron_left",right:"chevron_right",quickNav:"lens",thumbnails:"view_carousel"},checkbox:{checked:{ios:"check_circle",mat:"check_box"},unchecked:{ios:"radio_button_unchecked",mat:"check_box_outline_blank"},indeterminate:{ios:"remove_circle_outline",mat:"indeterminate_check_box"}},chip:{close:"cancel"},chipsInput:{add:"send"},collapsible:{icon:"arrow_drop_down"},datetime:{arrowLeft:"chevron_left",arrowRight:"chevron_right"},editor:{bold:"format_bold",italic:"format_italic",strikethrough:"strikethrough_s",underline:"format_underlined",unorderedList:"format_list_bulleted",orderedList:"format_list_numbered",subscript:"vertical_align_bottom",superscript:"vertical_align_top",hyperlink:"link",toggleFullscreen:"fullscreen",quote:"format_quote",left:"format_align_left",center:"format_align_center",right:"format_align_right",justify:"format_align_justify",print:"print",outdent:"format_indent_decrease",indent:"format_indent_increase",removeFormat:"format_clear",formatting:"text_format",fontSize:"format_size",align:"format_align_left",hr:"remove",undo:"undo",redo:"redo",header:"format_size",code:"code",size:"format_size",font:"font_download"},fab:{icon:"add",activeIcon:"close"},input:{showPass:"visibility",hidePass:"visibility_off",showNumber:"keyboard",hideNumber:"keyboard_hide",clear:"cancel",clearInverted:"clear",dropdown:"arrow_drop_down"},pagination:{first:"first_page",prev:"keyboard_arrow_left",next:"keyboard_arrow_right",last:"last_page"},radio:{checked:{ios:"check",mat:"radio_button_checked"},unchecked:{ios:"",mat:"radio_button_unchecked"}},rating:{icon:"grade"},stepper:{done:"check",active:"edit",error:"warning"},tabs:{left:"chevron_left",right:"chevron_right"},table:{arrowUp:"arrow_upward",warning:"warning",prevPage:"chevron_left",nextPage:"chevron_right"},tree:{icon:"play_arrow"},uploader:{done:"done",clear:"cancel",clearInverted:"clear",add:"add",upload:"cloud_upload",expand:"keyboard_arrow_down",file:"insert_drive_file"}},S={__installed:!1,install:function(t,e,s){var n=this;this.set=function(s){void 0===s&&(s=k),s.set=n.set,i||t.icon?t.icon=s:e.util.defineReactive(t,"icon",s),n.name=s.name,n.def=s},this.set(s)}},q={server:[],takeover:[]},$={version:"0.17.12",theme:"ios"};var T=[],P={__installed:!1,__install:function(){this.__installed=!0,window.addEventListener("keyup",function(t){0!==T.length&&(27!==t.which&&27!==t.keyCode||T[T.length-1]())})},register:function(t){l.is.desktop&&(this.__installed||this.__install(),T.push(t))},pop:function(){l.is.desktop&&T.pop()}},L={props:{value:Boolean},data:function(){return{showing:!1}},watch:{value:function(t){var e=this;this.disable&&t?this.$emit("input",!1):this.$nextTick(function(){e.value!==e.showing&&e[t?"show":"hide"]()})}},methods:{toggle:function(t){return this[this.showing?"hide":"show"](t)},show:function(t){var e=this;return this.disable||this.showing?this.showPromise||Promise.resolve(t):(this.hidePromise&&this.hidePromiseReject(),this.showing=!0,!1===this.value&&this.$emit("input",!0),(void 0===this.$options.modelToggle||this.$options.modelToggle.history)&&(this.__historyEntry={handler:this.hide},c.add(this.__historyEntry)),this.__show?(this.showPromise=new Promise(function(i,s){e.showPromiseResolve=function(){e.showPromise=null,e.$emit("show",t),i(t)},e.showPromiseReject=function(){e.showPromise.catch(function(){}),e.showPromise=null,s(null)}}),this.__show(t),this.showPromise||Promise.resolve(t)):(this.$emit("show",t),Promise.resolve(t)))},hide:function(t){var e=this;return this.disable||!this.showing?this.hidePromise||Promise.resolve(t):(this.showPromise&&this.showPromiseReject(),this.showing=!1,!0===this.value&&this.$emit("input",!1),this.__removeHistory(),this.__hide?(this.hidePromise=new Promise(function(i,s){e.hidePromiseResolve=function(){e.hidePromise=null,e.$emit("hide",t),i()},e.hidePromiseReject=function(){e.hidePromise.catch(function(){}),e.hidePromise=null,s(null)}}),this.__hide(t),this.hidePromise||Promise.resolve(t)):(this.$emit("hide",t),Promise.resolve()))},__removeHistory:function(){this.__historyEntry&&(c.remove(this.__historyEntry),this.__historyEntry=null)}},beforeDestroy:function(){this.showing&&(this.showPromise&&this.showPromiseReject(),this.hidePromise&&this.hidePromiseReject(),this.__removeHistory())}},M={};function B(t){return 0===t.button}function E(t){return t.which||t.keyCode}function O(t){var e,i;if(t.touches&&t.touches[0]?t=t.touches[0]:t.changedTouches&&t.changedTouches[0]&&(t=t.changedTouches[0]),t.clientX||t.clientY)e=t.clientX,i=t.clientY;else if(t.pageX||t.pageY)e=t.pageX-document.body.scrollLeft-document.documentElement.scrollLeft,i=t.pageY-document.body.scrollTop-document.documentElement.scrollTop;else{var s=N(t).getBoundingClientRect();e=(s.right-s.left)/2+s.left,i=(s.bottom-s.top)/2+s.top}return{top:i,left:e}}function N(t){var e;return t.target?e=t.target:t.srcElement&&(e=t.srcElement),3===e.nodeType&&(e=e.parentNode),e}function z(t){if(t.path)return t.path;if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;){if(e.push(i),"HTML"===i.tagName)return e.push(document),e.push(window),e;i=i.parentElement}}Object.defineProperty(M,"passive",{configurable:!0,get:function(){var t;try{var e=Object.defineProperty({},"passive",{get:function(){t={passive:!0}}});window.addEventListener("qtest",null,e),window.removeEventListener("qtest",null,e)}catch(t){}return M.passive=t,t},set:function(t){Object.defineProperty(this,"passive",{value:t})}});var D=40,R=800;function I(t){var e,i=t.deltaX,s=t.deltaY;if((i||s)&&t.deltaMode){var n=1===t.deltaMode?D:R;i*=n,s*=n}return t.shiftKey&&!i&&(s=(e=[i,s])[0],i=e[1]),{x:i,y:s}}function H(t){t.preventDefault(),t.stopPropagation()}var A={listenOpts:M,leftClick:B,middleClick:function(t){return 1===t.button},rightClick:function(t){return 2===t.button},getEventKey:E,position:O,targetElement:N,getEventPath:z,getMouseWheelDistance:I,stopAndPrevent:H};function F(t){if(!t||t===window)return{top:0,left:0};var e=t.getBoundingClientRect();return{top:e.top,left:e.left}}function Q(t,e){return window.getComputedStyle(t).getPropertyValue(e)}function j(t){return t===window?window.innerHeight:parseFloat(Q(t,"height"))}function V(t){return t===window?window.innerWidth:parseFloat(Q(t,"width"))}function W(t,e){var i=t.style;Object.keys(e).forEach(function(t){i[t]=e[t]})}var K=["-webkit-","-moz-","-ms-","-o-"];function U(t){var e={transform:t};return K.forEach(function(i){e[i+"transform"]=t}),e}var Y,J={offset:F,style:Q,height:j,width:V,css:W,ready:function(t){if("function"==typeof t)return"loading"!==document.readyState?t():void document.addEventListener("DOMContentLoaded",t,!1)},cssTransform:U};function X(t){return t.closest(".scroll,.scroll-y,.overflow-auto")||window}function G(t){return t===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:t.scrollTop}function Z(t,e,i){if(!(i<=0)){var s=G(t);requestAnimationFrame(function(){tt(t,s+(e-s)/Math.max(16,i)*16),t.scrollTop!==e&&Z(t,e,i-16)})}}function tt(t,e){if(t===window)return document.documentElement.scrollTop=e,void(document.body.scrollTop=e);t.scrollTop=e}function et(t,e,i){i?Z(t,e,i):tt(t,e)}function it(){if(void 0!==Y)return Y;var t=document.createElement("p"),e=document.createElement("div");W(t,{width:"100%",height:"200px"}),W(e,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var s=t.offsetWidth;return i===s&&(s=e.clientWidth),e.remove(),Y=i-s}function st(t,e){return void 0===e&&(e=!0),!(!t||t.nodeType!==Node.ELEMENT_NODE)&&(e?t.scrollHeight>t.clientHeight&&(t.classList.contains("scroll")||t.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(t)["overflow-y"])):t.scrollWidth>t.clientWidth&&(t.classList.contains("scroll")||t.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(t)["overflow-x"])))}var nt={getScrollTarget:X,getScrollHeight:function(t){return(t===window?document.body:t).scrollHeight},getScrollPosition:G,animScrollTo:Z,setScrollPosition:et,getScrollbarWidth:it,hasScrollbar:st},ot=0;function rt(t){(function(t){if(t.target===document.body||t.target.classList.contains("q-layout-backdrop"))return!0;for(var e=z(t),i=t.shiftKey&&!t.deltaX,s=!i&&Math.abs(t.deltaX)<=Math.abs(t.deltaY),n=i||s?t.deltaY:t.deltaX,o=0;o<e.length;o++){var r=e[o];if(st(r,s))return s?n<0&&0===r.scrollTop||n>0&&r.scrollTop+r.clientHeight===r.scrollHeight:n<0&&0===r.scrollLeft||n>0&&r.scrollLeft+r.clientWidth===r.scrollWidth}return!0})(t)&&H(t)}function at(t){if(!((ot+=t?1:-1)>1)){var e=t?"add":"remove";l.is.mobile?document.body.classList[e]("q-body-prevent-scroll"):l.is.desktop&&window[e+"EventListener"]("wheel",rt)}}var lt={top:"items-start justify-center with-backdrop",bottom:"items-end justify-center with-backdrop",right:"items-center justify-end with-backdrop",left:"items-center justify-start with-backdrop"},ct={maxHeight:"80vh",height:"auto",boxShadow:"none"};var ht={responsive:0,maximized:0},ut={name:"QModal",mixins:[L],provide:function(){var t=this;return{__qmodal:{register:function(e){t.layout!==e&&(t.layout=e)},unregister:function(e){t.layout===e&&(t.layout=null)}}}},props:{position:{type:String,default:"",validator:function(t){return""===t||["top","bottom","left","right"].includes(t)}},transition:String,enterClass:String,leaveClass:String,positionClasses:{type:String,default:"flex-center"},contentClasses:[Object,Array,String],contentCss:[Object,Array,String],noBackdropDismiss:{type:Boolean,default:!1},noEscDismiss:{type:Boolean,default:!1},noRouteDismiss:Boolean,noRefocus:Boolean,minimized:Boolean,maximized:Boolean},data:function(){return{layout:null}},watch:{$route:function(){this.noRouteDismiss||this.hide()},maximized:function(t,e){this.__register(!1,e),this.__register(!0,t)},minimized:function(t,e){this.__register(!1,this.maximized,e),this.__register(!0,this.maximized,t)}},computed:{modalClasses:function(){var t=this.position?lt[this.position]:this.positionClasses;return this.maximized?["maximized",t]:this.minimized?["minimized",t]:t},contentClassesCalc:function(){return this.layout?[this.contentClasses,"column no-wrap"]:this.contentClasses},transitionProps:function(){return this.position?{name:"q-modal-"+this.position}:this.enterClass||this.leaveClass?{enterActiveClass:this.enterClass,leaveActiveClass:this.leaveClass}:{name:this.transition||"q-modal"}},modalCss:function(){if(this.position){var t=Array.isArray(this.contentCss)?this.contentCss:[this.contentCss];return t.unshift(Object.assign({},ct,function(t){var e={};return["left","right"].includes(t)&&(e.maxWidth="90vw"),["left","top"].includes(t)&&(e.borderTopLeftRadius=0),["right","top"].includes(t)&&(e.borderTopRightRadius=0),["left","bottom"].includes(t)&&(e.borderBottomLeftRadius=0),["right","bottom"].includes(t)&&(e.borderBottomRightRadius=0),e}(this.position))),t}return this.contentCss}},methods:{__dismiss:function(){var t=this;this.noBackdropDismiss?this.__shake():this.hide().then(function(){t.$emit("dismiss")})},__show:function(){var t=this;this.noRefocus||(this.__refocusTarget=document.activeElement),document.body.appendChild(this.$el),this.__register(!0),at(!0),P.register(function(){t.noEscDismiss?t.__shake():t.hide().then(function(){t.$emit("escape-key"),t.$emit("dismiss")})});var e=this.$refs.content;this.$q.platform.is.ios&&e.click(),e.scrollTop=0,["modal-scroll","layout-view"].forEach(function(t){[].slice.call(e.getElementsByClassName(t)).forEach(function(t){t.scrollTop=0})}),this.$nextTick(function(){return e&&e.focus()})},__hide:function(){this.__cleanup(),!this.noRefocus&&this.__refocusTarget&&(this.__refocusTarget.focus(),!this.__refocusTarget.classList.contains("q-if")&&this.__refocusTarget.blur())},__cleanup:function(){P.pop(),at(!1),this.__register(!1)},__stopPropagation:function(t){t.stopPropagation()},__register:function(t,e,i){void 0===e&&(e=this.maximized),void 0===i&&(i=this.minimized);var s=t?{action:"add",step:1}:{action:"remove",step:-1};if(e){if(ht.maximized+=s.step,!t&&ht.maximized>0)return;document.body.classList[s.action]("q-maximized-modal")}else if(!i){if(ht.responsive+=s.step,!t&&ht.responsive>0)return;document.body.classList[s.action]("q-responsive-modal")}},__shake:function(){var t=this;this.$el.classList.remove("animate-shake"),this.$el.classList.add("animate-shake"),clearTimeout(this.shakeTimeout),this.shakeTimeout=setTimeout(function(){t.$el.classList.remove("animate-shake")},150)}},mounted:function(){this.value&&this.show()},beforeDestroy:function(){clearTimeout(this.shakeTimeout),this.$el.remove(),this.showing&&this.__cleanup()},render:function(t){var e=this;return t("transition",{props:this.transitionProps,on:{afterEnter:function(){e.showPromise&&e.showPromiseResolve()},enterCancelled:function(){e.showPromise&&e.showPromiseReject(),e.$el.remove()},afterLeave:function(){e.hidePromise&&e.hidePromiseResolve(),e.$el.remove()},leaveCancelled:function(){e.hidePromise&&e.hidePromiseReject()}}},[t("div",{staticClass:"modal fullscreen row",class:this.modalClasses,on:{click:this.__dismiss},directives:[{name:"show",value:this.showing}]},[t("div",{ref:"content",staticClass:"modal-content",style:this.modalCss,class:this.contentClassesCalc,attrs:{tabindex:-1},on:{click:this.__stopPropagation,touchstart:this.__stopPropagation}},this.$slots.default)])])}},dt={name:"QIcon",props:{name:String,color:String,size:String},computed:{classes:function(){var t,e=this.name;return e?(t=/^fa[s|r|l|b]{0,1} /.test(e)||e.startsWith("icon-")?e:e.startsWith("bt-")?"bt "+e:/^ion-(md|ios|logo)/.test(e)?"ionicons "+e:e.startsWith("ion-")?"ionicons ion-ios"+e.substr(3):e.startsWith("mdi-")?"mdi "+e:"material-icons",this.color?t+" text-"+this.color:t):""},content:function(){return this.classes.startsWith("material-icons")?this.name.replace(/ /g,"_"):" "},style:function(){if(this.size)return{fontSize:this.size}}},render:function(t){return t("i",{staticClass:"q-icon",class:this.classes,style:this.style,attrs:{"aria-hidden":!0}},[this.content,this.$slots.default])}},pt={name:"QList",props:{noBorder:Boolean,dark:Boolean,dense:Boolean,sparse:Boolean,striped:Boolean,stripedOdd:Boolean,separator:Boolean,insetSeparator:Boolean,multiline:Boolean,highlight:Boolean,link:Boolean},computed:{classes:function(){return{"no-border":this.noBorder,"q-list-dark":this.dark,"q-list-dense":this.dense,"q-list-sparse":this.sparse,"q-list-striped":this.striped,"q-list-striped-odd":this.stripedOdd,"q-list-separator":this.separator,"q-list-inset-separator":this.insetSeparator,"q-list-multiline":this.multiline,"q-list-highlight":this.highlight,"q-list-link":this.link}}},render:function(t){return t("div",{staticClass:"q-list",class:this.classes},this.$slots.default)}},ft=null;if(!i)try{ft=new Event("qrouterlinkclick")}catch(t){(ft=document.createEvent("Event")).initEvent("qrouterlinkclick",!0,!1)}var mt={to:[String,Object],exact:Boolean,append:Boolean,replace:Boolean,event:[String,Array],activeClass:String,exactActiveClass:String},gt={props:mt,data:function(){return{routerLinkEventName:"qrouterlinkclick"}}};function vt(t){return void 0===t||t<2?{}:{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical","-webkit-line-clamp":t}}var bt={icon:String,rightIcon:String,image:String,rightImage:String,avatar:String,rightAvatar:String,letter:String,rightLetter:String,label:String,sublabel:String,labelLines:[String,Number],sublabelLines:[String,Number]},_t={mixins:[{props:mt}],props:{dark:Boolean,link:Boolean,dense:Boolean,sparse:Boolean,separator:Boolean,insetSeparator:Boolean,multiline:Boolean,highlight:Boolean,tag:{type:String,default:"div"}},computed:{itemClasses:function(){return{"q-item":!0,"q-item-division":!0,"relative-position":!0,"q-item-dark":this.dark,"q-item-dense":this.dense,"q-item-sparse":this.sparse,"q-item-separator":this.separator,"q-item-inset-separator":this.insetSeparator,"q-item-multiline":this.multiline,"q-item-highlight":this.highlight,"q-item-link":this.to||this.link}}}},yt={name:"QItem",mixins:[_t],props:{active:Boolean,link:Boolean},computed:{classes:function(){return[void 0!==this.to?"q-link":{active:this.active},this.itemClasses]}},render:function(t){return void 0!==this.to?t("router-link",{props:Object.assign({},this.$props,{tag:"a"}),class:this.classes},this.$slots.default):t(this.tag,{class:this.classes},this.$slots.default)}},wt={name:"QItemSide",props:{right:Boolean,icon:String,letter:{type:String,validator:function(t){return 1===t.length}},inverted:Boolean,avatar:String,image:String,stamp:String,color:String,textColor:String},computed:{type:function(){var t=this;return["icon","image","avatar","letter","stamp"].find(function(e){return t[e]})},classes:function(){var t=["q-item-side-"+(this.right?"right":"left")];return!this.color||this.icon||this.letter||t.push("text-"+this.color),t},typeClasses:function(){var t=["q-item-"+this.type];return this.color&&(this.inverted&&(this.icon||this.letter)?t.push("bg-"+this.color):this.textColor||t.push("text-"+this.color)),this.textColor&&t.push("text-"+this.textColor),this.inverted&&(this.icon||this.letter)&&(t.push("q-item-inverted"),t.push("flex"),t.push("flex-center")),t},imagePath:function(){return this.image||this.avatar}},render:function(t){var e;return this.type&&(this.icon?(e=t(dt,{class:this.inverted?null:this.typeClasses,props:{name:this.icon}}),this.inverted&&(e=t("div",{class:this.typeClasses},[e]))):e=this.imagePath?t("img",{class:this.typeClasses,attrs:{src:this.imagePath}}):t("div",{class:this.typeClasses},[this.stamp||this.letter])),t("div",{staticClass:"q-item-side q-item-section",class:this.classes},[e,this.$slots.default])}};function Ct(t,e,i,s){return t("div",{staticClass:"q-item-"+e+(1===(s=parseInt(s,10))?" ellipsis":""),style:vt(s),domProps:{innerHTML:i}})}var xt={name:"QItemMain",props:{label:String,labelLines:[String,Number],sublabel:String,sublabelLines:[String,Number],inset:Boolean,tag:{type:String,default:"div"}},render:function(t){return t(this.tag,{staticClass:"q-item-main q-item-section",class:{"q-item-main-inset":this.inset}},[this.label?Ct(t,"label",this.label,this.labelLines):null,this.sublabel?Ct(t,"sublabel",this.sublabel,this.sublabelLines):null,this.$slots.default])}},kt={name:"QItemSeparator",props:{inset:Boolean},render:function(t){return t("div",{staticClass:"q-item-separator-component",class:{"q-item-separator-inset-component":this.inset}},this.$slots.default)}},St={name:"QActionSheet",props:{value:Boolean,title:String,grid:Boolean,actions:Array,dismissLabel:String},computed:{contentCss:function(){return{backgroundColor:"transparent"}}},render:function(t){var e=this,i=[],s=this.$slots.title||this.title;return s&&i.push(t("div",{staticClass:"q-actionsheet-title column justify-center"},[s])),i.push(t("div",{staticClass:"q-actionsheet-body scroll"},this.actions?[this.grid?t("div",{staticClass:"q-actionsheet-grid row wrap items-center justify-between"},this.__getActions(t)):t(pt,{staticClass:"no-border",props:{link:!0}},this.__getActions(t))]:this.$slots.default)),i=[t("div",{staticClass:"q-actionsheet"},i),t("div",{staticClass:"q-actionsheet"},[t(yt,{props:{link:!0},attrs:{tabindex:0},nativeOn:{click:this.__onCancel,keyup:this.__onKeyCancel}},[t(xt,{staticClass:"text-center text-primary"},[this.dismissLabel||this.$q.i18n.label.cancel])])])],t(ut,{ref:"modal",props:{value:this.value,position:"bottom",contentCss:this.contentCss},on:{input:function(t){e.$emit("input",t)},show:function(){e.$emit("show")},hide:function(){e.$emit("hide")},dismiss:function(){e.$emit("cancel")},"escape-key":function(){e.$emit("escape-key")}}},i)},methods:{show:function(){return this.$refs.modal.show()},hide:function(){return this.$refs.modal?this.$refs.modal.hide():Promise.resolve()},__getActions:function(t){var e=this;return this.actions.map(function(i){var s;return i.label?t(e.grid?"div":yt,((s={staticClass:e.grid?"q-actionsheet-grid-item cursor-pointer relative-position column inline flex-center":null,class:i.classes,attrs:{tabindex:0}})[e.grid?"on":"nativeOn"]={click:function(){return e.__onOk(i)},keyup:function(t){13===E(t)&&e.__onOk(i)}},s),e.grid?[i.icon?t(dt,{props:{name:i.icon,color:i.color}}):null,i.avatar?t("img",{domProps:{src:i.avatar},staticClass:"avatar"}):null,t("span",[i.label])]:[t(wt,{props:{icon:i.icon,color:i.color,avatar:i.avatar}}),t(xt,{props:{inset:!0,label:i.label}})]):t(kt,{staticClass:"col-12"})})},__onOk:function(t){var e=this;this.hide().then(function(){"function"==typeof t.handler&&t.handler(),e.$emit("ok",t)})},__onCancel:function(){var t=this;this.hide().then(function(){t.$emit("cancel")})},__onKeyCancel:function(t){13===E(t)&&this.__onCancel()}}},qt=["B","kB","MB","GB","TB","PB"];function $t(t){for(var e=0;parseInt(t,10)>=1024&&e<qt.length-1;)t/=1024,++e;return t.toFixed(1)+" "+qt[e]}function Tt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Pt(t,e,i){return i<=e?e:Math.min(i,Math.max(e,t))}function Lt(t,e,i){if(i<=e)return e;var s=i-e+1,n=e+(t-e)%s;return n<e&&(n=s+n),0===n?0:n}function Mt(t,e,i){void 0===e&&(e=2),void 0===i&&(i="0");var s=""+t;return s.length>=e?s:new Array(e-s.length+1).join(i)+s}var Bt={humanStorageSize:$t,capitalize:Tt,between:Pt,normalizeToInterval:Lt,pad:Mt},Et=i?null:XMLHttpRequest,Ot=i?null:Et.prototype.send,Nt={start:[],stop:[]},zt=0;var Dt={name:"QAjaxBar",props:{position:{type:String,default:"top",validator:function(t){return["top","right","bottom","left"].includes(t)}},size:{type:String,default:"2px"},color:{type:String,default:"red"},skipHijack:Boolean,reverse:Boolean},data:function(){return{calls:0,progress:0,onScreen:!1,animate:!0}},computed:{classes:function(){return[this.position,"bg-"+this.color,this.animate?"":"no-transition"]},style:function(){var t=this.onScreen,e=function(t){var e=t.p,i=t.pos,s=t.active,n=t.horiz,o=t.reverse,r=t.dir,a=1,l=1;return n?(o&&(a=-1),"bottom"===i&&(l=-1),U("translate3d("+a*(e-100)+"%,"+(s?0:-200*l)+"%,0)")):(o&&(l=-1),"right"===i&&(a=-1),U("translate3d("+(s?0:r*a*-200)+"%,"+l*(e-100)+"%,0)"))}({p:this.progress,pos:this.position,active:t,horiz:this.horizontal,reverse:this.$q.i18n.rtl&&["top","bottom"].includes(this.position)?!this.reverse:this.reverse,dir:this.$q.i18n.rtl?-1:1});return e[this.sizeProp]=this.size,e.opacity=t?1:0,e},horizontal:function(){return"top"===this.position||"bottom"===this.position},sizeProp:function(){return this.horizontal?"height":"width"}},methods:{start:function(t){var e=this;void 0===t&&(t=300),this.calls++,this.calls>1||(clearTimeout(this.timer),this.$emit("start"),this.onScreen||(this.progress=0,this.onScreen=!0,this.animate=!1,this.timer=setTimeout(function(){e.animate=!0,e.__work(t)},100)))},increment:function(t){this.calls>0&&(this.progress=function(t,e){return"number"!=typeof e&&(e=t<25?3*Math.random()+3:t<65?3*Math.random():t<85?2*Math.random():t<99?.6:0),Pt(t+e,0,100)}(this.progress,t))},stop:function(){var t=this;if(this.calls=Math.max(0,this.calls-1),!(this.calls>0)){clearTimeout(this.timer),this.$emit("stop");var e=function(){t.animate=!0,t.progress=100,t.timer=setTimeout(function(){t.onScreen=!1},1e3)};0===this.progress?this.timer=setTimeout(e,1):e()}},__work:function(t){var e=this;this.progress<100&&(this.timer=setTimeout(function(){e.increment(),e.__work(t)},t))}},mounted:function(){this.skipHijack||(this.hijacked=!0,function(t,e){function i(){Nt.stop.map(function(t){t()})}Nt.start.push(t),Nt.stop.push(e),++zt>1||(Et.prototype.send=function(){for(var t=this,e=[],s=arguments.length;s--;)e[s]=arguments[s];Nt.start.map(function(t){t()}),this.addEventListener("abort",i,!1),this.addEventListener("readystatechange",function(){4===t.readyState&&i()},!1),Ot.apply(this,e)})}(this.start,this.stop))},beforeDestroy:function(){var t,e;clearTimeout(this.timer),this.hijacked&&(t=this.start,e=this.stop,Nt.start=Nt.start.filter(function(e){return e!==t}),Nt.stop=Nt.stop.filter(function(t){return t!==e}),(zt=Math.max(0,zt-1))||(Et.prototype.send=Ot))},render:function(t){return t("div",{staticClass:"q-loading-bar",class:this.classes,style:this.style})}};function Rt(t,e,i){var s=i.stop,n=i.center;s&&t.stopPropagation();var o,r,a=document.createElement("span"),l=document.createElement("span"),c=e.clientWidth>e.clientHeight?e.clientWidth:e.clientHeight,h=(n?c:2*c)+"px",u=e.getBoundingClientRect();if(a.appendChild(l),a.className="q-ripple-container",l.className="q-ripple-animation",l.style.width=h,l.style.height=h,e.appendChild(a),n)o=r=0;else{var d=O(t);o=d.left-u.left-c,r=d.top-u.top-c}l.classList.add("q-ripple-animation-enter"),l.classList.add("q-ripple-animation-visible"),W(l,U("translate("+o+"px, "+r+"px) scale3d(0, 0, 0)")),setTimeout(function(){l.classList.remove("q-ripple-animation-enter"),W(l,U("translate("+o+"px, "+r+"px) scale3d(1, 1, 1)")),setTimeout(function(){l.classList.remove("q-ripple-animation-visible"),setTimeout(function(){a.remove()},300)},300)},10)}function It(t){var e=t.mat,i=t.ios;return!!e||i&&!1}var Ht={name:"ripple",inserted:function(t,e){var i=e.value,s=e.modifiers;if(!It(s)){var n={enabled:!1!==i,modifiers:{stop:s.stop,center:s.center},click:function(e){n.enabled&&-1!==e.detail&&Rt(e,t,n.modifiers)},keyup:function(e){n.enabled&&13===e.keyCode&&Rt(e,t,n.modifiers)}};t.__qripple=n,t.addEventListener("click",n.click,!1),t.addEventListener("keyup",n.keyup,!1)}},update:function(t,e){var i=e.value,s=e.modifiers,n=s.stop,o=s.center,r=t.__qripple;r&&(r.enabled=!1!==i,r.modifiers={stop:n,center:o})},unbind:function(t,e){var i=e.modifiers,s=t.__qripple;s&&!It(i)&&(t.removeEventListener("click",s.click,!1),t.removeEventListener("keyup",s.keyup,!1),delete t.__qripple)}},At={left:"start",center:"center",right:"end",between:"between",around:"around"},Ft=Object.keys(At),Qt={props:{align:{type:String,default:"center",validator:function(t){return Ft.includes(t)}}},computed:{alignClass:function(){return"justify-"+At[this.align]}}},jt={xs:8,sm:10,md:14,lg:20,xl:24,form:14.777,"form-label":21.777,"form-hide-underline":9.333,"form-label-hide-underline":16.333},Vt={mixins:[Qt],directives:{Ripple:Ht},props:{type:String,loading:Boolean,disable:Boolean,label:[Number,String],noCaps:Boolean,noWrap:Boolean,icon:String,iconRight:String,round:Boolean,outline:Boolean,flat:Boolean,rounded:Boolean,push:Boolean,size:String,fab:Boolean,fabMini:Boolean,color:String,textColor:String,glossy:Boolean,dense:Boolean,noRipple:Boolean,tabindex:Number,to:[Object,String],replace:Boolean},computed:{style:function(){if(this.size&&!this.fab&&!this.fabMini)return{fontSize:this.size in jt?jt[this.size]+"px":this.size}},isRectangle:function(){return!this.isRound},isRound:function(){return this.round||this.fab||this.fabMini},shape:function(){return"q-btn-"+(this.isRound?"round":"rectangle")},isDisabled:function(){return this.disable||this.loading},hasRipple:function(){return!1},computedTabIndex:function(){return this.isDisabled?-1:this.tabindex||0},isLink:function(){return"a"===this.type||void 0!==this.to},attrs:function(){var t={tabindex:this.computedTabIndex};return"a"!==this.type&&(t.type=this.type||"button"),void 0!==this.to&&(t.href=this.$router.resolve(this.to).href),t},classes:function(){var t=[this.shape];return this.fab?t.push("q-btn-fab"):this.fabMini&&t.push("q-btn-fab-mini"),this.flat?t.push("q-btn-flat"):this.outline?t.push("q-btn-outline"):this.push&&t.push("q-btn-push"),this.isDisabled?t.push("disabled"):(t.push("q-focusable q-hoverable"),this.active&&t.push("active")),this.color?this.flat||this.outline?t.push("text-"+(this.textColor||this.color)):(t.push("bg-"+this.color),t.push("text-"+(this.textColor||"white"))):this.textColor&&t.push("text-"+this.textColor),t.push({"q-btn-no-uppercase":this.noCaps,"q-btn-rounded":this.rounded,"q-btn-dense":this.dense,glossy:this.glossy}),t},innerClasses:function(){var t=[this.alignClass];return this.noWrap&&t.push("no-wrap","text-no-wrap"),this.repeating&&t.push("non-selectable"),t}}},Wt={props:{color:String,size:{type:[Number,String],default:"1em"}},computed:{classes:function(){if(this.color)return"text-"+this.color}}},Kt={name:"QSpinnerIos",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,stroke:"currentColor",fill:"currentColor",viewBox:"0 0 64 64"}},[t("g",{attrs:{"stroke-width":"4","stroke-linecap":"round"}},[t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(180)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(210)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:"0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(240)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".1;0;1;.85;.7;.65;.55;.45;.35;.25;.15;.1",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(270)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".15;.1;0;1;.85;.7;.65;.55;.45;.35;.25;.15",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(300)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".25;.15;.1;0;1;.85;.7;.65;.55;.45;.35;.25",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(330)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".35;.25;.15;.1;0;1;.85;.7;.65;.55;.45;.35",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(0)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".45;.35;.25;.15;.1;0;1;.85;.7;.65;.55;.45",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(30)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".55;.45;.35;.25;.15;.1;0;1;.85;.7;.65;.55",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(60)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".65;.55;.45;.35;.25;.15;.1;0;1;.85;.7;.65",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(90)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".7;.65;.55;.45;.35;.25;.15;.1;0;1;.85;.7",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(120)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:".85;.7;.65;.55;.45;.35;.25;.15;.1;0;1;.85",repeatCount:"indefinite"}})]),t("line",{attrs:{y1:"17",y2:"29",transform:"translate(32,32) rotate(150)"}},[t("animate",{attrs:{attributeName:"stroke-opacity",dur:"750ms",values:"1;.85;.7;.65;.55;.45;.35;.25;.15;.1;0;1",repeatCount:"indefinite"}})])])])}},Ut={mixins:[Kt],name:"QSpinner"},Yt={name:"QBtn",mixins:[Vt],props:{percentage:Number,darkPercentage:Boolean,waitForRipple:Boolean,repeatTimeout:[Number,Function]},computed:{hasPercentage:function(){return void 0!==this.percentage},width:function(){return Pt(this.percentage,0,100)+"%"},events:function(){var t=this;return this.isDisabled||!this.repeatTimeout?{click:this.click,keydown:this.__onKeyDown,keyup:this.__onKeyUp}:{mousedown:this.__startRepeat,touchstart:this.__startRepeat,keydown:function(e){t.__onKeyDown(e,!0)},mouseup:this.__endRepeat,touchend:this.__endRepeat,keyup:function(e){t.__onKeyUp(e,!0)},mouseleave:this.__abortRepeat,touchmove:this.__abortRepeat,blur:this.__abortRepeat}}},data:function(){return{repeating:!1,active:!1}},methods:{click:function(t){var e=this;if(this.__cleanup(),void 0===this.to&&!this.isDisabled||(t&&H(t),!this.isDisabled))if(t&&-1!==t.detail&&"submit"===this.type){H(t);var i=new MouseEvent("click",Object.assign({},t,{detail:-1}));this.timer=setTimeout(function(){return e.$el&&e.$el.dispatchEvent(i)},200)}else{var s=function(){e.$router[e.replace?"replace":"push"](e.to)},n=function(){e.isDisabled||(e.$emit("click",t,s),void 0!==e.to&&!1!==t.navigate&&s())};this.waitForRipple&&this.hasRipple?this.timer=setTimeout(n,300):n()}},__cleanup:function(){clearTimeout(this.timer)},__onKeyDown:function(t,e){this.isDisabled||13!==t.keyCode||(this.active=!0,e?this.__startRepeat(t):H(t))},__onKeyUp:function(t,e){this.active&&(this.active=!1,this.isDisabled||13!==t.keyCode||this[e?"__endRepeat":"click"](t))},__startRepeat:function(t){var e=this;if(!this.repeating){var i=function(){e.timer=setTimeout(s,"function"==typeof e.repeatTimeout?e.repeatTimeout(e.repeatCount):e.repeatTimeout)},s=function(){e.isDisabled||(e.repeatCount+=1,t.repeatCount=e.repeatCount,e.$emit("click",t),i())};this.repeatCount=0,this.repeating=!0,i()}},__abortRepeat:function(){this.repeating=!1,this.__cleanup()},__endRepeat:function(t){this.repeating&&(this.repeating=!1,this.repeatCount?this.repeatCount=0:(t.detail||t.keyCode)&&(t.repeatCount=0,this.$emit("click",t)),this.__cleanup())}},beforeDestroy:function(){this.__cleanup()},render:function(t){return t(this.isLink?"a":"button",{staticClass:"q-btn inline relative-position q-btn-item non-selectable",class:this.classes,style:this.style,attrs:this.attrs,on:this.events,directives:this.hasRipple?[{name:"ripple",value:!0,modifiers:{center:this.isRound}}]:null},[t("div",{staticClass:"q-focus-helper"}),this.loading&&this.hasPercentage?t("div",{staticClass:"q-btn-progress absolute-full",class:{"q-btn-dark-progress":this.darkPercentage},style:{width:this.width}}):null,t("div",{staticClass:"q-btn-inner row col items-center",class:this.innerClasses},this.loading?[this.$slots.loading||t(Ut)]:[this.icon?t(dt,{class:{"on-left":this.label&&this.isRectangle},props:{name:this.icon}}):null,this.label&&this.isRectangle?t("div",[this.label]):null,this.$slots.default,this.iconRight&&this.isRectangle?t(dt,{staticClass:"on-right",props:{name:this.iconRight}}):null])])}},Jt={name:"QAlert",props:{type:{type:String,validator:function(t){return["positive","negative","warning","info"].includes(t)}},color:{type:String,default:"negative"},textColor:String,message:String,detail:String,icon:String,avatar:String,actions:Array},computed:{computedIcon:function(){return this.icon?this.icon:this.$q.icon.type[this.type||this.color]},classes:function(){return"bg-"+(this.type||this.color)+" text-"+(this.textColor||"white")}},render:function(t){var e=this,i=[],s=this.$slots.detail||this.detail;return this.avatar?i.push(t("img",{staticClass:"avatar",attrs:{src:this.avatar}})):(this.icon||this.type)&&i.push(t(dt,{props:{name:this.computedIcon}})),t("div",[t("div",{staticClass:"q-alert row no-wrap shadow-2",class:this.classes},[i.length?t("div",{staticClass:"q-alert-side col-auto row flex-center"},i):null,t("div",{staticClass:"q-alert-content col self-center"},[t("div",this.$slots.default||this.message),s?t("div",{staticClass:"q-alert-detail"},[s]):null]),this.actions&&this.actions.length?t("div",{staticClass:"q-alert-actions col-auto gutter-xs column flex-center"},this.actions.map(function(i){return t("div",{staticClass:"full-width"},[t(Yt,{staticClass:"full-width",props:{flat:!0,dense:!0,align:"left",icon:i.icon,label:!0===i.closeBtn?"string"==typeof i.label?i.label:e.$q.i18n.label.close:i.label},on:{click:function(){return i.handler()}}})])})):null])])}};function Xt(t,e){var i=e.field,s=e.list,n=t.toLowerCase();return s.filter(function(t){return(""+t[i]).toLowerCase().startsWith(n)})}function Gt(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}function Zt(){return Gt()+Gt()+"-"+Gt()+"-"+Gt()+"-"+Gt()+"-"+Gt()+Gt()+Gt()}function te(t,e,i,s,n){var o=function(t,e){var i=Object.assign({},t),s=Object.assign({},e),n={x:["left","right"].filter(function(t){return t!==s.horizontal}),y:["top","bottom"].filter(function(t){return t!==s.vertical})},o=-1!==[i.horizontal,s.horizontal].indexOf("middle"),r=-1!==[i.vertical,s.vertical].indexOf("center");return n.x.splice(o?0:1,0,"middle"),n.y.splice(r?0:1,0,"center"),r||(i.vertical="top"===i.vertical?"bottom":"top"),o||(i.horizontal="left"===i.horizontal?"right":"left"),{positions:n,anchorPos:i}}(s,i),r=o.positions,a=o.anchorPos;if(n.top<0||n.top+e.bottom>window.innerHeight){var l=t[a.vertical]-e[r.y[0]];l+e.bottom<=window.innerHeight?n.top=l:(l=t[a.vertical]-e[r.y[1]])+e.bottom<=window.innerHeight&&(n.top=l)}if(n.left<0||n.left+e.right>window.innerWidth){var c=t[a.horizontal]-e[r.x[0]];c+e.right<=window.innerWidth?n.left=c:(c=t[a.horizontal]-e[r.x[1]])+e.right<=window.innerWidth&&(n.left=c)}return n}function ee(t){var e,i=t.el,s=t.animate,n=t.anchorEl,o=t.anchorOrigin,r=t.selfOrigin,a=t.maxHeight,l=t.event,c=t.anchorClick,h=t.touchPosition,u=t.offset;if(i.style.maxHeight=a||"65vh",!l||c&&!h)e=function(t,e){var i=t.getBoundingClientRect(),s=i.top,n=i.left,o=i.right,r=i.bottom,a={top:s,left:n,width:t.offsetWidth,height:t.offsetHeight};return e&&(a.top-=e[1],a.left-=e[0],r&&(r+=e[1]),o&&(o+=e[0]),a.width+=e[0],a.height+=e[1]),a.right=o||a.left+a.width,a.bottom=r||a.top+a.height,a.middle=a.left+(a.right-a.left)/2,a.center=a.top+(a.bottom-a.top)/2,a}(n,u);else{var d=O(l),p=d.top,f=d.left;e={top:p,left:f,width:1,height:1,right:f+1,center:p,middle:f,bottom:p+1}}var m=function(t){return{top:0,center:t.offsetHeight/2,bottom:t.offsetHeight,left:0,middle:t.offsetWidth/2,right:t.offsetWidth}}(i),g={top:e[o.vertical]-m[r.vertical],left:e[o.horizontal]-m[r.horizontal]};if(g=te(e,m,r,o,g),i.style.top=Math.max(0,g.top)+"px",i.style.left=Math.max(0,g.left)+"px",s){var v=g.top<e.top?["up","down"]:["down","up"];i.classList.add("animate-popup-"+v[0]),i.classList.remove("animate-popup-"+v[1])}}function ie(t){var e=t.split(" ");return 2===e.length&&(["top","center","bottom"].includes(e[0])?!!["left","middle","right"].includes(e[1])||(console.error("Anchor/Self position must end with one of left/middle/right"),!1):(console.error("Anchor/Self position must start with one of top/center/bottom"),!1))}function se(t){return!t||2===t.length&&("number"==typeof t[0]&&"number"==typeof t[1])}function ne(t){var e=t.split(" ");return{vertical:e[0],horizontal:e[1]}}function oe(t){var e,i=!1;function s(){for(var s=this,n=[],o=arguments.length;o--;)n[o]=arguments[o];i||(i=!0,e=requestAnimationFrame(function(){t.apply(s,n),i=!1}))}return s.cancel=function(){window.cancelAnimationFrame(e),i=!1},s}var re={data:function(){return{canRender:!n}},mounted:function(){!1===this.canRender&&(this.canRender=!0)}},ae={name:"QPopover",mixins:[L,re],props:{anchor:{type:String,validator:ie},self:{type:String,validator:ie},fit:Boolean,cover:Boolean,persistent:Boolean,maxHeight:String,touchPosition:Boolean,anchorClick:{type:Boolean,default:!0},offset:{type:Array,validator:se},noFocus:Boolean,noRefocus:Boolean,disable:Boolean},watch:{$route:function(){this.hide()}},computed:{horizSide:function(){return this.$q.i18n.rtl?"right":"left"},anchorOrigin:function(){return ne(this.cover?"top "+this.horizSide:this.anchor||"bottom "+this.horizSide)},selfOrigin:function(){return ne(this.self||"top "+this.horizSide)}},render:function(t){if(this.canRender)return t("div",{staticClass:"q-popover scroll",ref:"content",attrs:{tabindex:-1},on:{click:function(t){t.stopPropagation()}}},this.$slots.default)},mounted:function(){var t=this;this.__updatePosition=oe(function(e,i,s){return t.reposition(i,s)}),this.$nextTick(function(){t.anchorEl=t.$el.parentNode,t.anchorEl.removeChild(t.$el),(t.anchorEl.classList.contains("q-btn-inner")||t.anchorEl.classList.contains("q-if-inner"))&&(t.anchorEl=t.anchorEl.parentNode),t.anchorClick&&(t.anchorEl.classList.add("cursor-pointer"),t.anchorEl.addEventListener("click",t.toggle),t.anchorEl.addEventListener("keyup",t.__toggleKey))}),this.value&&this.show()},beforeDestroy:function(){this.showing&&this.__cleanup(),this.anchorClick&&this.anchorEl&&(this.anchorEl.removeEventListener("click",this.toggle),this.anchorEl.removeEventListener("keyup",this.__toggleKey))},methods:{__show:function(t){var e=this;this.noRefocus||(this.__refocusTarget=this.anchorClick&&this.anchorEl||document.activeElement),document.body.appendChild(this.$el),P.register(function(){!e.persistent&&e.hide()}),this.scrollTarget=X(this.anchorEl),this.scrollTarget.addEventListener("scroll",this.__updatePosition,M.passive),this.scrollTarget!==window&&window.addEventListener("scroll",this.__updatePosition,M.passive),window.addEventListener("resize",this.__updatePosition,M.passive),this.__updatePosition(0,t,!0),clearTimeout(this.timer),!this.noFocus&&this.$refs.content&&this.$refs.content.focus(),this.timer=setTimeout(function(){document.body.addEventListener("click",e.__bodyHide,!0),document.body.addEventListener("touchstart",e.__bodyHide,!0),e.showPromise&&e.showPromiseResolve()},0)},__toggleKey:function(t){13===t.keyCode&&this.toggle(t)},__bodyHide:function(t){this.persistent||t&&t.target&&(this.$el.contains(t.target)||this.anchorEl.contains(t.target))||this.hide(t)},__hide:function(){this.__cleanup(),this.hidePromise&&this.hidePromiseResolve(),!this.noRefocus&&this.__refocusTarget&&(this.__refocusTarget.focus(),!this.__refocusTarget.classList.contains("q-if")&&this.__refocusTarget.blur())},__cleanup:function(){clearTimeout(this.timer),document.body.removeEventListener("click",this.__bodyHide,!0),document.body.removeEventListener("touchstart",this.__bodyHide,!0),this.scrollTarget.removeEventListener("scroll",this.__updatePosition,M.passive),this.scrollTarget!==window&&window.removeEventListener("scroll",this.__updatePosition,M.passive),window.removeEventListener("resize",this.__updatePosition,M.passive),P.pop(),this.$el.remove()},reposition:function(t,e){var i=this.anchorEl.getBoundingClientRect(),s=i.top;if(i.bottom<0||s>window.innerHeight)return this.hide();if(this.fit||this.cover){var n=window.getComputedStyle(this.anchorEl);this.$el.style.minWidth=n.getPropertyValue("width"),this.cover&&(this.$el.style.minHeight=n.getPropertyValue("height"))}ee({event:t,animate:e,el:this.$el,offset:this.offset,anchorEl:this.anchorEl,anchorOrigin:this.anchorOrigin,selfOrigin:this.selfOrigin,maxHeight:this.maxHeight,anchorClick:this.anchorClick,touchPosition:this.touchPosition})}}};function le(t,e,i,s,n,o){var r={props:{right:o.right}};if(s&&n)t.push(e(i,r,s));else{var a=!1;for(var l in o)if(o.hasOwnProperty(l)&&void 0!==(a=o[l])&&!0!==a){t.push(e(i,{props:o}));break}s&&t.push(e(i,r,s))}}var ce={name:"QItemWrapper",props:{cfg:{type:Object,default:function(){return{}}},slotReplace:Boolean},render:function(t){var e=this.cfg,i=this.slotReplace,s=[];return le(s,t,wt,this.$slots.left,i,{icon:e.icon,color:e.leftColor,avatar:e.avatar,letter:e.letter,image:e.image,inverted:e.leftInverted,textColor:e.leftTextColor}),le(s,t,xt,this.$slots.main,i,{label:e.label,sublabel:e.sublabel,labelLines:e.labelLines,sublabelLines:e.sublabelLines,inset:e.inset}),le(s,t,wt,this.$slots.right,i,{right:!0,icon:e.rightIcon,color:e.rightColor,avatar:e.rightAvatar,letter:e.rightLetter,image:e.rightImage,stamp:e.stamp,inverted:e.rightInverted,textColor:e.rightTextColor}),s.push(this.$slots.default),t(yt,{attrs:this.$attrs,on:this.$listeners,props:e},s)}},he={data:function(){return{keyboardIndex:0,keyboardMoveDirection:!1,keyboardMoveTimer:!1}},watch:{keyboardIndex:function(t){var e=this;this.$refs.popover&&this.$refs.popover.showing&&this.keyboardMoveDirection&&t>-1&&this.$nextTick(function(){if(e.$refs.popover){var t=e.$refs.popover.$el.querySelector(".q-select-highlight");if(t&&t.scrollIntoView){if(t.scrollIntoViewIfNeeded)return t.scrollIntoViewIfNeeded(!1);t.scrollIntoView(e.keyboardMoveDirection<0)}}})}},methods:{__keyboardShow:function(t){void 0===t&&(t=0),this.keyboardIndex!==t&&(this.keyboardIndex=t)},__keyboardSetCurrentSelection:function(t){this.keyboardIndex>=0&&this.keyboardIndex<=this.keyboardMaxIndex&&this.__keyboardSetSelection(this.keyboardIndex,t)},__keyboardHandleKey:function(t){var e=E(t);switch(e){case 38:this.__keyboardMoveCursor(-1,t);break;case 40:this.__keyboardMoveCursor(1,t);break;case 13:if(this.$refs.popover.showing)return H(t),void this.__keyboardSetCurrentSelection();break;case 9:this.hide()}this.__keyboardCustomKeyHandle(e,t)},__keyboardMoveCursor:function(t,e){var i=this;if(H(e),this.$refs.popover.showing){clearTimeout(this.keyboardMoveTimer);var s=this.keyboardIndex,n=this.__keyboardIsSelectableIndex||function(){return!0};do{s=Lt(s+t,-1,i.keyboardMaxIndex)}while(s!==this.keyboardIndex&&!n(s));return this.keyboardMoveDirection=s>this.keyboardIndex?1:-1,this.keyboardMoveTimer=setTimeout(function(){i.keyboardMoveDirection=!1},500),void(this.keyboardIndex=s)}this.__keyboardShowTrigger()}}},ue={name:"QAutocomplete",mixins:[he],props:{minCharacters:{type:Number,default:1},maxResults:{type:Number,default:6},maxHeight:String,debounce:{type:Number,default:500},filter:{type:Function,default:Xt},staticData:Object,valueField:{type:[String,Function],default:"value"},separator:Boolean},inject:{__input:{default:function(){console.error("QAutocomplete needs to be child of QInput, QChipsInput or QSearch")}},__inputDebounce:{default:null}},data:function(){return{searchId:"",results:[],width:0,enterKey:!1,timer:null}},watch:{"__input.val":function(){this.enterKey?this.enterKey=!1:this.__delayTrigger()}},computed:{computedResults:function(){return this.maxResults&&this.results.length>0?this.results.slice(0,this.maxResults):[]},computedValueField:function(){return this.valueField||(this.staticData?this.staticData.field:"value")},keyboardMaxIndex:function(){return this.computedResults.length-1},computedWidth:function(){return{minWidth:this.width}},searching:function(){return this.searchId.length>0}},methods:{isWorking:function(){return this.$refs&&this.$refs.popover},trigger:function(t){var e=this;if(this.__input&&this.__input.isEditable()&&this.__input.hasFocus()&&this.isWorking()){var i=[null,void 0].includes(this.__input.val)?"":String(this.__input.val),s=i.length,n=Zt(),o=this.$refs.popover;if(this.searchId=n,s<this.minCharacters||!0===t&&s>0)return this.searchId="",this.__clearSearch(),void this.hide();if(this.width=V(this.inputEl)+"px",this.staticData)return this.searchId="",this.results=this.filter(i,this.staticData),this.results.length?void this.__showResults():void o.hide();this.__input.loading=!0,this.$emit("search",i,function(t){if(e.isWorking()&&e.searchId===n){if(e.__clearSearch(),Array.isArray(t)&&t.length>0)return e.results=t,void e.__showResults();e.hide()}})}},hide:function(){return this.results=[],this.isWorking()?this.$refs.popover.hide():Promise.resolve()},blurHide:function(){var t=this;this.__clearSearch(),this.timer=setTimeout(function(){return t.hide()},300)},__clearSearch:function(){clearTimeout(this.timer),this.__input.loading=!1,this.searchId=""},__keyboardCustomKeyHandle:function(t){switch(t){case 27:this.__clearSearch();break;case 38:case 40:case 9:this.__keyboardSetCurrentSelection(!0)}},__keyboardShowTrigger:function(){this.trigger()},__focusShowTrigger:function(){var t=this;clearTimeout(this.timer),this.timer=setTimeout(function(){return t.trigger(!0)},100)},__keyboardIsSelectableIndex:function(t){return t>-1&&t<this.computedResults.length&&!this.computedResults[t].disable},setValue:function(t,e){var i="function"==typeof this.computedValueField?this.computedValueField(t):t[this.computedValueField],s=this.__inputDebounce?"Debounce":"";this.inputEl&&this.__input&&!this.__input.hasFocus()&&this.inputEl.focus(),this.enterKey=this.__input&&i!==this.__input.val,this["__input"+s][e?"setNav":"set"](i),this.$emit("selected",t,!!e),e||(this.__clearSearch(),this.hide())},__keyboardSetSelection:function(t,e){this.setValue(this.results[t],e)},__delayTrigger:function(){this.__clearSearch(),this.__input.hasFocus()&&(this.staticData?this.trigger():this.timer=setTimeout(this.trigger,this.debounce))},__showResults:function(){var t=this.$refs.popover;this.__keyboardShow(-1),t.showing?this.$nextTick(function(){return t.showing&&t.reposition()}):t.show()}},mounted:function(){var t=this;this.__input.register(),this.__inputDebounce&&this.__inputDebounce.setChildDebounce(!0),this.$nextTick(function(){t.__input&&(t.inputEl=t.__input.getEl()),t.inputEl.addEventListener("keydown",t.__keyboardHandleKey),t.inputEl.addEventListener("blur",t.blurHide),t.inputEl.addEventListener("focus",t.__focusShowTrigger)})},beforeDestroy:function(){this.__clearSearch(),this.__input.unregister(),this.__inputDebounce&&this.__inputDebounce.setChildDebounce(!1),this.inputEl&&(this.inputEl.removeEventListener("keydown",this.__keyboardHandleKey),this.inputEl.removeEventListener("blur",this.blurHide),this.inputEl.removeEventListener("focus",this.__focusShowTrigger),this.hide())},render:function(t){var e=this,i=this.__input.isDark();return t(ae,{ref:"popover",class:i?"bg-dark":null,props:{fit:!0,anchorClick:!1,maxHeight:this.maxHeight,noFocus:!0,noRefocus:!0},on:{show:function(){e.__input.selectionOpen=!0,e.$emit("show")},hide:function(){e.__input.selectionOpen=!1,e.$emit("hide")}}},[t(pt,{props:{dark:i,noBorder:!0,separator:this.separator},style:this.computedWidth},this.computedResults.map(function(i,s){return t(ce,{key:i.id||s,class:{"q-select-highlight":e.keyboardIndex===s,"cursor-pointer":!i.disable,"text-faded":i.disable},props:{cfg:i},nativeOn:{mouseenter:function(){!i.disable&&(e.keyboardIndex=s)},click:function(){!i.disable&&e.setValue(i)}}})}))])}},de={name:"QBreadcrumbs",mixins:[Qt],props:{color:{type:String,default:"faded"},activeColor:{type:String,default:"primary"},separator:{type:String,default:"/"},align:Object.assign({},Qt.props.align,{default:"left"})},computed:{classes:function(){return["text-"+this.color,this.alignClass]}},render:function(t){var e=this;if(this.$slots.default){var i=[],s=this.$slots.default.filter(function(t){return void 0!==t.tag&&t.tag.endsWith("-QBreadcrumbsEl")}).length,n=this.$scopedSlots.separator||function(){return e.separator},o="text-"+this.color,r="text-"+this.activeColor,a=1;for(var l in e.$slots.default){var c=e.$slots.default[l];if(void 0!==c.tag&&c.tag.endsWith("-QBreadcrumbsEl")){var h=a<s;a++,i.push(t("div",{staticClass:"flex items-center",class:[h?r:o,h?"text-weight-bold":"q-breadcrumbs-last"]},[c])),h&&i.push(t("div",{staticClass:"q-breadcrumbs-separator",class:o},[n()]))}else i.push(c)}return t("div",{staticClass:"q-breadcrumbs flex gutter-xs items-center overflow-hidden",class:this.classes},i)}}},pe={name:"QBreadcrumbsEl",mixins:[{props:mt}],props:{label:String,icon:String,color:String},render:function(t){return t(void 0!==this.to?"router-link":"span",{staticClass:"q-link q-breadcrumbs-el flex inline items-center relative-position",props:void 0!==this.to?this.$props:null},[this.icon?t(dt,{staticClass:"q-breacrumbs-el-icon q-mr-sm",props:{name:this.icon}}):null,this.label].concat(this.$slots.default))}},fe={name:"QBtnGroup",props:{outline:Boolean,flat:Boolean,rounded:Boolean,push:Boolean},computed:{classes:function(){var t=this;return["outline","flat","rounded","push"].filter(function(e){return t[e]}).map(function(t){return"q-btn-group-"+t}).join(" ")}},render:function(t){return t("div",{staticClass:"q-btn-group row no-wrap inline",class:this.classes},this.$slots.default)}},me={name:"QBtnDropdown",mixins:[Vt],props:{value:Boolean,split:Boolean,contentClass:[Array,String,Object],contentStyle:[Array,String,Object],popoverAnchor:{type:String,default:"bottom right"},popoverSelf:{type:String,default:"top right"}},data:function(){return{showing:this.value}},watch:{value:function(t){this.$refs.popover&&this.$refs.popover[t?"show":"hide"]()}},render:function(t){var e=this,i=t(ae,{ref:"popover",props:{disable:this.disable,fit:!0,anchorClick:!this.split,anchor:this.popoverAnchor,self:this.popoverSelf},class:this.contentClass,style:this.contentStyle,on:{show:function(t){e.showing=!0,e.$emit("show",t),e.$emit("input",!0)},hide:function(t){e.showing=!1,e.$emit("hide",t),e.$emit("input",!1)}}},this.$slots.default),s=t(dt,{props:{name:this.$q.icon.input.dropdown},staticClass:"transition-generic",class:{"rotate-180":this.showing,"on-right":!this.split,"q-btn-dropdown-arrow":!this.split}}),n=t(Yt,{props:Object.assign({},this.$props,{iconRight:this.split?this.iconRight:null}),class:this.split?"q-btn-dropdown-current":"q-btn-dropdown q-btn-dropdown-simple",on:{click:function(t){e.split&&e.hide(),e.disable||e.$emit("click",t)}}},this.split?null:[s,i]);return this.split?t(fe,{props:{outline:this.outline,flat:this.flat,rounded:this.rounded,push:this.push},staticClass:"q-btn-dropdown q-btn-dropdown-split no-wrap q-btn-item"},[n,t(Yt,{props:{disable:this.disable,outline:this.outline,flat:this.flat,rounded:this.rounded,push:this.push,size:this.size,color:this.color,textColor:this.textColor,dense:this.dense,glossy:this.glossy,noRipple:this.noRipple,waitForRipple:this.waitForRipple},staticClass:"q-btn-dropdown-arrow",on:{click:function(){e.toggle()}}},[s]),[i]]):n},methods:{toggle:function(){return this.$refs.popover?this.$refs.popover.toggle():Promise.resolve()},show:function(){return this.$refs.popover?this.$refs.popover.show():Promise.resolve()},hide:function(){return this.$refs.popover?this.$refs.popover.hide():Promise.resolve()}},mounted:function(){var t=this;this.$nextTick(function(){t.value&&t.$refs.popover&&t.$refs.popover.show()})}},ge={name:"QBtnToggle",props:{value:{required:!0},color:String,textColor:String,toggleColor:{type:String,default:"primary"},toggleTextColor:String,options:{type:Array,required:!0,validator:function(t){return t.every(function(t){return("label"in t||"icon"in t)&&"value"in t})}},readonly:Boolean,disable:Boolean,noCaps:Boolean,noWrap:Boolean,outline:Boolean,flat:Boolean,dense:Boolean,rounded:Boolean,push:Boolean,size:String,glossy:Boolean,noRipple:Boolean,waitForRipple:Boolean},computed:{val:function(){var t=this;return this.options.map(function(e){return e.value===t.value})}},methods:{set:function(t,e){var i=this;this.readonly||(this.$emit("input",t,e),this.$nextTick(function(){JSON.stringify(t)!==JSON.stringify(i.value)&&i.$emit("change",t,e)}))}},render:function(t){var e=this;return t(fe,{staticClass:"q-btn-toggle",props:{outline:this.outline,flat:this.flat,rounded:this.rounded,push:this.push}},this.options.map(function(i,s){return t(Yt,{key:""+i.label+i.icon+i.iconRight,on:{click:function(){return e.set(i.value,i)}},props:{disable:e.disable,label:i.label,color:e.val[s]?i.toggleColor||e.toggleColor:i.color||e.color,textColor:e.val[s]?i.toggleTextColor||e.toggleTextColor:i.textColor||e.textColor,icon:i.icon,iconRight:i.iconRight,noCaps:e.noCaps||i.noCaps,noWrap:e.noWrap||i.noWrap,outline:e.outline,flat:e.flat,rounded:e.rounded,push:e.push,glossy:e.glossy,size:e.size,dense:e.dense,noRipple:e.noRipple||i.noRipple,waitForRipple:e.waitForRipple||i.waitForRipple,tabindex:i.tabindex}})}))}},ve={name:"QCard",props:{square:Boolean,flat:Boolean,inline:Boolean,color:String,textColor:String},computed:{classes:function(){var t=[{"no-border-radius":this.square,"no-shadow":this.flat,"inline-block":this.inline}];return this.color?(t.push("bg-"+this.color),t.push("q-card-dark"),t.push("text-"+(this.textColor||"white"))):this.textColor&&t.push("text-"+this.textColor),t}},render:function(t){return t("div",{staticClass:"q-card",class:this.classes},this.$slots.default)}},be={name:"QCardActions",props:{vertical:Boolean,align:{type:String,default:"start",validator:function(t){return["start","center","end","around","between"].includes(t)}}},computed:{classes:function(){return"q-card-actions-"+(this.vertical?"vert column justify-start":"horiz row")+" "+(this.vertical?"items":"justify")+"-"+this.align}},render:function(t){return t("div",{staticClass:"q-card-actions",class:this.classes},this.$slots.default)}},_e={name:"QCardMedia",props:{overlayPosition:{type:String,default:"bottom",validator:function(t){return["top","bottom","full"].includes(t)}}},render:function(t){return t("div",{staticClass:"q-card-media relative-position"},[this.$slots.default,this.$slots.overlay?t("div",{staticClass:"q-card-media-overlay",class:"absolute-"+this.overlayPosition},[this.$slots.overlay]):null])}},ye={name:"QCardSeparator",props:{inset:Boolean},render:function(t){return t("div",{staticClass:"q-card-separator",class:{inset:this.inset}},this.$slots.default)}};function we(t,e,i){var s=O(t),n=s.left-e.event.x,o=s.top-e.event.y,r=Math.abs(n),a=Math.abs(o);return{evt:t,position:s,direction:e.direction.horizontal&&!e.direction.vertical?n<0?"left":"right":!e.direction.horizontal&&e.direction.vertical?o<0?"up":"down":r>=a?n<0?"left":"right":o<0?"up":"down",isFirst:e.event.isFirst,isFinal:Boolean(i),duration:(new Date).getTime()-e.event.time,distance:{x:r,y:a},delta:{x:s.left-e.event.lastX,y:s.top-e.event.lastY}}}var Ce={name:"touch-pan",bind:function(t,e){var i=!e.modifiers.noMouse,s=e.modifiers.stop,n=e.modifiers.prevent,o=n||e.modifiers.mightPrevent?null:M.passive,r={handler:e.value,direction:function(t){if(!t.horizontal&&!t.vertical)return{horizontal:!0,vertical:!0};var e={};return["horizontal","vertical"].forEach(function(i){t[i]&&(e[i]=!0)}),e}(e.modifiers),mouseStart:function(t){B(t)&&(document.addEventListener("mousemove",r.move,o),document.addEventListener("mouseup",r.mouseEnd,o),r.start(t))},mouseEnd:function(t){document.removeEventListener("mousemove",r.move,o),document.removeEventListener("mouseup",r.mouseEnd,o),r.end(t)},start:function(e){var i=O(e);r.event={x:i.left,y:i.top,time:(new Date).getTime(),detected:r.direction.horizontal&&r.direction.vertical,abort:!1,isFirst:!0,lastX:i.left,lastY:i.top},r.event.detected&&(t.classList.add("q-touch"),s&&e.stopPropagation(),n&&e.preventDefault())},move:function(t){if(!r.event.abort)if(r.event.detected){s&&t.stopPropagation(),n&&t.preventDefault();var e=we(t,r,!1);(function(t,e){return!(!t.direction.horizontal||!t.direction.vertical)||(t.direction.horizontal&&!t.direction.vertical?Math.abs(e.delta.x)>0:!t.direction.horizontal&&t.direction.vertical?Math.abs(e.delta.y)>0:void 0)})(r,e)&&(r.handler(e),r.event.lastX=e.position.left,r.event.lastY=e.position.top,r.event.isFirst=!1)}else{var i=O(t),o=Math.abs(i.left-r.event.x),a=Math.abs(i.top-r.event.y);o!==a&&(r.event.detected=!0,r.event.abort=r.direction.vertical?o>a:o<a,r.move(t))}},end:function(e){t.classList.remove("q-touch"),r.event.abort||!r.event.detected||r.event.isFirst||(s&&e.stopPropagation(),n&&e.preventDefault(),r.handler(we(e,r,!0)))}};t.__qtouchpan=r,i&&t.addEventListener("mousedown",r.mouseStart,o),t.addEventListener("touchstart",r.start,o),t.addEventListener("touchmove",r.move,o),t.addEventListener("touchend",r.end,o)},update:function(t,e){e.oldValue!==e.value&&(t.__qtouchpan.handler=e.value)},unbind:function(t,e){var i=t.__qtouchpan;if(i){var s=e.modifiers.prevent?null:M.passive;t.removeEventListener("mousedown",i.mouseStart,s),t.removeEventListener("touchstart",i.start,s),t.removeEventListener("touchmove",i.move,s),t.removeEventListener("touchend",i.end,s),delete t.__qtouchpan}}};function xe(t){return"[object Date]"===Object.prototype.toString.call(t)}function ke(t){return"number"==typeof t&&isFinite(t)}var Se=function(t){return t},qe=function(t){return t<.5?2*t*t:(4-2*t)*t-1},$e=function(t){return Math.pow(t,3)},Te=function(t){return 1+Math.pow(t-1,3)},Pe=function(t){return t<.4031?12*Math.pow(t,4):1/1290*(11*Math.sqrt(-4e4*t*t+8e4*t-23359)-129)},Le=Te,Me={linear:Se,easeInQuad:function(t){return t*t},easeOutQuad:function(t){return t*(2-t)},easeInOutQuad:qe,easeInCubic:$e,easeOutCubic:Te,easeInOutCubic:function(t){return t<.5?4*Math.pow(t,3):1+(t-1)*Math.pow(2*t-2,2)},easeInQuart:function(t){return Math.pow(t,4)},easeOutQuart:function(t){return 1-Math.pow(t-1,4)},easeInOutQuart:function(t){return t<.5?8*Math.pow(t,4):1-8*Math.pow(t-1,4)},easeInQuint:function(t){return Math.pow(t,5)},easeOutQuint:function(t){return 1+Math.pow(t-1,5)},easeInOutQuint:function(t){return t<.5?16*Math.pow(t,5):1+16*Math.pow(t-1,5)},easeInCirc:function(t){return-1*Math.sqrt(1-Math.pow(t,2))+1},easeOutCirc:function(t){return Math.sqrt(-1*(t-2)*t)},easeInOutCirc:function(t){return t<.5?.5*(1-Math.sqrt(1-4*t*t)):.5*(1+Math.sqrt(8*t-3-4*t*t))},overshoot:function(t){return-1*Math.pow(Math.E,-6.3*t)*Math.cos(5*t)+1},standard:Pe,decelerate:Le,accelerate:$e,sharp:qe},Be={};function Ee(t){var e=t.name,i=t.duration;void 0===i&&(i=300);var s=t.to,n=t.from,o=t.apply,r=t.done,a=t.cancel,l=t.easing,c=e,h=new Date;c?Oe(c):c=Zt();var u=l||Se,d=function(){var t=(new Date-h)/i;t>1&&(t=1);var e=n+(s-n)*u(t);if(o(e,t),1===t)return delete Be[c],void(r&&r(e));p.last={pos:e,progress:t},p.timer=requestAnimationFrame(d)},p=Be[c]={cancel:a,timer:requestAnimationFrame(d)};return c}function Oe(t){if(t){var e=Be[t];e&&e.timer&&(cancelAnimationFrame(e.timer),e.cancel&&e.cancel(e.last),delete Be[t])}}var Ne={start:Ee,stop:Oe},ze={data:function(){return{inFullscreen:!1}},watch:{$route:function(){this.exitFullscreen()},inFullscreen:function(t){this.$emit("fullscreen",t)}},methods:{toggleFullscreen:function(){this.inFullscreen?this.exitFullscreen():this.setFullscreen()},setFullscreen:function(){this.inFullscreen||(this.inFullscreen=!0,this.container=this.$el.parentNode,this.container.replaceChild(this.fullscreenFillerNode,this.$el),document.body.appendChild(this.$el),document.body.classList.add("q-body-fullscreen-mixin"),this.__historyFullscreen={handler:this.exitFullscreen},c.add(this.__historyFullscreen))},exitFullscreen:function(){this.inFullscreen&&(this.__historyFullscreen&&(c.remove(this.__historyFullscreen),this.__historyFullscreen=null),this.container.replaceChild(this.$el,this.fullscreenFillerNode),document.body.classList.remove("q-body-fullscreen-mixin"),this.inFullscreen=!1)}},beforeMount:function(){this.fullscreenFillerNode=document.createElement("span")},beforeDestroy:function(){this.exitFullscreen()}},De={name:"QCarousel",mixins:[ze],directives:{TouchPan:Ce},props:{value:Number,color:{type:String,default:"primary"},height:String,arrows:Boolean,infinite:Boolean,animation:{type:[Number,Boolean],default:!0},easing:Function,swipeEasing:Function,noSwipe:Boolean,autoplay:[Number,Boolean],handleArrowKeys:Boolean,quickNav:Boolean,quickNavPosition:{type:String,default:"bottom",validator:function(t){return["top","bottom"].includes(t)}},quickNavIcon:String,thumbnails:{type:Array,default:function(){return[]}},thumbnailsIcon:String,thumbnailsHorizontal:Boolean},provide:function(){return{carousel:this}},data:function(){return{position:0,slide:0,positionSlide:0,slidesNumber:0,animUid:!1,viewThumbnails:!1}},watch:{value:function(t){t!==this.slide&&this.goToSlide(t)},autoplay:function(){this.__planAutoPlay()},infinite:function(){this.__planAutoPlay()},handleArrowKeys:function(t){this.__setArrowKeys(t)}},computed:{rtlDir:function(){return this.$q.i18n.rtl?-1:1},arrowIcon:function(){var t=[this.$q.icon.carousel.left,this.$q.icon.carousel.right];return this.$q.i18n.rtl?t.reverse():t},trackPosition:function(){return U("translateX("+this.rtlDir*this.position+"%)")},infiniteLeft:function(){return this.infinite&&this.slidesNumber>1&&this.positionSlide<0},infiniteRight:function(){return this.infinite&&this.slidesNumber>1&&this.positionSlide>=this.slidesNumber},canGoToPrevious:function(){return this.infinite?this.slidesNumber>1:this.slide>0},canGoToNext:function(){return this.infinite?this.slidesNumber>1:this.slide<this.slidesNumber-1},computedQuickNavIcon:function(){return this.quickNavIcon||this.$q.icon.carousel.quickNav},computedStyle:function(){if(!this.inFullscreen&&this.height)return"height: "+this.height},slotScope:function(){return{slide:this.slide,slidesNumber:this.slidesNumber,percentage:this.slidesNumber<2?100:100*this.slide/(this.slidesNumber-1),goToSlide:this.goToSlide,previous:this.previous,next:this.next,color:this.color,inFullscreen:this.inFullscreen,toggleFullscreen:this.toggleFullscreen,canGoToNext:this.canGoToNext,canGoToPrevious:this.canGoToPrevious}},computedThumbnailIcon:function(){return this.thumbnailsIcon||this.$q.icon.carousel.thumbnails}},methods:{previous:function(){return this.canGoToPrevious?this.goToSlide(this.slide-1):Promise.resolve()},next:function(){return this.canGoToNext?this.goToSlide(this.slide+1):Promise.resolve()},goToSlide:function(t,e){var i=this;return void 0===e&&(e=!1),new Promise(function(s){var n,o="",r=i.slide;i.__cleanup();var a=function(){i.$emit("input",i.slide),i.$emit("slide",i.slide,o),i.$emit("slide-direction",o),i.__planAutoPlay(),s()};if(i.slidesNumber<2?(i.slide=0,i.positionSlide=0,n=0):(i.hasOwnProperty("initialPosition")||(i.position=100*-i.slide),o=t>i.slide?"next":"previous",i.infinite?(i.slide=Lt(t,0,i.slidesNumber-1),n=Lt(t,-1,i.slidesNumber),e||(i.positionSlide=n)):(i.slide=Pt(t,0,i.slidesNumber-1),i.positionSlide=i.slide,n=i.slide)),i.$emit("slide-trigger",r,i.slide,o),n*=-100,!i.animation)return i.position=n,void a();i.animationInProgress=!0,i.animUid=Ee({from:i.position,to:n,duration:ke(i.animation)?i.animation:300,easing:e?i.swipeEasing||Le:i.easing||Pe,apply:function(t){i.position=t},done:function(){i.infinite&&(i.position=100*-i.slide,i.positionSlide=i.slide),i.animationInProgress=!1,a()}})})},stopAnimation:function(){Oe(this.animUid),this.animationInProgress=!1},__pan:function(t){var e=this;if(!this.infinite||!this.animationInProgress){t.isFirst&&(this.initialPosition=this.position,this.__cleanup());var i=this.rtlDir*("left"===t.direction?-1:1)*t.distance.x;(this.infinite&&this.slidesNumber<2||!this.infinite&&(0===this.slide&&i>0||this.slide===this.slidesNumber-1&&i<0))&&(i=0);var s=this.initialPosition+i/this.$refs.track.offsetWidth*100,n=this.slide+this.rtlDir*("left"===t.direction?1:-1);this.position!==s&&(this.position=s),this.positionSlide!==n&&(this.positionSlide=n),t.isFinal&&this.goToSlide(t.distance.x<40?this.slide:this.positionSlide,!0).then(function(){delete e.initialPosition})}},__planAutoPlay:function(){var t=this;this.$nextTick(function(){t.autoplay&&(clearTimeout(t.timer),t.timer=setTimeout(t.next,ke(t.autoplay)?t.autoplay:5e3))})},__cleanup:function(){this.stopAnimation(),clearTimeout(this.timer)},__handleArrowKey:function(t){var e=E(t);37===e?this.previous():39===e&&this.next()},__setArrowKeys:function(t){document[(!0===t?"add":"remove")+"EventListener"]("keydown",this.__handleArrowKey)},__registerSlide:function(){this.slidesNumber++},__unregisterSlide:function(){this.slidesNumber--},__getScopedSlots:function(t){var e=this;if(0!==this.slidesNumber){var i=this.$scopedSlots;return i?Object.keys(i).filter(function(t){return t.startsWith("control-")}).map(function(t){return i[t](e.slotScope)}):void 0}},__getQuickNav:function(t){var e=this;if(0!==this.slidesNumber&&this.quickNav){var i=this.$scopedSlots["quick-nav"],s=[];if(i)for(var n=function(t){s.push(i({slide:t,before:t<e.slide,current:t===e.slide,after:t>e.slide,color:e.color,goToSlide:function(i){e.goToSlide(i||t)}}))},o=0;o<this.slidesNumber;o++)n(o);else for(var r=function(i){s.push(t(Yt,{key:i,class:{inactive:i!==e.slide},props:{icon:e.computedQuickNavIcon,round:!0,flat:!0,dense:!0,color:e.color},on:{click:function(){e.goToSlide(i)}}}))},a=0;a<this.slidesNumber;a++)r(a);return t("div",{staticClass:"q-carousel-quick-nav scroll text-center",class:["text-"+this.color,"absolute-"+this.quickNavPosition]},s)}},__getThumbnails:function(t){var e=this,i=this.thumbnails.map(function(i,s){if(i)return t("div",{on:{click:function(){e.goToSlide(s)}}},[t("img",{attrs:{src:i},class:{active:e.slide===s}})])}),s=[t(Yt,{staticClass:"q-carousel-thumbnail-btn absolute",props:{icon:this.computedThumbnailIcon,fabMini:!0,flat:!0,color:this.color},on:{click:function(){e.viewThumbnails=!e.viewThumbnails}}}),t("div",{staticClass:"q-carousel-thumbnails scroll absolute-bottom",class:{active:this.viewThumbnails}},[t("div",{staticClass:"row gutter-xs",class:this.thumbnailsHorizontal?"no-wrap":"justify-center"},i)])];return this.viewThumbnails&&s.unshift(t("div",{staticClass:"absolute-full",on:{click:function(){e.viewThumbnails=!1}}})),s}},render:function(t){return t("div",{staticClass:"q-carousel",style:this.computedStyle,class:{fullscreen:this.inFullscreen}},[t("div",{staticClass:"q-carousel-inner",directives:this.noSwipe?null:[{name:"touch-pan",modifiers:{horizontal:!0,prevent:!0,stop:!0},value:this.__pan}]},[t("div",{ref:"track",staticClass:"q-carousel-track",style:this.trackPosition,class:{"infinite-left":this.infiniteLeft,"infinite-right":this.infiniteRight}},[this.infiniteRight?t("div",{staticClass:"q-carousel-slide",style:"flex: 0 0 100%"}):null,this.$slots.default,this.infiniteLeft?t("div",{staticClass:"q-carousel-slide",style:"flex: 0 0 100%"}):null])]),this.arrows?t(Yt,{staticClass:"q-carousel-left-arrow absolute",props:{color:this.color,icon:this.arrowIcon[0],fabMini:!0,flat:!0},directives:[{name:"show",value:this.canGoToPrevious}],on:{click:this.previous}}):null,this.arrows?t(Yt,{staticClass:"q-carousel-right-arrow absolute",props:{color:this.color,icon:this.arrowIcon[1],fabMini:!0,flat:!0},directives:[{name:"show",value:this.canGoToNext}],on:{click:this.next}}):null,this.__getQuickNav(t),this.__getScopedSlots(t),this.thumbnails.length?this.__getThumbnails(t):null,this.$slots.control])},mounted:function(){var t=this;this.__planAutoPlay(),this.handleArrowKeys&&this.__setArrowKeys(!0),this.__stopSlideNumberNotifier=this.$watch("slidesNumber",function(e){t.value>=e&&t.$emit("input",e-1)},{immediate:!0})},beforeDestroy:function(){this.__cleanup(),this.__stopSlideNumberNotifier(),this.handleArrowKeys&&this.__setArrowKeys(!1)}},Re={name:"QCarouselSlide",inject:{carousel:{default:function(){console.error("QCarouselSlide needs to be child of QCarousel")}}},props:{imgSrc:String},computed:{computedStyle:function(){var t={};return this.imgSrc&&(t.backgroundImage="url("+this.imgSrc+")",t.backgroundSize="cover",t.backgroundPosition="50%"),!this.carousel.inFullscreen&&this.carousel.height&&(t.maxHeight=this.carousel.height),t}},render:function(t){return t("div",{staticClass:"q-carousel-slide relative-position scroll",style:this.computedStyle},this.$slots.default)},created:function(){this.carousel.__registerSlide()},beforeDestroy:function(){this.carousel.__unregisterSlide()}},Ie={name:"QCarouselControl",props:{position:{type:String,default:"bottom-right"},offset:{type:Array,default:function(){return[18,18]}}},computed:{computedClass:function(){return"absolute-"+this.position},computedStyle:function(){return{margin:this.offset[1]+"px "+this.offset[0]+"px"}}},render:function(t){return t("div",{staticClass:"q-carousel-control absolute",style:this.computedStyle,class:this.computedClass},this.$slots.default)}},He={name:"QChatMessage",props:{sent:Boolean,label:String,bgColor:String,textColor:String,name:String,avatar:String,text:Array,stamp:String,size:String},computed:{textClass:function(){if(this.textColor)return"text-"+this.textColor},messageClass:function(){if(this.bgColor)return"text-"+this.bgColor},sizeClass:function(){if(this.size)return"col-"+this.size},classes:function(){return{"q-message-sent":this.sent,"q-message-received":!this.sent}}},methods:{__getText:function(t){var e=this;return this.text.map(function(i,s){return t("div",{staticClass:"q-message-text",class:e.messageClass},[t("span",{staticClass:"q-message-text-content",class:e.textClass},[t("div",{domProps:{innerHTML:i}}),e.stamp?t("div",{staticClass:"q-message-stamp",domProps:{innerHTML:e.stamp}}):null])])})},__getMessage:function(t){return t("div",{staticClass:"q-message-text",class:this.messageClass},[t("span",{staticClass:"q-message-text-content",class:this.textClass},[this.$slots.default,this.stamp?t("div",{staticClass:"q-message-stamp",domProps:{innerHTML:this.stamp}}):null])])}},render:function(t){return t("div",{staticClass:"q-message",class:this.classes},[this.label?t("div",{staticClass:"q-message-label text-center",domProps:{innerHTML:this.label}}):null,t("div",{staticClass:"q-message-container row items-end no-wrap"},[this.$slots.avatar||(this.avatar?t("img",{staticClass:"q-message-avatar col-auto",attrs:{src:this.avatar}}):null),t("div",{class:this.sizeClass},[this.name?t("div",{staticClass:"q-message-name",domProps:{innerHTML:this.name}}):null,this.text?this.__getText(t):null,this.$slots.default?this.__getMessage(t):null])])])}};var Ae={name:"touch-swipe",bind:function(t,e){var i,s,n=!e.modifiers.noMouse,o={handler:e.value,threshold:parseInt(e.arg,10)||300,direction:(i=e.modifiers,s={},["left","right","up","down","horizontal","vertical"].forEach(function(t){i[t]&&(s[t]=!0)}),0===Object.keys(s).length?{left:!0,right:!0,up:!0,down:!0,horizontal:!0,vertical:!0}:(s.horizontal&&(s.left=s.right=!0),s.vertical&&(s.up=s.down=!0),s.left&&s.right&&(s.horizontal=!0),s.up&&s.down&&(s.vertical=!0),s)),mouseStart:function(t){B(t)&&(document.addEventListener("mousemove",o.move),document.addEventListener("mouseup",o.mouseEnd),o.start(t))},mouseEnd:function(t){document.removeEventListener("mousemove",o.move),document.removeEventListener("mouseup",o.mouseEnd),o.end(t)},start:function(e){var i=O(e);o.event={x:i.left,y:i.top,time:(new Date).getTime(),detected:!1,abort:!1},t.classList.add("q-touch")},move:function(t){if(!o.event.abort)if((new Date).getTime()-o.event.time>o.threshold)o.event.abort=!0;else{if(o.event.detected)return t.stopPropagation(),void t.preventDefault();var e=O(t),i=e.left-o.event.x,s=Math.abs(i),n=e.top-o.event.y,r=Math.abs(n);s!==r&&(o.event.detected=!0,o.event.abort=!(o.direction.vertical&&s<r||o.direction.horizontal&&s>r||o.direction.up&&s<r&&n<0||o.direction.down&&s<r&&n>0||o.direction.left&&s>r&&i<0||o.direction.right&&s>r&&i>0),o.move(t))}},end:function(e){if(t.classList.remove("q-touch"),!o.event.abort&&o.event.detected){var i=(new Date).getTime()-o.event.time;if(!(i>o.threshold)){e.stopPropagation(),e.preventDefault();var s,n=O(e),r=n.left-o.event.x,a=Math.abs(r),l=n.top-o.event.y,c=Math.abs(l);if(a>=c){if(a<50)return;s=r<0?"left":"right"}else{if(c<50)return;s=l<0?"up":"down"}o.direction[s]&&o.handler({evt:e,direction:s,duration:i,distance:{x:a,y:c}})}}}};t.__qtouchswipe=o,n&&t.addEventListener("mousedown",o.mouseStart),t.addEventListener("touchstart",o.start),t.addEventListener("touchmove",o.move),t.addEventListener("touchend",o.end)},update:function(t,e){e.oldValue!==e.value&&(t.__qtouchswipe.handler=e.value)},unbind:function(t,e){var i=t.__qtouchswipe;i&&(t.removeEventListener("mousedown",i.mouseStart),t.removeEventListener("touchstart",i.start),t.removeEventListener("touchmove",i.move),t.removeEventListener("touchend",i.end),delete t.__qtouchswipe)}},Fe={directives:{TouchSwipe:Ae},props:{val:{},trueValue:{default:!0},falseValue:{default:!1}},computed:{isTrue:function(){return this.modelIsArray?this.index>-1:this.value===this.trueValue},isFalse:function(){return this.modelIsArray?-1===this.index:this.value===this.falseValue},index:function(){if(this.modelIsArray)return this.value.indexOf(this.val)},modelIsArray:function(){return Array.isArray(this.value)}},methods:{toggle:function(t,e){var i;(void 0===e&&(e=!0),this.disable||this.readonly)||(t&&H(t),e&&this.$el.blur(),this.modelIsArray?this.isTrue?(i=this.value.slice()).splice(this.index,1):i=this.value.concat(this.val):i=this.isTrue?this.toggleIndeterminate?this.indeterminateValue:this.falseValue:this.isFalse?this.trueValue:this.falseValue,this.__update(i))}}},Qe={props:{value:{required:!0},label:String,leftLabel:Boolean,color:{type:String,default:"primary"},keepColor:Boolean,dark:Boolean,disable:Boolean,readonly:Boolean,noFocus:Boolean,checkedIcon:String,uncheckedIcon:String},computed:{classes:function(){return[this.__kebabTag,{disabled:this.disable,reverse:this.leftLabel,"q-focusable":this.focusable}]},innerClasses:function(){return this.isTrue||this.isIndeterminate?["active","text-"+this.color]:"text-"+(this.keepColor?this.color:this.dark?"light":"faded")},focusable:function(){return!this.noFocus&&!this.disable&&!this.readonly},tabindex:function(){return this.focusable?0:-1}},methods:{__update:function(t){var e=this,i=this.$refs.ripple;i&&(i.classList.add("active"),setTimeout(function(){i.classList.remove("active")},10)),this.$emit("input",t),this.$nextTick(function(){JSON.stringify(t)!==JSON.stringify(e.value)&&e.$emit("change",t)})},__handleKeyDown:function(t){[13,32].includes(E(t))&&this.toggle(t,!1)}},render:function(t){var e=this;return t("div",{staticClass:"q-option cursor-pointer no-outline row inline no-wrap items-center",class:this.classes,attrs:{tabindex:this.tabindex},on:{click:this.toggle,focus:function(){e.$emit("focus")},blur:function(){e.$emit("blur")},keydown:this.__handleKeyDown},directives:"q-toggle"!==this.__kebabTag||this.disable||this.readonly?null:[{name:"touch-swipe",modifiers:{horizontal:!0},value:this.__swipe}]},[t("div",{staticClass:"q-option-inner relative-position",class:this.innerClasses},[t("input",{attrs:{type:"checkbox"},on:{change:this.toggle}}),this.$q.platform.is.desktop?t("div",{staticClass:"q-focus-helper",class:"q-radio"===this.__kebabTag?"q-focus-helper-round":"q-focus-helper-rounded"}):null,this.__getContent(t)]),this.label?t("span",{staticClass:"q-option-label",domProps:{innerHTML:this.label}}):null,this.$slots.default])}},je={name:"QCheckbox",mixins:[Fe,Qe],props:{toggleIndeterminate:Boolean,indeterminateValue:{default:null},indeterminateIcon:String},computed:{isIndeterminate:function(){return void 0===this.value||this.value===this.indeterminateValue},checkedStyle:function(){return this.isTrue?{transition:"opacity 0ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, transform 800ms cubic-bezier(0.23, 1, 0.32, 1) 0ms",opacity:1,transform:"scale(1)"}:{transition:"opacity 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, transform 0ms cubic-bezier(0.23, 1, 0.32, 1) 450ms",opacity:0,transform:"scale(0)"}},indeterminateStyle:function(){return this.isIndeterminate?{transition:"opacity 0ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, transform 800ms cubic-bezier(0.23, 1, 0.32, 1) 0ms",opacity:1,transform:"scale(1)"}:{transition:"opacity 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms, transform 0ms cubic-bezier(0.23, 1, 0.32, 1) 450ms",opacity:0,transform:"scale(0)"}},uncheckedStyle:function(){return this.isFalse?{opacity:1}:{transition:"opacity 650ms cubic-bezier(0.23, 1, 0.32, 1) 150ms",opacity:0}}},methods:{__getContent:function(t){return[t(dt,{staticClass:"q-checkbox-icon cursor-pointer",props:{name:this.uncheckedIcon||this.$q.icon.checkbox.unchecked.ios},style:this.uncheckedStyle}),t(dt,{staticClass:"q-checkbox-icon cursor-pointer absolute-full",props:{name:this.indeterminateIcon||this.$q.icon.checkbox.indeterminate.ios},style:this.indeterminateStyle}),t(dt,{staticClass:"q-checkbox-icon cursor-pointer absolute-full",props:{name:this.checkedIcon||this.$q.icon.checkbox.checked.ios},style:this.checkedStyle}),null]}},beforeCreate:function(){this.__kebabTag="q-checkbox"}},Ve={name:"QChip",props:{small:Boolean,dense:Boolean,tag:Boolean,square:Boolean,floating:Boolean,pointing:{type:String,validator:function(t){return["up","right","down","left"].includes(t)}},color:String,textColor:String,icon:String,iconRight:String,avatar:String,closable:Boolean,detail:Boolean},computed:{classes:function(){var t=this,e=[];return this.pointing&&e.push("q-chip-pointing-"+this.pointing),["tag","square","floating","pointing","small","dense"].forEach(function(i){t[i]&&e.push("q-chip-"+i)}),this.floating&&(!this.dense&&e.push("q-chip-dense"),!this.square&&e.push("q-chip-square")),this.color&&(e.push("bg-"+this.color),!this.textColor&&e.push("text-white")),this.textColor&&e.push("text-"+this.textColor),e}},methods:{__onClick:function(t){this.$emit("click",t)},__onMouseDown:function(t){this.$emit("focus",t)},__handleKeyDown:function(t){this.closable&&[8,13,32].includes(E(t))&&(H(t),this.$emit("hide"))}},render:function(t){var e=this;return t("div",{staticClass:"q-chip row no-wrap inline items-center",class:this.classes,on:{mousedown:this.__onMouseDown,touchstart:this.__onMouseDown,click:this.__onClick,keydown:this.__handleKeyDown}},[this.icon||this.avatar?t("div",{staticClass:"q-chip-side q-chip-left row flex-center",class:{"q-chip-detail":this.detail}},[this.icon?t(dt,{staticClass:"q-chip-icon",props:{name:this.icon}}):this.avatar?t("img",{attrs:{src:this.avatar}}):null]):null,t("div",{staticClass:"q-chip-main ellipsis"},this.$slots.default),this.iconRight?t(dt,{props:{name:this.iconRight},class:this.closable?"on-right q-chip-icon":"q-chip-side q-chip-right"}):null,this.closable?t("div",{staticClass:"q-chip-side q-chip-close q-chip-right row flex-center"},[t(dt,{props:{name:this.$q.icon.chip.close},staticClass:"cursor-pointer",nativeOn:{click:function(t){t&&t.stopPropagation(),e.$emit("hide")}}})]):null])}},We={type:Array,validator:function(t){return t.every(function(t){return"icon"in t})}},Ke={mixins:[Qt],props:{prefix:String,suffix:String,stackLabel:String,floatLabel:String,placeholder:String,error:Boolean,warning:Boolean,disable:Boolean,readonly:Boolean,clearable:Boolean,color:{type:String,default:"primary"},align:{default:"left"},dark:Boolean,before:We,after:We,inverted:Boolean,invertedLight:Boolean,hideUnderline:Boolean,clearValue:{},noParentField:Boolean},computed:{inputPlaceholder:function(){if(!this.floatLabel&&!this.stackLabel||this.labelIsAbove)return this.placeholder},isInverted:function(){return this.inverted||this.invertedLight},isInvertedLight:function(){return this.isInverted&&(this.invertedLight&&!this.hasError||this.inverted&&this.hasWarning)},isStandard:function(){return!this.isInverted},isHideUnderline:function(){return this.isStandard&&this.hideUnderline},labelIsAbove:function(){return this.focused||this.length||this.additionalLength||this.stackLabel},hasContent:function(){return this.length>0||this.additionalLength>0||this.placeholder||0===this.placeholder},editable:function(){return!this.disable&&!this.readonly},computedClearValue:function(){return void 0===this.clearValue?null:this.clearValue},isClearable:function(){return this.editable&&this.clearable&&this.computedClearValue!==this.model},hasError:function(){return!!(!this.noParentField&&this.field&&this.field.error||this.error)},hasWarning:function(){return!(this.hasError||!(!this.noParentField&&this.field&&this.field.warning||this.warning))},fakeInputValue:function(){return this.actualValue||0===this.actualValue?this.actualValue:this.placeholder||0===this.placeholder?this.placeholder:""},fakeInputClasses:function(){var t=this.actualValue||0===this.actualValue;return[this.alignClass,{invisible:(this.stackLabel||this.floatLabel)&&!this.labelIsAbove&&!t,"q-input-target-placeholder":!t&&this.inputPlaceholder}]}},methods:{clear:function(t){if(this.editable){t&&H(t);var e=this.computedClearValue;this.__setModel&&this.__setModel(e,!0),this.$emit("clear",e)}}}},Ue={props:{autofocus:[Boolean,String],maxHeight:Number,loading:Boolean},data:function(){return{focused:!1,timer:null,isNumberError:!1,isNegZero:!1}},methods:{focus:function(){this.disable||this.$refs.input.focus()},blur:function(){this.$refs.input&&this.$refs.input.blur()},select:function(){this.$refs.input.select()},__onFocus:function(t){clearTimeout(this.timer),this.focused||(this.focused=!0,this.$refs.input&&this.$refs.input.focus(),this.$emit("focus",t))},__onInputBlur:function(t){var e=this;clearTimeout(this.timer),this.timer=setTimeout(function(){e.__onBlur(t)},200)},__onBlur:function(t,e){this.focused&&(this.focused=!1,this.$emit("blur",t)),this.__emit(e)},__emit:function(t){var e=this,i=this.isNumber&&this.isNumberError,s=i?this.isNegZero?-0:null:this.model;this.isNumber&&(this.model=this.value),i&&this.$emit("input",s);var n=function(){e.isNumber?String(1/s)!==String(1/e.value)&&e.$emit("change",s):JSON.stringify(s)!==JSON.stringify(e.value)&&e.$emit("change",s)};t?n():this.$nextTick(n)},__onKeydown:function(t){13===t.keyCode&&("textarea"===this.type?t.stopPropagation():this.__emit()),this.$emit("keydown",t)},__onKeyup:function(t){this.$emit("keyup",t)},__onClick:function(t){this.focus(),this.$emit("click",t)},__onPaste:function(t){this.$emit("paste",t)}},mounted:function(){var t=this;this.$nextTick(function(){var e=t.$refs.input;t.autofocus&&e&&(e.focus(),"select"===t.autofocus&&e.select())})},beforeDestroy:function(){clearTimeout(this.timer),this.focused&&this.__onBlur(void 0,!0)}},Ye={inject:{field:{from:"__field",default:null}},props:{noParentField:Boolean},watch:{noParentField:function(t){this.field&&this.field[t?"__registerInput":"__unregisterInput"](this)}},beforeMount:function(){!this.noParentField&&this.field&&this.field.__registerInput(this)},beforeDestroy:function(){!this.noParentField&&this.field&&this.field.__unregisterInput(this)}},Je={name:"QInputFrame",mixins:[Ke,Ye],props:{focused:Boolean,length:Number,focusable:Boolean,additionalLength:Boolean},computed:{hasStackLabel:function(){return"string"==typeof this.stackLabel&&this.stackLabel.length>0},hasLabel:function(){return this.hasStackLabel||"string"==typeof this.floatLabel&&this.floatLabel.length>0},label:function(){return this.hasStackLabel?this.stackLabel:this.floatLabel},addonClass:function(){return{"q-if-addon-visible":!this.hasLabel||this.labelIsAbove}},classes:function(){var t=[{"q-if-has-label":this.label,"q-if-focused":this.focused,"q-if-error":this.hasError,"q-if-warning":this.hasWarning,"q-if-disabled":this.disable,"q-if-readonly":this.readonly,"q-if-focusable":this.focusable&&!this.disable,"q-if-inverted":this.isInverted,"q-if-inverted-light":this.isInvertedLight,"q-if-light-color":this.lightColor,"q-if-dark":this.dark,"q-if-hide-underline":this.isHideUnderline,"q-if-standard":this.isStandard,"q-if-has-content":this.hasContent}],e=this.hasError?"negative":this.hasWarning?"warning":this.color;return this.isInverted?(t.push("bg-"+e),t.push("text-"+(this.isInvertedLight?"black":"white"))):e&&t.push("text-"+e),t}},methods:{__onClick:function(t){this.$emit("click",t)},__onMouseDown:function(t){var e=this;this.$nextTick(function(){return e.$emit("focus",t)})},__additionalHidden:function(t,e,i,s){return void 0!==t.condition?!1===t.condition:void 0!==t.content&&!t.content==s>0||void 0!==t.error&&!t.error===e||void 0!==t.warning&&!t.warning===i},__baHandler:function(t,e){e.allowPropagation||t.stopPropagation(),e.handler&&e.handler(t)}},render:function(t){var e=this;return t("div",{staticClass:"q-if row no-wrap relative-position",class:this.classes,attrs:{tabindex:this.focusable&&!this.disable?0:-1},on:{click:this.__onClick}},[t("div",{staticClass:"q-if-baseline"},"|"),this.before&&this.before.map(function(i){return t(dt,{key:"b"+i.icon,staticClass:"q-if-control q-if-control-before",class:[i.class,{hidden:e.__additionalHidden(i,e.hasError,e.hasWarning,e.length)}],props:{name:i.icon},nativeOn:{mousedown:e.__onMouseDown,touchstart:e.__onMouseDown,click:function(t){e.__baHandler(t,i)}}})})||void 0,t("div",{staticClass:"q-if-inner col column"},[t("div",{staticClass:"row no-wrap relative-position"},[this.prefix&&t("span",{staticClass:"q-if-addon q-if-addon-left",class:this.addonClass,domProps:{innerHTML:this.prefix}})||void 0,this.hasLabel&&t("div",{staticClass:"q-if-label",class:{"q-if-label-above":this.labelIsAbove}},[t("div",{staticClass:"q-if-label-inner ellipsis",domProps:{innerHTML:this.label}})])||void 0].concat(this.$slots.default).concat([this.suffix&&t("span",{staticClass:"q-if-addon q-if-addon-right",class:this.addonClass,domProps:{innerHTML:this.suffix}})||void 0])),this.hasLabel&&t("div",{staticClass:"q-if-label-spacer",domProps:{innerHTML:this.label}})||void 0]),this.after&&this.after.map(function(i){return t(dt,{key:"a"+i.icon,staticClass:"q-if-control",class:[i.class,{hidden:e.__additionalHidden(i,e.hasError,e.hasWarning,e.length)}],props:{name:i.icon},nativeOn:{mousedown:e.__onMouseDown,touchstart:e.__onMouseDown,click:function(t){e.__baHandler(t,i)}}})})||void 0].concat(this.$slots.after))}},Xe={name:"QChipsInput",mixins:[Ke,Ue],props:{value:{type:Array,required:!0},chipsColor:String,chipsBgColor:String,readonly:Boolean,addIcon:String,upperCase:Boolean,lowerCase:Boolean},data:function(){var t=this;return{input:"",model:this.value.slice(),watcher:null,shadow:{val:this.input,set:this.add,setNav:function(e){t.input=e},loading:!1,selectionOpen:!1,watched:0,isEditable:function(){return t.editable},isDark:function(){return t.dark},hasFocus:function(){return document.activeElement===t.$refs.input},register:function(){t.shadow.watched+=1,t.__watcherRegister()},unregister:function(){t.shadow.watched=Math.max(0,t.shadow.watched-1),t.__watcherUnregister()},getEl:function(){return t.$refs.input}}}},watch:{value:function(t){this.model=t.slice()}},provide:function(){return{__input:this.shadow}},computed:{length:function(){return this.model?this.model.length:0},isLoading:function(){return this.loading||this.shadow.watched&&this.shadow.loading},computedAddIcon:function(){return this.addIcon||this.$q.icon.chipsInput.add},computedChipTextColor:function(){return this.chipsColor?this.chipsColor:this.isInvertedLight?this.invertedLight?this.color:"white":this.isInverted?this.invertedLight?"grey-10":this.color:this.dark?this.color:"white"},computedChipBgColor:function(){return this.chipsBgColor?this.chipsBgColor:this.isInvertedLight?this.invertedLight?"grey-10":this.color:this.isInverted?this.invertedLight?this.color:"white":this.dark?"white":this.color},inputClasses:function(){var t=[this.alignClass];return this.upperCase&&t.push("uppercase"),this.lowerCase&&t.push("lowercase"),t},isClearable:function(){return this.editable&&this.clearable&&0!==this.model.length}},methods:{add:function(t){if(void 0===t&&(t=this.input),clearTimeout(this.timer),this.focus(),!this.isLoading&&this.editable&&t){var e=this.lowerCase?t.toLowerCase():this.upperCase?t.toUpperCase():t;this.model.includes(e)?this.$emit("duplicate",e):(this.$emit("add",{index:this.model.length,val:e}),this.model.push(e),this.$emit("input",this.model),this.input="")}},remove:function(t){clearTimeout(this.timer),this.focus(),this.editable&&t>=0&&t<this.length&&(this.$emit("remove",{index:t,value:this.model.splice(t,1)}),this.$emit("input",this.model))},clear:function(t){clearTimeout(this.timer),t&&H(t),this.editable&&(this.$emit("input",[]),this.$emit("clear"))},__clearTimer:function(){var t=this;this.$nextTick(function(){return clearTimeout(t.timer)})},__handleKeyDown:function(t){switch(E(t)){case 13:if(this.shadow.selectionOpen)return;return H(t),this.add();case 8:return void(!this.input.length&&this.length&&this.remove(this.length-1));default:return this.__onKeydown(t)}},__onClick:function(){this.focus()},__watcher:function(t){this.shadow.watched&&(this.shadow.val=t)},__watcherRegister:function(){this.watcher||(this.watcher=this.$watch("input",this.__watcher))},__watcherUnregister:function(t){!this.watcher||!t&&this.shadow.watched||(this.watcher(),this.watcher=null,this.shadow.selectionOpen=!1)}},beforeDestroy:function(){this.__watcherUnregister(!0)},render:function(t){var e=this;return t(Je,{staticClass:"q-chips-input",props:{prefix:this.prefix,suffix:this.suffix,stackLabel:this.stackLabel,floatLabel:this.floatLabel,error:this.error,warning:this.warning,disable:this.disable,readonly:this.readonly,inverted:this.inverted,invertedLight:this.invertedLight,dark:this.dark,hideUnderline:this.hideUnderline,before:this.before,after:this.after,color:this.color,noParentField:this.noParentField,focused:this.focused,length:this.length,additionalLength:this.input.length>0},on:{click:this.__onClick}},[t("div",{staticClass:"col row items-center q-input-chips"},this.model.map(function(i,s){return t(Ve,{key:i+"#"+s,props:{small:!0,closable:e.editable,color:e.computedChipBgColor,textColor:e.computedChipTextColor},attrs:{tabindex:e.editable&&e.focused?0:-1},on:{blur:e.__onInputBlur,focus:e.__clearTimer,hide:function(){e.remove(s)}},nativeOn:{blur:e.__onInputBlur,focus:e.__clearTimer}},i)}).concat([t("input",{ref:"input",staticClass:"col q-input-target",class:this.inputClasses,domProps:{value:this.input},attrs:Object.assign({},this.$attrs,{placeholder:this.inputPlaceholder,disabled:this.disable,readonly:this.readonly}),on:{input:function(t){e.input=t.target.value},focus:this.__onFocus,blur:this.__onInputBlur,keydown:this.__handleKeyDown,keyup:this.__onKeyup}})])),this.isLoading?t(Ut,{slot:"after",staticClass:"q-if-control",props:{size:"24px"}}):this.editable&&t(dt,{slot:"after",staticClass:"q-if-control",class:{invisible:0===this.input.length},props:{name:this.computedAddIcon},nativeOn:{mousedown:this.__clearTimer,touchstart:this.__clearTimer,click:function(){e.add()}}})||void 0,this.isClearable&&t(dt,{slot:"after",staticClass:"q-if-control",props:{name:this.$q.icon.input["clear"+(this.isInverted?"Inverted":"")]},nativeOn:{mousedown:this.__clearTimer,touchstart:this.__clearTimer,click:this.clear}})||void 0].concat(this.$slots.default?t("div",{staticClass:"absolute-full no-pointer-events",slot:"after"},this.$slots.default):void 0))}},Ge={name:"QItemTile",props:{icon:String,letter:Boolean,inverted:Boolean,image:Boolean,avatar:Boolean,stamp:Boolean,label:Boolean,sublabel:Boolean,lines:[Number,String],tag:{type:String,default:"div"},color:String,textColor:String},computed:{hasLines:function(){return(this.label||this.sublabel)&&this.lines},type:function(){var t=this;return["icon","label","sublabel","image","avatar","letter","stamp"].find(function(e){return t[e]})},classes:function(){var t=[];return this.color&&(this.inverted?t.push("bg-"+this.color):this.textColor||t.push("text-"+this.color)),this.textColor&&t.push("text-"+this.textColor),this.type&&t.push("q-item-"+this.type),this.inverted&&(this.icon||this.letter)&&(t.push("q-item-inverted"),t.push("flex"),t.push("flex-center")),!this.hasLines||"1"!==this.lines&&1!==this.lines||t.push("ellipsis"),t},style:function(){if(this.hasLines)return vt(this.lines)}},render:function(t){var e={class:this.classes,style:this.style};if(this.icon){if(this.inverted)return t(this.tag,e,[t(dt,{props:{name:this.icon}},this.$slots.default)]);e.props={name:this.icon}}return t(this.icon?dt:this.tag,e,this.$slots.default)}},Ze={name:"QSlideTransition",props:{appear:Boolean},methods:{__begin:function(t,e){t.style.overflowY="hidden",void 0!==e&&(t.style.height=e+"px"),t.classList.add("q-slide-transition"),this.animating=!0},__end:function(t,e){t.style.overflowY=null,t.style.height=null,t.classList.remove("q-slide-transition"),this.__cleanup(),e!==this.lastEvent&&this.$emit(e),this.animating=!1},__cleanup:function(){clearTimeout(this.timer),this.el.removeEventListener("transitionend",this.animListener)}},beforeDestroy:function(){this.animating&&this.__cleanup()},render:function(t){var e=this;return t("transition",{props:{css:!1,appear:this.appear},on:{enter:function(t,i){var s=0;e.el=t,!0===e.animating?(e.__cleanup(),s=t.offsetHeight===t.scrollHeight?0:void 0):e.lastEvent="hide",e.__begin(t,s),e.timer=setTimeout(function(){t.style.height=t.scrollHeight+"px",e.animListener=function(){e.__end(t,"show"),i()},t.addEventListener("transitionend",e.animListener)},100)},leave:function(t,i){var s;e.el=t,!0===e.animating?e.__cleanup():(e.lastEvent="show",s=t.scrollHeight),e.__begin(t,s),e.timer=setTimeout(function(){t.style.height=0,e.animListener=function(){e.__end(t,"hide"),i()},t.addEventListener("transitionend",e.animListener)},100)}}},this.$slots.default)}},ti="q:collapsible:close",ei={name:"QCollapsible",mixins:[L,_t,{props:bt}],modelToggle:{history:!1},props:{disable:Boolean,popup:Boolean,indent:Boolean,group:String,iconToggle:Boolean,collapseIcon:String,opened:Boolean,headerStyle:[Array,String,Object],headerClass:[Array,String,Object]},computed:{classes:function(){return{"q-collapsible-opened":this.showing,"q-collapsible-closed":!this.showing,"q-collapsible-popup-opened":this.popup&&this.showing,"q-collapsible-popup-closed":this.popup&&!this.showing,"q-collapsible-cursor-pointer":!this.separateToggle,"q-item-dark":this.dark,"q-item-separator":this.separator,"q-item-inset-separator":this.insetSeparator,disabled:this.disable}},separateToggle:function(){return this.iconToggle||void 0!==this.to}},watch:{showing:function(t){t&&this.group&&this.$root.$emit(ti,this)}},methods:{__toggleItem:function(){this.separateToggle||this.toggle()},__toggleIcon:function(t){this.separateToggle&&(t&&H(t),this.toggle())},__eventHandler:function(t){this.group&&this!==t&&t.group===this.group&&this.hide()},__getToggleSide:function(t,e){return[t(Ge,{slot:e?"right":void 0,staticClass:"cursor-pointer transition-generic relative-position q-collapsible-toggle-icon",class:{"rotate-180":this.showing,invisible:this.disable},nativeOn:{click:this.__toggleIcon},props:{icon:this.collapseIcon||this.$q.icon.collapsible.icon}})]},__getItemProps:function(t){return{props:{cfg:this.$props},style:this.headerStyle,class:this.headerClass,nativeOn:{click:this.__toggleItem}}}},created:function(){this.$root.$on(ti,this.__eventHandler),(this.opened||this.value)&&this.show()},beforeDestroy:function(){this.$root.$off(ti,this.__eventHandler)},render:function(t){return t(this.tag,{staticClass:"q-collapsible q-item-division relative-position",class:this.classes},[t("div",{staticClass:"q-collapsible-inner"},[this.$slots.header?t(yt,this.__getItemProps(),[this.$slots.header,t(wt,{props:{right:!0},staticClass:"relative-position"},this.__getToggleSide(t))]):t(ce,this.__getItemProps(!0),this.__getToggleSide(t,!0)),t(Ze,[t("div",{directives:[{name:"show",value:this.showing}]},[t("div",{staticClass:"q-collapsible-sub-item relative-position",class:{indent:this.indent}},this.$slots.default)])])])])}},ii={props:{popover:Boolean,modal:Boolean},computed:{isPopover:function(){return!!this.popover||!this.modal&&(this.$q.platform.is.desktop&&!this.$q.platform.within.iframe)}}};function si(t,e,i){var s=Pt((O(t).left-e.left)/e.width,0,1);return i?1-s:s}function ni(t,e){var i=e?parseFloat(t.toFixed(e)):t;return i!==parseInt(i,10)}function oi(t,e,i,s,n){var o=e+t*(i-e),r=(o-e)%s;return o+=(Math.abs(r)>=s/2?(r<0?-1:1)*s:0)-r,n&&(o=parseFloat(o.toFixed(n))),Pt(o,e,i)}var ri={directives:{TouchPan:Ce},props:{min:{type:Number,default:1},max:{type:Number,default:5},step:{type:Number,default:1},decimals:Number,snap:Boolean,markers:Boolean,label:Boolean,labelAlways:Boolean,square:Boolean,color:String,fillHandleAlways:Boolean,error:Boolean,warning:Boolean,readonly:Boolean,disable:Boolean},computed:{editable:function(){return!this.disable&&!this.readonly},classes:function(){var t={disabled:this.disable,readonly:this.readonly,"label-always":this.labelAlways,"has-error":this.error,"has-warning":this.warning};return this.error||this.warning||!this.color||(t["text-"+this.color]=!0),t},markersLen:function(){return(this.max-this.min)/this.step+1},labelColor:function(){return this.error?"negative":this.warning?"warning":this.color||"primary"},computedDecimals:function(){return void 0!==this.decimals?this.decimals||0:(String(this.step).trim("0").split(".")[1]||"").length},computedStep:function(){return void 0!==this.decimals?1/Math.pow(10,this.decimals||0):this.step}},methods:{__pan:function(t){var e=this;t.isFinal?this.dragging&&(this.dragTimer=setTimeout(function(){e.dragging=!1},100),this.__end(t.evt),this.__update(!0)):t.isFirst?(clearTimeout(this.dragTimer),this.dragging=this.__getDragging(t.evt)):this.dragging&&(this.__move(t.evt),this.__update())},__update:function(t){var e=this;JSON.stringify(this.model)!==JSON.stringify(this.value)&&(this.$emit("input",this.model),t&&this.$nextTick(function(){JSON.stringify(e.model)!==JSON.stringify(e.value)&&e.$emit("change",e.model)}))},__click:function(t){if(!this.dragging){var e=this.__getDragging(t);e&&(this.__end(t,e),this.__update(!0))}},__getMarkers:function(t){if(this.markers){for(var e=[],i=0;i<this.markersLen;i++)e.push(t("div",{staticClass:"q-slider-mark",key:"marker"+i,style:{left:100*i*this.step/(this.max-this.min)+"%"}}));return e}}},created:function(){this.__validateProps()},render:function(t){return t("div",{staticClass:"q-slider non-selectable",class:this.classes,on:this.editable?{click:this.__click}:null,directives:this.editable?[{name:"touch-pan",modifiers:{horizontal:!0,prevent:!0,stop:!0},value:this.__pan}]:null},[t("div",{ref:"handle",staticClass:"q-slider-handle-container"},[t("div",{staticClass:"q-slider-track"}),this.__getMarkers(t)].concat(this.__getContent(t)))])}},ai={name:"QSlider",mixins:[ri],props:{value:Number,labelValue:String},data:function(){return{model:this.value,dragging:!1,currentPercentage:(this.value-this.min)/(this.max-this.min)}},computed:{percentage:function(){return this.snap?(this.model-this.min)/(this.max-this.min)*100+"%":100*this.currentPercentage+"%"},displayValue:function(){return void 0!==this.labelValue?this.labelValue:this.model}},watch:{value:function(t){this.dragging||(t<this.min?this.model=this.min:t>this.max?this.model=this.max:this.model=t,this.currentPercentage=(this.model-this.min)/(this.max-this.min))},min:function(t){this.model<t?this.model=t:this.$nextTick(this.__validateProps)},max:function(t){this.model>t?this.model=t:this.$nextTick(this.__validateProps)},step:function(){this.$nextTick(this.__validateProps)}},methods:{__getDragging:function(t){var e=this.$refs.handle;return{left:e.getBoundingClientRect().left,width:e.offsetWidth}},__move:function(t){var e=si(t,this.dragging,this.$q.i18n.rtl);this.currentPercentage=e,this.model=oi(e,this.min,this.max,this.step,this.computedDecimals)},__end:function(t,e){void 0===e&&(e=this.dragging);var i=si(t,e,this.$q.i18n.rtl);this.model=oi(i,this.min,this.max,this.step,this.computedDecimals),this.currentPercentage=(this.model-this.min)/(this.max-this.min)},__onKeyDown:function(t){var e=t.keyCode;if(this.editable&&[37,40,39,38].includes(e)){H(t);var i=this.computedDecimals,s=t.ctrlKey?10*this.computedStep:this.computedStep,n=[37,40].includes(e)?-s:s,o=i?parseFloat((this.model+n).toFixed(i)):this.model+n;this.model=Pt(o,this.min,this.max),this.currentPercentage=(this.model-this.min)/(this.max-this.min),this.__update()}},__onKeyUp:function(t){var e=t.keyCode;this.editable&&[37,40,39,38].includes(e)&&this.__update(!0)},__validateProps:function(){this.min>=this.max?console.error("Range error: min >= max",this.$el,this.min,this.max):ni((this.max-this.min)/this.step,this.computedDecimals)&&console.error("Range error: step must be a divisor of max - min",this.min,this.max,this.step,this.computedDecimals)},__getContent:function(t){var e;return[t("div",{staticClass:"q-slider-track active-track",style:{width:this.percentage},class:{"no-transition":this.dragging,"handle-at-minimum":this.model===this.min}}),t("div",{staticClass:"q-slider-handle",style:(e={},e[this.$q.i18n.rtl?"right":"left"]=this.percentage,e.borderRadius=this.square?"0":"50%",e),class:{dragging:this.dragging,"handle-at-minimum":!this.fillHandleAlways&&this.model===this.min},attrs:{tabindex:this.editable?0:-1},on:{keydown:this.__onKeyDown,keyup:this.__onKeyUp}},[this.label||this.labelAlways?t(Ve,{staticClass:"q-slider-label no-pointer-events",class:{"label-always":this.labelAlways},props:{pointing:"down",square:!0,dense:!0,color:this.labelColor}},[this.displayValue]):null,null])]}}};function li(t,e){void 0===e&&(e=250);var i,s=!1;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return s?i:(s=!0,i=t.apply(this,n),setTimeout(function(){s=!1},e),i)}}function ci(t){var e=JSON.stringify(t);if(e)return JSON.parse(e)}var hi={name:"QColorPicker",mixins:[Ye],directives:{TouchPan:Ce},props:{value:[String,Object],defaultValue:{type:[String,Object],default:null},formatModel:{type:String,default:"auto",validator:function(t){return["auto","hex","rgb","hexa","rgba"].includes(t)}},disable:Boolean,readonly:Boolean,dark:Boolean},data:function(){return{view:this.value&&"string"!=typeof this.value?"rgb":"hex",model:this.__parseModel(this.value||this.defaultValue)}},watch:{value:{handler:function(t){var e=this.__parseModel(t||this.defaultValue);e.hex!==this.model.hex&&(this.model=e)},deep:!0}},computed:{forceHex:function(){return"auto"===this.formatModel?null:this.formatModel.indexOf("hex")>-1},forceAlpha:function(){return"auto"===this.formatModel?null:this.formatModel.indexOf("a")>-1},isHex:function(){return"string"==typeof this.value},isOutputHex:function(){return null!==this.forceHex?this.forceHex:this.isHex},editable:function(){return!this.disable&&!this.readonly},hasAlpha:function(){return null!==this.forceAlpha?this.forceAlpha:this.isHex?this.value.trim().length>7:this.value&&void 0!==this.value.a},swatchColor:function(){return{backgroundColor:"rgba("+this.model.r+","+this.model.g+","+this.model.b+","+(void 0===this.model.a?100:this.model.a)/100+")"}},saturationStyle:function(){return{background:"hsl("+this.model.h+",100%,50%)"}},saturationPointerStyle:function(){var t;return(t={top:101-this.model.v+"%"})[this.$q.i18n.rtl?"right":"left"]=this.model.s+"%",t},inputsArray:function(){var t=["r","g","b"];return this.hasAlpha&&t.push("a"),t},__needsBorder:function(){return!0}},created:function(){this.__saturationChange=li(this.__saturationChange,20)},render:function(t){return t("div",{staticClass:"q-color",class:{disabled:this.disable,"q-color-dark":this.dark}},[this.__getSaturation(t),this.__getSliders(t),this.__getInputs(t)])},methods:{__getSaturation:function(t){return t("div",{ref:"saturation",staticClass:"q-color-saturation non-selectable relative-position overflow-hidden cursor-pointer",style:this.saturationStyle,class:{readonly:!this.editable},on:this.editable?{click:this.__saturationClick}:null,directives:this.editable?[{name:"touch-pan",modifiers:{mightPrevent:!0},value:this.__saturationPan}]:null},[t("div",{staticClass:"q-color-saturation-white absolute-full"}),t("div",{staticClass:"q-color-saturation-black absolute-full"}),t("div",{staticClass:"absolute",style:this.saturationPointerStyle},[void 0!==this.model.hex?t("div",{staticClass:"q-color-saturation-circle"}):null])])},__getSliders:function(t){var e=this;return t("div",{staticClass:"q-color-sliders row items-center"},[t("div",{staticClass:"q-color-swatch q-mt-sm q-ml-md q-mb-sm non-selectable overflow-hidden"},[t("div",{style:this.swatchColor,staticClass:"fit"})]),t("div",{staticClass:"col q-pa-sm"},[t("div",{staticClass:"q-color-hue non-selectable"},[t(ai,{props:{value:this.model.h,color:"white",min:0,max:360,fillHandleAlways:!0,readonly:!this.editable},on:{input:this.__onHueChange,dragend:function(t){return e.__onHueChange(t,!0)}}})]),this.hasAlpha?t("div",{staticClass:"q-color-alpha non-selectable"},[t(ai,{props:{value:this.model.a,color:"white",min:0,max:100,fillHandleAlways:!0,readonly:!this.editable},on:{input:function(t){return e.__onNumericChange({target:{value:t}},"a",100)},dragend:function(t){return e.__onNumericChange({target:{value:t}},"a",100,!0)}}})]):null])])},__getNumericInputs:function(t){var e=this;return this.inputsArray.map(function(i){var s="a"===i?100:255;return t("div",{staticClass:"col q-color-padding"},[t("input",{attrs:{type:"number",min:0,max:s,readonly:!e.editable,tabindex:e.editable?0:-1},staticClass:"full-width text-center q-no-input-spinner",domProps:{value:void 0===e.model.hex?"":Math.round(e.model[i])},on:{input:function(t){return e.__onNumericChange(t,i,s)},blur:function(t){return e.editable&&e.__onNumericChange(t,i,s,!0)}}}),t("div",{staticClass:"q-color-label text-center uppercase"},[i])])})},__getInputs:function(t){var e=this;return t("div",{staticClass:"q-color-inputs row items-center q-px-sm q-pb-sm"},[t("div",{staticClass:"col q-mr-sm row no-wrap"},"hex"===this.view?[t("div",{staticClass:"col"},[t("input",{domProps:{value:this.model.hex},attrs:{readonly:!this.editable,tabindex:this.editable?0:-1},on:{change:this.__onHexChange,blur:function(t){return e.editable&&e.__onHexChange(t,!0)}},staticClass:"full-width text-center uppercase"}),t("div",{staticClass:"q-color-label text-center"},["HEX"+(this.hasAlpha?" / A":"")])])]:this.__getNumericInputs(t)),t("div",[t(Yt,{props:{flat:!0,disable:this.disable},on:{click:this.__nextInputView},staticClass:"q-pa-none"},[t("svg",{attrs:{viewBox:"0 0 24 24"},style:{width:"24px",height:"24px"}},[t("path",{attrs:{fill:"currentColor",d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}})])])])])},__onSaturationChange:function(t,e,i){var s=this.$refs.saturation;if(s){var n=s.clientWidth,o=s.clientHeight,r=s.getBoundingClientRect(),a=Math.min(n,Math.max(0,t-r.left));this.$q.i18n.rtl&&(a=n-a);var l=Math.min(o,Math.max(0,e-r.top)),c=Math.round(100*a/n),h=Math.round(100*Math.max(0,Math.min(1,-l/o+1))),u=f({h:this.model.h,s:c,v:h,a:this.hasAlpha?this.model.a:void 0});this.model.s=c,this.model.v=h,this.__update(u,d(u),i)}},__onHueChange:function(t,e){var i=f({h:t=Math.round(t),s:this.model.s,v:this.model.v,a:this.hasAlpha?this.model.a:void 0});this.model.h=t,this.__update(i,d(i),e)},__onNumericChange:function(t,e,i,s){var n=Number(t.target.value);if(!isNaN(n))if((n=Math.floor(n))<0||n>i)s&&this.$forceUpdate();else{var o={r:"r"===e?n:this.model.r,g:"g"===e?n:this.model.g,b:"b"===e?n:this.model.b,a:this.hasAlpha?"a"===e?n:this.model.a:void 0};if("a"!==e){var r=m(o);this.model.h=r.h,this.model.s=r.s,this.model.v=r.v}this.__update(o,d(o),s)}},__onHexChange:function(t,e){var i=t.target.value,s=i.length,n=this.hasAlpha?[5,9]:[4,7];if(s===n[0]||s===n[1]){var o=p(i),r=m(o);this.model.h=r.h,this.model.s=r.s,this.model.v=r.v,this.__update(o,i,e)}else e&&this.$forceUpdate()},__update:function(t,e,i){var s=this,n=this.isOutputHex?e:t;this.model.hex=e,this.model.r=t.r,this.model.g=t.g,this.model.b=t.b,this.model.a=this.hasAlpha?t.a:void 0,this.$emit("input",n),this.$nextTick(function(){i&&JSON.stringify(n)!==JSON.stringify(s.value)&&s.$emit("change",n)})},__nextInputView:function(){this.view="hex"===this.view?"rgba":"hex"},__parseModel:function(t){if(null===t||void 0===t)return{h:0,s:0,v:0,r:0,g:0,b:0,hex:void 0,a:100};var e="string"==typeof t?p(t.trim()):ci(t);return this.forceAlpha===(void 0===e.a)&&(e.a=this.forceAlpha?100:void 0),e.hex=d(e),Object.assign({a:100},e,m(e))},__saturationPan:function(t){t.isFinal?this.__dragStop(t):t.isFirst?this.__dragStart(t):this.__dragMove(t)},__dragStart:function(t){H(t.evt),this.saturationDragging=!0,this.__saturationChange(t)},__dragMove:function(t){this.saturationDragging&&(H(t.evt),this.__saturationChange(t))},__dragStop:function(t){var e=this;H(t.evt),setTimeout(function(){e.saturationDragging=!1},100),this.__onSaturationChange(t.position.left,t.position.top,!0)},__saturationChange:function(t){this.__onSaturationChange(t.position.left,t.position.top)},__saturationClick:function(t){this.saturationDragging||this.__onSaturationChange(t.pageX-window.pageXOffset,t.pageY-window.pageYOffset,!0)}}},ui={maxHeight:"80vh",height:"auto",boxShadow:"none",backgroundColor:"#e4e4e4"},di={name:"QColor",mixins:[Ke,ii],props:{value:{required:!0},color:{type:String,default:"primary"},defaultValue:{type:[String,Object],default:null},formatModel:{type:String,default:"auto",validator:function(t){return["auto","hex","rgb","hexa","rgba"].includes(t)}},displayValue:String,okLabel:String,cancelLabel:String},watch:{value:function(t){!this.disable&&this.isPopover&&(this.model=ci(t))}},data:function(){var t=this.isPopover?{}:{transition:"q-modal-bottom"};return t.focused=!1,t.model=ci(this.value||this.defaultValue),t},computed:{actualValue:function(){return this.displayValue?this.displayValue:this.value?"string"==typeof this.value?this.value:"rgb"+(void 0!==this.value.a?"a":"")+"("+this.value.r+","+this.value.g+","+this.value.b+(void 0!==this.value.a?","+this.value.a/100:"")+")":""},computedClearValue:function(){return void 0===this.clearValue?this.defaultValue:this.clearValue},isClearable:function(){return this.editable&&this.clearable&&JSON.stringify(this.computedClearValue)!==JSON.stringify(this.value)},modalBtnColor:function(){return this.dark?"light":"dark"}},methods:{toggle:function(){this.$refs.popup&&this[this.$refs.popup.showing?"hide":"show"]()},show:function(){if(!this.disable)return this.__setModel(this.value||this.defaultValue),this.$refs.popup.show()},hide:function(){return this.$refs.popup?this.$refs.popup.hide():Promise.resolve()},__handleKeyDown:function(t){switch(E(t)){case 13:case 32:return H(t),this.show();case 8:this.isClearable&&this.clear()}},__onFocus:function(){this.disable||this.focused||(this.model=ci(this.value||this.defaultValue),this.focused=!0,this.$emit("focus"))},__onBlur:function(t){var e=this;this.focused&&setTimeout(function(){var t=document.activeElement;e.$refs.popup&&e.$refs.popup.showing&&(t===document.body||e.$refs.popup.$el.contains(t))||(e.__onHide(),e.hide())},1)},__onHide:function(t,e){(t||this.isPopover)&&this.__update(t),this.focused&&(e?this.$el.focus():(this.$emit("blur"),this.focused=!1))},__setModel:function(t,e){this.model=ci(t),(e||this.isPopover)&&this.__update(e)},__hasModelChanged:function(){return JSON.stringify(this.model)!==JSON.stringify(this.value)},__update:function(t){var e=this;this.$nextTick(function(){e.__hasModelChanged()&&(e.$emit("input",e.model),t&&e.$emit("change",e.model))})},__getPicker:function(t,e){var i=this,s=[t(hi,{staticClass:"no-border"+(e?" full-width":""),props:Object.assign({value:this.model,disable:this.disable,readonly:this.readonly,formatModel:this.formatModel,dark:this.dark,noParentField:!0},this.$attrs),on:{input:function(t){return i.$nextTick(function(){return i.__setModel(t)})}}})];return e&&s.unshift(t("div",{staticClass:"modal-buttons modal-buttons-top row full-width",class:this.dark?"bg-black":null},[t("div",{staticClass:"col"}),t(Yt,{props:{color:this.modalBtnColor,flat:!0,label:this.cancelLabel||this.$q.i18n.label.cancel,noRipple:!0},on:{click:function(){i.__onHide(!1,!0),i.hide()}}}),this.editable?t(Yt,{props:{color:this.modalBtnColor,flat:!0,label:this.okLabel||this.$q.i18n.label.set,noRipple:!0,disable:!this.model},on:{click:function(){i.__onHide(!0,!0),i.hide()}}}):null])),s}},render:function(t){var e=this;return t(Je,{staticClass:"q-color-input",props:{prefix:this.prefix,suffix:this.suffix,stackLabel:this.stackLabel,floatLabel:this.floatLabel,error:this.error,warning:this.warning,disable:this.disable,readonly:this.readonly,inverted:this.inverted,invertedLight:this.invertedLight,dark:this.dark,hideUnderline:this.hideUnderline,before:this.before,after:this.after,color:this.color,noParentField:this.noParentField,focused:this.focused||this.$refs.popup&&this.$refs.popup.showing,focusable:!0,length:this.actualValue.length},nativeOn:{click:this.toggle,focus:this.__onFocus,blur:this.__onBlur,keydown:this.__handleKeyDown}},[t("div",{staticClass:"col q-input-target ellipsis",class:this.fakeInputClasses},[this.fakeInputValue]),this.isPopover?t(ae,{ref:"popup",props:{cover:!0,disable:this.disable,anchorClick:!1,maxHeight:"100vh"},slot:"after",on:{show:this.__onFocus,hide:function(){return e.__onHide(!0,!0)}}},this.__getPicker(t)):t(ut,{ref:"popup",staticClass:"with-backdrop",props:{contentCss:ui,minimized:!1,position:"bottom",transition:this.transition},on:{dismiss:function(){return e.__onHide(!1,!0)}}},this.__getPicker(t,!0)),this.isClearable?t(dt,{slot:"after",props:{name:this.$q.icon.input["clear"+(this.isInverted?"Inverted":"")]},nativeOn:{click:this.clear},staticClass:"q-if-control"}):null,t(dt,{slot:"after",props:{name:this.$q.icon.input.dropdown},staticClass:"q-if-control"})])}},pi={name:"QContextMenu",props:{disable:Boolean},data:function(){return{mobile:this.$q.platform.is.mobile}},methods:{hide:function(t){if(this.$refs.popup)return this.mobile&&this.target.classList.remove("non-selectable"),this.$refs.popup.hide(t)},show:function(t){var e=this;this.disable||(this.mobile?this.$refs.popup&&(this.event=t,this.$refs.popup.show(t)):t&&(H(t),setTimeout(function(){e.$refs.popup&&(e.event=t,e.$refs.popup.show(t))},100)))},__desktopBodyHide:function(t){this.$el.contains(t.target)||this.hide(t)},__desktopOnShow:function(){document.body.addEventListener("contextmenu",this.__desktopBodyHide,!0),document.body.addEventListener("click",this.__desktopBodyHide,!0),this.$emit("show",this.event)},__desktopOnHide:function(t){document.body.removeEventListener("contextmenu",this.__desktopBodyHide,!0),document.body.removeEventListener("click",this.__desktopBodyHide,!0),this.$emit("hide",this.event,t)},__mobileTouchStartHandler:function(t){var e=this;this.__mobileCleanup(),t&&t.touches&&t.touches.length>1||(this.target.classList.add("non-selectable"),this.touchTimer=setTimeout(function(){t&&H(t),e.__mobileCleanup(),setTimeout(function(){e.show(t)},10)},600))},__mobileCleanup:function(){this.target.classList.remove("non-selectable"),clearTimeout(this.touchTimer)}},render:function(t){var e=this;return this.mobile?t(ut,{ref:"popup",props:{minimized:!0},on:{show:function(){e.$emit("show",e.event)},hide:function(t){e.$emit("hide",e.event,t)}}},this.$slots.default):t(ae,{ref:"popup",props:{anchorClick:!1},on:{show:this.__desktopOnShow,hide:this.__desktopOnHide}},this.$slots.default)},mounted:function(){var t=this;this.mobile?this.$nextTick(function(){t.target=t.$el.parentNode,t.target.addEventListener("touchstart",t.__mobileTouchStartHandler),["touchcancel","touchmove","touchend"].forEach(function(e){t.target.addEventListener(e,t.__mobileCleanup)})}):(this.target=this.$el.parentNode,this.target.addEventListener("contextmenu",this.show))},beforeDestroy:function(){var t=this;this.mobile?(this.target.removeEventListener("touchstart",this.__mobileTouchStartHandler),["touchcancel","touchmove","touchend"].forEach(function(e){t.target.removeEventListener(e,t.__mobileCleanup)})):this.target.removeEventListener("contextmenu",this.show)}},fi=function(t){var e=typeof t;return null===t||void 0===t||"number"===e||"string"===e||xe(t)},mi={value:{validator:fi,required:!0},defaultValue:{type:[String,Number,Date],default:null},type:{type:String,default:"date",validator:function(t){return["date","time","datetime"].includes(t)}},color:{type:String,default:"primary"},dark:Boolean,min:{validator:fi,default:null},max:{validator:fi,default:null},headerLabel:String,firstDayOfWeek:Number,formatModel:{type:String,default:"auto",validator:function(t){return["auto","date","number","string"].includes(t)}},format24h:{type:[Boolean,Number],default:0,validator:function(t){return[!0,!1,0].includes(t)}},defaultView:{type:String,validator:function(t){return["year","month","day","hour","minute"].includes(t)}},minimal:Boolean},gi={format:String,okLabel:String,cancelLabel:String,displayValue:String},vi=864e5,bi=36e5,_i=6e4,yi=/\[((?:[^\]\\]|\\]|\\)*)\]|d{1,4}|M{1,4}|m{1,2}|w{1,2}|Qo|Do|D{1,4}|YY(?:YY)?|H{1,2}|h{1,2}|s{1,2}|S{1,3}|Z{1,2}|a{1,2}|[AQExX]/g;function wi(t,e){void 0===e&&(e="");var i=t>0?"-":"+",s=Math.abs(t),n=s%60;return i+Mt(Math.floor(s/60))+e+Mt(n)}function Ci(t,e){var i=new Date(t.getFullYear(),e,0,0,0,0,0).getDate();t.setMonth(e-1,Math.min(i,t.getDate()))}function xi(t,e,i){var s=new Date(t),n=i?1:-1;return Object.keys(e).forEach(function(t){if("month"!==t){var i="year"===t?"FullYear":Tt("days"===t?"date":t);s["set"+i](s["get"+i]()+n*e[t])}else Ci(s,s.getMonth()+1+n*e.month)}),s}function ki(t){if("number"==typeof t)return!0;var e=Date.parse(t);return!1===isNaN(e)}function Si(t){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate());e.setDate(e.getDate()-(e.getDay()+6)%7+3);var i=new Date(e.getFullYear(),0,4);i.setDate(i.getDate()-(i.getDay()+6)%7+3);var s=e.getTimezoneOffset()-i.getTimezoneOffset();e.setHours(e.getHours()-s);var n=(e-i)/(7*vi);return 1+Math.floor(n)}function qi(t,e,i){var s=new Date(t),n="set"+(i?"UTC":"");return Object.keys(e).forEach(function(t){if("month"!==t){var i="year"===t?"FullYear":t.charAt(0).toUpperCase()+t.slice(1);s[""+n+i](e[t])}else Ci(s,e.month)}),s}function $i(t,e){var i=new Date(t);switch(e){case"year":i.setMonth(0);case"month":i.setDate(1);case"day":i.setHours(0);case"hour":i.setMinutes(0);case"minute":i.setSeconds(0);case"second":i.setMilliseconds(0)}return i}function Ti(t,e,i){return(t.getTime()-t.getTimezoneOffset()*_i-(e.getTime()-e.getTimezoneOffset()*_i))/i}function Pi(t,e,i){void 0===i&&(i="days");var s=new Date(t),n=new Date(e);switch(i){case"years":return s.getFullYear()-n.getFullYear();case"months":return 12*(s.getFullYear()-n.getFullYear())+s.getMonth()-n.getMonth();case"days":return Ti($i(s,"day"),$i(n,"day"),vi);case"hours":return Ti($i(s,"hour"),$i(n,"hour"),bi);case"minutes":return Ti($i(s,"minute"),$i(n,"minute"),_i);case"seconds":return Ti($i(s,"second"),$i(n,"second"),1e3)}}function Li(t){return Pi(t,$i(t,"year"),"days")+1}function Mi(t){return xe(t)?"date":"number"==typeof t?"number":"string"}function Bi(t,e,i){if(t||0===t)switch(e){case"date":return t;case"number":return t.getTime();default:return Ri(t,i)}}function Ei(t,e,i){var s=new Date(t);if(e){var n=new Date(e);if(s<n)return n}if(i){var o=new Date(i);if(s>o)return o}return s}function Oi(t,e,i){var s=new Date(t),n=new Date(e);if(void 0===i)return s.getTime()===n.getTime();switch(i){case"second":if(s.getSeconds()!==n.getSeconds())return!1;case"minute":if(s.getMinutes()!==n.getMinutes())return!1;case"hour":if(s.getHours()!==n.getHours())return!1;case"day":if(s.getDate()!==n.getDate())return!1;case"month":if(s.getMonth()!==n.getMonth())return!1;case"year":if(s.getFullYear()!==n.getFullYear())return!1;break;default:throw new Error("date isSameDate unknown unit "+i)}return!0}function Ni(t){return new Date(t.getFullYear(),t.getMonth()+1,0).getDate()}function zi(t){if(t>=11&&t<=13)return t+"th";switch(t%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"}var Di={YY:function(t){return Mt(t.getFullYear(),4).substr(2)},YYYY:function(t){return Mt(t.getFullYear(),4)},M:function(t){return t.getMonth()+1},MM:function(t){return Mt(t.getMonth()+1)},MMM:function(t){return u.lang.date.monthsShort[t.getMonth()]},MMMM:function(t){return u.lang.date.months[t.getMonth()]},Q:function(t){return Math.ceil((t.getMonth()+1)/3)},Qo:function(t){return zi(this.Q(t))},D:function(t){return t.getDate()},Do:function(t){return zi(t.getDate())},DD:function(t){return Mt(t.getDate())},DDD:function(t){return Li(t)},DDDD:function(t){return Mt(Li(t),3)},d:function(t){return t.getDay()},dd:function(t){return this.dddd(t).slice(0,2)},ddd:function(t){return u.lang.date.daysShort[t.getDay()]},dddd:function(t){return u.lang.date.days[t.getDay()]},E:function(t){return t.getDay()||7},w:function(t){return Si(t)},ww:function(t){return Mt(Si(t))},H:function(t){return t.getHours()},HH:function(t){return Mt(t.getHours())},h:function(t){var e=t.getHours();return 0===e?12:e>12?e%12:e},hh:function(t){return Mt(this.h(t))},m:function(t){return t.getMinutes()},mm:function(t){return Mt(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return Mt(t.getSeconds())},S:function(t){return Math.floor(t.getMilliseconds()/100)},SS:function(t){return Mt(Math.floor(t.getMilliseconds()/10))},SSS:function(t){return Mt(t.getMilliseconds(),3)},A:function(t){return this.H(t)<12?"AM":"PM"},a:function(t){return this.H(t)<12?"am":"pm"},aa:function(t){return this.H(t)<12?"a.m.":"p.m."},Z:function(t){return wi(t.getTimezoneOffset(),":")},ZZ:function(t){return wi(t.getTimezoneOffset())},X:function(t){return Math.floor(t.getTime()/1e3)},x:function(t){return t.getTime()}};function Ri(t,e){if(void 0===e&&(e="YYYY-MM-DDTHH:mm:ss.SSSZ"),0===t||t){var i=new Date(t);return e.replace(yi,function(t,e){return t in Di?Di[t](i):void 0===e?t:e.split("\\]").join("]")})}}function Ii(t){return xe(t)?new Date(t.getTime()):t}var Hi={isValid:ki,buildDate:function(t,e){return qi(new Date,t,e)},getDayOfWeek:function(t){var e=new Date(t).getDay();return 0===e?7:e},getWeekOfYear:Si,isBetweenDates:function(t,e,i,s){void 0===s&&(s={});var n=new Date(e).getTime(),o=new Date(i).getTime(),r=new Date(t).getTime();return s.inclusiveFrom&&n--,s.inclusiveTo&&o++,r>n&&r<o},addToDate:function(t,e){return xi(t,e,!0)},subtractFromDate:function(t,e){return xi(t,e,!1)},adjustDate:qi,startOfDate:$i,endOfDate:function(t,e){var i=new Date(t);switch(e){case"year":i.setMonth(11);case"month":i.setDate(Ni(t));case"day":i.setHours(23);case"hour":i.setMinutes(59);case"minute":i.setSeconds(59);case"second":i.setMilliseconds(59)}return i},getMaxDate:function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var s=new Date(t);return e.forEach(function(t){s=Math.max(s,new Date(t))}),s},getMinDate:function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];var s=new Date(t);return e.forEach(function(t){s=Math.min(s,new Date(t))}),s},getDateDiff:Pi,getDayOfYear:Li,inferDateFormat:Mi,convertDateToFormat:Bi,getDateBetween:Ei,isSameDate:Oi,daysInMonth:Ni,formatter:Di,formatDate:Ri,matchFormat:function(t){return void 0===t&&(t=""),t.match(yi)},clone:Ii},Ai=/^\d{4}[^\d]\d{2}[^\d]\d{2}/,Fi={name:"QDatetimePicker",mixins:[{props:mi,computed:{computedValue:function(){return"date"===this.type&&"string"===this.formatModel&&Ai.test(this.value)?this.value.slice(0,10).split(/[^\d]/).join("/"):this.value},computedDefaultValue:function(){return"date"===this.type&&"string"===this.formatModel&&Ai.test(this.defaultValue)?this.defaultValue.slice(0,10).split(/[^\d]+/).join("/"):this.defaultValue},computedDateFormat:function(){if("date"===this.type&&"string"===this.formatModel)return"YYYY/MM/DD HH:mm:ss"},model:{get:function(){return Ei(ki(this.computedValue)?new Date(this.computedValue):this.computedDefaultValue?new Date(this.computedDefaultValue):$i(new Date,"day"),this.pmin,this.pmax)},set:function(t){var e=this,i=Bi(Ei(t,this.pmin,this.pmax),"auto"===this.formatModel?Mi(this.value):this.formatModel,this.computedDateFormat);this.$emit("input",i),this.$nextTick(function(){Oi(i,e.value)||e.$emit("change",i)})}},pmin:function(){return this.min?new Date(this.min):null},pmax:function(){return this.max?new Date(this.max):null},typeHasDate:function(){return"date"===this.type||"datetime"===this.type},typeHasTime:function(){return"time"===this.type||"datetime"===this.type},year:function(){return this.model.getFullYear()},month:function(){return this.model.getMonth()+1},day:function(){return this.model.getDate()},minute:function(){return this.model.getMinutes()},currentYear:function(){return(new Date).getFullYear()},yearInterval:function(){return{min:null!==this.pmin?this.pmin.getFullYear():(this.year||this.currentYear)-80,max:null!==this.pmax?this.pmax.getFullYear():(this.year||this.currentYear)+80}},monthInterval:function(){return{min:this.monthMin,max:null!==this.pmax&&this.pmax.getFullYear()===this.year?this.pmax.getMonth():11}},monthMin:function(){return null!==this.pmin&&this.pmin.getFullYear()===this.year?this.pmin.getMonth():0},daysInMonth:function(){return new Date(this.year,this.model.getMonth()+1,0).getDate()},editable:function(){return!this.disable&&!this.readonly},__needsBorder:function(){return!0}},methods:{toggleAmPm:function(){if(this.editable){var t=this.model.getHours(),e=this.am?12:-12;this.model=new Date(this.model.setHours(t+e))}},__parseTypeValue:function(t,e){return"month"===t?Lt(e,1,12):"date"===t?Lt(e,1,this.daysInMonth):"year"===t?Lt(e,this.yearInterval.min,this.yearInterval.max):"hour"===t?Lt(e,0,23):"minute"===t?Lt(e,0,59):void 0}}},Ye,re],directives:{TouchPan:Ce},props:{defaultValue:[String,Number,Date],disable:Boolean,readonly:Boolean},data:function(){return{monthDragOffset:0,dateDragOffset:0,yearDragOffset:0,hourDragOffset:0,minuteDragOffset:0,dragging:!1}},watch:{model:function(){this.$nextTick(this.__updateAllPositions)}},computed:{classes:function(){var t=["type-"+this.type];return this.disable&&t.push("disabled"),this.readonly&&t.push("readonly"),this.dark&&t.push("q-datetime-dark"),this.minimal&&t.push("q-datetime-minimal"),t},dateInterval:function(){return{min:null!==this.pmin&&Oi(this.pmin,this.model,"month")?this.pmin.getDate():1,max:null!==this.pmax&&Oi(this.pmax,this.model,"month")?this.pmax.getDate():this.daysInMonth}},hour:function(){return this.model.getHours()},hourInterval:function(){return{min:this.pmin&&Oi(this.pmin,this.model,"day")?this.pmin.getHours():0,max:this.pmax&&Oi(this.pmax,this.model,"day")?this.pmax.getHours():23}},minuteInterval:function(){return{min:this.pmin&&Oi(this.pmin,this.model,"hour")?this.pmin.getMinutes():0,max:this.pmax&&Oi(this.pmax,this.model,"hour")?this.pmax.getMinutes():59}},__monthStyle:function(){return this.__colStyle(82-36*(this.month-1+this.monthDragOffset))},__dayStyle:function(){return this.__colStyle(82-36*(this.day+this.dateDragOffset))},__yearStyle:function(){return this.__colStyle(82-36*(this.year+this.yearDragOffset))},__hourStyle:function(){return this.__colStyle(82-36*(this.hour+this.hourDragOffset))},__minuteStyle:function(){return this.__colStyle(82-36*(this.minute+this.minuteDragOffset))}},methods:{setYear:function(t){this.editable&&(this.model=new Date(this.model.setFullYear(this.__parseTypeValue("year",t))))},setMonth:function(t){this.editable&&(this.model=qi(this.model,{month:t}))},setDay:function(t){this.editable&&(this.model=new Date(this.model.setDate(this.__parseTypeValue("date",t))))},setHour:function(t){this.editable&&(this.model=new Date(this.model.setHours(this.__parseTypeValue("hour",t))))},setMinute:function(t){this.editable&&(this.model=new Date(this.model.setMinutes(this.__parseTypeValue("minute",t))))},setView:function(){},__pad:function(t,e){return(t<10?e||"0":"")+t},__scrollView:function(){},__updateAllPositions:function(){var t=this;this.$nextTick(function(){t.typeHasDate&&(t.__updatePositions("month",t.model.getMonth()),t.__updatePositions("date",t.model.getDate()),t.__updatePositions("year",t.model.getFullYear())),t.typeHasTime&&(t.__updatePositions("hour",t.model.getHours()),t.__updatePositions("minute",t.model.getMinutes()))})},__updatePositions:function(t,e){var i=this,s=this.$refs[t];if(s){var n=this[t+"Interval"].min-e;[].slice.call(s.children).forEach(function(t){W(t,i.__itemStyle(36*e,Pt(-18*n,-180,180))),n++})}},__colStyle:function(t){return{"-webkit-transform":"translate3d(0,"+t+"px,0)","-ms-transform":"translate3d(0,"+t+"px,0)",transform:"translate3d(0,"+t+"px,0)"}},__itemStyle:function(t,e){return{"-webkit-transform":"translate3d(0, "+t+"px, 0) rotateX("+e+"deg)","-ms-transform":"translate3d(0, "+t+"px, 0) rotateX("+e+"deg)",transform:"translate3d(0, "+t+"px, 0) rotateX("+e+"deg)"}},__dragMonth:function(t){this.__drag(t,"month")},__dragDate:function(t){this.__drag(t,"date")},__dragYear:function(t){this.__drag(t,"year")},__dragHour:function(t){this.__drag(t,"hour")},__dragMinute:function(t){this.__drag(t,"minute")},__drag:function(t,e){this[t.isFirst?"__dragStart":t.isFinal?"__dragStop":"__dragMove"](t.evt,e)},__dragStart:function(t,e){this.editable&&(this[e+"DragOffset"]=0,this.dragging=e,this.__actualType="date"===e?"day":e,this.__typeOffset="month"===e?-1:0,this.__dragPosition=O(t).top)},__dragMove:function(t,e){if(this.dragging===e&&this.editable){var i=(this.__dragPosition-O(t).top)/36;this[e+"DragOffset"]=i,this.__updatePositions(e,this[this.__actualType]+i+this.__typeOffset)}},__dragStop:function(t,e){var i=this;if(this.dragging===e&&this.editable){this.dragging=!1;var s=Math.round(this[e+"DragOffset"]),n=this.__parseTypeValue(e,this[this.__actualType]+s);n!==this[this.__actualType]?this["set"+Tt(this.__actualType)](n):this.__updatePositions(e,this[this.__actualType]+this.__typeOffset),this.$nextTick(function(){i[e+"DragOffset"]=0})}},__getInterval:function(t,e,i){for(var s=e.min,n=e.max,o=[],r=s;r<=n;r++)o.push(i(r));return o},__getSection:function(t,e,i,s,n,o,r){return t("div",{staticClass:"q-datetime-col q-datetime-col-"+e,directives:[{name:"touch-pan",modifiers:{vertical:!0},value:s}]},[t("div",{ref:i,staticClass:"q-datetime-col-wrapper",style:n},this.__getInterval(t,o,r))])},__getDateSection:function(t){var e=this;return[this.__getSection(t,"month","month",this.__dragMonth,this.__monthStyle,this.monthInterval,function(i){return t("div",{key:"mi"+i,staticClass:"q-datetime-item"},[e.$q.i18n.date.months[i]])}),this.__getSection(t,"day","date",this.__dragDate,this.__dayStyle,this.dateInterval,function(e){return t("div",{key:"di"+e,staticClass:"q-datetime-item"},[e])}),this.__getSection(t,"year","year",this.__dragYear,this.__yearStyle,this.yearInterval,function(e){return t("div",{key:"yi"+e,staticClass:"q-datetime-item"},[e])})]},__getTimeSection:function(t){var e=this;return[this.__getSection(t,"hour","hour",this.__dragHour,this.__hourStyle,this.hourInterval,function(e){return t("div",{key:"hi"+e,staticClass:"q-datetime-item"},[e])}),this.__getSection(t,"minute","minute",this.__dragMinute,this.__minuteStyle,this.minuteInterval,function(i){return t("div",{key:"ni"+i,staticClass:"q-datetime-item"},[e.__pad(i)])})]}},mounted:function(){this.$nextTick(this.__updateAllPositions)},render:function(t){if(this.canRender)return t("div",{staticClass:"q-datetime",class:this.classes},[].concat(this.$slots.default).concat([t("div",{staticClass:"q-datetime-content non-selectable"},[t("div",{staticClass:"q-datetime-inner full-height flex justify-center",on:{touchstart:H}},[this.typeHasDate&&this.__getDateSection(t)||void 0,this.typeHasTime&&this.__getTimeSection(t)||void 0]),t("div",{staticClass:"q-datetime-mask"}),t("div",{staticClass:"q-datetime-highlight"})])]))}},Qi={maxHeight:"80vh",height:"auto",boxShadow:"none",backgroundColor:"#e4e4e4"},ji={name:"QDatetime",mixins:[Ke,ii,re],props:Object.assign({},gi,mi),watch:{value:function(t){!this.disable&&this.isPopover&&(this.model=Ii(t))}},data:function(){return{transition:null,model:null,focused:!1}},created:function(){this.model=Ii(this.computedValue),this.isPopover||(this.transition="q-modal-bottom")},computed:{computedFormat:function(){return this.format?this.format:"date"===this.type?"YYYY/MM/DD":"time"===this.type?"HH:mm":"YYYY/MM/DD HH:mm:ss"},actualValue:function(){return this.displayValue?this.displayValue:ki(this.value)&&this.canRender?Ri(this.value,this.computedFormat,this.$q.i18n.date):""},computedValue:function(){return ki(this.value)?this.value:this.defaultValue||$i(new Date,"day")},computedClearValue:function(){return void 0===this.clearValue?this.defaultValue:this.clearValue},isClearable:function(){return this.editable&&this.clearable&&!Oi(this.computedClearValue,this.value)},modalBtnColor:function(){return this.dark?"light":"dark"}},methods:{toggle:function(){this.$refs.popup&&this[this.$refs.popup.showing?"hide":"show"]()},show:function(){if(!this.disable)return this.__setModel(this.computedValue),this.$refs.popup.show()},hide:function(){return this.$refs.popup?this.$refs.popup.hide():Promise.resolve()},__handleKeyDown:function(t){switch(E(t)){case 13:case 32:return H(t),this.show();case 8:this.isClearable&&this.clear()}},__onFocus:function(){this.disable||this.focused||(this.model=Ii(this.computedValue),this.focused=!0,this.$emit("focus"))},__onBlur:function(t){var e=this;this.focused&&setTimeout(function(){var t=document.activeElement;e.$refs.popup&&e.$refs.popup.showing&&(t===document.body||e.$refs.popup.$el.contains(t))||(e.__onHide(),e.hide())},1)},__onHide:function(t,e){(t||this.isPopover)&&this.__update(t),this.focused&&(e?this.$el.focus():(this.$emit("blur"),this.focused=!1))},__setModel:function(t,e){this.model=Ii(t),(e||this.isPopover)&&this.__update(e)},__update:function(t){var e=this;this.$nextTick(function(){Oi(e.model,e.value)||(e.$emit("input",e.model),t&&e.$emit("change",e.model))})},__resetView:function(){!this.defaultView&&this.$refs.target&&this.$refs.target.setView()},__getPicker:function(t,e){var i=this;return[t(Fi,{ref:"target",staticClass:"no-border",class:{"datetime-ios-modal":e},props:{type:this.type,min:this.min,max:this.max,headerLabel:this.headerLabel,minimal:this.minimal,formatModel:this.formatModel,format24h:this.format24h,firstDayOfWeek:this.firstDayOfWeek,defaultView:this.defaultView,color:this.invertedLight?"grey-7":this.color,dark:this.dark,value:this.model,disable:this.disable,readonly:this.readonly,noParentField:!0},on:{input:function(t){return i.$nextTick(function(){return i.__setModel(t)})},canClose:function(){i.isPopover&&(i.hide(),i.__resetView())}}},[e?t("div",{staticClass:"modal-buttons modal-buttons-top row full-width"},[t("div",{staticClass:"col"}),t(Yt,{props:{color:this.modalBtnColor,flat:!0,label:this.cancelLabel||this.$q.i18n.label.cancel,noRipple:!0},on:{click:function(){i.__onHide(!1,!0),i.hide(),i.__resetView()}}}),this.editable?t(Yt,{props:{color:this.modalBtnColor,flat:!0,label:this.okLabel||this.$q.i18n.label.set,noRipple:!0,disable:!this.model},on:{click:function(){i.__onHide(!0,!0),i.hide(),i.__resetView()}}}):null]):null])]}},render:function(t){var e=this;return t(Je,{staticClass:"q-datetime-input",props:{prefix:this.prefix,suffix:this.suffix,stackLabel:this.stackLabel,floatLabel:this.floatLabel,error:this.error,warning:this.warning,disable:this.disable,readonly:this.readonly,inverted:this.inverted,invertedLight:this.invertedLight,dark:this.dark,hideUnderline:this.hideUnderline,before:this.before,after:this.after,color:this.color,noParentField:this.noParentField,focused:this.focused||this.$refs.popup&&this.$refs.popup.showing,focusable:!0,length:this.actualValue.length},nativeOn:{click:this.toggle,focus:this.__onFocus,blur:this.__onBlur,keydown:this.__handleKeyDown}},[t("div",{staticClass:"col q-input-target ellipsis",class:this.fakeInputClasses},[this.fakeInputValue]),this.isPopover?t(ae,{ref:"popup",props:{cover:!0,disable:this.disable,anchorClick:!1,maxHeight:"100vh"},slot:"after",on:{show:this.__onFocus,hide:function(){return e.__onHide(!0,!0)}}},this.__getPicker(t)):t(ut,{ref:"popup",staticClass:"with-backdrop q-datetime-modal",props:{contentCss:Qi,minimized:!1,position:"bottom",transition:this.transition},on:{dismiss:function(){return e.__onHide(!1,!0)}}},this.__getPicker(t,!0)),this.isClearable?t(dt,{slot:"after",props:{name:this.$q.icon.input["clear"+(this.isInverted?"Inverted":"")]},nativeOn:{click:this.clear},staticClass:"q-if-control"}):null,t(dt,{slot:"after",props:{name:this.$q.icon.input.dropdown},staticClass:"q-if-control"})])}},Vi=["text","textarea","email","search","tel","file","number","password","url","time","date"],Wi={name:"QResizeObservable",mixins:[re],props:{debounce:{type:Number,default:100}},data:function(){return this.hasObserver?{}:{url:this.$q.platform.is.ie?null:"about:blank"}},methods:{onResize:function(){if(this.timer=null,this.$el&&this.$el.parentNode){var t=this.$el.parentNode,e={width:t.offsetWidth,height:t.offsetHeight};e.width===this.size.width&&e.height===this.size.height||(this.size=e,this.$emit("resize",this.size))}},trigger:function(t){!0===t||0===this.debounce?this.onResize():this.timer||(this.timer=setTimeout(this.onResize,this.debounce))}},render:function(t){var e=this;if(this.canRender&&!this.hasObserver)return t("object",{style:this.style,attrs:{type:"text/html",data:this.url,"aria-hidden":!0},on:{load:function(){e.$el.contentDocument.defaultView.addEventListener("resize",e.trigger,M.passive),e.trigger(!0)}}})},beforeCreate:function(){this.size={width:-1,height:-1},i||(this.hasObserver="undefined"!=typeof ResizeObserver,this.hasObserver||(this.style=(this.$q.platform.is.ie?"visibility:hidden;":"")+"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;"))},mounted:function(){if(this.hasObserver)return this.observer=new ResizeObserver(this.trigger),void this.observer.observe(this.$el.parentNode);this.trigger(!0),this.$q.platform.is.ie&&(this.url="about:blank")},beforeDestroy:function(){clearTimeout(this.timer),this.hasObserver?this.$el.parentNode&&this.observer.unobserve(this.$el.parentNode):this.$el.contentDocument&&this.$el.contentDocument.defaultView.removeEventListener("resize",this.trigger,M.passive)}},Ki={name:"QInput",mixins:[Ke,Ue],props:{value:{required:!0},type:{type:String,default:"text",validator:function(t){return Vi.includes(t)}},align:{type:String,validator:function(t){return["left","center","right"].includes(t)}},noPassToggle:Boolean,numericKeyboardToggle:Boolean,readonly:Boolean,decimals:Number,step:Number,upperCase:Boolean,lowerCase:Boolean},data:function(){var t=this;return{showPass:!1,showNumber:!0,model:this.value,watcher:null,autofilled:!1,shadow:{val:this.model,set:this.__set,setNav:this.__set,loading:!1,watched:0,isEditable:function(){return t.editable},isDark:function(){return t.dark},hasFocus:function(){return document.activeElement===t.$refs.input},register:function(){t.shadow.watched+=1,t.__watcherRegister()},unregister:function(){t.shadow.watched=Math.max(0,t.shadow.watched-1),t.__watcherUnregister()},getEl:function(){return t.$refs.input}}}},watch:{value:function(t){var e=parseFloat(this.model),i=parseFloat(t);(!this.isNumber||this.isNumberError||isNaN(e)||isNaN(i)||e!==i)&&(this.model=t),this.isNumberError=!1,this.isNegZero=!1},isTextarea:function(t){this[t?"__watcherRegister":"__watcherUnregister"]()},"$attrs.rows":function(){this.isTextarea&&this.__updateArea()}},provide:function(){return{__input:this.shadow}},computed:{isNumber:function(){return"number"===this.type},isPassword:function(){return"password"===this.type},isTextarea:function(){return"textarea"===this.type},isLoading:function(){return this.loading||this.shadow.watched&&this.shadow.loading},keyboardToggle:function(){return this.$q.platform.is.mobile&&this.isNumber&&this.numericKeyboardToggle},inputType:function(){return this.isPassword?this.showPass&&this.editable?"text":"password":this.isNumber?this.showNumber||!this.editable?"number":"text":this.type},inputClasses:function(){var t=[];return this.align&&t.push("text-"+this.align),this.autofilled&&t.push("q-input-autofill"),t},length:function(){return null!==this.model&&void 0!==this.model?(""+this.model).length:0},computedClearValue:function(){return this.isNumber&&0===this.clearValue?this.clearValue:this.clearValue||(this.isNumber?null:"")},computedStep:function(){return this.step||(this.decimals?Math.pow(10,-this.decimals):"any")},frameProps:function(){return{prefix:this.prefix,suffix:this.suffix,stackLabel:this.stackLabel,floatLabel:this.floatLabel,placeholder:this.placeholder,error:this.error,warning:this.warning,disable:this.disable,readonly:this.readonly,inverted:this.inverted,invertedLight:this.invertedLight,dark:this.dark,hideUnderline:this.hideUnderline,before:this.before,after:this.after,color:this.color,noParentField:this.noParentField,focused:this.focused,length:this.autofilled+this.length}}},methods:{togglePass:function(){this.showPass=!this.showPass,clearTimeout(this.timer),this.focus()},toggleNumber:function(){this.showNumber=!this.showNumber,clearTimeout(this.timer),this.focus()},__clearTimer:function(){var t=this;this.$nextTick(function(){return clearTimeout(t.timer)})},__onAnimationStart:function(t){if(0===t.animationName.indexOf("webkit-autofill-")){var e="webkit-autofill-on"===t.animationName;if(e!==this.autofilled)return t.value=this.autofilled=e,t.el=this,this.$emit("autofill",t)}},__setModel:function(t){clearTimeout(this.timer),this.focus(),this.__set(this.isNumber&&0===t?t:t||(this.isNumber?null:""),!0)},__set:function(t,e){var i=this,s=t&&t.target?t.target.value:t;if(this.isNumber){this.isNegZero=1/s==-1/0;var n=this.isNegZero?-0:s;if(this.model=s,s=parseFloat(s),isNaN(s)||this.isNegZero)return this.isNumberError=!0,void(e&&(this.$emit("input",n),this.$nextTick(function(){String(1/n)!==String(1/i.value)&&i.$emit("change",n)})));this.isNumberError=!1,Number.isInteger(this.decimals)&&(s=parseFloat(s.toFixed(this.decimals)))}else this.lowerCase?s=s.toLowerCase():this.upperCase&&(s=s.toUpperCase()),this.model=s;this.$emit("input",s),e&&this.$nextTick(function(){JSON.stringify(s)!==JSON.stringify(i.value)&&i.$emit("change",s)})},__updateArea:function(){var t=this.$refs.shadow,e=this.$refs.input;if(t&&e){var i=t.scrollHeight,s=Pt(i,t.offsetHeight,this.maxHeight||i);e.style.height=s+"px",e.style.overflowY=this.maxHeight&&s<i?"scroll":"hidden"}},__watcher:function(t){this.isTextarea&&this.__updateArea(),this.shadow.watched&&(this.shadow.val=t)},__watcherRegister:function(){this.watcher||(this.watcher=this.$watch("model",this.__watcher))},__watcherUnregister:function(t){this.watcher&&(t||!this.isTextarea&&!this.shadow.watched)&&(this.watcher(),this.watcher=null)},__getTextarea:function(t){var e=Object.assign({rows:1},this.$attrs);return t("div",{staticClass:"col row relative-position"},[t(Wi,{on:{resize:this.__updateArea}}),t("textarea",{ref:"shadow",staticClass:"col q-input-target q-input-shadow absolute-top",domProps:{value:this.model},attrs:e}),t("textarea",{ref:"input",staticClass:"col q-input-target q-input-area",attrs:Object.assign({},e,{placeholder:this.inputPlaceholder,disabled:this.disable,readonly:this.readonly}),domProps:{value:this.model},on:{input:this.__set,focus:this.__onFocus,blur:this.__onInputBlur,keydown:this.__onKeydown,keyup:this.__onKeyup,paste:this.__onPaste}})])},__getInput:function(t){return t("input",{ref:"input",staticClass:"col q-input-target q-no-input-spinner ellipsis",class:this.inputClasses,attrs:Object.assign({},this.$attrs,{type:this.inputType,placeholder:this.inputPlaceholder,disabled:this.disable,readonly:this.readonly,step:this.computedStep}),domProps:{value:this.model},on:{input:this.__set,focus:this.__onFocus,blur:this.__onInputBlur,keydown:this.__onKeydown,keyup:this.__onKeyup,paste:this.__onPaste,animationstart:this.__onAnimationStart}})}},mounted:function(){this.__updateArea=oe(this.__updateArea),this.isTextarea&&(this.__updateArea(),this.__watcherRegister())},beforeDestroy:function(){this.__watcherUnregister(!0)},render:function(t){return t(Je,{staticClass:"q-input",props:this.frameProps,on:{click:this.__onClick,focus:this.__onFocus,paste:this.__onPaste}},[].concat(this.$slots.before).concat([this.isTextarea?this.__getTextarea(t):this.__getInput(t),!this.disable&&this.isPassword&&!this.noPassToggle&&this.length&&t(dt,{slot:"after",staticClass:"q-if-control",props:{name:this.$q.icon.input[this.showPass?"showPass":"hidePass"]},nativeOn:{mousedown:this.__clearTimer,touchstart:this.__clearTimer,click:this.togglePass}})||void 0,this.editable&&this.keyboardToggle&&t(dt,{slot:"after",staticClass:"q-if-control",props:{name:this.$q.icon.input[this.showNumber?"showNumber":"hideNumber"]},nativeOn:{mousedown:this.__clearTimer,touchstart:this.__clearTimer,click:this.toggleNumber}})||void 0,this.isClearable&&t(dt,{slot:"after",staticClass:"q-if-control",props:{name:this.$q.icon.input["clear"+(this.isInverted?"Inverted":"")]},nativeOn:{mousedown:this.__clearTimer,touchstart:this.__clearTimer,click:this.clear}})||void 0,this.isLoading&&t(Ut,{slot:"after",staticClass:"q-if-control",props:{size:"24px"}})||void 0]).concat(this.$slots.after).concat(this.$slots.default?t("div",{staticClass:"absolute-full no-pointer-events",slot:"after"},this.$slots.default):void 0))}},Ui={name:"QRadio",mixins:[Qe],props:{val:{required:!0}},computed:{isTrue:function(){return this.value===this.val}},methods:{toggle:function(t,e){void 0===e&&(e=!0),this.disable||this.readonly||(t&&H(t),e&&this.$el.blur(),this.isTrue||this.__update(this.val))},__getContent:function(t){return[t(dt,{staticClass:"q-radio-unchecked cursor-pointer absolute-full",props:{name:this.uncheckedIcon||this.$q.icon.radio.unchecked.ios}}),t(dt,{staticClass:"q-radio-checked cursor-pointer absolute-full",props:{name:this.checkedIcon||this.$q.icon.radio.checked.ios}}),null]}},beforeCreate:function(){this.__kebabTag="q-radio"}},Yi={name:"QToggle",mixins:[Fe,Qe],props:{icon:String},computed:{currentIcon:function(){return(this.isTrue?this.checkedIcon:this.uncheckedIcon)||this.icon},iconColor:function(){return"dark"},baseClass:function(){if(this.dark)return"q-toggle-base-dark"}},methods:{__swipe:function(t){"left"===t.direction?this.isTrue&&this.toggle():"right"===t.direction&&this.isFalse&&this.toggle()},__getContent:function(t){return[t("div",{staticClass:"q-toggle-base",class:this.baseClass}),t("div",{staticClass:"q-toggle-handle row flex-center"},[this.currentIcon?t(dt,{staticClass:"q-toggle-icon",props:{name:this.currentIcon,color:this.iconColor}}):null,null])]}},beforeCreate:function(){this.__kebabTag="q-toggle"}},Ji={radio:Ui,checkbox:je,toggle:Yi},Xi={name:"QOptionGroup",mixins:[Ye],props:{value:{required:!0},type:{default:"radio",validator:function(t){return["radio","checkbox","toggle"].includes(t)}},color:String,keepColor:Boolean,dark:Boolean,options:{type:Array,validator:function(t){return t.every(function(t){return"value"in t&&"label"in t})}},leftLabel:Boolean,inline:Boolean,disable:Boolean,readonly:Boolean},computed:{component:function(){return Ji[this.type]},model:function(){return Array.isArray(this.value)?this.value.slice():this.value},length:function(){return this.value?"radio"===this.type?1:this.value.length:0},__needsBorder:function(){return!0}},methods:{__onFocus:function(){this.$emit("focus")},__onBlur:function(){this.$emit("blur")},__update:function(t){var e=this;this.$emit("input",t),this.$nextTick(function(){JSON.stringify(t)!==JSON.stringify(e.value)&&e.$emit("change",t)})}},created:function(){var t=Array.isArray(this.value);"radio"===this.type?t&&console.error("q-option-group: model should not be array"):t||console.error("q-option-group: model should be array in your case")},render:function(t){var e=this;return t("div",{staticClass:"q-option-group group",class:{"q-option-group-inline-opts":this.inline}},this.options.map(function(i){return t("div",[t(e.component,{props:{value:e.value,val:i.value,readonly:e.readonly||i.readonly,disable:e.disable||i.disable,label:i.label,leftLabel:e.leftLabel||i.leftLabel,color:i.color||e.color,checkedIcon:i.checkedIcon,uncheckedIcon:i.uncheckedIcon,dark:i.dark||e.dark,keepColor:i.keepColor||e.keepColor},on:{input:e.__update,focus:e.__onFocus,blur:e.__onBlur}})])}))}},Gi={name:"QDialog",props:{value:Boolean,title:String,message:String,prompt:Object,options:Object,ok:{type:[String,Object,Boolean],default:!0},cancel:[String,Object,Boolean],stackButtons:Boolean,preventClose:Boolean,noBackdropDismiss:Boolean,noEscDismiss:Boolean,noRefocus:Boolean,position:String,color:{type:String,default:"primary"}},render:function(t){var e=this,i=[],s=this.$slots.title||this.title,n=this.$slots.message||this.message;return s&&i.push(t("div",{staticClass:"modal-header"},[s])),n&&i.push(t("div",{staticClass:"modal-body modal-message modal-scroll"},[n])),(this.hasForm||this.$slots.body)&&i.push(t("div",{staticClass:"modal-body modal-scroll"},this.hasForm?this.prompt?this.__getPrompt(t):this.__getOptions(t):[this.$slots.body])),this.$scopedSlots.buttons?i.push(t("div",{staticClass:"modal-buttons",class:this.buttonClass},[this.$scopedSlots.buttons({ok:this.__onOk,cancel:this.__onCancel})])):(this.ok||this.cancel)&&i.push(this.__getButtons(t)),t(ut,{ref:"modal",props:{value:this.value,minimized:!0,noBackdropDismiss:this.noBackdropDismiss||this.preventClose,noEscDismiss:this.noEscDismiss||this.preventClose,noRefocus:this.noRefocus,position:this.position},on:{input:function(t){e.$emit("input",t)},show:function(){var t;(e.$emit("show"),e.$q.platform.is.desktop)&&((e.prompt||e.options)&&(t=e.prompt?e.$refs.modal.$el.getElementsByTagName("INPUT"):e.$refs.modal.$el.getElementsByClassName("q-option")).length?t[0].focus():(t=e.$refs.modal.$el.getElementsByClassName("q-btn")).length&&t[t.length-1].focus())},hide:function(){e.$emit("hide")},dismiss:function(){e.$emit("cancel")},"escape-key":function(){e.$emit("escape-key")}}},i)},computed:{hasForm:function(){return this.prompt||this.options},okLabel:function(){return!0===this.ok?this.$q.i18n.label.ok:this.ok},cancelLabel:function(){return!0===this.cancel?this.$q.i18n.label.cancel:this.cancel},buttonClass:function(){return this.stackButtons?"column":"row"},okProps:function(){return Object(this.ok)===this.ok?Object.assign({color:this.color,label:this.$q.i18n.label.ok,noRipple:!0},this.ok):{color:this.color,flat:!0,label:this.okLabel,noRipple:!0}},cancelProps:function(){return Object(this.cancel)===this.cancel?Object.assign({color:this.color,label:this.$q.i18n.label.cancel,noRipple:!0},this.cancel):{color:this.color,flat:!0,label:this.cancelLabel,noRipple:!0}}},methods:{show:function(){return this.$refs.modal.show()},hide:function(){var t=this;return this.$refs.modal?this.$refs.modal.hide().then(function(){return t.hasForm?ci(t.__getData()):void 0}):Promise.resolve()},__getPrompt:function(t){var e=this;return[t(Ki,{style:"margin-bottom: 10px",props:{value:this.prompt.model,type:this.prompt.type||"text",color:this.color,noPassToggle:!0},on:{input:function(t){e.prompt.model=t},keyup:function(t){13===E(t)&&e.__onOk()}}})]},__getOptions:function(t){var e=this;return[t(Xi,{props:{value:this.options.model,type:this.options.type,color:this.color,inline:this.options.inline,options:this.options.items},on:{change:function(t){e.options.model=t}}})]},__getButtons:function(t){var e=[];return this.cancel&&e.push(t(Yt,{props:this.cancelProps,on:{click:this.__onCancel}})),this.ok&&e.push(t(Yt,{props:this.okProps,on:{click:this.__onOk}})),t("div",{staticClass:"modal-buttons",class:this.buttonClass},e)},__onOk:function(){var t=this;return this.hide().then(function(e){t.$emit("ok",e)})},__onCancel:function(){var t=this;return this.hide().then(function(){t.$emit("cancel")})},__getData:function(){return this.prompt?this.prompt.model:this.options?this.options.model:void 0}}};function Zi(t,e,i){var s;function n(){for(var n=this,o=[],r=arguments.length;r--;)o[r]=arguments[r];clearTimeout(s),i&&!s&&t.apply(this,o),s=setTimeout(function(){s=null,i||t.apply(n,o)},e)}return void 0===e&&(e=250),n.cancel=function(){clearTimeout(s)},n}var ts={name:"QTooltip",mixins:[L,re],props:{anchor:{type:String,default:"top middle",validator:ie},self:{type:String,default:"bottom middle",validator:ie},offset:{type:Array,validator:se},delay:{type:Number,default:0},maxHeight:String,disable:Boolean},watch:{$route:function(){this.hide()}},computed:{anchorOrigin:function(){return ne(this.anchor)},selfOrigin:function(){return ne(this.self)}},methods:{__show:function(){clearTimeout(this.timer),document.body.appendChild(this.$el),this.scrollTarget=X(this.anchorEl),this.scrollTarget.addEventListener("scroll",this.hide,M.passive),window.addEventListener("resize",this.__debouncedUpdatePosition,M.passive),this.$q.platform.is.mobile&&document.body.addEventListener("click",this.hide,!0),this.__updatePosition(),this.showPromise&&this.showPromiseResolve()},__hide:function(){this.__cleanup(),this.hidePromise&&this.hidePromiseResolve()},__cleanup:function(){clearTimeout(this.timer),this.scrollTarget.removeEventListener("scroll",this.hide,M.passive),window.removeEventListener("resize",this.__debouncedUpdatePosition,M.passive),this.$el.remove(),this.$q.platform.is.mobile&&document.body.removeEventListener("click",this.hide,!0)},__updatePosition:function(){ee({el:this.$el,animate:!0,offset:this.offset,anchorEl:this.anchorEl,anchorOrigin:this.anchorOrigin,selfOrigin:this.selfOrigin,maxHeight:this.maxHeight})},__delayShow:function(){clearTimeout(this.timer),this.timer=setTimeout(this.show,this.delay)},__delayHide:function(){clearTimeout(this.timer),this.hide()}},render:function(t){if(this.canRender)return t("div",{staticClass:"q-tooltip animate-popup"},[t("div",this.$slots.default)])},beforeMount:function(){var t=this;this.__debouncedUpdatePosition=Zi(function(){t.__updatePosition()},70)},mounted:function(){var t=this;this.$nextTick(function(){t.$el.offsetHeight,t.anchorEl=t.$el.parentNode,t.anchorEl.removeChild(t.$el),t.anchorEl.classList.contains("q-btn-inner")&&(t.anchorEl=t.anchorEl.parentNode),t.$q.platform.is.mobile?t.anchorEl.addEventListener("click",t.show):(t.anchorEl.addEventListener("mouseenter",t.__delayShow),t.anchorEl.addEventListener("focus",t.__delayShow),t.anchorEl.addEventListener("mouseleave",t.__delayHide),t.anchorEl.addEventListener("blur",t.__delayHide)),t.value&&t.show()})},beforeDestroy:function(){clearTimeout(this.timer),this.showing&&this.__cleanup(),this.anchorEl&&(this.$q.platform.is.mobile?this.anchorEl.removeEventListener("click",this.show):(this.anchorEl.removeEventListener("mouseenter",this.__delayShow),this.anchorEl.removeEventListener("focus",this.__delayShow),this.anchorEl.removeEventListener("mouseleave",this.__delayHide),this.anchorEl.removeEventListener("blur",this.__delayHide)))}};function es(t,e,i){e.handler?e.handler(t,i,i.caret):i.runCmd(e.cmd,e.param)}function is(t,e,i,s,n){void 0===n&&(n=!1);var o=n||"toggle"===i.type&&(i.toggled?i.toggled(e):i.cmd&&e.caret.is(i.cmd,i.param)),r=[],a={click:function(t){s&&s(),es(t,i,e)}};if(i.tip&&e.$q.platform.is.desktop){var l=i.key?t("div",[t("small","(CTRL + "+String.fromCharCode(i.key)+")")]):null;r.push(t(ts,{props:{delay:1e3}},[t("div",{domProps:{innerHTML:i.tip}}),l]))}return t(Yt,{props:Object.assign({icon:i.icon,color:o?i.toggleColor||e.toolbarToggleColor:i.color||e.toolbarColor,textColor:o&&(e.toolbarFlat||e.toolbarOutline)?null:i.textColor||e.toolbarTextColor,label:i.label,disable:!!i.disable&&("function"!=typeof i.disable||i.disable(e))},e.buttonProps),on:a},r)}function ss(t,e){if(e.caret)return e.buttons.map(function(i){return t(fe,{props:e.buttonProps,staticClass:"items-center relative-position"},i.map(function(i){return"slot"===i.type?e.$slots[i.slot]:"dropdown"===i.type?function(t,e,i){var s,n,o=i.label,r=i.icon,a="no-icons"===i.list;function l(){h.componentInstance.hide()}"only-icons"===i.list?(n=i.options.map(function(i){var s=void 0===i.type&&e.caret.is(i.cmd,i.param);return s&&(o=i.tip,r=i.icon),is(t,e,i,l,s)}),s=e.toolbarBackgroundClass,n=[t(fe,{props:e.buttonProps,staticClass:"relative-position q-editor-toolbar-padding",style:{borderRadius:"0"}},n)]):(n=i.options.map(function(i){var s=!!i.disable&&i.disable(e),n=void 0===i.type&&e.caret.is(i.cmd,i.param);n&&(o=i.tip,r=i.icon);var c=i.htmlTip;return t(yt,{props:{active:n,link:!s},class:{disabled:s},nativeOn:{click:function(t){s||(l(),e.$refs.content&&e.$refs.content.focus(),e.caret.restore(),es(t,i,e))}}},[a?"":t(wt,{props:{icon:i.icon}}),t(xt,{props:!c&&i.tip?{label:i.tip}:null,domProps:c?{innerHTML:i.htmlTip}:null})])}),s=[e.toolbarBackgroundClass,e.toolbarTextColor?"text-"+e.toolbarTextColor:""],n=[t(pt,{props:{separator:!0}},[n])]);var c=i.highlight&&o!==i.label,h=t(me,{props:Object.assign({noCaps:!0,noWrap:!0,color:c?e.toolbarToggleColor:e.toolbarColor,textColor:c&&(e.toolbarFlat||e.toolbarOutline)?null:e.toolbarTextColor,label:i.fixedLabel?i.label:o,icon:i.fixedIcon?i.icon:r,contentClass:s},e.buttonProps)},n);return h}(t,e,i):is(t,e,i)}))})}function ns(t,e){if(!t)return!1;for(;t=t.parentNode;){if(t===document.body)return!1;if(t===e)return!0}return!1}var os=/^https?:\/\//,rs=function(t,e){this.el=t,this.vm=e},as={selection:{configurable:!0},hasSelection:{configurable:!0},range:{configurable:!0},parent:{configurable:!0},blockParent:{configurable:!0}};as.selection.get=function(){if(this.el){var t=document.getSelection();return ns(t.anchorNode,this.el)&&ns(t.focusNode,this.el)?t:void 0}},as.hasSelection.get=function(){return this.selection?this.selection.toString().length>0:null},as.range.get=function(){var t=this.selection;if(t)return t.rangeCount?t.getRangeAt(0):null},as.parent.get=function(){var t=this.range;if(t){var e=t.startContainer;return e.nodeType===document.ELEMENT_NODE?e:e.parentNode}},as.blockParent.get=function(){var t=this.parent;if(t)return function t(e,i){if(i&&e===i)return null;var s=(window.getComputedStyle?window.getComputedStyle(e):e.currentStyle).display;return"block"===s||"table"===s?e:t(e.parentNode)}(t,this.el)},rs.prototype.save=function(t){void 0===t&&(t=this.range),this._range=t},rs.prototype.restore=function(t){void 0===t&&(t=this._range);var e=document.createRange(),i=document.getSelection();t?(e.setStart(t.startContainer,t.startOffset),e.setEnd(t.endContainer,t.endOffset),i.removeAllRanges(),i.addRange(e)):(i.selectAllChildren(this.el),i.collapseToEnd())},rs.prototype.hasParent=function(t,e){var i=e?this.parent:this.blockParent;return!!i&&i.nodeName.toLowerCase()===t.toLowerCase()},rs.prototype.hasParents=function(t){var e=this.parent;return!!e&&t.includes(e.nodeName.toLowerCase())},rs.prototype.is=function(t,e){switch(t){case"formatBlock":return"DIV"===e&&this.parent===this.el||this.hasParent(e,"PRE"===e);case"link":return this.hasParent("A",!0);case"fontSize":return document.queryCommandValue(t)===e;case"fontName":var i=document.queryCommandValue(t);return i==='"'+e+'"'||i===e;case"fullscreen":return this.vm.inFullscreen;case void 0:return!1;default:var s=document.queryCommandState(t);return e?s===e:s}},rs.prototype.getParentAttribute=function(t){if(this.parent)return this.parent.getAttribute(t)},rs.prototype.can=function(t){if("outdent"===t)return this.hasParents(["blockquote","li"]);if("indent"===t){var e=!!this.parent&&this.parent.nodeName.toLowerCase();if("blockquote"===e)return!1;if("li"===e){var i=this.parent.previousSibling;return i&&"li"===i.nodeName.toLowerCase()}return!1}},rs.prototype.apply=function(t,e,i){if(void 0===i&&(i=function(){}),"formatBlock"===t)["BLOCKQUOTE","H1","H2","H3","H4","H5","H6","PRE"].includes(e)&&this.is(t,e)&&(t="outdent",e=null);else{if("print"===t){i();var s=window.open();return s.document.write("\n <!doctype html>\n <html>\n <head>\n <title>Print - "+document.title+"</title>\n </head>\n <body>\n <div>"+this.el.innerHTML+"</div>\n </body>\n </html>\n "),s.print(),void s.close()}if("link"===t){var n=this.getParentAttribute("href");if(n)this.vm.editLinkUrl=n;else{var o=this.selectWord(this.selection),r=o?o.toString():"";if(!r.length)return;this.vm.editLinkUrl=os.test(r)?r:"https://"+r,document.execCommand("createLink",!1,this.vm.editLinkUrl)}return this.range.selectNodeContents(this.parent),void this.save()}if("fullscreen"===t)return this.vm.toggleFullscreen(),void i()}document.execCommand(t,!1,e),i()},rs.prototype.selectWord=function(t){if(!t.isCollapsed)return t;var e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset),e.setEnd(t.focusNode,t.focusOffset);var i=e.collapsed?["backward","forward"]:["forward","backward"];e.detach();var s=t.focusNode,n=t.focusOffset;return t.collapse(t.anchorNode,t.anchorOffset),t.modify("move",i[0],"character"),t.modify("move",i[1],"word"),t.extend(s,n),t.modify("extend",i[1],"character"),t.modify("extend",i[0],"word"),t},Object.defineProperties(rs.prototype,as);var ls=Object.prototype.toString,cs=Object.prototype.hasOwnProperty,hs={};function us(t){return null===t?String(t):hs[ls.call(t)]||"object"}function ds(t){if(!t||"object"!==us(t))return!1;if(t.constructor&&!cs.call(t,"constructor")&&!cs.call(t.constructor.prototype,"isPrototypeOf"))return!1;var e;for(e in t);return void 0===e||cs.call(t,e)}function ps(){var t,e,i,s,n,o,r=arguments,a=arguments[0]||{},l=1,c=arguments.length,h=!1;for("boolean"==typeof a&&(h=a,a=arguments[1]||{},l=2),Object(a)!==a&&"function"!==us(a)&&(a={}),c===l&&(a=this,l--);l<c;l++)if(null!==(t=r[l]))for(e in t)i=a[e],a!==(s=t[e])&&(h&&s&&(ds(s)||(n="array"===us(s)))?(n?(n=!1,o=i&&"array"===us(i)?i:[]):o=i&&ds(i)?i:{},a[e]=ps(h,o,s)):void 0!==s&&(a[e]=s));return a}"Boolean Number String Function Array Date RegExp Object".split(" ").forEach(function(t){hs["[object "+t+"]"]=t.toLowerCase()});var fs={name:"QEditor",mixins:[ze],props:{value:{type:String,required:!0},readonly:Boolean,disable:Boolean,minHeight:{type:String,default:"10rem"},maxHeight:String,height:String,definitions:Object,fonts:Object,toolbar:{type:Array,validator:function(t){return 0===t.length||t.every(function(t){return t.length})},default:function(){return[["left","center","right","justify"],["bold","italic","underline","strike"],["undo","redo"]]}},toolbarColor:String,toolbarTextColor:String,toolbarToggleColor:{type:String,default:"primary"},toolbarBg:{type:String,default:"grey-3"},toolbarFlat:Boolean,toolbarOutline:Boolean,toolbarPush:Boolean,toolbarRounded:Boolean,contentStyle:Object,contentClass:[Object,Array,String]},computed:{editable:function(){return!this.readonly&&!this.disable},hasToolbar:function(){return this.toolbar&&this.toolbar.length>0},toolbarBackgroundClass:function(){if(this.toolbarBg)return"bg-"+this.toolbarBg},buttonProps:function(){return{outline:this.toolbarOutline,flat:this.toolbarFlat,push:this.toolbarPush,rounded:this.toolbarRounded,dense:!0,color:this.toolbarColor,disable:!this.editable}},buttonDef:function(){var t=this.$q.i18n.editor,e=this.$q.icon.editor;return{bold:{cmd:"bold",icon:e.bold,tip:t.bold,key:66},italic:{cmd:"italic",icon:e.italic,tip:t.italic,key:73},strike:{cmd:"strikeThrough",icon:e.strikethrough,tip:t.strikethrough,key:83},underline:{cmd:"underline",icon:e.underline,tip:t.underline,key:85},unordered:{cmd:"insertUnorderedList",icon:e.unorderedList,tip:t.unorderedList},ordered:{cmd:"insertOrderedList",icon:e.orderedList,tip:t.orderedList},subscript:{cmd:"subscript",icon:e.subscript,tip:t.subscript,htmlTip:"x<subscript>2</subscript>"},superscript:{cmd:"superscript",icon:e.superscript,tip:t.superscript,htmlTip:"x<superscript>2</superscript>"},link:{cmd:"link",icon:e.hyperlink,tip:t.hyperlink,key:76},fullscreen:{cmd:"fullscreen",icon:e.toggleFullscreen,tip:t.toggleFullscreen,key:70},quote:{cmd:"formatBlock",param:"BLOCKQUOTE",icon:e.quote,tip:t.quote,key:81},left:{cmd:"justifyLeft",icon:e.left,tip:t.left},center:{cmd:"justifyCenter",icon:e.center,tip:t.center},right:{cmd:"justifyRight",icon:e.right,tip:t.right},justify:{cmd:"justifyFull",icon:e.justify,tip:t.justify},print:{type:"no-state",cmd:"print",icon:e.print,tip:t.print,key:80},outdent:{type:"no-state",disable:function(t){return t.caret&&!t.caret.can("outdent")},cmd:"outdent",icon:e.outdent,tip:t.outdent},indent:{type:"no-state",disable:function(t){return t.caret&&!t.caret.can("indent")},cmd:"indent",icon:e.indent,tip:t.indent},removeFormat:{type:"no-state",cmd:"removeFormat",icon:e.removeFormat,tip:t.removeFormat},hr:{type:"no-state",cmd:"insertHorizontalRule",icon:e.hr,tip:t.hr},undo:{type:"no-state",cmd:"undo",icon:e.undo,tip:t.undo,key:90},redo:{type:"no-state",cmd:"redo",icon:e.redo,tip:t.redo,key:89},h1:{cmd:"formatBlock",param:"H1",icon:e.header,tip:t.header1,htmlTip:'<h1 class="q-ma-none">'+t.header1+"</h1>"},h2:{cmd:"formatBlock",param:"H2",icon:e.header,tip:t.header2,htmlTip:'<h2 class="q-ma-none">'+t.header2+"</h2>"},h3:{cmd:"formatBlock",param:"H3",icon:e.header,tip:t.header3,htmlTip:'<h3 class="q-ma-none">'+t.header3+"</h3>"},h4:{cmd:"formatBlock",param:"H4",icon:e.header,tip:t.header4,htmlTip:'<h4 class="q-ma-none">'+t.header4+"</h4>"},h5:{cmd:"formatBlock",param:"H5",icon:e.header,tip:t.header5,htmlTip:'<h5 class="q-ma-none">'+t.header5+"</h5>"},h6:{cmd:"formatBlock",param:"H6",icon:e.header,tip:t.header6,htmlTip:'<h6 class="q-ma-none">'+t.header6+"</h6>"},p:{cmd:"formatBlock",param:"DIV",icon:e.header,tip:t.paragraph},code:{cmd:"formatBlock",param:"PRE",icon:e.code,tip:"<code>"+t.code+"</code>"},"size-1":{cmd:"fontSize",param:"1",icon:e.size,tip:t.size1,htmlTip:'<font size="1">'+t.size1+"</font>"},"size-2":{cmd:"fontSize",param:"2",icon:e.size,tip:t.size2,htmlTip:'<font size="2">'+t.size2+"</font>"},"size-3":{cmd:"fontSize",param:"3",icon:e.size,tip:t.size3,htmlTip:'<font size="3">'+t.size3+"</font>"},"size-4":{cmd:"fontSize",param:"4",icon:e.size,tip:t.size4,htmlTip:'<font size="4">'+t.size4+"</font>"},"size-5":{cmd:"fontSize",param:"5",icon:e.size,tip:t.size5,htmlTip:'<font size="5">'+t.size5+"</font>"},"size-6":{cmd:"fontSize",param:"6",icon:e.size,tip:t.size6,htmlTip:'<font size="6">'+t.size6+"</font>"},"size-7":{cmd:"fontSize",param:"7",icon:e.size,tip:t.size7,htmlTip:'<font size="7">'+t.size7+"</font>"}}},buttons:function(){var t=this,e=this.definitions||{},i=this.definitions||this.fonts?ps(!0,{},this.buttonDef,e,function(t,e,i,s){void 0===s&&(s={});var n=Object.keys(s);if(0===n.length)return{};var o={default_font:{cmd:"fontName",param:t,icon:i,tip:e}};return n.forEach(function(t){var e=s[t];o[t]={cmd:"fontName",param:e,icon:i,tip:e,htmlTip:'<font face="'+e+'">'+e+"</font>"}}),o}(this.defaultFont,this.$q.i18n.editor.defaultFont,this.$q.icon.editor.font,this.fonts)):this.buttonDef;return this.toolbar.map(function(s){return s.map(function(s){if(s.options)return{type:"dropdown",icon:s.icon,label:s.label,fixedLabel:s.fixedLabel,fixedIcon:s.fixedIcon,highlight:s.highlight,list:s.list,options:s.options.map(function(t){return i[t]})};var n=i[s];return n?"no-state"===n.type||e[s]&&(void 0===n.cmd||t.buttonDef[n.cmd]&&"no-state"===t.buttonDef[n.cmd].type)?n:ps(!0,{type:"toggle"},n):{type:"slot",slot:s}})})},keys:function(){var t={},e=function(e){e.key&&(t[e.key]={cmd:e.cmd,param:e.param})};return this.buttons.forEach(function(t){t.forEach(function(t){t.options?t.options.forEach(e):e(t)})}),t},innerStyle:function(){return this.inFullscreen?this.contentStyle:[{minHeight:this.minHeight,height:this.height,maxHeight:this.maxHeight},this.contentStyle]},innerClass:function(){return[this.contentClass,{col:this.inFullscreen,"overflow-auto":this.inFullscreen||this.maxHeight}]}},data:function(){return{editWatcher:!0,editLinkUrl:null}},watch:{value:function(t){this.editWatcher?this.$refs.content.innerHTML=t:this.editWatcher=!0}},methods:{onInput:function(t){if(this.editWatcher){var e=this.$refs.content.innerHTML;e!==this.value&&(this.editWatcher=!1,this.$emit("input",e))}},onKeydown:function(t){var e=E(t);if(!t.ctrlKey)return this.refreshToolbar(),void(this.$q.platform.is.ie&&this.$nextTick(this.onInput));var i=this.keys[e];if(void 0!==i){var s=i.cmd,n=i.param;H(t),this.runCmd(s,n,!1),this.$q.platform.is.ie&&this.$nextTick(this.onInput)}},runCmd:function(t,e,i){var s=this;void 0===i&&(i=!0),this.focus(),this.caret.apply(t,e,function(){s.focus(),i&&s.refreshToolbar()})},refreshToolbar:function(){var t=this;setTimeout(function(){t.editLinkUrl=null,t.$forceUpdate()},1)},focus:function(){this.$refs.content.focus()},getContentEl:function(){return this.$refs.content}},created:function(){i||(document.execCommand("defaultParagraphSeparator",!1,"div"),this.defaultFont=window.getComputedStyle(document.body).fontFamily)},mounted:function(){var t=this;this.$nextTick(function(){t.$refs.content&&(t.caret=new rs(t.$refs.content,t),t.$refs.content.innerHTML=t.value),t.$nextTick(t.refreshToolbar)})},render:function(t){var e,s=this;if(this.hasToolbar){var n={staticClass:"q-editor-toolbar row no-wrap scroll-x",class:[{"q-editor-toolbar-separator":!this.toolbarOutline&&!this.toolbarPush},this.toolbarBackgroundClass]};(e=[]).push(t("div",ps({key:"qedt_top"},n),[t("div",{staticClass:"row no-wrap q-editor-toolbar-padding fit items-center"},ss(t,this))])),null!==this.editLinkUrl&&e.push(t("div",ps({key:"qedt_btm"},n),[t("div",{staticClass:"row no-wrap q-editor-toolbar-padding fit items-center"},function(t,e){if(e.caret){var i=e.toolbarColor||e.toolbarTextColor,s=e.editLinkUrl,n=function(){e.caret.restore(),s!==e.editLinkUrl&&document.execCommand("createLink",!1,""===s?" ":s),e.editLinkUrl=null};return[t("div",{staticClass:"q-mx-xs",class:"text-"+i},[e.$q.i18n.editor.url+": "]),t(Ki,{key:"qedt_btm_input",staticClass:"q-ma-none q-pa-none col q-editor-input",props:{value:s,color:i,autofocus:!0,hideUnderline:!0},on:{input:function(t){s=t},keydown:function(t){switch(E(t)){case 13:return n();case 27:e.caret.restore(),e.editLinkUrl=null}}}}),t(fe,{key:"qedt_btm_grp",props:e.buttonProps},[t(Yt,{key:"qedt_btm_rem",attrs:{tabindex:-1},props:Object.assign({label:e.$q.i18n.label.remove,noCaps:!0},e.buttonProps),on:{click:function(){e.caret.restore(),document.execCommand("unlink"),e.editLinkUrl=null}}}),t(Yt,{key:"qedt_btm_upd",props:Object.assign({label:e.$q.i18n.label.update,noCaps:!0},e.buttonProps),on:{click:n}})])]}}(t,this))])),e=t("div",e)}return t("div",{staticClass:"q-editor",style:{height:this.inFullscreen?"100vh":null},class:{disabled:this.disable,fullscreen:this.inFullscreen,column:this.inFullscreen}},[e,t("div",{ref:"content",staticClass:"q-editor-content",style:this.innerStyle,class:this.innerClass,attrs:{contenteditable:this.editable},domProps:i?{innerHTML:this.value}:void 0,on:{input:this.onInput,keydown:this.onKeydown,click:this.refreshToolbar,blur:function(){s.caret.save()}}})])}},ms={props:{outline:Boolean,push:Boolean,flat:Boolean,color:String,textColor:String,glossy:Boolean}},gs={name:"QFab",mixins:[ms,L],provide:function(){var t=this;return{__qFabClose:function(e){return t.hide(e).then(function(){return t.$refs.trigger&&t.$refs.trigger.$el&&t.$refs.trigger.$el.focus(),e})}}},props:{icon:String,activeIcon:String,direction:{type:String,default:"right"}},watch:{$route:function(){this.hide()}},created:function(){this.value&&this.show()},render:function(t){return t("div",{staticClass:"q-fab z-fab row inline justify-center",class:{"q-fab-opened":this.showing}},[t(Yt,{ref:"trigger",props:{fab:!0,outline:this.outline,push:this.push,flat:this.flat,color:this.color,textColor:this.textColor,glossy:this.glossy},on:{click:this.toggle}},[this.$slots.tooltip,t(dt,{staticClass:"q-fab-icon absolute-full",props:{name:this.icon||this.$q.icon.fab.icon}}),t(dt,{staticClass:"q-fab-active-icon absolute-full",props:{name:this.activeIcon||this.$q.icon.fab.activeIcon}})]),t("div",{staticClass:"q-fab-actions flex no-wrap inline items-center",class:"q-fab-"+this.direction},this.$slots.default)])}},vs={name:"QFabAction",mixins:[ms],props:{icon:{type:String,required:!0}},inject:{__qFabClose:{default:function(){console.error("QFabAction needs to be child of QFab")}}},methods:{click:function(t){var e=this;this.__qFabClose().then(function(){e.$emit("click",t)})}},render:function(t){return t(Yt,{props:{fabMini:!0,outline:this.outline,push:this.push,flat:this.flat,color:this.color,textColor:this.textColor,glossy:this.glossy,icon:this.icon},on:{click:this.click}},this.$slots.default)}},bs={name:"QField",mixins:[re],props:{inset:{type:String,validator:function(t){return["icon","label","full"].includes(t)}},label:String,count:{type:[Number,Boolean],default:!1},error:Boolean,errorLabel:String,warning:Boolean,warningLabel:String,helper:String,icon:String,iconColor:String,dark:Boolean,orientation:{type:String,validator:function(t){return["vertical","horizontal"].includes(t)}},labelWidth:{type:[Number,String],default:5,validator:function(t){var e=parseInt(t,10);return e>0&&e<13}}},data:function(){return{input:{}}},computed:{hasError:function(){return this.input.error||this.error},hasWarning:function(){return!this.hasError&&(this.input.warning||this.warning)},childHasLabel:function(){return this.input.floatLabel||this.input.stackLabel},isDark:function(){return this.input.dark||this.dark},insetIcon:function(){return["icon","full"].includes(this.inset)},hasNoInput:function(){return this.canRender&&(!this.input.$options||this.input.__needsBorder)},counter:function(){if(this.count){var t=this.input.length||"0";return Number.isInteger(this.count)?t+" / "+this.count:t}},classes:function(){return{"q-field-responsive":!this.isVertical&&!this.isHorizontal,"q-field-vertical":this.isVertical,"q-field-horizontal":this.isHorizontal,"q-field-floating":this.childHasLabel,"q-field-no-label":!this.label&&!this.$slots.label,"q-field-with-error":this.hasError,"q-field-with-warning":this.hasWarning,"q-field-dark":this.isDark,"q-field-no-input":this.hasNoInput}},computedLabelWidth:function(){return parseInt(this.labelWidth,10)},isVertical:function(){return"vertical"===this.orientation||12===this.computedLabelWidth},isHorizontal:function(){return"horizontal"===this.orientation},labelClasses:function(){return this.isVertical?"col-12":this.isHorizontal?"col-"+this.labelWidth:"col-xs-12 col-sm-"+this.labelWidth},inputClasses:function(){return this.isVertical?"col-xs-12":this.isHorizontal?"col":"col-xs-12 col-sm"},iconProps:function(){var t={name:this.icon};return!this.iconColor||this.hasError||this.hasWarning||(t.color=this.iconColor),t},insetHasLabel:function(){return["label","full"].includes(this.inset)}},provide:function(){return{__field:this}},methods:{__registerInput:function(t){this.input=t},__unregisterInput:function(t){t&&t!==this.input||(this.input={})},__getBottomContent:function(t){var e;return this.hasError&&(e=this.$slots["error-label"]||this.errorLabel)?t("div",{staticClass:"q-field-error col"},e):this.hasWarning&&(e=this.$slots["warning-label"]||this.warningLabel)?t("div",{staticClass:"q-field-warning col"},e):(e=this.$slots.helper||this.helper)?t("div",{staticClass:"q-field-helper col"},e):t("div",{staticClass:"col"})},__hasBottom:function(){return this.hasError&&(this.$slots["error-label"]||this.errorLabel)||this.hasWarning&&(this.$slots["warning-label"]||this.warningLabel)||this.$slots.helper||this.helper||this.count}},render:function(t){var e=this.$slots.label||this.label;return t("div",{staticClass:"q-field row no-wrap items-start",class:this.classes},[this.icon?t(dt,{props:this.iconProps,staticClass:"q-field-icon q-field-margin"}):this.insetIcon?t("div",{staticClass:"q-field-icon"}):null,t("div",{staticClass:"row col"},[e||this.insetHasLabel?t("div",{staticClass:"q-field-label q-field-margin",class:this.labelClasses},[t("div",{staticClass:"q-field-label-inner row items-center"},[this.$slots.label||this.label])]):null,t("div",{staticClass:"q-field-content",class:this.inputClasses},[this.$slots.default,this.__hasBottom()?t("div",{staticClass:"q-field-bottom row no-wrap"},[this.__getBottomContent(t),this.counter?t("div",{staticClass:"q-field-counter col-auto"},[this.counter]):null]):null])])])}},_s={name:"QInfiniteScroll",props:{handler:{type:Function,required:!0},inline:Boolean,offset:{type:Number,default:0}},data:function(){return{index:0,fetching:!1,working:!0}},methods:{poll:function(){if(!this.fetching&&this.working){var t=j(this.scrollContainer),e=F(this.scrollContainer).top+t;F(this.element).top+j(this.element)-(this.offset||t)<e&&this.loadMore()}},loadMore:function(){var t=this;!this.fetching&&this.working&&(this.index++,this.fetching=!0,this.handler(this.index,function(e){t.fetching=!1,e?t.stop():t.element.closest("body")&&t.poll()}))},reset:function(){this.index=0},resume:function(){this.working=!0,this.scrollContainer.addEventListener("scroll",this.poll,M.passive),this.immediatePoll()},stop:function(){this.working=!1,this.fetching=!1,this.scrollContainer.removeEventListener("scroll",this.poll,M.passive)}},mounted:function(){var t=this;this.$nextTick(function(){t.element=t.$refs.content,t.scrollContainer=t.inline?t.$el:X(t.$el),t.working&&t.scrollContainer.addEventListener("scroll",t.poll,M.passive),t.poll(),t.immediatePoll=t.poll,t.poll=Zi(t.poll,50)})},beforeDestroy:function(){this.scrollContainer.removeEventListener("scroll",this.poll,M.passive)},render:function(t){return t("div",{staticClass:"q-infinite-scroll"},[t("div",{ref:"content",staticClass:"q-infinite-scroll-content"},this.$slots.default),this.fetching?t("div",{staticClass:"q-infinite-scroll-message"},this.$slots.message):null])}},ys={name:"QInnerLoading",props:{dark:Boolean,visible:Boolean,size:{type:[String,Number],default:42},color:String},render:function(t){if(this.visible)return t("div",{staticClass:"q-inner-loading animate-fade absolute-full column flex-center",class:{dark:this.dark}},this.$slots.default||[t(Ut,{props:{size:this.size,color:this.color}})])}},ws={name:"QJumbotron",props:{dark:Boolean,tag:{type:String,default:"div"},imgSrc:String,gradient:String},computed:{gradientType:function(){if(this.gradient)return this.gradient.indexOf("circle")>-1?"radial":"linear"},computedStyle:function(){return this.imgSrc?{"background-image":"url("+this.imgSrc+")"}:this.gradientType?{background:this.gradientType+"-gradient("+this.gradient+")"}:void 0}},render:function(t){return t(this.tag,{staticClass:"q-jumbotron",style:this.computedStyle,class:{"q-jumbotron-dark":this.dark}},this.$slots.default)}},Cs={name:"QKnob",directives:{TouchPan:Ce},props:{value:Number,min:{type:Number,default:0},max:{type:Number,default:100},color:String,trackColor:{type:String,default:"grey-3"},lineWidth:{type:String,default:"6px"},size:{type:String,default:"100px"},step:{type:Number,default:1},decimals:Number,disable:Boolean,readonly:Boolean},computed:{classes:function(){var t=[];return this.disable&&t.push("disabled"),this.readonly||t.push("cursor-pointer"),this.color&&t.push("text-"+this.color),t},svgStyle:function(){return{"stroke-dasharray":"295.31px, 295.31px","stroke-dashoffset":295.31*(this.$q.i18n.rtl?-1:1)*(1-(this.model-this.min)/(this.max-this.min))+"px",transition:this.dragging?"":"stroke-dashoffset 0.6s ease 0s, stroke 0.6s ease"}},editable:function(){return!this.disable&&!this.readonly},computedDecimals:function(){return void 0!==this.decimals?this.decimals||0:(String(this.step).trim("0").split(".")[1]||"").length},computedStep:function(){return void 0!==this.decimals?1/Math.pow(10,this.decimals||0):this.step}},data:function(){return{model:this.value,dragging:!1}},watch:{value:function(t){var e=this;if(t<this.min)this.model=this.min;else{if(!(t>this.max)){var i=this.computedDecimals&&"number"==typeof t?parseFloat(t.toFixed(this.computedDecimals)):t;return void(i!==this.model&&(this.model=i))}this.model=this.max}this.$emit("input",this.model),this.$nextTick(function(){e.model!==e.value&&e.$emit("change",e.model)})}},methods:{__pan:function(t){this.editable&&(t.isFinal?this.__dragStop(t.evt):t.isFirst?this.__dragStart(t.evt):this.__dragMove(t.evt))},__dragStart:function(t){this.editable&&(H(t),this.centerPosition=this.__getCenter(),clearTimeout(this.timer),this.dragging=!0,this.__onInput(t))},__dragMove:function(t){this.dragging&&this.editable&&(H(t),this.__onInput(t,this.centerPosition))},__dragStop:function(t){var e=this;this.editable&&(H(t),this.timer=setTimeout(function(){e.dragging=!1},100),this.__onInput(t,this.centerPosition,!0))},__onKeyDown:function(t){var e=t.keyCode;if(this.editable&&[37,40,39,38].includes(e)){H(t);var i=t.ctrlKey?10*this.computedStep:this.computedStep,s=[37,40].includes(e)?-i:i;this.__onInputValue(Pt(this.model+s,this.min,this.max))}},__onKeyUp:function(t){var e=t.keyCode;this.editable&&[37,40,39,38].includes(e)&&this.__emitChange()},__onInput:function(t,e,i){if(void 0===e&&(e=this.__getCenter()),this.editable){var s=O(t),n=Math.abs(s.top-e.top),o=Math.sqrt(Math.pow(Math.abs(s.top-e.top),2)+Math.pow(Math.abs(s.left-e.left),2)),r=Math.asin(n/o)*(180/Math.PI);r=s.top<e.top?e.left<s.left?90-r:270+r:e.left<s.left?r+90:270-r,this.$q.i18n.rtl&&(r=360-r);var a=this.min+r/360*(this.max-this.min),l=a%this.step,c=Pt(a-l+(Math.abs(l)>=this.step/2?(l<0?-1:1)*this.step:0),this.min,this.max);this.__onInputValue(c,i)}},__onInputValue:function(t,e){this.computedDecimals&&(t=parseFloat(t.toFixed(this.computedDecimals))),this.model!==t&&(this.model=t),this.$emit("drag-value",t),this.value!==t&&(this.$emit("input",t),e&&this.__emitChange(t))},__emitChange:function(t){var e=this;void 0===t&&(t=this.model),this.$nextTick(function(){JSON.stringify(t)!==JSON.stringify(e.value)&&e.$emit("change",t)})},__getCenter:function(){var t=F(this.$el);return{top:t.top+j(this.$el)/2,left:t.left+V(this.$el)/2}}},render:function(t){var e=this;return t("div",{staticClass:"q-knob non-selectable",class:this.classes,style:{width:this.size,height:this.size}},[t("div",{on:{click:function(t){return!e.dragging&&e.__onInput(t,void 0,!0)}},directives:this.editable?[{name:"touch-pan",modifiers:{prevent:!0,stop:!0},value:this.__pan}]:null},[t("svg",{attrs:{viewBox:"0 0 100 100"}},[t("path",{attrs:{d:"M 50,50 m 0,-47 a 47,47 0 1 1 0,94 a 47,47 0 1 1 0,-94","fill-opacity":"0",stroke:"currentColor","stroke-width":this.lineWidth},class:"text-"+this.trackColor}),t("path",{attrs:{d:"M 50,50 m 0,-47 a 47,47 0 1 1 0,94 a 47,47 0 1 1 0,-94","fill-opacity":"0",stroke:"currentColor","stroke-linecap":"round","stroke-width":this.lineWidth},style:this.svgStyle})]),t("div",{staticClass:"q-knob-label row flex-center content-center",attrs:{tabindex:this.editable?0:-1},on:{keydown:this.__onKeyDown,keyup:this.__onKeyUp}},this.$slots.default||[t("span",[this.model])])])])}},xs={name:"QScrollObservable",props:{debounce:Number},render:function(){},data:function(){return{pos:0,dir:"down",dirChanged:!1,dirChangePos:0}},methods:{getPosition:function(){return{position:this.pos,direction:this.dir,directionChanged:this.dirChanged,inflexionPosition:this.dirChangePos}},trigger:function(t){!0===t||0===this.debounce?this.emit():this.timer||(this.timer=this.debounce?setTimeout(this.emit,this.debounce):requestAnimationFrame(this.emit))},emit:function(){var t=Math.max(0,G(this.target)),e=t-this.pos<0?"up":"down";this.dirChanged=this.dir!==e,this.dirChanged&&(this.dir=e,this.dirChangePos=this.pos),this.timer=null,this.pos=t,this.$emit("scroll",this.getPosition())}},mounted:function(){this.target=X(this.$el.parentNode),this.target.addEventListener("scroll",this.trigger,M.passive),this.trigger(!0)},beforeDestroy:function(){clearTimeout(this.timer),cancelAnimationFrame(this.timer),this.target.removeEventListener("scroll",this.trigger,M.passive)}},ks={name:"QLayout",provide:function(){return{layout:this}},props:{container:Boolean,view:{type:String,default:"hhh lpr fff",validator:function(t){return/^(h|l)h(h|r) lpr (f|l)f(f|r)$/.test(t.toLowerCase())}}},data:function(){return{height:n?0:window.innerHeight,width:n||this.container?0:window.innerWidth,containerHeight:0,scrollbarWidth:n?0:it(),header:{size:0,offset:0,space:!1},right:{size:300,offset:0,space:!1},footer:{size:0,offset:0,space:!1},left:{size:300,offset:0,space:!1},scroll:{position:0,direction:"down"}}},computed:{rows:function(){var t=this.view.toLowerCase().split(" ");return{top:t[0].split(""),middle:t[1].split(""),bottom:t[2].split("")}},targetStyle:function(){var t;if(0!==this.scrollbarWidth)return(t={})[this.$q.i18n.rtl?"left":"right"]=this.scrollbarWidth+"px",t},targetChildStyle:function(){var t;if(0!==this.scrollbarWidth)return(t={})[this.$q.i18n.rtl?"right":"left"]=0,t[this.$q.i18n.rtl?"left":"right"]="-"+this.scrollbarWidth+"px",t.width="calc(100% + "+this.scrollbarWidth+"px)",t}},created:function(){this.instances={header:null,right:null,footer:null,left:null}},render:function(t){var e=t("div",{staticClass:"q-layout"},[t(xs,{on:{scroll:this.__onPageScroll}}),t(Wi,{on:{resize:this.__onPageResize}}),this.$slots.default]);return this.container?t("div",{staticClass:"q-layout-container relative-position overflow-hidden"},[t(Wi,{on:{resize:this.__onContainerResize}}),t("div",{staticClass:"absolute-full",style:this.targetStyle},[t("div",{staticClass:"overflow-auto",style:this.targetChildStyle},[e])])]):e},methods:{__animate:function(){var t=this;this.timer?clearTimeout(this.timer):document.body.classList.add("q-layout-animate"),this.timer=setTimeout(function(){document.body.classList.remove("q-layout-animate"),t.timer=null},150)},__onPageScroll:function(t){this.scroll=t,this.$emit("scroll",t)},__onPageResize:function(t){var e=t.height,i=t.width,s=!1;this.height!==e&&(s=!0,this.height=e,this.$emit("scrollHeight",e),this.__updateScrollbarWidth()),this.width!==i&&(s=!0,this.width=i),s&&this.$emit("resize",{height:e,width:i})},__onContainerResize:function(t){var e=t.height;this.containerHeight!==e&&(this.containerHeight=e,this.__updateScrollbarWidth())},__updateScrollbarWidth:function(){if(this.container){var t=this.height>this.containerHeight?it():0;this.scrollbarWidth!==t&&(this.scrollbarWidth=t)}}}},Ss={name:"QLayoutDrawer",inject:{layout:{default:function(){console.error("QLayoutDrawer needs to be child of QLayout")}}},mixins:[L],directives:{TouchPan:Ce},props:{overlay:Boolean,side:{type:String,default:"left",validator:function(t){return["left","right"].includes(t)}},width:{type:Number,default:280},mini:Boolean,miniWidth:{type:Number,default:60},breakpoint:{type:Number,default:992},behavior:{type:String,validator:function(t){return["default","desktop","mobile"].includes(t)},default:"default"},showIfAbove:Boolean,contentStyle:Object,contentClass:[String,Object,Array],noHideOnRouteChange:Boolean,noSwipeOpen:Boolean,noSwipeClose:Boolean},data:function(){var t=this.showIfAbove||void 0===this.value||this.value,e="mobile"!==this.behavior&&this.breakpoint<this.layout.width&&!this.overlay&&t;return void 0!==this.value&&this.value!==e&&this.$emit("input",e),{showing:e,belowBreakpoint:"mobile"===this.behavior||"desktop"!==this.behavior&&this.breakpoint>=this.layout.width,largeScreenState:t,mobileOpened:!1}},watch:{belowBreakpoint:function(t){this.mobileOpened||(t?(this.overlay||(this.largeScreenState=this.showing),this.hide(!1)):this.overlay||this[this.largeScreenState?"show":"hide"](!1))},side:function(t,e){this.layout[e].space=!1,this.layout[e].offset=0},behavior:function(t){this.__updateLocal("belowBreakpoint","mobile"===t||"desktop"!==t&&this.breakpoint>=this.layout.width)},breakpoint:function(t){this.__updateLocal("belowBreakpoint","mobile"===this.behavior||"desktop"!==this.behavior&&t>=this.layout.width)},"layout.width":function(t){this.__updateLocal("belowBreakpoint","mobile"===this.behavior||"desktop"!==this.behavior&&this.breakpoint>=t)},"layout.scrollbarWidth":function(){this.applyPosition(this.showing?0:void 0)},offset:function(t){this.__update("offset",t)},onLayout:function(t){this.$emit("on-layout",t),this.__update("space",t)},$route:function(){this.noHideOnRouteChange||(this.mobileOpened||this.onScreenOverlay)&&this.hide()},rightSide:function(){this.applyPosition()},size:function(t){this.applyPosition(),this.__update("size",t)},"$q.i18n.rtl":function(){this.applyPosition()},mini:function(){this.value&&this.layout.__animate()}},computed:{rightSide:function(){return"right"===this.side},offset:function(){return!this.showing||this.mobileOpened||this.overlay?0:this.size},size:function(){return this.isMini?this.miniWidth:this.width},fixed:function(){return this.overlay||this.layout.view.indexOf(this.rightSide?"R":"L")>-1},onLayout:function(){return this.showing&&!this.mobileView&&!this.overlay},onScreenOverlay:function(){return this.showing&&!this.mobileView&&this.overlay},backdropClass:function(){return{"no-pointer-events":!this.showing||!this.mobileView}},mobileView:function(){return this.belowBreakpoint||this.mobileOpened},headerSlot:function(){return!this.overlay&&(this.rightSide?"r"===this.layout.rows.top[2]:"l"===this.layout.rows.top[0])},footerSlot:function(){return!this.overlay&&(this.rightSide?"r"===this.layout.rows.bottom[2]:"l"===this.layout.rows.bottom[0])},belowClass:function(){return{fixed:!0,"on-top":!0,"q-layout-drawer-delimiter":this.fixed&&this.showing,"q-layout-drawer-mobile":!0,"top-padding":!0}},aboveClass:function(){return{fixed:this.fixed||!this.onLayout,"q-layout-drawer-mini":this.isMini,"q-layout-drawer-normal":!this.isMini,"q-layout-drawer-delimiter":this.fixed&&this.showing,"top-padding":this.headerSlot}},aboveStyle:function(){var t={};return this.layout.header.space&&!this.headerSlot&&(this.fixed?t.top=this.layout.header.offset+"px":this.layout.header.space&&(t.top=this.layout.header.size+"px")),this.layout.footer.space&&!this.footerSlot&&(this.fixed?t.bottom=this.layout.footer.offset+"px":this.layout.footer.space&&(t.bottom=this.layout.footer.size+"px")),t},computedStyle:function(){return[this.contentStyle,{width:this.size+"px"},this.mobileView?"":this.aboveStyle]},computedClass:function(){return["q-layout-drawer-"+this.side,this.layout.container?"overflow-auto":"scroll",this.contentClass,this.mobileView?this.belowClass:this.aboveClass]},stateDirection:function(){return(this.$q.i18n.rtl?-1:1)*(this.rightSide?1:-1)},isMini:function(){return this.mini&&!this.mobileView},onNativeEvents:function(){var t=this;if(!this.mobileView)return{"!click":function(e){t.$emit("click",e)},mouseover:function(e){t.$emit("mouseover",e)},mouseout:function(e){t.$emit("mouseout",e)}}}},methods:{applyPosition:function(t){var e=this;void 0===t?this.$nextTick(function(){t=e.showing?0:e.size,e.applyPosition(e.stateDirection*t)}):this.$refs.content&&(this.layout.container&&this.rightSide&&(this.mobileView||Math.abs(t)===this.size)&&(t+=this.stateDirection*this.layout.scrollbarWidth),W(this.$refs.content,U("translateX("+t+"px)")))},applyBackdrop:function(t){this.$refs.backdrop&&W(this.$refs.backdrop,{backgroundColor:"rgba(0,0,0,"+.4*t+")"})},__setScrollable:function(t){this.layout.container||document.body.classList[t?"add":"remove"]("q-body-drawer-toggle")},__openByTouch:function(t){if(this.belowBreakpoint){var e=this.size,i=Pt(t.distance.x,0,e);if(t.isFinal){var s=this.$refs.content,n=i>=Math.min(75,e);return s.classList.remove("no-transition"),void(n?this.show():(this.layout.__animate(),this.applyBackdrop(0),this.applyPosition(this.stateDirection*e),s.classList.remove("q-layout-drawer-delimiter")))}if(this.applyPosition((this.$q.i18n.rtl?!this.rightSide:this.rightSide)?Math.max(e-i,0):Math.min(0,i-e)),this.applyBackdrop(Pt(i/e,0,1)),t.isFirst){var o=this.$refs.content;o.classList.add("no-transition"),o.classList.add("q-layout-drawer-delimiter")}}},__closeByTouch:function(t){if(this.mobileOpened){var e=this.size,i=t.direction===this.side,s=(this.$q.i18n.rtl?!i:i)?Pt(t.distance.x,0,e):0;if(t.isFinal){var n=Math.abs(s)<Math.min(75,e);return this.$refs.content.classList.remove("no-transition"),void(n?(this.layout.__animate(),this.applyBackdrop(1),this.applyPosition(0)):this.hide())}this.applyPosition(this.stateDirection*s),this.applyBackdrop(Pt(1-s/e,0,1)),t.isFirst&&this.$refs.content.classList.add("no-transition")}},__show:function(t){var e=this;void 0===t&&(t=!0),t&&this.layout.__animate(),this.applyPosition(0);var i=this.layout.instances[this.rightSide?"left":"right"];i&&i.mobileOpened&&i.hide(),this.belowBreakpoint?(this.mobileOpened=!0,this.applyBackdrop(1),this.layout.container||(this.preventedScroll=!0,at(!0))):(console.log("set scrollable"),this.__setScrollable(!0)),clearTimeout(this.timer),this.timer=setTimeout(function(){e.showPromise&&(e.showPromise.then(function(){e.__setScrollable(!1)}),e.showPromiseResolve())},150)},__hide:function(t){var e=this;void 0===t&&(t=!0),t&&this.layout.__animate(),this.mobileOpened&&(this.mobileOpened=!1),this.applyPosition(this.stateDirection*this.size),this.applyBackdrop(0),this.__cleanup(),clearTimeout(this.timer),this.timer=setTimeout(function(){e.hidePromise&&e.hidePromiseResolve()},150)},__cleanup:function(){this.preventedScroll&&(this.preventedScroll=!1,at(!1)),this.__setScrollable(!1)},__update:function(t,e){this.layout[this.side][t]!==e&&(this.layout[this.side][t]=e)},__updateLocal:function(t,e){this[t]!==e&&(this[t]=e)}},created:function(){this.layout.instances[this.side]=this,this.__update("size",this.size),this.__update("space",this.onLayout),this.__update("offset",this.offset)},mounted:function(){this.applyPosition(this.showing?0:void 0)},beforeDestroy:function(){clearTimeout(this.timer),this.showing&&this.__cleanup(),this.layout.instances[this.side]===this&&(this.layout.instances[this.side]=null,this.__update("size",0),this.__update("offset",0),this.__update("space",!1))},render:function(t){return t("div",{staticClass:"q-drawer-container"},[this.mobileView&&!this.noSwipeOpen?t("div",{staticClass:"q-layout-drawer-opener fixed-"+this.side,directives:[{name:"touch-pan",modifiers:{horizontal:!0},value:this.__openByTouch}]}):null,t("div",{ref:"backdrop",staticClass:"fullscreen q-layout-backdrop q-layout-transition",class:this.backdropClass,on:{click:this.hide},directives:[{name:"touch-pan",modifiers:{horizontal:!0},value:this.__closeByTouch}]})].concat([t("aside",{ref:"content",staticClass:"q-layout-drawer q-layout-transition",class:this.computedClass,style:this.computedStyle,attrs:this.$attrs,on:this.onNativeEvents,directives:this.mobileView&&!this.noSwipeClose?[{name:"touch-pan",modifiers:{horizontal:!0},value:this.__closeByTouch}]:null},this.isMini&&this.$slots.mini?[this.$slots.mini]:this.$slots.default)]))}},qs={name:"QWindowResizeObservable",props:{debounce:{type:Number,default:80}},render:function(){},methods:{trigger:function(){0===this.debounce?this.emit():this.timer||(this.timer=setTimeout(this.emit,this.debounce))},emit:function(t){this.timer=null,this.$emit("resize",{height:t?0:window.innerHeight,width:t?0:window.innerWidth})}},created:function(){this.emit(n)},mounted:function(){s&&this.emit(),window.addEventListener("resize",this.trigger,M.passive)},beforeDestroy:function(){clearTimeout(this.timer),window.removeEventListener("resize",this.trigger,M.passive)}},$s={name:"QLayoutFooter",mixins:[re],inject:{layout:{default:function(){console.error("QLayoutFooter needs to be child of QLayout")}}},props:{value:{type:Boolean,default:!0},reveal:Boolean},data:function(){return{size:0,revealed:!0,windowHeight:n||this.layout.container?0:window.innerHeight}},watch:{value:function(t){this.__update("space",t),this.__updateLocal("revealed",!0),this.layout.__animate()},offset:function(t){this.__update("offset",t)},reveal:function(t){t||this.__updateLocal("revealed",this.value)},revealed:function(t){this.layout.__animate(),this.$emit("reveal",t)},"layout.scroll":function(){this.__updateRevealed()},"layout.height":function(){this.__updateRevealed()},size:function(){this.__updateRevealed()}},computed:{fixed:function(){return this.reveal||this.layout.view.indexOf("F")>-1||this.layout.container},containerHeight:function(){return this.layout.container?this.layout.containerHeight:this.windowHeight},offset:function(){if(!this.canRender||!this.value)return 0;if(this.fixed)return this.revealed?this.size:0;var t=this.layout.scroll.position+this.containerHeight+this.size-this.layout.height;return t>0?t:0},computedClass:function(){return{"fixed-bottom":this.fixed,"absolute-bottom":!this.fixed,hidden:!this.value&&!this.fixed,"q-layout-footer-hidden":!this.canRender||!this.value||this.fixed&&!this.revealed}},computedStyle:function(){var t=this.layout.rows.bottom,e={};return"l"===t[0]&&this.layout.left.space&&(e[this.$q.i18n.rtl?"right":"left"]=this.layout.left.size+"px"),"r"===t[2]&&this.layout.right.space&&(e[this.$q.i18n.rtl?"left":"right"]=this.layout.right.size+"px"),e}},render:function(t){return t("footer",{staticClass:"q-layout-footer q-layout-marginal q-layout-transition",class:this.computedClass,style:this.computedStyle},[t(Wi,{props:{debounce:0},on:{resize:this.__onResize}}),!this.layout.container&&t(qs,{props:{debounce:0},on:{resize:this.__onWindowResize}})||void 0,this.$slots.default])},created:function(){this.layout.instances.footer=this,this.__update("space",this.value),this.__update("offset",this.offset)},beforeDestroy:function(){this.layout.instances.footer===this&&(this.layout.instances.footer=null,this.__update("size",0),this.__update("offset",0),this.__update("space",!1))},methods:{__onResize:function(t){var e=t.height;this.__updateLocal("size",e),this.__update("size",e)},__onWindowResize:function(t){var e=t.height;this.__updateLocal("windowHeight",e)},__update:function(t,e){this.layout.footer[t]!==e&&(this.layout.footer[t]=e)},__updateLocal:function(t,e){this[t]!==e&&(this[t]=e)},__updateRevealed:function(){if(this.reveal){var t=this.layout.scroll,e=t.direction,i=t.position,s=t.inflexionPosition;this.__updateLocal("revealed","up"===e||i-s<100||this.layout.height-this.containerHeight-i-this.size<300)}}}},Ts={name:"QLayoutHeader",mixins:[re],inject:{layout:{default:function(){console.error("QLayoutHeader needs to be child of QLayout")}}},props:{value:{type:Boolean,default:!0},reveal:Boolean,revealOffset:{type:Number,default:250}},data:function(){return{size:0,revealed:!0}},watch:{value:function(t){this.__update("space",t),this.__updateLocal("revealed",!0),this.layout.__animate()},offset:function(t){this.__update("offset",t)},reveal:function(t){t||this.__updateLocal("revealed",this.value)},revealed:function(t){this.layout.__animate(),this.$emit("reveal",t)},"layout.scroll":function(t){this.reveal&&this.__updateLocal("revealed","up"===t.direction||t.position<=this.revealOffset||t.position-t.inflexionPosition<100)}},computed:{fixed:function(){return this.reveal||this.layout.view.indexOf("H")>-1||this.layout.container},offset:function(){if(!this.canRender||!this.value)return 0;if(this.fixed)return this.revealed?this.size:0;var t=this.size-this.layout.scroll.position;return t>0?t:0},computedClass:function(){return{"fixed-top":this.fixed,"absolute-top":!this.fixed,"q-layout-header-hidden":!this.canRender||!this.value||this.fixed&&!this.revealed}},computedStyle:function(){var t=this.layout.rows.top,e={};return"l"===t[0]&&this.layout.left.space&&(e[this.$q.i18n.rtl?"right":"left"]=this.layout.left.size+"px"),"r"===t[2]&&this.layout.right.space&&(e[this.$q.i18n.rtl?"left":"right"]=this.layout.right.size+"px"),e}},render:function(t){return t("header",{staticClass:"q-layout-header q-layout-marginal q-layout-transition",class:this.computedClass,style:this.computedStyle},[t(Wi,{props:{debounce:0},on:{resize:this.__onResize}}),this.$slots.default])},created:function(){this.layout.instances.header=this,this.__update("space",this.value),this.__update("offset",this.offset)},beforeDestroy:function(){this.layout.instances.header===this&&(this.layout.instances.header=null,this.__update("size",0),this.__update("offset",0),this.__update("space",!1))},methods:{__onResize:function(t){var e=t.height;this.__updateLocal("size",e),this.__update("size",e)},__update:function(t,e){this.layout.header[t]!==e&&(this.layout.header[t]=e)},__updateLocal:function(t,e){this[t]!==e&&(this[t]=e)}}},Ps={name:"QPage",inject:{pageContainer:{default:function(){console.error("QPage needs to be child of QPageContainer")}},layout:{}},props:{padding:Boolean,styleFn:Function},computed:{style:function(){var t=(this.layout.header.space?this.layout.header.size:0)+(this.layout.footer.space?this.layout.footer.size:0);return"function"==typeof this.styleFn?this.styleFn(t):{minHeight:this.layout.container?this.layout.containerHeight-t+"px":t?"calc(100vh - "+t+"px)":"100vh"}},classes:function(){if(this.padding)return"layout-padding"}},render:function(t){return t("main",{staticClass:"q-layout-page",style:this.style,class:this.classes},this.$slots.default)}},Ls={name:"QPageContainer",inject:{layout:{default:function(){console.error("QPageContainer needs to be child of QLayout")}}},provide:{pageContainer:!0},computed:{style:function(){var t={};return this.layout.header.space&&(t.paddingTop=this.layout.header.size+"px"),this.layout.right.space&&(t["padding"+(this.$q.i18n.rtl?"Left":"Right")]=this.layout.right.size+"px"),this.layout.footer.space&&(t.paddingBottom=this.layout.footer.size+"px"),this.layout.left.space&&(t["padding"+(this.$q.i18n.rtl?"Right":"Left")]=this.layout.left.size+"px"),t}},render:function(t){return t("div",{staticClass:"q-layout-page-container q-layout-transition",style:this.style},this.$slots.default)}},Ms={name:"QPageSticky",inject:{layout:{default:function(){console.error("QPageSticky needs to be child of QLayout")}}},props:{position:{type:String,default:"bottom-right",validator:function(t){return["top-right","top-left","bottom-right","bottom-left","top","right","bottom","left"].includes(t)}},offset:{type:Array,validator:function(t){return 2===t.length}},expand:Boolean},computed:{attach:function(){var t=this.position;return{top:t.indexOf("top")>-1,right:t.indexOf("right")>-1,bottom:t.indexOf("bottom")>-1,left:t.indexOf("left")>-1,vertical:"top"===t||"bottom"===t,horizontal:"left"===t||"right"===t}},top:function(){return this.layout.header.offset},right:function(){return this.layout.right.offset},bottom:function(){return this.layout.footer.offset},left:function(){return this.layout.left.offset},computedStyle:function(){var t=this.attach,e=[],i=this.$q.i18n.rtl?-1:1;t.top&&this.top?e.push("translateY("+this.top+"px)"):t.bottom&&this.bottom&&e.push("translateY("+-this.bottom+"px)"),t.left&&this.left?e.push("translateX("+i*this.left+"px)"):t.right&&this.right&&e.push("translateX("+-i*this.right+"px)");var s=e.length?U(e.join(" ")):{};return this.offset&&(s.margin=this.offset[1]+"px "+this.offset[0]+"px"),t.vertical?(this.left&&(s[this.$q.i18n.rtl?"right":"left"]=this.left+"px"),this.right&&(s[this.$q.i18n.rtl?"left":"right"]=this.right+"px")):t.horizontal&&(this.top&&(s.top=this.top+"px"),this.bottom&&(s.bottom=this.bottom+"px")),s},classes:function(){return["fixed-"+this.position,"q-page-sticky-"+(this.expand?"expand":"shrink")]}},render:function(t){return t("div",{staticClass:"q-page-sticky q-layout-transition row flex-center",class:this.classes,style:this.computedStyle},this.expand?this.$slots.default:[t("span",this.$slots.default)])}},Bs={name:"QListHeader",props:{inset:Boolean},render:function(t){return t("div",{staticClass:"q-list-header",class:{"q-list-header-inset":this.inset}},this.$slots.default)}},Es={name:"QModalLayout",inject:{__qmodal:{default:function(){console.error("QModalLayout needs to be child of QModal")}}},props:{headerStyle:[String,Object,Array],headerClass:[String,Object,Array],contentStyle:[String,Object,Array],contentClass:[String,Object,Array],footerStyle:[String,Object,Array],footerClass:[String,Object,Array]},watch:{__qmodal:function(t,e){e&&e.unregister(this),t&&t.register(this)}},mounted:function(){this.__qmodal&&this.__qmodal.register(this)},beforeDestroy:function(){this.__qmodal&&this.__qmodal.unregister(this)},render:function(t){var e=[];return this.$slots.header&&e.push(t("div",{staticClass:"q-layout-header",style:this.headerStyle,class:this.headerClass},[this.$slots.header,null])),e.push(t("div",{staticClass:"q-modal-layout-content col scroll",style:this.contentStyle,class:this.contentClass},this.$slots.default)),(this.$slots.footer||this.$slots.navigation)&&e.push(t("div",{staticClass:"q-layout-footer",style:this.footerStyle,class:this.footerClass},[this.$slots.footer,this.$slots.navigation])),t("div",{staticClass:"q-modal-layout col column no-wrap"},e)}},Os={name:"QNoSsr",mixins:[re],props:{tag:{type:String,default:"div"},placeholder:String},render:function(t){if(this.canRender){var e=this.$slots.default;return e&&e.length>1?t(this.tag,e):e?e[0]:null}if(this.$slots.placeholder){var i=this.$slots.placeholder;return i&&i.length>1?t(this.tag,{staticClass:"q-no-ssr-placeholder"},i):i?i[0]:null}if(this.placeholder)return t(this.tag,{staticClass:"q-no-ssr-placeholder"},[this.placeholder])}},Ns={name:"QPagination",props:{value:{type:Number,required:!0},min:{type:Number,default:1},max:{type:Number,required:!0},color:{type:String,default:"primary"},textColor:String,size:String,disable:Boolean,input:Boolean,boundaryLinks:{type:Boolean,default:null},boundaryNumbers:{type:Boolean,default:null},directionLinks:{type:Boolean,default:null},ellipses:{type:Boolean,default:null},maxPages:{type:Number,default:0,validator:function(t){return!(t<0)||(console.error("maxPages should not be negative"),!1)}}},data:function(){return{newPage:null}},watch:{min:function(t){this.model=this.value},max:function(t){this.model=this.value}},computed:{model:{get:function(){return this.value},set:function(t){var e=this;if(!this.disable&&t&&!isNaN(t)){var i=Pt(parseInt(t,10),this.min,this.max);this.$emit("input",i),this.$nextTick(function(){JSON.stringify(i)!==JSON.stringify(e.value)&&e.$emit("change",i)})}}},inputPlaceholder:function(){return this.model+" / "+this.max},__boundaryLinks:function(){return this.__getBool(this.boundaryLinks,this.input)},__boundaryNumbers:function(){return this.__getBool(this.boundaryNumbers,!this.input)},__directionLinks:function(){return this.__getBool(this.directionLinks,this.input)},__ellipses:function(){return this.__getBool(this.ellipses,!this.input)},icons:function(){var t=[this.$q.icon.pagination.first,this.$q.icon.pagination.prev,this.$q.icon.pagination.next,this.$q.icon.pagination.last];return this.$q.i18n.rtl?t.reverse():t}},methods:{set:function(t){this.model=t},setByOffset:function(t){this.model=this.model+t},__update:function(){this.model=this.newPage,this.newPage=null},__getBool:function(t,e){return[!0,!1].includes(t)?t:e},__getBtn:function(t,e,i){return e.props=Object.assign({color:this.color,flat:!0,size:this.size},i),t(Yt,e)}},render:function(t){var e=this,i=[],s=[],n=[];if(this.__boundaryLinks&&(i.push(this.__getBtn(t,{key:"bls",on:{click:function(){return e.set(e.min)}}},{disable:this.disable||this.value<=this.min,icon:this.icons[0]})),s.unshift(this.__getBtn(t,{key:"ble",on:{click:function(){return e.set(e.max)}}},{disable:this.disable||this.value>=this.max,icon:this.icons[3]}))),this.__directionLinks&&(i.push(this.__getBtn(t,{key:"bdp",on:{click:function(){return e.setByOffset(-1)}}},{disable:this.disable||this.value<=this.min,icon:this.icons[1]})),s.unshift(this.__getBtn(t,{key:"bdn",on:{click:function(){return e.setByOffset(1)}}},{disable:this.disable||this.value>=this.max,icon:this.icons[2]}))),this.input)n.push(t(Ki,{staticClass:"inline no-padding",style:{width:this.inputPlaceholder.length+"rem"},props:{type:"number",value:this.newPage,noNumberToggle:!0,min:this.min,max:this.max,color:this.color,placeholder:this.inputPlaceholder,disable:this.disable,hideUnderline:!0},on:{input:function(t){return e.newPage=t},keydown:function(t){return 13===E(t)&&e.__update()},blur:function(){return e.__update()}}}));else{var o=Math.max(this.maxPages,1+(this.__ellipses?2:0)+(this.__boundaryNumbers?2:0)),r=this.min,a=this.max,l=!1,c=!1,h=!1,u=!1;this.maxPages&&o<this.max-this.min+1&&(o=1+2*Math.floor(o/2),r=Math.max(this.min,Math.min(this.max-o+1,this.value-Math.floor(o/2))),a=Math.min(this.max,r+o-1),this.__boundaryNumbers&&(h=!0,r+=1),this.__ellipses&&r>this.min+(this.__boundaryNumbers?1:0)&&(l=!0,r+=1),this.__boundaryNumbers&&(u=!0,a-=1),this.__ellipses&&a<this.max-(this.__boundaryNumbers?1:0)&&(c=!0,a-=1));var d={minWidth:Math.max(2,String(this.max).length)+"em"};if(h){var p=this.min===this.value;i.push(this.__getBtn(t,{key:"bns",style:d,on:{click:function(){return e.set(e.min)}}},{disable:this.disable,flat:!p,textColor:p?this.textColor:null,label:this.min,noRipple:!0}))}if(u){var f=this.max===this.value;s.unshift(this.__getBtn(t,{key:"bne",style:d,on:{click:function(){return e.set(e.max)}}},{disable:this.disable,flat:!f,textColor:f?this.textColor:null,label:this.max,noRipple:!0}))}l&&i.push(this.__getBtn(t,{key:"bes",style:d,on:{click:function(){return e.set(r-1)}}},{disable:this.disable,label:"…"})),c&&s.unshift(this.__getBtn(t,{key:"bee",style:d,on:{click:function(){return e.set(a+1)}}},{disable:this.disable,label:"…"}));for(var m=function(i){var s=i===e.value;n.push(e.__getBtn(t,{key:"bpg"+i,style:d,on:{click:function(){return e.set(i)}}},{disable:e.disable,flat:!s,textColor:s?e.textColor:null,label:i,noRipple:!0}))},g=r;g<=a;g++)m(g)}return t("div",{staticClass:"q-pagination row no-wrap items-center",class:{disabled:this.disable}},[i,t("div",{staticClass:"row justify-center"},[n]),s])}},zs={name:"QParallax",props:{src:String,height:{type:Number,default:500},speed:{type:Number,default:1,validator:function(t){return t>=0&&t<=1}}},data:function(){return{scrolling:!1}},watch:{height:function(){this.__updatePos()}},methods:{__onResize:function(){this.scrollTarget&&(this.mediaHeight=this.media.naturalHeight||j(this.media),this.__updatePos())},__updatePos:function(){var t,e,i,s;if(this.scrollTarget===window?(t=0,i=e=window.innerHeight):i=(t=F(this.scrollTarget).top)+(e=j(this.scrollTarget)),(s=F(this.$el).top)+this.height>t&&s<i){var n=(i-s)/(this.height+e);this.__setPos((this.mediaHeight-this.height)*n*this.speed)}},__setPos:function(t){W(this.media,U("translate3D(-50%,"+t+"px, 0)"))}},render:function(t){return t("div",{staticClass:"q-parallax",style:{height:this.height+"px"}},[t("div",{staticClass:"q-parallax-media absolute-full"},[this.$slots.media||t("img",{ref:"media",attrs:{src:this.src}})]),t("div",{staticClass:"q-parallax-text absolute-full column flex-center no-pointer-events"},this.$slots.default)])},beforeMount:function(){this.__setPos=oe(this.__setPos)},mounted:function(){var t=this;this.$nextTick(function(){t.media=t.$slots.media?t.$slots.media[0].elm:t.$refs.media,t.media.onload=t.media.onloadstart=t.__onResize,t.scrollTarget=X(t.$el),t.resizeHandler=Zi(t.__onResize,50),window.addEventListener("resize",t.resizeHandler,M.passive),t.scrollTarget.addEventListener("scroll",t.__updatePos,M.passive),t.__onResize()})},beforeDestroy:function(){window.removeEventListener("resize",this.resizeHandler,M.passive),this.scrollTarget.removeEventListener("scroll",this.__updatePos,M.passive),this.media.onload=this.media.onloadstart=null}},Ds={name:"QPopupEdit",props:{value:{},persistent:Boolean,title:String,buttons:Boolean,labelSet:String,labelCancel:String,color:{type:String,default:"primary"},validate:{type:Function,default:function(){return!0}}},data:function(){return{initialValue:""}},watch:{value:function(){var t=this;this.$nextTick(function(){t.$refs.popover.reposition()})}},methods:{cancel:function(){this.__hasChanged()&&(this.$emit("cancel",this.value,this.initialValue),this.$emit("input",this.initialValue)),this.$nextTick(this.__close)},set:function(){this.__hasChanged()&&this.validate(this.value)&&this.$emit("save",this.value),this.__close()},__hasChanged:function(){return JSON.stringify(this.value)!==JSON.stringify(this.initialValue)},__close:function(){this.validated=!0,this.$refs.popover.hide()},__getContent:function(t){var e=this.$slots.title||this.title;return[e&&t("div",{staticClass:"q-title q-mt-sm q-mb-sm"},[e])||void 0].concat(this.$slots.default).concat([this.buttons&&t("div",{staticClass:"row justify-center no-wrap q-mt-sm"},[t(Yt,{props:{flat:!0,color:this.color,label:this.labelCancel||this.$q.i18n.label.cancel},on:{click:this.cancel}}),t(Yt,{staticClass:"q-ml-sm",props:{flat:!0,color:this.color,label:this.labelSet||this.$q.i18n.label.set},on:{click:this.set}})])||void 0])}},render:function(t){var e=this;return t(ae,{staticClass:"q-table-edit q-px-md q-py-sm",ref:"popover",props:{cover:!0,persistent:this.persistent},on:{show:function(){var t=e.$el.querySelector(".q-input-target, input");t&&t.focus(),e.$emit("show"),e.initialValue=ci(e.value),e.validated=!1},hide:function(){e.validated||(e.__hasChanged()&&(e.validate(e.value)?e.$emit("save",e.value):(e.$emit("cancel",e.value,e.initialValue),e.$emit("input",e.initialValue))),e.$emit("hide"))}},nativeOn:{keydown:function(t){13===E(t)&&e.$refs.popover.hide()}}},this.__getContent(t))}};function Rs(t){return{width:t+"%"}}var Is={name:"QProgress",props:{percentage:{type:Number,default:0},color:{type:String,default:"primary"},stripe:Boolean,animate:Boolean,indeterminate:Boolean,buffer:Number,height:{type:String,default:"4px"}},computed:{model:function(){return Pt(this.percentage,0,100)},bufferModel:function(){return Pt(this.buffer||0,0,100-this.model)},bufferStyle:function(){return Rs(this.bufferModel)},trackStyle:function(){return Rs(this.buffer?100-this.buffer:100)},computedClass:function(){return"text-"+this.color},computedStyle:function(){return{height:this.height}},modelClass:function(){return{animate:this.animate,stripe:this.stripe,indeterminate:this.indeterminate}},modelStyle:function(){return Rs(this.model)}},render:function(t){return t("div",{staticClass:"q-progress",style:this.computedStyle,class:this.computedClass},[this.buffer&&!this.indeterminate?t("div",{staticClass:"q-progress-buffer",style:this.bufferStyle}):null,t("div",{staticClass:"q-progress-track",style:this.trackStyle}),t("div",{staticClass:"q-progress-model",style:this.modelStyle,class:this.modelClass})])}},Hs={name:"QPullToRefresh",directives:{TouchPan:Ce},props:{handler:{type:Function,required:!0},color:{type:String,default:"primary"},distance:{type:Number,default:35},pullMessage:String,releaseMessage:String,refreshMessage:String,refreshIcon:String,inline:Boolean,disable:Boolean},data:function(){return{state:"pull",pullPosition:-65,animating:!1,pulling:!1,scrolling:!1}},watch:{inline:function(t){this.setScrollContainer(t)}},computed:{message:function(){switch(this.state){case"pulled":return this.releaseMessage||this.$q.i18n.pullToRefresh.release;case"refreshing":return this.refreshMessage||this.$q.i18n.pullToRefresh.refresh;case"pull":default:return this.pullMessage||this.$q.i18n.pullToRefresh.pull}},style:function(){var t=U("translateY("+this.pullPosition+"px)");return t.marginBottom="-65px",t},messageClass:function(){return"text-"+this.color}},methods:{__pull:function(t){if(!this.disable){if(t.isFinal)return this.scrolling=!1,this.pulling=!1,void("pulled"===this.state?(this.state="refreshing",this.__animateTo(0),this.trigger()):"pull"===this.state&&this.__animateTo(-65));if(this.animating||this.scrolling||"refreshing"===this.state)return!0;var e=G(this.scrollContainer);if(0!==e||0===e&&"down"!==t.direction)return this.scrolling=!0,this.pulling&&(this.pulling=!1,this.state="pull",this.__animateTo(-65)),!0;t.evt.preventDefault(),this.pulling=!0,this.pullPosition=-65+Math.max(0,Math.pow(t.distance.y,.85)),this.state=this.pullPosition>this.distance?"pulled":"pull"}},__animateTo:function(t,e,i){var s=this;!i&&this.animationId&&cancelAnimationFrame(this.animating),this.pullPosition-=(this.pullPosition-t)/7,this.pullPosition-t>1?this.animating=requestAnimationFrame(function(){s.__animateTo(t,e,!0)}):this.animating=requestAnimationFrame(function(){s.pullPosition=t,s.animating=!1,e&&e()})},trigger:function(){var t=this;this.handler(function(){t.__animateTo(-65,function(){t.state="pull"})})},setScrollContainer:function(t){var e=this;this.$nextTick(function(){e.scrollContainer=t?e.$el.parentNode:X(e.$el)})}},mounted:function(){this.setScrollContainer(this.inline)},render:function(t){return t("div",{staticClass:"pull-to-refresh overflow-hidden-y"},[t("div",{staticClass:"pull-to-refresh-container",style:this.style,directives:this.disable?null:[{name:"touch-pan",modifiers:{vertical:!0,mightPrevent:!0},value:this.__pull}]},[t("div",{staticClass:"pull-to-refresh-message row flex-center",class:this.messageClass},[t(dt,{class:{"rotate-180":"pulled"===this.state},props:{name:this.$q.icon.pullToRefresh.arrow},directives:[{name:"show",value:"refreshing"!==this.state}]}),t(dt,{staticClass:"animate-spin",props:{name:this.refreshIcon||this.$q.icon.pullToRefresh.refresh},directives:[{name:"show",value:"refreshing"===this.state}]})," "+this.message]),this.$slots.default])])}},As=0,Fs=1,Qs=2,js={name:"QRange",mixins:[ri],props:{value:{type:Object,default:function(){return{min:0,max:0}},validator:function(t){return t.hasOwnProperty("min")&&t.hasOwnProperty("max")}},dragRange:Boolean,dragOnlyRange:Boolean,leftLabelColor:String,leftLabelValue:String,rightLabelColor:String,rightLabelValue:String},data:function(){return{model:Object.assign({},this.value),dragging:!1,currentMinPercentage:(this.value.min-this.min)/(this.max-this.min),currentMaxPercentage:(this.value.max-this.min)/(this.max-this.min)}},computed:{percentageMin:function(){return this.snap?(this.model.min-this.min)/(this.max-this.min):this.currentMinPercentage},percentageMax:function(){return this.snap?(this.model.max-this.min)/(this.max-this.min):this.currentMaxPercentage},activeTrackWidth:function(){return 100*(this.percentageMax-this.percentageMin)+"%"},leftDisplayValue:function(){return void 0!==this.leftLabelValue?this.leftLabelValue:this.model.min},rightDisplayValue:function(){return void 0!==this.rightLabelValue?this.rightLabelValue:this.model.max},leftTooltipColor:function(){return this.leftLabelColor||this.labelColor},rightTooltipColor:function(){return this.rightLabelColor||this.labelColor}},watch:{"value.min":function(t){this.model.min=t},"value.max":function(t){this.model.max=t},"model.min":function(t){this.dragging||(t>this.model.max&&(t=this.model.max),this.currentMinPercentage=(t-this.min)/(this.max-this.min))},"model.max":function(t){this.dragging||(t<this.model.min&&(t=this.model.min),this.currentMaxPercentage=(t-this.min)/(this.max-this.min))},min:function(t){this.model.min<t&&this.__update({min:t}),this.model.max<t&&this.__update({max:t}),this.$nextTick(this.__validateProps)},max:function(t){this.model.min>t&&this.__update({min:t}),this.model.max>t&&this.__update({max:t}),this.$nextTick(this.__validateProps)},step:function(){this.$nextTick(this.__validateProps)}},methods:{__getDragging:function(t){var e,i=this.$refs.handle,s=i.offsetWidth,n=(this.dragOnlyRange?-1:1)*this.$refs.handleMin.offsetWidth/(2*s),o={left:i.getBoundingClientRect().left,width:s,valueMin:this.model.min,valueMax:this.model.max,percentageMin:this.currentMinPercentage,percentageMax:this.currentMaxPercentage},r=si(t,o,this.$q.i18n.rtl);return r<this.currentMinPercentage+n?e=As:r<this.currentMaxPercentage-n?this.dragRange||this.dragOnlyRange?(e=Fs,Object.assign(o,{offsetPercentage:r,offsetModel:oi(r,this.min,this.max,this.step,this.computedDecimals),rangeValue:o.valueMax-o.valueMin,rangePercentage:this.currentMaxPercentage-this.currentMinPercentage})):e=this.currentMaxPercentage-r<r-this.currentMinPercentage?Qs:As:e=Qs,(!this.dragOnlyRange||e===Fs)&&(o.type=e,o)},__move:function(t,e){void 0===e&&(e=this.dragging);var i,s=si(t,e,this.$q.i18n.rtl),n=oi(s,this.min,this.max,this.step,this.computedDecimals);switch(e.type){case As:i=s<=e.percentageMax?{minP:s,maxP:e.percentageMax,min:n,max:e.valueMax}:{minP:e.percentageMax,maxP:s,min:e.valueMax,max:n};break;case Qs:i=s>=e.percentageMin?{minP:e.percentageMin,maxP:s,min:e.valueMin,max:n}:{minP:s,maxP:e.percentageMin,min:n,max:e.valueMin};break;case Fs:var o=s-e.offsetPercentage,r=Pt(e.percentageMin+o,0,1-e.rangePercentage),a=n-e.offsetModel,l=Pt(e.valueMin+a,this.min,this.max-e.rangeValue);i={minP:r,maxP:r+e.rangePercentage,min:parseFloat(l.toFixed(this.computedDecimals)),max:parseFloat((l+e.rangeValue).toFixed(this.computedDecimals))}}this.currentMinPercentage=i.minP,this.currentMaxPercentage=i.maxP,this.model={min:i.min,max:i.max}},__end:function(t,e){void 0===e&&(e=this.dragging),this.__move(t,e),this.currentMinPercentage=(this.model.min-this.min)/(this.max-this.min),this.currentMaxPercentage=(this.model.max-this.min)/(this.max-this.min)},__onKeyDown:function(t,e){var i=t.keyCode;if(this.editable&&[37,40,39,38].includes(i)){H(t);var s=this.computedDecimals,n=t.ctrlKey?10*this.computedStep:this.computedStep,o=[37,40].includes(i)?-n:n,r=s?parseFloat((this.model[e]+o).toFixed(s)):this.model[e]+o;this.model[e]=Pt(r,"min"===e?this.min:this.model.min,"max"===e?this.max:this.model.max),this.currentMinPercentage=(this.model.min-this.min)/(this.max-this.min),this.currentMaxPercentage=(this.model.max-this.min)/(this.max-this.min),this.__update()}},__onKeyUp:function(t,e){var i=t.keyCode;this.editable&&[37,40,39,38].includes(i)&&this.__update(!0)},__validateProps:function(){this.min>=this.max?console.error("Range error: min >= max",this.$el,this.min,this.max):ni((this.max-this.min)/this.step,this.computedDecimals)?console.error("Range error: step must be a divisor of max - min",this.min,this.max,this.step):ni((this.model.min-this.min)/this.step,this.computedDecimals)?console.error("Range error: step must be a divisor of initial value.min - min",this.model.min,this.min,this.step):ni((this.model.max-this.min)/this.step,this.computedDecimals)&&console.error("Range error: step must be a divisor of initial value.max - min",this.model.max,this.max,this.step)},__getHandle:function(t,e,i,s,n,o,r){var a,l=this;return t("div",{ref:"handle"+i,staticClass:"q-slider-handle q-slider-handle-"+e,style:(a={},a[this.$q.i18n.rtl?"right":"left"]=100*n+"%",a.borderRadius=this.square?"0":"50%",a),class:[s?"handle-at-minimum":null,{dragging:this.dragging}],attrs:{tabindex:this.editable?0:-1},on:{keydown:function(t){return l.__onKeyDown(t,e)},keyup:function(t){return l.__onKeyUp(t,e)}}},[this.label||this.labelAlways?t(Ve,{props:{pointing:"down",square:!0,dense:!0,color:o},staticClass:"q-slider-label no-pointer-events",class:{"label-always":this.labelAlways}},[r]):null,null])},__getContent:function(t){var e;return[t("div",{staticClass:"q-slider-track active-track",style:(e={},e[this.$q.i18n.rtl?"right":"left"]=100*this.percentageMin+"%",e.width=this.activeTrackWidth,e),class:{dragging:this.dragging,"track-draggable":this.dragRange||this.dragOnlyRange}}),this.__getHandle(t,"min","Min",!this.fillHandleAlways&&this.model.min===this.min,this.percentageMin,this.leftTooltipColor,this.leftDisplayValue),this.__getHandle(t,"max","Max",!1,this.percentageMax,this.rightTooltipColor,this.rightDisplayValue)]}}},Vs={name:"QRating",props:{value:Number,max:{type:Number,default:5},icon:String,color:String,size:String,readonly:Boolean,disable:Boolean},data:function(){return{mouseModel:0}},computed:{model:{get:function(){return this.value},set:function(t){var e=this;this.$emit("input",t),this.$nextTick(function(){JSON.stringify(t)!==JSON.stringify(e.value)&&e.$emit("change",t)})}},editable:function(){return!this.readonly&&!this.disable},classes:function(){var t=[];return this.disable&&t.push("disabled"),this.editable&&t.push("editable"),this.color&&t.push("text-"+this.color),t}},methods:{set:function(t){if(this.editable){var e=Pt(parseInt(t,10),1,this.max);this.model=this.model===e?0:e,this.mouseModel=0}},__setHoverValue:function(t){this.editable&&(this.mouseModel=t)}},render:function(t){for(var e=this,i=[],s=this.editable?0:-1,n=function(n){i.push(t("span",{key:n,ref:"rt"+n,attrs:{tabindex:s},on:{keydown:function(t){switch(E(t)){case 13:case 32:return e.set(n),H(t);case 37:case 40:return e.$refs["rt"+(n-1)]&&e.$refs["rt"+(n-1)].focus(),H(t);case 39:case 38:return e.$refs["rt"+(n+1)]&&e.$refs["rt"+(n+1)].focus(),H(t)}}}},[t(dt,{props:{name:e.icon||e.$q.icon.rating.icon},class:{active:!e.mouseModel&&e.model>=n||e.mouseModel&&e.mouseModel>=n,exselected:e.mouseModel&&e.model>=n&&e.mouseModel<n,hovered:e.mouseModel===n},attrs:{tabindex:-1},nativeOn:{click:function(){return e.set(n)},mouseover:function(){return e.__setHoverValue(n)},mouseout:function(){e.mouseModel=0},focus:function(){return e.__setHoverValue(n)},blur:function(){e.mouseModel=0}}})]))},o=1;o<=this.max;o++)n(o);return t("div",{staticClass:"q-rating row inline items-center",class:this.classes,style:this.size?"font-size: "+this.size:""},i)}},Ws={name:"QScrollArea",directives:{TouchPan:Ce},props:{thumbStyle:{type:Object,default:function(){return{}}},contentStyle:{type:Object,default:function(){return{}}},contentActiveStyle:{type:Object,default:function(){return{}}},delay:{type:Number,default:1e3}},data:function(){return{active:!1,hover:!1,containerHeight:0,scrollPosition:0,scrollHeight:0}},computed:{thumbHidden:function(){return this.scrollHeight<=this.containerHeight||!this.active&&!this.hover},thumbHeight:function(){return Math.round(Pt(this.containerHeight*this.containerHeight/this.scrollHeight,50,this.containerHeight))},style:function(){var t=this.scrollPercentage*(this.containerHeight-this.thumbHeight);return Object.assign({},this.thumbStyle,{top:t+"px",height:this.thumbHeight+"px"})},mainStyle:function(){return this.thumbHidden?this.contentStyle:this.contentActiveStyle},scrollPercentage:function(){var t=Pt(this.scrollPosition/(this.scrollHeight-this.containerHeight),0,1);return Math.round(1e4*t)/1e4}},methods:{setScrollPosition:function(t,e){et(this.$refs.target,t,e)},__updateContainer:function(t){var e=t.height;this.containerHeight!==e&&(this.containerHeight=e,this.__setActive(!0,!0))},__updateScroll:function(t){var e=t.position;this.scrollPosition!==e&&(this.scrollPosition=e,this.__setActive(!0,!0))},__updateScrollHeight:function(t){var e=t.height;this.scrollHeight!==e&&(this.scrollHeight=e,this.__setActive(!0,!0))},__panThumb:function(t){t.isFirst&&(this.refPos=this.scrollPosition,this.__setActive(!0,!0),document.body.classList.add("non-selectable"),document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges()),t.isFinal&&(this.__setActive(!1),document.body.classList.remove("non-selectable"));var e=(this.scrollHeight-this.containerHeight)/(this.containerHeight-this.thumbHeight);this.$refs.target.scrollTop=this.refPos+("down"===t.direction?1:-1)*t.distance.y*e},__panContainer:function(t){t.isFirst&&(this.refPos=this.scrollPosition,this.__setActive(!0,!0)),t.isFinal&&this.__setActive(!1);var e=this.refPos+("down"===t.direction?-1:1)*t.distance.y;this.$refs.target.scrollTop=e,e>0&&e+this.containerHeight<this.scrollHeight&&t.evt.preventDefault()},__mouseWheel:function(t){var e=this.$refs.target;e.scrollTop+=I(t).y,e.scrollTop>0&&e.scrollTop+this.containerHeight<this.scrollHeight&&t.preventDefault()},__setActive:function(t,e){clearTimeout(this.timer),t!==this.active?t?(this.active=!0,e&&this.__startTimer()):this.active=!1:t&&this.timer&&this.__startTimer()},__startTimer:function(){var t=this;this.timer=setTimeout(function(){t.active=!1,t.timer=null},this.delay)}},render:function(t){var e=this;return this.$q.platform.is.desktop?t("div",{staticClass:"q-scrollarea relative-position",on:{mouseenter:function(){e.hover=!0},mouseleave:function(){e.hover=!1}}},[t("div",{ref:"target",staticClass:"scroll relative-position overflow-hidden fit",on:{wheel:this.__mouseWheel},directives:[{name:"touch-pan",modifiers:{vertical:!0,noMouse:!0,mightPrevent:!0},value:this.__panContainer}]},[t("div",{staticClass:"absolute full-width",style:this.mainStyle},[t(Wi,{on:{resize:this.__updateScrollHeight}}),this.$slots.default]),t(xs,{on:{scroll:this.__updateScroll}})]),t(Wi,{on:{resize:this.__updateContainer}}),t("div",{staticClass:"q-scrollarea-thumb absolute-right",style:this.style,class:{"invisible-thumb":this.thumbHidden},directives:[{name:"touch-pan",modifiers:{vertical:!0,prevent:!0},value:this.__panThumb}]})]):t("div",{staticClass:"q-scroll-area relative-position",style:this.contentStyle},[t("div",{ref:"target",staticClass:"scroll relative-position fit"},this.$slots.default)])}},Ks={name:"QSearch",mixins:[Ke,Ue],props:{value:{required:!0},type:{type:String,default:"search"},debounce:{type:Number,default:300},icon:String,noIcon:Boolean,upperCase:Boolean,lowerCase:Boolean},data:function(){return{model:this.value,childDebounce:!1}},provide:function(){var t=this,e=function(e){t.model!==e&&(t.model=e)};return{__inputDebounce:{set:e,setNav:e,setChildDebounce:function(e){t.childDebounce=e}}}},watch:{value:function(t){this.model=t},model:function(t){var e=this;clearTimeout(this.timer),this.value!==t&&(t||0===t||(this.model="number"===this.type?null:""),this.timer=setTimeout(function(){e.$emit("input",e.model)},this.debounceValue))}},computed:{debounceValue:function(){return this.childDebounce?0:this.debounce},computedClearValue:function(){return this.isNumber&&0===this.clearValue?this.clearValue:this.clearValue||("number"===this.type?null:"")},controlBefore:function(){var t=(this.before||[]).slice();return this.noIcon||t.unshift({icon:this.icon||this.$q.icon.search.icon,handler:this.focus}),t},controlAfter:function(){var t=(this.after||[]).slice();return this.isClearable&&t.push({icon:this.$q.icon.search["clear"+(this.isInverted?"Inverted":"")],handler:this.clear}),t}},methods:{clear:function(t){this.$refs.input.clear(t)}},render:function(t){var e=this;return t(Ki,{ref:"input",staticClass:"q-search",props:{value:this.model,type:this.type,autofocus:this.autofocus,placeholder:this.placeholder||this.$q.i18n.label.search,disable:this.disable,readonly:this.readonly,error:this.error,warning:this.warning,align:this.align,noParentField:this.noParentField,floatLabel:this.floatLabel,stackLabel:this.stackLabel,prefix:this.prefix,suffix:this.suffix,inverted:this.inverted,invertedLight:this.invertedLight,dark:this.dark,hideUnderline:this.hideUnderline,color:this.color,rows:this.rows,before:this.controlBefore,after:this.controlAfter,clearValue:this.clearValue,upperCase:this.upperCase,lowerCase:this.lowerCase},attrs:this.$attrs,on:{input:function(t){e.model=t},focus:this.__onFocus,blur:this.__onBlur,keyup:this.__onKeyup,keydown:this.__onKeydown,click:this.__onClick,paste:this.__onPaste,clear:function(t){e.$emit("clear",t),e.__emit()}}},this.$slots.default)}};function Us(t,e){return e.label.toLowerCase().indexOf(t)>-1}var Ys={name:"QSelect",mixins:[Ke,he],props:{filter:[Function,Boolean],filterPlaceholder:String,radio:Boolean,placeholder:String,separator:Boolean,value:{required:!0},multiple:Boolean,toggle:Boolean,chips:Boolean,options:{type:Array,required:!0,validator:function(t){return t.every(function(t){return"label"in t&&"value"in t})}},chipsColor:String,chipsBgColor:String,displayValue:String},data:function(){return{model:this.multiple&&Array.isArray(this.value)?this.value.slice():this.value,terms:"",focused:!1}},watch:{value:function(t){this.model=this.multiple&&Array.isArray(t)?t.slice():t},visibleOptions:function(){this.__keyboardCalcIndex()}},computed:{optModel:function(){var t=this;if(this.multiple)return this.model.length>0?this.options.map(function(e){return t.model.includes(e.value)}):this.options.map(function(t){return!1})},visibleOptions:function(){var t=this,e=this.options.map(function(t,e){return Object.assign({},t,{index:e})});if(this.filter&&this.terms.length){var i=this.terms.toLowerCase();e=e.filter(function(e){return t.filterFn(i,e)})}return e},keyboardMaxIndex:function(){return this.visibleOptions.length-1},filterFn:function(){return"boolean"==typeof this.filter?Us:this.filter},actualValue:function(){var t=this;if(this.displayValue)return this.displayValue;if(!this.multiple){var e=this.options.find(function(e){return e.value===t.model});return e?e.label:""}var i=this.selectedOptions.map(function(t){return t.label});return i.length?i.join(", "):""},computedClearValue:function(){return this.clearValue||(this.multiple?[]:null)},isClearable:function(){return this.editable&&this.clearable&&JSON.stringify(this.computedClearValue)!==JSON.stringify(this.model)},selectedOptions:function(){var t=this;if(this.multiple)return this.length>0?this.options.filter(function(e){return t.model.includes(e.value)}):[]},hasChips:function(){return this.multiple&&this.chips&&this.length>0},length:function(){return this.multiple?this.model.length:[null,void 0,""].includes(this.model)?0:1},additionalLength:function(){return this.displayValue&&this.displayValue.length>0}},methods:{togglePopup:function(){this.$refs.popover&&this[this.$refs.popover.showing?"hide":"show"]()},show:function(){if(this.__keyboardCalcIndex(),this.$refs.popover)return this.$refs.popover.show()},hide:function(){return this.$refs.popover?this.$refs.popover.hide():Promise.resolve()},reposition:function(){var t=this.$refs.popover;t&&t.showing&&this.$nextTick(function(){return t&&t.reposition()})},__keyboardCalcIndex:function(){var t=this;this.keyboardIndex=-1;var e=this.multiple?this.selectedOptions.map(function(t){return t.value}):[this.model];this.$nextTick(function(){var i=void 0===e?-1:Math.max(-1,t.visibleOptions.findIndex(function(t){return e.includes(t.value)}));i>-1&&(t.keyboardMoveDirection=!0,setTimeout(function(){t.keyboardMoveDirection=!1},500),t.__keyboardShow(i))})},__keyboardCustomKeyHandle:function(t,e){switch(t){case 13:case 32:this.$refs.popover.showing||this.show()}},__keyboardShowTrigger:function(){this.show()},__keyboardSetSelection:function(t){var e=this.visibleOptions[t];this.multiple?this.__toggleMultiple(e.value,e.disable):this.__singleSelect(e.value,e.disable)},__keyboardIsSelectableIndex:function(t){return t>-1&&t<this.visibleOptions.length&&!this.visibleOptions[t].disable},__mouseEnterHandler:function(t,e){this.keyboardMoveDirection||(this.keyboardIndex=e)},__onFocus:function(){this.disable||this.focused||(this.focused=!0,this.$emit("focus"))},__onShow:function(){this.disable||(this.__onFocus(),this.filter&&this.$refs.filter&&this.$refs.filter.focus())},__onBlur:function(t){var e=this;this.focused&&setTimeout(function(){var t=document.activeElement;e.$refs.popover&&e.$refs.popover.showing&&(t===document.body||e.$refs.popover.$el.contains(t))||(e.__onClose(),e.hide())},1)},__onClose:function(t){var e=this;this.$nextTick(function(){JSON.stringify(e.model)!==JSON.stringify(e.value)&&e.$emit("change",e.model)}),this.terms="",this.focused&&(t?this.$refs.input&&this.$refs.input.$el&&this.$refs.input.$el.focus():(this.focused=!1,this.$emit("blur")))},__singleSelect:function(t,e){e||(this.__emit(t),this.hide())},__toggleMultiple:function(t,e){if(!e){var i=this.model,s=i.indexOf(t);s>-1?this.$emit("remove",{index:s,value:i.splice(s,1)}):(this.$emit("add",{index:i.length,value:t}),i.push(t)),this.$emit("input",i)}},__emit:function(t){var e=this;this.$emit("input",t),this.$nextTick(function(){JSON.stringify(t)!==JSON.stringify(e.value)&&e.$emit("change",t)})},__setModel:function(t,e){this.model=t||(this.multiple?[]:null),this.$emit("input",this.model),!e&&this.$refs.popover&&this.$refs.popover.showing||this.__onClose(e)},__getChipTextColor:function(t){return this.chipsColor?this.chipsColor:this.isInvertedLight?this.invertedLight?t||this.color:"white":this.isInverted?t||(this.invertedLight?"grey-10":this.color):this.dark?t||this.color:"white"},__getChipBgColor:function(t){return this.chipsBgColor?this.chipsBgColor:this.isInvertedLight?this.invertedLight?"grey-10":t||this.color:this.isInverted?this.invertedLight?this.color:"white":this.dark?"white":t||this.color}},render:function(t){var e=this,i=[];if(this.hasChips){var s=t("div",{staticClass:"col row items-center q-input-chips",class:this.alignClass},this.selectedOptions.map(function(i,s){return t(Ve,{key:s,props:{small:!0,closable:e.editable&&!i.disable,color:e.__getChipBgColor(i.color),textColor:e.__getChipTextColor(i.color),icon:i.icon,iconRight:i.rightIcon,avatar:i.avatar},on:{hide:function(){e.__toggleMultiple(i.value,e.disable||i.disable)}},nativeOn:{click:function(t){t.stopPropagation()}},domProps:{innerHTML:i.label}})}));i.push(s)}else{var n=t("div",{staticClass:"col q-input-target ellipsis",class:this.fakeInputClasses,domProps:{innerHTML:this.fakeInputValue}});i.push(n)}return i.push(t(ae,{ref:"popover",staticClass:"column no-wrap",class:this.dark?"bg-dark":null,props:{cover:!0,disable:!this.editable,anchorClick:!1},slot:"after",on:{show:this.__onShow,hide:function(){e.__onClose(!0)}},nativeOn:{keydown:this.__keyboardHandleKey}},[this.filter&&t(Ks,{ref:"filter",staticClass:"col-auto",style:"padding: 10px;",props:{value:this.terms,placeholder:this.filterPlaceholder||this.$q.i18n.label.filter,debounce:100,color:this.color,dark:this.dark,noParentField:!0,noIcon:!0},on:{input:function(t){e.terms=t,e.reposition()}}})||void 0,this.visibleOptions.length&&t(pt,{staticClass:"no-border scroll",props:{separator:this.separator,dark:this.dark}},this.visibleOptions.map(function(i,s){return t(ce,{key:s,class:[i.disable?"text-faded":"cursor-pointer",s===e.keyboardIndex?"q-select-highlight":"",i.disable?"":"cursor-pointer",i.className||""],props:{cfg:i,slotReplace:!0,active:e.multiple?void 0:e.value===i.value},nativeOn:{"!click":function(){var t=e.multiple?"__toggleMultiple":"__singleSelect";e[t](i.value,i.disable)},mouseenter:function(t){!i.disable&&e.__mouseEnterHandler(t,s)}}},[e.multiple?t(e.toggle?Yi:je,{slot:e.toggle?"right":"left",props:{keepColor:!0,color:i.color||e.color,dark:e.dark,value:e.optModel[i.index],disable:i.disable,noFocus:!0}}):e.radio&&t(Ui,{slot:"left",props:{keepColor:!0,color:i.color||e.color,dark:e.dark,value:e.value,val:i.value,disable:i.disable,noFocus:!0}})||void 0])}))||void 0])),this.isClearable&&i.push(t(dt,{slot:"after",staticClass:"q-if-control",props:{name:this.$q.icon.input["clear"+(this.isInverted?"Inverted":"")]},nativeOn:{click:this.clear}})),i.push(t(dt,{slot:"after",staticClass:"q-if-control",props:{name:this.$q.icon.input.dropdown}})),t(Je,{ref:"input",staticClass:"q-select",props:{prefix:this.prefix,suffix:this.suffix,stackLabel:this.stackLabel,floatLabel:this.floatLabel,error:this.error,warning:this.warning,disable:this.disable,readonly:this.readonly,inverted:this.inverted,invertedLight:this.invertedLight,dark:this.dark,hideUnderline:this.hideUnderline,before:this.before,after:this.after,color:this.color,noParentField:this.noParentField,focused:this.focused,focusable:!0,length:this.length,additionalLength:this.additionalLength},nativeOn:{click:this.togglePopup,focus:this.__onFocus,blur:this.__onBlur,keydown:this.__keyboardHandleKey}},i)}},Js={name:"QSpinnerAudio",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{fill:"currentColor",width:this.size,height:this.size,viewBox:"0 0 55 80",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"matrix(1 0 0 -1 0 80)"}},[t("rect",{attrs:{width:"10",height:"20",rx:"3"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"4.3s",values:"20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"15",width:"10",height:"80",rx:"3"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"2s",values:"80;55;33;5;75;23;73;33;12;14;60;80",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"30",width:"10",height:"50",rx:"3"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"1.4s",values:"50;34;78;23;56;23;34;76;80;54;21;50",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"45",width:"10",height:"30",rx:"3"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"2s",values:"30;45;13;80;56;72;45;76;34;23;67;30",calcMode:"linear",repeatCount:"indefinite"}})])])])}},Xs={name:"QSpinnerBall",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{stroke:"currentColor",width:this.size,height:this.size,viewBox:"0 0 57 57",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"}},[t("circle",{attrs:{cx:"5",cy:"50",r:"5"}},[t("animate",{attrs:{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;5;50;50",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"cx",begin:"0s",dur:"2.2s",values:"5;27;49;5",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"27",cy:"5",r:"5"}},[t("animate",{attrs:{attributeName:"cy",begin:"0s",dur:"2.2s",from:"5",to:"5",values:"5;50;50;5",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"cx",begin:"0s",dur:"2.2s",from:"27",to:"27",values:"27;49;5;27",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"49",cy:"50",r:"5"}},[t("animate",{attrs:{attributeName:"cy",begin:"0s",dur:"2.2s",values:"50;50;5;50",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"cx",from:"49",to:"49",begin:"0s",dur:"2.2s",values:"49;5;27;49",calcMode:"linear",repeatCount:"indefinite"}})])])])}},Gs={name:"QSpinnerBars",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{fill:"currentColor",width:this.size,height:this.size,viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg"}},[t("rect",{attrs:{y:"10",width:"15",height:"120",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"30",y:"10",width:"15",height:"120",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"60",width:"15",height:"140",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"90",y:"10",width:"15",height:"120",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})]),t("rect",{attrs:{x:"120",y:"10",width:"15",height:"120",rx:"6"}},[t("animate",{attrs:{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"}})])])}},Zs={name:"QSpinnerCircles",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{fill:"currentColor",width:this.size,height:this.size,viewBox:"0 0 135 135",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M67.447 58c5.523 0 10-4.477 10-10s-4.477-10-10-10-10 4.477-10 10 4.477 10 10 10zm9.448 9.447c0 5.523 4.477 10 10 10 5.522 0 10-4.477 10-10s-4.478-10-10-10c-5.523 0-10 4.477-10 10zm-9.448 9.448c-5.523 0-10 4.477-10 10 0 5.522 4.477 10 10 10s10-4.478 10-10c0-5.523-4.477-10-10-10zM58 67.447c0-5.523-4.477-10-10-10s-10 4.477-10 10 4.477 10 10 10 10-4.477 10-10z"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 67 67",to:"-360 67 67",dur:"2.5s",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M28.19 40.31c6.627 0 12-5.374 12-12 0-6.628-5.373-12-12-12-6.628 0-12 5.372-12 12 0 6.626 5.372 12 12 12zm30.72-19.825c4.686 4.687 12.284 4.687 16.97 0 4.686-4.686 4.686-12.284 0-16.97-4.686-4.687-12.284-4.687-16.97 0-4.687 4.686-4.687 12.284 0 16.97zm35.74 7.705c0 6.627 5.37 12 12 12 6.626 0 12-5.373 12-12 0-6.628-5.374-12-12-12-6.63 0-12 5.372-12 12zm19.822 30.72c-4.686 4.686-4.686 12.284 0 16.97 4.687 4.686 12.285 4.686 16.97 0 4.687-4.686 4.687-12.284 0-16.97-4.685-4.687-12.283-4.687-16.97 0zm-7.704 35.74c-6.627 0-12 5.37-12 12 0 6.626 5.373 12 12 12s12-5.374 12-12c0-6.63-5.373-12-12-12zm-30.72 19.822c-4.686-4.686-12.284-4.686-16.97 0-4.686 4.687-4.686 12.285 0 16.97 4.686 4.687 12.284 4.687 16.97 0 4.687-4.685 4.687-12.283 0-16.97zm-35.74-7.704c0-6.627-5.372-12-12-12-6.626 0-12 5.373-12 12s5.374 12 12 12c6.628 0 12-5.373 12-12zm-19.823-30.72c4.687-4.686 4.687-12.284 0-16.97-4.686-4.686-12.284-4.686-16.97 0-4.687 4.686-4.687 12.284 0 16.97 4.686 4.687 12.284 4.687 16.97 0z"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 67 67",to:"360 67 67",dur:"8s",repeatCount:"indefinite"}})])])}},tn={name:"QSpinnerComment",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[t("rect",{attrs:{x:"0",y:"0",width:"100",height:"100",fill:"none"}}),t("path",{attrs:{d:"M78,19H22c-6.6,0-12,5.4-12,12v31c0,6.6,5.4,12,12,12h37.2c0.4,3,1.8,5.6,3.7,7.6c2.4,2.5,5.1,4.1,9.1,4 c-1.4-2.1-2-7.2-2-10.3c0-0.4,0-0.8,0-1.3h8c6.6,0,12-5.4,12-12V31C90,24.4,84.6,19,78,19z",fill:"currentColor"}}),t("circle",{attrs:{cx:"30",cy:"47",r:"5",fill:"#fff"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",values:"0;1;1",keyTimes:"0;0.2;1",dur:"1s",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"50",cy:"47",r:"5",fill:"#fff"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",values:"0;0;1;1",keyTimes:"0;0.2;0.4;1",dur:"1s",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"70",cy:"47",r:"5",fill:"#fff"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",values:"0;0;1;1",keyTimes:"0;0.4;0.6;1",dur:"1s",repeatCount:"indefinite"}})])])}},en={name:"QSpinnerCube",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[t("rect",{attrs:{x:"0",y:"0",width:"100",height:"100",fill:"none"}}),t("g",{attrs:{transform:"translate(25 25)"}},[t("rect",{attrs:{x:"-20",y:"-20",width:"40",height:"40",fill:"currentColor",opacity:"0.9"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"1.5",to:"1",repeatCount:"indefinite",begin:"0s",dur:"1s",calcMode:"spline",keySplines:"0.2 0.8 0.2 0.8",keyTimes:"0;1"}})])]),t("g",{attrs:{transform:"translate(75 25)"}},[t("rect",{attrs:{x:"-20",y:"-20",width:"40",height:"40",fill:"currentColor",opacity:"0.8"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"1.5",to:"1",repeatCount:"indefinite",begin:"0.1s",dur:"1s",calcMode:"spline",keySplines:"0.2 0.8 0.2 0.8",keyTimes:"0;1"}})])]),t("g",{attrs:{transform:"translate(25 75)"}},[t("rect",{staticClass:"cube",attrs:{x:"-20",y:"-20",width:"40",height:"40",fill:"currentColor",opacity:"0.7"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"1.5",to:"1",repeatCount:"indefinite",begin:"0.3s",dur:"1s",calcMode:"spline",keySplines:"0.2 0.8 0.2 0.8",keyTimes:"0;1"}})])]),t("g",{attrs:{transform:"translate(75 75)"}},[t("rect",{staticClass:"cube",attrs:{x:"-20",y:"-20",width:"40",height:"40",fill:"currentColor",opacity:"0.6"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"1.5",to:"1",repeatCount:"indefinite",begin:"0.2s",dur:"1s",calcMode:"spline",keySplines:"0.2 0.8 0.2 0.8",keyTimes:"0;1"}})])])])}},sn={name:"QSpinnerDots",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{fill:"currentColor",width:this.size,height:this.size,viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg"}},[t("circle",{attrs:{cx:"15",cy:"15",r:"15"}},[t("animate",{attrs:{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"60",cy:"15",r:"9","fill-opacity":".3"}},[t("animate",{attrs:{attributeName:"r",from:"9",to:"9",begin:"0s",dur:"0.8s",values:"9;15;9",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"fill-opacity",from:".5",to:".5",begin:"0s",dur:"0.8s",values:".5;1;.5",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"105",cy:"15",r:"15"}},[t("animate",{attrs:{attributeName:"r",from:"15",to:"15",begin:"0s",dur:"0.8s",values:"15;9;15",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"fill-opacity",from:"1",to:"1",begin:"0s",dur:"0.8s",values:"1;.5;1",calcMode:"linear",repeatCount:"indefinite"}})])])}},nn={name:"QSpinnerFacebook",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"xMidYMid"}},[t("g",{attrs:{transform:"translate(20 50)"}},[t("rect",{attrs:{x:"-10",y:"-30",width:"20",height:"60",fill:"currentColor",opacity:"0.6"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"2",to:"1",begin:"0s",repeatCount:"indefinite",dur:"1s",calcMode:"spline",keySplines:"0.1 0.9 0.4 1",keyTimes:"0;1",values:"2;1"}})])]),t("g",{attrs:{transform:"translate(50 50)"}},[t("rect",{attrs:{x:"-10",y:"-30",width:"20",height:"60",fill:"currentColor",opacity:"0.8"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"2",to:"1",begin:"0.1s",repeatCount:"indefinite",dur:"1s",calcMode:"spline",keySplines:"0.1 0.9 0.4 1",keyTimes:"0;1",values:"2;1"}})])]),t("g",{attrs:{transform:"translate(80 50)"}},[t("rect",{attrs:{x:"-10",y:"-30",width:"20",height:"60",fill:"currentColor",opacity:"0.9"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"scale",from:"2",to:"1",begin:"0.2s",repeatCount:"indefinite",dur:"1s",calcMode:"spline",keySplines:"0.1 0.9 0.4 1",keyTimes:"0;1",values:"2;1"}})])])])}},on={name:"QSpinnerGears",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"translate(-20,-20)"}},[t("path",{attrs:{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"90 50 50",to:"0 50 50",dur:"1s",repeatCount:"indefinite"}})])]),t("g",{attrs:{transform:"translate(20,20) rotate(15 50 50)"}},[t("path",{attrs:{d:"M79.9,52.6C80,51.8,80,50.9,80,50s0-1.8-0.1-2.6l-5.1-0.4c-0.3-2.4-0.9-4.6-1.8-6.7l4.2-2.9c-0.7-1.6-1.6-3.1-2.6-4.5 L70,35c-1.4-1.9-3.1-3.5-4.9-4.9l2.2-4.6c-1.4-1-2.9-1.9-4.5-2.6L59.8,27c-2.1-0.9-4.4-1.5-6.7-1.8l-0.4-5.1C51.8,20,50.9,20,50,20 s-1.8,0-2.6,0.1l-0.4,5.1c-2.4,0.3-4.6,0.9-6.7,1.8l-2.9-4.1c-1.6,0.7-3.1,1.6-4.5,2.6l2.1,4.6c-1.9,1.4-3.5,3.1-5,4.9l-4.5-2.1 c-1,1.4-1.9,2.9-2.6,4.5l4.1,2.9c-0.9,2.1-1.5,4.4-1.8,6.8l-5,0.4C20,48.2,20,49.1,20,50s0,1.8,0.1,2.6l5,0.4 c0.3,2.4,0.9,4.7,1.8,6.8l-4.1,2.9c0.7,1.6,1.6,3.1,2.6,4.5l4.5-2.1c1.4,1.9,3.1,3.5,5,4.9l-2.1,4.6c1.4,1,2.9,1.9,4.5,2.6l2.9-4.1 c2.1,0.9,4.4,1.5,6.7,1.8l0.4,5.1C48.2,80,49.1,80,50,80s1.8,0,2.6-0.1l0.4-5.1c2.3-0.3,4.6-0.9,6.7-1.8l2.9,4.2 c1.6-0.7,3.1-1.6,4.5-2.6L65,69.9c1.9-1.4,3.5-3,4.9-4.9l4.6,2.2c1-1.4,1.9-2.9,2.6-4.5L73,59.8c0.9-2.1,1.5-4.4,1.8-6.7L79.9,52.6 z M50,65c-8.3,0-15-6.7-15-15c0-8.3,6.7-15,15-15s15,6.7,15,15C65,58.3,58.3,65,50,65z",fill:"currentColor"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"90 50 50",dur:"1s",repeatCount:"indefinite"}})])])])}},rn={name:"QSpinnerGrid",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{fill:"currentColor",width:this.size,height:this.size,viewBox:"0 0 105 105",xmlns:"http://www.w3.org/2000/svg"}},[t("circle",{attrs:{cx:"12.5",cy:"12.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"0s",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"12.5",cy:"52.5",r:"12.5","fill-opacity":".5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"100ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"52.5",cy:"12.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"300ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"52.5",cy:"52.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"600ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"92.5",cy:"12.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"800ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"92.5",cy:"52.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"400ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"12.5",cy:"92.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"700ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"52.5",cy:"92.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"500ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"92.5",cy:"92.5",r:"12.5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"200ms",dur:"1s",values:"1;.2;1",calcMode:"linear",repeatCount:"indefinite"}})])])}},an={name:"QSpinnerHearts",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{fill:"currentColor",width:this.size,height:this.size,viewBox:"0 0 140 64",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M30.262 57.02L7.195 40.723c-5.84-3.976-7.56-12.06-3.842-18.063 3.715-6 11.467-7.65 17.306-3.68l4.52 3.76 2.6-5.274c3.716-6.002 11.47-7.65 17.304-3.68 5.84 3.97 7.56 12.054 3.842 18.062L34.49 56.118c-.897 1.512-2.793 1.915-4.228.9z","fill-opacity":".5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"0s",dur:"1.4s",values:"0.5;1;0.5",calcMode:"linear",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M105.512 56.12l-14.44-24.272c-3.716-6.008-1.996-14.093 3.843-18.062 5.835-3.97 13.588-2.322 17.306 3.68l2.6 5.274 4.52-3.76c5.84-3.97 13.593-2.32 17.308 3.68 3.718 6.003 1.998 14.088-3.842 18.064L109.74 57.02c-1.434 1.014-3.33.61-4.228-.9z","fill-opacity":".5"}},[t("animate",{attrs:{attributeName:"fill-opacity",begin:"0.7s",dur:"1.4s",values:"0.5;1;0.5",calcMode:"linear",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M67.408 57.834l-23.01-24.98c-5.864-6.15-5.864-16.108 0-22.248 5.86-6.14 15.37-6.14 21.234 0L70 16.168l4.368-5.562c5.863-6.14 15.375-6.14 21.235 0 5.863 6.14 5.863 16.098 0 22.247l-23.007 24.98c-1.43 1.556-3.757 1.556-5.188 0z"}})])}},ln={name:"QSpinnerHourglass",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[t("g",[t("path",{staticClass:"glass",attrs:{fill:"none",stroke:"currentColor","stroke-width":"5","stroke-miterlimit":"10",d:"M58.4,51.7c-0.9-0.9-1.4-2-1.4-2.3s0.5-0.4,1.4-1.4 C70.8,43.8,79.8,30.5,80,15.5H70H30H20c0.2,15,9.2,28.1,21.6,32.3c0.9,0.9,1.4,1.2,1.4,1.5s-0.5,1.6-1.4,2.5 C29.2,56.1,20.2,69.5,20,85.5h10h40h10C79.8,69.5,70.8,55.9,58.4,51.7z"}}),t("clipPath",{attrs:{id:"uil-hourglass-clip1"}},[t("rect",{staticClass:"clip",attrs:{x:"15",y:"20",width:"70",height:"25"}},[t("animate",{attrs:{attributeName:"height",from:"25",to:"0",dur:"1s",repeatCount:"indefinite",vlaues:"25;0;0",keyTimes:"0;0.5;1"}}),t("animate",{attrs:{attributeName:"y",from:"20",to:"45",dur:"1s",repeatCount:"indefinite",vlaues:"20;45;45",keyTimes:"0;0.5;1"}})])]),t("clipPath",{attrs:{id:"uil-hourglass-clip2"}},[t("rect",{staticClass:"clip",attrs:{x:"15",y:"55",width:"70",height:"25"}},[t("animate",{attrs:{attributeName:"height",from:"0",to:"25",dur:"1s",repeatCount:"indefinite",vlaues:"0;25;25",keyTimes:"0;0.5;1"}}),t("animate",{attrs:{attributeName:"y",from:"80",to:"55",dur:"1s",repeatCount:"indefinite",vlaues:"80;55;55",keyTimes:"0;0.5;1"}})])]),t("path",{staticClass:"sand",attrs:{d:"M29,23c3.1,11.4,11.3,19.5,21,19.5S67.9,34.4,71,23H29z","clip-path":"url(#uil-hourglass-clip1)",fill:"currentColor"}}),t("path",{staticClass:"sand",attrs:{d:"M71.6,78c-3-11.6-11.5-20-21.5-20s-18.5,8.4-21.5,20H71.6z","clip-path":"url(#uil-hourglass-clip2)",fill:"currentColor"}}),t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"180 50 50",repeatCount:"indefinite",dur:"1s",values:"0 50 50;0 50 50;180 50 50",keyTimes:"0;0.7;1"}})])])}},cn={name:"QSpinnerInfinity",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"}},[t("path",{attrs:{d:"M24.3,30C11.4,30,5,43.3,5,50s6.4,20,19.3,20c19.3,0,32.1-40,51.4-40C88.6,30,95,43.3,95,50s-6.4,20-19.3,20C56.4,70,43.6,30,24.3,30z",fill:"none",stroke:"currentColor","stroke-width":"8","stroke-dasharray":"10.691205342610678 10.691205342610678","stroke-dashoffset":"0"}},[t("animate",{attrs:{attributeName:"stroke-dashoffset",from:"0",to:"21.382410685221355",begin:"0",dur:"2s",repeatCount:"indefinite",fill:"freeze"}})])])}},hn={name:"QSpinnerMat",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner q-spinner-mat",class:this.classes,attrs:{width:this.size,height:this.size,viewBox:"25 25 50 50"}},[t("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-miterlimit":"10"}})])}},un={name:"QSpinnerOval",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{stroke:"currentColor",width:this.size,height:this.size,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"translate(1 1)","stroke-width":"2",fill:"none","fill-rule":"evenodd"}},[t("circle",{attrs:{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}}),t("path",{attrs:{d:"M36 18c0-9.94-8.06-18-18-18"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"}})])])])}},dn={name:"QSpinnerPie",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M0 50A50 50 0 0 1 50 0L50 50L0 50",fill:"currentColor",opacity:"0.5"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"0.8s",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M50 0A50 50 0 0 1 100 50L50 50L50 0",fill:"currentColor",opacity:"0.5"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"1.6s",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M100 50A50 50 0 0 1 50 100L50 50L100 50",fill:"currentColor",opacity:"0.5"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"2.4s",repeatCount:"indefinite"}})]),t("path",{attrs:{d:"M50 100A50 50 0 0 1 0 50L50 50L50 100",fill:"currentColor",opacity:"0.5"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 50 50",to:"360 50 50",dur:"3.2s",repeatCount:"indefinite"}})])])}},pn={name:"QSpinnerPuff",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{stroke:"currentColor",width:this.size,height:this.size,viewBox:"0 0 44 44",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{fill:"none","fill-rule":"evenodd","stroke-width":"2"}},[t("circle",{attrs:{cx:"22",cy:"22",r:"1"}},[t("animate",{attrs:{attributeName:"r",begin:"0s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-opacity",begin:"0s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"22",cy:"22",r:"1"}},[t("animate",{attrs:{attributeName:"r",begin:"-0.9s",dur:"1.8s",values:"1; 20",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.165, 0.84, 0.44, 1",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-opacity",begin:"-0.9s",dur:"1.8s",values:"1; 0",calcMode:"spline",keyTimes:"0; 1",keySplines:"0.3, 0.61, 0.355, 1",repeatCount:"indefinite"}})])])])}},fn={name:"QSpinnerRadio",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{transform:"scale(0.55)"}},[t("circle",{attrs:{cx:"30",cy:"150",r:"30",fill:"currentColor"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",dur:"1s",begin:"0",repeatCount:"indefinite",keyTimes:"0;0.5;1",values:"0;1;1"}})]),t("path",{attrs:{d:"M90,150h30c0-49.7-40.3-90-90-90v30C63.1,90,90,116.9,90,150z",fill:"currentColor"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",dur:"1s",begin:"0.1",repeatCount:"indefinite",keyTimes:"0;0.5;1",values:"0;1;1"}})]),t("path",{attrs:{d:"M150,150h30C180,67.2,112.8,0,30,0v30C96.3,30,150,83.7,150,150z",fill:"currentColor"}},[t("animate",{attrs:{attributeName:"opacity",from:"0",to:"1",dur:"1s",begin:"0.2",repeatCount:"indefinite",keyTimes:"0;0.5;1",values:"0;1;1"}})])])])}},mn={name:"QSpinnerRings",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{stroke:"currentColor",width:this.size,height:this.size,viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg"}},[t("g",{attrs:{fill:"none","fill-rule":"evenodd",transform:"translate(1 1)","stroke-width":"2"}},[t("circle",{attrs:{cx:"22",cy:"22",r:"6"}},[t("animate",{attrs:{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"22",cy:"22",r:"6"}},[t("animate",{attrs:{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}}),t("animate",{attrs:{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"}})]),t("circle",{attrs:{cx:"22",cy:"22",r:"8"}},[t("animate",{attrs:{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}})])])])}},gn={name:"QSpinnerTail",mixins:[Wt],render:function(t){return t("svg",{staticClass:"q-spinner",class:this.classes,attrs:{width:this.size,height:this.size,viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg"}},[t("defs",[t("linearGradient",{attrs:{x1:"8.042%",y1:"0%",x2:"65.682%",y2:"23.865%",id:"a"}},[t("stop",{attrs:{"stop-color":"currentColor","stop-opacity":"0",offset:"0%"}}),t("stop",{attrs:{"stop-color":"currentColor","stop-opacity":".631",offset:"63.146%"}}),t("stop",{attrs:{"stop-color":"currentColor",offset:"100%"}})])]),t("g",{attrs:{transform:"translate(1 1)",fill:"none","fill-rule":"evenodd"}},[t("path",{attrs:{d:"M36 18c0-9.94-8.06-18-18-18",stroke:"url(#a)","stroke-width":"2"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"}})]),t("circle",{attrs:{fill:"currentColor",cx:"36",cy:"18",r:"1"}},[t("animateTransform",{attrs:{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"0.9s",repeatCount:"indefinite"}})])])])}},vn={name:"QStepTab",directives:{Ripple:Ht},props:["vm"],computed:{hasNavigation:function(){return!this.vm.__stepper.noHeaderNavigation},classes:function(){return{"step-error":this.vm.error,"step-active":this.vm.active,"step-done":this.vm.done,"step-navigation":this.vm.done&&this.hasNavigation,"step-waiting":this.vm.waiting,"step-disabled":this.vm.disable,"step-colored":this.vm.active||this.vm.done,"items-center":!this.vm.__stepper.vertical,"items-start":this.vm.__stepper.vertical,"q-stepper-first":this.vm.first,"q-stepper-last":this.vm.last}}},methods:{__select:function(){this.hasNavigation&&this.vm.select()}},render:function(t){var e=this.vm.stepIcon?t(dt,{props:{name:this.vm.stepIcon}}):t("span",[this.vm.innerOrder+1]);return t("div",{staticClass:"q-stepper-tab col-grow flex no-wrap relative-position",class:this.classes,on:{click:this.__select},directives:null},[t("div",{staticClass:"q-stepper-dot row flex-center q-stepper-line relative-position"},[t("span",{staticClass:"row flex-center"},[e])]),this.vm.title?t("div",{staticClass:"q-stepper-label q-stepper-line relative-position"},[t("div",{staticClass:"q-stepper-title"},[this.vm.title]),t("div",{staticClass:"q-stepper-subtitle"},[this.vm.subtitle])]):null])}},bn={name:"QStep",inject:{__stepper:{default:function(){console.error("QStep needs to be child of QStepper")}}},props:{name:{type:[Number,String],default:function(){return Zt()}},default:Boolean,title:{type:String,required:!0},subtitle:String,icon:String,order:[Number,String],error:Boolean,activeIcon:String,errorIcon:String,doneIcon:String,disable:Boolean},watch:{order:function(){this.__stepper.__sortSteps()}},data:function(){return{innerOrder:0,first:!1,last:!1}},computed:{stepIcon:function(){var t=this.__stepper;return this.active?this.activeIcon||t.activeIcon||this.$q.icon.stepper.active:this.error?this.errorIcon||t.errorIcon||this.$q.icon.stepper.error:this.done&&!this.disable?this.doneIcon||t.doneIcon||this.$q.icon.stepper.done:this.icon},actualOrder:function(){return parseInt(this.order||this.innerOrder,10)},active:function(){return this.__stepper.step===this.name},done:function(){return!this.disable&&this.__stepper.currentOrder>this.innerOrder},waiting:function(){return!this.disable&&this.__stepper.currentOrder<this.innerOrder},style:function(){var t=this.actualOrder;return{"-webkit-box-ordinal-group":t,"-ms-flex-order":t,order:t}},classes:function(){if(!this.__stepper.vertical){var t=[];return!this.active&&t.push("hidden"),null!==this.__stepper.animation&&t.push(this.__stepper.animation),t}}},methods:{select:function(){this.done&&this.__stepper.goToStep(this.name)},__getContainer:function(t){var e=this.active?t("div",{staticClass:"q-stepper-step-content",class:this.classes},[t("div",{staticClass:"q-stepper-step-inner"},this.$slots.default)]):null;return this.__stepper.vertical?t(Ze,[e]):e}},mounted:function(){this.__stepper.__registerStep(this),this.default&&this.select()},beforeDestroy:function(){this.__stepper.__unregisterStep(this)},render:function(t){return t("div",{staticClass:"q-stepper-step",style:this.style},[this.__stepper.vertical?t(vn,{props:{vm:this}}):null,this.__getContainer(t)])}},_n={name:"QStepper",props:{value:[Number,String],color:{type:String,default:"primary"},vertical:Boolean,alternativeLabels:Boolean,noHeaderNavigation:Boolean,contractable:Boolean,doneIcon:Boolean,activeIcon:Boolean,errorIcon:Boolean},data:function(){return{animation:null,step:this.value||null,steps:[]}},provide:function(){return{__stepper:this}},watch:{value:function(t){this.goToStep(t)},step:function(t,e){if(!this.vertical){var i=this.steps.findIndex(function(e){return e.name===t}),s=this.steps.findIndex(function(t){return t.name===e});this.animation=i<s?"animate-fade-left":i>s?"animate-fade-right":null}}},computed:{classes:function(){var t=["q-stepper-"+(this.vertical?"vertical":"horizontal"),"text-"+this.color];return this.contractable&&t.push("q-stepper-contractable"),t},hasSteps:function(){return this.steps.length>0},currentStep:function(){var t=this;if(this.hasSteps)return this.steps.find(function(e){return e.name===t.step})},currentOrder:function(){if(this.currentStep)return this.currentStep.innerOrder},length:function(){return this.steps.length}},methods:{goToStep:function(t){var e=this;this.step!==t&&void 0!==t&&(this.step=t,this.$emit("input",t),this.$emit("step",t),this.$nextTick(function(){JSON.stringify(t)!==JSON.stringify(e.value)&&e.$emit("change",t)}))},next:function(){this.__go(1)},previous:function(){this.__go(-1)},reset:function(){this.hasSteps&&this.goToStep(this.steps[0].name)},__go:function(t){var e,i=this.currentOrder;if(void 0===i){if(!this.hasSteps)return;e=this.steps[0].name}else{do{i+=t}while(i>=0&&i<this.length-1&&this.steps[i].disable);if(i<0||i>this.length-1||this.steps[i].disable)return;e=this.steps[i].name}this.goToStep(e)},__sortSteps:function(){var t=this;this.steps.sort(function(t,e){return t.actualOrder-e.actualOrder});var e=this.steps.length-1;this.steps.forEach(function(t,i){t.innerOrder=i,t.first=0===i,t.last=i===e}),this.$nextTick(function(){t.steps.some(function(t){return t.active})||t.goToStep(t.steps[0].name)})},__registerStep:function(t){return this.steps.push(t),this.__sortSteps(),this},__unregisterStep:function(t){this.steps=this.steps.filter(function(e){return e!==t})}},created:function(){this.__sortSteps=oe(this.__sortSteps)},render:function(t){return t("div",{staticClass:"q-stepper column overflow-hidden relative-position",class:this.classes},[this.vertical?null:t("div",{staticClass:"q-stepper-header row items-stretch justify-between shadow-1",class:{"alternative-labels":this.alternativeLabels}},this.steps.map(function(e){return t(vn,{key:e.name,props:{vm:e}})})),this.$slots.default])}},yn={directives:{Ripple:Ht},props:{label:String,icon:String,disable:Boolean,hidden:Boolean,hide:{type:String,default:""},name:{type:String,default:function(){return Zt()}},alert:Boolean,count:[Number,String],color:String,tabindex:Number},inject:{data:{default:function(){console.error("QTab/QRouteTab components need to be child of QTabs")}},selectTab:{}},watch:{active:function(t){t&&this.$emit("select",this.name)}},computed:{active:function(){return this.data.tabName===this.name},classes:function(){var t={active:this.active,hidden:this.hidden,disabled:this.disable,"q-tab-full":this.icon&&this.label,"q-tab-only-label":!this.icon&&this.label,"hide-none":!this.hide,"hide-icon":"icon"===this.hide,"hide-label":"label"===this.hide},e=this.data.inverted?this.color||this.data.textColor||this.data.color:this.color;return e&&(t["text-"+e]=this.active),t},barStyle:function(){if(!this.active||!this.data.highlight)return"display: none;"},computedTabIndex:function(){return this.disable||this.active?-1:this.tabindex||0}},methods:{__getTabMeta:function(t){return this.count?[t(Ve,{staticClass:"q-tab-meta",props:{floating:!0}},[this.count])]:this.alert?[t("div",{staticClass:"q-tab-meta q-dot"})]:void 0},__getTabContent:function(t){var e=[];return this.icon&&e.push(t("div",{staticClass:"q-tab-icon-parent relative-position"},[t(dt,{staticClass:"q-tab-icon",props:{name:this.icon}}),this.__getTabMeta(t)])),this.label&&e.push(t("div",{staticClass:"q-tab-label-parent relative-position"},[t("div",{staticClass:"q-tab-label"},[this.label]),this.__getTabMeta(t)])),(e=e.concat(this.$slots.default)).push(t("div",{staticClass:"q-tab-focus-helper absolute-full",attrs:{tabindex:this.computedTabIndex}})),e}}},wn={name:"QRouteTab",mixins:[yn,gt],inject:{selectTabRouter:{}},watch:{$route:function(){this.checkIfSelected()}},methods:{select:function(){this.$emit("click",this.name),this.disable||(this.$el.dispatchEvent(ft),this.selectTabRouter({value:this.name,selected:!0}))},checkIfSelected:function(){var t=this;this.$nextTick(function(){if(t.$el.classList.contains("q-router-link-exact-active"))t.selectTabRouter({value:t.name,selectable:!0,exact:!0});else if(t.$el.classList.contains("q-router-link-active")){var e=t.$router.resolve(t.to,void 0,t.append);t.selectTabRouter({value:t.name,selectable:!0,priority:e.href.length})}else t.active&&t.selectTabRouter({value:null})})}},mounted:function(){this.checkIfSelected()},render:function(t){var e=this;return t("router-link",{props:{tag:"a",to:this.to,exact:this.exact,append:this.append,replace:this.replace,event:"qrouterlinkclick",activeClass:"q-router-link-active",exactActiveClass:"q-router-link-exact-active"},attrs:{tabindex:-1},nativeOn:{click:this.select,keyup:function(t){return 13===t.keyCode&&e.select(t)}},staticClass:"q-link q-tab column flex-center relative-position",class:this.classes,directives:null},this.__getTabContent(t))}},Cn={name:"QTab",mixins:[yn],props:{default:Boolean},methods:{select:function(){this.$emit("click",this.name),this.disable||this.selectTab(this.name)}},mounted:function(){this.default&&!this.disable&&this.select()},render:function(t){var e=this;return t("div",{staticClass:"q-tab column flex-center relative-position",class:this.classes,attrs:{"data-tab-name":this.name},on:{click:this.select,keyup:function(t){return 13===t.keyCode&&e.select(t)}},directives:null},this.__getTabContent(t))}},xn={name:"QTabPane",inject:{data:{default:function(){console.error("QTabPane needs to be child of QTabs")}}},props:{name:{type:String,required:!0},keepAlive:Boolean},data:function(){return{shown:!1}},computed:{active:function(){return this.data.tabName===this.name},classes:function(){return{hidden:!this.active,"animate-fade-left":"left"===this.data.direction,"animate-fade-right":"right"===this.data.direction}}},render:function(t){var e=t("div",{staticClass:"q-tab-pane",class:this.classes},this.$slots.default);if(this.keepAlive){if(!this.shown&&!this.active)return;return this.shown=!0,e}if(this.shown=this.active,this.active)return e}};function kn(t){if(t)return"text-"+t}var Sn={name:"QTabs",provide:function(){return{data:this.data,selectTab:this.selectTab,selectTabRouter:this.selectTabRouter}},directives:{TouchSwipe:Ae},props:{value:String,align:{type:String,default:"center",validator:function(t){return["left","center","right","justify"].includes(t)}},position:{type:String,default:"top",validator:function(t){return["top","bottom"].includes(t)}},color:{type:String,default:"primary"},textColor:String,inverted:Boolean,twoLines:Boolean,glossy:Boolean,animated:Boolean,swipeable:Boolean,panesContainerClass:String,underlineColor:String},data:function(){return{currentEl:null,posbar:{width:0,left:0},data:{highlight:!0,tabName:this.value||"",color:this.color,textColor:this.textColor,inverted:this.inverted,underlineClass:kn(this.underlineColor),direction:null}}},watch:{value:function(t){this.selectTab(t)},color:function(t){this.data.color=t},textColor:function(t){this.data.textColor=t},inverted:function(t){this.data.inverted=t},underlineColor:function(t){this.data.underlineClass=kn(t)}},computed:{classes:function(){return["q-tabs-position-"+this.position,"q-tabs-"+(this.inverted?"inverted":"normal"),this.twoLines?"q-tabs-two-lines":""]},innerClasses:function(){var t=["q-tabs-align-"+this.align];return this.glossy&&t.push("glossy"),this.inverted?t.push("text-"+(this.textColor||this.color)):(t.push("bg-"+this.color),t.push("text-"+(this.textColor||"white"))),t},posbarClasses:function(){var t=[];return this.inverted&&t.push("text-"+(this.textColor||this.color)),this.data.highlight&&t.push("highlight"),t}},methods:{go:function(t){var e=0;if(this.data.tabName){var i=this.$refs.scroller.querySelector('[data-tab-name="'+this.data.tabName+'"]');i&&(e=Array.prototype.indexOf.call(this.$refs.scroller.children,i))}var s=this.$refs.scroller.querySelectorAll("[data-tab-name]");(e+=t)>-1&&e<s.length&&this.selectTab(s[e].getAttribute("data-tab-name"))},previous:function(){this.go(-1)},next:function(){this.go(1)},selectTab:function(t){if(this.data.tabName!==t){this.data.tabName=t;var e=this.__getTabElByName(t);if(e)if(this.__scrollToTab(e),this.currentEl=e,this.oldEl){if(this.animated){var i=this.$refs.scroller.children;this.data.direction=Array.prototype.indexOf.call(i,e)<Array.prototype.indexOf.call(i,this.oldEl)?"left":"right"}}else this.oldEl=e;else this.oldEl=null,this.data.direction=null;this.$emit("input",t,this.data.direction),this.$emit("select",t,this.data.direction)}},selectTabRouter:function(t){var e=this,i=t.value,s=t.selectable,n=t.exact,o=t.selected,r=t.priority,a=!this.buffer.length,l=a?-1:this.buffer.findIndex(function(t){return t.value===i});if(l>-1){var c=this.buffer[l];n&&(c.exact=n),s&&(c.selectable=s),o&&(c.selected=o),r&&(c.priority=r)}else this.buffer.push(t);a&&(this.bufferTimer=setTimeout(function(){var t=e.buffer.find(function(t){return t.exact&&t.selected})||e.buffer.find(function(t){return t.selectable&&t.selected})||e.buffer.find(function(t){return t.exact})||e.buffer.filter(function(t){return t.selectable}).sort(function(t,e){return e.priority-t.priority})[0]||e.buffer[0];e.buffer.length=0,e.selectTab(t.value)},100))},__swipe:function(t){this.go("left"===t.direction?1:-1)},__repositionBar:function(){var t=this;clearTimeout(this.timer);var e=!1,i=this.$refs.posbar,s=this.currentEl;if(!1!==this.data.highlight&&(this.data.highlight=!1,e=!0),!s)return this.finalPosbar={width:0,left:0},void this.__setPositionBar(0,0);var n=i.parentNode.offsetLeft;e&&this.oldEl&&this.__setPositionBar(this.oldEl.getBoundingClientRect().width,this.oldEl.offsetLeft-n),this.timer=setTimeout(function(){var e=s.getBoundingClientRect().width,o=s.offsetLeft-n;i.classList.remove("contract"),t.oldEl=s,t.finalPosbar={width:e,left:o},t.__setPositionBar(t.posbar.left<o?o+e-t.posbar.left:t.posbar.left+t.posbar.width-o,t.posbar.left<o?t.posbar.left:o)},20)},__setPositionBar:function(t,e){if(void 0===t&&(t=0),void 0===e&&(e=0),this.posbar.width!==t||this.posbar.left!==e){this.posbar={width:t,left:e};var i=this.$q.i18n.rtl?e+t:e;W(this.$refs.posbar,U("translateX("+i+"px) scaleX("+t+")"))}else this.__updatePosbarTransition()},__updatePosbarTransition:function(){if(this.finalPosbar.width===this.posbar.width&&this.finalPosbar.left===this.posbar.left)return this.posbar={},void(!0!==this.data.highlight&&(this.data.highlight=!0));this.$refs.posbar.classList.add("contract"),this.__setPositionBar(this.finalPosbar.width,this.finalPosbar.left)},__redraw:function(){this.$q.platform.is.desktop&&(this.scrollerWidth=V(this.$refs.scroller),0===this.scrollerWidth&&0===this.$refs.scroller.scrollWidth||(this.scrollerWidth+5<this.$refs.scroller.scrollWidth?(this.$refs.tabs.classList.add("scrollable"),this.scrollable=!0,this.__updateScrollIndicator()):(this.$refs.tabs.classList.remove("scrollable"),this.scrollable=!1)))},__updateScrollIndicator:function(){if(this.$q.platform.is.desktop&&this.scrollable){var t=this.$refs.scroller.scrollLeft+V(this.$refs.scroller)+5>=this.$refs.scroller.scrollWidth?"add":"remove";this.$refs.leftScroll.classList[this.$refs.scroller.scrollLeft<=0?"add":"remove"]("disabled"),this.$refs.rightScroll.classList[t]("disabled")}},__getTabElByName:function(t){var e=this.$children.find(function(e){return e.name===t&&e.$el&&1===e.$el.nodeType});if(e)return e.$el},__findTabAndScroll:function(t,e){var i=this;setTimeout(function(){i.__scrollToTab(i.__getTabElByName(t),e)},200)},__scrollToTab:function(t,e){if(t&&this.scrollable){var i=this.$refs.scroller.getBoundingClientRect(),s=t.getBoundingClientRect(),n=s.width,o=s.left-i.left;o<0?e?this.$refs.scroller.scrollLeft+=o:this.__animScrollTo(this.$refs.scroller.scrollLeft+o):(o+=n-this.$refs.scroller.offsetWidth)>0&&(e?this.$refs.scroller.scrollLeft+=o:this.__animScrollTo(this.$refs.scroller.scrollLeft+o))}},__animScrollTo:function(t){var e=this;this.__stopAnimScroll(),this.__scrollTowards(t),this.scrollTimer=setInterval(function(){e.__scrollTowards(t)&&e.__stopAnimScroll()},5)},__scrollToStart:function(){this.__animScrollTo(0)},__scrollToEnd:function(){this.__animScrollTo(9999)},__stopAnimScroll:function(){clearInterval(this.scrollTimer)},__scrollTowards:function(t){var e=this.$refs.scroller.scrollLeft,i=t<e?-1:1,s=!1;return(e+=5*i)<0?(s=!0,e=0):(-1===i&&e<=t||1===i&&e>=t)&&(s=!0,e=t),this.$refs.scroller.scrollLeft=e,s}},render:function(t){return t("div",{staticClass:"q-tabs flex no-wrap overflow-hidden",class:this.classes},[t("div",{staticClass:"q-tabs-head row",ref:"tabs",class:this.innerClasses},[t("div",{ref:"scroller",staticClass:"q-tabs-scroller row no-wrap"},[this.$slots.title,null]),t("div",{ref:"leftScroll",staticClass:"row flex-center q-tabs-left-scroll",on:{mousedown:this.__scrollToStart,touchstart:this.__scrollToStart,mouseup:this.__stopAnimScroll,mouseleave:this.__stopAnimScroll,touchend:this.__stopAnimScroll}},[t(dt,{props:{name:this.$q.icon.tabs.left}})]),t("div",{ref:"rightScroll",staticClass:"row flex-center q-tabs-right-scroll",on:{mousedown:this.__scrollToEnd,touchstart:this.__scrollToEnd,mouseup:this.__stopAnimScroll,mouseleave:this.__stopAnimScroll,touchend:this.__stopAnimScroll}},[t(dt,{props:{name:this.$q.icon.tabs.right}})])]),t("div",{staticClass:"q-tabs-panes",class:this.panesContainerClass,directives:this.swipeable?[{name:"touch-swipe",value:this.__swipe}]:null},this.$slots.default)])},created:function(){this.timer=null,this.scrollTimer=null,this.bufferTimer=null,this.buffer=[],this.scrollable=!this.$q.platform.is.desktop,this.__redraw=Zi(this.__redraw,50),this.__updateScrollIndicator=Zi(this.__updateScrollIndicator,50)},mounted:function(){var t=this;this.$nextTick(function(){t.$refs.scroller&&(t.$refs.scroller.addEventListener("scroll",t.__updateScrollIndicator,M.passive),window.addEventListener("resize",t.__redraw,M.passive),""!==t.data.tabName&&t.value&&t.selectTab(t.value),t.__redraw(),t.__findTabAndScroll(t.data.tabName,!0))})},beforeDestroy:function(){clearTimeout(this.timer),clearTimeout(this.bufferTimer),this.__stopAnimScroll(),this.$refs.scroller.removeEventListener("scroll",this.__updateScrollIndicator,M.passive),window.removeEventListener("resize",this.__redraw,M.passive),this.__redraw.cancel(),this.__updateScrollIndicator.cancel()}},qn={name:"QTh",props:{props:Object,autoWidth:Boolean},render:function(t){var e,i=this;if(!this.props)return t("td",{class:{"q-table-col-auto-width":this.autoWidth}},this.$slots.default);var s=this.$vnode.key,n=[].concat(this.$slots.default);if(s){if(!(e=this.props.colsMap[s]))return}else e=this.props.col;e.sortable&&n["right"===e.align?"unshift":"push"](t(dt,{props:{name:this.$q.icon.table.arrowUp},staticClass:e.__iconClass}));return t("th",{class:[e.__thClass,{"q-table-col-auto-width":this.autoWidth}],on:e.sortable?{click:function(){i.props.sort(e)}}:null},n)}};function $n(t){return t.page<1&&(t.page=1),void 0!==t.rowsPerPage&&t.rowsPerPage<1&&(t.rowsPerPage=0),t}var Tn={name:"QTable",mixins:[ze,{computed:{marginalsProps:function(){return{pagination:this.computedPagination,pagesNumber:this.pagesNumber,isFirstPage:this.isFirstPage,isLastPage:this.isLastPage,prevPage:this.prevPage,nextPage:this.nextPage,inFullscreen:this.inFullscreen,toggleFullscreen:this.toggleFullscreen}}},methods:{getTop:function(t){var e=this.$scopedSlots.top,i=this.$scopedSlots["top-left"],s=this.$scopedSlots["top-right"],n=this.$scopedSlots["top-selection"],o=this.hasSelectionMode&&n&&this.rowsSelectedNumber>0,r="q-table-top relative-position row items-center",a=[];return e?t("div",{staticClass:r},[e(this.marginalsProps)]):(o?a.push(n(this.marginalsProps)):i?a.push(t("div",{staticClass:"q-table-control"},[i(this.marginalsProps)])):this.title&&a.push(t("div",{staticClass:"q-table-control"},[t("div",{staticClass:"q-table-title"},this.title)])),s&&(a.push(t("div",{staticClass:"q-table-separator col"})),a.push(t("div",{staticClass:"q-table-control"},[s(this.marginalsProps)]))),0!==a.length?t("div",{staticClass:r},a):void 0)}}},{methods:{getTableHeader:function(t){var e=[this.getTableHeaderRow(t)];return this.loading&&e.push(t("tr",{staticClass:"q-table-progress animate-fade"},[t("td",{attrs:{colspan:"100%"}},[t(Is,{props:{color:this.color,indeterminate:!0,height:"2px"}})])])),t("thead",e)},getTableHeaderRow:function(t){var e,i=this,s=this.$scopedSlots.header,n=this.$scopedSlots["header-cell"];if(s)return s(this.addTableHeaderRowMeta({header:!0,cols:this.computedCols,sort:this.sort,colsMap:this.computedColsMap}));e=n?function(t){return n({col:t,cols:i.computedCols,sort:i.sort,colsMap:i.computedColsMap})}:function(e){return t(qn,{key:e.name,props:{props:{col:e,cols:i.computedCols,sort:i.sort,colsMap:i.computedColsMap}},style:e.style,class:e.classes},e.label)};var o=this.computedCols.map(e);return this.singleSelection&&!this.grid?o.unshift(t("th",{staticClass:"q-table-col-auto-width"},[" "])):this.multipleSelection&&o.unshift(t("th",{staticClass:"q-table-col-auto-width"},[t(je,{props:{color:this.color,value:this.someRowsSelected?null:this.allRowsSelected,dark:this.dark},on:{input:function(t){i.someRowsSelected&&(t=!1),i.__updateSelection(i.computedRows.map(function(t){return t[i.rowKey]}),i.computedRows,t)}}})])),t("tr",o)},addTableHeaderRowMeta:function(t){var e=this;return this.multipleSelection&&(Object.defineProperty(t,"selected",{get:function(){return e.someRowsSelected?"some":e.allRowsSelected},set:function(t){e.someRowsSelected&&(t=!1),e.__updateSelection(e.computedRows.map(function(t){return t[e.rowKey]}),e.computedRows,t)}}),t.partialSelected=this.someRowsSelected,t.multipleSelect=!0),t}}},{methods:{getTableBody:function(t){var e=this,i=this.$scopedSlots.body,s=this.$scopedSlots["body-cell"],n=this.$scopedSlots["top-row"],o=this.$scopedSlots["bottom-row"],r=[];return r=i?this.computedRows.map(function(t){var s=t[e.rowKey],n=e.isRowSelected(s);return i(e.addBodyRowMeta({key:s,row:t,cols:e.computedCols,colsMap:e.computedColsMap,__trClass:n?"selected":""}))}):this.computedRows.map(function(i){var n=i[e.rowKey],o=e.isRowSelected(n),r=s?e.computedCols.map(function(t){return s(e.addBodyCellMetaData({row:i,col:t}))}):e.computedCols.map(function(s){var n=e.$scopedSlots["body-cell-"+s.name];return n?n(e.addBodyCellMetaData({row:i,col:s})):t("td",{staticClass:s.__tdClass,style:s.style,class:s.classes},e.getCellValue(s,i))});return e.hasSelectionMode&&r.unshift(t("td",{staticClass:"q-table-col-auto-width"},[t(je,{props:{value:o,color:e.color,dark:e.dark},on:{input:function(t){e.__updateSelection([n],[i],t)}}})])),t("tr",{key:n,class:{selected:o}},r)}),n&&r.unshift(n({cols:this.computedCols})),o&&r.push(o({cols:this.computedCols})),t("tbody",r)},addBodyRowMeta:function(t){var e=this;return this.hasSelectionMode&&Object.defineProperty(t,"selected",{get:function(){return e.isRowSelected(t.key)},set:function(i){e.__updateSelection([t.key],[t.row],i)}}),Object.defineProperty(t,"expand",{get:function(){return!0===e.rowsExpanded[t.key]},set:function(i){e.$set(e.rowsExpanded,t.key,i)}}),t.cols=t.cols.map(function(i){var s=Object.assign({},i);return Object.defineProperty(s,"value",{get:function(){return e.getCellValue(i,t.row)}}),s}),t},addBodyCellMetaData:function(t){var e=this;return Object.defineProperty(t,"value",{get:function(){return e.getCellValue(t.col,t.row)}}),t},getCellValue:function(t,e){var i="function"==typeof t.field?t.field(e):e[t.field];return t.format?t.format(i):i}}},{computed:{navIcon:function(){var t=[this.$q.icon.table.prevPage,this.$q.icon.table.nextPage];return this.$q.i18n.rtl?t.reverse():t}},methods:{getBottom:function(t){if(!this.hideBottom){if(this.nothingToDisplay){var e=this.filter?this.noResultsLabel||this.$q.i18n.table.noResults:this.loading?this.loadingLabel||this.$q.i18n.table.loading:this.noDataLabel||this.$q.i18n.table.noData;return t("div",{staticClass:"q-table-bottom row items-center q-table-nodata"},[t(dt,{props:{name:this.$q.icon.table.warning}}),e])}var i=this.$scopedSlots.bottom;return t("div",{staticClass:"q-table-bottom row items-center",class:i?null:"justify-end"},i?[i(this.marginalsProps)]:this.getPaginationRow(t))}},getPaginationRow:function(t){var e=this,i=this.computedPagination.rowsPerPage,s=this.paginationLabel||this.$q.i18n.table.pagination,n=this.$scopedSlots.pagination;return[t("div",{staticClass:"q-table-control"},[t("div",[this.hasSelectionMode&&this.rowsSelectedNumber>0?(this.selectedRowsLabel||this.$q.i18n.table.selectedRecords)(this.rowsSelectedNumber):""])]),t("div",{staticClass:"q-table-separator col"}),this.rowsPerPageOptions.length>1&&t("div",{staticClass:"q-table-control"},[t("span",{staticClass:"q-table-bottom-item"},[this.rowsPerPageLabel||this.$q.i18n.table.recordsPerPage]),t(Ys,{staticClass:"inline q-table-bottom-item",props:{color:this.color,value:i,options:this.computedRowsPerPageOptions,dark:this.dark,hideUnderline:!0},on:{input:function(t){e.setPagination({page:1,rowsPerPage:t})}}})])||void 0,t("div",{staticClass:"q-table-control"},[n?n(this.marginalsProps):[t("span",{staticClass:"q-table-bottom-item"},[i?s(this.firstRowIndex+1,Math.min(this.lastRowIndex,this.computedRowsNumber),this.computedRowsNumber):s(1,this.computedRowsNumber,this.computedRowsNumber)]),t(Yt,{props:{color:this.color,round:!0,icon:this.navIcon[0],dense:!0,flat:!0,disable:this.isFirstPage},on:{click:this.prevPage}}),t(Yt,{props:{color:this.color,round:!0,icon:this.navIcon[1],dense:!0,flat:!0,disable:this.isLastPage},on:{click:this.nextPage}})]])]}}},{props:{sortMethod:{type:Function,default:function(t,e,i){var s=this.columns.find(function(t){return t.name===e});if(null===s||void 0===s.field)return t;var n=i?-1:1,o="function"==typeof s.field?function(t){return s.field(t)}:function(t){return t[s.field]};return t.sort(function(t,e){var i,r=o(t),a=o(e);return null===r||void 0===r?-1*n:null===a||void 0===a?1*n:s.sort?s.sort(r,a)*n:ke(r)&&ke(a)?(r-a)*n:xe(r)&&xe(a)?function(t,e){return new Date(t)-new Date(e)}(r,a)*n:"boolean"==typeof r&&"boolean"==typeof a?(t-e)*n:(r=(i=[r,a].map(function(t){return(t+"").toLowerCase()}))[0])<(a=i[1])?-1*n:r===a?0:n})}}},computed:{columnToSort:function(){var t=this.computedPagination.sortBy;if(t)return this.columns.find(function(e){return e.name===t})||null}},methods:{sort:function(t){t===Object(t)&&(t=t.name);var e=this.computedPagination,i=e.sortBy,s=e.descending;i!==t?(i=t,s=!1):this.binaryStateSort?s=!s:s?i=null:s=!0,this.setPagination({sortBy:i,descending:s,page:1})}}},{props:{filter:[String,Object],filterMethod:{type:Function,default:function(t,e,i,s){void 0===i&&(i=this.computedCols),void 0===s&&(s=this.getCellValue);var n=e?e.toLowerCase():"";return t.filter(function(t){return i.some(function(e){return-1!==(s(e,t)+"").toLowerCase().indexOf(n)})})}}},watch:{filter:function(){var t=this;this.$nextTick(function(){t.setPagination({page:1},!0)})}}},{props:{pagination:Object,rowsPerPageOptions:{type:Array,default:function(){return[3,5,7,10,15,20,25,50,0]}}},data:function(){return{innerPagination:{sortBy:null,descending:!1,page:1,rowsPerPage:5}}},computed:{computedPagination:function(){return $n(Object.assign({},this.innerPagination,this.pagination))},firstRowIndex:function(){var t=this.computedPagination;return(t.page-1)*t.rowsPerPage},lastRowIndex:function(){var t=this.computedPagination;return t.page*t.rowsPerPage},isFirstPage:function(){return 1===this.computedPagination.page},pagesNumber:function(){return Math.max(1,Math.ceil(this.computedRowsNumber/this.computedPagination.rowsPerPage))},isLastPage:function(){return 0===this.lastRowIndex||this.computedPagination.page>=this.pagesNumber},computedRowsPerPageOptions:function(){var t=this;return this.rowsPerPageOptions.map(function(e){return{label:0===e?t.$q.i18n.table.allRows:""+e,value:e}})}},watch:{pagesNumber:function(t,e){if(t!==e){var i=this.computedPagination.page;t&&!i?this.setPagination({page:1}):t<i&&this.setPagination({page:t})}}},methods:{__sendServerRequest:function(t){this.requestServerInteraction({pagination:t,filter:this.filter})},setPagination:function(t,e){var i=$n(Object.assign({},this.computedPagination,t));!function(t,e){for(var i in e)if(e[i]!==t[i])return!1;return!0}(this.computedPagination,i)?this.isServerSide?this.__sendServerRequest(i):this.pagination?this.$emit("update:pagination",i):this.innerPagination=i:this.isServerSide&&e&&this.__sendServerRequest(i)},prevPage:function(){var t=this.computedPagination.page;t>1&&this.setPagination({page:t-1})},nextPage:function(){var t=this.computedPagination,e=t.page,i=t.rowsPerPage;this.lastRowIndex>0&&e*i<this.computedRowsNumber&&this.setPagination({page:e+1})}},created:function(){this.$emit("update:pagination",Object.assign({},this.computedPagination))}},{props:{selection:{type:String,default:"none",validator:function(t){return["single","multiple","none"].includes(t)}},selected:{type:Array,default:function(){return[]}}},computed:{selectedKeys:function(){var t=this,e={};return this.selected.map(function(e){return e[t.rowKey]}).forEach(function(t){e[t]=!0}),e},hasSelectionMode:function(){return"none"!==this.selection},singleSelection:function(){return"single"===this.selection},multipleSelection:function(){return"multiple"===this.selection},allRowsSelected:function(){var t=this;if(this.multipleSelection)return this.computedRows.length>0&&this.computedRows.every(function(e){return!0===t.selectedKeys[e[t.rowKey]]})},someRowsSelected:function(){var t=this;if(this.multipleSelection)return!this.allRowsSelected&&this.computedRows.some(function(e){return!0===t.selectedKeys[e[t.rowKey]]})},rowsSelectedNumber:function(){return this.selected.length}},methods:{isRowSelected:function(t){return!0===this.selectedKeys[t]},clearSelection:function(){this.$emit("update:selected",[])},__updateSelection:function(t,e,i){var s=this;this.singleSelection?this.$emit("update:selected",i?e:[]):this.$emit("update:selected",i?this.selected.concat(e):this.selected.filter(function(e){return!t.includes(e[s.rowKey])}))}}},{props:{visibleColumns:Array},computed:{computedCols:function(){var t=this,e=this.computedPagination,i=e.sortBy,s=e.descending;return(this.visibleColumns?this.columns.filter(function(e){return e.required||t.visibleColumns.includes(e.name)}):this.columns).map(function(t){return t.align=t.align||"right",t.__iconClass="q-table-sort-icon q-table-sort-icon-"+t.align,t.__thClass="text-"+t.align+(t.sortable?" sortable":"")+(t.name===i?" sorted "+(s?"sort-desc":""):""),t.__tdClass="text-"+t.align,t})},computedColsMap:function(){var t={};return this.computedCols.forEach(function(e){t[e.name]=e}),t}}},{data:function(){return{rowsExpanded:{}}}}],props:{data:{type:Array,default:function(){return[]}},rowKey:{type:String,default:"id"},color:{type:String,default:"grey-8"},grid:Boolean,dense:Boolean,columns:Array,loading:Boolean,title:String,hideHeader:Boolean,hideBottom:Boolean,dark:Boolean,separator:{type:String,default:"horizontal",validator:function(t){return["horizontal","vertical","cell","none"].includes(t)}},binaryStateSort:Boolean,noDataLabel:String,noResultsLabel:String,loadingLabel:String,selectedRowsLabel:Function,rowsPerPageLabel:String,paginationLabel:Function,tableStyle:{type:[String,Array,Object],default:""},tableClass:{type:[String,Array,Object],default:""}},computed:{computedData:function(){var t=this.data.slice().map(function(t,e){return t.__index=e,t});if(0===t.length)return{rowsNumber:0,rows:[]};if(this.isServerSide)return{rows:t};var e=this.computedPagination,i=e.sortBy,s=e.descending,n=e.rowsPerPage;this.filter&&(t=this.filterMethod(t,this.filter,this.computedCols,this.getCellValue)),this.columnToSort&&(t=this.sortMethod(t,i,s));var o=t.length;return n&&(t=t.slice(this.firstRowIndex,this.lastRowIndex)),{rowsNumber:o,rows:t}},computedRows:function(){return this.computedData.rows},computedRowsNumber:function(){return this.isServerSide?this.computedPagination.rowsNumber||0:this.computedData.rowsNumber},nothingToDisplay:function(){return 0===this.computedRows.length},isServerSide:function(){return void 0!==this.computedPagination.rowsNumber}},render:function(t){return t("div",{class:{"q-table-grid":this.grid,"q-table-container":!0,"q-table-dark":this.dark,"q-table-dense":this.dense,fullscreen:this.inFullscreen,scroll:this.inFullscreen}},[this.getTop(t),this.getBody(t),this.getBottom(t)])},methods:{requestServerInteraction:function(t){var e=this;this.$nextTick(function(){e.$emit("request",{pagination:t.pagination||e.computedPagination,filter:t.filter||e.filter,getCellValue:e.getCellValue})})},getBody:function(t){var e=this,i=!this.hideHeader;if(this.grid){var s=this.$scopedSlots.item;if(void 0!==s)return[i&&t("div",{staticClass:"q-table-middle scroll"},[t("table",{staticClass:"q-table"+(this.dark?" q-table-dark":"")},[this.getTableHeader(t)])])||null,t("div",{staticClass:"row"},this.computedRows.map(function(t){var i=t[e.rowKey],n=e.isRowSelected(i);return s(e.addBodyRowMeta({key:i,row:t,cols:e.computedCols,colsMap:e.computedColsMap,__trClass:n?"selected":""}))}))]}return t("div",{staticClass:"q-table-middle scroll",class:this.tableClass,style:this.tableStyle},[t("table",{staticClass:"q-table q-table-"+this.separator+"-separator"+(this.dark?" q-table-dark":"")},[i&&this.getTableHeader(t)||null,this.getTableBody(t)])])}}},Pn={name:"QTr",props:{props:Object},render:function(t){return t("tr",!this.props||this.props.header?{}:{class:this.props.__trClass},this.$slots.default)}},Ln={name:"QTd",props:{props:Object,autoWidth:Boolean},render:function(t){if(!this.props)return t("td",{class:{"q-table-col-auto-width":this.autoWidth}},this.$slots.default);var e,i=this.$vnode.key;if(i){if(!(e=this.props.colsMap[i]))return}else e=this.props.col;return t("td",{class:[e.__tdClass,{"q-table-col-auto-width":this.autoWidth}]},this.$slots.default)}},Mn={name:"QTableColumns",props:{value:{type:Array,required:!0},label:String,columns:{type:Array,required:!0},color:String},computed:{computedOptions:function(){return this.columns.filter(function(t){return!t.required}).map(function(t){return{value:t.name,label:t.label}})}},render:function(t){var e=this;return t(Ys,{props:{multiple:!0,toggle:!0,value:this.value,options:this.computedOptions,displayValue:this.label||this.$q.i18n.table.columns,color:this.color,hideUnderline:!0},on:{input:function(t){e.$emit("input",t)},change:function(t){e.$emit("change",t)}}})}},Bn={name:"QTimeline",provide:function(){return{__timeline:this}},props:{color:{type:String,default:"primary"},responsive:Boolean,noHover:Boolean,dark:Boolean},render:function(t){return t("ul",{staticClass:"q-timeline",class:{"q-timeline-dark":this.dark,"q-timeline-responsive":this.responsive,"q-timeline-hover":!this.noHover}},this.$slots.default)}},En={name:"QTimelineEntry",inject:{__timeline:{default:function(){console.error("QTimelineEntry needs to be child of QTimeline")}}},props:{heading:Boolean,tag:{type:String,default:"h3"},side:{type:String,default:"right",validator:function(t){return["left","right"].includes(t)}},icon:String,color:String,title:String,subtitle:String},computed:{colorClass:function(){return"text-"+(this.color||this.__timeline.color)},classes:function(){return["q-timeline-entry-"+("left"===this.side?"left":"right"),this.icon?"q-timeline-entry-with-icon":""]}},render:function(t){return this.heading?t("div",{staticClass:"q-timeline-heading"},[t("div"),t("div"),t(this.tag,{staticClass:"q-timeline-heading-title"},this.$slots.default)]):t("li",{staticClass:"q-timeline-entry",class:this.classes},[t("div",{staticClass:"q-timeline-subtitle"},[t("span",this.subtitle)]),t("div",{staticClass:"q-timeline-dot",class:this.colorClass},[this.icon?t(dt,{staticClass:"row items-center justify-center",props:{name:this.icon}}):null]),t("div",{staticClass:"q-timeline-content"},[t("h6",{staticClass:"q-timeline-title"},[this.title])].concat(this.$slots.default))])}},On={name:"QToolbar",props:{color:{type:String,default:"primary"},textColor:String,inverted:Boolean,glossy:Boolean},computed:{classes:function(){var t=["q-toolbar-"+(this.inverted?"inverted":"normal")];return this.glossy&&t.push("glossy"),this.inverted?t.push("text-"+(this.textColor||this.color)):(t.push("bg-"+this.color),t.push("text-"+(this.textColor||"white"))),t}},render:function(t){return t("div",{staticClass:"q-toolbar row no-wrap items-center relative-position",class:this.classes},this.$slots.default)}},Nn={name:"QToolbarTitle",props:{shrink:Boolean},render:function(t){return t("div",{staticClass:"q-toolbar-title",class:this.shrink?"col-auto":null},[this.$slots.default,this.$slots.subtitle?t("div",{staticClass:"q-toolbar-subtitle"},this.$slots.subtitle):null])}},zn={name:"QTree",directives:{Ripple:Ht},props:{nodes:Array,nodeKey:{type:String,required:!0},labelKey:{type:String,default:"label"},color:{type:String,default:"grey"},controlColor:String,textColor:String,dark:Boolean,icon:String,tickStrategy:{type:String,default:"none",validator:function(t){return["none","strict","leaf","leaf-filtered"].includes(t)}},ticked:Array,expanded:Array,selected:{},defaultExpandAll:Boolean,accordion:Boolean,filter:String,filterMethod:{type:Function,default:function(t,e){var i=e.toLowerCase();return t[this.labelKey]&&t[this.labelKey].toLowerCase().indexOf(i)>-1}},noNodesLabel:String,noResultsLabel:String},computed:{hasRipple:function(){return!1},classes:function(){return["text-"+this.color,{"q-tree-dark":this.dark}]},hasSelection:function(){return void 0!==this.selected},computedIcon:function(){return this.icon||this.$q.icon.tree.icon},computedControlColor:function(){return this.controlColor||this.color},contentClass:function(){return"text-"+(this.textColor||(this.dark?"white":"black"))},meta:function(){var t=this,e={},i=function(s,n){var o=s.tickStrategy||(n?n.tickStrategy:t.tickStrategy),r=s[t.nodeKey],a=s.children&&s.children.length>0,l=!a,c=!s.disabled&&t.hasSelection&&!1!==s.selectable,h=!s.disabled&&!1!==s.expandable,u="none"!==o,d="strict"===o,p="leaf-filtered"===o,f="leaf"===o||"leaf-filtered"===o,m=!s.disabled&&!1!==s.tickable;f&&m&&n&&!n.tickable&&(m=!1);var g=s.lazy;g&&t.lazy[r]&&(g=t.lazy[r]);var v={key:r,parent:n,isParent:a,isLeaf:l,lazy:g,disabled:s.disabled,link:c||h&&(a||!0===g),children:[],matchesFilter:!t.filter||t.filterMethod(s,t.filter),selected:r===t.selected&&c,selectable:c,expanded:!!a&&t.innerExpanded.includes(r),expandable:h,noTick:s.noTick||!d&&g&&"loaded"!==g,tickable:m,tickStrategy:o,hasTicking:u,strictTicking:d,leafFilteredTicking:p,leafTicking:f,ticked:d?t.innerTicked.includes(r):!!l&&t.innerTicked.includes(r)};if(e[r]=v,a&&(v.children=s.children.map(function(t){return i(t,v)}),t.filter&&(v.matchesFilter||(v.matchesFilter=v.children.some(function(t){return t.matchesFilter})),v.matchesFilter&&!v.noTick&&!v.disabled&&v.tickable&&p&&v.children.every(function(t){return!t.matchesFilter||t.noTick||!t.tickable})&&(v.tickable=!1)),v.matchesFilter&&(v.noTick||d||!v.children.every(function(t){return t.noTick})||(v.noTick=!0),f&&(v.ticked=!1,v.indeterminate=v.children.some(function(t){return t.indeterminate}),!v.indeterminate)))){var b=v.children.reduce(function(t,e){return e.ticked?t+1:t},0);b===v.children.length?v.ticked=!0:b>0&&(v.indeterminate=!0)}return v};return this.nodes.forEach(function(t){return i(t,null)}),e}},data:function(){return{lazy:{},innerTicked:this.ticked||[],innerExpanded:this.expanded||[]}},watch:{ticked:function(t){this.innerTicked=t},expanded:function(t){this.innerExpanded=t}},methods:{getNodeByKey:function(t){var e=this,i=[].reduce,s=function(n,o){return n||!o?n:Array.isArray(o)?i.call(Object(o),s,n):o[e.nodeKey]===t?o:o.children?s(null,o.children):void 0};return s(null,this.nodes)},getTickedNodes:function(){var t=this;return this.innerTicked.map(function(e){return t.getNodeByKey(e)})},getExpandedNodes:function(){var t=this;return this.innerExpanded.map(function(e){return t.getNodeByKey(e)})},isExpanded:function(t){return!(!t||!this.meta[t])&&this.meta[t].expanded},collapseAll:function(){void 0!==this.expanded?this.$emit("update:expanded",[]):this.innerExpanded=[]},expandAll:function(){var t=this,e=this.innerExpanded,i=function(s){s.children&&s.children.length>0&&!1!==s.expandable&&!0!==s.disabled&&(e.push(s[t.nodeKey]),s.children.forEach(i))};this.nodes.forEach(i),void 0!==this.expanded?this.$emit("update:expanded",e):this.innerExpanded=e},setExpanded:function(t,e,i,s){var n=this;if(void 0===i&&(i=this.getNodeByKey(t)),void 0===s&&(s=this.meta[t]),s.lazy&&"loaded"!==s.lazy){if("loading"===s.lazy)return;this.$set(this.lazy,t,"loading"),this.$emit("lazy-load",{node:i,key:t,done:function(e){n.lazy[t]="loaded",e&&(i.children=e),n.$nextTick(function(){var e=n.meta[t];e&&e.isParent&&n.__setExpanded(t,!0)})},fail:function(){n.$delete(n.lazy,t)}})}else s.isParent&&s.expandable&&this.__setExpanded(t,e)},__setExpanded:function(t,e){var i=this,s=this.innerExpanded,n=void 0!==this.expanded;if(n&&(s=s.slice()),e){if(this.accordion&&this.meta[t]){var o=[];this.meta[t].parent?this.meta[t].parent.children.forEach(function(e){e.key!==t&&e.expandable&&o.push(e.key)}):this.nodes.forEach(function(e){var s=e[i.nodeKey];s!==t&&o.push(s)}),o.length>0&&(s=s.filter(function(t){return!o.includes(t)}))}s=s.concat([t]).filter(function(t,e,i){return i.indexOf(t)===e})}else s=s.filter(function(e){return e!==t});n?this.$emit("update:expanded",s):this.innerExpanded=s},isTicked:function(t){return!(!t||!this.meta[t])&&this.meta[t].ticked},setTicked:function(t,e){var i=this.innerTicked,s=void 0!==this.ticked;s&&(i=i.slice()),i=e?i.concat(t).filter(function(t,e,i){return i.indexOf(t)===e}):i.filter(function(e){return!t.includes(e)}),s&&this.$emit("update:ticked",i)},__getSlotScope:function(t,e,i){var s=this,n={tree:this,node:t,key:i,color:this.color,dark:this.dark};return Object.defineProperty(n,"expanded",{get:function(){return e.expanded},set:function(t){t!==e.expanded&&s.setExpanded(i,t)}}),Object.defineProperty(n,"ticked",{get:function(){return e.ticked},set:function(t){t!==e.ticked&&s.setTicked([i],t)}}),n},__getChildren:function(t,e){var i=this;return(this.filter?e.filter(function(t){return i.meta[t[i.nodeKey]].matchesFilter}):e).map(function(e){return i.__getNode(t,e)})},__getNodeMedia:function(t,e){return e.icon?t(dt,{staticClass:"q-tree-icon q-mr-sm",props:{name:e.icon,color:e.iconColor}}):e.img||e.avatar?t("img",{staticClass:"q-tree-img q-mr-sm",class:{avatar:e.avatar},attrs:{src:e.img||e.avatar}}):void 0},__getNode:function(t,e){var i=this,s=e[this.nodeKey],n=this.meta[s],o=e.header&&this.$scopedSlots["header-"+e.header]||this.$scopedSlots["default-header"],r=n.isParent?this.__getChildren(t,e.children):[],a=r.length>0||n.lazy&&"loaded"!==n.lazy,l=e.body&&this.$scopedSlots["body-"+e.body]||this.$scopedSlots["default-body"],c=o||l?this.__getSlotScope(e,n,s):null;return l&&(l=t("div",{staticClass:"q-tree-node-body relative-position"},[t("div",{class:this.contentClass},[l(c)])])),t("div",{key:s,staticClass:"q-tree-node",class:{"q-tree-node-parent":a,"q-tree-node-child":!a}},[t("div",{staticClass:"q-tree-node-header relative-position row no-wrap items-center",class:{"q-tree-node-link":n.link,"q-tree-node-selected":n.selected,disabled:n.disabled},on:{click:function(){i.__onClick(e,n)}},directives:null},["loading"===n.lazy?t(Ut,{staticClass:"q-tree-node-header-media q-mr-xs",props:{color:this.computedControlColor}}):a?t(dt,{staticClass:"q-tree-arrow q-mr-xs transition-generic",class:{"q-tree-arrow-rotate":n.expanded},props:{name:this.computedIcon},nativeOn:{click:function(t){i.__onExpandClick(e,n,t)}}}):null,t("span",{staticClass:"row no-wrap items-center",class:this.contentClass},[n.hasTicking&&!n.noTick?t(je,{staticClass:"q-mr-xs",props:{value:n.indeterminate?null:n.ticked,color:this.computedControlColor,dark:this.dark,keepColor:!0,disable:!n.tickable},on:{input:function(t){i.__onTickedClick(e,n,t)}}}):null,o?o(c):[this.__getNodeMedia(t,e),t("span",e[this.labelKey])]])]),a?t(Ze,[t("div",{directives:[{name:"show",value:n.expanded}],staticClass:"q-tree-node-collapsible",class:"text-"+this.color},[l,t("div",{staticClass:"q-tree-children",class:{disabled:n.disabled}},r)])]):l])},__onClick:function(t,e){this.hasSelection?e.selectable&&this.$emit("update:selected",e.key!==this.selected?e.key:null):this.__onExpandClick(t,e),"function"==typeof t.handler&&t.handler(t)},__onExpandClick:function(t,e,i){void 0!==i&&i.stopPropagation(),this.setExpanded(e.key,!e.expanded,t,e)},__onTickedClick:function(t,e,i){if(e.indeterminate&&i&&(i=!1),e.strictTicking)this.setTicked([e.key],i);else if(e.leafTicking){var s=[],n=function(t){t.isParent?(i||t.noTick||!t.tickable||s.push(t.key),t.leafTicking&&t.children.forEach(n)):t.noTick||!t.tickable||t.leafFilteredTicking&&!t.matchesFilter||s.push(t.key)};n(e),this.setTicked(s,i)}}},render:function(t){var e=this.__getChildren(t,this.nodes);return t("div",{staticClass:"q-tree relative-position",class:this.classes},0===e.length?this.filter?this.noResultsLabel||this.$q.i18n.tree.noResults:this.noNodesLabel||this.$q.i18n.tree.noNodes:e)},created:function(){this.defaultExpandAll&&this.expandAll()}};function Dn(t){t.__doneUploading=!1,t.__failed=!1,t.__uploaded=0,t.__progress=0}var Rn={name:"QUploader",mixins:[Ke],props:{name:{type:String,default:"file"},headers:Object,url:{type:String,required:!0},urlFactory:{type:Function,required:!1},uploadFactory:Function,additionalFields:{type:Array,default:function(){return[]}},noContentType:Boolean,method:{type:String,default:"POST"},filter:Function,extensions:String,multiple:Boolean,hideUploadButton:Boolean,hideUploadProgress:Boolean,noThumbnails:Boolean,autoExpand:Boolean,expandStyle:[Array,String,Object],expandClass:[Array,String,Object],withCredentials:Boolean,sendRaw:{type:Boolean,default:!1}},data:function(){return{queue:[],files:[],uploading:!1,uploadedSize:0,totalSize:0,xhrs:[],focused:!1,dnd:!1,expanded:!1}},computed:{queueLength:function(){return this.queue.length},hasExpandedContent:function(){return this.files.length>0},label:function(){var t=$t(this.totalSize);return this.uploading?this.progress.toFixed(2)+"% ("+$t(this.uploadedSize)+" / "+t+")":this.queueLength+" ("+t+")"},progress:function(){return this.totalSize?Math.min(99.99,this.uploadedSize/this.totalSize*100):0},addDisabled:function(){return!this.multiple&&this.queueLength>=1},filesStyle:function(){if(this.maxHeight)return{maxHeight:this.maxHeight}},dndClass:function(){var t=["text-"+this.color];return this.isInverted&&t.push("inverted"),t},classes:function(){return{"q-uploader-expanded":this.expanded,"q-uploader-dark":this.dark,"q-uploader-files-no-border":this.isInverted||!this.hideUnderline}},progressColor:function(){return this.dark?"white":"grey"},computedExtensions:function(){if(this.extensions)return this.extensions.split(",").map(function(t){return(t=t.trim()).endsWith("/*")&&(t=t.slice(0,t.length-1)),t})}},watch:{hasExpandedContent:function(t){!1===t?this.expanded=!1:this.autoExpand&&(this.expanded=!0)}},methods:{add:function(t){t&&this.__add(null,t)},__onDragOver:function(t){H(t),this.dnd=!0},__onDragLeave:function(t){H(t),this.dnd=!1},__onDrop:function(t){H(t),this.dnd=!1;var e=t.dataTransfer.files;0!==e.length&&(e=this.multiple?e:[e[0]],this.extensions&&0===(e=this.__filter(e)).length||this.__add(null,e))},__filter:function(t){var e=this;return Array.prototype.filter.call(t,function(t){return e.computedExtensions.some(function(e){return t.type.toUpperCase().startsWith(e.toUpperCase())||t.name.toUpperCase().endsWith(e.toUpperCase())})})},__add:function(t,e){var i=this;if(!this.addDisabled){e=Array.prototype.slice.call(e||t.target.files),this.$refs.file.value="";var s=[];e=e.filter(function(t){return!i.queue.some(function(e){return t.name===e.name})}),"function"==typeof this.filter&&(e=this.filter(e)),(e=e.map(function(t){if(Dn(t),t.__size=$t(t.size),t.__timestamp=(new Date).getTime(),i.noThumbnails||!t.type.toUpperCase().startsWith("IMAGE"))i.queue.push(t);else{var e=new FileReader,n=new Promise(function(s,n){e.onload=function(e){var n=new Image;n.src=e.target.result,t.__img=n,i.queue.push(t),i.__computeTotalSize(),s(!0)},e.onerror=function(t){n(t)}});e.readAsDataURL(t),s.push(n)}return t})).length>0&&(this.files=this.files.concat(e),Promise.all(s).then(function(){i.$emit("add",e)}),this.__computeTotalSize())}},__computeTotalSize:function(){this.totalSize=this.queueLength?this.queue.map(function(t){return t.size}).reduce(function(t,e){return t+e}):0},__remove:function(t){var e=t.name,i=t.__doneUploading;this.uploading&&!i?(this.$emit("remove:abort",t,t.xhr),t.xhr&&t.xhr.abort(),this.uploadedSize-=t.__uploaded):this.$emit("remove:"+(i?"done":"cancel"),t,t.xhr),i||(this.queue=this.queue.filter(function(t){return t.name!==e})),t.__removed=!0,this.files=this.files.filter(function(t){return t.name!==e}),this.files.length||(this.uploading=!1),this.__computeTotalSize()},__pick:function(){!this.addDisabled&&this.$q.platform.is.mozilla&&this.$refs.file.click()},__getUploadPromise:function(t){var e=this;if(Dn(t),this.uploadFactory){var i=function(i){var s=i*t.size;e.uploadedSize+=s-t.__uploaded,t.__uploaded=s,t.__progress=Math.min(99,parseInt(100*i,10)),e.$forceUpdate()};return new Promise(function(s,n){e.uploadFactory(t,i).then(function(t){t.__doneUploading=!0,t.__progress=100,e.$emit("uploaded",t),e.$forceUpdate(),s(t)}).catch(function(i){t.__failed=!0,e.$emit("fail",t),e.$forceUpdate(),n(i)})})}var s=new FormData,n=new XMLHttpRequest;try{this.additionalFields.forEach(function(t){s.append(t.name,t.value)}),!0!==this.noContentType&&s.append("Content-Type",t.type||"application/octet-stream"),s.append(this.name,t)}catch(t){return}return t.xhr=n,new Promise(function(i,o){n.upload.addEventListener("progress",function(i){if(!t.__removed){i.percent=i.total?i.loaded/i.total:0;var s=i.percent*t.size;e.uploadedSize+=s-t.__uploaded,t.__uploaded=s,t.__progress=Math.min(99,parseInt(100*i.percent,10))}},!1),n.onreadystatechange=function(){n.readyState<4||(n.status&&n.status<400?(t.__doneUploading=!0,t.__progress=100,e.$emit("uploaded",t,n),i(t)):(t.__failed=!0,e.$emit("fail",t,n),o(n)))},n.onerror=function(){t.__failed=!0,e.$emit("fail",t,n),o(n)},(e.urlFactory?e.urlFactory(t):Promise.resolve(e.url)).then(function(i){n.open(e.method,i,!0),e.withCredentials&&(n.withCredentials=!0),e.headers&&Object.keys(e.headers).forEach(function(t){n.setRequestHeader(t,e.headers[t])}),e.xhrs.push(n),e.sendRaw?n.send(t):n.send(s)})})},pick:function(){this.addDisabled||this.$refs.file.click()},upload:function(){var t=this,e=this.queueLength;if(!this.disable&&0!==e){var i=0;this.uploadedSize=0,this.uploading=!0,this.xhrs=[],this.$emit("start");var s=function(){++i===e&&(t.uploading=!1,t.xhrs=[],t.queue=t.queue.filter(function(t){return!t.__doneUploading}),t.__computeTotalSize(),t.$emit("finish"))};this.queue.map(function(e){return t.__getUploadPromise(e)}).forEach(function(t){t.then(s).catch(s)})}},abort:function(){this.xhrs.forEach(function(t){t.abort()}),this.uploading=!1,this.$emit("abort")},reset:function(){this.abort(),this.files=[],this.queue=[],this.expanded=!1,this.__computeTotalSize(),this.$emit("reset")}},render:function(t){var e=this,i=[t("div",{staticClass:"col q-input-target ellipsis",class:this.alignClass},[this.label])];return this.uploading?i.push(t(Ut,{slot:"after",staticClass:"q-if-end self-center",props:{size:"24px"}}),t(dt,{slot:"after",staticClass:"q-if-end self-center q-if-control",props:{name:this.$q.icon.uploader["clear"+(this.isInverted?"Inverted":"")]},nativeOn:{click:this.abort}})):(i.push(t(dt,{slot:"after",staticClass:"q-uploader-pick-button self-center q-if-control relative-position overflow-hidden",props:{name:this.$q.icon.uploader.add},attrs:{disabled:this.addDisabled}},[t("input",{ref:"file",staticClass:"q-uploader-input absolute-full cursor-pointer",attrs:Object.assign({type:"file",accept:this.extensions},this.multiple?{multiple:!0}:{}),on:{change:this.__add}})])),this.hideUploadButton||i.push(t(dt,{slot:"after",staticClass:"q-if-control self-center",props:{name:this.$q.icon.uploader.upload},attrs:{disabled:0===this.queueLength},nativeOn:{click:this.upload}}))),this.hasExpandedContent&&i.push(t(dt,{slot:"after",staticClass:"q-if-control generic_transition self-center",class:{"rotate-180":this.expanded},props:{name:this.$q.icon.uploader.expand},nativeOn:{click:function(){e.expanded=!e.expanded}}})),t("div",{staticClass:"q-uploader relative-position",class:this.classes,on:{dragover:this.__onDragOver}},[t(Je,{ref:"input",props:{prefix:this.prefix,suffix:this.suffix,stackLabel:this.stackLabel,floatLabel:this.floatLabel,error:this.error,warning:this.warning,readonly:this.readonly,inverted:this.inverted,invertedLight:this.invertedLight,dark:this.dark,hideUnderline:this.hideUnderline,before:this.before,after:this.after,color:this.color,align:this.align,noParentField:this.noParentField,length:this.queueLength,additionalLength:!0}},i),t(Ze,[t("div",{class:this.expandClass,style:this.expandStyle,directives:[{name:"show",value:this.expanded}]},[t(pt,{staticClass:"q-uploader-files q-py-none scroll",style:this.filesStyle,props:{dark:this.dark}},this.files.map(function(i){return t(yt,{key:i.name+i.__timestamp,staticClass:"q-uploader-file q-pa-xs"},[!e.hideUploadProgress&&t(Is,{staticClass:"q-uploader-progress-bg absolute-full",props:{color:i.__failed?"negative":e.progressColor,percentage:i.__progress,height:"100%"}})||void 0,!e.hideUploadProgress&&t("div",{staticClass:"q-uploader-progress-text absolute"},[i.__progress+"%"])||void 0,t(wt,{props:i.__img?{image:i.__img.src}:{icon:e.$q.icon.uploader.file,color:e.color}}),t(xt,{props:{label:i.name,sublabel:i.__size}}),t(wt,{props:{right:!0}},[t(Ge,{staticClass:"cursor-pointer",props:{icon:e.$q.icon.uploader[i.__doneUploading?"done":"clear"],color:e.color},nativeOn:{click:function(){e.__remove(i)}}})])])}))])]),this.dnd&&t("div",{staticClass:"q-uploader-dnd flex row items-center justify-center absolute-full",class:this.dndClass,on:{dragenter:H,dragover:H,dragleave:this.__onDragLeave,drop:this.__onDrop}})||void 0])}},In={name:"QVideo",props:{src:{type:String,required:!0}},computed:{iframeData:function(){return{attrs:{src:this.src,frameborder:"0",allowfullscreen:!0}}}},render:function(t){return t("div",{staticClass:"q-video"},[t("iframe",this.iframeData)])}},Hn=Object.freeze({QActionSheet:St,QAjaxBar:Dt,QAlert:Jt,QAutocomplete:ue,QBreadcrumbs:de,QBreadcrumbsEl:pe,QBtn:Yt,QBtnGroup:fe,QBtnDropdown:me,QBtnToggle:ge,QCard:ve,QCardTitle:{name:"QCardTitle",render:function(t){return t("div",{staticClass:"q-card-primary q-card-container row no-wrap"},[t("div",{staticClass:"col column"},[t("div",{staticClass:"q-card-title"},this.$slots.default),t("div",{staticClass:"q-card-subtitle"},[this.$slots.subtitle])]),t("div",{staticClass:"col-auto self-center q-card-title-extra"},[this.$slots.right])])}},QCardMain:{name:"QCardMain",render:function(t){return t("div",{staticClass:"q-card-main q-card-container"},this.$slots.default)}},QCardActions:be,QCardMedia:_e,QCardSeparator:ye,QCarousel:De,QCarouselSlide:Re,QCarouselControl:Ie,QChatMessage:He,QCheckbox:je,QChip:Ve,QChipsInput:Xe,QCollapsible:ei,QColor:di,QColorPicker:hi,QContextMenu:pi,QDatetime:ji,QDatetimePicker:Fi,QDialog:Gi,QEditor:fs,QFab:gs,QFabAction:vs,QField:bs,QIcon:dt,QInfiniteScroll:_s,QInnerLoading:ys,QInput:Ki,QInputFrame:Je,QJumbotron:ws,QKnob:Cs,QLayout:ks,QLayoutDrawer:Ss,QLayoutFooter:$s,QLayoutHeader:Ts,QPage:Ps,QPageContainer:Ls,QPageSticky:Ms,QItem:yt,QItemSeparator:kt,QItemMain:xt,QItemSide:wt,QItemTile:Ge,QItemWrapper:ce,QList:pt,QListHeader:Bs,QModal:ut,QModalLayout:Es,QNoSsr:Os,QResizeObservable:Wi,QScrollObservable:xs,QWindowResizeObservable:qs,QOptionGroup:Xi,QPagination:Ns,QParallax:zs,QPopover:ae,QPopupEdit:Ds,QProgress:Is,QPullToRefresh:Hs,QRadio:Ui,QRange:js,QRating:Vs,QScrollArea:Ws,QSearch:Ks,QSelect:Ys,QSlideTransition:Ze,QSlider:ai,QSpinner:Ut,QSpinnerAudio:Js,QSpinnerBall:Xs,QSpinnerBars:Gs,QSpinnerCircles:Zs,QSpinnerComment:tn,QSpinnerCube:en,QSpinnerDots:sn,QSpinnerFacebook:nn,QSpinnerGears:on,QSpinnerGrid:rn,QSpinnerHearts:an,QSpinnerHourglass:ln,QSpinnerInfinity:cn,QSpinnerIos:Kt,QSpinnerMat:hn,QSpinnerOval:un,QSpinnerPie:dn,QSpinnerPuff:pn,QSpinnerRadio:fn,QSpinnerRings:mn,QSpinnerTail:gn,QStep:bn,QStepper:_n,QStepperNavigation:{name:"QStepperNavigation",render:function(t){return t("div",{staticClass:"q-stepper-nav order-last row items-center"},[this.$slots.left,t("div",{staticClass:"col"}),this.$slots.default])}},QRouteTab:wn,QTab:Cn,QTabPane:xn,QTabs:Sn,QTable:Tn,QTh:qn,QTr:Pn,QTd:Ln,QTableColumns:Mn,QTimeline:Bn,QTimelineEntry:En,QToggle:Yi,QToolbar:On,QToolbarTitle:Nn,QTooltip:ts,QTree:zn,QUploader:Rn,QVideo:In});function An(t,e){var i=e.value,s=(e.modifiers,t.__qbacktotop);if(i){if("number"==typeof i)return s.offset=i,void s.update();if(i&&Object(i)!==i)console.error("v-back-to-top requires an object {offset, duration} as parameter",t);else{if(i.offset){if("number"!=typeof i.offset)return void console.error("v-back-to-top requires a number as offset",t);s.offset=i.offset}if(i.duration){if("number"!=typeof i.duration)return void console.error("v-back-to-top requires a number as duration",t);s.duration=i.duration}s.update()}}else s.update()}var Fn={name:"back-to-top",bind:function(t){var e={offset:200,duration:300,updateNow:function(){var i=G(e.scrollTarget)<=e.offset;i!==t.classList.contains("hidden")&&t.classList[i?"add":"remove"]("hidden")},goToTop:function(){et(e.scrollTarget,0,e.animate?e.duration:0)},goToTopKey:function(t){13===t.keyCode&&et(e.scrollTarget,0,e.animate?e.duration:0)}};e.update=Zi(e.updateNow,25),t.classList.add("hidden"),t.__qbacktotop=e},inserted:function(t,e){var i=t.__qbacktotop;i.scrollTarget=X(t),i.animate=e.modifiers.animate,An(t,e),i.scrollTarget.addEventListener("scroll",i.update,M.passive),window.addEventListener("resize",i.update,M.passive),t.addEventListener("click",i.goToTop),t.addEventListener("keyup",i.goToTopKey)},update:function(t,e){JSON.stringify(e.oldValue)!==JSON.stringify(e.value)?An(t,e):setTimeout(function(){t.__qbacktotop&&t.__qbacktotop.updateNow()},0)},unbind:function(t){var e=t.__qbacktotop;e&&(e.scrollTarget.removeEventListener("scroll",e.update,M.passive),window.removeEventListener("resize",e.update,M.passive),t.removeEventListener("click",e.goToTop),t.removeEventListener("keyup",e.goToTopKey),delete t.__qbacktotop)}},Qn={name:"go-back",bind:function(t,e,i){var s=e.value,n=e.modifiers,o={value:s,position:window.history.length-1,single:n.single};l.is.cordova?o.goBack=function(){i.context.$router.go(o.single?-1:o.position-window.history.length)}:o.goBack=function(){i.context.$router.replace(o.value)},o.goBackKey=function(t){13===t.keyCode&&o.goBack(t)},t.__qgoback=o,t.addEventListener("click",o.goBack),t.addEventListener("keyup",o.goBackKey)},update:function(t,e){e.oldValue!==e.value&&(t.__qgoback.value=e.value)},unbind:function(t){var e=t.__qgoback;e&&(t.removeEventListener("click",e.goBack),t.removeEventListener("keyup",e.goBackKey),delete t.__qgoback)}};function jn(t,e){var i=t.__qscrollfire;if("function"!=typeof e.value)return i.scrollTarget.removeEventListener("scroll",i.scroll),void console.error("v-scroll-fire requires a function as parameter",t);i.handler=e.value,"function"!=typeof e.oldValue&&(i.scrollTarget.addEventListener("scroll",i.scroll,M.passive),i.scroll())}var Vn={name:"scroll-fire",bind:function(t,e){var i={scroll:Zi(function(){var e,s;i.scrollTarget===window?(s=t.getBoundingClientRect().bottom,e=window.innerHeight):(s=F(t).top+j(t),e=F(i.scrollTarget).top+j(i.scrollTarget)),s>0&&s<e&&(i.scrollTarget.removeEventListener("scroll",i.scroll,M.passive),i.handler(t))},25)};t.__qscrollfire=i},inserted:function(t,e){t.__qscrollfire.scrollTarget=X(t),jn(t,e)},update:function(t,e){e.value!==e.oldValue&&jn(t,e)},unbind:function(t){var e=t.__qscrollfire;e&&(e.scrollTarget.removeEventListener("scroll",e.scroll,M.passive),delete t.__qscrollfire)}};function Wn(t,e){var i=t.__qscroll;if("function"!=typeof e.value)return i.scrollTarget.removeEventListener("scroll",i.scroll,M.passive),void console.error("v-scroll requires a function as parameter",t);i.handler=e.value,"function"!=typeof e.oldValue&&i.scrollTarget.addEventListener("scroll",i.scroll,M.passive)}var Kn={name:"scroll",bind:function(t,e){var i={scroll:function(){var t;i.handler(G(i.scrollTarget),(t=i.scrollTarget)===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:t.scrollLeft)}};t.__qscroll=i},inserted:function(t,e){t.__qscroll.scrollTarget=X(t),Wn(t,e)},update:function(t,e){e.oldValue!==e.value&&Wn(t,e)},unbind:function(t){var e=t.__qscroll;e&&(e.scrollTarget.removeEventListener("scroll",e.scroll,M.passive),delete t.__qscroll)}};function Un(t,e){var i=t.__qtouchhold;i.duration=parseInt(e.arg,10)||600,e.oldValue!==e.value&&(i.handler=e.value)}var Yn={name:"touch-hold",bind:function(t,e){var i=!e.modifiers.noMouse,s=e.modifiers.stop,n=e.modifiers.prevent,o={mouseStart:function(t){B(t)&&(document.addEventListener("mousemove",o.mouseAbort),document.addEventListener("mouseup",o.mouseAbort),o.start(t))},mouseAbort:function(t){document.removeEventListener("mousemove",o.mouseAbort),document.removeEventListener("mouseup",o.mouseAbort),o.abort(t)},start:function(t){var e=(new Date).getTime();s&&t.stopPropagation(),n&&t.preventDefault(),o.timer=setTimeout(function(){i&&(document.removeEventListener("mousemove",o.mouseAbort),document.removeEventListener("mouseup",o.mouseAbort)),o.handler({evt:t,position:O(t),duration:(new Date).getTime()-e})},o.duration)},abort:function(t){clearTimeout(o.timer),o.timer=null}};t.__qtouchhold=o,Un(t,e),i&&t.addEventListener("mousedown",o.mouseStart),t.addEventListener("touchstart",o.start),t.addEventListener("touchmove",o.abort),t.addEventListener("touchend",o.abort)},update:function(t,e){Un(t,e)},unbind:function(t,e){var i=t.__qtouchhold;i&&(t.removeEventListener("touchstart",i.start),t.removeEventListener("touchend",i.abort),t.removeEventListener("touchmove",i.abort),t.removeEventListener("mousedown",i.mouseStart),document.removeEventListener("mousemove",i.mouseAbort),document.removeEventListener("mouseup",i.mouseAbort),delete t.__qtouchhold)}},Jn=Object.freeze({BackToTop:Fn,CloseOverlay:{name:"close-overlay",bind:function(t,e,i){var s=function(t){for(var e=i.componentInstance;e=e.$parent;){var s=e.$options.name;if("QPopover"===s||"QModal"===s){e.hide(t);break}}},n=function(t){13===t.keyCode&&s(t)};t.__qclose={handler:s,handlerKey:n},t.addEventListener("click",s),t.addEventListener("keyup",n)},unbind:function(t){var e=t.__qclose;e&&(t.removeEventListener("click",e.handler),t.removeEventListener("keyup",e.handlerKey),delete t.__qclose)}},GoBack:Qn,Ripple:Ht,ScrollFire:Vn,Scroll:Kn,TouchHold:Yn,TouchPan:Ce,TouchSwipe:Ae});function Xn(t,e){return function(s,n){var o=s.className,r=function(t,e){var i={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&-1===e.indexOf(s)&&(i[s]=t[s]);return i}(s,["className"]);return new Promise(function(s,a){if(i)return s();var l=document.createElement("div");document.body.appendChild(l);var c=function(t){s(t),u.$destroy()},h=function(t){a(t||new Error),u.$destroy()},u=new e({el:l,data:function(){return{props:r}},render:function(e){return e(t,{ref:"modal",props:r,class:o,on:{ok:c,cancel:h}})},mounted:function(){this.$refs.modal.show()}});n&&n.then(c,h)})}}var Gn,Zn={install:function(t){var e=t.$q,i=t.Vue;this.create=e.actionSheet=Xn(St,i)}};function to(t){void 0===Gn&&(Gn=l.is.winphone?"msapplication-navbutton-color":l.is.safari?"apple-mobile-web-app-status-bar-style":"theme-color");var e=function(t){var e=document.getElementsByTagName("META");for(var i in e)if(e[i].name===t)return e[i]}(Gn),i=void 0===e;i&&(e=document.createElement("meta")).setAttribute("name",Gn),e.setAttribute("content",t),i&&document.head.appendChild(e)}var eo={install:function(t){var e=t.$q,s=(t.Vue,t.cfg);this.set=!i&&l.is.mobile&&(l.is.cordova||l.is.winphone||l.is.safari||l.is.webkit||l.is.vivaldi)?function(t){var e=t||y("primary");l.is.cordova&&window.StatusBar?window.StatusBar.backgroundColorByHexString(e):to(e)}:function(){},e.addressbarColor=this,s.addressbarColor&&this.set(s.addressbarColor)}},io={},so={isCapable:!1,isActive:!1,request:function(t){this.isCapable&&!this.isActive&&(t=t||document.documentElement)[io.request]()},exit:function(){this.isCapable&&this.isActive&&document[io.exit]()},toggle:function(t){this.isActive?this.exit():this.request(t)},install:function(t){var e=this,s=t.$q,n=t.Vue;s.fullscreen=this,i||(io.request=["requestFullscreen","msRequestFullscreen","mozRequestFullScreen","webkitRequestFullscreen"].find(function(t){return document.documentElement[t]}),this.isCapable=void 0!==io.request,this.isCapable&&(io.exit=["exitFullscreen","msExitFullscreen","mozCancelFullScreen","webkitExitFullscreen"].find(function(t){return document[t]}),this.isActive=!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement),["onfullscreenchange","onmsfullscreenchange","onmozfullscreenchange","onwebkitfullscreenchange"].forEach(function(t){document[t]=function(){e.isActive=!e.isActive}}),n.util.defineReactive(this,"isActive",this.isActive)))}},no={appVisible:!1,install:function(t){var e=this,s=t.$q,n=t.Vue;if(i)this.appVisible=s.appVisible=!0;else{var o,r;void 0!==document.hidden?(o="hidden",r="visibilitychange"):void 0!==document.msHidden?(o="msHidden",r="msvisibilitychange"):void 0!==document.webkitHidden&&(o="webkitHidden",r="webkitvisibilitychange");var a=function(){e.appVisible=s.appVisible=!document[o]};a(),r&&void 0!==document[o]&&(n.util.defineReactive(s,"appVisible",this.appVisible),document.addEventListener(r,a,!1))}}};function oo(t){return encodeURIComponent(t)}function ro(t){return decodeURIComponent(t)}function ao(t){if(""===t)return t;0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")),t=ro(t.replace(/\+/g," "));try{t=JSON.parse(t)}catch(t){}return t}function lo(t,e,i,s){void 0===i&&(i={});var n=i.expires,o="number"==typeof i.expires;o&&(n=new Date).setMilliseconds(n.getMilliseconds()+864e5*i.expires);var r,a=oo(t)+"="+oo((r=e)===Object(r)?JSON.stringify(r):""+r),l=[a,n?"; Expires="+n.toUTCString():"",i.path?"; Path="+i.path:"",i.domain?"; Domain="+i.domain:"",i.httpOnly?"; HttpOnly":"",i.secure?"; Secure":""].join("");if(s){s.res.setHeader("Set-Cookie",l);var c=s.req.headers.cookie||"";if(o&&i.expires<0){var h=co(t,s);void 0!==h&&(c=c.replace(t+"="+h+"; ","").replace("; "+t+"="+h,"").replace(t+"="+h,""))}else c=c?a+"; "+c:l;s.req.headers.cookie=c}else document.cookie=l}function co(t,e){for(var i,s,n,o=t?void 0:{},r=e?e.req.headers:document,a=r.cookie?r.cookie.split("; "):[],l=0,c=a.length;l<c;l++)if(s=ro((i=a[l].split("=")).shift()),n=i.join("="),t){if(t===s){o=ao(n);break}}else o[s]=n;return o}function ho(t){void 0===t&&(t={});var e=t.ssr;return{get:function(t){return co(t,e)},set:function(t,i,s){return lo(t,i,s,e)},has:function(t){return function(t,e){return void 0!==co(t,e)}(t,e)},remove:function(t,i){return function(t,e,i){lo(t,"",Object.assign({},e,{expires:-1}),i)}(t,i,e)},all:function(){return co(null,e)}}}var uo,po,fo,mo,go={parseSSR:function(t){return t?ho({ssr:t}):this},install:function(t){var e=t.$q,s=t.queues;i?s.server.push(function(t,e){t.cookies=ho(e)}):(Object.assign(this,ho()),e.cookies=this)}},vo={install:function(t){var e=t.$q,i=t.Vue;this.create=e.dialog=Xn(Gi,i)}},bo={start:function(){},stop:function(){},increment:function(){},install:function(t){var e=t.$q,s=t.Vue,n=t.cfg;if(i)e.loadingBar=this;else{var o=e.loadingBar=new s({render:function(t){return t(Dt,{ref:"bar",props:n.loadingBar})}}).$mount().$refs.bar;Object.assign(this,{start:o.start,stop:o.stop,increment:o.increment}),document.body.appendChild(e.loadingBar.$parent.$el)}}},_o={},yo={delay:0,message:!1,spinnerSize:80,spinnerColor:"white",messageColor:"white",spinner:Ut,customClass:!1},wo={isActive:!1,show:function(t){var e=this;i||("string"==typeof(_o=Object.assign({},yo,t)).customClass&&(_o.customClass=_o.customClass.trim()),this.isActive?uo&&uo.$forceUpdate():(po=setTimeout(function(){po=null;var t=document.createElement("div");document.body.appendChild(t),document.body.classList.add("with-loading"),uo=new e.__Vue({name:"QLoading",el:t,render:function(t){return t("div",{staticClass:"q-loading animate-fade fullscreen column flex-center z-max",class:_o.customClass},[t(_o.spinner,{props:{color:_o.spinnerColor,size:_o.spinnerSize}}),_o.message?t("div",{class:"text-"+_o.messageColor,domProps:{innerHTML:_o.message}}):null])}})},_o.delay),this.isActive=!0))},hide:function(){this.isActive&&(po?(clearTimeout(po),po=null):(uo.$destroy(),document.body.classList.remove("with-loading"),uo.$el.remove(),uo=null),this.isActive=!1)},setDefaults:function(t){Object.assign(yo,t)},__Vue:null,install:function(t){var e=t.$q,i=t.Vue,s=t.cfg.loading;s&&this.setDefaults(s),e.loading=this,this.__Vue=i}};function Co(t){t.title&&(t.title=t.titleTemplate?t.titleTemplate(t.title||""):t.title,delete t.titleTemplate),[["meta","content"],["link","href"]].forEach(function(e){var i=t[e[0]],s=e[1];for(var n in i){var o=i[n];o.template&&(1===Object.keys(o).length?delete i[n]:(o[s]=o.template(o[s]||""),delete o.template))}})}function xo(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!0;for(var i in t)if(t[i]!==e[i])return!0}function ko(t){return!["class","style"].includes(t)}function So(t){return!["lang","dir"].includes(t)}function qo(t,e){if(!t._inactive){var i=t.$options.meta;i&&(ps(!0,e,t.__qMeta),i.stopPropagation)||t.$children&&t.$children.forEach(function(t){qo(t,e)})}}function $o(){if(mo)return mo=!1,this.$root.__currentMeta=window.__Q_META__,void document.body.querySelector("script[data-qmeta-init]").remove();var t,e,i,s={title:"",titleTemplate:null,meta:{},link:{},script:{},htmlAttr:{},bodyAttr:{}};qo(this.$root,s),Co(s),t=function(t,e){var i={},s={};return t?(t.title!==e.title&&(i.title=e.title),["meta","link","script","htmlAttr","bodyAttr"].forEach(function(n){var o=t[n],r=e[n];if(s[n]=[],o){for(var a in i[n]={},o)r.hasOwnProperty(a)||s[n].push(a);for(var l in r)o.hasOwnProperty(l)?xo(o[l],r[l])&&(s[n].push(l),i[n][l]=r[l]):i[n][l]=r[l]}else i[n]=r}),{add:i,remove:s}):{add:e,remove:s}}(this.$root.__currentMeta,s),e=t.add,i=t.remove,e.title&&(document.title=e.title),Object.keys(i).length>0&&(["meta","link","script"].forEach(function(t){i[t].forEach(function(e){document.head.querySelector(t+'[data-qmeta="'+e+'"]').remove()})}),i.htmlAttr.filter(So).forEach(function(t){document.documentElement.removeAttribute(t)}),i.bodyAttr.filter(ko).forEach(function(t){document.body.removeAttribute(t)})),["meta","link","script"].forEach(function(t){var i=e[t];for(var s in i){var n=document.createElement(t);for(var o in i[s])"innerHTML"!==o&&n.setAttribute(o,i[s][o]);n.setAttribute("data-qmeta",s),"script"===t&&(n.innerHTML=i[s].innerHTML||""),document.head.appendChild(n)}}),Object.keys(e.htmlAttr).filter(So).forEach(function(t){document.documentElement.setAttribute(t,e.htmlAttr[t]||"")}),Object.keys(e.bodyAttr).filter(ko).forEach(function(t){document.body.setAttribute(t,e.bodyAttr[t]||"")}),this.$root.__currentMeta=s}function To(t){return function(e){var i=t[e];return e+(void 0!==i?'="'+i+'"':"")}}function Po(t,e){var i={title:"",titleTemplate:null,meta:{},link:{},htmlAttr:{},bodyAttr:{},noscript:{}};qo(t,i),Co(i);var s={"%%Q_HTML_ATTRS%%":Object.keys(i.htmlAttr).filter(So).map(To(i.htmlAttr)).join(" "),"%%Q_HEAD_TAGS%%":function(t){var e="";return t.title&&(e+="<title>"+t.title+"</title>"),["meta","link","script"].forEach(function(i){var s=t[i];for(var n in s){var o=Object.keys(s[n]).filter(function(t){return"innerHTML"!==t}).map(To(s[n]));e+="<"+i+" "+o.join(" ")+' data-qmeta="'+n+'">',"script"===i&&(e+=(s[n].innerHTML||"")+"<\/script>")}}),e}(i),"%%Q_BODY_ATTRS%%":Object.keys(i.bodyAttr).filter(ko).map(To(i.bodyAttr)).join(" "),"%%Q_BODY_TAGS%%":Object.keys(i.noscript).map(function(t){return'<noscript data-qmeta="'+t+'">'+i.noscript[t]+"</noscript>"}).join("")+"<script data-qmeta-init>window.__Q_META__="+(delete i.noscript&&JSON.stringify(i))+"<\/script>"};return Object.keys(s).forEach(function(t){e=e.replace(t,s[t])}),e}function Lo(){this.$options.meta&&("function"==typeof this.$options.meta?(this.$options.computed||(this.$options.computed={}),this.$options.computed.__qMeta=this.$options.meta):this.__qMeta=this.$options.meta)}function Mo(){this.$options.meta&&this.__qMetaUpdate()}var Bo={install:function(t){var e=t.queues,n=t.Vue;i?(n.prototype.$getMetaHTML=function(t){return function(e){return Po(t,e)}},n.mixin({beforeCreate:Lo}),e.server.push(function(t,e){e.ssr.Q_HTML_ATTRS+=" %%Q_HTML_ATTRS%%",Object.assign(e.ssr,{Q_HEAD_TAGS:"%%Q_HEAD_TAGS%%",Q_BODY_ATTRS:"%%Q_BODY_ATTRS%%",Q_BODY_TAGS:"%%Q_BODY_TAGS%%"})})):(mo=s,n.mixin({beforeCreate:Lo,created:function(){this.$options.meta&&(this.__qMetaUnwatch=this.$watch("__qMeta",this.__qMetaUpdate))},activated:Mo,deactivated:Mo,beforeMount:Mo,destroyed:function(){this.$options.meta&&(this.__qMetaUnwatch(),this.__qMetaUpdate())},methods:{__qMetaUpdate:function(){clearTimeout(fo),fo=setTimeout($o.bind(this),50)}}}))}},Eo={},Oo=["top-left","top-right","bottom-left","bottom-right","top","bottom","left","right","center"];var No={create:function(t){return i?function(){}:this.__vm.add(t)},setDefaults:function(t){Object.assign(Eo,t)},install:function(t){if(i)return t.$q.notify=function(){},void(t.$q.notify.setDefaults=function(){});(function(t){var e=t.Vue,i=document.createElement("div");document.body.appendChild(i),this.__vm=new e({name:"QNotifications",data:{notifs:{center:[],left:[],right:[],top:[],"top-left":[],"top-right":[],bottom:[],"bottom-left":[],"bottom-right":[]}},methods:{add:function(t){var e=this;if(!t)return console.error("Notify: parameter required"),!1;var i=Object.assign({},Eo,"string"==typeof t?{message:t}:ci(t));if(i.position){if(!Oo.includes(i.position))return console.error("Notify: wrong position: "+i.position),!1}else i.position="bottom";i.__uid=Zt(),void 0===i.timeout&&(i.timeout=5e3);var s=function(){e.remove(i)};if(t.actions&&(i.actions=t.actions.map(function(t){var e=t.handler,i=ci(t);return i.handler="function"==typeof e?function(){e(),!t.noDismiss&&s()}:function(){return s()},i})),"function"==typeof t.onDismiss&&(i.onDismiss=t.onDismiss),i.closeBtn){var n=[{closeBtn:!0,label:i.closeBtn,handler:s}];i.actions=i.actions?i.actions.concat(n):n}i.timeout&&(i.__timeout=setTimeout(function(){s()},i.timeout+1e3));var o=i.position.indexOf("top")>-1?"unshift":"push";return this.notifs[i.position][o](i),s},remove:function(t){t.__timeout&&clearTimeout(t.__timeout);var e=this.notifs[t.position].indexOf(t);if(-1!==e){var i=this.$refs["notif_"+t.__uid];if(i&&i.$el){var s=i.$el;s.style.left=s.offsetLeft+"px",s.style.width=getComputedStyle(s).width}this.notifs[t.position].splice(e,1),"function"==typeof t.onDismiss&&t.onDismiss()}}},render:function(t){var e=this;return t("div",{staticClass:"q-notifications"},Oo.map(function(i){var s=["left","center","right"].includes(i)?"center":i.indexOf("top")>-1?"top":"bottom",n=i.indexOf("left")>-1?"start":i.indexOf("right")>-1?"end":"center",o=["left","right"].includes(i)?"items-"+("left"===i?"start":"end")+" justify-center":"center"===i?"flex-center":"items-"+n;return t("transition-group",{key:i,staticClass:"q-notification-list q-notification-list-"+s+" fixed column "+o,tag:"div",props:{name:"q-notification-"+i,mode:"out-in"}},e.notifs[i].map(function(e){return t(Jt,{ref:"notif_"+e.__uid,key:e.__uid,staticClass:"q-notification",props:e},[e.message])}))}))}}),this.__vm.$mount(i)}).call(this,t),t.cfg.notify&&this.setDefaults(t.cfg.notify),t.$q.notify=this.create.bind(this),t.$q.notify.setDefaults=this.setDefaults}},zo=["sm","md","lg","xl"],Do={width:0,sizes:{sm:576,md:768,lg:992,xl:1200},lt:{sm:!0,md:!0,lg:!0,xl:!0},gt:{},xs:!0,setSizes:function(){},setDebounce:function(){},install:function(t){var e=this,n=t.$q,o=t.queues,r=t.Vue;if(i)n.screen=this;else{var a,l,c=function(t){var i=window.innerWidth,s=e.sizes;t&&i===e.width||(e.width=i,e.gt.xs=i>=s.sm,e.gt.sm=i>=s.md,e.gt.md=i>=s.lg,e.gt.lg=i>=s.xl,e.lt.sm=i<s.sm,e.lt.md=i<s.md,e.lt.lg=i<s.lg,e.lt.xl=i<s.xl,e.xs=e.lt.sm,e.sm=e.gt.xs&&e.lt.md,e.md=e.gt.sm&&e.lt.lg,e.lg=e.gt.md&&e.lt.xl,e.xl=i>s.xl)},h={};this.setSizes=function(t){zo.forEach(function(e){t[e]&&(h[e]=t[e])})},this.setDebounce=function(t){l=t};var u=function(){var t=getComputedStyle(document.body);t.getPropertyValue("--q-size-sm")&&zo.forEach(function(i){e.sizes[i]=parseInt(t.getPropertyValue("--q-size-"+i),10)}),e.setSizes=function(t){zo.forEach(function(i){t[i]&&(e.sizes[i]=t[i])}),c()},e.setDebounce=function(t){var e=function(){c(!0)};a&&window.removeEventListener("resize",a,M.passive),a=t>0?Zi(e,t):e,window.addEventListener("resize",a,M.passive)},e.setDebounce(l||100),Object.keys(h).length>0?(e.setSizes(h),h=null):c()};s?o.takeover.push(u):u(),r.util.defineReactive(n,"screen",this)}}};function Ro(){var t=function(){};return{has:t,get:{length:t,item:t,index:t,all:t},set:t,remove:t,clear:t,isEmpty:t}}function Io(t){var e=window[t+"Storage"],i=function(t){var i=e.getItem(t);return i?function(t){var e,i;if(t.length<9)return t;switch(e=t.substr(0,8),i=t.substring(9),e){case"__q_date":return new Date(i);case"__q_expr":return new RegExp(i);case"__q_numb":return Number(i);case"__q_bool":return Boolean("1"===i);case"__q_strn":return""+i;case"__q_objt":return JSON.parse(i);default:return t}}(i):null};return{has:function(t){return null!==e.getItem(t)},get:{length:function(){return e.length},item:i,index:function(t){if(t<e.length)return i(e.key(t))},all:function(){for(var t,s={},n=e.length,o=0;o<n;o++)s[t=e.key(o)]=i(t);return s}},set:function(t,i){e.setItem(t,function(t){return"[object Date]"===Object.prototype.toString.call(t)?"__q_date|"+t.toUTCString():"[object RegExp]"===Object.prototype.toString.call(t)?"__q_expr|"+t.source:"number"==typeof t?"__q_numb|"+t:"boolean"==typeof t?"__q_bool|"+(t?"1":"0"):"string"==typeof t?"__q_strn|"+t:"function"==typeof t?"__q_strn|"+t.toString():t===Object(t)?"__q_objt|"+JSON.stringify(t):t}(i))},remove:function(t){e.removeItem(t)},clear:function(){e.clear()},isEmpty:function(){return 0===e.length}}}var Ho={install:function(t){var e=t.$q;if(n)e.localStorage=Ro();else if(r()){var i=Io("local");e.localStorage=i,Object.assign(this,i)}}},Ao={install:function(t){var e=t.$q;if(n)e.sessionStorage=Ro();else if(r()){var i=Io("session");e.sessionStorage=i,Object.assign(this,i)}}},Fo=Object.freeze({ActionSheet:Zn,AddressbarColor:eo,AppFullscreen:so,AppVisibility:no,Cookies:go,Dialog:vo,LoadingBar:bo,Loading:wo,Meta:Bo,Notify:No,Platform:l,Screen:Do,LocalStorage:Ho,SessionStorage:Ao});var Qo=Object.freeze({animate:Ne,clone:ci,colors:w,date:Hi,debounce:Zi,dom:J,easing:Me,event:A,extend:ps,filter:Xt,format:Bt,frameDebounce:oe,noop:function(){},openURL:function(t,e){if(l.is.cordova&&navigator&&navigator.app)return navigator.app.loadUrl(t,{openExternal:!0});var i=window.open(t,"_blank");if(i)return i.focus(),i;e()},scroll:nt,throttle:li,uid:Zt});return void 0===t?console.error("[ Quasar ] Vue is required to run. Please add a script tag for it before loading Quasar."):t.use({install:function(t,e){if(void 0===e&&(e={}),!this.__installed){this.__installed=!0;var s=e.config||{};if(l.install($,q,t),x.install($,q,s),c.install($,s),u.install($,q,t,e.i18n),S.install($,t,e.iconSet),i?t.mixin({beforeCreate:function(){this.$q=this.$root.$options.$q}}):t.prototype.$q=$,e.components&&Object.keys(e.components).forEach(function(i){var s=e.components[i];void 0===s.name||void 0===s.render&&void 0===s.mixins||t.component(s.name,s)}),e.directives&&Object.keys(e.directives).forEach(function(i){var s=e.directives[i];void 0!==s.name&&void 0!==s.unbind&&t.directive(s.name,s)}),e.plugins){var n={$q:$,queues:q,Vue:t,cfg:s};Object.keys(e.plugins).forEach(function(t){var i=e.plugins[t];"function"==typeof i.install&&i!==l&&i.install(n)})}}}},{components:Hn,directives:Jn,plugins:Fo,config:"undefined"!=typeof window&&window.quasarConfig||{}}),{version:"0.17.12",theme:"ios",i18n:u,icons:S,components:Hn,directives:Jn,plugins:Fo,utils:Qo}}); | 59,964 | 359,675 | 0.737276 |
7350d2b42c7bb9c2c3b24e36ad010bf9208b0b77 | 176 | js | JavaScript | src/store/index.js | lijun365/Sugar_Frontend | 7d0ae305ea449107d3bf6d80f7d0b8b239035c8e | [
"MIT"
] | null | null | null | src/store/index.js | lijun365/Sugar_Frontend | 7d0ae305ea449107d3bf6d80f7d0b8b239035c8e | [
"MIT"
] | null | null | null | src/store/index.js | lijun365/Sugar_Frontend | 7d0ae305ea449107d3bf6d80f7d0b8b239035c8e | [
"MIT"
] | null | null | null | import Vue from 'vue'
import Vuex from 'vuex'
import sugarmark from './modules/SuagrMark.js'
Vue.use(Vuex)
export default new Vuex.Store({
modules: {
sugarmark
}
})
| 13.538462 | 46 | 0.693182 |
7350f8f687eab54e66749211aa4f32c803d099ac | 517 | js | JavaScript | src/Rule/regExp.js | DanielchenN/shineout | 379028547999e9604738104052ff72d07142c588 | [
"MIT"
] | 780 | 2018-09-02T10:52:52.000Z | 2022-03-29T07:30:22.000Z | src/Rule/regExp.js | PatricioPeng/shineout | c676aa79c75894b5585ebfa308d1072d81c2d7c1 | [
"MIT"
] | 128 | 2018-09-14T09:38:23.000Z | 2022-03-31T06:03:50.000Z | src/Rule/regExp.js | PatricioPeng/shineout | c676aa79c75894b5585ebfa308d1072d81c2d7c1 | [
"MIT"
] | 145 | 2018-09-10T14:32:07.000Z | 2022-03-31T07:43:55.000Z | import { deepMerge } from '../utils/objects'
import { getLocale } from '../locale'
const options = { skipUndefined: true }
export default ({ message } = {}) => (regExp, msg) => {
if (typeof regExp !== 'string' && !(regExp instanceof RegExp)) {
console.error(new Error(`Rule "reg" param expect a RegExp object or a string, get ${typeof regExp}`))
return null
}
return deepMerge(
{ message: getLocale('rules.reg') },
deepMerge({ message, regExp }, { message: msg }, options),
options,
)
}
| 30.411765 | 105 | 0.630561 |
7351c0b41f6e558d04087a1c19232da2f5a1a95d | 6,090 | js | JavaScript | node_modules/polybuild/node_modules/gulp-crisper/node_modules/crisper/node_modules/command-line-args/node_modules/command-line-usage/lib/command-line-usage.js | patyjenny/portifolio-patricia-jenny | ed8eb0b5573f91e6f06aa30f4fd5ebb06b4890fa | [
"CC-BY-4.0"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | node_modules/polybuild/node_modules/gulp-crisper/node_modules/crisper/node_modules/command-line-args/node_modules/command-line-usage/lib/command-line-usage.js | patyjenny/portifolio-patricia-jenny | ed8eb0b5573f91e6f06aa30f4fd5ebb06b4890fa | [
"CC-BY-4.0"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | node_modules/polybuild/node_modules/gulp-crisper/node_modules/crisper/node_modules/command-line-args/node_modules/command-line-usage/lib/command-line-usage.js | patyjenny/portifolio-patricia-jenny | ed8eb0b5573f91e6f06aa30f4fd5ebb06b4890fa | [
"CC-BY-4.0"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | 'use strict'
const columnLayout = require('column-layout')
const ansi = require('ansi-escape-sequences')
const os = require('os')
const t = require('typical')
const UsageOptions = require('./usage-options')
const arrayify = require('array-back')
const wrap = require('wordwrapjs')
/**
* @module command-line-usage
*/
module.exports = getUsage
class Lines {
constructor () {
this.list = []
}
add (content) {
arrayify(content).forEach(line => this.list.push(ansi.format(line)))
}
emptyLine () {
this.list.push('')
}
}
/**
* @param {optionDefinition[]} - an array of [option definition](https://github.com/75lb/command-line-args#exp_module_definition--OptionDefinition) objects. In addition to the regular definition properties, command-line-usage will look for:
*
* - `description` - a string describing the option.
* - `typeLabel` - a string to replace the default type string (e.g. `<string>`). It's often more useful to set a more descriptive type label, like `<ms>`, `<files>`, `<command>` etc.
*
* @param options {module:usage-options} - see [UsageOptions](#exp_module_usage-options--UsageOptions).
* @returns {string}
* @alias module:command-line-usage
*/
function getUsage (definitions, options) {
options = new UsageOptions(options)
definitions = definitions || []
const output = new Lines()
output.emptyLine()
/* filter out hidden definitions */
if (options.hide && options.hide.length) {
definitions = definitions.filter(definition => options.hide.indexOf(definition.name) === -1)
}
if (options.header) {
output.add(renderSection('', options.header))
}
if (options.title || options.description) {
output.add(renderSection(
options.title,
t.isString(options.description)
? wrap.lines(options.description, { width: 80 })
: options.description
))
}
if (options.synopsis) {
output.add(renderSection('Synopsis', options.synopsis))
}
if (definitions.length) {
if (options.groups) {
for (const group in options.groups) {
const val = options.groups[group]
let title
let description
if (t.isObject(val)) {
title = val.title
description = val.description
} else if (t.isString(val)) {
title = val
} else {
throw new Error('Unexpected group config structure')
}
output.add(renderSection(title, description))
let optionList = getUsage.optionList(definitions, group)
output.add(renderSection(null, optionList, true))
}
} else {
output.add(renderSection('Options', getUsage.optionList(definitions), true))
}
}
if (options.examples) {
output.add(renderSection('Examples', options.examples))
}
if (options.footer) {
output.add(renderSection('', options.footer))
}
return output.list.join(os.EOL)
}
function getOptionNames (definition, optionNameStyles) {
const names = []
let type = definition.type ? definition.type.name.toLowerCase() : ''
const multiple = definition.multiple ? '[]' : ''
if (type) type = type === 'boolean' ? '' : `[underline]{${type}${multiple}}`
type = ansi.format(definition.typeLabel || type)
if (definition.alias) names.push(ansi.format('-' + definition.alias, optionNameStyles))
names.push(ansi.format(`--${definition.name}`, optionNameStyles) + ' ' + type)
return names.join(', ')
}
function renderSection (title, content, skipIndent) {
const lines = new Lines()
if (title) {
lines.add(ansi.format(title, [ 'underline', 'bold' ]))
lines.emptyLine()
}
if (!content) {
return lines.list
} else {
if (t.isString(content)) {
lines.add(indentString(content))
} else if (Array.isArray(content) && content.every(t.isString)) {
lines.add(skipIndent ? content : indentArray(content))
} else if (Array.isArray(content) && content.every(t.isPlainObject)) {
lines.add(columnLayout.lines(content, {
padding: { left: ' ', right: ' ' }
}))
} else if (t.isPlainObject(content)) {
if (!content.options || !content.data) {
throw new Error('must have an "options" or "data" property\n' + JSON.stringify(content))
}
Object.assign(
{ padding: { left: ' ', right: ' ' } },
content.options
)
lines.add(columnLayout.lines(
content.data.map(row => formatRow(row)),
content.options
))
} else {
const message = `invalid input - 'content' must be a string, array of strings, or array of plain objects:\n\n${JSON.stringify(content)}`
throw new Error(message)
}
lines.emptyLine()
return lines.list
}
}
function indentString (string) {
return ' ' + string
}
function indentArray (array) {
return array.map(indentString)
}
function formatRow (row) {
for (const key in row) {
row[key] = ansi.format(row[key])
}
return row
}
/**
* A helper for getting a column-format list of options and descriptions. Useful for inserting into a custom usage template.
*
* @param {optionDefinition[]} - the definitions to Display
* @param [group] {string} - if specified, will output the options in this group. The special group `'_none'` will return options without a group specified.
* @returns {string[]}
*/
getUsage.optionList = function (definitions, group) {
if (!definitions || (definitions && !definitions.length)) {
throw new Error('you must pass option definitions to getUsage.optionList()')
}
const columns = []
if (group === '_none') {
definitions = definitions.filter(def => !t.isDefined(def.group))
} else if (group) {
definitions = definitions.filter(def => arrayify(def.group).indexOf(group) > -1)
}
definitions
.forEach(def => {
columns.push({
option: getOptionNames(def, 'bold'),
description: ansi.format(def.description)
})
})
return columnLayout.lines(columns, {
padding: { left: ' ', right: ' ' },
columns: [
{ name: 'option', nowrap: true },
{ name: 'description', maxWidth: 80 }
]
})
}
| 29.852941 | 240 | 0.644171 |
7352870fa6dd8ddd5d3c148995d9570ae2e567d2 | 2,399 | js | JavaScript | www/touch/examples/charts/app/store/Pie.js | zermelo-software/zermelo-app | 633d12249ed64e62f7535ac8f876355448d045af | [
"MIT",
"Unlicense"
] | 26 | 2015-10-15T16:13:51.000Z | 2021-11-10T09:57:49.000Z | display/emdss/touch/examples/charts/app/store/Pie.js | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 30 | 2015-10-15T09:32:10.000Z | 2020-10-03T07:59:58.000Z | www/touch/examples/charts/app/store/Pie.js | zermelo-software/zermelo-app | 633d12249ed64e62f7535ac8f876355448d045af | [
"MIT",
"Unlicense"
] | 27 | 2015-10-19T12:48:08.000Z | 2019-06-11T14:24:16.000Z | (function () {
var seed = 1.3;
// Controllable random.
function random() {
seed *= 7.3;
seed -= Math.floor(seed);
return seed;
}
Ext.define('Charts.store.Pie', {
alias : 'store.Pie',
extend : 'Ext.data.Store',
config : {
fields : ['id', 'g1', 'g2', 'g3', 'g4', 'g5', 'g6', 'name'],
data : []
},
generateData : function (count) {
var data = [], i, record = {
'id' : i,
'g1' : Math.round(700 * random() + 100, 0),
'g2' : Math.round(700 * random() + 100, 0),
'g3' : 700 * random() + 100,
'g4' : 700 * random() + 100,
'g5' : 700 * random() + 100,
'g6' : 700 * random() + 100,
'name' : 'Technology'
};
data.push(record);
for (i = 1; i < count; i++) {
var name = 'Item-' + i;
switch(i) {
case 1:
name = 'Agriculture';
break;
case 2:
name = 'Textiles';
break;
case 3:
name = 'Energy';
break;
case 4:
name = 'Pharmacology';
break;
case 5:
name = 'Other';
break;
}
record = {
'id' : i,
'g1' : Math.round(Math.abs(record.g1 + 300 * random() - 140), 0),
'g2' : Math.round(Math.abs(record.g2 + 300 * random() - 140), 0),
'g3' : Math.abs(record.g3 + 300 * random() - 140),
'g4' : Math.abs(record.g4 + 300 * random() - 140),
'g5' : Math.abs(record.g5 + 300 * random() - 140),
'g6' : Math.abs(record.g6 + 300 * random() - 140),
'name' : name
};
data.push(record);
}
this.setData(data);
},
constructor : function () {
this.callParent(arguments);
this.generateData(6);
return this;
}
});
})(); | 34.271429 | 87 | 0.331805 |
7352de22e9ea60dd8998949de7497d2ef4a9dc11 | 4,749 | js | JavaScript | src/js/helpers/zerance_dom.js | moaaz-s/custom-theme | 812773d5d185fea9792de27ee95210629d276ea7 | [
"MIT"
] | null | null | null | src/js/helpers/zerance_dom.js | moaaz-s/custom-theme | 812773d5d185fea9792de27ee95210629d276ea7 | [
"MIT"
] | null | null | null | src/js/helpers/zerance_dom.js | moaaz-s/custom-theme | 812773d5d185fea9792de27ee95210629d276ea7 | [
"MIT"
] | null | null | null | var ZDOM = (function () {
'use strict';
/**
* Create the constructor
* @param {String} selector The selector to use
*/
var Constructor = function (selector) {
if (!selector) {
this.elems = arrayToNodeList([]);
} else if (selector === 'document') {
this.elems = [document];
} else if (selector === 'window') {
this.elems = [window];
} else if (typeof selector === 'string') {
this.elems = document.querySelectorAll(selector);
} else if (selector instanceof NodeList) {
this.elems = selector
} else if (selector instanceof Element) {
this.elems = [selector]
} else if (selector instanceof DocumentFragment) {
this.elems = selector.querySelectorAll('*');
} else this.elems = arrayToNodeList([])
};
/**
* Do ajax stuff
* @param {String} url The URL to get
*/
Constructor.prototype.ajax = function (url) {
// Do some XHR/Fetch thing here
console.log(url);
};
/**
* Run a callback on each item
* @param {Function} callback The callback function to run
*/
Constructor.prototype.each = function (callback) {
if (!callback || typeof callback !== 'function') return;
for (var i = 0; i < this.elems.length; i++) {
callback(this.elems[i], i);
}
return this;
};
Constructor.prototype.find = function (selector) {
var foundItems = [];
// Find elements.
this.each(item => {
var temp = item.querySelectorAll(selector)
// document.querySelectorAll() returns an "array-like" collection of elements
// convert this "array-like" collection to an array
temp = Array.prototype.slice.call(temp);
foundItems = foundItems.concat(temp);
});
// Convert to nodelist
var fragment = document.createDocumentFragment();
foundItems.forEach(function(item){
fragment.appendChild(item.cloneNode());
});
return instantiate(arrayToNodeList(foundItems));
};
// get dom element at index or null
Constructor.prototype.get = function(index) {
if (index > this.elems.length - 1 || index < 0)
return null;
return this.elems[index];
}
Constructor.prototype.isEmpty = function () {
return !!!this.elems.length;
}
/**
* Add a class to elements
* @param {String} className The class name
*/
Constructor.prototype.addClass = function () {
return this.each(item => item.classList.add(...arguments));
};
/**
* Remove a class to elements
* @param {String} className The class name
*/
Constructor.prototype.removeClass = function () {
return this.each(item => item.classList.remove(...arguments));
};
Constructor.prototype.toggleClass = function (className) {
return this.each(item => item.classList.toggle(className));
};
Constructor.prototype.hasClass = function(className) {
for (var i = 0; i < this.elems.length; i++) {
if (!this.elems[i].classList.contains(className))
return false;
}
return true;
}
/**
* Attach event to an element.
* @param {String} className The class name
*/
Constructor.prototype.on = function (eventType, callback) {
// Attach event listeners to each element.
this.each(item => item.addEventListener(eventType, callback));
// Store event handler for future ref. (in off for example)
this.events = this.events || {};
this.events[eventType] = this.events[eventType] || [];
this.events[eventType].push(callback);
return this;
};
/**
* Detaches event from an element.
* @param {String} className The class name
*/
Constructor.prototype.off = function (eventType, callback) {
let self = this;
if (callback) {
this.each(item => item.removeEventListener(eventType, callback));
} else if (self.events[eventType]) {
this.each(item => {
const cbArray = self.events[eventType];
for (let cb of cbArray) {
item.removeEventListener(eventType, cb);
}
})
}
return self;
};
/**
* Deletes an element from the dom
* @param {String} className The class name
*/
Constructor.prototype.remove = function () {
this.each(item => {
// const parent = item.parentNode;
// parent.remove(item);
item.remove();
});
return this;
};
/**
* Detaches event from an element.
* @param {String} className The class name
*/
Constructor.prototype.off = function (eventType, callback) {
return this.each(item => item.removeEventListener(eventType, callback));
};
var arrayToNodeList = (items) => {
// Convert to nodelist
var fragment = document.createDocumentFragment();
items.forEach(function(item){
fragment.appendChild(item.cloneNode());
});
return fragment.querySelectorAll('*');;
}
/**
* Instantiate a new constructor
*/
var instantiate = function (selector) {
return new Constructor(selector);
};
/**
* Return the constructor instantiation
*/
return instantiate;
})(); | 25.126984 | 80 | 0.664561 |
7353094579b8fe9ad6349669658c9bc16844b858 | 7,429 | js | JavaScript | flowtypes/broadcast.js | rhainer/interactive-broadcast-js | 3fcfd9d6c7c4e29915c79e344b2ed6e2726e9ce5 | [
"MIT"
] | null | null | null | flowtypes/broadcast.js | rhainer/interactive-broadcast-js | 3fcfd9d6c7c4e29915c79e344b2ed6e2726e9ce5 | [
"MIT"
] | null | null | null | flowtypes/broadcast.js | rhainer/interactive-broadcast-js | 3fcfd9d6c7c4e29915c79e344b2ed6e2726e9ce5 | [
"MIT"
] | 2 | 2018-11-05T19:47:13.000Z | 2019-04-04T15:35:38.000Z | // @flow
/* eslint no-undef: "off" */
/* beautify preserve:start */
declare type ParticipantAVProperty = 'audio' | 'video' | 'volume';
declare type ParticipantAVProps = {
video: boolean,
audio: boolean,
volume: number
}
declare type SessionName = 'stage' | 'backstage';
declare type InstancesToConnect = Array<SessionName>;
declare type NetworkQuality = 'great' | 'good' | 'poor';
declare type ImgData = null | string;
declare type onSnapshotReady = Unit;
declare type ParticipantAVPropertyUpdate =
{ property: 'volume', value: number } |
{ property: 'video', value: boolean } |
{ property: 'audio', value: boolean } ;
declare type ParticipantState = {
connected: boolean,
stream: null | Stream,
networkQuality: null | NetworkQuality,
video: boolean,
audio: boolean,
volume: number
}
// $FlowFixMe - Creating this type without using an intersection does not throw an error (?)
declare type FanParticipantState = ParticipantState & { record?: ActiveFan };
declare type ParticipantWithConnection = ParticipantState & { connection: Connection };
declare type ProducerWithConnection = { connection: Connection }
declare type UserWithConnection = ParticipantWithConnection | ActiveFanWithConnection | ProducerWithConnection;
declare type BroadcastParticipants = {
fan: FanParticipantState,
celebrity: ParticipantState,
host: ParticipantState,
backstageFan: FanParticipantState
};
declare type InteractiveFan = { uid: UserId };
declare type ActiveFan = {
id: UserId,
name: string,
browser: string,
mobile: boolean,
networkQuality: null | NetworkQuality,
streamId: string,
snapshot: null | string,
inPrivateCall: boolean,
isBackstage: boolean,
isOnStage: boolean
};
declare type ActiveFanWithConnection = ActiveFan & { connection: Connection };
declare type ActiveFanMap = { [fanId: string]: ActiveFan }
declare type ActiveFanUpdate = null | {
id?: string,
name?: string,
browser?: string,
networkQuality?: null | NetworkQuality,
mobile?: boolean,
snapshot?: string,
streamId?: string
};
declare type ActiveFans = {
order: UserId[],
map: ActiveFanMap
}
declare type ChatId = ParticipantType | UserId;
declare type ProducerChats = {[chatId: ChatId]: ChatState };
declare type PrivateCallParticipant = ParticipantType | 'activeFan';
declare type PrivateCallState = null | { isWith: HostCeleb } | { isWith: FanType, fanId: UserId };
declare type ProducerActiveState = null | boolean;
declare type BroadcastState = {
event: null | BroadcastEvent,
connected: boolean,
publishOnlyEnabled: boolean,
privateCall: PrivateCallState,
publishers: {
camera: null | { [publisherId: string]: Publisher}
},
subscribers: {
camera: null | { [subscriberId: string]: Subscriber}
},
meta: null | CoreMeta,
participants: BroadcastParticipants,
activeFans: ActiveFans,
chats: ProducerChats,
stageCountdown: number,
viewers: number,
interactiveLimit: number,
archiving: boolean,
reconnecting: boolean,
disconnected: boolean,
elapsedTime: string,
fanTransition: boolean
};
declare type FanStatus = 'disconnected' | 'connecting' | 'inLine' | 'backstage' | 'stage' | 'privateCall' | 'temporarillyMuted';
declare type FanState = {
ableToJoin: boolean,
fanName: string,
status: FanStatus,
inPrivateCall: boolean,
networkTest: {
interval: number | null,
timeout: number | null
}
};
declare type FanParticipantType = 'backstageFan' | 'fan';
declare type FanType = 'activeFan' | FanParticipantType;
declare type ParticipantType = FanParticipantType | 'host' | 'celebrity';
declare type FanInitOptions = { adminId: UserId, userUrl: string };
declare type CelebHostInitOptions = FanInitOptions & { userType: 'celebrity' | 'host' };
declare type ActiveFanOrderUpdate = { newIndex: number, oldIndex: number };
/**
* Chat Types
*/
declare type ChatUser = 'activeFan' | 'producer' | ParticipantType;
declare type ChatMessage = {
from: ConnectionId,
to: ConnectionId,
isMe: boolean,
text: string,
timestamp: number
};
declare type ChatMessagePartial = {
text: string,
timestamp: number,
fromType: ChatUser,
fromId?: UserId
};
declare type ChatState = {
chatId: ParticipantType | UserId,
session: SessionName,
toType: ChatUser,
fromType: ChatUser,
fromId?: UserId, // This will be used to indentify active fans only
to: UserWithConnection,
displayed: boolean,
minimized: boolean,
messages: ChatMessage[],
inPrivateCall?: boolean
};
/**
* Actions
*/
declare type BroadcastAction =
{ type: 'FAN_TRANSITION', fanTransition: boolean } |
{ type: 'SET_BROADCAST_EVENT', event: BroadcastEvent } |
{ type: 'RESET_BROADCAST_EVENT' } |
{ type: 'BACKSTAGE_CONNECTED', connected: boolean } |
{ type: 'BROADCAST_CONNECTED', connected: boolean } |
{ type: 'PRESENCE_CONNECTING', connecting: boolean } |
{ type: 'SET_PUBLISH_ONLY_ENABLED', publishOnlyEnabled: boolean } |
{ type: 'BROADCAST_PARTICIPANT_JOINED', participantType: ParticipantType, stream: Stream } |
{ type: 'BROADCAST_PARTICIPANT_LEFT', participantType: ParticipantType } |
{ type: 'PARTICIPANT_AV_PROPERTY_CHANGED', participantType: ParticipantType, update: ParticipantAVPropertyUpdate } |
{ type: 'SET_BROADCAST_EVENT_STATUS', status: EventStatus } |
{ type: 'SET_BROADCAST_EVENT_SHOW_STARTED', showStartedAt: string } |
{ type: 'SET_ELAPSED_TIME', elapsedTime: string } |
{ type: 'SET_BROADCAST_STATE', state: CoreState } |
{ type: 'SET_PRIVATE_CALL_STATE', privateCall: PrivateCallState } |
{ type: 'PRIVATE_ACTIVE_FAN_CALL', fanId: UserId, inPrivateCall: boolean } |
{ type: 'END_PRIVATE_ACTIVE_FAN_CALL', fan: ActiveFan } |
{ type: 'UPDATE_ACTIVE_FANS', update: ActiveFanMap } |
{ type: 'UPDATE_ACTIVE_FAN_RECORD', fanType: 'backstageFan' | 'fan', record: ActiveFan } |
{ type: 'REORDER_BROADCAST_ACTIVE_FANS', update: ActiveFanOrderUpdate } |
{ type: 'START_NEW_FAN_CHAT', fan: ActiveFanWithConnection, toType: FanType, privateCall?: boolean } |
{ type: 'START_NEW_PARTICIPANT_CHAT', participantType: ParticipantType, participant: ParticipantWithConnection } |
{ type: 'START_NEW_PRODUCER_CHAT', fromType: ChatUser, fromId?: UserId, producer: ProducerWithConnection } |
{ type: 'UPDATE_CHAT_PROPERTY', chatId: ChatId, property: $Keys<ChatState>, update: * } |
{ type: 'REMOVE_CHAT', chatId: ChatId } |
{ type: 'DISPLAY_CHAT', chatId: ChatId, display: boolean } |
{ type: 'MINIMIZE_CHAT', chatId: ChatId, minimize: boolean } |
{ type: 'NEW_CHAT_MESSAGE', chatId: ChatId, message: ChatMessage } |
{ type: 'UPDATE_STAGE_COUNTDOWN', stageCountdown: number } |
{ type: 'UPDATE_VIEWERS', viewers: number } |
{ type: 'SET_INTERACTIVE_LIMIT', interactiveLimit: number } |
{ type: 'SET_DISCONNECTED', disconnected: boolean } |
{ type: 'SET_RECONNECTING', reconnecting: boolean } |
{ type: 'SET_ARCHIVING', archiving: boolean };
declare type FanAction =
{ type: 'SET_NEW_FAN_ACKD', newFanSignalAckd: boolean } |
{ type: 'SET_FAN_NAME', fanName: string } |
{ type: 'SET_FAN_STATUS', status: FanStatus } |
{ type: 'SET_ABLE_TO_JOIN', ableToJoin: boolean } |
{ type: 'SET_FAN_PRIVATE_CALL', inPrivateCall: boolean } |
{ type: 'SET_NETWORK_TEST_INTERVAL', interval: null | number } |
{ type: 'SET_NETWORK_TEST_TIMEOUT', timeout: null | number } |
{ type: 'SET_FITMODE', fitMode: FitMode } |
{ type: 'SET_PUBLISHER_MINIMIZED', minimized: boolean };
| 34.877934 | 128 | 0.7254 |
735395edbb04d3bbdc2a802ee8119bf82cdc251a | 14,622 | js | JavaScript | carousnap/carousnap.js | Carousnap/carousnap | c16dd71701ee9c81739922f5ac1aaa72cfab264c | [
"MIT"
] | 7 | 2020-11-19T11:11:27.000Z | 2021-09-09T22:42:15.000Z | carousnap/carousnap.js | Carousnap/carousnap | c16dd71701ee9c81739922f5ac1aaa72cfab264c | [
"MIT"
] | null | null | null | carousnap/carousnap.js | Carousnap/carousnap | c16dd71701ee9c81739922f5ac1aaa72cfab264c | [
"MIT"
] | 3 | 2020-11-18T14:33:22.000Z | 2021-10-03T07:51:36.000Z | let isScroll = true
window.addEventListener('load', function () {
const carousel = document.querySelectorAll('.carouSnap')
carousel.forEach((crs) => {
crs.addEventListener('load', renderCarousel())
function renderCarousel() {
const numSlide = crs.children[0]
const btnSlide = crs.children[1]
const photos = crs.children[2]
const indicator = crs.children[3]
let scrollSnapSupported = false
let msScrollSnapSupported = false
let webkitScrollSnapSupported = false
let displayFlexSupported = false
if (window.CSS) {
scrollSnapSupported = window.CSS.supports(
'scroll-snap-type',
'x mandatory'
)
msScrollSnapSupported = window.CSS.supports(
'-ms-scroll-snap-type',
'x mandatory'
)
webkitScrollSnapSupported = window.CSS.supports(
'-webkit-scroll-snap-type',
'x mandatory'
)
displayFlexSupported = window.CSS.supports('display', 'flex')
}
let allScrollSnapSupported =
scrollSnapSupported ||
msScrollSnapSupported ||
webkitScrollSnapSupported
let allSupported = allScrollSnapSupported && displayFlexSupported
function loadCarousel() {
if (photos.childElementCount > 10 || photos.childElementCount < 1) {
crs.innerHTML =
"<p class='ErrorPhoto' style='margin:0 auto;width:100%;font-size:12px;text-align:center;margin-top:20%;margin-bottom:20%;color:#797979;-webkit-text-stroke: red;'><b>Minimum</b> 1 Photo <u>or</u> <br/><b>Maximum</b> 10 Photos</p>"
} else {
const scroll = Math.round(photos.scrollLeft)
const styleElement = getComputedStyle(crs)
const scrollWidth = parseInt(styleElement.width, 10)
const dataRatio = crs.getAttribute('data-ratio')
if (dataRatio) {
if (dataRatio != null) {
switch (dataRatio) {
case 'wide-horizontal':
photos.style.setProperty(
'height',
((9 / 16) * 100 * scrollWidth) / 100 + 'px'
)
break
case 'medium-horizontal':
photos.style.setProperty(
'height',
((4 / 5) * 100 * scrollWidth) / 100 + 'px'
)
break
case 'square':
photos.style.setProperty(
'height',
((1 / 1) * 100 * scrollWidth) / 100 + 'px'
)
break
case 'medium-vertical':
photos.style.setProperty(
'height',
((5 / 4) * 100 * scrollWidth) / 100 + 'px'
)
break
case 'wide-vertical':
photos.style.setProperty(
'height',
((16 / 9) * 100 * scrollWidth) / 100 + 'px'
)
break
default:
photos.style.setProperty(
'height',
((2 / 3) * 100 * scrollWidth) / 100 + 'px'
)
break
}
}
} else {
photos.style.setProperty(
'height',
((2 / 3) * 100 * scrollWidth) / 100 + 'px'
)
}
const num = document.createElement('p')
num.setAttribute('class', 'num')
numSlide.appendChild(num)
num.innerHTML =
Math.round(scroll / scrollWidth + 1) +
' / ' +
photos.childElementCount
function setAttr(element, values) {
for (var key in values) {
element.setAttribute(key, values[key])
}
}
let ul = document.createElement('ul')
for (i = 0; i < photos.childElementCount; i++) {
let li = document.createElement('li')
li.setAttribute('data-target', i + 1)
ul.appendChild(li)
}
indicator.appendChild(ul)
const btnNext = document.createElement('button')
const btnPrev = document.createElement('button')
setAttr(btnNext, {
type: 'button',
class: 'btn-slide-next'
})
setAttr(btnPrev, {
type: 'button',
class: 'btn-slide-prev'
})
btnNext.innerHTML = '❭'
btnPrev.innerHTML = '❬'
btnSlide.appendChild(btnPrev)
btnSlide.appendChild(btnNext)
const num_active = Math.round(scroll / scrollWidth + 1)
const ul_elem = ul.childElementCount
for (j = 0; j <= ul_elem; j++) {
if (j + 1 == num_active) {
let li_element = ul.children
li_element[j].setAttribute('class', 'active')
}
}
ul.style.width = photos.childElementCount * 10 + '%'
}
}
if (
numSlide.className != 'numbSlide' ||
btnSlide.className != 'bnSlide' ||
photos.className != 'photoCollect' ||
indicator.className != 'indCat'
) {
crs.innerHTML =
"<p class='ErrorCarousel' style='margin:0 auto;width:100%;font-size:12px;text-align:center;margin-top:20%;margin-bottom:20%;color:#797979;-webkit-text-stroke: red;'>Some Elements was <b>Missing!</b></p>"
} else {
if (allSupported === false) {
crs.innerHTML =
"<p class='ErrorCarousel' style='margin:0 auto;padding:0px 16px;font-size:12px;width:100%;text-align:center;margin-top:20%;margin-bottom:20%;color:#797979;-webkit-text-stroke: red;'>This browser is not supported yet.<br/> Please use the latest version of Chrome / Firefox / Edge / Opera / Safari / other compatible Browsers</p>"
} else {
loadCarousel()
}
}
}
})
})
window.addEventListener('wheel', function (e) {
if (e.target.parentElement.className == 'photoCollect') {
let photos = e.target.parentElement.parentElement.children[2]
isScroll = true
photos.addEventListener('scroll', function (e) {
const photos = e.target.childElementCount
const numSlide = e.target.parentElement.children[0].children[0]
const li_elem = e.target.parentElement.children[3].children[0].children
const total_li_elem =
e.target.parentElement.children[3].children[0].childElementCount
const value = e.target.scrollLeft
const crs = e.target.parentElement
const styleElement = getComputedStyle(crs)
const scrollWidth = parseInt(styleElement.width, 10)
const currentSlide = Math.round(value / scrollWidth + 1)
if (isScroll) {
numSlide.innerHTML = currentSlide + ' / ' + photos
for (ec = 0; ec < total_li_elem; ec++) {
let sl = li_elem[ec]
sl.removeAttribute('class')
if (ec + 1 == currentSlide) {
sl.setAttribute('class', 'active')
}
}
}
})
}
})
window.addEventListener('touchstart', function (e) {
if (e.target.parentElement.className == 'photoCollect') {
isScroll = true
const photos = e.target.parentElement.parentElement.children[2]
photos.addEventListener('scroll', function (e) {
const photos = e.target.childElementCount
const numSlide = e.target.parentElement.children[0].children[0]
const li_elem = e.target.parentElement.children[3].children[0].children
const total_li_elem =
e.target.parentElement.children[3].children[0].childElementCount
const value = e.target.scrollLeft
const crs = e.target.parentElement
const styleElement = getComputedStyle(crs)
const scrollWidth = parseInt(styleElement.width, 10)
const currentSlide = Math.round(value / scrollWidth + 1)
if (isScroll) {
numSlide.innerHTML = currentSlide + ' / ' + photos
for (ec = 0; ec < total_li_elem; ec++) {
let sl = li_elem[ec]
sl.removeAttribute('class')
if (ec + 1 == currentSlide) {
sl.setAttribute('class', 'active')
}
}
}
})
}
})
// window.addEventListener('touchend', function (e) {
// if (e.target.parentElement.className == 'photoCollect') {
// isScroll = true
// const photos = e.target.parentElement.parentElement.children[2]
// const styleElement = getComputedStyle(photos)
// const scrollWidth = parseInt(styleElement.width, 10)
// const total_li_elem =
// e.target.parentElement.parentElement.children[3].children[0]
// .childElementCount
// let point = []
// let goal = photos.scrollLeft
// for (let i = 0; i <= total_li_elem; i++) {
// point.push(scrollWidth * i)
// }
// let closest = point.reduce(function (prev, curr) {
// return Math.abs(curr - goal) < Math.abs(prev - goal) ? curr : prev
// })
// photos.scrollLeft = closest
// }
// })
window.addEventListener('click', function (e) {
if (
e.target.className == 'btn-slide-prev' &&
e.target.parentElement.className == 'bnSlide'
) {
isScroll = false
const photos = e.target.parentElement.parentElement.children[2]
const numSlide =
e.target.parentElement.parentElement.children[0].children[0]
const li_elem =
e.target.parentElement.parentElement.children[3].children[0].children
const total_li_elem =
e.target.parentElement.parentElement.children[3].children[0]
.childElementCount
const scrLeft = photos.scrollLeft
const styleElement = getComputedStyle(photos)
const scrollWidth = parseInt(styleElement.width, 10)
const value = scrLeft - scrollWidth
const currentSlide = Math.round(value / scrollWidth + 1)
if (value >= 0) {
numSlide.innerHTML = currentSlide + ' / ' + photos.childElementCount
for (ec = 0; ec < total_li_elem; ec++) {
let sl = li_elem[ec]
sl.removeAttribute('class')
if (ec + 1 == currentSlide) {
sl.setAttribute('class', 'active')
}
}
photos.scrollTo(value, 0)
}
}
if (
e.target.className == 'btn-slide-next' &&
e.target.parentElement.className == 'bnSlide'
) {
isScroll = false
const photos = e.target.parentElement.parentElement.children[2]
const numSlide =
e.target.parentElement.parentElement.children[0].children[0]
const li_elem =
e.target.parentElement.parentElement.children[3].children[0].children
const total_li_elem =
e.target.parentElement.parentElement.children[3].children[0]
.childElementCount
const scrLeft = Math.floor(photos.scrollLeft)
const styleElement = getComputedStyle(photos)
const scrollWidth = parseFloat(styleElement.width, 10)
const value = Math.floor(scrLeft + Math.floor(scrollWidth))
const currentSlide = Math.round(value / scrollWidth + 1)
const scrollMax = photos.childElementCount * scrollWidth - scrollWidth
if (value <= scrollMax) {
numSlide.innerHTML = currentSlide + ' / ' + photos.childElementCount
for (ec = 0; ec < total_li_elem; ec++) {
let sl = li_elem[ec]
sl.removeAttribute('class')
if (ec + 1 == currentSlide) {
sl.setAttribute('class', 'active')
}
}
photos.scrollTo(value, 0)
}
}
if (
e.target.tagName == 'LI' &&
e.target.parentElement.parentElement.className == 'indCat'
) {
isScroll = false
const indiCat = e.target.parentElement.parentElement
const value = e.target.getAttribute('data-target')
const li_elem = indiCat.children[0].children
const total_li_elem = indiCat.children[0].childElementCount
for (ec = 0; ec < total_li_elem; ec++) {
let sl = li_elem[ec]
sl.removeAttribute('class')
if (ec + 1 == value) {
sl.setAttribute('class', 'active')
}
}
const photos = indiCat.parentElement.children[2]
const crs = photos.parentElement
const numSlide = indiCat.parentElement.children[0].children[0]
const styleElement = getComputedStyle(crs)
const scrollWidth = parseInt(styleElement.width, 10)
photos.scrollLeft = value * scrollWidth - scrollWidth
numSlide.innerHTML = value + ' / ' + photos.childElementCount
}
})
window.addEventListener('resize', function (e) {
const carousel = document.querySelectorAll('.carouSnap')
carousel.forEach((crs) => {
if (crs.childElementCount === 4) {
const photos = crs.children[2]
const styleElement = getComputedStyle(crs)
const scrollWidth = parseInt(styleElement.width, 10)
const dataRatio = crs.getAttribute('data-ratio')
if (dataRatio) {
if (dataRatio != null) {
switch (dataRatio) {
case 'wide-horizontal':
photos.style.setProperty(
'height',
((9 / 16) * 100 * scrollWidth) / 100 + 'px'
)
break
case 'medium-horizontal':
photos.style.setProperty(
'height',
((4 / 5) * 100 * scrollWidth) / 100 + 'px'
)
break
case 'square':
photos.style.setProperty(
'height',
((1 / 1) * 100 * scrollWidth) / 100 + 'px'
)
break
case 'medium-vertical':
photos.style.setProperty(
'height',
((5 / 4) * 100 * scrollWidth) / 100 + 'px'
)
break
case 'wide-vertical':
photos.style.setProperty(
'height',
((16 / 9) * 100 * scrollWidth) / 100 + 'px'
)
break
default:
photos.style.setProperty(
'height',
((2 / 3) * 100 * scrollWidth) / 100 + 'px'
)
break
}
}
} else {
photos.style.setProperty(
'height',
((2 / 3) * 100 * scrollWidth) / 100 + 'px'
)
}
}
})
})
| 34.404706 | 341 | 0.545616 |
7353dc980e87f0573864d3d4954c05c67a46155b | 4,787 | js | JavaScript | sapui5-sdk-1.74.0/resources/sap/ushell_abap/adapters/abap/AppStateAdapter-dbg.js | juanfelipe82193/opensap | 568c01843a07b8a1be88f8fb8ccb49845fb8110e | [
"Apache-2.0"
] | null | null | null | sapui5-sdk-1.74.0/resources/sap/ushell_abap/adapters/abap/AppStateAdapter-dbg.js | juanfelipe82193/opensap | 568c01843a07b8a1be88f8fb8ccb49845fb8110e | [
"Apache-2.0"
] | null | null | null | sapui5-sdk-1.74.0/resources/sap/ushell_abap/adapters/abap/AppStateAdapter-dbg.js | juanfelipe82193/opensap | 568c01843a07b8a1be88f8fb8ccb49845fb8110e | [
"Apache-2.0"
] | null | null | null | // Copyright (c) 2009-2017 SAP SE, All Rights Reserved
/**
* @fileOverview The Unified Shell's AppStateAdapter for the ABAP platform.
* @version 1.74.0
*/
sap.ui.define([
"sap/base/util/ObjectPath",
"sap/ui/thirdparty/jquery",
"sap/base/Log",
"sap/ushell/utils",
"sap/ui2/srvc/ODataWrapper" // required for "sap.ui2.srvc.createODataWrapper"
], function (
ObjectPath,
jQuery,
Log,
utils
// ODataWrapper
) {
"use strict";
/**
* Constructs a new instance of the AppStateAdapter for the ABAP platform
*
* @param {object} oSystem The system served by the adapter
* @param {string} sParameters Parameter string, not in use
* @param {object} oConfig A potential adapter configuration
* @class The Unified Shell's AppStateAdapter for the ABAP platform.
* @constructor
* @since 1.28.0
* @private
*/
var AppStateAdapter = function (oSystem, sParameters, oConfig) {
this._oConfig = oConfig && oConfig.config;
var sAppStateServiceURL = (ObjectPath.get("services.appState.baseUrl", oConfig) || "/sap/opu/odata/UI2/INTEROP") + "/";
var oODataWrapperSettings = {
baseUrl: sAppStateServiceURL,
"sap-language": sap.ushell.Container.getUser().getLanguage(),
"sap-client": sap.ushell.Container.getLogonSystem().getClient()
};
this._oWrapper = sap.ui2.srvc.createODataWrapper(oODataWrapperSettings);
function fnDefaultFailure (oMessage) {
sap.ui2.srvc.Error(oMessage, "sap.ushell_abap.adapters.abap.AppStateAdapter");
}
sap.ui2.srvc.ODataService.call(this, this._oWrapper, fnDefaultFailure);
};
/**
* Save the given data sValue for the given key at the persistence layer
*
* @param {string} sKey The generated key value of the application state to save
* @param {string} sSessionKey A generated session key
* overwriting/modifying an existing record is only permitted if the session key matches the key of the initial creation.
* It shall be part of the save request, but shall not be returned on reading (it is not detectable from outside).
* @param {string} sValue The value to persist under the given key
* @param {string} sAppName The application name (the ui5 component name)
* should be stored with the data to allow to identify the data association
* @param {string} sComponent A 24 character string representing the application component,
* (A sap support component) may be undefined if not available on the client
* @returns {object} promise whose done function's return is empty
* @private
*/
AppStateAdapter.prototype.saveAppState = function (sKey, sSessionKey,
sValue, sAppName, sComponent) {
var oDeferred = new jQuery.Deferred(),
sRelativeUrl = "GlobalContainers",
oPayload = {
"id": sKey,
"sessionKey": sSessionKey,
"component": sComponent,
"appName": sAppName,
"value": sValue
};
this._oWrapper.create(sRelativeUrl, oPayload, function (/*response*/) {
oDeferred.resolve();
}, function (sErrorMessage) {
oDeferred.reject(sErrorMessage);
Log.error(sErrorMessage);
});
return oDeferred.promise();
};
/**
* Read the application state sValue for the given key sKey from the persistence layer
*
* @param {string} sKey Key of the application state (less than 40 characters)
* @returns {object} promise whose done function returns the response ID and value as parameter
* @private
*/
AppStateAdapter.prototype.loadAppState = function (sKey) {
var oDeferredRead = new jQuery.Deferred(),
sRelativeUrl = "GlobalContainers(id='" + encodeURIComponent(sKey) + "')";
if (!sKey) {
throw new utils.Error("The sKey is mandatory to read the data from the persistence layer");
}
// wrap the read operation into a batch request
// reason: Hiding of the application state key as part of the URL
this._oWrapper.openBatchQueue();
this._oWrapper.read(sRelativeUrl, function (response) {
oDeferredRead.resolve(response.id, response.value);
}, function (sErrorMessage) {
Log.error(sErrorMessage);
oDeferredRead.reject(sErrorMessage);
}, false);
this._oWrapper.submitBatchQueue(function () { }, function (sErrorMessage) {
Log.error(sErrorMessage);
oDeferredRead.reject(sErrorMessage);
});
return oDeferredRead.promise();
};
return AppStateAdapter;
}, true /* bExport */);
| 40.226891 | 127 | 0.642365 |
7355097d249de329dec26ac6d596e04050bbc9b1 | 160 | js | JavaScript | src/components/Layout/index.js | Arit143/stock-quotes | ba7d919956fabc87f2be70e2f9a420244315a289 | [
"MIT"
] | null | null | null | src/components/Layout/index.js | Arit143/stock-quotes | ba7d919956fabc87f2be70e2f9a420244315a289 | [
"MIT"
] | null | null | null | src/components/Layout/index.js | Arit143/stock-quotes | ba7d919956fabc87f2be70e2f9a420244315a289 | [
"MIT"
] | null | null | null | export { default as Content } from './Content';
export { default as EmptyLayout } from './EmptyLayout';
export { default as LayoutRoute } from './LayoutRoute';
| 40 | 55 | 0.71875 |
735511461bbb8a852b590b866b2afe01a6466587 | 1,054 | js | JavaScript | cloudfunctions/getUserInfo/index.js | bh1xaq/tcb-hackthon-welcomeSchool | 7aed51618ae7e7fa24b17b888b2e1c57fd9dca64 | [
"MIT"
] | null | null | null | cloudfunctions/getUserInfo/index.js | bh1xaq/tcb-hackthon-welcomeSchool | 7aed51618ae7e7fa24b17b888b2e1c57fd9dca64 | [
"MIT"
] | null | null | null | cloudfunctions/getUserInfo/index.js | bh1xaq/tcb-hackthon-welcomeSchool | 7aed51618ae7e7fa24b17b888b2e1c57fd9dca64 | [
"MIT"
] | null | null | null | /**
* 函数名:获取用户信息
* 功能:获取用户的详细信息
* 参数:userId(学工号),infoType(信息类型)
*/
const cloud = require('wx-server-sdk');
cloud.init();
const db = cloud.database();
exports.main = async (event, context) => {
try {
let infoType = event.infoType;
let user = await db.collection("users").where({
userId: event.userId,
}).get();
if (user.data.length > 0) {
// 获取公开信息
if (infoType == "public") {
return {
code: "200",
errMsg: "getUserInfo ok",
data: user.data[0].info.public
}
}
// 获取详情信息
if (infoType == "private") {
let privateData = Object.assign({
userId: user.data[0].userId
}, user.data[0].info.public, user.data[0].info.private);
return {
code: "200",
errMsg: "getUserInfo ok",
data: privateData
}
}
} else {
return {
code: "403",
errMsg: "用户信息不存在,可能存在未授权的访问"
}
}
} catch (err) {
return {
code: "500",
errMsg: err
}
}
} | 19.886792 | 64 | 0.501898 |
735511cb8ccce121e0d7e7a06d38ac2ae11cda26 | 16,069 | js | JavaScript | Tests/PDFKitTests/PDFContextTests.js | breakside/JSK | 2a8bd13bf7170f551cc9d039331cab119fbaefdc | [
"Apache-2.0"
] | 1 | 2020-10-25T06:32:08.000Z | 2020-10-25T06:32:08.000Z | Tests/PDFKitTests/PDFContextTests.js | breakside/JSK | 2a8bd13bf7170f551cc9d039331cab119fbaefdc | [
"Apache-2.0"
] | 1 | 2020-10-25T15:43:20.000Z | 2020-10-27T21:51:18.000Z | Tests/PDFKitTests/PDFContextTests.js | breakside/JSKit | 18a129f4ad0096b9e314e83d6f8bf41b90131e4d | [
"Apache-2.0"
] | null | null | null | // Copyright 2020 Breakside Inc.
//
// Licensed under the Breakside Public License, Version 1.0 (the "License");
// you may not use this file except in compliance with the License.
// If a copy of the License was not distributed with this file, you may
// obtain a copy at
//
// http://breakside.io/licenses/LICENSE-1.0.txt
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// #import PDFKit
// #import TestKit
'use strict';
// IMPORTANT:
// 1. These tests check for an exact sequence of PDF objects and/or stream commands
// 2. PDF validity does not actually depend on such exact equivalence
// 3. There are many ways to write visually identical PDFs
// 4. Minor changes to PDFContext can therefore cause total test failures
// 5. It might be better to rework these tests to use a PDFReader, validating
// overall document consistency, and checking specific objects (like first page)
// for desired content.
JSClass("PDFContextTests", TKTestSuite, {
testEmptyDocument: function(){
var stream = PDFContextTestsStringStream.init();
var context = PDFContext.initWithStream(stream);
var isClosed = false;
context.endDocument(function(){
isClosed = true;
});
TKAssert(isClosed);
var expected = [
"%PDF-1.7",
"2 0 obj",
"<< >>",
"endobj",
"1 0 obj",
"<< /Kids [ ] /Count 0 /Resources 2 0 R /MediaBox [ 0 0 612 792 ] /Type /Pages >>",
"endobj",
"3 0 obj",
"<< /Pages 1 0 R /Type /Catalog >>",
"endobj",
"xref",
"0 4",
"0000000000 65535 f\r",
"0000000030 00000 n\r",
"0000000009 00000 n\r",
"0000000126 00000 n\r",
"trailer",
"<< /Root 3 0 R /Size 4 >>",
"startxref",
"175",
"%%EOF"
];
TKAssertEquals(stream.string, expected.join("\n"));
},
testEmptyPage: function(){
var stream = PDFContextTestsStringStream.init();
var context = PDFContext.initWithStream(stream);
var isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.endPage();
context.endDocument(function(){
isClosed = true;
});
TKAssert(isClosed);
var expected = [
"%PDF-1.7",
"4 0 obj",
"<< /Length 3 0 R >>",
"stream",
"q Q ",
"endstream",
"endobj",
"3 0 obj",
"4",
"endobj",
"5 0 obj",
"<< /Parent 1 0 R /Contents 4 0 R /Type /Page >>",
"endobj",
"2 0 obj",
"<< >>",
"endobj",
"1 0 obj",
"<< /Kids [ 5 0 R ] /Count 1 /Resources 2 0 R /MediaBox [ 0 0 612 792 ] /Type /Pages >>",
"endobj",
"6 0 obj",
"<< /Pages 1 0 R /Type /Catalog >>",
"endobj",
"xref",
"0 7",
"0000000000 65535 f\r",
"0000000167 00000 n\r",
"0000000146 00000 n\r",
"0000000066 00000 n\r",
"0000000009 00000 n\r",
"0000000083 00000 n\r",
"0000000269 00000 n\r",
"trailer",
"<< /Root 6 0 R /Size 7 >>",
"startxref",
"318",
"%%EOF"
];
TKAssertEquals(stream.string, expected.join("\n"));
},
testRectangle: function(){
var stream = PDFContextTestsStringStream.init();
var context = PDFContext.initWithStream(stream);
var isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.fillRect(JSRect(100, 200, 300, 400));
context.endPage();
context.endDocument(function(){
isClosed = true;
});
TKAssert(isClosed);
var streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 100 200 m 400 200 l 400 600 l 100 600 l h f n Q \n");
},
testCircle: function(){
var stream = PDFContextTestsStringStream.init();
var context = PDFContext.initWithStream(stream);
var isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.fillEllipseInRect(JSRect(100, 200, 100, 100));
context.endPage();
context.endDocument(function(){
isClosed = true;
});
TKAssert(isClosed);
var streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 150 200 m 177.5892 200 200 222.4108 200 250 c 200 277.5892 177.5892 300 150 300 c 122.4108 300 100 277.5892 100 250 c 100 222.4108 122.4108 200 150 200 c h f n Q \n");
},
testRoundedRect: function(){
var stream = PDFContextTestsStringStream.init();
var context = PDFContext.initWithStream(stream);
var isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.fillRoundedRect(JSRect(100, 200, 100, 100), 20);
context.endPage();
context.endDocument(function(){
isClosed = true;
});
TKAssert(isClosed);
var streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 100 220 m 100 208.96432 108.96432 200 120 200 c 180 200 l 191.03568 200 200 208.96432 200 220 c 200 280 l 200 291.03568 191.03568 300 180 300 c 120 300 l 108.96432 300 100 291.03568 100 280 c h f n Q \n");
},
testArc: function(){
// clockwise arc
// NOTE: A clockwise arc will appear counter-clockwise for a PDF
// context that does not flip its coordinates
var stream = PDFContextTestsStringStream.init();
var context = PDFContext.initWithStream(stream);
var isClosed = false;
context.beginPage({usePDFCoordinates: true});
var center = JSPoint(100, 200);
var radius = 50;
context.beginPath();
context.addArc(center, radius, 0, Math.PI / 4, true);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
var streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 150 200 m 150 213.260824492 144.7321579817 225.9785201369 135.3553390593 235.3553390593 c S n Q \n");
},
debugArcUsingTangents: function(){
var stream = PDFContextTestsStringStream.init();
var context = PDFContext.initWithStream(stream);
var isClosed = false;
context.beginPage();
var radius = 25;
context.beginPath();
context.moveToPoint(50, 50);
context.addArcUsingTangents(JSPoint(50, 100), JSPoint(100, 100), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(50, 75);
context.addArcUsingTangents(JSPoint(75, 100), JSPoint(100, 75), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(50, 100);
context.addArcUsingTangents(JSPoint(100, 100), JSPoint(100, 50), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(100, 100);
context.addArcUsingTangents(JSPoint(125, 75), JSPoint(100, 50), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(100, 100);
context.addArcUsingTangents(JSPoint(100, 50), JSPoint(50, 50), radius);
context.strokePath();
context.translateBy(-400, 100);
context.beginPath();
context.moveToPoint(100, 75);
context.addArcUsingTangents(JSPoint(75, 50), JSPoint(50, 75), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(75, 50);
context.addArcUsingTangents(JSPoint(50, 75), JSPoint(75, 100), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(50, 100);
context.addArcUsingTangents(JSPoint(50, 75), JSPoint(75, 100), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(75, 50);
context.addArcUsingTangents(JSPoint(100, 100), JSPoint(75, 125), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(75, 50);
context.addArcUsingTangents(JSPoint(50, 100), JSPoint(75, 125), radius);
context.strokePath();
context.translateBy(-400, 100);
context.beginPath();
context.moveToPoint(100, 100);
context.addArcUsingTangents(JSPoint(100, 75), JSPoint(50, 100), radius);
context.strokePath();
context.translateBy(100, 0);
context.beginPath();
context.moveToPoint(100, 50);
context.addArcUsingTangents(JSPoint(75, 125), JSPoint(50, 100), radius);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
stream.save("/Users/oshaw/Desktop/test.pdf");
},
testArcUsingTangents: function(){
var radius = 25;
var stream = PDFContextTestsStringStream.init();
var context = PDFContext.initWithStream(stream);
var isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.beginPath();
context.moveToPoint(50, 50);
context.addArcUsingTangents(JSPoint(50, 100), JSPoint(100, 100), radius);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
var streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 50 50 m 50 75 m 50 75 l 50 88.7946 61.2054 100 75 100 c S n Q \n");
stream = PDFContextTestsStringStream.init();
context = PDFContext.initWithStream(stream);
isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.beginPath();
context.moveToPoint(50, 75);
context.addArcUsingTangents(JSPoint(75, 100), JSPoint(100, 75), radius);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 50 75 m 57.3223304703 82.3223304703 m 57.3223304703 82.3223304703 l 67.0765856741 92.0765856741 82.9234143259 92.0765856741 92.6776695297 82.3223304703 c S n Q \n");
stream = PDFContextTestsStringStream.init();
context = PDFContext.initWithStream(stream);
isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.beginPath();
context.moveToPoint(50, 100);
context.addArcUsingTangents(JSPoint(100, 100), JSPoint(100, 50), radius);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 50 100 m 75 100 m 75 100 l 88.7946 100 100 88.7946 100 75 c S n Q \n");
stream = PDFContextTestsStringStream.init();
context = PDFContext.initWithStream(stream);
isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.beginPath();
context.moveToPoint(100, 100);
context.addArcUsingTangents(JSPoint(125, 75), JSPoint(100, 50), radius);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 100 100 m 107.3223304703 92.6776695297 m 107.3223304703 92.6776695297 l 117.0765856741 82.9234143259 117.0765856741 67.0765856741 107.3223304703 57.3223304703 c S n Q \n");
stream = PDFContextTestsStringStream.init();
context = PDFContext.initWithStream(stream);
isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.beginPath();
context.moveToPoint(100, 100);
context.addArcUsingTangents(JSPoint(100, 50), JSPoint(50, 50), radius);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 100 100 m 100 75 m 100 75 l 100 61.2054 88.7946 50 75 50 c S n Q \n");
stream = PDFContextTestsStringStream.init();
context = PDFContext.initWithStream(stream);
isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.beginPath();
context.moveToPoint(100, 75);
context.addArcUsingTangents(JSPoint(75, 50), JSPoint(50, 75), radius);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 100 75 m 92.6776695297 67.6776695297 m 92.6776695297 67.6776695297 l 82.9234143259 57.9234143259 67.0765856741 57.9234143259 57.3223304703 67.6776695297 c S n Q \n");
stream = PDFContextTestsStringStream.init();
context = PDFContext.initWithStream(stream);
isClosed = false;
context.beginPage({usePDFCoordinates: true});
context.beginPath();
context.moveToPoint(75, 50);
context.addArcUsingTangents(JSPoint(50, 75), JSPoint(75, 100), radius);
context.strokePath();
context.endPage();
context.endDocument(function(){ isClosed = true;});
TKAssert(isClosed);
streams = stream.getStreams();
TKAssertEquals(streams.length, 1);
TKAssertEquals(streams[0], "q n 75 50 m 67.6776695297 57.3223304703 m 67.6776695297 57.3223304703 l 57.9234143259 67.0765856741 57.9234143259 82.9234143259 67.6776695297 92.6776695297 c S n Q \n");
}
});
JSClass("PDFContextTestsStringStream", PDFWriterStream, {
string: null,
init: function(){
this.string = "";
},
write: function(bytes, offset, length){
for (; offset < length; ++offset){
this.string += String.fromCharCode(bytes[offset]);
}
},
close: function(completion, target){
completion.call(target);
},
getStreams: function(){
var lines = this.string.split("\n");
var streams = [];
var stream = null;
for (var i = 0, l = lines.length; i < l; ++i){
if (lines[i] == "stream"){
stream = "";
}else if (lines[i] == "endstream"){
streams.push(stream);
stream = null;
}else{
if (stream !== null){
stream += lines[i] + "\n";
}
}
}
return streams;
},
save: function(filename){
var fs = require('fs');
fs.writeFileSync(filename, this.string, 'binary');
}
}); | 35.394273 | 245 | 0.59649 |
735582fc839264ea5bc6273394ec79d8ce66f667 | 315 | js | JavaScript | src/modules/ProjectActivity/columns.js | aos2006/raif-landing | 239ff833bedc829dcc2545fe458ad4287319708c | [
"MIT"
] | null | null | null | src/modules/ProjectActivity/columns.js | aos2006/raif-landing | 239ff833bedc829dcc2545fe458ad4287319708c | [
"MIT"
] | null | null | null | src/modules/ProjectActivity/columns.js | aos2006/raif-landing | 239ff833bedc829dcc2545fe458ad4287319708c | [
"MIT"
] | null | null | null | import React from 'react';
export default [
{
title: '#',
render: () => (<span>test1</span>)
},
{
title: 'Проект',
render: () => (<span>test</span>)
}, {
title: 'Активность',
render: () => (<span>test</span>)
},
{
title: 'Линии',
render: () => (<span>test</span>)
}
]
| 15.75 | 38 | 0.466667 |
73584aaecc7e72fec9b38d4587b9610ec6ce3883 | 3,160 | js | JavaScript | src/screens/_/base/tag.js | ekibun/BangumiTinygrailPlugin | 21cf8a4c21df97d494e2730d6f3e915966bd8ee2 | [
"MIT"
] | 4 | 2020-08-01T01:59:54.000Z | 2022-01-16T01:25:38.000Z | src/screens/_/base/tag.js | ekibun/BangumiTinygrailPlugin | 21cf8a4c21df97d494e2730d6f3e915966bd8ee2 | [
"MIT"
] | null | null | null | src/screens/_/base/tag.js | ekibun/BangumiTinygrailPlugin | 21cf8a4c21df97d494e2730d6f3e915966bd8ee2 | [
"MIT"
] | null | null | null | /*
* @Author: czy0729
* @Date: 2019-05-17 05:06:01
* @Last Modified by: czy0729
* @Last Modified time: 2020-09-03 20:47:25
*/
import React from 'react'
import { observer } from 'mobx-react'
import { Flex, Text } from '@components'
import { _ } from '@stores'
function Tag({ style, type, value, size }) {
if (!value) {
return null
}
const styles = memoStyles()
let _type = type
let isActive = false
if (!_type) {
switch (value) {
case '动画':
case '主角':
case '动画化':
_type = 'main'
break
case '书籍':
case '配角':
_type = 'primary'
break
case '游戏':
_type = 'success'
break
case '音乐':
case '客串':
case 'H':
_type = 'warning'
break
case '想看':
case '想读':
case '想听':
case '想玩':
case '已收藏':
isActive = true
_type = 'mainActive'
break
case '看过':
case '读过':
case '听过':
case '玩过':
isActive = true
_type = 'warningActive'
break
case '在看':
case '在读':
case '在听':
case '在玩':
isActive = true
_type = 'primaryActive'
break
case '搁置':
case '抛弃':
isActive = true
_type = 'waitActive'
break
default:
_type = _.select('plain', 'title')
break
}
}
return (
<Flex style={[styles.tag, styles[_type], style]}>
<Text
type={isActive ? _.select('plain', 'title') : _.select('sub', _type)}
size={size}
>
{value}
</Text>
</Flex>
)
}
Tag.defaultProps = {
size: 10
}
export default observer(Tag)
const memoStyles = _.memoStyles(_ => ({
tag: {
paddingVertical: 1,
paddingHorizontal: _.xs,
borderWidth: _.hairlineWidth,
borderRadius: _.radiusXs
},
main: {
backgroundColor: _.select(_.colorMainLight, _._colorDarkModeLevel1),
borderColor: _.select(_.colorMainBorder, _._colorDarkModeLevel1)
},
primary: {
backgroundColor: _.select(_.colorPrimaryLight, _._colorDarkModeLevel1),
borderColor: _.select(_.colorPrimaryBorder, _._colorDarkModeLevel1)
},
success: {
backgroundColor: _.select(_.colorSuccessLight, _._colorDarkModeLevel1),
borderColor: _.select(_.colorSuccessBorder, _._colorDarkModeLevel1)
},
warning: {
backgroundColor: _.select(_.colorWarningLight, _._colorDarkModeLevel1),
borderColor: _.select(_.colorWarningBorder, _._colorDarkModeLevel1)
},
plain: {
backgroundColor: _.select(_.colorBg, _._colorDarkModeLevel1),
borderColor: _.select(_.colorBorder, _._colorDarkModeLevel1)
},
title: {
backgroundColor: _.select(_.colorBg, _._colorDarkModeLevel1),
borderColor: _.select(_.colorBorder, _._colorDarkModeLevel1)
},
mainActive: {
backgroundColor: _.colorMain,
borderColor: _.colorMain
},
warningActive: {
backgroundColor: _.colorWarning,
borderColor: _.colorWarning
},
primaryActive: {
backgroundColor: _.colorPrimary,
borderColor: _.colorPrimary
},
waitActive: {
backgroundColor: _.colorWait,
borderColor: _.colorWait
}
}))
| 21.643836 | 77 | 0.59557 |
7358f5de8791270f6bd20ed5e25b4c11191e9ef3 | 1,735 | js | JavaScript | service/processModel.service.js | Lakshamana/spm-client | 42e4ffc8ad55aaabb7b1f5c3b921dbbe58059943 | [
"MIT"
] | null | null | null | service/processModel.service.js | Lakshamana/spm-client | 42e4ffc8ad55aaabb7b1f5c3b921dbbe58059943 | [
"MIT"
] | null | null | null | service/processModel.service.js | Lakshamana/spm-client | 42e4ffc8ad55aaabb7b1f5c3b921dbbe58059943 | [
"MIT"
] | null | null | null | import { maybe } from '~/util/utils'
let source
export function makeProcessModelServices(axios) {
return {
/**
* Subscribes to a server's sent event (sse),
* dispatched on kafka message comsumption
* @param {Number} processModelId
* @param {Function} callback
*/
subscribe(processModelId, token, callback) {
const url =
`http://${process.env.API_HOST}:${process.env.API_PORT}/api/spm-kafka/subscribe/${processModelId}` +
'?token=' +
token
source = new EventSource(url)
source.onmessage = evt => {
callback(JSON.parse(evt.data).xmlCell)
}
},
get source() {
return source
},
unsubscribe() {
axios.get('/api/spm-kafka/unsubscribe').then(response => {
if (source) {
source.removeEventListener('message')
source.close()
source = undefined
}
})
},
publish(username, processModelId, cell, operation) {
return axios.post('/api/spm-kafka/publish', {
username,
processModelId,
...maybe('operation', operation),
xmlCell: {
nodeType: cell.getAttribute('type'),
label: cell.getAttribute('label'),
objectId: cell.id,
style: cell.style,
isEdge: !!cell.edge,
...maybe('x', !cell.edge && cell.geometry.x),
...maybe('y', !cell.edge && cell.geometry.y),
...maybe(
'sourceNode',
cell.edge && {
objectId: cell.source.id
}
),
...maybe(
'targetNode',
cell.edge && {
objectId: cell.target.id
}
)
}
})
}
}
}
| 25.514706 | 108 | 0.517579 |
7359299a799d7a766f78ea45022f4dbe02235d31 | 3,470 | js | JavaScript | packages/plutarch/lib/commands/server.js | Alfred-sg/plutarch | 7ab2d94ecae89394e7fcebde50187f2c00af2ff7 | [
"MIT"
] | 7 | 2018-07-15T14:54:04.000Z | 2019-08-14T06:49:26.000Z | packages/plutarch/lib/commands/server.js | Alfred-sg/plutarch | 7ab2d94ecae89394e7fcebde50187f2c00af2ff7 | [
"MIT"
] | 6 | 2017-10-14T07:38:40.000Z | 2019-07-09T01:57:48.000Z | packages/plutarch/lib/commands/server.js | Alfred-sg/plutarch | 7ab2d94ecae89394e7fcebde50187f2c00af2ff7 | [
"MIT"
] | 1 | 2019-07-30T02:02:06.000Z | 2019-07-30T02:02:06.000Z | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _path = _interopRequireDefault(require("path"));
var _commonBin = _interopRequireDefault(require("common-bin"));
var constants = _interopRequireWildcard(require("../constants"));
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
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; }
class ServerCommand extends _commonBin.default {
constructor(rawArgv) {
super(rawArgv);
this.options = {
cwd: {
type: 'string',
description: 'process cwd'
},
port: {
type: 'number',
default: 3001,
alias: "p",
description: 'dev server port'
},
server: {
type: 'string',
default: constants.ServerPath,
alias: 's',
description: 'plutarch server file path'
},
mock: {
type: 'string',
default: constants.MockPath,
alias: 'm',
description: 'plutarch mock file path'
},
mocks: {
type: 'string',
default: constants.MocksPath,
description: 'plutarch mock directory path'
},
dll: {
type: 'boolean',
default: false,
alias: 'd',
description: 'rebuild mainfest.json'
}
};
}
*run({
cwd,
env,
argv,
rawArgv
}) {
const runCompilePath = require.resolve("../exec/compile.js");
const forkNodeArgv = this.helper.unparseArgv(argv);
this.helper.forkNode(runCompilePath, forkNodeArgv, {
cwd: argv.cwd || cwd,
env: _objectSpread({}, process.env, {
"NODE_ENV": "development",
environment: 'dev',
"TMPDIR": _path.default.resolve(argv.cwd || cwd, '.tmpdir')
})
});
}
get description() {
return 'Create dev server';
}
}
var _default = ServerCommand;
exports.default = _default;
module.exports = exports.default; | 38.131868 | 518 | 0.644669 |
7359cf31ea3b857ad20a6424ebf041b102ed1864 | 367 | js | JavaScript | .versionrc.js | izzeroone01/next-plugin-antd-less | 84e7fe0f3b7fbb924451d6d652490aca346e5f01 | [
"MIT"
] | 317 | 2020-08-05T18:17:56.000Z | 2022-03-30T05:55:25.000Z | .versionrc.js | izzeroone01/next-plugin-antd-less | 84e7fe0f3b7fbb924451d6d652490aca346e5f01 | [
"MIT"
] | 90 | 2020-08-27T09:30:40.000Z | 2022-03-31T12:23:59.000Z | .versionrc.js | izzeroone01/next-plugin-antd-less | 84e7fe0f3b7fbb924451d6d652490aca346e5f01 | [
"MIT"
] | 51 | 2020-08-15T17:25:52.000Z | 2022-03-30T05:55:27.000Z | module.exports = {
types: [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'perf', section: 'Performance' },
{ type: 'refactor', section: 'Refactor' },
{ type: 'chore', section: 'Chore' },
{ type: 'docs', hidden: true },
{ type: 'style', hidden: true },
{ type: 'test', hidden: true },
],
};
| 28.230769 | 46 | 0.523161 |
7359fad88eda361cc9e4c7ae8023fa99ceec33dd | 8,361 | js | JavaScript | www/addons/messages/services/messages_sync.js | JosAlbert/ap | afc95521ee65e766529a58789519d73f9cf11739 | [
"Apache-2.0"
] | 2 | 2018-02-16T23:02:01.000Z | 2018-02-16T23:02:06.000Z | www/addons/messages/services/messages_sync.js | JosAlbert/ap | afc95521ee65e766529a58789519d73f9cf11739 | [
"Apache-2.0"
] | null | null | null | www/addons/messages/services/messages_sync.js | JosAlbert/ap | afc95521ee65e766529a58789519d73f9cf11739 | [
"Apache-2.0"
] | 2 | 2016-05-26T10:15:17.000Z | 2018-03-07T10:59:57.000Z | // (C) Copyright 2015 Martin Dougiamas
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
angular.module('mm.addons.messages')
/**
* Messages synchronization factory.
*
* @module mm.addons.messages
* @ngdoc service
* @name $mmaMessagesSync
*/
.factory('$mmaMessagesSync', function($log, $mmSite, $q, $timeout, $mmUser, $mmApp, $translate, $mmaMessages, $mmaMessagesOffline,
$mmSitesManager, $mmEvents, mmaMessagesAutomSyncedEvent, $mmSync, mmaMessagesComponent) {
$log = $log.getInstance('$mmaMessagesSync');
// Inherit self from $mmSync.
var self = $mmSync.createChild(mmaMessagesComponent);
/**
* Try to synchronize all the discussions in a certain site or in all sites.
*
* @module mm.addons.messages
* @ngdoc method
* @name $mmaMessagesSync#syncAllDiscussions
* @param {String} [siteId] Site ID to sync. If not defined, sync all sites.
* @param {Boolean} onlyDeviceOffline True to only sync discussions that failed because device was offline, false to sync all.
* @return {Promise} Promise resolved if sync is successful, rejected if sync fails.
*/
self.syncAllDiscussions = function(siteId, onlyDeviceOffline) {
if (!$mmApp.isOnline()) {
$log.debug('Cannot sync all discussions because device is offline.');
return $q.reject();
}
var promise;
if (!siteId) {
// No site ID defined, sync all sites.
$log.debug('Try to sync discussions in all sites.' + (onlyDeviceOffline ? ' Only offline.' : ''));
promise = $mmSitesManager.getSitesIds();
} else {
$log.debug('Try to sync discussions in site ' + siteId + (onlyDeviceOffline ? '. Only offline.' : ''));
promise = $q.when([siteId]);
}
return promise.then(function(siteIds) {
var sitePromises = [];
angular.forEach(siteIds, function(siteId) {
// Get all messages pending to be sent in the site.
var fn = onlyDeviceOffline ? $mmaMessagesOffline.getAllDeviceOfflineMessages : $mmaMessagesOffline.getAllMessages;
sitePromises.push(fn(siteId).then(function(messages) {
var userIds = [],
promises = [];
// Get all the discussions to be synced.
angular.forEach(messages, function(message) {
if (userIds.indexOf(message.touserid) == -1) {
userIds.push(message.touserid);
}
});
// Sync all discussions.
angular.forEach(userIds, function(userId) {
promises.push(self.syncDiscussion(userId, siteId).then(function(warnings) {
if (typeof warnings != 'undefined') {
// Sync successful, send event.
$mmEvents.trigger(mmaMessagesAutomSyncedEvent, {
siteid: siteId,
userid: userId,
warnings: warnings
});
}
}));
});
return $q.all(promises);
}));
});
return $q.all(sitePromises);
});
};
/**
* Synchronize a discussion.
*
* @module mm.addons.messages
* @ngdoc method
* @name $mmaMessagesSync#syncDiscussion
* @param {Number} userId User ID of the discussion.
* @param {String} [siteId] Site ID. If not defined, current site.
* @return {Promise} Promise resolved if sync is successful, rejected otherwise.
*/
self.syncDiscussion = function(userId, siteId) {
siteId = siteId || $mmSite.getId();
var syncPromise,
warnings = [];
if (self.isSyncing(userId, siteId)) {
// There's already a sync ongoing for this SCORM, return the promise.
return self.getOngoingSync(userId, siteId);
}
$log.debug('Try to sync discussion with user ' + userId);
// Get offline messages to be sent.
syncPromise = $mmaMessagesOffline.getMessages(userId, siteId).then(function(messages) {
if (!messages.length) {
// Nothing to sync.
return [];
} else if (!$mmApp.isOnline()) {
// Cannot sync in offline. Mark messages as device offline.
$mmaMessagesOffline.setMessagesDeviceOffline(messages, true);
return $q.reject();
}
var promise = $q.when(),
errors = [];
// Order message by timecreated.
messages = $mmaMessages.sortMessages(messages);
// Send the messages. We don't use $mmaMessages#sendMessagesOnline because there's a problem with display order.
// @todo Use $mmaMessages#sendMessagesOnline once the display order is fixed.
angular.forEach(messages, function(message, index) {
// Chain message sending. If 1 message fails to be sent we'll stop sending.
promise = promise.then(function() {
return $mmaMessages.sendMessageOnline(userId, message.smallmessage, siteId).catch(function(data) {
if (data.wserror) {
// Error returned by WS. Store the error to show a warning but keep sending messages.
if (errors.indexOf(data.error) == -1) {
errors.push(data.error);
}
} else {
// Error sending, stop execution.
if ($mmApp.isOnline()) {
// App is online, unmark deviceoffline if marked.
$mmaMessagesOffline.setMessagesDeviceOffline(messages, false);
}
return $q.reject(data.error);
}
}).then(function() {
// Message was sent, delete it from local DB.
return $mmaMessagesOffline.deleteMessage(userId, message.smallmessage, message.timecreated, siteId);
}).then(function() {
// All done. Wait 1 second to ensure timecreated of messages is different.
if (index < messages.length - 1) {
return $timeout(function() {}, 1000);
}
});
});
});
return promise.then(function() {
return errors;
});
}).then(function(errors) {
if (errors && errors.length) {
// At least an error occurred, get user full name and add errors to warnings array.
return $mmUser.getProfile(userId, undefined, true).catch(function() {
// Ignore errors.
return {};
}).then(function(user) {
angular.forEach(errors, function(error) {
warnings.push($translate.instant('mma.messages.warningmessagenotsent', {
user: user.fullname ? user.fullname : userId,
error: error
}));
});
});
}
}).then(function() {
// All done, return the warnings.
return warnings;
});
return self.addOngoingSync(userId, syncPromise, siteId);
};
return self;
});
| 42.876923 | 131 | 0.528286 |
7359fe362c9ebe8b82b7456aa415b46acb24f8f0 | 2,845 | js | JavaScript | shared/actions/notifications-gen.js | hmuhtetpaing/keybase | 5fd17eaf3496a839b4910ab569440b5a8a52f7c0 | [
"BSD-3-Clause"
] | 1 | 2020-06-07T07:41:20.000Z | 2020-06-07T07:41:20.000Z | shared/actions/notifications-gen.js | hmuhtetpaing/keybase | 5fd17eaf3496a839b4910ab569440b5a8a52f7c0 | [
"BSD-3-Clause"
] | 13 | 2019-07-20T14:16:39.000Z | 2022-03-25T18:53:49.000Z | shared/actions/notifications-gen.js | hmuhtetpaing/keybase | 5fd17eaf3496a839b4910ab569440b5a8a52f7c0 | [
"BSD-3-Clause"
] | null | null | null | // @flow
// NOTE: This file is GENERATED from json files in actions/json. Run 'yarn build-actions' to regenerate
/* eslint-disable no-unused-vars,prettier/prettier,no-use-before-define */
import * as I from 'immutable'
import * as RPCTypes from '../constants/types/rpc-gen'
import * as Types from '../constants/types/notifications'
import * as Tabs from '../constants/tabs'
// Constants
export const resetStore = 'common:resetStore' // not a part of notifications but is handled by every reducer. NEVER dispatch this
export const typePrefix = 'notifications:'
export const badgeApp = 'notifications:badgeApp'
export const listenForKBFSNotifications = 'notifications:listenForKBFSNotifications'
export const listenForNotifications = 'notifications:listenForNotifications'
export const receivedBadgeState = 'notifications:receivedBadgeState'
export const setAppBadgeState = 'notifications:setAppBadgeState'
// Payload Types
type _BadgeAppPayload = $ReadOnly<{|
key: Types.NotificationKeys,
on: boolean,
count?: number,
|}>
type _ListenForKBFSNotificationsPayload = void
type _ListenForNotificationsPayload = void
type _ReceivedBadgeStatePayload = $ReadOnly<{|badgeState: RPCTypes.BadgeState|}>
type _SetAppBadgeStatePayload = $ReadOnly<{|
desktopAppBadgeCount: number,
mobileAppBadgeCount: number,
navBadges: I.Map<Tabs.Tab, number>,
|}>
// Action Creators
export const createBadgeApp = (payload: _BadgeAppPayload) => ({error: false, payload, type: badgeApp})
export const createListenForKBFSNotifications = (payload: _ListenForKBFSNotificationsPayload) => ({error: false, payload, type: listenForKBFSNotifications})
export const createListenForNotifications = (payload: _ListenForNotificationsPayload) => ({error: false, payload, type: listenForNotifications})
export const createReceivedBadgeState = (payload: _ReceivedBadgeStatePayload) => ({error: false, payload, type: receivedBadgeState})
export const createSetAppBadgeState = (payload: _SetAppBadgeStatePayload) => ({error: false, payload, type: setAppBadgeState})
// Action Payloads
export type BadgeAppPayload = $Call<typeof createBadgeApp, _BadgeAppPayload>
export type ListenForKBFSNotificationsPayload = $Call<typeof createListenForKBFSNotifications, _ListenForKBFSNotificationsPayload>
export type ListenForNotificationsPayload = $Call<typeof createListenForNotifications, _ListenForNotificationsPayload>
export type ReceivedBadgeStatePayload = $Call<typeof createReceivedBadgeState, _ReceivedBadgeStatePayload>
export type SetAppBadgeStatePayload = $Call<typeof createSetAppBadgeState, _SetAppBadgeStatePayload>
// All Actions
// prettier-ignore
export type Actions =
| BadgeAppPayload
| ListenForKBFSNotificationsPayload
| ListenForNotificationsPayload
| ReceivedBadgeStatePayload
| SetAppBadgeStatePayload
| {type: 'common:resetStore', payload: void}
| 49.912281 | 156 | 0.808787 |
735ac73cec0156dfc19e4298305f3dd1bb7dc7e6 | 16,983 | js | JavaScript | tests/html_tests/websitesource/37,fc2.com/test_files/show_ads.js | daejunpark/jsaf | d9c155f01330672a7b895d77782001c95b29e8a0 | [
"BSD-3-Clause"
] | 2 | 2018-10-07T21:28:29.000Z | 2020-11-11T12:09:30.000Z | tests/html_tests/websitesource/34,mail.ru/test_files/3030_files/show_ads.js | daejunpark/jsaf | d9c155f01330672a7b895d77782001c95b29e8a0 | [
"BSD-3-Clause"
] | null | null | null | tests/html_tests/websitesource/34,mail.ru/test_files/3030_files/show_ads.js | daejunpark/jsaf | d9c155f01330672a7b895d77782001c95b29e8a0 | [
"BSD-3-Clause"
] | 1 | 2020-11-11T13:00:37.000Z | 2020-11-11T13:00:37.000Z | (function(){var aa=function(a,b,c){return a.call.apply(a.bind,arguments)},ba=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},e=function(a,b,c){e=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?aa:ba;return e.apply(null,arguments)};var h=(new Date).getTime();var k=function(a){a=parseFloat(a);return isNaN(a)||1<a||0>a?0:a},ca=/^([\w-]+\.)*([\w-]{2,})(\:[0-9]+)?$/,da=function(a,b){if(!a)return b;var c=a.match(ca);return c?c[0]:b};var ea=k("0.15"),fa=k("0.005"),ga=k("1.0"),ha=k("0.005"),ia=k("0.01");var ja=/^true$/.test("false")?!0:!1;var ka=function(){return da("","pagead2.googlesyndication.com")};var la=/&/g,ma=/</g,na=/>/g,qa=/\"/g,ra={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\"},l={"'":"\\'"};var sa=window,n,ta=null,r=document.getElementsByTagName("script");r&&r.length&&(ta=r[r.length-1].parentNode);n=ta;ka();var ua=function(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(null,a[c],c,a)},s=function(a){return!!a&&"function"==typeof a&&!!a.call},va=function(a,b){if(!(2>arguments.length))for(var c=1,d=arguments.length;c<d;++c)a.push(arguments[c])};function wa(a,b){xa(a,"load",b)}
var xa=function(a,b,c,d){return a.addEventListener?(a.addEventListener(b,c,d||!1),!0):a.attachEvent?(a.attachEvent("on"+b,c),!0):!1},ya=function(a,b,c,d){c=e(d,c);return xa(a,b,c,void 0)?c:null},za=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent&&a.detachEvent("on"+b,c)},u=function(a,b){if(!(1E-4>Math.random())){var c=Math.random();if(c<b)return a[Math.floor(c/b*a.length)]}return null},Aa=function(a){try{return!!a.location.href||""===a.location.href}catch(b){return!1}};var Ba=null,Ca=function(){if(!Ba){for(var a=window,b=a,c=0;a!=a.parent;)if(a=a.parent,c++,Aa(a))b=a;else break;Ba=b}return Ba};var v,w=function(a){this.c=[];this.b=a||window;this.a=0;this.d=null},Da=function(a,b){this.l=a;this.win=b};w.prototype.p=function(a,b){0!=this.a||0!=this.c.length||b&&b!=window?this.g(a,b):(this.a=2,this.f(new Da(a,window)))};w.prototype.g=function(a,b){this.c.push(new Da(a,b||this.b));Ea(this)};w.prototype.q=function(a){this.a=1;a&&(this.d=this.b.setTimeout(e(this.e,this),a))};w.prototype.e=function(){1==this.a&&(null!=this.d&&(this.b.clearTimeout(this.d),this.d=null),this.a=0);Ea(this)};
w.prototype.r=function(){return!0};w.prototype.nq=w.prototype.p;w.prototype.nqa=w.prototype.g;w.prototype.al=w.prototype.q;w.prototype.rl=w.prototype.e;w.prototype.sz=w.prototype.r;var Ea=function(a){a.b.setTimeout(e(a.o,a),0)};w.prototype.o=function(){if(0==this.a&&this.c.length){var a=this.c.shift();this.a=2;a.win.setTimeout(e(this.f,this,a),0);Ea(this)}};w.prototype.f=function(a){this.a=0;a.l()};
var Fa=function(a){try{return a.sz()}catch(b){return!1}},Ga=function(a){return!!a&&("object"==typeof a||"function"==typeof a)&&Fa(a)&&s(a.nq)&&s(a.nqa)&&s(a.al)&&s(a.rl)},Ha=function(){if(v&&Fa(v))return v;var a=Ca(),b=a.google_jobrunner;return Ga(b)?v=b:a.google_jobrunner=v=new w(a)},Ia=function(a,b){Ha().nq(a,b)},Ja=function(a,b){Ha().nqa(a,b)};var Ka=/MSIE [2-7]|PlayStation|Gecko\/20090226|Android 2\./i,La=/Android|Opera/;var Ma=function(a,b,c){c||(c=ja?"https":"http");return[c,"://",a,b].join("")};var Na=function(){},Pa=function(a,b,c){switch(typeof b){case "string":Oa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(b instanceof Array){var d=b.length;c.push("[");for(var f="",g=0;g<d;g++)c.push(f),Pa(a,b[g],c),f=",";c.push("]");break}c.push("{");d="";for(f in b)b.hasOwnProperty(f)&&(g=b[f],"function"!=typeof g&&(c.push(d),Oa(f,c),c.push(":"),Pa(a,g,c),
d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}},Qa={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ra=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,Oa=function(a,b){b.push('"');b.push(a.replace(Ra,function(a){if(a in Qa)return Qa[a];var b=a.charCodeAt(0),f="\\u";16>b?f+="000":256>b?f+="00":4096>b&&(f+="0");return Qa[a]=f+b.toString(16)}));b.push('"')};var x="google_ad_block google_ad_channel google_ad_client google_ad_format google_ad_height google_ad_host google_ad_host_channel google_ad_host_tier_id google_ad_output google_ad_override google_ad_region google_ad_section google_ad_slot google_ad_type google_ad_width google_adtest google_allow_expandable_ads google_alternate_ad_url google_alternate_color google_analytics_domain_name google_analytics_uacct google_bid google_city google_color_bg google_color_border google_color_line google_color_link google_color_text google_color_url google_container_id google_contents google_country google_cpm google_ctr_threshold google_cust_age google_cust_ch google_cust_gender google_cust_id google_cust_interests google_cust_job google_cust_l google_cust_lh google_cust_u_url google_disable_video_autoplay google_ed google_eids google_enable_ose google_encoding google_floating_ad_position google_font_face google_font_size google_frame_id google_gl google_hints google_image_size google_kw google_kw_type google_lact google_language google_loeid google_max_num_ads google_max_radlink_len google_mtl google_num_radlinks google_num_radlinks_per_unit google_num_slots_to_rotate google_only_ads_with_video google_only_pyv_ads google_only_userchoice_ads google_override_format google_page_url google_previous_watch google_previous_searches google_referrer_url google_region google_reuse_colors google_rl_dest_url google_rl_filtering google_rl_mode google_rt google_safe google_sc_id google_scs google_sui google_skip google_tag_info google_targeting google_tdsma google_tfs google_tl google_ui_features google_ui_version google_video_doc_id google_video_product_type google_video_url_to_fetch google_with_pyv_ads google_yt_pt google_yt_up".split(" "),
Sa=function(){var a=y;a.google_page_url&&(a.google_page_url=String(a.google_page_url));var b=[];ua(a,function(a,d){if(null!=a){var f;try{var g=[];Pa(new Na,a,g);f=g.join("")}catch(p){}f&&va(b,d,"=",f,";")}});return b.join("")};var Ta=/\.((google(|groups|mail|images|print))|gmail)\./,Ua=function(){var a=z,b=Ta.test(a.location.host);return!(!a.postMessage||!a.localStorage||!a.JSON||b)};var Va=function(a){this.b=a;a.google_iframe_oncopy||(a.google_iframe_oncopy={handlers:{}});this.m=a.google_iframe_oncopy},Wa;var A="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){w.location.replace(h)}}";
/[&<>\"]/.test(A)&&(-1!=A.indexOf("&")&&(A=A.replace(la,"&")),-1!=A.indexOf("<")&&(A=A.replace(ma,"<")),-1!=A.indexOf(">")&&(A=A.replace(na,">")),-1!=A.indexOf('"')&&(A=A.replace(qa,""")));Wa=A;Va.prototype.set=function(a,b){this.m.handlers[a]=b;this.b.addEventListener&&!/MSIE/.test(navigator.userAgent)&&this.b.addEventListener("load",e(this.n,this,a),!1)};Va.prototype.n=function(a){a=this.b.document.getElementById(a);var b=a.contentWindow.document;if(a.onload&&b&&(!b.body||!b.body.firstChild))a.onload()};var Xa=function(a){a=a.google_unique_id;return"number"==typeof a?a:0},Za=function(){var a="script";return["<",a,' src="',Ma(ka(),"/pagead/js/r20130628/r20130206/show_ads_impl.js",""),'"></',a,">"].join("")},$a=function(a,b,c,d){return function(){var f=!1;d&&Ha().al(3E4);try{if(Aa(a.document.getElementById(b).contentWindow)){var g=a.document.getElementById(b).contentWindow,
p=g.document;p.body&&p.body.firstChild||(p.open(),g.google_async_iframe_close=!0,p.write(c))}else{var Q=a.document.getElementById(b).contentWindow,oa;g=c;g=String(g);if(g.quote)oa=g.quote();else{for(var p=['"'],R=0;R<g.length;R++){var S=g.charAt(R),Ya=S.charCodeAt(0),Yb=p,Zb=R+1,pa;if(!(pa=ra[S])){var D;if(31<Ya&&127>Ya)D=S;else{var q=S;if(q in l)D=l[q];else if(q in ra)D=l[q]=ra[q];else{var m=q,t=q.charCodeAt(0);if(31<t&&127>t)m=q;else{if(256>t){if(m="\\x",16>t||256<t)m+="0"}else m="\\u",4096>t&&
(m+="0");m+=t.toString(16).toUpperCase()}D=l[q]=m}}pa=D}Yb[Zb]=pa}p.push('"');oa=p.join("")}Q.location.replace("javascript:"+oa)}f=!0}catch(nc){Q=Ca().google_jobrunner,Ga(Q)&&Q.rl()}f&&(new Va(a)).set(b,$a(a,b,c,!1))}},ab=function(){var a=["<iframe"];ua(B,function(b,c){a.push(" "+c+'="'+(null==b?"":b)+'"')});a.push("></iframe>");return a.join("")},db=function(a,b){var c=bb,d=b?'"':"",f=d+"0"+d;a.width=d+cb+d;a.height=d+c+d;a.frameborder=f;a.marginwidth=f;a.marginheight=f;a.vspace=f;a.hspace=f;a.allowtransparency=
d+"true"+d;a.scrolling=d+"no"+d},eb=Math.floor(1E6*Math.random()),fb=function(a){for(var b=a.data.split("\n"),c={},d=0;d<b.length;d++){var f=b[d].indexOf("=");-1!=f&&(c[b[d].substr(0,f)]=b[d].substr(f+1))}b=c[3];if(c[1]==eb&&(window.google_top_js_status=4,a.source==top&&0==b.indexOf(a.origin)&&(window.google_top_values=c,window.google_top_js_status=5),window.google_top_js_callbacks)){for(a=0;a<window.google_top_js_callbacks.length;a++)window.google_top_js_callbacks[a]();window.google_top_js_callbacks.length=
0}};var gb=function(a,b,c){this.x=a;this.y=b;this.z=c},hb=function(a,b,c){this.beta=a;this.gamma=b;this.alpha=c},jb=function(){var a=C,b=ib;this.deviceAccelerationWithGravity=this.deviceAccelerationWithoutGravity=null;this.deviceMotionEventCallbacks=[];this.deviceOrientation=null;this.deviceOrientationEventCallbacks=[];this.isDeviceOrientationEventListenerRegistered=this.isDeviceMotionEventListenerRegistered=this.didDeviceOrientationCallbacksTimeoutExpire=this.didDeviceMotionCallbacksTimeoutExpire=!1;
this.registeredMozOrientationEventListener=this.registeredDeviceOrientationEventListener=this.registeredDeviceMotionEventListener=null;this.sensorsExperiment=b;this.stopTimeStamp=this.startTimeStamp=null;this.win=a},E=function(a){this.a=a;this.a.win.DeviceOrientationEvent?(this.a.registeredDeviceOrientationEventListener=ya(this.a.win,"deviceorientation",this,this.j),this.a.isDeviceOrientationEventListenerRegistered=!0):this.a.win.OrientationEvent&&(this.a.registeredMozOrientationEventListener=ya(this.a.win,
"MozOrientation",this,this.k),this.a.isDeviceOrientationEventListenerRegistered=!0);this.a.win.DeviceMotionEvent&&(this.a.registeredDeviceMotionEventListener=ya(this.a.win,"devicemotion",this,this.i),this.a.isDeviceMotionEventListenerRegistered=!0)};
E.prototype.i=function(a){a.acceleration&&(this.a.deviceAccelerationWithoutGravity=new gb(a.acceleration.x,a.acceleration.y,a.acceleration.z));a.accelerationIncludingGravity&&(this.a.deviceAccelerationWithGravity=new gb(a.accelerationIncludingGravity.x,a.accelerationIncludingGravity.y,a.accelerationIncludingGravity.z));kb(this.a.deviceMotionEventCallbacks);za(this.a.win,"devicemotion",this.a.registeredDeviceMotionEventListener)};
E.prototype.j=function(a){this.a.deviceOrientation=new hb(a.beta,a.gamma,a.alpha);kb(this.a.deviceOrientationEventCallbacks);za(this.a.win,"deviceorientation",this.a.registeredDeviceOrientationEventListener)};E.prototype.k=function(a){this.a.deviceOrientation=new hb(-90*a.y,90*a.x,null);kb(this.a.deviceOrientationEventCallbacks);za(this.a.win,"MozOrientation",this.a.registeredMozOrientationEventListener)};var kb=function(a){for(var b=0;b<a.length;++b)a[b]();a.length=0};(function(a){"google_onload_fired"in a||(a.google_onload_fired=!1,wa(a,function(){a.google_onload_fired=!0}))})(window);
if(!window.google_top_experiment){var lb=window;if(2!==(lb.top==lb?0:Aa(lb.top)?1:2))window.google_top_js_status=0;else if(top.postMessage){var mb;try{mb=top.frames.google_top_static_frame?!0:!1}catch(nb){mb=!1}if(mb){if(window.google_top_experiment=u(["jp_c","jp_zl"],ea)||"jp_wfpmr","jp_zl"===window.google_top_experiment||"jp_wfpmr"===window.google_top_experiment){xa(window,"message",fb);window.google_top_js_status=3;var ob={0:"google_loc_request",1:eb},pb=[],qb;for(qb in ob)pb.push(qb+"="+ob[qb]);
top.postMessage(pb.join("\n"),"*")}}else window.google_top_js_status=2}else window.google_top_js_status=1}var F=void 0,F=F||window,rb=!1;if(F.navigator&&F.navigator.userAgent)var sb=F.navigator.userAgent,rb=0!=sb.indexOf("Opera")&&-1!=sb.indexOf("WebKit")&&-1!=sb.indexOf("Mobile");
if(rb){var C=window;if(!/Android/.test(C.navigator.userAgent)&&0==Xa(C)&&!C.google_sensors){var ib,tb=null,ub=C;ub.google_top_experiment&&"jp_c"!=ub.google_top_experiment||(tb=u(["ds_c","ds_zl","ds_wfea"],ia));if(ib=tb)C.google_sensors=new jb,"ds_c"!=ib&&new E(C.google_sensors)}}var vb;
if(!(vb=!1===window.google_enable_async)){var wb;var xb=navigator.userAgent;Ka.test(xb)?wb=!1:(void 0!==window.google_async_for_oa_experiment||(!La.test(navigator.userAgent)||Ka.test(navigator.userAgent))||(window.google_async_for_oa_experiment=u(["C","E"],ha)),wb=La.test(xb)?"E"===window.google_async_for_oa_experiment:!0);vb=!wb||window.google_container_id||window.google_ad_output&&"html"!=window.google_ad_output}
if(vb)window.google_loader_used="sb",window.google_start_time=h,document.write(Za());else{var yb=window;yb.google_unique_id?++yb.google_unique_id:yb.google_unique_id=1;for(var z=window,y,zb={},Ab=0,Bb=x.length;Ab<Bb;Ab++){var Cb=x[Ab];null!=z[Cb]&&(zb[Cb]=z[Cb])}y=zb;y.google_loader_used="sa";for(var Db=0,Eb=x.length;Db<Eb;Db++)z[x[Db]]=null;var cb=y.google_ad_width,bb=y.google_ad_height,G={};db(G,!0);G.onload='"'+Wa+'"';for(var H,Fb=y,Gb=z.document,I=G.id,Hb=0;!I||Gb.getElementById(I);)I="aswift_"+
Hb++;G.id=I;G.name=I;var Ib=Fb.google_ad_width,Jb=Fb.google_ad_height,J=["<iframe"],K;for(K in G)G.hasOwnProperty(K)&&va(J,K+"="+G[K]);J.push('style="left:0;position:absolute;top:0;"');J.push("></iframe>");var Kb="border:none;height:"+Jb+"px;margin:0;padding:0;position:relative;visibility:visible;width:"+Ib+"px";Gb.write(['<ins style="display:inline-table;',Kb,'"><ins id="',G.id+"_anchor",'" style="display:block;',Kb,'">',J.join(" "),"</ins></ins>"].join(""));H=G.id;var Lb=Sa(),L=y,Mb=L.google_ad_output,
M=L.google_ad_format;M||"html"!=Mb&&null!=Mb||(M=L.google_ad_width+"x"+L.google_ad_height);var Nb=!L.google_ad_slot||L.google_override_format||"aa"==L.google_loader_used,M=M&&Nb?M.toLowerCase():"";L.google_ad_format=M;var N,O=y||sa,Ob=[O.google_ad_slot,O.google_ad_format,O.google_ad_type,O.google_ad_width,O.google_ad_height];if(n){var P;if(n){for(var Pb=[],Qb=0,T=n;T&&25>Qb;T=T.parentNode,++Qb)Pb.push(9!=T.nodeType&&T.id||"");P=Pb.join()}else P="";P&&Ob.push(P)}var Rb=0;if(Ob){var Sb=Ob.join(":"),
Tb=Sb.length;if(0==Tb)Rb=0;else{for(var U=305419896,Ub=0;Ub<Tb;Ub++)U^=(U<<5)+(U>>2)+Sb.charCodeAt(Ub)&4294967295;Rb=0<U?U:4294967296+U}}N=Rb.toString();o:{var V=y,W=z.google_async_slots;W||(W=z.google_async_slots={});var X=String(Xa(z));if(X in W&&(X+="b",X in W))break o;W[X]={sent:!1,w:V.google_ad_width||"",h:V.google_ad_height||"",adk:N,type:V.google_ad_type||"",slot:V.google_ad_slot||"",fmt:V.google_ad_format||"",cli:V.google_ad_client||"",saw:[]}}var Y,Vb=Ua(),Wb=3==({visible:1,hidden:2,prerender:3,
preview:4}[z.document.webkitVisibilityState||z.document.mozVisibilityState||z.document.visibilityState||""]||0);Vb&&(!Wb&&void 0===z.google_ad_handling_experiment)&&(z.google_ad_handling_experiment=u(["XN","EI"],fa)||u(["PC"],ga));Y=z.google_ad_handling_experiment?String(z.google_ad_handling_experiment):null;var Xb;var $b=y;if(Ua()&&1==z.google_unique_id&&"XN"!=Y){var ac="zrt_ads_frame"+z.google_unique_id,bc,cc=$b.google_page_url;if(!cc){var Z;e:{var $=z.document,dc=cb||z.google_ad_width,ec=bb||z.google_ad_height;
if(z.top==z)Z=!1;else{var fc=$.documentElement;if(dc&&ec){var gc=1,hc=1;z.innerHeight?(gc=z.innerWidth,hc=z.innerHeight):fc&&fc.clientHeight?(gc=fc.clientWidth,hc=fc.clientHeight):$.body&&(gc=$.body.clientWidth,hc=$.body.clientHeight);if(hc>2*ec||gc>2*dc){Z=!1;break e}}Z=!0}}cc=Z?z.document.referrer:z.document.URL}bc=encodeURIComponent(cc);var ic=null;"PC"!=Y&&"EI"!=Y||(ic=("PC"==Y?"K":"I")+"-"+(bc+"/"+N+"/"+z.google_unique_id));var B={};db(B,!1);B.style="display:none";var jc=ic;B.id=ac;B.name=ac;
B.src=Ma(da("","googleads.g.doubleclick.net"),["/pagead/html/r20130628/r20130206/zrt_lookup.html",jc?"#"+encodeURIComponent(jc):""].join(""));Xb=ab()}else Xb=null;var kc=(new Date).getTime(),lc=z.google_top_experiment,mc=z.google_async_for_oa_experiment,oc=["<!doctype html><html><body>",Xb,"<script>",Lb,"google_show_ads_impl=true;google_unique_id=",z.google_unique_id,';google_async_iframe_id="',H,
'";google_ad_unit_key="',N,'";google_start_time=',h,";",lc?'google_top_experiment="'+lc+'";':"",Y?'google_ad_handling_experiment="'+Y+'";':"",mc?'google_async_for_oa_experiment="'+mc+'";':"","google_bpp=",kc>h?kc-h:1,";\x3c/script>",Za(),"</body></html>"].join("");(z.document.getElementById(H)?Ia:Ja)($a(z,H,oc,!0))};})();
| 606.535714 | 2,243 | 0.723135 |
735adaf34630e9e02772e7cbe97472f73adfdd1a | 736 | js | JavaScript | node_modules/@material-ui/icons/StoreRounded.js | talehm/frontity | 69235aa25b3c26620cc977ec752abbb7fbd07463 | [
"MIT"
] | 80 | 2020-11-14T19:19:27.000Z | 2022-03-10T17:43:17.000Z | node_modules/@material-ui/icons/StoreRounded.js | talehm/frontity | 69235aa25b3c26620cc977ec752abbb7fbd07463 | [
"MIT"
] | 37 | 2020-06-22T17:30:38.000Z | 2020-06-26T03:01:00.000Z | node_modules/@material-ui/icons/StoreRounded.js | talehm/frontity | 69235aa25b3c26620cc977ec752abbb7fbd07463 | [
"MIT"
] | 58 | 2020-11-13T18:35:22.000Z | 2022-03-28T06:40:08.000Z | "use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _default = (0, _createSvgIcon.default)(_react.default.createElement("path", {
d: "M5 6h14c.55 0 1-.45 1-1s-.45-1-1-1H5c-.55 0-1 .45-1 1s.45 1 1 1zm15.16 1.8c-.09-.46-.5-.8-.98-.8H4.82c-.48 0-.89.34-.98.8l-1 5c-.12.62.35 1.2.98 1.2H4v5c0 .55.45 1 1 1h8c.55 0 1-.45 1-1v-5h4v5c0 .55.45 1 1 1s1-.45 1-1v-5h.18c.63 0 1.1-.58.98-1.2l-1-5zM12 18H6v-4h6v4z"
}), 'StoreRounded');
exports.default = _default; | 40.888889 | 274 | 0.703804 |
735b570e4ff5d138289e8911f8aa018f0283d191 | 936 | js | JavaScript | src/exporter-settings/settings-panel/settings-panel.js | fcamarlinghi/expresso | 0aa17b9cf8fe63820fe3106d4fba01cd8c366389 | [
"Apache-2.0"
] | 57 | 2016-08-04T16:37:59.000Z | 2022-02-04T01:02:48.000Z | src/exporter-settings/settings-panel/settings-panel.js | fcamarlinghi/expresso | 0aa17b9cf8fe63820fe3106d4fba01cd8c366389 | [
"Apache-2.0"
] | 21 | 2016-08-28T18:51:04.000Z | 2022-03-05T10:24:14.000Z | src/exporter-settings/settings-panel/settings-panel.js | fcamarlinghi/expresso | 0aa17b9cf8fe63820fe3106d4fba01cd8c366389 | [
"Apache-2.0"
] | 38 | 2016-08-04T16:44:57.000Z | 2021-11-08T01:49:37.000Z | import Ractive from 'ractive';
import Extension from 'core/Extension.js';
import CEP from 'core/CEP.js';
import './settings-panel.less';
export default Ractive.extend({
template: require('./settings-panel.html'),
// Append to document body
el: document.body,
append: true,
data: {
settings: null,
generalSettingsVisible: true,
tgaSettingsVisible: true,
},
observer: null,
oninit()
{
this._super();
this.observer = this.observe('settings.*', (value, old, path) =>
{
let p = path.replace('settings.', '');
Extension.get().settings.set(p, value);
}, { init: false });
this.reload();
},
reload()
{
this.observer.silence();
this.set('settings', Extension.get().settings.all());
this.observer.resume();
},
close()
{
CEP.closeExtension();
},
});
| 18.72 | 72 | 0.549145 |
735b7f4036d6eaa30e23f3688e023b4ef6ae3a8a | 116,741 | js | JavaScript | public/temp/26.js | AlexandrUSA/Laravel_SPA_Boilerplate | f7ad0c1b792a2768a40ada68c19db357782ece8c | [
"MIT"
] | null | null | null | public/temp/26.js | AlexandrUSA/Laravel_SPA_Boilerplate | f7ad0c1b792a2768a40ada68c19db357782ece8c | [
"MIT"
] | null | null | null | public/temp/26.js | AlexandrUSA/Laravel_SPA_Boilerplate | f7ad0c1b792a2768a40ada68c19db357782ece8c | [
"MIT"
] | null | null | null | webpackJsonp([26],{
/***/ 347:
/***/ (function(module, exports, __webpack_require__) {
eval("// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = __webpack_require__(348);\nif(typeof content === 'string') content = [[module.i, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar update = __webpack_require__(15)(\"50f86270\", content, false, {});\n// Hot Module Replacement\nif(false) {\n // When the styles change, update the <style> tags\n if(!content.locals) {\n module.hot.accept(\"!!../../../../../../node_modules/css-loader/index.js?sourceMap!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-57fbd0b8\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!./styles.scss\", function() {\n var newContent = require(\"!!../../../../../../node_modules/css-loader/index.js?sourceMap!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\\\"vue\\\":true,\\\"id\\\":\\\"data-v-57fbd0b8\\\",\\\"scoped\\\":true,\\\"hasInlineConfig\\\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!./styles.scss\");\n if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n update(newContent);\n });\n }\n // When the module is disposed, remove the <style> tags\n module.hot.dispose(function() { update(); });\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3Qvc3R5bGVzLnNjc3M/YTQ0MyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7QUFFQTtBQUNBLHFDQUE4TztBQUM5TztBQUNBO0FBQ0E7QUFDQSxtRUFBOEg7QUFDOUg7QUFDQTtBQUNBO0FBQ0E7QUFDQSw0SkFBNEosaUZBQWlGO0FBQzdPLHFLQUFxSyxpRkFBaUY7QUFDdFA7QUFDQTtBQUNBLElBQUk7QUFDSjtBQUNBO0FBQ0EsZ0NBQWdDLFVBQVUsRUFBRTtBQUM1QyIsImZpbGUiOiIzNDcuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBzdHlsZS1sb2FkZXI6IEFkZHMgc29tZSBjc3MgdG8gdGhlIERPTSBieSBhZGRpbmcgYSA8c3R5bGU+IHRhZ1xuXG4vLyBsb2FkIHRoZSBzdHlsZXNcbnZhciBjb250ZW50ID0gcmVxdWlyZShcIiEhLi4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvaW5kZXguanM/c291cmNlTWFwIS4uLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zdHlsZS1jb21waWxlci9pbmRleC5qcz97XFxcInZ1ZVxcXCI6dHJ1ZSxcXFwiaWRcXFwiOlxcXCJkYXRhLXYtNTdmYmQwYjhcXFwiLFxcXCJzY29wZWRcXFwiOnRydWUsXFxcImhhc0lubGluZUNvbmZpZ1xcXCI6dHJ1ZX0hLi4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Nhc3MtbG9hZGVyL2xpYi9sb2FkZXIuanMhLi9zdHlsZXMuc2Nzc1wiKTtcbmlmKHR5cGVvZiBjb250ZW50ID09PSAnc3RyaW5nJykgY29udGVudCA9IFtbbW9kdWxlLmlkLCBjb250ZW50LCAnJ11dO1xuaWYoY29udGVudC5sb2NhbHMpIG1vZHVsZS5leHBvcnRzID0gY29udGVudC5sb2NhbHM7XG4vLyBhZGQgdGhlIHN0eWxlcyB0byB0aGUgRE9NXG52YXIgdXBkYXRlID0gcmVxdWlyZShcIiEuLi8uLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLXN0eWxlLWxvYWRlci9saWIvYWRkU3R5bGVzQ2xpZW50LmpzXCIpKFwiNTBmODYyNzBcIiwgY29udGVudCwgZmFsc2UsIHt9KTtcbi8vIEhvdCBNb2R1bGUgUmVwbGFjZW1lbnRcbmlmKG1vZHVsZS5ob3QpIHtcbiAvLyBXaGVuIHRoZSBzdHlsZXMgY2hhbmdlLCB1cGRhdGUgdGhlIDxzdHlsZT4gdGFnc1xuIGlmKCFjb250ZW50LmxvY2Fscykge1xuICAgbW9kdWxlLmhvdC5hY2NlcHQoXCIhIS4uLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9jc3MtbG9hZGVyL2luZGV4LmpzP3NvdXJjZU1hcCEuLi8uLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc3R5bGUtY29tcGlsZXIvaW5kZXguanM/e1xcXCJ2dWVcXFwiOnRydWUsXFxcImlkXFxcIjpcXFwiZGF0YS12LTU3ZmJkMGI4XFxcIixcXFwic2NvcGVkXFxcIjp0cnVlLFxcXCJoYXNJbmxpbmVDb25maWdcXFwiOnRydWV9IS4uLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9zYXNzLWxvYWRlci9saWIvbG9hZGVyLmpzIS4vc3R5bGVzLnNjc3NcIiwgZnVuY3Rpb24oKSB7XG4gICAgIHZhciBuZXdDb250ZW50ID0gcmVxdWlyZShcIiEhLi4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvaW5kZXguanM/c291cmNlTWFwIS4uLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zdHlsZS1jb21waWxlci9pbmRleC5qcz97XFxcInZ1ZVxcXCI6dHJ1ZSxcXFwiaWRcXFwiOlxcXCJkYXRhLXYtNTdmYmQwYjhcXFwiLFxcXCJzY29wZWRcXFwiOnRydWUsXFxcImhhc0lubGluZUNvbmZpZ1xcXCI6dHJ1ZX0hLi4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Nhc3MtbG9hZGVyL2xpYi9sb2FkZXIuanMhLi9zdHlsZXMuc2Nzc1wiKTtcbiAgICAgaWYodHlwZW9mIG5ld0NvbnRlbnQgPT09ICdzdHJpbmcnKSBuZXdDb250ZW50ID0gW1ttb2R1bGUuaWQsIG5ld0NvbnRlbnQsICcnXV07XG4gICAgIHVwZGF0ZShuZXdDb250ZW50KTtcbiAgIH0pO1xuIH1cbiAvLyBXaGVuIHRoZSBtb2R1bGUgaXMgZGlzcG9zZWQsIHJlbW92ZSB0aGUgPHN0eWxlPiB0YWdzXG4gbW9kdWxlLmhvdC5kaXNwb3NlKGZ1bmN0aW9uKCkgeyB1cGRhdGUoKTsgfSk7XG59XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9ub2RlX21vZHVsZXMvdnVlLXN0eWxlLWxvYWRlciEuL25vZGVfbW9kdWxlcy9jc3MtbG9hZGVyP3NvdXJjZU1hcCEuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zdHlsZS1jb21waWxlcj97XCJ2dWVcIjp0cnVlLFwiaWRcIjpcImRhdGEtdi01N2ZiZDBiOFwiLFwic2NvcGVkXCI6dHJ1ZSxcImhhc0lubGluZUNvbmZpZ1wiOnRydWV9IS4vbm9kZV9tb2R1bGVzL3Nhc3MtbG9hZGVyL2xpYi9sb2FkZXIuanMhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3Qvc3R5bGVzLnNjc3Ncbi8vIG1vZHVsZSBpZCA9IDM0N1xuLy8gbW9kdWxlIGNodW5rcyA9IDI2Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///347\n");
/***/ }),
/***/ 348:
/***/ (function(module, exports, __webpack_require__) {
eval("exports = module.exports = __webpack_require__(10)(true);\n// imports\n\n\n// module\nexports.push([module.i, \"\\n#employees[data-v-57fbd0b8] {\\n position: relative;\\n width: 90%;\\n max-width: 1000px;\\n margin: 10px auto;\\n}\\nh2[data-v-57fbd0b8] {\\n margin-bottom: 20px;\\n}\\n.btn[data-v-57fbd0b8] {\\n text-transform: none !important;\\n}\\nli[data-v-57fbd0b8] {\\n margin: 5px !important;\\n -webkit-box-shadow: 0 0 15px #000;\\n box-shadow: 0 0 15px #000;\\n}\\n.table__buttons[data-v-57fbd0b8] {\\n position: absolute;\\n bottom: -50px;\\n}\\n.dialog__activator[data-v-57fbd0b8] {\\n position: absolute;\\n bottom: -30px;\\n left: 40px;\\n z-index: 1;\\n}\\n.card__title[data-v-57fbd0b8] {\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n}\\n.card__actions[data-v-57fbd0b8] {\\n -webkit-box-pack: center;\\n -ms-flex-pack: center;\\n justify-content: center;\\n}\\n.buttonEnter[data-v-57fbd0b8] {\\n -webkit-animation: buttonEnter-data-v-57fbd0b8 0.3s cubic-bezier(0.09, 0.9, 0.48, 1.64);\\n animation: buttonEnter-data-v-57fbd0b8 0.3s cubic-bezier(0.09, 0.9, 0.48, 1.64);\\n}\\n.buttonLeave[data-v-57fbd0b8] {\\n -webkit-animation: buttonLeave-data-v-57fbd0b8 0.3s cubic-bezier(0.52, -0.44, 0.88, -0.45);\\n animation: buttonLeave-data-v-57fbd0b8 0.3s cubic-bezier(0.52, -0.44, 0.88, -0.45);\\n}\\n@-webkit-keyframes routerEnter-data-v-57fbd0b8 {\\n0% {\\n opacity: 0;\\n}\\n100% {\\n opacity: 1;\\n}\\n}\\n@keyframes routerEnter-data-v-57fbd0b8 {\\n0% {\\n opacity: 0;\\n}\\n100% {\\n opacity: 1;\\n}\\n}\\n@-webkit-keyframes routerLeave-data-v-57fbd0b8 {\\n0% {\\n opacity: 1;\\n}\\n100% {\\n opacity: 0;\\n}\\n}\\n@keyframes routerLeave-data-v-57fbd0b8 {\\n0% {\\n opacity: 1;\\n}\\n100% {\\n opacity: 0;\\n}\\n}\\n@-webkit-keyframes buttonEnter-data-v-57fbd0b8 {\\n0% {\\n -webkit-transform: scale(0);\\n transform: scale(0);\\n}\\n100% {\\n -webkit-transform: scale(1);\\n transform: scale(1);\\n}\\n}\\n@keyframes buttonEnter-data-v-57fbd0b8 {\\n0% {\\n -webkit-transform: scale(0);\\n transform: scale(0);\\n}\\n100% {\\n -webkit-transform: scale(1);\\n transform: scale(1);\\n}\\n}\\n@-webkit-keyframes buttonLeave-data-v-57fbd0b8 {\\n0% {\\n -webkit-transform: scale(1);\\n transform: scale(1);\\n}\\n100% {\\n -webkit-transform: scale(0);\\n transform: scale(0);\\n}\\n}\\n@keyframes buttonLeave-data-v-57fbd0b8 {\\n0% {\\n -webkit-transform: scale(1);\\n transform: scale(1);\\n}\\n100% {\\n -webkit-transform: scale(0);\\n transform: scale(0);\\n}\\n}\\n\", \"\", {\"version\":3,\"sources\":[\"C:/OSPanel/domains/last/resources/assets/js/pages/Vouchers/list/styles.scss\"],\"names\":[],\"mappings\":\";AAAA;EACE,mBAAmB;EACnB,WAAW;EACX,kBAAkB;EAClB,kBAAkB;CAAE;AAEtB;EACE,oBAAoB;CAAE;AAExB;EACE,gCAAgC;CAAE;AAEpC;EACE,uBAAuB;EACvB,kCAA0B;UAA1B,0BAA0B;CAAE;AAE9B;EACE,mBAAmB;EACnB,cAAc;CAAE;AAElB;EACE,mBAAmB;EACnB,cAAc;EACd,WAAW;EACX,WAAW;CAAE;AAEf;EACE,yBAAwB;MAAxB,sBAAwB;UAAxB,wBAAwB;CAAE;AAE5B;EACE,yBAAwB;MAAxB,sBAAwB;UAAxB,wBAAwB;CAAE;AAE5B;EACE,wFAAgE;UAAhE,gFAAgE;CAAE;AAEpE;EACE,2FAAmE;UAAnE,mFAAmE;CAAE;AAEvE;AACE;IACE,WAAW;CAAE;AACf;IACE,WAAW;CAAE;CAAE;AAJnB;AACE;IACE,WAAW;CAAE;AACf;IACE,WAAW;CAAE;CAAE;AAEnB;AACE;IACE,WAAW;CAAE;AACf;IACE,WAAW;CAAE;CAAE;AAJnB;AACE;IACE,WAAW;CAAE;AACf;IACE,WAAW;CAAE;CAAE;AAEnB;AACE;IACE,4BAAoB;YAApB,oBAAoB;CAAE;AACxB;IACE,4BAAoB;YAApB,oBAAoB;CAAE;CAAE;AAJ5B;AACE;IACE,4BAAoB;YAApB,oBAAoB;CAAE;AACxB;IACE,4BAAoB;YAApB,oBAAoB;CAAE;CAAE;AAE5B;AACE;IACE,4BAAoB;YAApB,oBAAoB;CAAE;AACxB;IACE,4BAAoB;YAApB,oBAAoB;CAAE;CAAE;AAJ5B;AACE;IACE,4BAAoB;YAApB,oBAAoB;CAAE;AACxB;IACE,4BAAoB;YAApB,oBAAoB;CAAE;CAAE\",\"file\":\"styles.scss\",\"sourcesContent\":[\"#employees {\\n position: relative;\\n width: 90%;\\n max-width: 1000px;\\n margin: 10px auto; }\\n\\nh2 {\\n margin-bottom: 20px; }\\n\\n.btn {\\n text-transform: none !important; }\\n\\nli {\\n margin: 5px !important;\\n box-shadow: 0 0 15px #000; }\\n\\n.table__buttons {\\n position: absolute;\\n bottom: -50px; }\\n\\n.dialog__activator {\\n position: absolute;\\n bottom: -30px;\\n left: 40px;\\n z-index: 1; }\\n\\n.card__title {\\n justify-content: center; }\\n\\n.card__actions {\\n justify-content: center; }\\n\\n.buttonEnter {\\n animation: buttonEnter 0.3s cubic-bezier(0.09, 0.9, 0.48, 1.64); }\\n\\n.buttonLeave {\\n animation: buttonLeave 0.3s cubic-bezier(0.52, -0.44, 0.88, -0.45); }\\n\\n@keyframes routerEnter {\\n 0% {\\n opacity: 0; }\\n 100% {\\n opacity: 1; } }\\n\\n@keyframes routerLeave {\\n 0% {\\n opacity: 1; }\\n 100% {\\n opacity: 0; } }\\n\\n@keyframes buttonEnter {\\n 0% {\\n transform: scale(0); }\\n 100% {\\n transform: scale(1); } }\\n\\n@keyframes buttonLeave {\\n 0% {\\n transform: scale(1); }\\n 100% {\\n transform: scale(0); } }\\n\"],\"sourceRoot\":\"\"}]);\n\n// exports\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3Qvc3R5bGVzLnNjc3M/NmZjYyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBOzs7QUFHQTtBQUNBLHdEQUF5RCx1QkFBdUIsZUFBZSxzQkFBc0Isc0JBQXNCLEdBQUcsdUJBQXVCLHdCQUF3QixHQUFHLHlCQUF5QixvQ0FBb0MsR0FBRyx1QkFBdUIsMkJBQTJCLHNDQUFzQyxzQ0FBc0MsR0FBRyxvQ0FBb0MsdUJBQXVCLGtCQUFrQixHQUFHLHVDQUF1Qyx1QkFBdUIsa0JBQWtCLGVBQWUsZUFBZSxHQUFHLGlDQUFpQyw2QkFBNkIsOEJBQThCLG9DQUFvQyxHQUFHLG1DQUFtQyw2QkFBNkIsOEJBQThCLG9DQUFvQyxHQUFHLGlDQUFpQyw0RkFBNEYsNEZBQTRGLEdBQUcsaUNBQWlDLCtGQUErRiwrRkFBK0YsR0FBRyxrREFBa0QsTUFBTSxpQkFBaUIsR0FBRyxRQUFRLGlCQUFpQixHQUFHLEdBQUcsMENBQTBDLE1BQU0saUJBQWlCLEdBQUcsUUFBUSxpQkFBaUIsR0FBRyxHQUFHLGtEQUFrRCxNQUFNLGlCQUFpQixHQUFHLFFBQVEsaUJBQWlCLEdBQUcsR0FBRywwQ0FBMEMsTUFBTSxpQkFBaUIsR0FBRyxRQUFRLGlCQUFpQixHQUFHLEdBQUcsa0RBQWtELE1BQU0sa0NBQWtDLGtDQUFrQyxHQUFHLFFBQVEsa0NBQWtDLGtDQUFrQyxHQUFHLEdBQUcsMENBQTBDLE1BQU0sa0NBQWtDLGtDQUFrQyxHQUFHLFFBQVEsa0NBQWtDLGtDQUFrQyxHQUFHLEdBQUcsa0RBQWtELE1BQU0sa0NBQWtDLGtDQUFrQyxHQUFHLFFBQVEsa0NBQWtDLGtDQUFrQyxHQUFHLEdBQUcsMENBQTBDLE1BQU0sa0NBQWtDLGtDQUFrQyxHQUFHLFFBQVEsa0NBQWtDLGtDQUFrQyxHQUFHLEdBQUcsVUFBVSw4SEFBOEgsS0FBSyxZQUFZLFdBQVcsWUFBWSxhQUFhLEtBQUssTUFBTSxZQUFZLEtBQUssTUFBTSxZQUFZLEtBQUssTUFBTSxZQUFZLGFBQWEsYUFBYSxLQUFLLE1BQU0sWUFBWSxXQUFXLEtBQUssTUFBTSxZQUFZLFdBQVcsVUFBVSxVQUFVLEtBQUssS0FBSyxZQUFZLGFBQWEsYUFBYSxLQUFLLE1BQU0sWUFBWSxhQUFhLGFBQWEsS0FBSyxNQUFNLFlBQVksYUFBYSxLQUFLLE1BQU0sWUFBWSxhQUFhLEtBQUssTUFBTSxLQUFLLFVBQVUsS0FBSyxLQUFLLFVBQVUsS0FBSyxLQUFLLE1BQU0sS0FBSyxVQUFVLEtBQUssS0FBSyxVQUFVLEtBQUssS0FBSyxNQUFNLEtBQUssVUFBVSxLQUFLLEtBQUssVUFBVSxLQUFLLEtBQUssTUFBTSxLQUFLLFVBQVUsS0FBSyxLQUFLLFVBQVUsS0FBSyxLQUFLLE1BQU0sS0FBSyxZQUFZLGFBQWEsS0FBSyxNQUFNLFlBQVksYUFBYSxLQUFLLEtBQUssTUFBTSxLQUFLLFlBQVksYUFBYSxLQUFLLE1BQU0sWUFBWSxhQUFhLEtBQUssS0FBSyxNQUFNLEtBQUssWUFBWSxhQUFhLEtBQUssTUFBTSxZQUFZLGFBQWEsS0FBSyxLQUFLLE1BQU0sS0FBSyxZQUFZLGFBQWEsS0FBSyxNQUFNLFlBQVksYUFBYSxLQUFLLDBEQUEwRCx1QkFBdUIsZUFBZSxzQkFBc0Isc0JBQXNCLEVBQUUsUUFBUSx3QkFBd0IsRUFBRSxVQUFVLG9DQUFvQyxFQUFFLFFBQVEsMkJBQTJCLDhCQUE4QixFQUFFLHFCQUFxQix1QkFBdUIsa0JBQWtCLEVBQUUsd0JBQXdCLHVCQUF1QixrQkFBa0IsZUFBZSxlQUFlLEVBQUUsa0JBQWtCLDRCQUE0QixFQUFFLG9CQUFvQiw0QkFBNEIsRUFBRSxrQkFBa0Isb0VBQW9FLEVBQUUsa0JBQWtCLHVFQUF1RSxFQUFFLDRCQUE0QixRQUFRLGlCQUFpQixFQUFFLFVBQVUsaUJBQWlCLEVBQUUsRUFBRSw0QkFBNEIsUUFBUSxpQkFBaUIsRUFBRSxVQUFVLGlCQUFpQixFQUFFLEVBQUUsNEJBQTRCLFFBQVEsMEJBQTBCLEVBQUUsVUFBVSwwQkFBMEIsRUFBRSxFQUFFLDRCQUE0QixRQUFRLDBCQUEwQixFQUFFLFVBQVUsMEJBQTBCLEVBQUUsRUFBRSxxQkFBcUI7O0FBRW5uSiIsImZpbGUiOiIzNDguanMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnRzID0gbW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKFwiLi4vLi4vLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2Nzcy1sb2FkZXIvbGliL2Nzcy1iYXNlLmpzXCIpKHRydWUpO1xuLy8gaW1wb3J0c1xuXG5cbi8vIG1vZHVsZVxuZXhwb3J0cy5wdXNoKFttb2R1bGUuaWQsIFwiXFxuI2VtcGxveWVlc1tkYXRhLXYtNTdmYmQwYjhdIHtcXG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcXG4gIHdpZHRoOiA5MCU7XFxuICBtYXgtd2lkdGg6IDEwMDBweDtcXG4gIG1hcmdpbjogMTBweCBhdXRvO1xcbn1cXG5oMltkYXRhLXYtNTdmYmQwYjhdIHtcXG4gIG1hcmdpbi1ib3R0b206IDIwcHg7XFxufVxcbi5idG5bZGF0YS12LTU3ZmJkMGI4XSB7XFxuICB0ZXh0LXRyYW5zZm9ybTogbm9uZSAhaW1wb3J0YW50O1xcbn1cXG5saVtkYXRhLXYtNTdmYmQwYjhdIHtcXG4gIG1hcmdpbjogNXB4ICFpbXBvcnRhbnQ7XFxuICAtd2Via2l0LWJveC1zaGFkb3c6IDAgMCAxNXB4ICMwMDA7XFxuICAgICAgICAgIGJveC1zaGFkb3c6IDAgMCAxNXB4ICMwMDA7XFxufVxcbi50YWJsZV9fYnV0dG9uc1tkYXRhLXYtNTdmYmQwYjhdIHtcXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gIGJvdHRvbTogLTUwcHg7XFxufVxcbi5kaWFsb2dfX2FjdGl2YXRvcltkYXRhLXYtNTdmYmQwYjhdIHtcXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gIGJvdHRvbTogLTMwcHg7XFxuICBsZWZ0OiA0MHB4O1xcbiAgei1pbmRleDogMTtcXG59XFxuLmNhcmRfX3RpdGxlW2RhdGEtdi01N2ZiZDBiOF0ge1xcbiAgLXdlYmtpdC1ib3gtcGFjazogY2VudGVyO1xcbiAgICAgIC1tcy1mbGV4LXBhY2s6IGNlbnRlcjtcXG4gICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XFxufVxcbi5jYXJkX19hY3Rpb25zW2RhdGEtdi01N2ZiZDBiOF0ge1xcbiAgLXdlYmtpdC1ib3gtcGFjazogY2VudGVyO1xcbiAgICAgIC1tcy1mbGV4LXBhY2s6IGNlbnRlcjtcXG4gICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XFxufVxcbi5idXR0b25FbnRlcltkYXRhLXYtNTdmYmQwYjhdIHtcXG4gIC13ZWJraXQtYW5pbWF0aW9uOiBidXR0b25FbnRlci1kYXRhLXYtNTdmYmQwYjggMC4zcyBjdWJpYy1iZXppZXIoMC4wOSwgMC45LCAwLjQ4LCAxLjY0KTtcXG4gICAgICAgICAgYW5pbWF0aW9uOiBidXR0b25FbnRlci1kYXRhLXYtNTdmYmQwYjggMC4zcyBjdWJpYy1iZXppZXIoMC4wOSwgMC45LCAwLjQ4LCAxLjY0KTtcXG59XFxuLmJ1dHRvbkxlYXZlW2RhdGEtdi01N2ZiZDBiOF0ge1xcbiAgLXdlYmtpdC1hbmltYXRpb246IGJ1dHRvbkxlYXZlLWRhdGEtdi01N2ZiZDBiOCAwLjNzIGN1YmljLWJlemllcigwLjUyLCAtMC40NCwgMC44OCwgLTAuNDUpO1xcbiAgICAgICAgICBhbmltYXRpb246IGJ1dHRvbkxlYXZlLWRhdGEtdi01N2ZiZDBiOCAwLjNzIGN1YmljLWJlemllcigwLjUyLCAtMC40NCwgMC44OCwgLTAuNDUpO1xcbn1cXG5ALXdlYmtpdC1rZXlmcmFtZXMgcm91dGVyRW50ZXItZGF0YS12LTU3ZmJkMGI4IHtcXG4wJSB7XFxuICAgIG9wYWNpdHk6IDA7XFxufVxcbjEwMCUge1xcbiAgICBvcGFjaXR5OiAxO1xcbn1cXG59XFxuQGtleWZyYW1lcyByb3V0ZXJFbnRlci1kYXRhLXYtNTdmYmQwYjgge1xcbjAlIHtcXG4gICAgb3BhY2l0eTogMDtcXG59XFxuMTAwJSB7XFxuICAgIG9wYWNpdHk6IDE7XFxufVxcbn1cXG5ALXdlYmtpdC1rZXlmcmFtZXMgcm91dGVyTGVhdmUtZGF0YS12LTU3ZmJkMGI4IHtcXG4wJSB7XFxuICAgIG9wYWNpdHk6IDE7XFxufVxcbjEwMCUge1xcbiAgICBvcGFjaXR5OiAwO1xcbn1cXG59XFxuQGtleWZyYW1lcyByb3V0ZXJMZWF2ZS1kYXRhLXYtNTdmYmQwYjgge1xcbjAlIHtcXG4gICAgb3BhY2l0eTogMTtcXG59XFxuMTAwJSB7XFxuICAgIG9wYWNpdHk6IDA7XFxufVxcbn1cXG5ALXdlYmtpdC1rZXlmcmFtZXMgYnV0dG9uRW50ZXItZGF0YS12LTU3ZmJkMGI4IHtcXG4wJSB7XFxuICAgIC13ZWJraXQtdHJhbnNmb3JtOiBzY2FsZSgwKTtcXG4gICAgICAgICAgICB0cmFuc2Zvcm06IHNjYWxlKDApO1xcbn1cXG4xMDAlIHtcXG4gICAgLXdlYmtpdC10cmFuc2Zvcm06IHNjYWxlKDEpO1xcbiAgICAgICAgICAgIHRyYW5zZm9ybTogc2NhbGUoMSk7XFxufVxcbn1cXG5Aa2V5ZnJhbWVzIGJ1dHRvbkVudGVyLWRhdGEtdi01N2ZiZDBiOCB7XFxuMCUge1xcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMCk7XFxuICAgICAgICAgICAgdHJhbnNmb3JtOiBzY2FsZSgwKTtcXG59XFxuMTAwJSB7XFxuICAgIC13ZWJraXQtdHJhbnNmb3JtOiBzY2FsZSgxKTtcXG4gICAgICAgICAgICB0cmFuc2Zvcm06IHNjYWxlKDEpO1xcbn1cXG59XFxuQC13ZWJraXQta2V5ZnJhbWVzIGJ1dHRvbkxlYXZlLWRhdGEtdi01N2ZiZDBiOCB7XFxuMCUge1xcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMSk7XFxuICAgICAgICAgICAgdHJhbnNmb3JtOiBzY2FsZSgxKTtcXG59XFxuMTAwJSB7XFxuICAgIC13ZWJraXQtdHJhbnNmb3JtOiBzY2FsZSgwKTtcXG4gICAgICAgICAgICB0cmFuc2Zvcm06IHNjYWxlKDApO1xcbn1cXG59XFxuQGtleWZyYW1lcyBidXR0b25MZWF2ZS1kYXRhLXYtNTdmYmQwYjgge1xcbjAlIHtcXG4gICAgLXdlYmtpdC10cmFuc2Zvcm06IHNjYWxlKDEpO1xcbiAgICAgICAgICAgIHRyYW5zZm9ybTogc2NhbGUoMSk7XFxufVxcbjEwMCUge1xcbiAgICAtd2Via2l0LXRyYW5zZm9ybTogc2NhbGUoMCk7XFxuICAgICAgICAgICAgdHJhbnNmb3JtOiBzY2FsZSgwKTtcXG59XFxufVxcblwiLCBcIlwiLCB7XCJ2ZXJzaW9uXCI6MyxcInNvdXJjZXNcIjpbXCJDOi9PU1BhbmVsL2RvbWFpbnMvbGFzdC9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3Qvc3R5bGVzLnNjc3NcIl0sXCJuYW1lc1wiOltdLFwibWFwcGluZ3NcIjpcIjtBQUFBO0VBQ0UsbUJBQW1CO0VBQ25CLFdBQVc7RUFDWCxrQkFBa0I7RUFDbEIsa0JBQWtCO0NBQUU7QUFFdEI7RUFDRSxvQkFBb0I7Q0FBRTtBQUV4QjtFQUNFLGdDQUFnQztDQUFFO0FBRXBDO0VBQ0UsdUJBQXVCO0VBQ3ZCLGtDQUEwQjtVQUExQiwwQkFBMEI7Q0FBRTtBQUU5QjtFQUNFLG1CQUFtQjtFQUNuQixjQUFjO0NBQUU7QUFFbEI7RUFDRSxtQkFBbUI7RUFDbkIsY0FBYztFQUNkLFdBQVc7RUFDWCxXQUFXO0NBQUU7QUFFZjtFQUNFLHlCQUF3QjtNQUF4QixzQkFBd0I7VUFBeEIsd0JBQXdCO0NBQUU7QUFFNUI7RUFDRSx5QkFBd0I7TUFBeEIsc0JBQXdCO1VBQXhCLHdCQUF3QjtDQUFFO0FBRTVCO0VBQ0Usd0ZBQWdFO1VBQWhFLGdGQUFnRTtDQUFFO0FBRXBFO0VBQ0UsMkZBQW1FO1VBQW5FLG1GQUFtRTtDQUFFO0FBRXZFO0FBQ0U7SUFDRSxXQUFXO0NBQUU7QUFDZjtJQUNFLFdBQVc7Q0FBRTtDQUFFO0FBSm5CO0FBQ0U7SUFDRSxXQUFXO0NBQUU7QUFDZjtJQUNFLFdBQVc7Q0FBRTtDQUFFO0FBRW5CO0FBQ0U7SUFDRSxXQUFXO0NBQUU7QUFDZjtJQUNFLFdBQVc7Q0FBRTtDQUFFO0FBSm5CO0FBQ0U7SUFDRSxXQUFXO0NBQUU7QUFDZjtJQUNFLFdBQVc7Q0FBRTtDQUFFO0FBRW5CO0FBQ0U7SUFDRSw0QkFBb0I7WUFBcEIsb0JBQW9CO0NBQUU7QUFDeEI7SUFDRSw0QkFBb0I7WUFBcEIsb0JBQW9CO0NBQUU7Q0FBRTtBQUo1QjtBQUNFO0lBQ0UsNEJBQW9CO1lBQXBCLG9CQUFvQjtDQUFFO0FBQ3hCO0lBQ0UsNEJBQW9CO1lBQXBCLG9CQUFvQjtDQUFFO0NBQUU7QUFFNUI7QUFDRTtJQUNFLDRCQUFvQjtZQUFwQixvQkFBb0I7Q0FBRTtBQUN4QjtJQUNFLDRCQUFvQjtZQUFwQixvQkFBb0I7Q0FBRTtDQUFFO0FBSjVCO0FBQ0U7SUFDRSw0QkFBb0I7WUFBcEIsb0JBQW9CO0NBQUU7QUFDeEI7SUFDRSw0QkFBb0I7WUFBcEIsb0JBQW9CO0NBQUU7Q0FBRVwiLFwiZmlsZVwiOlwic3R5bGVzLnNjc3NcIixcInNvdXJjZXNDb250ZW50XCI6W1wiI2VtcGxveWVlcyB7XFxuICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICB3aWR0aDogOTAlO1xcbiAgbWF4LXdpZHRoOiAxMDAwcHg7XFxuICBtYXJnaW46IDEwcHggYXV0bzsgfVxcblxcbmgyIHtcXG4gIG1hcmdpbi1ib3R0b206IDIwcHg7IH1cXG5cXG4uYnRuIHtcXG4gIHRleHQtdHJhbnNmb3JtOiBub25lICFpbXBvcnRhbnQ7IH1cXG5cXG5saSB7XFxuICBtYXJnaW46IDVweCAhaW1wb3J0YW50O1xcbiAgYm94LXNoYWRvdzogMCAwIDE1cHggIzAwMDsgfVxcblxcbi50YWJsZV9fYnV0dG9ucyB7XFxuICBwb3NpdGlvbjogYWJzb2x1dGU7XFxuICBib3R0b206IC01MHB4OyB9XFxuXFxuLmRpYWxvZ19fYWN0aXZhdG9yIHtcXG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gIGJvdHRvbTogLTMwcHg7XFxuICBsZWZ0OiA0MHB4O1xcbiAgei1pbmRleDogMTsgfVxcblxcbi5jYXJkX190aXRsZSB7XFxuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsgfVxcblxcbi5jYXJkX19hY3Rpb25zIHtcXG4gIGp1c3RpZnktY29udGVudDogY2VudGVyOyB9XFxuXFxuLmJ1dHRvbkVudGVyIHtcXG4gIGFuaW1hdGlvbjogYnV0dG9uRW50ZXIgMC4zcyBjdWJpYy1iZXppZXIoMC4wOSwgMC45LCAwLjQ4LCAxLjY0KTsgfVxcblxcbi5idXR0b25MZWF2ZSB7XFxuICBhbmltYXRpb246IGJ1dHRvbkxlYXZlIDAuM3MgY3ViaWMtYmV6aWVyKDAuNTIsIC0wLjQ0LCAwLjg4LCAtMC40NSk7IH1cXG5cXG5Aa2V5ZnJhbWVzIHJvdXRlckVudGVyIHtcXG4gIDAlIHtcXG4gICAgb3BhY2l0eTogMDsgfVxcbiAgMTAwJSB7XFxuICAgIG9wYWNpdHk6IDE7IH0gfVxcblxcbkBrZXlmcmFtZXMgcm91dGVyTGVhdmUge1xcbiAgMCUge1xcbiAgICBvcGFjaXR5OiAxOyB9XFxuICAxMDAlIHtcXG4gICAgb3BhY2l0eTogMDsgfSB9XFxuXFxuQGtleWZyYW1lcyBidXR0b25FbnRlciB7XFxuICAwJSB7XFxuICAgIHRyYW5zZm9ybTogc2NhbGUoMCk7IH1cXG4gIDEwMCUge1xcbiAgICB0cmFuc2Zvcm06IHNjYWxlKDEpOyB9IH1cXG5cXG5Aa2V5ZnJhbWVzIGJ1dHRvbkxlYXZlIHtcXG4gIDAlIHtcXG4gICAgdHJhbnNmb3JtOiBzY2FsZSgxKTsgfVxcbiAgMTAwJSB7XFxuICAgIHRyYW5zZm9ybTogc2NhbGUoMCk7IH0gfVxcblwiXSxcInNvdXJjZVJvb3RcIjpcIlwifV0pO1xuXG4vLyBleHBvcnRzXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy9jc3MtbG9hZGVyP3NvdXJjZU1hcCEuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zdHlsZS1jb21waWxlcj97XCJ2dWVcIjp0cnVlLFwiaWRcIjpcImRhdGEtdi01N2ZiZDBiOFwiLFwic2NvcGVkXCI6dHJ1ZSxcImhhc0lubGluZUNvbmZpZ1wiOnRydWV9IS4vbm9kZV9tb2R1bGVzL3Nhc3MtbG9hZGVyL2xpYi9sb2FkZXIuanMhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3Qvc3R5bGVzLnNjc3Ncbi8vIG1vZHVsZSBpZCA9IDM0OFxuLy8gbW9kdWxlIGNodW5rcyA9IDI2Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///348\n");
/***/ }),
/***/ 349:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign__ = __webpack_require__(72);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__ = __webpack_require__(24);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vuex__ = __webpack_require__(16);\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: {\n searchProp: {\n type: String,\n default: ''\n }\n },\n middleware: ['auth', 'activity'],\n data: function data() {\n return {\n /* Подсказки о результате удаления */\n snackbarShow: false,\n snackbarTimeout: 10000,\n // Поиск / Выборка\n search: '',\n selected: [],\n isArchive: false,\n deleteWindow: false,\n // Добавление\n creation: true,\n tourCreate: false,\n arrivalDate: false,\n departDate: false,\n editedIndex: null,\n date1: null,\n date2: null,\n editedTour: {\n id: '',\n tour_id: '',\n client_id: '',\n employee_id: '',\n departure_date: '',\n arrival_date: ''\n },\n initialTour: {\n id: '',\n tour_id: '',\n client_id: '',\n employee_id: '',\n departure_date: '',\n arrival_date: ''\n }\n };\n },\n\n computed: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({\n cardTitle: function cardTitle() {\n return this.isArchive ? 'Архив путевок' : 'Список путевок';\n },\n\n // Заголовки таблицы\n headers: function headers() {\n return [{\n text: this.$t('tour'),\n value: 'tour'\n }, {\n text: this.$t('client'),\n value: 'client'\n }, {\n text: this.$t('departure_date'),\n value: 'departure_date'\n }, {\n text: this.$t('arrival_date'),\n value: 'arrival_date'\n }, {\n text: this.$t('actions'),\n align: 'left',\n sortable: false\n }];\n },\n items: function items() {\n var _this = this;\n\n var data = [];\n this.vouchers.forEach(function (el) {\n data.push({\n id: el.id,\n tour_id: el.tour_id,\n tour: _this._getTourName(el.tour_id),\n client_id: el.client_id,\n client: _this._getClientName(el.client_id),\n employee_id: el.employee_id,\n departure_date: el.departure_date,\n arrival_date: el.arrival_date\n });\n });\n return data;\n },\n deleteMsg: function deleteMsg() {\n return this.selected.length === 1 ? this.$t('delete_item_confirm') : this.$t('delete_items_confirm');\n }\n }, Object(__WEBPACK_IMPORTED_MODULE_2_vuex__[\"c\" /* mapGetters */])({\n clients: 'clients/clients',\n tours: 'tours/tours',\n vouchers: 'vouchers/vouchers',\n user: 'auth/user',\n loading: 'httpPending'\n })),\n methods: __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_extends___default()({\n editItem: function editItem(item) {\n this.creation = false;\n this.editedTour = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign___default()({}, item);\n this.tourCreate = true;\n },\n createItem: function createItem() {\n this.tourCreate = true;\n this.creation = true;\n },\n _getTourName: function _getTourName(tourID) {\n var tour = this.tours.find(function (tour) {\n return tour.id === tourID;\n });\n return tour ? tour.title : 'Нет данных';\n },\n _getClientName: function _getClientName(clientID) {\n var client = this.clients.find(function (client) {\n return client.id === clientID;\n });\n if (client) {\n return client.last_name + ' ' + client.first_name[0] + '. ' + client.patronymic[0];\n } else {\n return '\\u041D\\u0435\\u0442 \\u0434\\u0430\\u043D\\u043D\\u044B\\u0445';\n }\n },\n addConfirm: function addConfirm() {\n if (this.creation) {\n this.editedTour.employee_id = this.user.id;\n this.addItem(this.editedTour);\n this.editedTour = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign___default()({}, this.initialTour);\n } else {\n this.edit(this.editedTour);\n }\n this.tourCreate = false;\n },\n addCancel: function addCancel() {\n this.tourCreate = false;\n this.editedTour = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_core_js_object_assign___default()({}, this.initialTour);\n },\n\n /**\r\n * Открыть диалог удаления путевки\r\n */\n deleteDialog: function deleteDialog() {\n this.deleteWindow = true;\n },\n\n /**\r\n * Удаление путевки\r\n */\n deleteConfirm: function deleteConfirm() {\n var _this2 = this;\n\n this.selected.forEach(function (el) {\n return _this2.deleteItem(el.id);\n });\n this.selected = [];\n this.deleteWindow = false;\n this.snackbarShow = true;\n },\n\n /**\r\n * Отмена удаления\r\n */\n deleteCancel: function deleteCancel() {\n this.deleteWindow = false;\n },\n loadItems: function loadItems(archive) {\n if (archive) {\n this.getArchive();\n } else {\n this.getItems();\n }\n this.isArchive = archive;\n }\n }, Object(__WEBPACK_IMPORTED_MODULE_2_vuex__[\"b\" /* mapActions */])({\n addItem: 'vouchers/add',\n deleteItem: 'vouchers/remove',\n edit: 'vouchers/edit',\n getArchive: 'vouchers/getArchive',\n getItems: 'vouchers/load'\n })),\n created: function created() {\n if (this.searchProp) {\n this.search = this.searchProp;\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3Qvc2NyaXB0cy5qcz8yYzQzIl0sIm5hbWVzIjpbInByb3BzIiwic2VhcmNoUHJvcCIsInR5cGUiLCJTdHJpbmciLCJkZWZhdWx0IiwibWlkZGxld2FyZSIsImRhdGEiLCJzbmFja2JhclNob3ciLCJzbmFja2JhclRpbWVvdXQiLCJzZWFyY2giLCJzZWxlY3RlZCIsImlzQXJjaGl2ZSIsImRlbGV0ZVdpbmRvdyIsImNyZWF0aW9uIiwidG91ckNyZWF0ZSIsImFycml2YWxEYXRlIiwiZGVwYXJ0RGF0ZSIsImVkaXRlZEluZGV4IiwiZGF0ZTEiLCJkYXRlMiIsImVkaXRlZFRvdXIiLCJpZCIsInRvdXJfaWQiLCJjbGllbnRfaWQiLCJlbXBsb3llZV9pZCIsImRlcGFydHVyZV9kYXRlIiwiYXJyaXZhbF9kYXRlIiwiaW5pdGlhbFRvdXIiLCJjb21wdXRlZCIsImNhcmRUaXRsZSIsImhlYWRlcnMiLCJ0ZXh0IiwiJHQiLCJ2YWx1ZSIsImFsaWduIiwic29ydGFibGUiLCJpdGVtcyIsInZvdWNoZXJzIiwiZm9yRWFjaCIsInB1c2giLCJlbCIsInRvdXIiLCJfZ2V0VG91ck5hbWUiLCJjbGllbnQiLCJfZ2V0Q2xpZW50TmFtZSIsImRlbGV0ZU1zZyIsImxlbmd0aCIsIm1hcEdldHRlcnMiLCJjbGllbnRzIiwidG91cnMiLCJ1c2VyIiwibG9hZGluZyIsIm1ldGhvZHMiLCJlZGl0SXRlbSIsIml0ZW0iLCJjcmVhdGVJdGVtIiwidG91cklEIiwiZmluZCIsInRpdGxlIiwiY2xpZW50SUQiLCJsYXN0X25hbWUiLCJmaXJzdF9uYW1lIiwicGF0cm9ueW1pYyIsImFkZENvbmZpcm0iLCJhZGRJdGVtIiwiZWRpdCIsImFkZENhbmNlbCIsImRlbGV0ZURpYWxvZyIsImRlbGV0ZUNvbmZpcm0iLCJkZWxldGVJdGVtIiwiZGVsZXRlQ2FuY2VsIiwibG9hZEl0ZW1zIiwiYXJjaGl2ZSIsImdldEFyY2hpdmUiLCJnZXRJdGVtcyIsIm1hcEFjdGlvbnMiLCJjcmVhdGVkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBOztBQUVBLCtEQUFlO0FBQ2JBLFNBQU87QUFDTEMsZ0JBQVk7QUFDVkMsWUFBTUMsTUFESTtBQUVWQyxlQUFTO0FBRkM7QUFEUCxHQURNO0FBT2JDLGNBQVksQ0FBQyxNQUFELEVBQVMsVUFBVCxDQVBDO0FBUWJDLE1BUmEsa0JBUUw7QUFDTixXQUFPO0FBQ0w7QUFDQUMsb0JBQWMsS0FGVDtBQUdMQyx1QkFBaUIsS0FIWjtBQUlMO0FBQ0FDLGNBQVEsRUFMSDtBQU1MQyxnQkFBVSxFQU5MO0FBT0xDLGlCQUFXLEtBUE47QUFRTEMsb0JBQWMsS0FSVDtBQVNMO0FBQ0FDLGdCQUFVLElBVkw7QUFXTEMsa0JBQVksS0FYUDtBQVlMQyxtQkFBYSxLQVpSO0FBYUxDLGtCQUFZLEtBYlA7QUFjTEMsbUJBQWEsSUFkUjtBQWVMQyxhQUFPLElBZkY7QUFnQkxDLGFBQU8sSUFoQkY7QUFpQkxDLGtCQUFZO0FBQ1ZDLFlBQUksRUFETTtBQUVWQyxpQkFBUyxFQUZDO0FBR1ZDLG1CQUFXLEVBSEQ7QUFJVkMscUJBQWEsRUFKSDtBQUtWQyx3QkFBZ0IsRUFMTjtBQU1WQyxzQkFBYztBQU5KLE9BakJQO0FBeUJMQyxtQkFBYTtBQUNYTixZQUFJLEVBRE87QUFFWEMsaUJBQVMsRUFGRTtBQUdYQyxtQkFBVyxFQUhBO0FBSVhDLHFCQUFhLEVBSkY7QUFLWEMsd0JBQWdCLEVBTEw7QUFNWEMsc0JBQWM7QUFOSDtBQXpCUixLQUFQO0FBa0NELEdBM0NZOztBQTRDYkUsWUFBQSxxRUFBQUE7QUFDRUMsYUFERix1QkFDZTtBQUNYLGFBQVEsS0FBS2xCLFNBQU4sR0FBbUIsZUFBbkIsR0FBcUMsZ0JBQTVDO0FBQ0QsS0FISDs7QUFJRTtBQUNBbUIsV0FMRixxQkFLYTtBQUNULGFBQU8sQ0FDTDtBQUNFQyxjQUFNLEtBQUtDLEVBQUwsQ0FBUSxNQUFSLENBRFI7QUFFRUMsZUFBTztBQUZULE9BREssRUFLTDtBQUNFRixjQUFNLEtBQUtDLEVBQUwsQ0FBUSxRQUFSLENBRFI7QUFFRUMsZUFBTztBQUZULE9BTEssRUFTTDtBQUNFRixjQUFNLEtBQUtDLEVBQUwsQ0FBUSxnQkFBUixDQURSO0FBRUVDLGVBQU87QUFGVCxPQVRLLEVBYUw7QUFDRUYsY0FBTSxLQUFLQyxFQUFMLENBQVEsY0FBUixDQURSO0FBRUVDLGVBQU87QUFGVCxPQWJLLEVBaUJMO0FBQ0VGLGNBQU0sS0FBS0MsRUFBTCxDQUFRLFNBQVIsQ0FEUjtBQUVFRSxlQUFPLE1BRlQ7QUFHRUMsa0JBQVU7QUFIWixPQWpCSyxDQUFQO0FBdUJELEtBN0JIO0FBOEJFQyxTQTlCRixtQkE4Qlc7QUFBQTs7QUFDUCxVQUFNOUIsT0FBTyxFQUFiO0FBQ0EsV0FBSytCLFFBQUwsQ0FBY0MsT0FBZCxDQUFzQixjQUFNO0FBQzFCaEMsYUFBS2lDLElBQUwsQ0FBVTtBQUNSbEIsY0FBSW1CLEdBQUduQixFQURDO0FBRVJDLG1CQUFTa0IsR0FBR2xCLE9BRko7QUFHUm1CLGdCQUFNLE1BQUtDLFlBQUwsQ0FBa0JGLEdBQUdsQixPQUFyQixDQUhFO0FBSVJDLHFCQUFXaUIsR0FBR2pCLFNBSk47QUFLUm9CLGtCQUFRLE1BQUtDLGNBQUwsQ0FBb0JKLEdBQUdqQixTQUF2QixDQUxBO0FBTVJDLHVCQUFhZ0IsR0FBR2hCLFdBTlI7QUFPUkMsMEJBQWdCZSxHQUFHZixjQVBYO0FBUVJDLHdCQUFjYyxHQUFHZDtBQVJULFNBQVY7QUFVRCxPQVhEO0FBWUEsYUFBT3BCLElBQVA7QUFDRCxLQTdDSDtBQThDRXVDLGFBOUNGLHVCQThDZTtBQUNYLGFBQVEsS0FBS25DLFFBQUwsQ0FBY29DLE1BQWQsS0FBeUIsQ0FBMUIsR0FBK0IsS0FBS2QsRUFBTCxDQUFRLHFCQUFSLENBQS9CLEdBQ0gsS0FBS0EsRUFBTCxDQUFRLHNCQUFSLENBREo7QUFFRDtBQWpESCxLQWtESyxnRUFBQWUsQ0FBVztBQUNaQyxhQUFTLGlCQURHO0FBRVpDLFdBQU8sYUFGSztBQUdaWixjQUFVLG1CQUhFO0FBSVphLFVBQU0sV0FKTTtBQUtaQyxhQUFTO0FBTEcsR0FBWCxDQWxETCxDQTVDYTtBQXNHYkMsV0FBQSxxRUFBQUE7QUFDRUMsWUFERixvQkFDWUMsSUFEWixFQUNrQjtBQUNkLFdBQUt6QyxRQUFMLEdBQWdCLEtBQWhCO0FBQ0EsV0FBS08sVUFBTCxHQUFrQiw0RUFBYyxFQUFkLEVBQWtCa0MsSUFBbEIsQ0FBbEI7QUFDQSxXQUFLeEMsVUFBTCxHQUFrQixJQUFsQjtBQUNELEtBTEg7QUFNRXlDLGNBTkYsd0JBTWdCO0FBQ1osV0FBS3pDLFVBQUwsR0FBa0IsSUFBbEI7QUFDQSxXQUFLRCxRQUFMLEdBQWdCLElBQWhCO0FBQ0QsS0FUSDtBQVVFNkIsZ0JBVkYsd0JBVWdCYyxNQVZoQixFQVV3QjtBQUNwQixVQUFNZixPQUFPLEtBQUtRLEtBQUwsQ0FBV1EsSUFBWCxDQUFnQjtBQUFBLGVBQVFoQixLQUFLcEIsRUFBTCxLQUFZbUMsTUFBcEI7QUFBQSxPQUFoQixDQUFiO0FBQ0EsYUFBT2YsT0FBT0EsS0FBS2lCLEtBQVosR0FBb0IsWUFBM0I7QUFDRCxLQWJIO0FBY0VkLGtCQWRGLDBCQWNrQmUsUUFkbEIsRUFjNEI7QUFDeEIsVUFBTWhCLFNBQVMsS0FBS0ssT0FBTCxDQUFhUyxJQUFiLENBQWtCO0FBQUEsZUFBVWQsT0FBT3RCLEVBQVAsS0FBY3NDLFFBQXhCO0FBQUEsT0FBbEIsQ0FBZjtBQUNBLFVBQUloQixNQUFKLEVBQVk7QUFDVixlQUFVQSxPQUFPaUIsU0FBakIsU0FBOEJqQixPQUFPa0IsVUFBUCxDQUFrQixDQUFsQixDQUE5QixVQUF1RGxCLE9BQU9tQixVQUFQLENBQWtCLENBQWxCLENBQXZEO0FBQ0QsT0FGRCxNQUVPO0FBQ0w7QUFDRDtBQUNGLEtBckJIO0FBc0JFQyxjQXRCRix3QkFzQmdCO0FBQ1osVUFBSSxLQUFLbEQsUUFBVCxFQUFtQjtBQUNqQixhQUFLTyxVQUFMLENBQWdCSSxXQUFoQixHQUE4QixLQUFLMEIsSUFBTCxDQUFVN0IsRUFBeEM7QUFDQSxhQUFLMkMsT0FBTCxDQUFhLEtBQUs1QyxVQUFsQjtBQUNBLGFBQUtBLFVBQUwsR0FBa0IsNEVBQWMsRUFBZCxFQUFrQixLQUFLTyxXQUF2QixDQUFsQjtBQUNELE9BSkQsTUFJTztBQUNMLGFBQUtzQyxJQUFMLENBQVUsS0FBSzdDLFVBQWY7QUFDRDtBQUNELFdBQUtOLFVBQUwsR0FBa0IsS0FBbEI7QUFDRCxLQS9CSDtBQWdDRW9ELGFBaENGLHVCQWdDZTtBQUNYLFdBQUtwRCxVQUFMLEdBQWtCLEtBQWxCO0FBQ0EsV0FBS00sVUFBTCxHQUFrQiw0RUFBYyxFQUFkLEVBQWtCLEtBQUtPLFdBQXZCLENBQWxCO0FBQ0QsS0FuQ0g7O0FBb0NFOzs7QUFHQXdDLGdCQXZDRiwwQkF1Q2tCO0FBQ2QsV0FBS3ZELFlBQUwsR0FBb0IsSUFBcEI7QUFDRCxLQXpDSDs7QUEwQ0U7OztBQUdBd0QsaUJBN0NGLDJCQTZDbUI7QUFBQTs7QUFDZixXQUFLMUQsUUFBTCxDQUFjNEIsT0FBZCxDQUFzQjtBQUFBLGVBQU0sT0FBSytCLFVBQUwsQ0FBZ0I3QixHQUFHbkIsRUFBbkIsQ0FBTjtBQUFBLE9BQXRCO0FBQ0EsV0FBS1gsUUFBTCxHQUFnQixFQUFoQjtBQUNBLFdBQUtFLFlBQUwsR0FBb0IsS0FBcEI7QUFDQSxXQUFLTCxZQUFMLEdBQW9CLElBQXBCO0FBQ0QsS0FsREg7O0FBbURFOzs7QUFHQStELGdCQXRERiwwQkFzRGtCO0FBQ2QsV0FBSzFELFlBQUwsR0FBb0IsS0FBcEI7QUFDRCxLQXhESDtBQXlERTJELGFBekRGLHFCQXlEYUMsT0F6RGIsRUF5RHNCO0FBQ2xCLFVBQUlBLE9BQUosRUFBYTtBQUNYLGFBQUtDLFVBQUw7QUFDRCxPQUZELE1BRU87QUFDTCxhQUFLQyxRQUFMO0FBQ0Q7QUFDRCxXQUFLL0QsU0FBTCxHQUFpQjZELE9BQWpCO0FBQ0Q7QUFoRUgsS0FpRUssZ0VBQUFHLENBQVc7QUFDWlgsYUFBUyxjQURHO0FBRVpLLGdCQUFZLGlCQUZBO0FBR1pKLFVBQU0sZUFITTtBQUlaUSxnQkFBWSxxQkFKQTtBQUtaQyxjQUFVO0FBTEUsR0FBWCxDQWpFTCxDQXRHYTtBQStLYkUsU0EvS2EscUJBK0tGO0FBQ1QsUUFBSSxLQUFLM0UsVUFBVCxFQUFxQjtBQUNuQixXQUFLUSxNQUFMLEdBQWMsS0FBS1IsVUFBbkI7QUFDRDtBQUNGO0FBbkxZLENBQWYiLCJmaWxlIjoiMzQ5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgbWFwQWN0aW9ucywgbWFwR2V0dGVycyB9IGZyb20gJ3Z1ZXgnXHJcblxyXG5leHBvcnQgZGVmYXVsdCB7XHJcbiAgcHJvcHM6IHtcclxuICAgIHNlYXJjaFByb3A6IHtcclxuICAgICAgdHlwZTogU3RyaW5nLFxyXG4gICAgICBkZWZhdWx0OiAnJ1xyXG4gICAgfVxyXG4gIH0sXHJcbiAgbWlkZGxld2FyZTogWydhdXRoJywgJ2FjdGl2aXR5J10sXHJcbiAgZGF0YSAoKSB7XHJcbiAgICByZXR1cm4ge1xyXG4gICAgICAvKiDQn9C+0LTRgdC60LDQt9C60Lgg0L4g0YDQtdC30YPQu9GM0YLQsNGC0LUg0YPQtNCw0LvQtdC90LjRjyAqL1xyXG4gICAgICBzbmFja2JhclNob3c6IGZhbHNlLFxyXG4gICAgICBzbmFja2JhclRpbWVvdXQ6IDEwMDAwLFxyXG4gICAgICAvLyDQn9C+0LjRgdC6IC8g0JLRi9Cx0L7RgNC60LBcclxuICAgICAgc2VhcmNoOiAnJyxcclxuICAgICAgc2VsZWN0ZWQ6IFtdLFxyXG4gICAgICBpc0FyY2hpdmU6IGZhbHNlLFxyXG4gICAgICBkZWxldGVXaW5kb3c6IGZhbHNlLFxyXG4gICAgICAvLyDQlNC+0LHQsNCy0LvQtdC90LjQtVxyXG4gICAgICBjcmVhdGlvbjogdHJ1ZSxcclxuICAgICAgdG91ckNyZWF0ZTogZmFsc2UsXHJcbiAgICAgIGFycml2YWxEYXRlOiBmYWxzZSxcclxuICAgICAgZGVwYXJ0RGF0ZTogZmFsc2UsXHJcbiAgICAgIGVkaXRlZEluZGV4OiBudWxsLFxyXG4gICAgICBkYXRlMTogbnVsbCxcclxuICAgICAgZGF0ZTI6IG51bGwsXHJcbiAgICAgIGVkaXRlZFRvdXI6IHtcclxuICAgICAgICBpZDogJycsXHJcbiAgICAgICAgdG91cl9pZDogJycsXHJcbiAgICAgICAgY2xpZW50X2lkOiAnJyxcclxuICAgICAgICBlbXBsb3llZV9pZDogJycsXHJcbiAgICAgICAgZGVwYXJ0dXJlX2RhdGU6ICcnLFxyXG4gICAgICAgIGFycml2YWxfZGF0ZTogJydcclxuICAgICAgfSxcclxuICAgICAgaW5pdGlhbFRvdXI6IHtcclxuICAgICAgICBpZDogJycsXHJcbiAgICAgICAgdG91cl9pZDogJycsXHJcbiAgICAgICAgY2xpZW50X2lkOiAnJyxcclxuICAgICAgICBlbXBsb3llZV9pZDogJycsXHJcbiAgICAgICAgZGVwYXJ0dXJlX2RhdGU6ICcnLFxyXG4gICAgICAgIGFycml2YWxfZGF0ZTogJydcclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH0sXHJcbiAgY29tcHV0ZWQ6IHtcclxuICAgIGNhcmRUaXRsZSAoKSB7XHJcbiAgICAgIHJldHVybiAodGhpcy5pc0FyY2hpdmUpID8gJ9CQ0YDRhdC40LIg0L/Rg9GC0LXQstC+0LonIDogJ9Ch0L/QuNGB0L7QuiDQv9GD0YLQtdCy0L7QuidcclxuICAgIH0sXHJcbiAgICAvLyDQl9Cw0LPQvtC70L7QstC60Lgg0YLQsNCx0LvQuNGG0YtcclxuICAgIGhlYWRlcnMgKCkge1xyXG4gICAgICByZXR1cm4gW1xyXG4gICAgICAgIHtcclxuICAgICAgICAgIHRleHQ6IHRoaXMuJHQoJ3RvdXInKSxcclxuICAgICAgICAgIHZhbHVlOiAndG91cidcclxuICAgICAgICB9LFxyXG4gICAgICAgIHtcclxuICAgICAgICAgIHRleHQ6IHRoaXMuJHQoJ2NsaWVudCcpLFxyXG4gICAgICAgICAgdmFsdWU6ICdjbGllbnQnXHJcbiAgICAgICAgfSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICB0ZXh0OiB0aGlzLiR0KCdkZXBhcnR1cmVfZGF0ZScpLFxyXG4gICAgICAgICAgdmFsdWU6ICdkZXBhcnR1cmVfZGF0ZSdcclxuICAgICAgICB9LFxyXG4gICAgICAgIHtcclxuICAgICAgICAgIHRleHQ6IHRoaXMuJHQoJ2Fycml2YWxfZGF0ZScpLFxyXG4gICAgICAgICAgdmFsdWU6ICdhcnJpdmFsX2RhdGUnXHJcbiAgICAgICAgfSxcclxuICAgICAgICB7XHJcbiAgICAgICAgICB0ZXh0OiB0aGlzLiR0KCdhY3Rpb25zJyksXHJcbiAgICAgICAgICBhbGlnbjogJ2xlZnQnLFxyXG4gICAgICAgICAgc29ydGFibGU6IGZhbHNlXHJcbiAgICAgICAgfVxyXG4gICAgICBdXHJcbiAgICB9LFxyXG4gICAgaXRlbXMgKCkge1xyXG4gICAgICBjb25zdCBkYXRhID0gW11cclxuICAgICAgdGhpcy52b3VjaGVycy5mb3JFYWNoKGVsID0+IHtcclxuICAgICAgICBkYXRhLnB1c2goe1xyXG4gICAgICAgICAgaWQ6IGVsLmlkLFxyXG4gICAgICAgICAgdG91cl9pZDogZWwudG91cl9pZCxcclxuICAgICAgICAgIHRvdXI6IHRoaXMuX2dldFRvdXJOYW1lKGVsLnRvdXJfaWQpLFxyXG4gICAgICAgICAgY2xpZW50X2lkOiBlbC5jbGllbnRfaWQsXHJcbiAgICAgICAgICBjbGllbnQ6IHRoaXMuX2dldENsaWVudE5hbWUoZWwuY2xpZW50X2lkKSxcclxuICAgICAgICAgIGVtcGxveWVlX2lkOiBlbC5lbXBsb3llZV9pZCxcclxuICAgICAgICAgIGRlcGFydHVyZV9kYXRlOiBlbC5kZXBhcnR1cmVfZGF0ZSxcclxuICAgICAgICAgIGFycml2YWxfZGF0ZTogZWwuYXJyaXZhbF9kYXRlXHJcbiAgICAgICAgfSlcclxuICAgICAgfSlcclxuICAgICAgcmV0dXJuIGRhdGFcclxuICAgIH0sXHJcbiAgICBkZWxldGVNc2cgKCkge1xyXG4gICAgICByZXR1cm4gKHRoaXMuc2VsZWN0ZWQubGVuZ3RoID09PSAxKSA/IHRoaXMuJHQoJ2RlbGV0ZV9pdGVtX2NvbmZpcm0nKVxyXG4gICAgICAgIDogdGhpcy4kdCgnZGVsZXRlX2l0ZW1zX2NvbmZpcm0nKVxyXG4gICAgfSxcclxuICAgIC4uLm1hcEdldHRlcnMoe1xyXG4gICAgICBjbGllbnRzOiAnY2xpZW50cy9jbGllbnRzJyxcclxuICAgICAgdG91cnM6ICd0b3Vycy90b3VycycsXHJcbiAgICAgIHZvdWNoZXJzOiAndm91Y2hlcnMvdm91Y2hlcnMnLFxyXG4gICAgICB1c2VyOiAnYXV0aC91c2VyJyxcclxuICAgICAgbG9hZGluZzogJ2h0dHBQZW5kaW5nJ1xyXG4gICAgfSlcclxuICB9LFxyXG4gIG1ldGhvZHM6IHtcclxuICAgIGVkaXRJdGVtIChpdGVtKSB7XHJcbiAgICAgIHRoaXMuY3JlYXRpb24gPSBmYWxzZVxyXG4gICAgICB0aGlzLmVkaXRlZFRvdXIgPSBPYmplY3QuYXNzaWduKHt9LCBpdGVtKVxyXG4gICAgICB0aGlzLnRvdXJDcmVhdGUgPSB0cnVlXHJcbiAgICB9LFxyXG4gICAgY3JlYXRlSXRlbSAoKSB7XHJcbiAgICAgIHRoaXMudG91ckNyZWF0ZSA9IHRydWVcclxuICAgICAgdGhpcy5jcmVhdGlvbiA9IHRydWVcclxuICAgIH0sXHJcbiAgICBfZ2V0VG91ck5hbWUgKHRvdXJJRCkge1xyXG4gICAgICBjb25zdCB0b3VyID0gdGhpcy50b3Vycy5maW5kKHRvdXIgPT4gdG91ci5pZCA9PT0gdG91cklEKVxyXG4gICAgICByZXR1cm4gdG91ciA/IHRvdXIudGl0bGUgOiAn0J3QtdGCINC00LDQvdC90YvRhSdcclxuICAgIH0sXHJcbiAgICBfZ2V0Q2xpZW50TmFtZSAoY2xpZW50SUQpIHtcclxuICAgICAgY29uc3QgY2xpZW50ID0gdGhpcy5jbGllbnRzLmZpbmQoY2xpZW50ID0+IGNsaWVudC5pZCA9PT0gY2xpZW50SUQpXHJcbiAgICAgIGlmIChjbGllbnQpIHtcclxuICAgICAgICByZXR1cm4gYCR7Y2xpZW50Lmxhc3RfbmFtZX0gJHtjbGllbnQuZmlyc3RfbmFtZVswXX0uICR7Y2xpZW50LnBhdHJvbnltaWNbMF19YFxyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIHJldHVybiBg0J3QtdGCINC00LDQvdC90YvRhWBcclxuICAgICAgfVxyXG4gICAgfSxcclxuICAgIGFkZENvbmZpcm0gKCkge1xyXG4gICAgICBpZiAodGhpcy5jcmVhdGlvbikge1xyXG4gICAgICAgIHRoaXMuZWRpdGVkVG91ci5lbXBsb3llZV9pZCA9IHRoaXMudXNlci5pZFxyXG4gICAgICAgIHRoaXMuYWRkSXRlbSh0aGlzLmVkaXRlZFRvdXIpXHJcbiAgICAgICAgdGhpcy5lZGl0ZWRUb3VyID0gT2JqZWN0LmFzc2lnbih7fSwgdGhpcy5pbml0aWFsVG91cilcclxuICAgICAgfSBlbHNlIHtcclxuICAgICAgICB0aGlzLmVkaXQodGhpcy5lZGl0ZWRUb3VyKVxyXG4gICAgICB9XHJcbiAgICAgIHRoaXMudG91ckNyZWF0ZSA9IGZhbHNlXHJcbiAgICB9LFxyXG4gICAgYWRkQ2FuY2VsICgpIHtcclxuICAgICAgdGhpcy50b3VyQ3JlYXRlID0gZmFsc2VcclxuICAgICAgdGhpcy5lZGl0ZWRUb3VyID0gT2JqZWN0LmFzc2lnbih7fSwgdGhpcy5pbml0aWFsVG91cilcclxuICAgIH0sXHJcbiAgICAvKipcclxuICAgICAqINCe0YLQutGA0YvRgtGMINC00LjQsNC70L7QsyDRg9C00LDQu9C10L3QuNGPINC/0YPRgtC10LLQutC4XHJcbiAgICAgKi9cclxuICAgIGRlbGV0ZURpYWxvZyAoKSB7XHJcbiAgICAgIHRoaXMuZGVsZXRlV2luZG93ID0gdHJ1ZVxyXG4gICAgfSxcclxuICAgIC8qKlxyXG4gICAgICog0KPQtNCw0LvQtdC90LjQtSDQv9GD0YLQtdCy0LrQuFxyXG4gICAgICovXHJcbiAgICBkZWxldGVDb25maXJtICgpIHtcclxuICAgICAgdGhpcy5zZWxlY3RlZC5mb3JFYWNoKGVsID0+IHRoaXMuZGVsZXRlSXRlbShlbC5pZCkpXHJcbiAgICAgIHRoaXMuc2VsZWN0ZWQgPSBbXVxyXG4gICAgICB0aGlzLmRlbGV0ZVdpbmRvdyA9IGZhbHNlXHJcbiAgICAgIHRoaXMuc25hY2tiYXJTaG93ID0gdHJ1ZVxyXG4gICAgfSxcclxuICAgIC8qKlxyXG4gICAgICog0J7RgtC80LXQvdCwINGD0LTQsNC70LXQvdC40Y9cclxuICAgICAqL1xyXG4gICAgZGVsZXRlQ2FuY2VsICgpIHtcclxuICAgICAgdGhpcy5kZWxldGVXaW5kb3cgPSBmYWxzZVxyXG4gICAgfSxcclxuICAgIGxvYWRJdGVtcyAoYXJjaGl2ZSkge1xyXG4gICAgICBpZiAoYXJjaGl2ZSkge1xyXG4gICAgICAgIHRoaXMuZ2V0QXJjaGl2ZSgpXHJcbiAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgdGhpcy5nZXRJdGVtcygpXHJcbiAgICAgIH1cclxuICAgICAgdGhpcy5pc0FyY2hpdmUgPSBhcmNoaXZlXHJcbiAgICB9LFxyXG4gICAgLi4ubWFwQWN0aW9ucyh7XHJcbiAgICAgIGFkZEl0ZW06ICd2b3VjaGVycy9hZGQnLFxyXG4gICAgICBkZWxldGVJdGVtOiAndm91Y2hlcnMvcmVtb3ZlJyxcclxuICAgICAgZWRpdDogJ3ZvdWNoZXJzL2VkaXQnLFxyXG4gICAgICBnZXRBcmNoaXZlOiAndm91Y2hlcnMvZ2V0QXJjaGl2ZScsXHJcbiAgICAgIGdldEl0ZW1zOiAndm91Y2hlcnMvbG9hZCdcclxuICAgIH0pXHJcbiAgfSxcclxuICBjcmVhdGVkICgpIHtcclxuICAgIGlmICh0aGlzLnNlYXJjaFByb3ApIHtcclxuICAgICAgdGhpcy5zZWFyY2ggPSB0aGlzLnNlYXJjaFByb3BcclxuICAgIH1cclxuICB9XHJcbn1cclxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vcmVzb3VyY2VzL2Fzc2V0cy9qcy9wYWdlcy9Wb3VjaGVycy9saXN0L3NjcmlwdHMuanMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///349\n");
/***/ }),
/***/ 350:
/***/ (function(module, exports, __webpack_require__) {
eval("var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { attrs: { id: \"employees\" } },\n [\n _c(\"h2\", [_vm._v(_vm._s(_vm.cardTitle))]),\n _vm._v(\" \"),\n _c(\n \"v-dialog\",\n {\n attrs: { \"max-width\": \"500px\" },\n model: {\n value: _vm.deleteWindow,\n callback: function($$v) {\n _vm.deleteWindow = $$v\n },\n expression: \"deleteWindow\"\n }\n },\n [\n _c(\n \"v-card\",\n [\n _c(\"v-card-title\", [\n _c(\"span\", { staticClass: \"headline\" }, [\n _vm._v(_vm._s(_vm.$t(\"attention\")))\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"v-card-text\",\n [\n _c(\"v-flex\", { attrs: { xs12: \"\" } }, [\n _vm._v(_vm._s(_vm.deleteMsg))\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-card-actions\",\n [\n _c(\n \"v-btn\",\n {\n attrs: { outline: \"\", color: \"info\" },\n nativeOn: {\n click: function($event) {\n return _vm.deleteConfirm($event)\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"ok\")))]\n ),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { outline: \"\", color: \"error\" },\n nativeOn: {\n click: function($event) {\n return _vm.deleteCancel($event)\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"cancel\")))]\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-dialog\",\n {\n attrs: { \"max-width\": \"800px\" },\n model: {\n value: _vm.tourCreate,\n callback: function($$v) {\n _vm.tourCreate = $$v\n },\n expression: \"tourCreate\"\n }\n },\n [\n _c(\n \"v-card\",\n [\n _c(\"v-card-title\", [\n _c(\"span\", { staticClass: \"headline\" }, [\n _vm._v(\"Новая путевка\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"v-card-text\",\n [\n _c(\n \"v-container\",\n { attrs: { \"grid-list-md\": \"\" } },\n [\n _c(\n \"v-layout\",\n { attrs: { wrap: \"\" } },\n [\n _c(\n \"v-flex\",\n { attrs: { xs12: \"\" } },\n [\n _c(\"v-select\", {\n attrs: {\n label: _vm.$t(\"tour\"),\n \"prepend-icon\": \"card_travel\",\n items: _vm.tours,\n \"item-text\": \"title\",\n \"item-value\": \"id\",\n rules: [\n function(v) {\n return !!v || \"Выберите тур\"\n }\n ],\n required: \"\"\n },\n model: {\n value: _vm.editedTour.tour_id,\n callback: function($$v) {\n _vm.$set(_vm.editedTour, \"tour_id\", $$v)\n },\n expression: \"editedTour.tour_id\"\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-flex\",\n { attrs: { xs12: \"\" } },\n [\n _c(\"v-select\", {\n attrs: {\n label: _vm.$t(\"client\"),\n \"prepend-icon\": \"person\",\n items: _vm.clients,\n \"item-text\": \"last_name\",\n \"item-value\": \"id\",\n rules: [\n function(v) {\n return !!v || \"Выберите клиента\"\n }\n ],\n required: \"\"\n },\n model: {\n value: _vm.editedTour.client_id,\n callback: function($$v) {\n _vm.$set(_vm.editedTour, \"client_id\", $$v)\n },\n expression: \"editedTour.client_id\"\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-flex\",\n { attrs: { xs12: \"\", sm6: \"\" } },\n [\n _c(\n \"v-menu\",\n {\n ref: \"menu1\",\n attrs: {\n lazy: \"\",\n \"close-on-content-click\": false,\n transition: \"scale-transition\",\n \"offset-y\": \"\",\n \"full-width\": \"\",\n \"nudge-right\": 40,\n \"min-width\": \"290px\",\n \"return-value\": _vm.date1\n },\n on: {\n \"update:returnValue\": function($event) {\n _vm.date1 = $event\n }\n },\n model: {\n value: _vm.departDate,\n callback: function($$v) {\n _vm.departDate = $$v\n },\n expression: \"departDate\"\n }\n },\n [\n _c(\"v-text-field\", {\n attrs: {\n slot: \"activator\",\n label: _vm.$t(\"departure_date\"),\n \"prepend-icon\": \"event\",\n readonly: \"\"\n },\n slot: \"activator\",\n model: {\n value: _vm.editedTour.departure_date,\n callback: function($$v) {\n _vm.$set(\n _vm.editedTour,\n \"departure_date\",\n $$v\n )\n },\n expression: \"editedTour.departure_date\"\n }\n }),\n _vm._v(\" \"),\n _c(\n \"v-date-picker\",\n {\n attrs: { \"no-title\": \"\", scrollable: \"\" },\n model: {\n value: _vm.editedTour.departure_date,\n callback: function($$v) {\n _vm.$set(\n _vm.editedTour,\n \"departure_date\",\n $$v\n )\n },\n expression: \"editedTour.departure_date\"\n }\n },\n [\n _c(\"v-spacer\"),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { flat: \"\", color: \"primary\" },\n on: {\n click: function($event) {\n _vm.departDate = false\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"cancel\")))]\n ),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { flat: \"\", color: \"primary\" },\n on: {\n click: function($event) {\n _vm.$refs.menu1.save(_vm.date1)\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"ok\")))]\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-flex\",\n { attrs: { xs12: \"\", sm6: \"\" } },\n [\n _c(\n \"v-menu\",\n {\n ref: \"menu2\",\n attrs: {\n lazy: \"\",\n \"close-on-content-click\": false,\n transition: \"scale-transition\",\n \"offset-y\": \"\",\n \"full-width\": \"\",\n \"nudge-right\": 40,\n \"min-width\": \"290px\",\n \"return-value\": _vm.date2\n },\n on: {\n \"update:returnValue\": function($event) {\n _vm.date2 = $event\n }\n },\n model: {\n value: _vm.arrivalDate,\n callback: function($$v) {\n _vm.arrivalDate = $$v\n },\n expression: \"arrivalDate\"\n }\n },\n [\n _c(\"v-text-field\", {\n attrs: {\n slot: \"activator\",\n label: _vm.$t(\"arrival_date\"),\n \"prepend-icon\": \"event\",\n readonly: \"\"\n },\n slot: \"activator\",\n model: {\n value: _vm.editedTour.arrival_date,\n callback: function($$v) {\n _vm.$set(\n _vm.editedTour,\n \"arrival_date\",\n $$v\n )\n },\n expression: \"editedTour.arrival_date\"\n }\n }),\n _vm._v(\" \"),\n _c(\n \"v-date-picker\",\n {\n attrs: { \"no-title\": \"\", scrollable: \"\" },\n model: {\n value: _vm.editedTour.arrival_date,\n callback: function($$v) {\n _vm.$set(\n _vm.editedTour,\n \"arrival_date\",\n $$v\n )\n },\n expression: \"editedTour.arrival_date\"\n }\n },\n [\n _c(\"v-spacer\"),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { flat: \"\", color: \"primary\" },\n on: {\n click: function($event) {\n _vm.departDate = false\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"cancel\")))]\n ),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { flat: \"\", color: \"primary\" },\n on: {\n click: function($event) {\n _vm.$refs.menu2.save(_vm.date2)\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"ok\")))]\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-card-actions\",\n [\n _c(\n \"v-btn\",\n {\n attrs: { outline: \"\", color: \"info\" },\n nativeOn: {\n click: function($event) {\n return _vm.addConfirm($event)\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"ok\")))]\n ),\n _vm._v(\" \"),\n _c(\n \"v-btn\",\n {\n attrs: { outline: \"\", color: \"error\" },\n nativeOn: {\n click: function($event) {\n return _vm.addCancel($event)\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"cancel\")))]\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-card\",\n [\n _c(\n \"v-card-title\",\n [\n _c(\"v-text-field\", {\n attrs: {\n \"append-icon\": \"search\",\n label: _vm.$t(\"search_input\"),\n \"single-line\": \"\"\n },\n model: {\n value: _vm.search,\n callback: function($$v) {\n _vm.search = $$v\n },\n expression: \"search\"\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-data-table\",\n {\n staticClass: \"elevation-1\",\n attrs: {\n headers: _vm.headers,\n items: _vm.items,\n search: _vm.search,\n loading: _vm.loading,\n \"select-all\": \"\",\n \"item-key\": \"id\",\n \"no-results-text\": _vm.$t(\"no_match_found\"),\n \"rows-per-page-text\": _vm.$t(\"strings\")\n },\n scopedSlots: _vm._u([\n {\n key: \"items\",\n fn: function(props) {\n return [\n _c(\n \"td\",\n [\n _c(\"v-checkbox\", {\n attrs: { primary: \"\", \"hide-details\": \"\" },\n model: {\n value: props.selected,\n callback: function($$v) {\n _vm.$set(props, \"selected\", $$v)\n },\n expression: \"props.selected\"\n }\n })\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"td\", [_vm._v(_vm._s(props.item.tour))]),\n _vm._v(\" \"),\n _c(\"td\", [_vm._v(_vm._s(props.item.client))]),\n _vm._v(\" \"),\n _c(\"td\", [_vm._v(_vm._s(props.item.departure_date))]),\n _vm._v(\" \"),\n _c(\"td\", [_vm._v(_vm._s(props.item.arrival_date))]),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"v-btn\",\n {\n staticClass: \"mx-0\",\n attrs: { icon: \"\" },\n on: {\n click: function($event) {\n _vm.editItem(props.item)\n }\n }\n },\n [\n _c(\"v-icon\", { attrs: { color: \"teal\" } }, [\n _vm._v(\"edit\")\n ])\n ],\n 1\n )\n ],\n 1\n )\n ]\n }\n }\n ]),\n model: {\n value: _vm.selected,\n callback: function($$v) {\n _vm.selected = $$v\n },\n expression: \"selected\"\n }\n },\n [\n _c(\"v-progress-linear\", {\n attrs: {\n slot: \"progress\",\n color: \"grey darken-1\",\n indeterminate: \"\"\n },\n slot: \"progress\"\n }),\n _vm._v(\" \"),\n _c(\n \"template\",\n { slot: \"no-data\" },\n [\n _c(\n \"v-alert\",\n { attrs: { value: true, color: \"red\", icon: \"warning\" } },\n [_vm._v(\"\\n Нет данных :(\\n \")]\n )\n ],\n 1\n )\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"table__buttons\" },\n [\n _c(\n \"v-btn\",\n {\n attrs: {\n fab: \"\",\n dark: \"\",\n large: \"\",\n color: \"cyan\",\n title: \"Добавить\"\n },\n on: { click: _vm.createItem }\n },\n [_c(\"v-icon\", { attrs: { dark: \"\" } }, [_vm._v(\"add\")])],\n 1\n ),\n _vm._v(\" \"),\n !_vm.isArchive\n ? _c(\n \"v-btn\",\n {\n attrs: {\n fab: \"\",\n dark: \"\",\n large: \"\",\n color: \"light-blue darken-1\",\n title: \"Архив\"\n },\n on: {\n click: function($event) {\n _vm.loadItems(true)\n }\n }\n },\n [_c(\"fa\", { attrs: { icon: \"archive\" } })],\n 1\n )\n : _c(\n \"v-btn\",\n {\n attrs: {\n fab: \"\",\n dark: \"\",\n large: \"\",\n color: \"light-blue darken-1\",\n title: \"Сотрудники\"\n },\n on: {\n click: function($event) {\n _vm.loadItems(false)\n }\n }\n },\n [_c(\"fa\", { attrs: { icon: \"address-card\" } })],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"transition\",\n {\n attrs: {\n \"enter-active-class\": \"buttonEnter\",\n \"leave-active-class\": \"buttonLeave\",\n mode: \"out-in\"\n }\n },\n [\n _c(\n \"v-btn\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.selected.length > 0,\n expression: \"selected.length > 0\"\n }\n ],\n staticClass: \"delete-btn\",\n attrs: { fab: \"\", large: \"\", dark: \"\" },\n on: {\n click: function($event) {\n _vm.deleteDialog(_vm.selected)\n }\n }\n },\n [_c(\"v-icon\", [_vm._v(\"delete\")])],\n 1\n )\n ],\n 1\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"v-snackbar\",\n {\n attrs: {\n timeout: _vm.snackbarTimeout,\n top: \"\",\n \"multi-line\": \"\",\n color: \"info\"\n },\n model: {\n value: _vm.snackbarShow,\n callback: function($$v) {\n _vm.snackbarShow = $$v\n },\n expression: \"snackbarShow\"\n }\n },\n [\n _vm._v(\"\\n \" + _vm._s(_vm.$t(\"delete_done\")) + \"\\n \"),\n _c(\n \"v-btn\",\n {\n attrs: { flat: \"\", color: \"pink\" },\n nativeOn: {\n click: function($event) {\n _vm.snackbarShow = false\n }\n }\n },\n [_vm._v(_vm._s(_vm.$t(\"ok\")))]\n )\n ],\n 1\n )\n ],\n 1\n )\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\nmodule.exports = { render: render, staticRenderFns: staticRenderFns }\nif (false) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-hot-reload-api\") .rerender(\"data-v-57fbd0b8\", module.exports)\n }\n}//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3QvaW5kZXgudnVlPzA4ZjUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSyxTQUFTLGtCQUFrQixFQUFFO0FBQ2xDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFrQix1QkFBdUI7QUFDekM7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTRCLDBCQUEwQjtBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGdDQUFnQyxTQUFTLFdBQVcsRUFBRTtBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw4QkFBOEIsNkJBQTZCO0FBQzNEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBcUI7QUFDckI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsOEJBQThCLDhCQUE4QjtBQUM1RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EscUJBQXFCO0FBQ3JCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtCQUFrQix1QkFBdUI7QUFDekM7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNEJBQTRCLDBCQUEwQjtBQUN0RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBcUIsU0FBUyxxQkFBcUIsRUFBRTtBQUNyRDtBQUNBO0FBQ0E7QUFDQSx5QkFBeUIsU0FBUyxXQUFXLEVBQUU7QUFDL0M7QUFDQTtBQUNBO0FBQ0EsNkJBQTZCLFNBQVMsV0FBVyxFQUFFO0FBQ25EO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxpQ0FBaUM7QUFDakM7QUFDQTtBQUNBO0FBQ0E7QUFDQSxtQ0FBbUM7QUFDbkM7QUFDQTtBQUNBLCtCQUErQjtBQUMvQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSw2QkFBNkIsU0FBUyxXQUFXLEVBQUU7QUFDbkQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlDQUFpQztBQUNqQztBQUNBO0FBQ0E7QUFDQTtBQUNBLG1DQUFtQztBQUNuQztBQUNBO0FBQ0EsK0JBQStCO0FBQy9CO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDZCQUE2QixTQUFTLG9CQUFvQixFQUFFO0FBQzVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxtQ0FBbUM7QUFDbkM7QUFDQTtBQUNBO0FBQ0E7QUFDQSxtQ0FBbUM7QUFDbkM7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQ0FBcUM7QUFDckM7QUFDQTtBQUNBLGlDQUFpQztBQUNqQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFDQUFxQztBQUNyQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1Q0FBdUM7QUFDdkM7QUFDQTtBQUNBLG1DQUFtQztBQUNuQztBQUNBO0FBQ0E7QUFDQTtBQUNBLDhDQUE4QyxpQ0FBaUM7QUFDL0U7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHlDQUF5QztBQUN6QztBQUNBO0FBQ0EscUNBQXFDO0FBQ3JDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtEQUFrRCw2QkFBNkI7QUFDL0U7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHlDQUF5QztBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrREFBa0QsNkJBQTZCO0FBQy9FO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx5Q0FBeUM7QUFDekM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDZCQUE2QixTQUFTLG9CQUFvQixFQUFFO0FBQzVEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxtQ0FBbUM7QUFDbkM7QUFDQTtBQUNBO0FBQ0E7QUFDQSxtQ0FBbUM7QUFDbkM7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQ0FBcUM7QUFDckM7QUFDQTtBQUNBLGlDQUFpQztBQUNqQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFDQUFxQztBQUNyQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1Q0FBdUM7QUFDdkM7QUFDQTtBQUNBLG1DQUFtQztBQUNuQztBQUNBO0FBQ0E7QUFDQTtBQUNBLDhDQUE4QyxpQ0FBaUM7QUFDL0U7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHlDQUF5QztBQUN6QztBQUNBO0FBQ0EscUNBQXFDO0FBQ3JDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGtEQUFrRCw2QkFBNkI7QUFDL0U7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHlDQUF5QztBQUN6QztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrREFBa0QsNkJBQTZCO0FBQy9FO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx5Q0FBeUM7QUFDekM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsOEJBQThCLDZCQUE2QjtBQUMzRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EscUJBQXFCO0FBQ3JCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE4Qiw4QkFBOEI7QUFDNUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQjtBQUNyQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCO0FBQ2pCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsbUJBQW1CO0FBQ25CO0FBQ0E7QUFDQSxlQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWU7QUFDZjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQ0FBb0Msa0NBQWtDO0FBQ3RFO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsK0JBQStCO0FBQy9CO0FBQ0E7QUFDQSwyQkFBMkI7QUFDM0I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxzQ0FBc0MsV0FBVztBQUNqRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNkJBQTZCO0FBQzdCO0FBQ0EsNENBQTRDLFNBQVMsZ0JBQWdCLEVBQUU7QUFDdkU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxpQkFBaUI7QUFDakI7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxpQkFBaUI7QUFDakI7QUFDQSxlQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCLGtCQUFrQjtBQUNuQztBQUNBO0FBQ0E7QUFDQSxxQkFBcUIsU0FBUyw2Q0FBNkMsRUFBRTtBQUM3RTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYSxnQ0FBZ0M7QUFDN0M7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxtQkFBbUI7QUFDbkIsdUJBQXVCO0FBQ3ZCLGlCQUFpQjtBQUNqQiwrQkFBK0IsU0FBUyxXQUFXLEVBQUU7QUFDckQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1QkFBdUI7QUFDdkI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQjtBQUNyQiwrQkFBK0IsU0FBUyxrQkFBa0IsRUFBRTtBQUM1RDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUJBQXVCO0FBQ3ZCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxQkFBcUI7QUFDckIsK0JBQStCLFNBQVMsdUJBQXVCLEVBQUU7QUFDakU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlCQUFpQjtBQUNqQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDhCQUE4QiwrQkFBK0I7QUFDN0Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQjtBQUNyQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxlQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0E7QUFDQSxpQkFBaUI7QUFDakI7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMEJBQTBCLDBCQUEwQjtBQUNwRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCO0FBQ2pCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQkFBa0I7QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IjM1MC5qcyIsInNvdXJjZXNDb250ZW50IjpbInZhciByZW5kZXIgPSBmdW5jdGlvbigpIHtcbiAgdmFyIF92bSA9IHRoaXNcbiAgdmFyIF9oID0gX3ZtLiRjcmVhdGVFbGVtZW50XG4gIHZhciBfYyA9IF92bS5fc2VsZi5fYyB8fCBfaFxuICByZXR1cm4gX2MoXG4gICAgXCJkaXZcIixcbiAgICB7IGF0dHJzOiB7IGlkOiBcImVtcGxveWVlc1wiIH0gfSxcbiAgICBbXG4gICAgICBfYyhcImgyXCIsIFtfdm0uX3YoX3ZtLl9zKF92bS5jYXJkVGl0bGUpKV0pLFxuICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgIF9jKFxuICAgICAgICBcInYtZGlhbG9nXCIsXG4gICAgICAgIHtcbiAgICAgICAgICBhdHRyczogeyBcIm1heC13aWR0aFwiOiBcIjUwMHB4XCIgfSxcbiAgICAgICAgICBtb2RlbDoge1xuICAgICAgICAgICAgdmFsdWU6IF92bS5kZWxldGVXaW5kb3csXG4gICAgICAgICAgICBjYWxsYmFjazogZnVuY3Rpb24oJCR2KSB7XG4gICAgICAgICAgICAgIF92bS5kZWxldGVXaW5kb3cgPSAkJHZcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBleHByZXNzaW9uOiBcImRlbGV0ZVdpbmRvd1wiXG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBbXG4gICAgICAgICAgX2MoXG4gICAgICAgICAgICBcInYtY2FyZFwiLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICBfYyhcInYtY2FyZC10aXRsZVwiLCBbXG4gICAgICAgICAgICAgICAgX2MoXCJzcGFuXCIsIHsgc3RhdGljQ2xhc3M6IFwiaGVhZGxpbmVcIiB9LCBbXG4gICAgICAgICAgICAgICAgICBfdm0uX3YoX3ZtLl9zKF92bS4kdChcImF0dGVudGlvblwiKSkpXG4gICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgIFwidi1jYXJkLXRleHRcIixcbiAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICBfYyhcInYtZmxleFwiLCB7IGF0dHJzOiB7IHhzMTI6IFwiXCIgfSB9LCBbXG4gICAgICAgICAgICAgICAgICAgIF92bS5fdihfdm0uX3MoX3ZtLmRlbGV0ZU1zZykpXG4gICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcInYtY2FyZC1hY3Rpb25zXCIsXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgIFwidi1idG5cIixcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IG91dGxpbmU6IFwiXCIsIGNvbG9yOiBcImluZm9cIiB9LFxuICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZU9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0uZGVsZXRlQ29uZmlybSgkZXZlbnQpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KF92bS5fcyhfdm0uJHQoXCJva1wiKSkpXVxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgXCJ2LWJ0blwiLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgb3V0bGluZTogXCJcIiwgY29sb3I6IFwiZXJyb3JcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZU9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0uZGVsZXRlQ2FuY2VsKCRldmVudClcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS4kdChcImNhbmNlbFwiKSkpXVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgMVxuICAgICAgICAgIClcbiAgICAgICAgXSxcbiAgICAgICAgMVxuICAgICAgKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfYyhcbiAgICAgICAgXCJ2LWRpYWxvZ1wiLFxuICAgICAgICB7XG4gICAgICAgICAgYXR0cnM6IHsgXCJtYXgtd2lkdGhcIjogXCI4MDBweFwiIH0sXG4gICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgIHZhbHVlOiBfdm0udG91ckNyZWF0ZSxcbiAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgX3ZtLnRvdXJDcmVhdGUgPSAkJHZcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBleHByZXNzaW9uOiBcInRvdXJDcmVhdGVcIlxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgW1xuICAgICAgICAgIF9jKFxuICAgICAgICAgICAgXCJ2LWNhcmRcIixcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgX2MoXCJ2LWNhcmQtdGl0bGVcIiwgW1xuICAgICAgICAgICAgICAgIF9jKFwic3BhblwiLCB7IHN0YXRpY0NsYXNzOiBcImhlYWRsaW5lXCIgfSwgW1xuICAgICAgICAgICAgICAgICAgX3ZtLl92KFwi0J3QvtCy0LDRjyDQv9GD0YLQtdCy0LrQsFwiKVxuICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcInYtY2FyZC10ZXh0XCIsXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgIFwidi1jb250YWluZXJcIixcbiAgICAgICAgICAgICAgICAgICAgeyBhdHRyczogeyBcImdyaWQtbGlzdC1tZFwiOiBcIlwiIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgXCJ2LWxheW91dFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgeyBhdHRyczogeyB3cmFwOiBcIlwiIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJ2LWZsZXhcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGF0dHJzOiB7IHhzMTI6IFwiXCIgfSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFwidi1zZWxlY3RcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfdm0uJHQoXCJ0b3VyXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwicHJlcGVuZC1pY29uXCI6IFwiY2FyZF90cmF2ZWxcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtczogX3ZtLnRvdXJzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiaXRlbS10ZXh0XCI6IFwidGl0bGVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIml0ZW0tdmFsdWVcIjogXCJpZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbih2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAhIXYgfHwgXCLQktGL0LHQtdGA0LjRgtC1INGC0YPRgFwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlZDogXCJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uZWRpdGVkVG91ci50b3VyX2lkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS4kc2V0KF92bS5lZGl0ZWRUb3VyLCBcInRvdXJfaWRcIiwgJCR2KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJlZGl0ZWRUb3VyLnRvdXJfaWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInYtZmxleFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgYXR0cnM6IHsgeHMxMjogXCJcIiB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXCJ2LXNlbGVjdFwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF92bS4kdChcImNsaWVudFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInByZXBlbmQtaWNvblwiOiBcInBlcnNvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zOiBfdm0uY2xpZW50cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIml0ZW0tdGV4dFwiOiBcImxhc3RfbmFtZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiaXRlbS12YWx1ZVwiOiBcImlkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVsZXM6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uKHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICEhdiB8fCBcItCS0YvQsdC10YDQuNGC0LUg0LrQu9C40LXQvdGC0LBcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQ6IFwiXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLmVkaXRlZFRvdXIuY2xpZW50X2lkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS4kc2V0KF92bS5lZGl0ZWRUb3VyLCBcImNsaWVudF9pZFwiLCAkJHYpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcImVkaXRlZFRvdXIuY2xpZW50X2lkXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJ2LWZsZXhcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGF0dHJzOiB7IHhzMTI6IFwiXCIsIHNtNjogXCJcIiB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwidi1tZW51XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWY6IFwibWVudTFcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF6eTogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiY2xvc2Utb24tY29udGVudC1jbGlja1wiOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb246IFwic2NhbGUtdHJhbnNpdGlvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJvZmZzZXQteVwiOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJmdWxsLXdpZHRoXCI6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm51ZGdlLXJpZ2h0XCI6IDQwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJtaW4td2lkdGhcIjogXCIyOTBweFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJyZXR1cm4tdmFsdWVcIjogX3ZtLmRhdGUxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJ1cGRhdGU6cmV0dXJuVmFsdWVcIjogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kYXRlMSA9ICRldmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uZGVwYXJ0RGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRlcGFydERhdGUgPSAkJHZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcImRlcGFydERhdGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFwidi10ZXh0LWZpZWxkXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsb3Q6IFwiYWN0aXZhdG9yXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsOiBfdm0uJHQoXCJkZXBhcnR1cmVfZGF0ZVwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJwcmVwZW5kLWljb25cIjogXCJldmVudFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkb25seTogXCJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsb3Q6IFwiYWN0aXZhdG9yXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLmVkaXRlZFRvdXIuZGVwYXJ0dXJlX2RhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uJHNldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5lZGl0ZWRUb3VyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkZXBhcnR1cmVfZGF0ZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCR2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcImVkaXRlZFRvdXIuZGVwYXJ0dXJlX2RhdGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInYtZGF0ZS1waWNrZXJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgXCJuby10aXRsZVwiOiBcIlwiLCBzY3JvbGxhYmxlOiBcIlwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS5lZGl0ZWRUb3VyLmRlcGFydHVyZV9kYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS4kc2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZWRpdGVkVG91cixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJkZXBhcnR1cmVfZGF0ZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJHZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwiZWRpdGVkVG91ci5kZXBhcnR1cmVfZGF0ZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFwidi1zcGFjZXJcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwidi1idG5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBmbGF0OiBcIlwiLCBjb2xvcjogXCJwcmltYXJ5XCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGVwYXJ0RGF0ZSA9IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS4kdChcImNhbmNlbFwiKSkpXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInYtYnRuXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgZmxhdDogXCJcIiwgY29sb3I6IFwicHJpbWFyeVwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLiRyZWZzLm1lbnUxLnNhdmUoX3ZtLmRhdGUxKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KF92bS5fcyhfdm0uJHQoXCJva1wiKSkpXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInYtZmxleFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsgYXR0cnM6IHsgeHMxMjogXCJcIiwgc202OiBcIlwiIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJ2LW1lbnVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZjogXCJtZW51MlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXp5OiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJjbG9zZS1vbi1jb250ZW50LWNsaWNrXCI6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogXCJzY2FsZS10cmFuc2l0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9mZnNldC15XCI6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcImZ1bGwtd2lkdGhcIjogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwibnVkZ2UtcmlnaHRcIjogNDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm1pbi13aWR0aFwiOiBcIjI5MHB4XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInJldHVybi12YWx1ZVwiOiBfdm0uZGF0ZTJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInVwZGF0ZTpyZXR1cm5WYWx1ZVwiOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmRhdGUyID0gJGV2ZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS5hcnJpdmFsRGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmFycml2YWxEYXRlID0gJCR2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJhcnJpdmFsRGF0ZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXCJ2LXRleHQtZmllbGRcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xvdDogXCJhY3RpdmF0b3JcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFiZWw6IF92bS4kdChcImFycml2YWxfZGF0ZVwiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJwcmVwZW5kLWljb25cIjogXCJldmVudFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFkb25seTogXCJcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsb3Q6IFwiYWN0aXZhdG9yXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb2RlbDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLmVkaXRlZFRvdXIuYXJyaXZhbF9kYXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjazogZnVuY3Rpb24oJCR2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLiRzZXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZWRpdGVkVG91cixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiYXJyaXZhbF9kYXRlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkJHZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwiZWRpdGVkVG91ci5hcnJpdmFsX2RhdGVcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInYtZGF0ZS1waWNrZXJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgXCJuby10aXRsZVwiOiBcIlwiLCBzY3JvbGxhYmxlOiBcIlwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGVsOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS5lZGl0ZWRUb3VyLmFycml2YWxfZGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjazogZnVuY3Rpb24oJCR2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uJHNldChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmVkaXRlZFRvdXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiYXJyaXZhbF9kYXRlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkdlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJlZGl0ZWRUb3VyLmFycml2YWxfZGF0ZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFwidi1zcGFjZXJcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwidi1idG5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBmbGF0OiBcIlwiLCBjb2xvcjogXCJwcmltYXJ5XCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uZGVwYXJ0RGF0ZSA9IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS4kdChcImNhbmNlbFwiKSkpXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInYtYnRuXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgZmxhdDogXCJcIiwgY29sb3I6IFwicHJpbWFyeVwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLiRyZWZzLm1lbnUyLnNhdmUoX3ZtLmRhdGUyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KF92bS5fcyhfdm0uJHQoXCJva1wiKSkpXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcInYtY2FyZC1hY3Rpb25zXCIsXG4gICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgIFwidi1idG5cIixcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IG91dGxpbmU6IFwiXCIsIGNvbG9yOiBcImluZm9cIiB9LFxuICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZU9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0uYWRkQ29uZmlybSgkZXZlbnQpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBbX3ZtLl92KF92bS5fcyhfdm0uJHQoXCJva1wiKSkpXVxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgXCJ2LWJ0blwiLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgb3V0bGluZTogXCJcIiwgY29sb3I6IFwiZXJyb3JcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgIG5hdGl2ZU9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0uYWRkQ2FuY2VsKCRldmVudClcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS4kdChcImNhbmNlbFwiKSkpXVxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgMVxuICAgICAgICAgIClcbiAgICAgICAgXSxcbiAgICAgICAgMVxuICAgICAgKSxcbiAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICBfYyhcbiAgICAgICAgXCJ2LWNhcmRcIixcbiAgICAgICAgW1xuICAgICAgICAgIF9jKFxuICAgICAgICAgICAgXCJ2LWNhcmQtdGl0bGVcIixcbiAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgX2MoXCJ2LXRleHQtZmllbGRcIiwge1xuICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICBcImFwcGVuZC1pY29uXCI6IFwic2VhcmNoXCIsXG4gICAgICAgICAgICAgICAgICBsYWJlbDogX3ZtLiR0KFwic2VhcmNoX2lucHV0XCIpLFxuICAgICAgICAgICAgICAgICAgXCJzaW5nbGUtbGluZVwiOiBcIlwiXG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBtb2RlbDoge1xuICAgICAgICAgICAgICAgICAgdmFsdWU6IF92bS5zZWFyY2gsXG4gICAgICAgICAgICAgICAgICBjYWxsYmFjazogZnVuY3Rpb24oJCR2KSB7XG4gICAgICAgICAgICAgICAgICAgIF92bS5zZWFyY2ggPSAkJHZcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcInNlYXJjaFwiXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIDFcbiAgICAgICAgICApLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX2MoXG4gICAgICAgICAgICBcInYtZGF0YS10YWJsZVwiLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJlbGV2YXRpb24tMVwiLFxuICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgIGhlYWRlcnM6IF92bS5oZWFkZXJzLFxuICAgICAgICAgICAgICAgIGl0ZW1zOiBfdm0uaXRlbXMsXG4gICAgICAgICAgICAgICAgc2VhcmNoOiBfdm0uc2VhcmNoLFxuICAgICAgICAgICAgICAgIGxvYWRpbmc6IF92bS5sb2FkaW5nLFxuICAgICAgICAgICAgICAgIFwic2VsZWN0LWFsbFwiOiBcIlwiLFxuICAgICAgICAgICAgICAgIFwiaXRlbS1rZXlcIjogXCJpZFwiLFxuICAgICAgICAgICAgICAgIFwibm8tcmVzdWx0cy10ZXh0XCI6IF92bS4kdChcIm5vX21hdGNoX2ZvdW5kXCIpLFxuICAgICAgICAgICAgICAgIFwicm93cy1wZXItcGFnZS10ZXh0XCI6IF92bS4kdChcInN0cmluZ3NcIilcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgc2NvcGVkU2xvdHM6IF92bS5fdShbXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAga2V5OiBcIml0ZW1zXCIsXG4gICAgICAgICAgICAgICAgICBmbjogZnVuY3Rpb24ocHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidGRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX2MoXCJ2LWNoZWNrYm94XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBwcmltYXJ5OiBcIlwiLCBcImhpZGUtZGV0YWlsc1wiOiBcIlwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBwcm9wcy5zZWxlY3RlZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiBmdW5jdGlvbigkJHYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLiRzZXQocHJvcHMsIFwic2VsZWN0ZWRcIiwgJCR2KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwicHJvcHMuc2VsZWN0ZWRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgIF9jKFwidGRcIiwgW192bS5fdihfdm0uX3MocHJvcHMuaXRlbS50b3VyKSldKSxcbiAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgIF9jKFwidGRcIiwgW192bS5fdihfdm0uX3MocHJvcHMuaXRlbS5jbGllbnQpKV0pLFxuICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgX2MoXCJ0ZFwiLCBbX3ZtLl92KF92bS5fcyhwcm9wcy5pdGVtLmRlcGFydHVyZV9kYXRlKSldKSxcbiAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgIF9jKFwidGRcIiwgW192bS5fdihfdm0uX3MocHJvcHMuaXRlbS5hcnJpdmFsX2RhdGUpKV0pLFxuICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICBcInRkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwidi1idG5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJteC0wXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBpY29uOiBcIlwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmVkaXRJdGVtKHByb3BzLml0ZW0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFwidi1pY29uXCIsIHsgYXR0cnM6IHsgY29sb3I6IFwidGVhbFwiIH0gfSwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCJlZGl0XCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgIG1vZGVsOiB7XG4gICAgICAgICAgICAgICAgdmFsdWU6IF92bS5zZWxlY3RlZCxcbiAgICAgICAgICAgICAgICBjYWxsYmFjazogZnVuY3Rpb24oJCR2KSB7XG4gICAgICAgICAgICAgICAgICBfdm0uc2VsZWN0ZWQgPSAkJHZcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2VsZWN0ZWRcIlxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICBfYyhcInYtcHJvZ3Jlc3MtbGluZWFyXCIsIHtcbiAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgc2xvdDogXCJwcm9ncmVzc1wiLFxuICAgICAgICAgICAgICAgICAgY29sb3I6IFwiZ3JleSBkYXJrZW4tMVwiLFxuICAgICAgICAgICAgICAgICAgaW5kZXRlcm1pbmF0ZTogXCJcIlxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgc2xvdDogXCJwcm9ncmVzc1wiXG4gICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcInRlbXBsYXRlXCIsXG4gICAgICAgICAgICAgICAgeyBzbG90OiBcIm5vLWRhdGFcIiB9LFxuICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcInYtYWxlcnRcIixcbiAgICAgICAgICAgICAgICAgICAgeyBhdHRyczogeyB2YWx1ZTogdHJ1ZSwgY29sb3I6IFwicmVkXCIsIGljb246IFwid2FybmluZ1wiIH0gfSxcbiAgICAgICAgICAgICAgICAgICAgW192bS5fdihcIlxcbiAgICAgICAgICDQndC10YIg0LTQsNC90L3Ri9GFIDooXFxuICAgICAgICBcIildXG4gICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAyXG4gICAgICAgICAgKSxcbiAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgIF9jKFxuICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgIHsgc3RhdGljQ2xhc3M6IFwidGFibGVfX2J1dHRvbnNcIiB9LFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcInYtYnRuXCIsXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgZmFiOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICBkYXJrOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICBsYXJnZTogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgY29sb3I6IFwiY3lhblwiLFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCLQlNC+0LHQsNCy0LjRgtGMXCJcbiAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICBvbjogeyBjbGljazogX3ZtLmNyZWF0ZUl0ZW0gfVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgW19jKFwidi1pY29uXCIsIHsgYXR0cnM6IHsgZGFyazogXCJcIiB9IH0sIFtfdm0uX3YoXCJhZGRcIildKV0sXG4gICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAhX3ZtLmlzQXJjaGl2ZVxuICAgICAgICAgICAgICAgID8gX2MoXG4gICAgICAgICAgICAgICAgICAgIFwidi1idG5cIixcbiAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmYWI6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXJrOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGFyZ2U6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xvcjogXCJsaWdodC1ibHVlIGRhcmtlbi0xXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCLQkNGA0YXQuNCyXCJcbiAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5sb2FkSXRlbXModHJ1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFtfYyhcImZhXCIsIHsgYXR0cnM6IHsgaWNvbjogXCJhcmNoaXZlXCIgfSB9KV0sXG4gICAgICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICA6IF9jKFxuICAgICAgICAgICAgICAgICAgICBcInYtYnRuXCIsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBhdHRyczoge1xuICAgICAgICAgICAgICAgICAgICAgICAgZmFiOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGFyazogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhcmdlOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IFwibGlnaHQtYmx1ZSBkYXJrZW4tMVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwi0KHQvtGC0YDRg9C00L3QuNC60LhcIlxuICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbigkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLmxvYWRJdGVtcyhmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIFtfYyhcImZhXCIsIHsgYXR0cnM6IHsgaWNvbjogXCJhZGRyZXNzLWNhcmRcIiB9IH0pXSxcbiAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgXCJ0cmFuc2l0aW9uXCIsXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICAgICAgXCJlbnRlci1hY3RpdmUtY2xhc3NcIjogXCJidXR0b25FbnRlclwiLFxuICAgICAgICAgICAgICAgICAgICBcImxlYXZlLWFjdGl2ZS1jbGFzc1wiOiBcImJ1dHRvbkxlYXZlXCIsXG4gICAgICAgICAgICAgICAgICAgIG1vZGU6IFwib3V0LWluXCJcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcInYtYnRuXCIsXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBkaXJlY3RpdmVzOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IFwic2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICByYXdOYW1lOiBcInYtc2hvd1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLnNlbGVjdGVkLmxlbmd0aCA+IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IFwic2VsZWN0ZWQubGVuZ3RoID4gMFwiXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJkZWxldGUtYnRuXCIsXG4gICAgICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgZmFiOiBcIlwiLCBsYXJnZTogXCJcIiwgZGFyazogXCJcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5kZWxldGVEaWFsb2coX3ZtLnNlbGVjdGVkKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgW19jKFwidi1pY29uXCIsIFtfdm0uX3YoXCJkZWxldGVcIildKV0sXG4gICAgICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgXSxcbiAgICAgICAgICAgIDFcbiAgICAgICAgICApLFxuICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgX2MoXG4gICAgICAgICAgICBcInYtc25hY2tiYXJcIixcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICAgICAgICB0aW1lb3V0OiBfdm0uc25hY2tiYXJUaW1lb3V0LFxuICAgICAgICAgICAgICAgIHRvcDogXCJcIixcbiAgICAgICAgICAgICAgICBcIm11bHRpLWxpbmVcIjogXCJcIixcbiAgICAgICAgICAgICAgICBjb2xvcjogXCJpbmZvXCJcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgbW9kZWw6IHtcbiAgICAgICAgICAgICAgICB2YWx1ZTogX3ZtLnNuYWNrYmFyU2hvdyxcbiAgICAgICAgICAgICAgICBjYWxsYmFjazogZnVuY3Rpb24oJCR2KSB7XG4gICAgICAgICAgICAgICAgICBfdm0uc25hY2tiYXJTaG93ID0gJCR2XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBcInNuYWNrYmFyU2hvd1wiXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgIF92bS5fdihcIlxcbiAgICAgIFwiICsgX3ZtLl9zKF92bS4kdChcImRlbGV0ZV9kb25lXCIpKSArIFwiXFxuICAgICAgXCIpLFxuICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICBcInYtYnRuXCIsXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgZmxhdDogXCJcIiwgY29sb3I6IFwicGlua1wiIH0sXG4gICAgICAgICAgICAgICAgICBuYXRpdmVPbjoge1xuICAgICAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24oJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgX3ZtLnNuYWNrYmFyU2hvdyA9IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKF92bS4kdChcIm9rXCIpKSldXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAxXG4gICAgICAgICAgKVxuICAgICAgICBdLFxuICAgICAgICAxXG4gICAgICApXG4gICAgXSxcbiAgICAxXG4gIClcbn1cbnZhciBzdGF0aWNSZW5kZXJGbnMgPSBbXVxucmVuZGVyLl93aXRoU3RyaXBwZWQgPSB0cnVlXG5tb2R1bGUuZXhwb3J0cyA9IHsgcmVuZGVyOiByZW5kZXIsIHN0YXRpY1JlbmRlckZuczogc3RhdGljUmVuZGVyRm5zIH1cbmlmIChtb2R1bGUuaG90KSB7XG4gIG1vZHVsZS5ob3QuYWNjZXB0KClcbiAgaWYgKG1vZHVsZS5ob3QuZGF0YSkge1xuICAgIHJlcXVpcmUoXCJ2dWUtaG90LXJlbG9hZC1hcGlcIikgICAgICAucmVyZW5kZXIoXCJkYXRhLXYtNTdmYmQwYjhcIiwgbW9kdWxlLmV4cG9ydHMpXG4gIH1cbn1cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi90ZW1wbGF0ZS1jb21waWxlcj97XCJpZFwiOlwiZGF0YS12LTU3ZmJkMGI4XCIsXCJoYXNTY29wZWRcIjp0cnVlLFwiYnVibGVcIjp7XCJ0cmFuc2Zvcm1zXCI6e319fSEuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvci5qcz90eXBlPXRlbXBsYXRlJmluZGV4PTAhLi9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3QvaW5kZXgudnVlXG4vLyBtb2R1bGUgaWQgPSAzNTBcbi8vIG1vZHVsZSBjaHVua3MgPSAyNiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///350\n");
/***/ }),
/***/ 73:
/***/ (function(module, exports, __webpack_require__) {
eval("var disposed = false\nfunction injectStyle (ssrContext) {\n if (disposed) return\n __webpack_require__(347)\n}\nvar normalizeComponent = __webpack_require__(4)\n/* script */\nvar __vue_script__ = __webpack_require__(349)\n/* template */\nvar __vue_template__ = __webpack_require__(350)\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = injectStyle\n/* scopeId */\nvar __vue_scopeId__ = \"data-v-57fbd0b8\"\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"resources\\\\assets\\\\js\\\\pages\\\\Vouchers\\\\list\\\\index.vue\"\n\n/* hot reload */\nif (false) {(function () {\n var hotAPI = require(\"vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-57fbd0b8\", Component.options)\n } else {\n hotAPI.reload(\"data-v-57fbd0b8\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\nmodule.exports = Component.exports\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvYXNzZXRzL2pzL3BhZ2VzL1ZvdWNoZXJzL2xpc3QvaW5kZXgudnVlP2U1NmUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0EseUJBQXdNO0FBQ3hNO0FBQ0E7QUFDQTtBQUNBLDRDQUF3WTtBQUN4WTtBQUNBLDhDQUFxTDtBQUNyTDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsWUFBaUI7QUFDakI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNILENBQUM7O0FBRUQiLCJmaWxlIjoiNzMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZGlzcG9zZWQgPSBmYWxzZVxuZnVuY3Rpb24gaW5qZWN0U3R5bGUgKHNzckNvbnRleHQpIHtcbiAgaWYgKGRpc3Bvc2VkKSByZXR1cm5cbiAgcmVxdWlyZShcIiEhdnVlLXN0eWxlLWxvYWRlciFjc3MtbG9hZGVyP3NvdXJjZU1hcCEuLi8uLi8uLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvc3R5bGUtY29tcGlsZXIvaW5kZXg/e1xcXCJ2dWVcXFwiOnRydWUsXFxcImlkXFxcIjpcXFwiZGF0YS12LTU3ZmJkMGI4XFxcIixcXFwic2NvcGVkXFxcIjp0cnVlLFxcXCJoYXNJbmxpbmVDb25maWdcXFwiOnRydWV9IXNhc3MtbG9hZGVyIS4vc3R5bGVzLnNjc3NcIilcbn1cbnZhciBub3JtYWxpemVDb21wb25lbnQgPSByZXF1aXJlKFwiIS4uLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9jb21wb25lbnQtbm9ybWFsaXplclwiKVxuLyogc2NyaXB0ICovXG52YXIgX192dWVfc2NyaXB0X18gPSByZXF1aXJlKFwiISFiYWJlbC1sb2FkZXI/e1xcXCJjYWNoZURpcmVjdG9yeVxcXCI6dHJ1ZSxcXFwicHJlc2V0c1xcXCI6W1tcXFwiZW52XFxcIix7XFxcIm1vZHVsZXNcXFwiOmZhbHNlLFxcXCJ0YXJnZXRzXFxcIjp7XFxcImJyb3dzZXJzXFxcIjpbXFxcIj4gMiVcXFwiXSxcXFwidWdsaWZ5XFxcIjp0cnVlfX1dXSxcXFwicGx1Z2luc1xcXCI6W1xcXCJ0cmFuc2Zvcm0tb2JqZWN0LXJlc3Qtc3ByZWFkXFxcIixbXFxcInRyYW5zZm9ybS1ydW50aW1lXFxcIix7XFxcInBvbHlmaWxsXFxcIjpmYWxzZSxcXFwiaGVscGVyc1xcXCI6ZmFsc2V9XSxcXFwic3ludGF4LWR5bmFtaWMtaW1wb3J0XFxcIixcXFwidHJhbnNmb3JtLXJ1bnRpbWVcXFwiLFxcXCJ0cmFuc2Zvcm0tYXN5bmMtdG8tZ2VuZXJhdG9yXFxcIixcXFwidHJhbnNmb3JtLW9iamVjdC1yZXN0LXNwcmVhZFxcXCJdfSEuL3NjcmlwdHMuanNcIilcbi8qIHRlbXBsYXRlICovXG52YXIgX192dWVfdGVtcGxhdGVfXyA9IHJlcXVpcmUoXCIhIS4uLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi90ZW1wbGF0ZS1jb21waWxlci9pbmRleD97XFxcImlkXFxcIjpcXFwiZGF0YS12LTU3ZmJkMGI4XFxcIixcXFwiaGFzU2NvcGVkXFxcIjp0cnVlLFxcXCJidWJsZVxcXCI6e1xcXCJ0cmFuc2Zvcm1zXFxcIjp7fX19IS4uLy4uLy4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9zZWxlY3Rvcj90eXBlPXRlbXBsYXRlJmluZGV4PTAhLi9pbmRleC52dWVcIilcbi8qIHRlbXBsYXRlIGZ1bmN0aW9uYWwgKi9cbnZhciBfX3Z1ZV90ZW1wbGF0ZV9mdW5jdGlvbmFsX18gPSBmYWxzZVxuLyogc3R5bGVzICovXG52YXIgX192dWVfc3R5bGVzX18gPSBpbmplY3RTdHlsZVxuLyogc2NvcGVJZCAqL1xudmFyIF9fdnVlX3Njb3BlSWRfXyA9IFwiZGF0YS12LTU3ZmJkMGI4XCJcbi8qIG1vZHVsZUlkZW50aWZpZXIgKHNlcnZlciBvbmx5KSAqL1xudmFyIF9fdnVlX21vZHVsZV9pZGVudGlmaWVyX18gPSBudWxsXG52YXIgQ29tcG9uZW50ID0gbm9ybWFsaXplQ29tcG9uZW50KFxuICBfX3Z1ZV9zY3JpcHRfXyxcbiAgX192dWVfdGVtcGxhdGVfXyxcbiAgX192dWVfdGVtcGxhdGVfZnVuY3Rpb25hbF9fLFxuICBfX3Z1ZV9zdHlsZXNfXyxcbiAgX192dWVfc2NvcGVJZF9fLFxuICBfX3Z1ZV9tb2R1bGVfaWRlbnRpZmllcl9fXG4pXG5Db21wb25lbnQub3B0aW9ucy5fX2ZpbGUgPSBcInJlc291cmNlc1xcXFxhc3NldHNcXFxcanNcXFxccGFnZXNcXFxcVm91Y2hlcnNcXFxcbGlzdFxcXFxpbmRleC52dWVcIlxuXG4vKiBob3QgcmVsb2FkICovXG5pZiAobW9kdWxlLmhvdCkgeyhmdW5jdGlvbiAoKSB7XG4gIHZhciBob3RBUEkgPSByZXF1aXJlKFwidnVlLWhvdC1yZWxvYWQtYXBpXCIpXG4gIGhvdEFQSS5pbnN0YWxsKHJlcXVpcmUoXCJ2dWVcIiksIGZhbHNlKVxuICBpZiAoIWhvdEFQSS5jb21wYXRpYmxlKSByZXR1cm5cbiAgbW9kdWxlLmhvdC5hY2NlcHQoKVxuICBpZiAoIW1vZHVsZS5ob3QuZGF0YSkge1xuICAgIGhvdEFQSS5jcmVhdGVSZWNvcmQoXCJkYXRhLXYtNTdmYmQwYjhcIiwgQ29tcG9uZW50Lm9wdGlvbnMpXG4gIH0gZWxzZSB7XG4gICAgaG90QVBJLnJlbG9hZChcImRhdGEtdi01N2ZiZDBiOFwiLCBDb21wb25lbnQub3B0aW9ucylcbiAgfVxuICBtb2R1bGUuaG90LmRpc3Bvc2UoZnVuY3Rpb24gKGRhdGEpIHtcbiAgICBkaXNwb3NlZCA9IHRydWVcbiAgfSlcbn0pKCl9XG5cbm1vZHVsZS5leHBvcnRzID0gQ29tcG9uZW50LmV4cG9ydHNcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vcmVzb3VyY2VzL2Fzc2V0cy9qcy9wYWdlcy9Wb3VjaGVycy9saXN0L2luZGV4LnZ1ZVxuLy8gbW9kdWxlIGlkID0gNzNcbi8vIG1vZHVsZSBjaHVua3MgPSAyNiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///73\n");
/***/ })
}); | 2,993.358974 | 71,904 | 0.767622 |
735b892d0403119ee39693f7585965255d08d999 | 41,899 | js | JavaScript | public/h5/static/js/otherpages-goods-coupon-coupon.c24840c1.js | NiushopTeam/niushop_b2c_v4_standard | 7d187855bdbe14f19e764ab2e75a718a3e9d4153 | [
"Apache-2.0"
] | 1 | 2020-10-05T13:06:02.000Z | 2020-10-05T13:06:02.000Z | public/h5/static/js/otherpages-goods-coupon-coupon.c24840c1.js | NiushopTeam/niushop_b2c_v4_standard | 7d187855bdbe14f19e764ab2e75a718a3e9d4153 | [
"Apache-2.0"
] | null | null | null | public/h5/static/js/otherpages-goods-coupon-coupon.c24840c1.js | NiushopTeam/niushop_b2c_v4_standard | 7d187855bdbe14f19e764ab2e75a718a3e9d4153 | [
"Apache-2.0"
] | null | null | null | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["otherpages-goods-coupon-coupon"],{"04ff":function(e,t,a){var o=a("96a8");"string"===typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);var r=a("4f06").default;r("756eef37",o,!0,{sourceMap:!1,shadowMode:!1})},"2c15":function(e,t,a){"use strict";a.r(t);var o=a("82e1"),r=a.n(o);for(var n in o)"default"!==n&&function(e){a.d(t,e,(function(){return o[e]}))}(n);t["default"]=r.a},"82e1":function(e,t,a){"use strict";var o=a("ee27");a("99af"),a("4160"),a("159b"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(a("4c22")),n=o(a("f505")),i={data:function(){return{list:[],couponBtnSwitch:!1}},components:{nsShowToast:n.default},onShow:function(){this.$langConfig.refresh()},mixins:[r.default],methods:{liClick:function(e,t){0==e.useState?this.receiveCoupon(e,t):this.toGoodsList(e,t)},receiveCoupon:function(e,t){var a=this;if(!this.couponBtnSwitch){this.couponBtnSwitch=!0;var o=uni.getStorageSync("token");""!=o?this.$api.sendRequest({url:"/coupon/api/coupon/receive",data:{coupon_type_id:e.coupon_type_id,get_type:2},success:function(t){a.couponBtnSwitch=!1;var o="";o="领取成功,快去使用吧";var r=a.list;if(1==t.data.is_exist&&t.code<0&&(o="您已领取过该优惠券,快去使用吧"),1==t.data.is_exist)for(var n=0;n<r.length;n++)r[n].coupon_type_id==e.coupon_type_id&&(r[n].useState=1);else for(var i=0;i<r.length;i++)r[i].coupon_type_id==e.coupon_type_id&&(r[i].useState=2);a.$util.showToast({title:o})},fail:function(e){a.couponBtnSwitch=!1}}):(this.couponBtnSwitch=!0,this.$util.redirectTo("/pages/login/login/login"))}},getMemberCounponList:function(e){var t=this;this.$api.sendRequest({url:"/coupon/api/coupon/typepagelists",data:{page:e.num,page_size:e.size},success:function(a){var o=[],r=a.message;0==a.code&&a.data?o=a.data.list:t.$util.showToast({title:r}),e.endSuccess(o.length),o.length&&o.forEach((function(e){e.useState=0})),1==e.num&&(t.list=[]),t.list=t.list.concat(o),t.$refs.loadingCover&&t.$refs.loadingCover.hide()},fail:function(){e.endErr(),this.$refs.loadingCover&&this.$refs.loadingCover.hide()}})},imageError:function(e){this.list[e].logo=this.$util.getDefaultImage().default_shop_img,this.$forceUpdate()},couponImageError:function(e){this.list[e].image=this.$util.img("upload/uniapp/goods/coupon.png"),this.$forceUpdate()},toGoodsList:function(e){1!=e.goods_type?this.$util.redirectTo("/pages/goods/list/list",{coupon:e.coupon_type_id}):this.$util.redirectTo("/pages/goods/list/list",{})}},onShareAppMessage:function(e){var t="送您一张优惠券,快来领取吧",a="/otherpages/goods/coupon/coupon";return{title:t,path:a,success:function(e){},fail:function(e){}}}};t.default=i},"96a8":function(e,t,a){var o=a("24fb");t=o(!1),t.push([e.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 文字基本颜色 */\r\n/* 文字尺寸 */.ns-font-size-x-sm[data-v-69bcf78e]{font-size:%?20?%}.ns-font-size-sm[data-v-69bcf78e]{font-size:%?22?%}.ns-font-size-base[data-v-69bcf78e]{font-size:%?24?%}.ns-font-size-lg[data-v-69bcf78e]{font-size:%?28?%}.ns-font-size-x-lg[data-v-69bcf78e]{font-size:%?32?%}.ns-font-size-xx-lg[data-v-69bcf78e]{font-size:%?36?%}.ns-font-size-xxx-lg[data-v-69bcf78e]{font-size:%?40?%}.ns-text-color-black[data-v-69bcf78e]{color:#333!important}.ns-text-color-gray[data-v-69bcf78e]{color:#898989!important}.ns-border-color-gray[data-v-69bcf78e]{border-color:#e7e7e7!important}.ns-bg-color-gray[data-v-69bcf78e]{background-color:#e5e5e5!important}uni-page-body[data-v-69bcf78e]{background-color:#f7f7f7}uni-view[data-v-69bcf78e]{font-size:%?28?%;color:#333}.ns-padding[data-v-69bcf78e]{padding:%?20?%!important}.ns-padding-top[data-v-69bcf78e]{padding-top:%?20?%!important}.ns-padding-right[data-v-69bcf78e]{padding-right:%?20?%!important}.ns-padding-bottom[data-v-69bcf78e]{padding-bottom:%?20?%!important}.ns-padding-left[data-v-69bcf78e]{padding-left:%?20?%!important}.ns-margin[data-v-69bcf78e]{margin:%?20?%!important}.ns-margin-top[data-v-69bcf78e]{margin-top:%?20?%!important}.ns-margin-right[data-v-69bcf78e]{margin-right:%?20?%!important}.ns-margin-bottom[data-v-69bcf78e]{margin-bottom:%?20?%!important}.ns-margin-left[data-v-69bcf78e]{margin-left:%?20?%!important}.ns-border-radius[data-v-69bcf78e]{border-radius:4px!important}uni-button[data-v-69bcf78e]:after{border:none!important}uni-button[data-v-69bcf78e]::after{border:none!important}.uni-tag--inverted[data-v-69bcf78e]{border-color:#e7e7e7!important;color:#333!important}.btn-disabled-color[data-v-69bcf78e]{background:#b7b7b7}.pull-right[data-v-69bcf78e]{float:right!important}.pull-left[data-v-69bcf78e]{float:left!important}.clearfix[data-v-69bcf78e]:before,\r\n.clearfix[data-v-69bcf78e]:after{content:"";display:block;clear:both}.sku-layer .body-item .number-wrap .number uni-button[data-v-69bcf78e],\r\n.sku-layer .body-item .number-wrap .number uni-input[data-v-69bcf78e]{border-color:hsla(0,0%,89.8%,.5)!important;background-color:hsla(0,0%,89.8%,.4)!important}.ns-btn-default-all.gray[data-v-69bcf78e]{background:#e5e5e5;color:#898989}.ns-btn-default-all.free.gray[data-v-69bcf78e]{background:#fff;color:#898989;border:%?1?% solid #e7e7e7}.ns-btn-default-mine.gray[data-v-69bcf78e]{background:#e5e5e5;color:#898989}.ns-btn-default-mine.free.gray[data-v-69bcf78e]{background:#fff;color:#898989;border:%?1?% solid #e7e7e7}\r\n\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */.ns-text-color[data-v-69bcf78e]{color:#ff4544!important}.ns-border-color[data-v-69bcf78e]{border-color:#ff4544!important}.ns-border-color-top[data-v-69bcf78e]{border-top-color:#ff4544!important}.ns-border-color-bottom[data-v-69bcf78e]{border-bottom-color:#ff4544!important}.ns-border-color-right[data-v-69bcf78e]{border-right-color:#ff4544!important}.ns-border-color-left[data-v-69bcf78e]{border-left-color:#ff4544!important}.ns-bg-color[data-v-69bcf78e]{background-color:#ff4544!important}.ns-bg-help-color[data-v-69bcf78e]{background-color:#ffb644!important}uni-button[data-v-69bcf78e]{margin:0 %?60?%;font-size:%?28?%;border-radius:20px;line-height:2.7}uni-button[type="primary"][data-v-69bcf78e]{background-color:#ff4544!important}uni-button[type="primary"][plain][data-v-69bcf78e]{background-color:initial!important;color:#ff4544!important;border-color:#ff4544!important}uni-button[type="primary"][disabled][data-v-69bcf78e]{background:#e5e5e5!important;color:#898989}uni-button[type="primary"].btn-disabled[data-v-69bcf78e]{background:#e5e5e5!important;color:#898989!important}uni-button.btn-disabled[data-v-69bcf78e]{background:#e5e5e5!important;color:#898989!important}uni-button[type="warn"][data-v-69bcf78e]{background:#fff;border:%?1?% solid #ff4544!important;color:#ff4544}uni-button[type="warn"][plain][data-v-69bcf78e]{background-color:initial!important;color:#ff4544!important;border-color:#ff4544!important}uni-button[type="warn"][disabled][data-v-69bcf78e]{border:%?1?% solid #e7e7e7!important;color:#898989}uni-button[type="warn"].btn-disabled[data-v-69bcf78e]{border:%?1?% solid #e7e7e7!important;color:#898989}uni-button[size="mini"][data-v-69bcf78e]{margin:0!important}uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked[data-v-69bcf78e]{color:#ff4544!important}uni-switch .uni-switch-input.uni-switch-input-checked[data-v-69bcf78e]{background-color:#ff4544!important;border-color:#ff4544!important}uni-radio .uni-radio-input-checked[data-v-69bcf78e]{background-color:#ff4544!important;border-color:#ff4544!important}uni-slider .uni-slider-track[data-v-69bcf78e]{background-color:#ff4544!important}.uni-tag--primary[data-v-69bcf78e]{color:#fff!important;background-color:#ff4544!important;border-color:#ff4544!important}.uni-tag--primary.uni-tag--inverted[data-v-69bcf78e]{color:#ff4544!important;background-color:#fff!important;border-color:#ff4544!important}.goods-coupon-popup-layer .coupon-body .item[data-v-69bcf78e]{background-color:#fff!important}.goods-coupon-popup-layer .coupon-body .item uni-view[data-v-69bcf78e]{color:#ff7877!important}.sku-layer .body-item .sku-list-wrap .items[data-v-69bcf78e]{background-color:#f5f5f5!important}.sku-layer .body-item .sku-list-wrap .items.selected[data-v-69bcf78e]{background-color:#fff!important;color:#ff4544!important;border-color:#ff4544!important}.sku-layer .body-item .sku-list-wrap .items.disabled[data-v-69bcf78e]{color:#898989!important;cursor:not-allowed!important;pointer-events:none!important;opacity:.5!important;box-shadow:none!important;-webkit-filter:grayscale(100%);filter:grayscale(100%)}.goods-detail .goods-discount[data-v-69bcf78e]{background:rgba(255,69,68,.2)}.goods-detail .goods-discount .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#ff4544,#ff7877)!important;background:linear-gradient(90deg,#ff4544,#ff7877)!important}.goods-detail .seckill-wrap[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#ff4544,#faa)!important;background:linear-gradient(90deg,#ff4544,#faa)!important}.goods-detail .goods-module-wrap .original-price .seckill-save-price[data-v-69bcf78e]{background:#fff!important;color:#ff4544!important}.goods-detail .goods-pintuan[data-v-69bcf78e]{background:rgba(255,69,68,.2)}.goods-detail .goods-pintuan .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#ff4544,#ff7877)!important;background:linear-gradient(90deg,#ff4544,#ff7877)!important}.goods-detail .goods-presale[data-v-69bcf78e]{background:rgba(255,69,68,.2)}.goods-detail .goods-presale .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#ff4544,#ff7877)!important;background:linear-gradient(90deg,#ff4544,#ff7877)!important}.goods-detail .topic-wrap .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#ff4544,#ff7877)!important;background:linear-gradient(90deg,#ff4544,#ff7877)!important}.goods-detail .goods-module-wrap .original-price .topic-save-price[data-v-69bcf78e]{background:#fff!important;color:#ff4544!important}.goods-detail .goods-groupbuy[data-v-69bcf78e]{background:rgba(255,69,68,.2)}.goods-detail .goods-groupbuy .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#ff4544,#ff7877)!important;background:linear-gradient(90deg,#ff4544,#ff7877)!important}.gradual-change[data-v-69bcf78e]{background:-webkit-linear-gradient(45deg,#ff4544,rgba(255,69,68,.6))!important;background:linear-gradient(45deg,#ff4544,rgba(255,69,68,.6))!important}.ns-btn-default-all[data-v-69bcf78e]{width:100%;height:%?70?%;background:#ff4544;border-radius:%?70?%;text-align:center;line-height:%?70?%;color:#fff;font-size:%?28?%}.ns-btn-default-all.gray[data-v-69bcf78e]{background:#e5e5e5;color:#898989}.ns-btn-default-all.free[data-v-69bcf78e]{width:100%;background:#fff;color:#ff4544;border:%?1?% solid #ff4544;font-size:%?28?%;box-sizing:border-box}.ns-btn-default-all.free.gray[data-v-69bcf78e]{background:#fff;color:#898989;border:%?1?% solid #e7e7e7}.ns-btn-default-mine[data-v-69bcf78e]{display:inline-block;height:%?60?%;border-radius:%?60?%;line-height:%?60?%;padding:0 %?30?%;box-sizing:border-box;color:#fff;background:#ff4544}.ns-btn-default-mine.gray[data-v-69bcf78e]{background:#e5e5e5;color:#898989}.ns-btn-default-mine.free[data-v-69bcf78e]{background:#fff;color:#ff4544;border:%?1?% solid #ff4544;font-size:%?28?%;box-sizing:border-box}.ns-btn-default-mine.free.gray[data-v-69bcf78e]{background:#fff;color:#898989;border:%?1?% solid #e7e7e7}.order-box-btn[data-v-69bcf78e]{display:inline-block;line-height:%?56?%;padding:0 %?30?%;font-size:%?28?%;color:#333;border:%?1?% solid #999;box-sizing:border-box;border-radius:%?60?%;margin-left:%?20?%}.order-box-btn.order-pay[data-v-69bcf78e]{background:#ff4544;color:#fff;border-color:#fff}.ns-text-before[data-v-69bcf78e]::after, .ns-text-before[data-v-69bcf78e]::before{color:#ff4544!important}.ns-bg-before[data-v-69bcf78e]::after{background:#ff4544!important}.ns-bg-before[data-v-69bcf78e]::before{background:#ff4544!important}[data-theme="theme-blue"] .ns-text-color[data-v-69bcf78e]{color:#1786f8!important}[data-theme="theme-blue"] .ns-border-color[data-v-69bcf78e]{border-color:#1786f8!important}[data-theme="theme-blue"] .ns-border-color-top[data-v-69bcf78e]{border-top-color:#1786f8!important}[data-theme="theme-blue"] .ns-border-color-bottom[data-v-69bcf78e]{border-bottom-color:#1786f8!important}[data-theme="theme-blue"] .ns-border-color-right[data-v-69bcf78e]{border-right-color:#1786f8!important}[data-theme="theme-blue"] .ns-border-color-left[data-v-69bcf78e]{border-left-color:#1786f8!important}[data-theme="theme-blue"] .ns-bg-color[data-v-69bcf78e]{background-color:#1786f8!important}[data-theme="theme-blue"] .ns-bg-help-color[data-v-69bcf78e]{background-color:#ff851f!important}[data-theme="theme-blue"] uni-button[data-v-69bcf78e]{margin:0 %?60?%;font-size:%?28?%;border-radius:20px;line-height:2.7}[data-theme="theme-blue"] uni-button[type="primary"][data-v-69bcf78e]{background-color:#1786f8!important}[data-theme="theme-blue"] uni-button[type="primary"][plain][data-v-69bcf78e]{background-color:initial!important;color:#1786f8!important;border-color:#1786f8!important}[data-theme="theme-blue"] uni-button[type="primary"][disabled][data-v-69bcf78e]{background:#e5e5e5!important;color:#898989}[data-theme="theme-blue"] uni-button[type="primary"].btn-disabled[data-v-69bcf78e]{background:#e5e5e5!important;color:#898989!important}[data-theme="theme-blue"] uni-button.btn-disabled[data-v-69bcf78e]{background:#e5e5e5!important;color:#898989!important}[data-theme="theme-blue"] uni-button[type="warn"][data-v-69bcf78e]{background:#fff;border:%?1?% solid #1786f8!important;color:#1786f8}[data-theme="theme-blue"] uni-button[type="warn"][plain][data-v-69bcf78e]{background-color:initial!important;color:#1786f8!important;border-color:#1786f8!important}[data-theme="theme-blue"] uni-button[type="warn"][disabled][data-v-69bcf78e]{border:%?1?% solid #e7e7e7!important;color:#898989}[data-theme="theme-blue"] uni-button[type="warn"].btn-disabled[data-v-69bcf78e]{border:%?1?% solid #e7e7e7!important;color:#898989}[data-theme="theme-blue"] uni-button[size="mini"][data-v-69bcf78e]{margin:0!important}[data-theme="theme-blue"] uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked[data-v-69bcf78e]{color:#1786f8!important}[data-theme="theme-blue"] uni-switch .uni-switch-input.uni-switch-input-checked[data-v-69bcf78e]{background-color:#1786f8!important;border-color:#1786f8!important}[data-theme="theme-blue"] uni-radio .uni-radio-input-checked[data-v-69bcf78e]{background-color:#1786f8!important;border-color:#1786f8!important}[data-theme="theme-blue"] uni-slider .uni-slider-track[data-v-69bcf78e]{background-color:#1786f8!important}[data-theme="theme-blue"] .uni-tag--primary[data-v-69bcf78e]{color:#fff!important;background-color:#1786f8!important;border-color:#1786f8!important}[data-theme="theme-blue"] .uni-tag--primary.uni-tag--inverted[data-v-69bcf78e]{color:#1786f8!important;background-color:#fff!important;border-color:#1786f8!important}[data-theme="theme-blue"] .goods-coupon-popup-layer .coupon-body .item[data-v-69bcf78e]{background-color:#f6faff!important}[data-theme="theme-blue"] .goods-coupon-popup-layer .coupon-body .item uni-view[data-v-69bcf78e]{color:#49a0f9!important}[data-theme="theme-blue"] .sku-layer .body-item .sku-list-wrap .items[data-v-69bcf78e]{background-color:#f5f5f5!important}[data-theme="theme-blue"] .sku-layer .body-item .sku-list-wrap .items.selected[data-v-69bcf78e]{background-color:#f6faff!important;color:#1786f8!important;border-color:#1786f8!important}[data-theme="theme-blue"] .sku-layer .body-item .sku-list-wrap .items.disabled[data-v-69bcf78e]{color:#898989!important;cursor:not-allowed!important;pointer-events:none!important;opacity:.5!important;box-shadow:none!important;-webkit-filter:grayscale(100%);filter:grayscale(100%)}[data-theme="theme-blue"] .goods-detail .goods-discount[data-v-69bcf78e]{background:rgba(255,69,68,.4)}[data-theme="theme-blue"] .goods-detail .goods-discount .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#1786f8,#49a0f9)!important;background:linear-gradient(90deg,#1786f8,#49a0f9)!important}[data-theme="theme-blue"] .goods-detail .seckill-wrap[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#1786f8,#7abafb)!important;background:linear-gradient(90deg,#1786f8,#7abafb)!important}[data-theme="theme-blue"] .goods-detail .goods-module-wrap .original-price .seckill-save-price[data-v-69bcf78e]{background:#ddedfe!important;color:#1786f8!important}[data-theme="theme-blue"] .goods-detail .goods-pintuan[data-v-69bcf78e]{background:rgba(255,69,68,.4)}[data-theme="theme-blue"] .goods-detail .goods-pintuan .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#1786f8,#49a0f9)!important;background:linear-gradient(90deg,#1786f8,#49a0f9)!important}[data-theme="theme-blue"] .goods-detail .goods-presale[data-v-69bcf78e]{background:rgba(255,69,68,.4)}[data-theme="theme-blue"] .goods-detail .goods-presale .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#1786f8,#49a0f9)!important;background:linear-gradient(90deg,#1786f8,#49a0f9)!important}[data-theme="theme-blue"] .goods-detail .topic-wrap .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#1786f8,#ff7877)!important;background:linear-gradient(90deg,#1786f8,#ff7877)!important}[data-theme="theme-blue"] .goods-detail .goods-module-wrap .original-price .topic-save-price[data-v-69bcf78e]{background:#ddedfe!important;color:#1786f8!important}[data-theme="theme-blue"] .goods-detail .goods-groupbuy[data-v-69bcf78e]{background:-webkit-linear-gradient(top,#fef391,#fbe253);background:linear-gradient(180deg,#fef391,#fbe253)}[data-theme="theme-blue"] .goods-detail .goods-groupbuy .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#1786f8,#49a0f9)!important;background:linear-gradient(90deg,#1786f8,#49a0f9)!important}[data-theme="theme-blue"] .gradual-change[data-v-69bcf78e]{background:-webkit-linear-gradient(45deg,#1786f8,rgba(23,134,248,.6))!important;background:linear-gradient(45deg,#1786f8,rgba(23,134,248,.6))!important}[data-theme="theme-blue"] .ns-btn-default-all[data-v-69bcf78e]{width:100%;height:%?70?%;background:#1786f8;border-radius:%?70?%;text-align:center;line-height:%?70?%;color:#fff;font-size:%?28?%}[data-theme="theme-blue"] .ns-btn-default-all.gray[data-v-69bcf78e]{background:#e5e5e5;color:#898989}[data-theme="theme-blue"] .ns-btn-default-all.free[data-v-69bcf78e]{width:100%;background:#fff;color:#1786f8;border:%?1?% solid #1786f8;font-size:%?28?%;box-sizing:border-box}[data-theme="theme-blue"] .ns-btn-default-all.free.gray[data-v-69bcf78e]{background:#fff;color:#898989;border:%?1?% solid #e7e7e7}[data-theme="theme-blue"] .ns-btn-default-mine[data-v-69bcf78e]{display:inline-block;height:%?60?%;border-radius:%?60?%;line-height:%?60?%;padding:0 %?30?%;box-sizing:border-box;color:#fff;background:#1786f8}[data-theme="theme-blue"] .ns-btn-default-mine.gray[data-v-69bcf78e]{background:#e5e5e5;color:#898989}[data-theme="theme-blue"] .ns-btn-default-mine.free[data-v-69bcf78e]{background:#fff;color:#1786f8;border:%?1?% solid #1786f8;font-size:%?28?%;box-sizing:border-box}[data-theme="theme-blue"] .ns-btn-default-mine.free.gray[data-v-69bcf78e]{background:#fff;color:#898989;border:%?1?% solid #e7e7e7}[data-theme="theme-blue"] .order-box-btn[data-v-69bcf78e]{display:inline-block;line-height:%?56?%;padding:0 %?30?%;font-size:%?28?%;color:#333;border:%?1?% solid #999;box-sizing:border-box;border-radius:%?60?%;margin-left:%?20?%}[data-theme="theme-blue"] .order-box-btn.order-pay[data-v-69bcf78e]{background:#1786f8;color:#fff;border-color:#fff}[data-theme="theme-blue"] .ns-text-before[data-v-69bcf78e]::after, [data-theme="theme-blue"] .ns-text-before[data-v-69bcf78e]::before{color:#1786f8!important}[data-theme="theme-blue"] .ns-bg-before[data-v-69bcf78e]::after{background:#1786f8!important}[data-theme="theme-blue"] .ns-bg-before[data-v-69bcf78e]::before{background:#1786f8!important}[data-theme="theme-green"] .ns-text-color[data-v-69bcf78e]{color:#31bb6d!important}[data-theme="theme-green"] .ns-border-color[data-v-69bcf78e]{border-color:#31bb6d!important}[data-theme="theme-green"] .ns-border-color-top[data-v-69bcf78e]{border-top-color:#31bb6d!important}[data-theme="theme-green"] .ns-border-color-bottom[data-v-69bcf78e]{border-bottom-color:#31bb6d!important}[data-theme="theme-green"] .ns-border-color-right[data-v-69bcf78e]{border-right-color:#31bb6d!important}[data-theme="theme-green"] .ns-border-color-left[data-v-69bcf78e]{border-left-color:#31bb6d!important}[data-theme="theme-green"] .ns-bg-color[data-v-69bcf78e]{background-color:#31bb6d!important}[data-theme="theme-green"] .ns-bg-help-color[data-v-69bcf78e]{background-color:#393a39!important}[data-theme="theme-green"] uni-button[data-v-69bcf78e]{margin:0 %?60?%;font-size:%?28?%;border-radius:20px;line-height:2.7}[data-theme="theme-green"] uni-button[type="primary"][data-v-69bcf78e]{background-color:#31bb6d!important}[data-theme="theme-green"] uni-button[type="primary"][plain][data-v-69bcf78e]{background-color:initial!important;color:#31bb6d!important;border-color:#31bb6d!important}[data-theme="theme-green"] uni-button[type="primary"][disabled][data-v-69bcf78e]{background:#e5e5e5!important;color:#898989}[data-theme="theme-green"] uni-button[type="primary"].btn-disabled[data-v-69bcf78e]{background:#e5e5e5!important;color:#898989!important}[data-theme="theme-green"] uni-button.btn-disabled[data-v-69bcf78e]{background:#e5e5e5!important;color:#898989!important}[data-theme="theme-green"] uni-button[type="warn"][data-v-69bcf78e]{background:#fff;border:%?1?% solid #31bb6d!important;color:#31bb6d}[data-theme="theme-green"] uni-button[type="warn"][plain][data-v-69bcf78e]{background-color:initial!important;color:#31bb6d!important;border-color:#31bb6d!important}[data-theme="theme-green"] uni-button[type="warn"][disabled][data-v-69bcf78e]{border:%?1?% solid #e7e7e7!important;color:#898989}[data-theme="theme-green"] uni-button[type="warn"].btn-disabled[data-v-69bcf78e]{border:%?1?% solid #e7e7e7!important;color:#898989}[data-theme="theme-green"] uni-button[size="mini"][data-v-69bcf78e]{margin:0!important}[data-theme="theme-green"] uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked[data-v-69bcf78e]{color:#31bb6d!important}[data-theme="theme-green"] uni-switch .uni-switch-input.uni-switch-input-checked[data-v-69bcf78e]{background-color:#31bb6d!important;border-color:#31bb6d!important}[data-theme="theme-green"] uni-radio .uni-radio-input-checked[data-v-69bcf78e]{background-color:#31bb6d!important;border-color:#31bb6d!important}[data-theme="theme-green"] uni-slider .uni-slider-track[data-v-69bcf78e]{background-color:#31bb6d!important}[data-theme="theme-green"] .uni-tag--primary[data-v-69bcf78e]{color:#fff!important;background-color:#31bb6d!important;border-color:#31bb6d!important}[data-theme="theme-green"] .uni-tag--primary.uni-tag--inverted[data-v-69bcf78e]{color:#31bb6d!important;background-color:#fff!important;border-color:#31bb6d!important}[data-theme="theme-green"] .goods-coupon-popup-layer .coupon-body .item[data-v-69bcf78e]{background-color:#dcf6e7!important}[data-theme="theme-green"] .goods-coupon-popup-layer .coupon-body .item uni-view[data-v-69bcf78e]{color:#4ed187!important}[data-theme="theme-green"] .sku-layer .body-item .sku-list-wrap .items[data-v-69bcf78e]{background-color:#f5f5f5!important}[data-theme="theme-green"] .sku-layer .body-item .sku-list-wrap .items.selected[data-v-69bcf78e]{background-color:#dcf6e7!important;color:#31bb6d!important;border-color:#31bb6d!important}[data-theme="theme-green"] .sku-layer .body-item .sku-list-wrap .items.disabled[data-v-69bcf78e]{color:#898989!important;cursor:not-allowed!important;pointer-events:none!important;opacity:.5!important;box-shadow:none!important;-webkit-filter:grayscale(100%);filter:grayscale(100%)}[data-theme="theme-green"] .goods-detail .goods-discount[data-v-69bcf78e]{background:rgba(49,187,109,.4)}[data-theme="theme-green"] .goods-detail .goods-discount .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#31bb6d,#4ed187)!important;background:linear-gradient(90deg,#31bb6d,#4ed187)!important}[data-theme="theme-green"] .goods-detail .seckill-wrap[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#31bb6d,#77dba2)!important;background:linear-gradient(90deg,#31bb6d,#77dba2)!important}[data-theme="theme-green"] .goods-detail .goods-module-wrap .original-price .seckill-save-price[data-v-69bcf78e]{background:#c8f0d9!important;color:#31bb6d!important}[data-theme="theme-green"] .goods-detail .goods-pintuan[data-v-69bcf78e]{background:rgba(49,187,109,.4)}[data-theme="theme-green"] .goods-detail .goods-pintuan .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#31bb6d,#4ed187)!important;background:linear-gradient(90deg,#31bb6d,#4ed187)!important}[data-theme="theme-green"] .goods-detail .goods-presale[data-v-69bcf78e]{background:rgba(49,187,109,.4)}[data-theme="theme-green"] .goods-detail .goods-presale .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#31bb6d,#4ed187)!important;background:linear-gradient(90deg,#31bb6d,#4ed187)!important}[data-theme="theme-green"] .goods-detail .topic-wrap .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#31bb6d,#ff7877)!important;background:linear-gradient(90deg,#31bb6d,#ff7877)!important}[data-theme="theme-green"] .goods-detail .goods-module-wrap .original-price .topic-save-price[data-v-69bcf78e]{background:#c8f0d9!important;color:#31bb6d!important}[data-theme="theme-green"] .coupon-body .item-btn[data-v-69bcf78e]{background:rgba(49,187,109,.8)}[data-theme="theme-green"] .coupon-info .coupon-content_item[data-v-69bcf78e]::before{border:1px solid #31bb6d;border-right:none}[data-theme="theme-green"] .coupon-content_item[data-v-69bcf78e]::after{border:1px solid #31bb6d;border-left:none}[data-theme="theme-green"] .goods-detail .goods-groupbuy[data-v-69bcf78e]{background:rgba(49,187,109,.4)}[data-theme="theme-green"] .goods-detail .goods-groupbuy .price-info[data-v-69bcf78e]{background:-webkit-linear-gradient(left,#31bb6d,#4ed187)!important;background:linear-gradient(90deg,#31bb6d,#4ed187)!important}[data-theme="theme-green"] .gradual-change[data-v-69bcf78e]{background:-webkit-linear-gradient(45deg,#31bb6d,rgba(49,187,109,.6))!important;background:linear-gradient(45deg,#31bb6d,rgba(49,187,109,.6))!important}[data-theme="theme-green"] .ns-btn-default-all[data-v-69bcf78e]{width:100%;height:%?70?%;background:#31bb6d;border-radius:%?70?%;text-align:center;line-height:%?70?%;color:#fff;font-size:%?28?%}[data-theme="theme-green"] .ns-btn-default-all.gray[data-v-69bcf78e]{background:#e5e5e5;color:#898989}[data-theme="theme-green"] .ns-btn-default-all.free[data-v-69bcf78e]{width:100%;background:#fff;color:#31bb6d;border:%?1?% solid #31bb6d;font-size:%?28?%;box-sizing:border-box}[data-theme="theme-green"] .ns-btn-default-all.free.gray[data-v-69bcf78e]{background:#fff;color:#898989;border:%?1?% solid #e7e7e7}[data-theme="theme-green"] .ns-btn-default-mine[data-v-69bcf78e]{display:inline-block;height:%?60?%;border-radius:%?60?%;line-height:%?60?%;padding:0 %?30?%;box-sizing:border-box;color:#fff;background:#31bb6d}[data-theme="theme-green"] .ns-btn-default-mine.gray[data-v-69bcf78e]{background:#e5e5e5;color:#898989}[data-theme="theme-green"] .ns-btn-default-mine.free[data-v-69bcf78e]{background:#fff;color:#31bb6d;border:%?1?% solid #31bb6d;font-size:%?28?%;box-sizing:border-box}[data-theme="theme-green"] .ns-btn-default-mine.free.gray[data-v-69bcf78e]{background:#fff;color:#898989;border:%?1?% solid #e7e7e7}[data-theme="theme-green"] .order-box-btn[data-v-69bcf78e]{display:inline-block;line-height:%?56?%;padding:0 %?30?%;font-size:%?28?%;color:#333;border:%?1?% solid #999;box-sizing:border-box;border-radius:%?60?%;margin-left:%?20?%}[data-theme="theme-green"] .order-box-btn.order-pay[data-v-69bcf78e]{background:#31bb6d;color:#fff;border-color:#fff}[data-theme="theme-green"] .ns-text-before[data-v-69bcf78e]::after, [data-theme="theme-green"] .ns-text-before[data-v-69bcf78e]::before{color:#31bb6d!important}[data-theme="theme-green"] .ns-bg-before[data-v-69bcf78e]::after{background:#31bb6d!important}[data-theme="theme-green"] .ns-bg-before[data-v-69bcf78e]::before{background:#31bb6d!important}.ns-gradient-base-help-left[data-theme="theme-default"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#ff4544,#ffb644);background:linear-gradient(270deg,#ff4544,#ffb644)}.ns-gradient-base-help-left[data-theme="theme-green"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#31bb6d,#393a39);background:linear-gradient(270deg,#31bb6d,#393a39)}.ns-gradient-base-help-left[data-theme="theme-blue"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#1786f8,#ff851f);background:linear-gradient(270deg,#1786f8,#ff851f)}.ns-gradient-otherpages-fenxiao-apply-apply-bg[data-theme="theme-default"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#ff4544,#faa);background:linear-gradient(270deg,#ff4544,#faa)}.ns-gradient-otherpages-fenxiao-apply-apply-bg[data-theme="theme-green"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#31bb6d,#77dba2);background:linear-gradient(270deg,#31bb6d,#77dba2)}.ns-gradient-otherpages-fenxiao-apply-apply-bg[data-theme="theme-blue"][data-v-69bcf78e]{background:-webkit-linear-gradient(left,#61adfa,#1786f8);background:linear-gradient(90deg,#61adfa,#1786f8)}.ns-gradient-otherpages-member-widthdrawal-withdrawal[data-theme="theme-default"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#ff4544,#faa);background:linear-gradient(270deg,#ff4544,#faa)}.ns-gradient-otherpages-member-widthdrawal-withdrawal[data-theme="theme-green"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#31bb6d,#77dba2);background:linear-gradient(270deg,#31bb6d,#77dba2)}.ns-gradient-otherpages-member-widthdrawal-withdrawal[data-theme="theme-blue"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#1786f8,#7abafb);background:linear-gradient(270deg,#1786f8,#7abafb)}.ns-gradient-otherpages-member-balance-balance-rechange[data-theme="theme-default"][data-v-69bcf78e]{background:-webkit-linear-gradient(top,#ff4544,#fd7e4b);background:linear-gradient(180deg,#ff4544,#fd7e4b)}.ns-gradient-otherpages-member-balance-balance-rechange[data-theme="theme-green"][data-v-69bcf78e]{background:-webkit-linear-gradient(top,#31bb6d,#fd7e4b);background:linear-gradient(180deg,#31bb6d,#fd7e4b)}.ns-gradient-otherpages-member-balance-balance-rechange[data-theme="theme-blue"][data-v-69bcf78e]{background:-webkit-linear-gradient(top,#1786f8,#fd7e4b);background:linear-gradient(180deg,#1786f8,#fd7e4b)}.ns-gradient-pages-member-index-index[data-theme="theme-default"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#ff7877,#ff403f)!important;background:linear-gradient(270deg,#ff7877,#ff403f)!important}.ns-gradient-pages-member-index-index[data-theme="theme-green"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#4ed187,#30b76b)!important;background:linear-gradient(270deg,#4ed187,#30b76b)!important}.ns-gradient-pages-member-index-index[data-theme="theme-blue"][data-v-69bcf78e]{background:-webkit-linear-gradient(right,#49a0f9,#1283f8)!important;background:linear-gradient(270deg,#49a0f9,#1283f8)!important}.ns-gradient-promotionpages-pintuan-share-share[data-theme="theme-default"][data-v-69bcf78e]{background-image:-webkit-linear-gradient(left,#ffa2a2,#ff4544);background-image:linear-gradient(90deg,#ffa2a2,#ff4544)}.ns-gradient-promotionpages-pintuan-share-share[data-theme="theme-green"][data-v-69bcf78e]{background-image:-webkit-linear-gradient(left,#98ddb6,#31bb6d);background-image:linear-gradient(90deg,#98ddb6,#31bb6d)}.ns-gradient-promotionpages-pintuan-share-share[data-theme="theme-blue"][data-v-69bcf78e]{background-image:-webkit-linear-gradient(left,#8bc3fc,#1786f8);background-image:linear-gradient(90deg,#8bc3fc,#1786f8)}.ns-gradient-promotionpages-topics-payment[data-theme="theme-default"][data-v-69bcf78e]{background:-webkit-linear-gradient(left,#ffa2a2,#ff4544)!important;background:linear-gradient(90deg,#ffa2a2,#ff4544)!important}.ns-gradient-promotionpages-topics-payment[data-theme="theme-green"][data-v-69bcf78e]{background:-webkit-linear-gradient(left,#98ddb6,#31bb6d)!important;background:linear-gradient(90deg,#98ddb6,#31bb6d)!important}.ns-gradient-promotionpages-topics-payment[data-theme="theme-blue"][data-v-69bcf78e]{background:-webkit-linear-gradient(left,#8bc3fc,#1786f8)!important;background:linear-gradient(90deg,#8bc3fc,#1786f8)!important}.ns-gradient-promotionpages-pintuan-payment[data-theme="theme-default"][data-v-69bcf78e]{background:rgba(255,69,68,.08)!important}.ns-gradient-promotionpages-pintuan-payment[data-theme="theme-green"][data-v-69bcf78e]{background:rgba(49,187,109,.08)!important}.ns-gradient-promotionpages-pintuan-payment[data-theme="theme-blue"][data-v-69bcf78e]{background:rgba(23,134,248,.08)!important}.ns-gradient-diy-goods-list[data-theme="theme-default"][data-v-69bcf78e]{border-color:rgba(255,69,68,.2)!important}.ns-gradient-diy-goods-list[data-theme="theme-green"][data-v-69bcf78e]{border-color:rgba(49,187,109,.2)!important}.ns-gradient-diy-goods-list[data-theme="theme-blue"][data-v-69bcf78e]{border-color:rgba(23,134,248,.2)!important}.ns-gradient-detail-coupons-right-border[data-theme="theme-default"][data-v-69bcf78e]{border-right-color:rgba(255,69,68,.2)!important}.ns-gradient-detail-coupons-right-border[data-theme="theme-green"][data-v-69bcf78e]{border-right-color:rgba(49,187,109,.2)!important}.ns-gradient-detail-coupons-right-border[data-theme="theme-blue"][data-v-69bcf78e]{border-right-color:rgba(23,134,248,.2)!important}.ns-gradient-detail-coupons[data-theme="theme-default"][data-v-69bcf78e]{background-color:rgba(255,69,68,.8)!important}.ns-gradient-detail-coupons[data-theme="theme-green"][data-v-69bcf78e]{background-color:rgba(49,187,109,.8)!important}.ns-gradient-detail-coupons[data-theme="theme-blue"][data-v-69bcf78e]{background-color:rgba(23,134,248,.8)!important}.ns-pages-goods-category-category[data-theme="theme-default"][data-v-69bcf78e]{background-image:-webkit-linear-gradient(315deg,#ff4544,#ff7444)!important;background-image:linear-gradient(135deg,#ff4544,#ff7444)!important}.ns-pages-goods-category-category[data-theme="theme-green"][data-v-69bcf78e]{background-image:-webkit-linear-gradient(315deg,#31bb6d,#ff7444)!important;background-image:linear-gradient(135deg,#31bb6d,#ff7444)!important}.ns-pages-goods-category-category[data-theme="theme-blue"][data-v-69bcf78e]{background-image:-webkit-linear-gradient(315deg,#1786f8,#ff7444)!important;background-image:linear-gradient(135deg,#1786f8,#ff7444)!important}.ns-gradient-pintuan-border-color[data-theme="theme-default"][data-v-69bcf78e]{border-color:rgba(255,69,68,.2)!important}.ns-gradient-pintuan-border-color[data-theme="theme-green"][data-v-69bcf78e]{border-color:rgba(49,187,109,.2)!important}.ns-gradient-pintuan-border-color[data-theme="theme-blue"][data-v-69bcf78e]{border-color:rgba(23,134,248,.2)!important}\n.coupon-list[data-v-69bcf78e]{width:100%;height:100%;padding:%?20?%;box-sizing:border-box;background:#f5f5f5}.coupon-list .coupon-li[data-v-69bcf78e]{width:%?702?%;height:%?206?%;margin:0 auto;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:%?20?%;position:relative}.coupon-list .coupon-li uni-image[data-v-69bcf78e]{width:100%;height:100%;position:absolute;left:0;top:0}.coupon-list .coupon-li .li-top[data-v-69bcf78e]{width:%?652?%;margin:0 auto;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:end;-webkit-align-items:flex-end;align-items:flex-end;border-bottom:1px dashed #e1e1e1;position:relative;margin-top:%?39?%;line-height:1;padding:0 %?10?%;box-sizing:border-box;padding-bottom:%?26?%}.coupon-list .coupon-li .li-top .top-content-left[data-v-69bcf78e]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;line-height:1;-webkit-box-flex:1;-webkit-flex:1;flex:1;overflow:hidden}.coupon-list .coupon-li .li-top .top-content-left .coupon-name[data-v-69bcf78e]{width:100%;line-height:1;color:#000;font-size:%?28?%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.coupon-list .coupon-li .li-top .top-content-left .coupon-desc[data-v-69bcf78e]{line-height:1;color:#ababab;font-size:%?20?%;margin-top:%?23?%}.coupon-list .coupon-li .li-top .top-content-right[data-v-69bcf78e]{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center;line-height:1}.coupon-list .coupon-li .li-top .top-content-right .font-sm[data-v-69bcf78e]{line-height:1;margin-top:%?20?%;font-size:%?28?%;margin-right:%?6?%}.coupon-list .coupon-li .li-top .top-content-right .font-big[data-v-69bcf78e]{line-height:1;font-size:%?70?%}.coupon-list .coupon-li .li-bottom[data-v-69bcf78e]{-webkit-box-flex:1;-webkit-flex:1;flex:1;width:%?652?%;margin:0 auto;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;align-items:center;z-index:5;padding:0 %?10?%;box-sizing:border-box}.coupon-list .coupon-li .li-bottom .fonts-sm[data-v-69bcf78e]{color:#ababab;font-size:%?22?%}.coupon-list .coupon-li .li-bottom .li-bottom-right[data-v-69bcf78e]{display:-webkit-box;display:-webkit-flex;display:flex}.coupon-list .coupon-li .li-bottom .li-bottom-right .getCoupon[data-v-69bcf78e]{font-size:%?24?%}.coupon-list .coupon-li .li-bottom .li-bottom-right .iconright[data-v-69bcf78e]{margin-left:%?10?%;font-size:%?24?%}.empty[data-v-69bcf78e]{margin-top:%?200?%}body.?%PAGE?%[data-v-69bcf78e]{background-color:#f7f7f7}',""]),e.exports=t},c650:function(e,t,a){"use strict";var o=a("04ff"),r=a.n(o);r.a},cc88:function(e,t,a){"use strict";a.r(t);var o=a("f4fb"),r=a("2c15");for(var n in r)"default"!==n&&function(e){a.d(t,e,(function(){return r[e]}))}(n);a("c650");var i,d=a("f0c5"),b=Object(d["a"])(r["default"],o["b"],o["c"],!1,null,"69bcf78e",null,!1,o["a"],i);t["default"]=b.exports},f4fb:function(e,t,a){"use strict";var o={nsEmpty:a("211f").default,loadingCover:a("cd2f").default,nsShowToast:a("f505").default},r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("v-uni-view",{attrs:{"data-theme":e.themeStyle}},[a("mescroll-uni",{ref:"mescroll",on:{getData:function(t){arguments[0]=t=e.$handleEvent(t),e.getMemberCounponList.apply(void 0,arguments)}}},[a("template",{attrs:{slot:"list"},slot:"list"},[a("v-uni-view",{staticClass:"coupon-list"},e._l(e.list,(function(t,o){return a("v-uni-view",{key:o,staticClass:"coupon-li",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.liClick(t,o)}}},[a("v-uni-image",{attrs:{src:e.$util.img("upload/uniapp/coupon/coupon_ysy.png"),mode:"widthFix"}}),a("v-uni-view",{staticClass:"li-top"},[a("v-uni-view",{staticClass:"top-content-left"},[a("v-uni-view",{staticClass:"coupon-name"},[e._v(e._s(t.coupon_name))]),a("v-uni-view",{staticClass:"coupon-desc"},[t.validity_type?a("v-uni-text",[e._v("领取之日起"+e._s(t.fixed_term)+"日内有效")]):a("v-uni-text",[e._v("有效日期至"+e._s(e.$util.timeStampTurnTime(t.end_time)))])],1)],1),"reward"==t.type?a("v-uni-view",{staticClass:"top-content-right"},[a("v-uni-text",{staticClass:"font-big ns-text-color"},[e._v(e._s(parseInt(t.money)))]),a("v-uni-text",{staticClass:"font-sm ns-text-color"},[e._v("元")])],1):e._e(),"discount"==t.type?a("v-uni-view",{staticClass:"top-content-right"},[a("v-uni-text",{staticClass:"font-big ns-text-color"},[e._v(e._s(parseFloat(t.discount)))]),a("v-uni-text",{staticClass:"font-sm ns-text-color"},[e._v("折")])],1):e._e()],1),a("v-uni-view",{staticClass:"li-bottom"},[a("v-uni-view",{staticClass:"fonts-sm"},[t.at_least>0?a("v-uni-text",[e._v("满"+e._s(t.at_least)+"元可用")]):a("v-uni-text",[e._v("无门槛优惠券")]),"0.00"!=t.discount_limit?a("v-uni-text",{staticClass:"ns-text-color"},[e._v("(最大优惠"+e._s(t.discount_limit)+"元)")]):e._e()],1),a("v-uni-view",{staticClass:"li-bottom-right"},[0==t.useState?a("v-uni-view",{staticClass:"getCoupon ns-text-color",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.receiveCoupon(t,o)}}},[e._v("立即领取")]):e._e(),1==t.useState?a("v-uni-view",{staticClass:"getCoupon ns-text-color",on:{click:function(a){arguments[0]=a=e.$handleEvent(a),e.toGoodsList(t,o)}}},[e._v("去使用")]):e._e(),2!=t.useState?a("v-uni-view",{staticClass:"iconfont iconright ns-text-color"}):e._e(),2==t.useState?a("v-uni-view",{staticClass:"getCoupon ns-text-color-gary"},[e._v("去使用")]):e._e(),2==t.useState?a("v-uni-view",{staticClass:"iconfont iconright ns-text-color-gary"}):e._e()],1)],1)],1)})),1),0==e.list.length?a("v-uni-view",[a("ns-empty",{attrs:{text:"当前没有可以领取的优惠券哦!",isIndex:!1}})],1):e._e()],1)],2),a("loading-cover",{ref:"loadingCover"}),a("ns-show-toast")],1)},n=[];a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return o}))}}]); | 41,899 | 41,899 | 0.763145 |
735bb7b3e5e0f31c9d493e77c02a38b9518d5268 | 1,231 | js | JavaScript | src/Scenes/EndScene.js | RyelBanfield/phaser-platform-game | 474539d4dd6a0dabfebe5ae13f359f904670c779 | [
"MIT"
] | null | null | null | src/Scenes/EndScene.js | RyelBanfield/phaser-platform-game | 474539d4dd6a0dabfebe5ae13f359f904670c779 | [
"MIT"
] | null | null | null | src/Scenes/EndScene.js | RyelBanfield/phaser-platform-game | 474539d4dd6a0dabfebe5ae13f359f904670c779 | [
"MIT"
] | 1 | 2022-03-28T02:45:39.000Z | 2022-03-28T02:45:39.000Z | import Phaser from 'phaser';
import gameConfig from '../Config/config';
// eslint-disable-next-line import/no-cycle
import { score } from './GameScene';
export default class endScene extends Phaser.Scene {
constructor() {
super('End');
}
create() {
const postScore = (score) => {
const url = 'https://us-central1-js-capstone-backend.cloudfunctions.net/api/games/7igtBCocAtE2Il7lPcAc/scores';
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(score),
}).then((response) => response.json())
.catch((error) => {
throw new Error('Error:', error);
});
};
postScore(score);
this.add.text(gameConfig.width / 2, gameConfig.height / 2, `${gameConfig.user}`, { fontSize: '42px', fill: '#fff' });
this.add.text(gameConfig.width / 2, gameConfig.height / 2 + 40, `SCORE: ${score.score}`, { fontSize: '42px', fill: '#fff' });
const resetButton = this.add.text(gameConfig.width / 2, gameConfig.height / 2 + 100, 'Restart', { fontSize: '42px', fill: '#0f0' });
resetButton.setInteractive();
resetButton.on('pointerdown', () => { window.location.reload(); });
}
} | 35.171429 | 136 | 0.609261 |
735ce9b1e5afe18877f9312466334860db1e1ed8 | 18,113 | js | JavaScript | install/src/PQ Dashboard/Scripts/TSX/openSEE.js | StephenCWills/PQDashboard | bccd7657d85a2147ed5e876d3069bc72b71370e6 | [
"BSD-3-Clause"
] | null | null | null | install/src/PQ Dashboard/Scripts/TSX/openSEE.js | StephenCWills/PQDashboard | bccd7657d85a2147ed5e876d3069bc72b71370e6 | [
"BSD-3-Clause"
] | null | null | null | install/src/PQ Dashboard/Scripts/TSX/openSEE.js | StephenCWills/PQDashboard | bccd7657d85a2147ed5e876d3069bc72b71370e6 | [
"BSD-3-Clause"
] | null | null | null | "use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var ReactDOM = require("react-dom");
var OpenSEE_1 = require("./../TS/Services/OpenSEE");
var createBrowserHistory_1 = require("history/createBrowserHistory");
var queryString = require("query-string");
var _ = require("lodash");
var WaveformViewerGraph_1 = require("./WaveformViewerGraph");
var PolarChart_1 = require("./PolarChart");
var AccumulatedPoints_1 = require("./AccumulatedPoints");
var Tooltip_1 = require("./Tooltip");
var OpenSEE = (function (_super) {
__extends(OpenSEE, _super);
function OpenSEE(props) {
var _this = _super.call(this, props) || this;
_this.openSEEService = new OpenSEE_1.default();
_this.history = createBrowserHistory_1.default();
var query = queryString.parse(_this.history['location'].search);
_this.resizeId;
_this.state = {
eventid: (query['eventid'] != undefined ? query['eventid'] : 0),
StartDate: query['StartDate'],
EndDate: query['EndDate'],
displayVolt: true,
displayCur: true,
faultcurves: query['faultcurves'] == '1' || query['faultcurves'] == 'true',
breakerdigitals: query['breakerdigitals'] == '1' || query['breakerdigitals'] == 'true',
Width: window.innerWidth,
Hover: 0,
PointsTable: [],
TableData: {},
backButtons: [],
forwardButtons: [],
PostedData: {}
};
_this.TableData = {};
_this.history['listen'](function (location, action) {
var query = queryString.parse(_this.history['location'].search);
_this.setState({
eventid: (query['eventid'] != undefined ? query['eventid'] : 0),
StartDate: query['StartDate'],
EndDate: query['EndDate'],
faultcurves: query['faultcurves'] == '1' || query['faultcurves'] == 'true',
breakerdigitals: query['breakerdigitals'] == '1' || query['breakerdigitals'] == 'true',
});
});
return _this;
}
OpenSEE.prototype.componentDidMount = function () {
var _this = this;
window.addEventListener("resize", this.handleScreenSizeChange.bind(this));
this.openSEEService.getHeaderData(this.state).done(function (data) {
_this.showData(data);
var back = [];
back.push(_this.nextBackButton(data.nextBackLookup.GetPreviousAndNextEventIdsForSystem.m_Item1, "system-back", "&navigation=system", "<"));
back.push(_this.nextBackButton(data.nextBackLookup.GetPreviousAndNextEventIdsForMeterLocation.m_Item1, "station-back", "&navigation=station", "<"));
back.push(_this.nextBackButton(data.nextBackLookup.GetPreviousAndNextEventIdsForMeter.m_Item1, "meter-back", "&navigation=meter", "<"));
back.push(_this.nextBackButton(data.nextBackLookup.GetPreviousAndNextEventIdsForLine.m_Item1, "line-back", "&navigation=line", "<"));
var forward = [];
forward.push(_this.nextBackButton(data.nextBackLookup.GetPreviousAndNextEventIdsForSystem.m_Item2, "system-next", "&navigation=system", ">"));
forward.push(_this.nextBackButton(data.nextBackLookup.GetPreviousAndNextEventIdsForMeterLocation.m_Item2, "station-next", "&navigation=station", ">"));
forward.push(_this.nextBackButton(data.nextBackLookup.GetPreviousAndNextEventIdsForMeter.m_Item2, "meter-next", "&navigation=meter", ">"));
forward.push(_this.nextBackButton(data.nextBackLookup.GetPreviousAndNextEventIdsForLine.m_Item2, "line-next", "&navigation=line", ">"));
_this.setState({
PostedData: data,
backButtons: back,
forwardButtons: forward
}, function () {
_this.nextBackSelect($('#next-back-selection option:selected').val());
$('#next-back-selection').change(function () {
_this.nextBackSelect($('#next-back-selection option:selected').val());
});
});
});
};
OpenSEE.prototype.componentWillUnmount = function () {
$(window).off('resize');
};
OpenSEE.prototype.handleScreenSizeChange = function () {
var _this = this;
clearTimeout(this.resizeId);
this.resizeId = setTimeout(function () {
_this.setState({
Width: window.innerWidth,
Height: _this.calculateHeights(_this.state)
});
}, 500);
};
OpenSEE.prototype.render = function () {
var _this = this;
var height = this.calculateHeights(this.state);
return (React.createElement("div", null,
React.createElement("div", { id: "pageHeader", style: { width: '100%' } },
React.createElement("table", { style: { width: '100%' } },
React.createElement("tbody", null,
React.createElement("tr", null,
React.createElement("td", { style: { textAlign: 'left', width: '10%' } },
React.createElement("img", { src: '../Images/GPA-Logo---30-pix(on-white).png' })),
React.createElement("td", { style: { textAlign: 'center', width: '80%' } },
React.createElement("img", { src: '../Images/openSEET.png' })),
React.createElement("td", { style: { textAlign: 'right', verticalAlign: 'top', whiteSpace: 'nowrap', width: '10%' } },
React.createElement("img", { alt: "", src: "../Images/GPA-Logo.png", style: { display: 'none' } }))),
React.createElement("tr", null,
React.createElement("td", { colSpan: 3, style: { textAlign: 'center' } },
React.createElement("div", null,
React.createElement("span", { id: "TitleData" }),
"\u00A0\u00A0\u00A0",
React.createElement("a", { type: "button", target: "_blank", id: "editButton" }, "edit"))))))),
React.createElement("div", { className: "DockWaveformHeader" },
React.createElement("table", { style: { width: '75%', margin: '0 auto' } },
React.createElement("tbody", null,
React.createElement("tr", null,
React.createElement("td", { style: { textAlign: 'center' } },
React.createElement("button", { className: "smallbutton", onClick: function () { return _this.resetZoom(); } }, "Reset Zoom")),
React.createElement("td", { style: { textAlign: 'center' } },
React.createElement("input", { className: "smallbutton", type: "button", value: "Show Points", onClick: function () { return _this.showhidePoints(); }, id: "showpoints" })),
React.createElement("td", { style: { textAlign: 'center' } },
this.state.backButtons,
React.createElement("select", { id: "next-back-selection", defaultValue: "system" },
React.createElement("option", { value: "system" }, "System"),
React.createElement("option", { value: "station" }, "Station"),
React.createElement("option", { value: "meter" }, "Meter"),
React.createElement("option", { value: "line" }, "Line")),
this.state.forwardButtons),
React.createElement("td", { style: { textAlign: 'center' } },
React.createElement("input", { className: "smallbutton", type: "button", value: "Show Tooltip", onClick: function () { return _this.showhideTooltip(); }, id: "showtooltip" })),
React.createElement("td", { style: { textAlign: 'center' } },
React.createElement("input", { className: "smallbutton", type: "button", value: "Show Phasor", onClick: function () { return _this.showhidePhasor(); }, id: "showphasor" })),
React.createElement("td", { style: { textAlign: 'center', display: 'none' } },
React.createElement("input", { className: "smallbutton", type: "button", value: "Export Data", onClick: function () { }, id: "exportdata" })))))),
React.createElement("div", { className: "panel-body collapse in", style: { padding: '0' } },
React.createElement(PolarChart_1.default, { data: this.state.TableData, callback: this.stateSetter.bind(this) }),
React.createElement(AccumulatedPoints_1.default, { pointsTable: this.state.PointsTable, callback: this.stateSetter.bind(this), postedData: this.state.PostedData }),
React.createElement(Tooltip_1.default, { data: this.state.TableData, hover: this.state.Hover }),
React.createElement(WaveformViewerGraph_1.default, { eventId: this.state.eventid, startDate: this.state.StartDate, endDate: this.state.EndDate, type: "Voltage", pixels: this.state.Width, stateSetter: this.stateSetter.bind(this), height: height, hover: this.state.Hover, tableData: this.TableData, pointsTable: this.state.PointsTable, tableSetter: this.tableUpdater.bind(this), display: this.state.displayVolt, postedData: this.state.PostedData }),
React.createElement(WaveformViewerGraph_1.default, { eventId: this.state.eventid, startDate: this.state.StartDate, endDate: this.state.EndDate, type: "Current", pixels: this.state.Width, stateSetter: this.stateSetter.bind(this), height: height, hover: this.state.Hover, tableData: this.TableData, pointsTable: this.state.PointsTable, tableSetter: this.tableUpdater.bind(this), display: this.state.displayCur, postedData: this.state.PostedData }),
React.createElement(WaveformViewerGraph_1.default, { eventId: this.state.eventid, startDate: this.state.StartDate, endDate: this.state.EndDate, type: "F", pixels: this.state.Width, stateSetter: this.stateSetter.bind(this), height: height, hover: this.state.Hover, tableData: this.TableData, pointsTable: this.state.PointsTable, tableSetter: this.tableUpdater.bind(this), display: this.state.faultcurves, postedData: this.state.PostedData }),
React.createElement(WaveformViewerGraph_1.default, { eventId: this.state.eventid, startDate: this.state.StartDate, endDate: this.state.EndDate, type: "B", pixels: this.state.Width, stateSetter: this.stateSetter.bind(this), height: height, hover: this.state.Hover, tableData: this.TableData, pointsTable: this.state.PointsTable, tableSetter: this.tableUpdater.bind(this), display: this.state.breakerdigitals, postedData: this.state.PostedData }))));
};
OpenSEE.prototype.stateSetter = function (obj) {
var _this = this;
this.setState(obj, function () {
var prop = _.clone(_this.state);
delete prop.Hover;
delete prop.Width;
delete prop.TableData;
delete prop.PointsTable;
delete prop.displayCur;
delete prop.displayVolt;
delete prop.backButtons;
delete prop.forwardButtons;
delete prop.PostedData;
var qs = queryString.parse(queryString.stringify(prop, { encode: false }));
var hqs = queryString.parse(_this.history['location'].search);
if (!_.isEqual(qs, hqs))
_this.history['push'](_this.history['location'].pathname + '?' + queryString.stringify(prop, { encode: false }));
});
};
OpenSEE.prototype.tableUpdater = function (obj) {
this.TableData = _.merge(this.TableData, obj);
this.setState({ TableData: this.TableData });
};
OpenSEE.prototype.resetZoom = function () {
this.history['push'](this.history['location'].pathname + '?eventid=' + this.state.eventid + (this.state.faultcurves ? '&faultcurves=1' : '') + (this.state.breakerdigitals ? '&breakerdigitals=1' : ''));
};
OpenSEE.prototype.calculateHeights = function (obj) {
return (window.innerHeight - 100 - 30) / (Number(obj.displayVolt) + Number(obj.displayCur) + Number(obj.faultcurves) + Number(obj.breakerdigitals));
};
OpenSEE.prototype.nextBackSelect = function (nextBackType) {
$('.nextbackbutton').hide();
$('#' + nextBackType + '-back').show();
$('#' + nextBackType + '-next').show();
};
OpenSEE.prototype.showhidePoints = function () {
if ($('#showpoints').val() == "Show Points") {
$('#showpoints').val("Hide Points");
$('#accumulatedpoints').show();
}
else {
$('#showpoints').val("Show Points");
$('#accumulatedpoints').hide();
}
};
OpenSEE.prototype.showhideTooltip = function () {
if ($('#showtooltip').val() == "Show Tooltip") {
$('#showtooltip').val("Hide Tooltip");
$('#unifiedtooltip').show();
$('.legendCheckbox').show();
}
else {
$('#showtooltip').val("Show Tooltip");
$('#unifiedtooltip').hide();
$('.legendCheckbox').hide();
}
};
OpenSEE.prototype.showhidePhasor = function () {
if ($('#showphasor').val() == "Show Phasor") {
$('#showphasor').val("Hide Phasor");
$('#phasor').show();
}
else {
$('#showphasor').val("Show Phasor");
$('#phasor').hide();
}
};
OpenSEE.prototype.showData = function (data) {
if (data.postedEventName != undefined) {
var label = "";
var details = "";
var separator = " || ";
var faultLink = '<a href="#" title="Click for fault details" onClick="showdetails(this);">Fault</a>';
label += "Station: " + data.postedStationName;
label += separator + "Meter: " + data.postedMeterName;
label += separator + "Line: " + data.postedLineName;
label += "<br />";
if (data.postedEventName != "Fault")
label += "Event Type: " + data.postedEventName;
else
label += "Event Type: " + faultLink;
label += separator + "Event Time: " + data.postedEventDate;
if (data.postedStartTime != undefined)
details += "Start: " + data.postedStartTime;
if (data.postedPhase != undefined) {
if (details != "")
details += separator;
details += "Phase: " + data.postedPhase;
}
if (data.postedDurationPeriod != undefined) {
if (details != "")
details += separator;
details += "Duration: " + data.postedDurationPeriod;
}
if (data.postedMagnitude != undefined) {
if (details != "")
details += separator;
details += "Magnitude: " + data.postedMagnitude;
}
if (details != "")
label += "<br />" + details;
details = "";
if (data.postedBreakerNumber != undefined)
details += "Breaker: " + data.postedBreakerNumber;
if (data.postedBreakerPhase != undefined) {
if (details != "")
details += separator;
details += "Phase: " + data.postedBreakerPhase;
}
if (data.postedBreakerTiming != undefined) {
if (details != "")
details += separator;
details += "Timing: " + data.postedBreakerTiming;
}
if (data.postedBreakerSpeed != undefined) {
if (details != "")
details += separator;
details += "Speed: " + data.postedBreakerSpeed;
}
if (data.postedBreakerOperation != undefined) {
if (details != "")
details += separator;
details += "Operation: " + data.postedBreakerOperation;
}
if (details != "")
label += "<br />" + details;
document.getElementById('TitleData').innerHTML = label;
if (data.xdaInstance != undefined)
$('#editButton').prop('href', data.xdaInstance + "/Workbench/Event.cshtml?EventID=" + this.state.eventid);
}
};
OpenSEE.prototype.nextBackButton = function (evt, id, postedURLQueryString, text) {
if (evt != null) {
var title = evt.StartTime;
var url = "?eventid=" + evt.ID + postedURLQueryString;
return React.createElement("a", { href: url, id: id, key: id, className: 'nextbackbutton smallbutton', title: title, style: { padding: '4px 20px' } }, text);
}
else
return React.createElement("a", { href: '#', id: id, key: id, className: 'nextbackbutton smallbutton-disabled', title: 'No event', style: { padding: '4px 20px' } }, text);
};
return OpenSEE;
}(React.Component));
exports.OpenSEE = OpenSEE;
ReactDOM.render(React.createElement(OpenSEE, null), document.getElementById('DockCharts'));
//# sourceMappingURL=openSEE.js.map | 61.608844 | 464 | 0.568266 |
735dff81262a4c7379899518bd6b59924b3be5a2 | 444 | js | JavaScript | src/icons/svg-icons/Autorenew.js | JPTredway/styled-material-components | 385a87be89640cb1d6864293fb601b9760beb772 | [
"MIT"
] | 59 | 2018-02-20T21:01:37.000Z | 2019-10-13T14:53:12.000Z | src/icons/svg-icons/Autorenew.js | JPTredway/styled-material-components | 385a87be89640cb1d6864293fb601b9760beb772 | [
"MIT"
] | 150 | 2018-02-19T17:20:00.000Z | 2020-04-07T15:13:45.000Z | src/icons/svg-icons/Autorenew.js | JPTredway/styled-material-components | 385a87be89640cb1d6864293fb601b9760beb772 | [
"MIT"
] | 38 | 2017-06-01T19:37:58.000Z | 2018-02-14T21:23:34.000Z | import React from 'react';
import styled from 'styled-components';
import { Icon } from '../icons';
export const AutorenewIcon = styled(props => (
<Icon {...props}>
<path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z" key='path0' />
</Icon>
))``;
| 44.4 | 259 | 0.61036 |
735e53e046e7bf04d1f7a790aa694ce373086eb7 | 620 | js | JavaScript | resources/js/app.js | oguzhantekeli/Champs-Simulation | 4ff7199febcba8a7f1d78ce3b7c34724466c111c | [
"MIT"
] | null | null | null | resources/js/app.js | oguzhantekeli/Champs-Simulation | 4ff7199febcba8a7f1d78ce3b7c34724466c111c | [
"MIT"
] | null | null | null | resources/js/app.js | oguzhantekeli/Champs-Simulation | 4ff7199febcba8a7f1d78ce3b7c34724466c111c | [
"MIT"
] | null | null | null | import Vue from 'vue';
import { BootstrapVue } from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import store from './store'
require('./bootstrap');
//use declerations
Vue.use(BootstrapVue)
//components
// Vue.component('spinner-comp',require('./components/Spinner.vue'));
Vue.component('standing-comp',require('./components/Standings.vue').default);
Vue.component('buttons-comp',require('./components/Buttons.vue').default);
Vue.component('result-comp',require('./components/Results.vue').default);
const app = new Vue({
el:'#app',
store:store,
});
| 29.52381 | 77 | 0.729032 |
735e5e592e7926e3d6aa8e300334c4336e68775b | 1,972 | js | JavaScript | test/e2e/spec/registration_spec.js | paysharesproject/stellar-client | c5986ab1dc02329f51d4f3a7a39f83273e001b08 | [
"ISC"
] | 44 | 2015-01-06T15:57:31.000Z | 2021-11-09T19:25:14.000Z | test/e2e/spec/registration_spec.js | Payshares/payshares-client | d3cdbcd3cc844898cc339c6f7a3dc70e7abe8f44 | [
"ISC"
] | 102 | 2015-01-02T05:11:21.000Z | 2021-01-12T21:04:42.000Z | test/e2e/spec/registration_spec.js | Payshares/payshares-client | d3cdbcd3cc844898cc339c6f7a3dc70e7abe8f44 | [
"ISC"
] | 33 | 2015-01-04T00:13:10.000Z | 2022-01-15T18:21:19.000Z | // registration_spec.js
var stellarApiMock = require('../../stellar-api-mock');
describe('registration page', function() {
var ptor;
//beforeEach(function() {
// browser.get('/#/register');
// ptor = protractor.getInstance();
//
// browser.addMockModule('stellarApi', stellarApiMock.setup);
//});
//
//it('should show username and password missing error message', function() {
// element(by.buttonText('Submit')).click();
//
// expect(element(by.binding('errors.usernameErrors')).getText()).toEqual('The username field is required.');
// expect(ptor.isElementPresent(by.css('#username.input-error'))).toBeTruthy();
// expect(element(by.binding('errors.passwordErrors')).getText()).toEqual('The password field is required.');
// expect(ptor.isElementPresent(by.css('#password.input-error'))).toBeTruthy();
//});
//
//it('should show an error when a username is taken', function () {
// element(by.model('data.username')).sendKeys('existingUsername');
//
// ptor.wait(function() {
// return ptor.isElementPresent(by.css('#username-status.glyphicon-remove'));
// }, 5000);
//
// expect(ptor.isElementPresent(by.css('#username-status.glyphicon-remove'))).toBeTruthy();
// expect(element(by.binding('errors.usernameErrors')).getText()).toEqual('This username is taken.');
// expect(ptor.isElementPresent(by.css('#username.input-error'))).toBeTruthy();
//});
//
//it('should allow using an available username', function () {
// element(by.model('data.username')).sendKeys('newUsername');
//
// ptor.wait(function() {
// return ptor.isElementPresent(by.css('#username-status.glyphicon-ok'));
// }, 5000);
//
// expect(ptor.isElementPresent(by.css('#username-status.glyphicon-ok'))).toBeTruthy();
// expect(element(by.binding('errors.usernameErrors')).getText()).toEqual('');
// expect(ptor.isElementPresent(by.css('#username:not(.input-error)'))).toBeTruthy();
//});
});
| 41.957447 | 112 | 0.662779 |
735ff877d2ba1aee406a2375742078e30185bd31 | 19,448 | js | JavaScript | web/common/src/main/java/org/artifactory/common/wicket/resources/dojo/dijit/Dialog.js | alancnet/artifactory | 7ac3ea76471a00543eaf60e82b554d8edd894c0f | [
"Apache-2.0"
] | 3 | 2016-01-21T11:49:08.000Z | 2018-12-11T21:02:11.000Z | web/common/src/main/java/org/artifactory/common/wicket/resources/dojo/dijit/Dialog.js | alancnet/artifactory | 7ac3ea76471a00543eaf60e82b554d8edd894c0f | [
"Apache-2.0"
] | null | null | null | web/common/src/main/java/org/artifactory/common/wicket/resources/dojo/dijit/Dialog.js | alancnet/artifactory | 7ac3ea76471a00543eaf60e82b554d8edd894c0f | [
"Apache-2.0"
] | 5 | 2015-12-08T10:22:21.000Z | 2021-06-15T16:14:00.000Z | /*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dijit.Dialog"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dijit.Dialog"] = true;
dojo.provide("dijit.Dialog");
dojo.require("dojo.dnd.move");
dojo.require("dojo.dnd.TimedMoveable");
dojo.require("dojo.fx");
dojo.require("dojo.window");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._CssStateMixin");
dojo.require("dijit.form._FormMixin");
dojo.require("dijit._DialogMixin");
dojo.require("dijit.DialogUnderlay");
dojo.require("dijit.layout.ContentPane");
dojo.requireLocalization("dijit", "common", null, "ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw");
dojo.require("dijit.TooltipDialog");
// dijit/TooltipDialog required for back-compat. TODO: remove in 2.0
/*=====
dijit._underlay = function(kwArgs){
// summary:
// A shared instance of a `dijit.DialogUnderlay`
//
// description:
// A shared instance of a `dijit.DialogUnderlay` created and
// used by `dijit.Dialog`, though never created until some Dialog
// or subclass thereof is shown.
};
=====*/
dojo.declare(
"dijit._DialogBase",
[dijit._Templated, dijit.form._FormMixin, dijit._DialogMixin, dijit._CssStateMixin],
{
// summary:
// A modal dialog Widget
//
// description:
// Pops up a modal dialog window, blocking access to the screen
// and also graying out the screen Dialog is extended from
// ContentPane so it supports all the same parameters (href, etc.)
//
// example:
// | <div dojoType="dijit.Dialog" href="test.html"></div>
//
// example:
// | var foo = new dijit.Dialog({ title: "test dialog", content: "test content" };
// | dojo.body().appendChild(foo.domNode);
// | foo.startup();
templateString: dojo.cache("dijit", "templates/Dialog.html", "<div class=\"dijitDialog\" role=\"dialog\" aria-labelledby=\"${id}_title\">\r\n\t<div dojoAttachPoint=\"titleBar\" class=\"dijitDialogTitleBar\">\r\n\t<span dojoAttachPoint=\"titleNode\" class=\"dijitDialogTitle\" id=\"${id}_title\"></span>\r\n\t<span dojoAttachPoint=\"closeButtonNode\" class=\"dijitDialogCloseIcon\" dojoAttachEvent=\"ondijitclick: onCancel\" title=\"${buttonCancel}\" role=\"button\" tabIndex=\"-1\">\r\n\t\t<span dojoAttachPoint=\"closeText\" class=\"closeText\" title=\"${buttonCancel}\">x</span>\r\n\t</span>\r\n\t</div>\r\n\t\t<div dojoAttachPoint=\"containerNode\" class=\"dijitDialogPaneContent\"></div>\r\n</div>\r\n"),
baseClass: "dijitDialog",
cssStateNodes: {
closeButtonNode: "dijitDialogCloseIcon"
},
attributeMap: dojo.delegate(dijit._Widget.prototype.attributeMap, {
title: [
{ node: "titleNode", type: "innerHTML" },
{ node: "titleBar", type: "attribute" }
],
"aria-describedby":""
}),
// open: [readonly] Boolean
// True if Dialog is currently displayed on screen.
open: false,
// duration: Integer
// The time in milliseconds it takes the dialog to fade in and out
duration: dijit.defaultDuration,
// refocus: Boolean
// A Toggle to modify the default focus behavior of a Dialog, which
// is to re-focus the element which had focus before being opened.
// False will disable refocusing. Default: true
refocus: true,
// autofocus: Boolean
// A Toggle to modify the default focus behavior of a Dialog, which
// is to focus on the first dialog element after opening the dialog.
// False will disable autofocusing. Default: true
autofocus: true,
// _firstFocusItem: [private readonly] DomNode
// The pointer to the first focusable node in the dialog.
// Set by `dijit._DialogMixin._getFocusItems`.
_firstFocusItem: null,
// _lastFocusItem: [private readonly] DomNode
// The pointer to which node has focus prior to our dialog.
// Set by `dijit._DialogMixin._getFocusItems`.
_lastFocusItem: null,
// doLayout: [protected] Boolean
// Don't change this parameter from the default value.
// This ContentPane parameter doesn't make sense for Dialog, since Dialog
// is never a child of a layout container, nor can you specify the size of
// Dialog in order to control the size of an inner widget.
doLayout: false,
// draggable: Boolean
// Toggles the moveable aspect of the Dialog. If true, Dialog
// can be dragged by it's title. If false it will remain centered
// in the viewport.
draggable: true,
//aria-describedby: String
// Allows the user to add an aria-describedby attribute onto the dialog. The value should
// be the id of the container element of text that describes the dialog purpose (usually
// the first text in the dialog).
// <div dojoType="dijit.Dialog" aria-describedby="intro" .....>
// <div id="intro">Introductory text</div>
// <div>rest of dialog contents</div>
// </div>
"aria-describedby":"",
postMixInProperties: function(){
var _nlsResources = dojo.i18n.getLocalization("dijit", "common");
dojo.mixin(this, _nlsResources);
this.inherited(arguments);
},
postCreate: function(){
dojo.style(this.domNode, {
display: "none",
position:"absolute"
});
dojo.body().appendChild(this.domNode);
this.inherited(arguments);
this.connect(this, "onExecute", "hide");
this.connect(this, "onCancel", "hide");
this._modalconnects = [];
},
onLoad: function(){
// summary:
// Called when data has been loaded from an href.
// Unlike most other callbacks, this function can be connected to (via `dojo.connect`)
// but should *not* be overridden.
// tags:
// callback
// when href is specified we need to reposition the dialog after the data is loaded
// and find the focusable elements
this._position();
if(this.autofocus && dijit._DialogLevelManager.isTop(this)){
this._getFocusItems(this.domNode);
dijit.focus(this._firstFocusItem);
}
this.inherited(arguments);
},
_endDrag: function(e){
// summary:
// Called after dragging the Dialog. Saves the position of the dialog in the viewport.
// tags:
// private
if(e && e.node && e.node === this.domNode){
this._relativePosition = dojo.position(e.node);
}
},
_setup: function(){
// summary:
// Stuff we need to do before showing the Dialog for the first
// time (but we defer it until right beforehand, for
// performance reasons).
// tags:
// private
var node = this.domNode;
if(this.titleBar && this.draggable){
this._moveable = (dojo.isIE == 6) ?
new dojo.dnd.TimedMoveable(node, { handle: this.titleBar }) : // prevent overload, see #5285
new dojo.dnd.Moveable(node, { handle: this.titleBar, timeout: 0 });
this._dndListener = dojo.subscribe("/dnd/move/stop",this,"_endDrag");
}else{
dojo.addClass(node,"dijitDialogFixed");
}
this.underlayAttrs = {
dialogId: this.id,
"class": dojo.map(this["class"].split(/\s/), function(s){ return s+"_underlay"; }).join(" ")
};
},
_size: function(){
// summary:
// If necessary, shrink dialog contents so dialog fits in viewport
// tags:
// private
this._checkIfSingleChild();
// If we resized the dialog contents earlier, reset them back to original size, so
// that if the user later increases the viewport size, the dialog can display w/out a scrollbar.
// Need to do this before the dojo.marginBox(this.domNode) call below.
if(this._singleChild){
if(this._singleChildOriginalStyle){
this._singleChild.domNode.style.cssText = this._singleChildOriginalStyle;
}
delete this._singleChildOriginalStyle;
}else{
dojo.style(this.containerNode, {
width:"auto",
height:"auto"
});
}
var mb = dojo._getMarginSize(this.domNode);
var viewport = dojo.window.getBox();
if(mb.w >= viewport.w || mb.h >= viewport.h){
// Reduce size of dialog contents so that dialog fits in viewport
var w = Math.min(mb.w, Math.floor(viewport.w * 0.75)),
h = Math.min(mb.h, Math.floor(viewport.h * 0.75));
if(this._singleChild && this._singleChild.resize){
this._singleChildOriginalStyle = this._singleChild.domNode.style.cssText;
this._singleChild.resize({w: w, h: h});
}else{
dojo.style(this.containerNode, {
width: w + "px",
height: h + "px",
overflow: "auto",
position: "relative" // workaround IE bug moving scrollbar or dragging dialog
});
}
}else{
if(this._singleChild && this._singleChild.resize){
this._singleChild.resize();
}
}
},
_position: function(){
// summary:
// Position modal dialog in the viewport. If no relative offset
// in the viewport has been determined (by dragging, for instance),
// center the node. Otherwise, use the Dialog's stored relative offset,
// and position the node to top: left: values based on the viewport.
// tags:
// private
if(!dojo.hasClass(dojo.body(),"dojoMove")){
var node = this.domNode,
viewport = dojo.window.getBox(),
p = this._relativePosition,
bb = p ? null : dojo._getBorderBox(node),
l = Math.floor(viewport.l + (p ? p.x : (viewport.w - bb.w) / 2)),
t = Math.floor(viewport.t + (p ? p.y : (viewport.h - bb.h) / 2))
;
dojo.style(node,{
left: l + "px",
top: t + "px"
});
}
},
_onKey: function(/*Event*/ evt){
// summary:
// Handles the keyboard events for accessibility reasons
// tags:
// private
if(evt.charOrCode){
var dk = dojo.keys;
var node = evt.target;
if(evt.charOrCode === dk.TAB){
this._getFocusItems(this.domNode);
}
var singleFocusItem = (this._firstFocusItem == this._lastFocusItem);
// see if we are shift-tabbing from first focusable item on dialog
if(node == this._firstFocusItem && evt.shiftKey && evt.charOrCode === dk.TAB){
if(!singleFocusItem){
dijit.focus(this._lastFocusItem); // send focus to last item in dialog
}
dojo.stopEvent(evt);
}else if(node == this._lastFocusItem && evt.charOrCode === dk.TAB && !evt.shiftKey){
if(!singleFocusItem){
dijit.focus(this._firstFocusItem); // send focus to first item in dialog
}
dojo.stopEvent(evt);
}else{
// see if the key is for the dialog
while(node){
if(node == this.domNode || dojo.hasClass(node, "dijitPopup")){
if(evt.charOrCode == dk.ESCAPE){
this.onCancel();
}else{
return; // just let it go
}
}
node = node.parentNode;
}
// this key is for the disabled document window
if(evt.charOrCode !== dk.TAB){ // allow tabbing into the dialog for a11y
dojo.stopEvent(evt);
// opera won't tab to a div
}else if(!dojo.isOpera){
try{
this._firstFocusItem.focus();
}catch(e){ /*squelch*/ }
}
}
}
},
show: function(){
// summary:
// Display the dialog
// returns: dojo.Deferred
// Deferred object that resolves when the display animation is complete
if(this.open){ return; }
if(!this._started){
this.startup();
}
// first time we show the dialog, there's some initialization stuff to do
if(!this._alreadyInitialized){
this._setup();
this._alreadyInitialized=true;
}
if(this._fadeOutDeferred){
this._fadeOutDeferred.cancel();
}
this._modalconnects.push(dojo.connect(window, "onscroll", this, "layout"));
this._modalconnects.push(dojo.connect(window, "onresize", this, function(){
// IE gives spurious resize events and can actually get stuck
// in an infinite loop if we don't ignore them
var viewport = dojo.window.getBox();
if(!this._oldViewport ||
viewport.h != this._oldViewport.h ||
viewport.w != this._oldViewport.w){
this.layout();
this._oldViewport = viewport;
}
}));
this._modalconnects.push(dojo.connect(this.domNode, "onkeypress", this, "_onKey"));
dojo.style(this.domNode, {
opacity:0,
display:""
});
this._set("open", true);
this._onShow(); // lazy load trigger
this._size();
this._position();
// fade-in Animation object, setup below
var fadeIn;
this._fadeInDeferred = new dojo.Deferred(dojo.hitch(this, function(){
fadeIn.stop();
delete this._fadeInDeferred;
}));
fadeIn = dojo.fadeIn({
node: this.domNode,
duration: this.duration,
beforeBegin: dojo.hitch(this, function(){
dijit._DialogLevelManager.show(this, this.underlayAttrs);
}),
onEnd: dojo.hitch(this, function(){
if(this.autofocus && dijit._DialogLevelManager.isTop(this)){
// find focusable items each time dialog is shown since if dialog contains a widget the
// first focusable items can change
this._getFocusItems(this.domNode);
dijit.focus(this._firstFocusItem);
}
this._fadeInDeferred.callback(true);
delete this._fadeInDeferred;
})
}).play();
return this._fadeInDeferred;
},
hide: function(){
// summary:
// Hide the dialog
// returns: dojo.Deferred
// Deferred object that resolves when the hide animation is complete
// if we haven't been initialized yet then we aren't showing and we can just return
if(!this._alreadyInitialized){
return;
}
if(this._fadeInDeferred){
this._fadeInDeferred.cancel();
}
// fade-in Animation object, setup below
var fadeOut;
this._fadeOutDeferred = new dojo.Deferred(dojo.hitch(this, function(){
fadeOut.stop();
delete this._fadeOutDeferred;
}));
fadeOut = dojo.fadeOut({
node: this.domNode,
duration: this.duration,
onEnd: dojo.hitch(this, function(){
this.domNode.style.display = "none";
dijit._DialogLevelManager.hide(this);
this.onHide();
this._fadeOutDeferred.callback(true);
delete this._fadeOutDeferred;
})
}).play();
if(this._scrollConnected){
this._scrollConnected = false;
}
dojo.forEach(this._modalconnects, dojo.disconnect);
this._modalconnects = [];
if(this._relativePosition){
delete this._relativePosition;
}
this._set("open", false);
return this._fadeOutDeferred;
},
layout: function(){
// summary:
// Position the Dialog and the underlay
// tags:
// private
if(this.domNode.style.display != "none"){
if(dijit._underlay){ // avoid race condition during show()
dijit._underlay.layout();
}
this._position();
}
},
destroy: function(){
if(this._fadeInDeferred){
this._fadeInDeferred.cancel();
}
if(this._fadeOutDeferred){
this._fadeOutDeferred.cancel();
}
if(this._moveable){
this._moveable.destroy();
}
if(this._dndListener){
dojo.unsubscribe(this._dndListener);
}
dojo.forEach(this._modalconnects, dojo.disconnect);
dijit._DialogLevelManager.hide(this);
this.inherited(arguments);
}
}
);
dojo.declare(
"dijit.Dialog",
[dijit.layout.ContentPane, dijit._DialogBase],
{}
);
dijit._DialogLevelManager = {
// summary:
// Controls the various active "levels" on the page, starting with the
// stuff initially visible on the page (at z-index 0), and then having an entry for
// each Dialog shown.
show: function(/*dijit._Widget*/ dialog, /*Object*/ underlayAttrs){
// summary:
// Call right before fade-in animation for new dialog.
// Saves current focus, displays/adjusts underlay for new dialog,
// and sets the z-index of the dialog itself.
//
// New dialog will be displayed on top of all currently displayed dialogs.
//
// Caller is responsible for setting focus in new dialog after the fade-in
// animation completes.
var ds = dijit._dialogStack;
// Save current focus
ds[ds.length-1].focus = dijit.getFocus(dialog);
// Display the underlay, or if already displayed then adjust for this new dialog
var underlay = dijit._underlay;
if(!underlay || underlay._destroyed){
underlay = dijit._underlay = new dijit.DialogUnderlay(underlayAttrs);
}else{
underlay.set(dialog.underlayAttrs);
}
// Set z-index a bit above previous dialog
var zIndex = ds[ds.length-1].dialog ? ds[ds.length-1].zIndex + 2 : 950;
if(ds.length == 1){ // first dialog
underlay.show();
}
dojo.style(dijit._underlay.domNode, 'zIndex', zIndex - 1);
// Dialog
dojo.style(dialog.domNode, 'zIndex', zIndex);
ds.push({dialog: dialog, underlayAttrs: underlayAttrs, zIndex: zIndex});
},
hide: function(/*dijit._Widget*/ dialog){
// summary:
// Called when the specified dialog is hidden/destroyed, after the fade-out
// animation ends, in order to reset page focus, fix the underlay, etc.
// If the specified dialog isn't open then does nothing.
//
// Caller is responsible for either setting display:none on the dialog domNode,
// or calling dijit.popup.hide(), or removing it from the page DOM.
var ds = dijit._dialogStack;
if(ds[ds.length-1].dialog == dialog){
// Removing the top (or only) dialog in the stack, return focus
// to previous dialog
ds.pop();
var pd = ds[ds.length-1]; // the new active dialog (or the base page itself)
// Adjust underlay
if(ds.length == 1){
// Returning to original page.
// Hide the underlay, unless the underlay widget has already been destroyed
// because we are being called during page unload (when all widgets are destroyed)
if(!dijit._underlay._destroyed){
dijit._underlay.hide();
}
}else{
// Popping back to previous dialog, adjust underlay
dojo.style(dijit._underlay.domNode, 'zIndex', pd.zIndex - 1);
dijit._underlay.set(pd.underlayAttrs);
}
// Adjust focus
if(dialog.refocus){
// If we are returning control to a previous dialog but for some reason
// that dialog didn't have a focused field, set focus to first focusable item.
// This situation could happen if two dialogs appeared at nearly the same time,
// since a dialog doesn't set it's focus until the fade-in is finished.
var focus = pd.focus;
if(!focus || (pd.dialog && !dojo.isDescendant(focus.node, pd.dialog.domNode))){
pd.dialog._getFocusItems(pd.dialog.domNode);
focus = pd.dialog._firstFocusItem;
}
try{
dijit.focus(focus);
}catch(e){
/* focus() will fail if user opened the dialog by clicking a non-focusable element */
}
}
}else{
// Removing a dialog out of order (#9944, #10705).
// Don't need to mess with underlay or z-index or anything.
var idx = dojo.indexOf(dojo.map(ds, function(elem){return elem.dialog}), dialog);
if(idx != -1){
ds.splice(idx, 1);
}
}
},
isTop: function(/*dijit._Widget*/ dialog){
// summary:
// Returns true if specified Dialog is the top in the task
var ds = dijit._dialogStack;
return ds[ds.length-1].dialog == dialog;
}
};
// Stack representing the various active "levels" on the page, starting with the
// stuff initially visible on the page (at z-index 0), and then having an entry for
// each Dialog shown.
// Each element in stack has form {
// dialog: dialogWidget,
// focus: returnFromGetFocus(),
// underlayAttrs: attributes to set on underlay (when this widget is active)
// }
dijit._dialogStack = [
{dialog: null, focus: null, underlayAttrs: null} // entry for stuff at z-index: 0
];
}
| 31.725938 | 710 | 0.665878 |
7360377d41abdd2bb3e262f574b5dfdb0d19216e | 536 | js | JavaScript | src/api/facility/info.js | ansonpro/smart-community-system | 55a8dbd2c1e3b8b3d5a4c729296adb27275a7271 | [
"MIT"
] | 2 | 2020-03-03T12:38:22.000Z | 2020-12-10T16:29:08.000Z | src/api/facility/info.js | ansonpro/smart-community-system | 55a8dbd2c1e3b8b3d5a4c729296adb27275a7271 | [
"MIT"
] | null | null | null | src/api/facility/info.js | ansonpro/smart-community-system | 55a8dbd2c1e3b8b3d5a4c729296adb27275a7271 | [
"MIT"
] | 2 | 2020-03-03T12:38:29.000Z | 2020-10-15T16:49:14.000Z | import request from '@/utils/request';
const addFacilityInfo = data => request({
url: '/facilities',
method: 'post',
data,
});
const deleteFacilityInfoById = id => request({
url: `/facilities/${id}`,
method: 'delete',
});
const updateFacilityInfoById = (id, data) => request({
url: `/facilities/${id}`,
method: 'patch',
data,
});
const fetchFacilityInfos = params => request.get('/facilities', {
params,
});
export {
addFacilityInfo,
deleteFacilityInfoById,
updateFacilityInfoById,
fetchFacilityInfos,
};
| 17.866667 | 65 | 0.66791 |
7360b49d8ee36b327137c28b7a14e014ea21e9af | 696 | js | JavaScript | src/plugins/vuetify.js | andreasvogt89/simbac | d309e3fcc068a50c1594c652ba15f3452a5ffeee | [
"MIT"
] | 5 | 2021-08-23T06:45:51.000Z | 2022-02-06T20:04:01.000Z | src/plugins/vuetify.js | wangwendong1024/simbac | d309e3fcc068a50c1594c652ba15f3452a5ffeee | [
"MIT"
] | 8 | 2022-02-03T18:07:44.000Z | 2022-02-09T19:34:48.000Z | src/plugins/vuetify.js | wangwendong1024/simbac | d309e3fcc068a50c1594c652ba15f3452a5ffeee | [
"MIT"
] | 1 | 2021-12-21T11:05:28.000Z | 2021-12-21T11:05:28.000Z | import Vue from "vue";
import Vuetify from "vuetify/lib/framework";
import colors from "vuetify/lib/util/colors";
Vue.use(Vuetify);
export default new Vuetify({
theme: {
default: "dark",
themes: {
light: {
primary: colors.orange,
secondary: "#304156",
success: colors.green,
danger: colors.red,
warning: colors.deepOrange,
info: colors.white,
dark: "#242939",
background: "#f2f3f8"
},
dark: {
primary: colors.orange,
secondary: "#304156",
success: colors.green,
danger: colors.red,
warning: colors.deepOrange,
info: colors.white
}
}
},
});
| 20.470588 | 45 | 0.561782 |
736129f8516dec3a5100f35878d72ce38c9866a6 | 1,797 | js | JavaScript | test/unit/shape/vertex.js | MisterKangaroo/p5.js-svg | 738426c1499a3ad39f6866d0b58502d6853c5cf3 | [
"MIT"
] | 427 | 2015-06-03T20:19:04.000Z | 2022-03-31T10:50:52.000Z | test/unit/shape/vertex.js | MisterKangaroo/p5.js-svg | 738426c1499a3ad39f6866d0b58502d6853c5cf3 | [
"MIT"
] | 207 | 2015-04-29T03:24:16.000Z | 2022-03-22T19:05:45.000Z | test/unit/shape/vertex.js | MisterKangaroo/p5.js-svg | 738426c1499a3ad39f6866d0b58502d6853c5cf3 | [
"MIT"
] | 69 | 2015-12-16T01:09:28.000Z | 2022-03-25T00:06:27.000Z | import {testRender} from '../../lib';
describe('Shape/Vertex', function() {
var tests = {
contour: function(p) {
p.translate(50, 50);
p.stroke(255, 0, 0);
p.beginShape();
p.vertex(-40, -40);
p.vertex(40, -40);
p.vertex(40, 40);
p.vertex(-40, 40);
p.beginContour();
p.vertex(-20, -20);
p.vertex(-20, 20);
p.vertex(20, 20);
p.vertex(20, -20);
p.endContour();
p.endShape(p.CLOSE);
p.translate(-50, -50);
},
bezierVertex: function(p) {
p.beginShape();
p.vertex(30, 20);
p.bezierVertex(80, 0, 80, 75, 30, 75);
p.bezierVertex(50, 80, 60, 25, 30, 20);
p.endShape();
},
curveVertex: function(p) {
p.noFill();
p.beginShape();
p.curveVertex(84, 91);
p.curveVertex(84, 91);
p.curveVertex(68, 19);
p.curveVertex(21, 17);
p.curveVertex(32, 100);
p.curveVertex(32, 100);
p.endShape();
},
quadraticVertex: function(p) {
p.noFill();
p.strokeWeight(4);
p.beginShape();
p.vertex(20, 20);
p.quadraticVertex(80, 20, 50, 50);
p.quadraticVertex(20, 80, 80, 80);
p.vertex(80, 60);
p.endShape();
}
};
Object.keys(tests).forEach(function(key) {
describe(key, function() {
it(key + ': SVG API should draw same image as Canvas API', function(done) {
testRender.describe(key);
testRender(tests[key], done);
});
});
});
});
| 29.459016 | 87 | 0.434613 |
7361300f48de24eb776a30a0da5f98170feb1974 | 5,492 | js | JavaScript | tags/v20160318/admin/views/order/pickup.js | XiaoFeiFeng/shipping | 6b1cc32425324b787221f5ec368441ea82e95642 | [
"Apache-2.0"
] | null | null | null | tags/v20160318/admin/views/order/pickup.js | XiaoFeiFeng/shipping | 6b1cc32425324b787221f5ec368441ea82e95642 | [
"Apache-2.0"
] | null | null | null | tags/v20160318/admin/views/order/pickup.js | XiaoFeiFeng/shipping | 6b1cc32425324b787221f5ec368441ea82e95642 | [
"Apache-2.0"
] | null | null | null | 'use strict'
define([], function () {
angular.module('orderPickupModule', [])
.controller("orderPickupCtrl", ['$scope', '$ui', '$data', '$request', '$timeout',
function ($scope, $ui, $data, $request, $timeout) {
$scope.currentPage = 1;
$scope.pageSize = 10;
$scope.pageChange = function () {
$scope.initGridData();
}
$scope.handler = function (data) {
$ui.openWindow('views/order/handler.html', 'orderhandlerCtrl', data.addressStr, function (result) {
if (result) {
$timeout(function () {
$scope.submit(data, result);
}, 100);
}
});
}
//提交分发数据
$scope.submit = function (pickup, merchant) {
var data = {};
data.tracks = pickup.tracks;
if (!data.tracks) {
data.tracks = [];
}
var track = {};
track.address = merchant.address;
track.mid = merchant._id.$id;
track.tel = merchant.telephone;
data.tracks.push(track);
data.state = 1;
data.owner = merchant._id.$id;
$request.post('api/?model=package&action=edit&id=' + pickup._id.$id,
data,
function (response) {
if (response.success) {
$ui.notify("分发成功", "提示", function () {
$scope. initGridData();
$scope.initGridData();
});
} else if (angular.isUndefined(response.success)) {
$ui.error(response, "错误");
} else {
$ui.error(response.error, "错误");
}
}, function (err) {
$ui.error('添加失败,' + err, '错误');
});
}
$scope.formatterTimer = function (input) {
var date = new Date(input * 1000);
return date.format("yyyy-MM-dd HH:mm:ss");
}
$scope.gridOptions = {
data: [],
cols: [
{FieldName: 'name', DisplayName: '寄件人',},
{FieldName: 'tel', DisplayName: '电话',},
{FieldName: 'created_time', DisplayName: '下单时间', Formatter: $scope.formatterTimer},
{FieldName: 'addressStr', DisplayName: '地址',},
],
colsOpr: {
headName: '操作',
headClass: '',
init: {
showView: false,
viewFn: function (data) {
$scope.viewDetail(data);
},
showEdit: false,
editFn: function (data) {
$scope.edit(data);
},
showDelete: false,
},
colInfo: [
{
title: '分配加盟商',
iconClass: 'fa fa-edit',
clickFn: function (data) {
$scope.handler(data);
},
},
],
},
rowOpr: {
rowSelected: function (data) {
//alert("row selected");
},
},
colsHidden: [],
}
$scope.initGridData = function (state) {
$request.get('api/?model=package&action=get_packages&state=0'
+ '&pi=' + $scope.currentPage
+ '&ps=' + $scope.pageSize,
function (response) {
if (response.success) {
$scope.handlerData(response.data);
$scope.totalItems = response.count;
} else if (angular.isUndefined(response.success)) {
$ui.error(response);
} else {
$ui.error(response.error);
}
}
);
}
$scope.handlerData = function (data) {
if (data && data.length > 0) {
angular.forEach(data, function (d) {
d.addressStr = d.district.cn.join(" ") + " " + d.address;
})
} else {
data = [];
}
$scope.gridOptions.data = data;
}
$scope.initGridData();
}
])
}) | 38.676056 | 119 | 0.324654 |
7361aa4ee0eba5de242e333fe3fc50787964237c | 5,521 | js | JavaScript | lib/bpk-component-progress/src/BpkProgress.js | Skyscanner/backpack-react-native | 9cb7a0763c1464b0987f23dc2865ec4758592060 | [
"Apache-2.0"
] | 39 | 2019-01-16T16:48:52.000Z | 2022-02-24T00:55:03.000Z | lib/bpk-component-progress/src/BpkProgress.js | Skyscanner/backpack-react-native | 9cb7a0763c1464b0987f23dc2865ec4758592060 | [
"Apache-2.0"
] | 703 | 2018-12-13T16:41:59.000Z | 2022-03-28T10:07:09.000Z | lib/bpk-component-progress/src/BpkProgress.js | Skyscanner/backpack-react-native | 9cb7a0763c1464b0987f23dc2865ec4758592060 | [
"Apache-2.0"
] | 24 | 2019-01-03T11:38:54.000Z | 2021-06-07T11:53:54.000Z | /*
* Backpack - Skyscanner's Design System
*
* Copyright 2016-2021 Skyscanner Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* @flow */
import React, { Component, type ElementProps, type Config } from 'react';
import PropTypes from 'prop-types';
import { View, Animated, Easing, Platform, ViewPropTypes } from 'react-native';
import {
animationDurationBase,
spacingMd,
colorSkyGrayTint06,
colorBlackTint02,
colorMonteverde,
colorSagano,
borderRadiusPill,
spacingXxl,
} from '@skyscanner/bpk-foundations-react-native/tokens/base.react.native';
import { getThemeAttributes, withTheme, type Theme } from '../../bpk-theming';
import {
BpkDynamicStyleSheet,
type WithBpkAppearanceInjectedProps,
unpackBpkDynamicValue,
withBpkAppearance,
} from '../../bpk-appearance';
import { REQUIRED_THEME_ATTRIBUTES, themePropType } from './theming';
const dynamicStyles = BpkDynamicStyleSheet.create({
track: {
backgroundColor: Platform.select({
ios: () => ({ light: colorSkyGrayTint06, dark: colorBlackTint02 }),
android: () => colorSagano,
})(),
height: spacingMd,
},
fill: {
height: spacingMd,
},
defaultTrackStyle: {
borderRadius: borderRadiusPill,
width: spacingXxl * 3,
},
defaultFillStyle: {
backgroundColor: colorMonteverde,
borderRadius: borderRadiusPill,
},
barTrackStyle: {
width: '100%',
},
barFillStyle: {
backgroundColor: colorMonteverde,
},
});
const BAR_TYPES = {
default: 'default',
bar: 'bar',
};
type ViewProps = ElementProps<typeof View>;
type ViewStyleProp = $PropertyType<ViewProps, 'style'>;
export type Props = {
max: number,
min: number,
value: number,
type: $Keys<typeof BAR_TYPES>,
style: ViewStyleProp,
fillStyle: ViewStyleProp,
theme: ?Theme,
accessibilityLabel: string | ((number, number, number) => string),
};
type EnhancedProps = Props & WithBpkAppearanceInjectedProps;
type State = {
width: number,
};
const propTypes = {
max: PropTypes.number.isRequired,
min: PropTypes.number.isRequired,
value: PropTypes.number.isRequired,
type: PropTypes.oneOf(Object.keys(BAR_TYPES)),
style: ViewPropTypes.style,
fillStyle: ViewPropTypes.style,
theme: themePropType,
accessibilityLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.func])
.isRequired,
};
const defaultProps = {
type: BAR_TYPES.default,
style: null,
fillStyle: null,
theme: null,
};
class BpkProgress extends Component<EnhancedProps, State> {
progressAnimation: Animated.Value;
static propTypes = { ...propTypes };
static defaultProps = { ...defaultProps };
constructor(props: EnhancedProps) {
super(props);
this.progressAnimation = new Animated.Value(this.getWithinBoundsProgress());
this.state = {
width: 0,
};
}
componentDidUpdate(prevProps: Props) {
if (this.props.value >= 0 && this.props.value !== prevProps.value) {
Animated.timing(this.progressAnimation, {
easing: Easing.inOut(Easing.ease),
duration: animationDurationBase,
toValue: this.getWithinBoundsProgress(),
useNativeDriver: false,
}).start();
}
}
onLayout = (event: any) => {
this.setState({ width: event.nativeEvent.layout.width });
};
getWithinBoundsProgress() {
return Math.max(Math.min(this.props.value, this.props.max), this.props.min);
}
render() {
const {
min,
max,
type,
style,
fillStyle,
theme,
bpkAppearance,
accessibilityLabel,
} = this.props;
const styles = unpackBpkDynamicValue(dynamicStyles, bpkAppearance);
const { width } = this.state;
const [baseTrackStyle, baseFillStyle] = ['TrackStyle', 'FillStyle'].map(
(stylePart) => styles[`${type}${stylePart}`],
);
const fillWidth = this.progressAnimation.interpolate({
inputRange: [min, max],
outputRange: [0, width],
});
const themeAttributes = getThemeAttributes(
REQUIRED_THEME_ATTRIBUTES,
theme,
);
const themeStyle = {
track: themeAttributes && {
backgroundColor: themeAttributes.progressTrackBackgroundColor,
},
fill: themeAttributes && {
backgroundColor: themeAttributes.progressFillBackgroundColor,
},
};
const label =
typeof accessibilityLabel === 'string'
? accessibilityLabel
: accessibilityLabel(min, max, this.getWithinBoundsProgress());
return (
<View
style={[styles.track, baseTrackStyle, themeStyle.track, style]}
onLayout={this.onLayout}
accessibilityLabel={label}
>
<Animated.View
style={[
styles.fill,
baseFillStyle,
{ width: fillWidth },
themeStyle.fill,
fillStyle,
]}
/>
</View>
);
}
}
const WithTheme = withTheme(BpkProgress);
type BpkProgressConfig = Config<Props, typeof defaultProps>;
export default withBpkAppearance<BpkProgressConfig>(WithTheme);
| 25.67907 | 80 | 0.67198 |
736255e08368d3beca2f11c8ebda95267a11f2c4 | 4,873 | js | JavaScript | node_modules/ionic/dist/commands/cordova/platform.js | druffolo/druffolo_mblComputing_Assign1 | b822f02dbc4957855e0ee31acb05d1e467bf0eee | [
"MIT"
] | null | null | null | node_modules/ionic/dist/commands/cordova/platform.js | druffolo/druffolo_mblComputing_Assign1 | b822f02dbc4957855e0ee31acb05d1e467bf0eee | [
"MIT"
] | null | null | null | node_modules/ionic/dist/commands/cordova/platform.js | druffolo/druffolo_mblComputing_Assign1 | b822f02dbc4957855e0ee31acb05d1e467bf0eee | [
"MIT"
] | null | null | null | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const chalk = require("chalk");
const command_1 = require("@ionic/cli-utils/lib/command");
const base_1 = require("./base");
let PlatformCommand = class PlatformCommand extends base_1.CordovaCommand {
preRun(inputs, options) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { contains, validate, validators } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/validators'); });
yield this.preRunChecks();
if (options['r'] || options['noresources']) {
options['resources'] = false;
}
inputs[0] = (typeof inputs[0] === 'undefined') ? 'ls' : inputs[0];
inputs[0] = (inputs[0] === 'rm') ? 'remove' : inputs[0];
inputs[0] = (inputs[0] === 'list') ? 'ls' : inputs[0];
validate(inputs[0], 'action', [contains(['add', 'remove', 'update', 'ls', 'check', 'save'], {})]);
// If the action is list, check, or save, then just end here.
if (['ls', 'check', 'save'].includes(inputs[0])) {
const response = yield this.runCordova(['platform', inputs[0]]);
this.env.log.msg(response);
return 0;
}
if (!inputs[1]) {
const platform = yield this.env.prompt({
type: 'input',
name: 'platform',
message: `What platform would you like to ${inputs[0]} (${['android', 'ios'].map(v => chalk.green(v)).join(', ')}):`,
});
inputs[1] = platform.trim();
}
validate(inputs[1], 'platform', [validators.required]);
});
}
run(inputs, options) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { ConfigXml } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/cordova/config'); });
const { filterArgumentsForCordova } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/cordova/utils'); });
let [action, platformName] = inputs;
const conf = yield ConfigXml.load(this.env.project.directory);
yield conf.resetContentSrc();
yield conf.save();
const platforms = yield conf.getPlatformEngines();
if (action === 'add' && platforms.map(p => p.name).includes(platformName)) {
this.env.log.info(`Platform ${platformName} already exists.`);
return;
}
const optionList = filterArgumentsForCordova(this.metadata, inputs, options);
if ((action === 'add' || action === 'remove') && !optionList.includes('--save')) {
optionList.push('--save');
}
if (action === 'add') {
const { installPlatform } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/cordova/project'); });
yield installPlatform(this.env, platformName);
}
else {
const response = yield this.runCordova(optionList);
this.env.log.msg(response);
}
if (action === 'add' && options['resources'] && ['ios', 'android'].includes(platformName)) {
yield this.runcmd(['cordova', 'resources', platformName, '--force']);
}
this.env.tasks.end();
});
}
};
PlatformCommand = tslib_1.__decorate([
command_1.CommandMetadata({
name: 'platform',
type: 'project',
description: 'Manage Cordova platform targets',
longDescription: `
Like running ${chalk.green('cordova platform')} directly, but adds default Ionic icons and splash screen resources (during ${chalk.green('add')}) and provides friendly checks.
`,
exampleCommands: ['', 'add ios', 'add android', 'rm ios'],
inputs: [
{
name: 'action',
description: `${chalk.green('add')}, ${chalk.green('remove')}, or ${chalk.green('update')} a platform; ${chalk.green('ls')}, ${chalk.green('check')}, or ${chalk.green('save')} all project platforms`,
},
{
name: 'platform',
description: `The platform that you would like to add (${['android', 'ios'].map(v => chalk.green(v)).join(', ')})`,
}
],
options: [
{
name: 'resources',
description: `Do not pregenerate icons and splash screen resources (corresponds to ${chalk.green('add')})`,
type: Boolean,
default: true,
},
]
})
], PlatformCommand);
exports.PlatformCommand = PlatformCommand;
| 49.72449 | 215 | 0.538888 |
73628ceeb146db218222f5a73d762c0639647f69 | 2,379 | js | JavaScript | assets/js/functions.js | bomba65/Cement | 456c9a790dcd606d7ea2cdbd55dfa34d0eed8b27 | [
"MIT"
] | null | null | null | assets/js/functions.js | bomba65/Cement | 456c9a790dcd606d7ea2cdbd55dfa34d0eed8b27 | [
"MIT"
] | null | null | null | assets/js/functions.js | bomba65/Cement | 456c9a790dcd606d7ea2cdbd55dfa34d0eed8b27 | [
"MIT"
] | null | null | null | $( document ).ready(function() {
$('input[name="phoneNumber"]').inputmask("+9 (999) 999 99 99");
// Select all links with hashes
$('a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.click(function(event) {
// On-page links
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
&&
location.hostname == this.hostname
) {
if($('.navbar-collapse').hasClass('show')) {
$(this).parents('.navbar-collapse').collapse('hide');
};
// Figure out element to scroll to
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
// Does a scroll target exist?
if (target.length) {
// Only prevent default if animation is actually gonna happen
event.preventDefault();
$('html, body').animate({
scrollTop: target.offset().top -54
}, 1000)
return false;
}
}
});
});
function showFeedbackPopup() {
$("body").css("overflow-y", "hidden");
$("#modal-form").parent().fadeIn();
$("#modal-form").fadeIn();
}
function hideFeedbackPopup() {
$("body").css("overflow-y", "scroll");
$("#modal-form").parent().fadeOut();
$("#modal-form").fadeOut();
$("#modal-thanks").fadeOut();
}
// Get the modal
var feedback_modal = document.getElementById('feedback-modal');
// When the user clicks on <span> (x), close the modal
$(".close-popup").click(function() {
hideFeedbackPopup();
});
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == feedback_modal ) {
hideFeedbackPopup();
}
}
var hero
, sections = $('section')
, nav = $('nav');
$(window).on('scroll', function () {
var nav_height = nav.outerHeight();
var cur_pos = $(this).scrollTop();
sections.each(function() {
var top = $(this).offset().top - nav_height-1,
bottom = top + $(this).outerHeight();
if (cur_pos >= top && cur_pos <= bottom) {
nav.find('a').parent().removeClass('active');
sections.removeClass('active');
$(this).parent().addClass('active');
nav.find('a[href="#'+$(this).attr('id')+'"]').parent().addClass('active');
}
});
});
| 26.730337 | 81 | 0.556536 |
7362e0855518eab5131c43e75e4a228d1ce64bd7 | 598 | js | JavaScript | J055-weakset/get.js | TheVirtuoid/boringjavascript | b74e0e94458bd531e10657973cf7819c31df02ae | [
"MIT"
] | 1 | 2021-09-25T13:58:36.000Z | 2021-09-25T13:58:36.000Z | J055-weakset/get.js | war-man/boringjavascript | 68cc2fb59a0c999ca8256397dabb7e281b8372e1 | [
"MIT"
] | null | null | null | J055-weakset/get.js | war-man/boringjavascript | 68cc2fb59a0c999ca8256397dabb7e281b8372e1 | [
"MIT"
] | 1 | 2021-09-25T13:58:33.000Z | 2021-09-25T13:58:33.000Z | const myHouse = new WeakSet();
const cat = { name: 'Fluffy', age: 2 };
const dog = { name: 'Rover', age: 5 };
const lizard = { name: 'Larry', age: 3 };
myHouse.add(cat);
myHouse.add(dog);
console.log(`Is there a cat in my house?\t${myHouse.has(cat) ? 'Yes' : 'No'}`);
console.log(`Is there a dog in my house?\t${myHouse.has(dog) ? 'Yes' : 'No'}`);
console.log(`Is there a lizard in my house?\t${myHouse.has(lizard) ? 'Yes' : 'No'}`);
myHouse.delete(dog);
console.log('\n-------- The Dog Was Adopted ---------');
console.log(`Is there a dog in my house?\t${myHouse.has(dog) ? 'Yes' : 'No'}`);
| 31.473684 | 85 | 0.602007 |
73637c235d8af21cc4dfaffc6a4512debe8a585d | 10,392 | js | JavaScript | reactDemo-3/dist/bundle.js | guangxu2016/react | 58be7a6c92ff6113676a14de8d4c0b5a39210d7b | [
"Apache-2.0"
] | null | null | null | reactDemo-3/dist/bundle.js | guangxu2016/react | 58be7a6c92ff6113676a14de8d4c0b5a39210d7b | [
"Apache-2.0"
] | null | null | null | reactDemo-3/dist/bundle.js | guangxu2016/react | 58be7a6c92ff6113676a14de8d4c0b5a39210d7b | [
"Apache-2.0"
] | null | null | null | webpackJsonp([0],[,,,,,function(module,exports,__webpack_require__){"use strict";eval('\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = __webpack_require__(4);\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _demo = __webpack_require__(16);\n\nvar _demo2 = _interopRequireDefault(_demo);\n\nvar _asd = __webpack_require__(18);\n\nvar _asd2 = _interopRequireDefault(_asd);\n\nvar _zx = __webpack_require__(20);\n\nvar _zx2 = _interopRequireDefault(_zx);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// 引入css\n// import APP from "./app.css";\n\n_reactDom2.default.render(_react2.default.createElement(\n "div",\n null,\n _react2.default.createElement(_demo2.default, null),\n _react2.default.createElement(_asd2.default, null),\n _react2.default.createElement(_zx2.default, null)\n), document.getElementById("app")); // document.getElementById("app").innerHTML = "hello react"\n\n// 项目入口文件\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/app.js\n// module id = 5\n// module chunks = 0\n\n//# sourceURL=webpack:///./src/js/app.js?')},,,,,,,,,,,function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _app = __webpack_require__(17);\n\nvar _app2 = _interopRequireDefault(_app);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// extends继承\nvar Demo = function (_Component) {\n _inherits(Demo, _Component);\n\n function Demo() {\n _classCallCheck(this, Demo);\n\n return _possibleConstructorReturn(this, (Demo.__proto__ || Object.getPrototypeOf(Demo)).apply(this, arguments));\n }\n\n _createClass(Demo, [{\n key: "render",\n value: function render() {\n return _react2.default.createElement(\n "div",\n null,\n _react2.default.createElement(\n "h1",\n null,\n "djfhgv"\n ),\n _react2.default.createElement("img", { src: "../images/03.jpg", alt: "" })\n );\n }\n }]);\n\n return Demo;\n}(_react.Component);\n\nexports.default = Demo;\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/demo.js\n// module id = 16\n// module chunks = 0\n\n//# sourceURL=webpack:///./src/js/demo.js?')},function(module,exports){eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/app.css\n// module id = 17\n// module chunks = 0\n\n//# sourceURL=webpack:///./src/js/app.css?")},function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _asd = __webpack_require__(19);\n\nvar _asd2 = _interopRequireDefault(_asd);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// extends继承\nvar ASD = function (_Component) {\n _inherits(ASD, _Component);\n\n function ASD() {\n _classCallCheck(this, ASD);\n\n return _possibleConstructorReturn(this, (ASD.__proto__ || Object.getPrototypeOf(ASD)).apply(this, arguments));\n }\n\n _createClass(ASD, [{\n key: "render",\n value: function render() {\n return _react2.default.createElement(\n "div",\n null,\n _react2.default.createElement(\n "h2",\n null,\n "\\u5C71\\u4E1C"\n ),\n _react2.default.createElement("img", { src: "../images/04.jpg", alt: "" })\n );\n }\n }]);\n\n return ASD;\n}(_react.Component);\n\nexports.default = ASD;\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/asd.js\n// module id = 18\n// module chunks = 0\n\n//# sourceURL=webpack:///./src/js/asd.js?')},function(module,exports){eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/asd.css\n// module id = 19\n// module chunks = 0\n\n//# sourceURL=webpack:///./src/js/asd.css?")},function(module,exports,__webpack_require__){"use strict";eval('\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\n\nvar _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; }; }();\n\nvar _react = __webpack_require__(0);\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _zx = __webpack_require__(21);\n\nvar _zx2 = _interopRequireDefault(_zx);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// extends继承\nvar ZXC = function (_Component) {\n _inherits(ZXC, _Component);\n\n function ZXC() {\n _classCallCheck(this, ZXC);\n\n return _possibleConstructorReturn(this, (ZXC.__proto__ || Object.getPrototypeOf(ZXC)).apply(this, arguments));\n }\n\n _createClass(ZXC, [{\n key: "render",\n value: function render() {\n return _react2.default.createElement(\n "div",\n null,\n _react2.default.createElement(\n "h3",\n null,\n "sdfg"\n ),\n _react2.default.createElement("img", { src: "../images/05.jpg", alt: "" })\n );\n }\n }]);\n\n return ZXC;\n}(_react.Component);\n\nexports.default = ZXC;\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/zx.js\n// module id = 20\n// module chunks = 0\n\n//# sourceURL=webpack:///./src/js/zx.js?')},function(module,exports){eval("// removed by extract-text-webpack-plugin\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/js/zx.css\n// module id = 21\n// module chunks = 0\n\n//# sourceURL=webpack:///./src/js/zx.css?")}],[5]); | 10,392 | 10,392 | 0.67398 |
73647e378732ca10fbedd6ad1e092f7fdcf8d25b | 781 | js | JavaScript | amf-client/shared/src/test/resources/org/raml/parser/types/simple-inheritance/output.txt.js | kdubb/amf | 9c59c2db64e90a10a86ba905cb25972d21f534b1 | [
"Apache-2.0"
] | 57 | 2018-06-15T21:21:38.000Z | 2022-02-02T02:35:37.000Z | amf-client/shared/src/test/resources/org/raml/parser/types/simple-inheritance/output.txt.js | kdubb/amf | 9c59c2db64e90a10a86ba905cb25972d21f534b1 | [
"Apache-2.0"
] | 431 | 2018-07-13T12:39:54.000Z | 2022-03-31T09:35:56.000Z | amf-client/shared/src/test/resources/org/raml/parser/types/simple-inheritance/output.txt.js | kdubb/amf | 9c59c2db64e90a10a86ba905cb25972d21f534b1 | [
"Apache-2.0"
] | 33 | 2018-10-10T07:36:55.000Z | 2021-11-26T13:26:10.000Z | Model: file://amf-client/shared/src/test/resources/org/raml/parser/types/simple-inheritance/input.raml
Profile: RAML 1.0
Conforms? false
Number of results: 1
Level: Violation
- Source: http://a.ml/vocabularies/amf/validation#example-validation-error
Message: age should be >= 0
Level: Violation
Target: file://amf-client/shared/src/test/resources/org/raml/parser/types/simple-inheritance/input.raml#/declarations/types/Office/example/default-example
Property: file://amf-client/shared/src/test/resources/org/raml/parser/types/simple-inheritance/input.raml#/declarations/types/Office/example/default-example
Position: Some(LexicalInformation([(16,12)-(20,13)]))
Location: file://amf-client/shared/src/test/resources/org/raml/parser/types/simple-inheritance/input.raml
| 52.066667 | 158 | 0.791293 |
7364cb4d0264f848860a5ca3150014cc3d4fda25 | 240 | js | JavaScript | app/containers/NotFoundPage/tests/selectors.test.js | raghavrv98/GST_with_React | a938cfa349e368879770813acaa200e68584deef | [
"MIT"
] | null | null | null | app/containers/NotFoundPage/tests/selectors.test.js | raghavrv98/GST_with_React | a938cfa349e368879770813acaa200e68584deef | [
"MIT"
] | 3 | 2020-07-20T05:46:07.000Z | 2022-03-26T12:13:15.000Z | app/containers/NotFoundPage/tests/selectors.test.js | raghavrv98/GST_with_React | a938cfa349e368879770813acaa200e68584deef | [
"MIT"
] | null | null | null | // import { fromJS } from 'immutable';
// import { selectNotFoundPageDomain } from '../selectors';
describe('selectNotFoundPageDomain', () => {
it('Expect to have unit tests specified', () => {
expect(true).toEqual(false);
});
});
| 26.666667 | 59 | 0.641667 |
73651a8f55ca10216920a378d879f6e9d7991c07 | 560 | js | JavaScript | example/server.js | mauropuravida/testrepo | c6534744fec1b799ffec65dc00a81efb6be3599b | [
"MIT"
] | null | null | null | example/server.js | mauropuravida/testrepo | c6534744fec1b799ffec65dc00a81efb6be3599b | [
"MIT"
] | null | null | null | example/server.js | mauropuravida/testrepo | c6534744fec1b799ffec65dc00a81efb6be3599b | [
"MIT"
] | null | null | null | var http = require('http');
var ecstatic = require('ecstatic');
var server, statics = ecstatic(__dirname, { cache: false });
var server = http.createServer(function (req, res) {
console.log(req.method + ' ' + req.url);
statics(req, res, function() {
req.url = '/';
req.statusCode = 200;
statics(req, res);
});
});
server.listen(process.env.PORT || 8080, process.env.HOST || '::', function (err) {
if (err) return console.error('failed to start http server:', err);
console.log('server listening on ' + (process.env.PORT || 8080));
});
| 29.473684 | 82 | 0.635714 |
7365372b5e0a4fc80aed86a467fc40ac1e8a593b | 8,205 | js | JavaScript | src/main/resources/static/javascript/jserr.js | MagikLau/WeChatPlatformApplication | 3714d549155f29bd50c8c3152c8e30e2210e4953 | [
"Apache-2.0"
] | 14 | 2018-03-03T02:46:43.000Z | 2019-09-23T06:16:18.000Z | src/main/resources/static/javascript/jserr.js | MagikLau/WeChatPlatformApplication | 3714d549155f29bd50c8c3152c8e30e2210e4953 | [
"Apache-2.0"
] | 1 | 2018-05-05T03:32:26.000Z | 2018-05-08T14:49:46.000Z | src/main/resources/static/javascript/jserr.js | MagikLau/WeChatPlatformApplication | 3714d549155f29bd50c8c3152c8e30e2210e4953 | [
"Apache-2.0"
] | null | null | null | var BJ_REPORT=function(e){
function n(){
if(t.id!=S.IDS.DEFAULT||t.key!=S.KEY)return{
id:t.id,
key:t.key
};
var e={
_href:location.href,
href:location.href.replace("https://mp.weixin.qq.com/","")
};
e.cgi=e.href.indexOf("?")>-1?e.href.match(/.*?\?/g)[0].slice(0,-1):e.href;
var n=(e.href+"&").match(/action\=(.*?)&/);
n&&n[1]&&(e.action=n[1]);
var i=S.IDS.DEFAULT,r=S.KEY;
return"cgi-bin/masssendpage"==e.cgi?(i=S.IDS.MASS,r=66):"advanced/autoreply"==e.cgi?(i=S.IDS.AUTO_REPLY,
r=70):"advanced/selfmenu"==e.cgi?(i=S.IDS.SELF_MENU,r=68):"misc/appmsgcomment"==e.cgi?(i=S.IDS.COMMENT,
r=71):"cgi-bin/newoperatevote"==e.cgi?(i=S.IDS.VOTE,r=72):"misc/kf"==e.cgi?(i=S.IDS.KF,
r=73):"merchant/rewardstat"==e.cgi||"merchant/reward"==e.cgi?(i=S.IDS.REWARD,r=74):"cgi-bin/appmsgcopyright"==e.cgi||"cgi-bin/imgcopyright"==e.cgi||"cgi-bin/ori_video"==e.cgi?(i=S.IDS.COPYRIGHT,
r=75):"cgi-bin/message"==e.cgi?(i=S.IDS.MSG,r=76):"cgi-bin/user_tag"==e.cgi?(i=S.IDS.USER,
r=77):"cgi-bin/appmsg"==e.cgi&&("list_card"==e.action||"list"==e.action)||"cgi-bin/filepage"==e.cgi?(i=S.IDS.LIST,
r=78):"cgi-bin/operate_voice"==e.cgi?(i=S.IDS.AUDIO,r=79):"cgi-bin/appmsg"==e.cgi&&"video_edit"==e.action?(i=S.IDS.VEDIO,
r=80):"cgi-bin/appmsg"==e.cgi&&"edit"==e.action?(i=S.IDS.APPMSG,r=62):"cgi-bin/frame"==e.cgi&&/t=ad_system/.test(e.href)||/merchant\/ad_/.test(e.cgi)?(i=S.IDS.AD,
r=81):"misc/useranalysis"==e.cgi||"misc/appmsganalysis"==e.cgi||"misc/menuanalysis"==e.cgi||"misc/messageanalysis"==e.cgi||"misc/interfaceanalysis"==e.cgi?(i=S.IDS.ANALYSIS,
r=82):"cgi-bin/settingpage"==e.cgi||"acct/contractorinfo"==e.cgi?(i=S.IDS.SETTING,
r=83):"merchant/store"==e.cgi||"merchant/order"==e.cgi||"acct/wxverify"==e.cgi?(i=S.IDS.VERIFY,
r=84):"cgi-bin/safecenterstatus"==e.cgi?(i=S.IDS.SAFE,r=85):"cgi-bin/illegalrecord"==e.cgi?(i=S.IDS.ILLEGAL,
r=86):"advanced/advanced"==e.cgi||"advanced/diagram"==e.cgi||"cgi-bin/frame"==e.cgi&&/t=advanced\/dev_tools_frame/.test(e.href)?(i=S.IDS.ADVANCED,
r=87):"acct/contractorpage"==e.cgi?(i=S.IDS.REGISTER,r=88):"cgi-bin/readtemplate"==e.cgi?(i=S.IDS.TMPL,
r=89):"advanced/tmplmsg"==e.cgi?(i=S.IDS.TMPLMSG,r=90):"merchant/entityshop"==e.cgi||"merchant/newentityshop"==e.cgi?(i=S.IDS.SHOP,
r=92):"merchant/goods"==e.cgi||"merchant/goodsgroup"==e.cgi||"merchant/shelf"==e.cgi||"merchant/goodsimage"==e.cgi||"merchant/delivery"==e.cgi||"merchant/productorder"==e.cgi||"merchant/merchantstat"==e.cgi||"merchant/introduction"==e.cgi||"merchant/merchantpush"==e.cgi||"merchant/merchantentrance"==e.cgi?(i=S.IDS.MERCHANT,
r=104):"cgi-bin/home"==e.cgi?(i=S.IDS.HOME,r=93):"merchant/cardapply"==e.cgi&&"listapply"==e.action?r=95:e.cgi.indexOf("beacon")>-1&&(i=S.IDS.IBEACON,
r=96),wx&&"en_US"==wx.lang&&(i=125,r=125),t.id=i,t.key=r,{
id:i,
key:r
};
}
function i(e,n){
return e.indexOf("TypeError: #<KeyboardEvent> is not a function")>-1||e.indexOf("TypeError: #<MouseEvent> is not a function")>-1?!1:e.indexOf("ReferenceError: LIST_INFO is not defined")>-1?!1:e.indexOf("TypeError: e is not a constructor")>-1?!1:location&&/token=\d+/.test(location.href)&&"0"==wx.uin?!1:/Mozilla\/5.0.*ipad.*BaiduHD/i.test(n)&&e.indexOf("ReferenceError: Can't find variable: bds")>-1?!1:/Linux; U; Android.*letv/i.test(n)&&e.indexOf("ReferenceError: diableNightMode is not defined")>-1?!1:!0;
}
if(e.BJ_REPORT)return e.BJ_REPORT;
var r=[],t={
uin:0,
url:"https://badjs.weixinbridge.com/badjs",
combo:0,
level:4,
ignore:[],
random:1,
delay:0,
submit:null
},c=function(e,n){
return Object.prototype.toString.call(e)==="[object "+(n||"Object")+"]";
},o=function(e){
var n=typeof e;
return"object"===n&&!!e;
},a=function(e){
return null===e?!0:c(e,"Number")?!1:!e;
},g=e.onerror;
e.onerror=function(n,r,t,o,a){
var s=n;
a&&a.stack&&(s=d(a)),c(s,"Event")&&(s+=s.type?"--"+s.type+"--"+(s.target?s.target.tagName+"::"+s.target.src:""):""),
r&&r.length>0&&0==/^https\:\/\/(mp\.weixin\.qq\.com|res\.wx\.qq\.com)/.test(r),(1!=t||1!=o&&86!=o||-1!=n.indexOf("eval"))&&0!=i(s,window.navigator.userAgent)&&(S.push({
msg:s+"|onerror",
target:r,
rowNum:t,
colNum:o
}),I(),g&&g.apply(e,arguments));
};
var s=function(e){
try{
if(e.stack){
var n=e.stack.match("https?://[^\n]+");
n=n?n[0]:"";
var r=n.match(":(\\d+):(\\d+)");
r||(r=[0,0,0]);
var t=d(e).replace(/https?\:\/\/.*?\.js\:/g,"");
return 0==i(t,window.navigator.userAgent)?null:{
msg:t,
rowNum:r[1],
colNum:r[2],
target:n.replace(r[0],"")
};
}
return e;
}catch(c){
return e;
}
},d=function(e){
var n=e.stack.replace(/\n/gi,"").split(/\bat\b/).slice(0,5).join("@").replace(/\?[^:]+/gi,""),i=e.toString();
return n.indexOf(i)<0&&(n=i+"@"+n),n;
},m=function(e,n){
var i=[],r=[],c=[];
if(o(e)){
e.level=e.level||t.level;
for(var g in e){
var s=e[g];
if(!a(s)){
if(o(s))try{
s=JSON.stringify(s);
}catch(d){
s="[BJ_REPORT detect value stringify error] "+d.toString();
}
c.push(g+":"+s),i.push(g+"="+encodeURIComponent(s)),r.push(g+"["+n+"]="+encodeURIComponent(s));
}
}
}
return[r.join("&"),c.join(","),i.join("&")];
},u=[],l=[],f=function(e){
var n=e.replace(/\&_t=\d*/,"");
for(var i in l)if(l[i]==n)return;
if(l.push(n),t.submit)t.submit(e);else{
var r=new Image;
u.push(r),r.src=e;
}
var c="error";
if(c=e.match(/msg=(.*?)&/),c&&c[1]&&(c=c[1]),wx&&wx.uin&&(c+=encodeURIComponent("|uin|"+wx.uin)),
t.key){
var r=new Image;
r.src="https://mp.weixin.qq.com/misc/jslog?id="+t.key+"&content="+c+"&level=error";
}
var o=new Image;
o.src="https://mp.weixin.qq.com/misc/jslog?id=65&content="+c+"&level=error";
},p=[],h=0,I=function(e){
if(t.report){
for(;r.length;){
var n=!1,i=r.shift(),o=m(i,p.length);
if(c(t.ignore,"Array"))for(var a=0,g=t.ignore.length;g>a;a++){
var s=t.ignore[a];
if(c(s,"RegExp")&&s.test(o[1])||c(s,"Function")&&s(i,o[1])){
n=!0;
break;
}
}
n||(t.combo?p.push(o[0]):f(t.report+o[2]+"&_t="+ +new Date),t.onReport&&t.onReport(t.id,i));
}
var d=p.length;
if(d){
var u=function(){
clearTimeout(h),console.log("comboReport"+p.join("&")),f(t.report+p.join("&")+"&count="+d+"&_t="+ +new Date),
h=0,p=[];
};
e?u():h||(h=setTimeout(u,t.delay,!0),console.log("_config.delay"+t.delay));
}
}
},S={
KEY:67,
IDS:{
DEFAULT:"5",
MASS:"6",
SELF_MENU:"7",
LINK:"11",
AUTO_REPLY:"12",
COMMENT:"13",
VOTE:"14",
KF:"15",
REWARD:"16",
COPYRIGHT:"17",
MSG:"18",
USER:"19",
LIST:"20",
AUDIO:"21",
VEDIO:"22",
APPMSG:"4",
AD:"23",
ANALYSIS:"24",
SETTING:"25",
VERIFY:"26",
SAFE:"27",
ILLEGAL:"28",
ADVANCED:"29",
REGISTER:"30",
TMPL:"31",
IE:"32",
CARD:"33",
SHOP:"34",
TMPLMSG:"35",
HOME:"36",
Android:"37",
IOS:"38",
IBEACON:"72",
MERCHANT:"82"
},
destory:function(){
I=function(){};
},
push:function(e,n){
if(Math.random()>=t.random)return S;
var i;
if(o(e)){
if(i=s(e),n&&(i.msg+="["+n+"]"),i){
if(i.target&&0==/^https?\:\/\/(mp\.weixin\.qq\.com|res\.wx\.qq\.com)/.test(i.target))return S;
r.push(i);
}
}else n&&(e+="["+n+"]"),r.push({
msg:e
});
return I(),S;
},
report:function(e,n){
return e&&S.push(e,n),S;
},
info:function(e){
return e?(o(e)?e.level=2:e={
msg:e,
level:2
},S.push(e),S):S;
},
debug:function(e){
return e?(o(e)?e.level=1:e={
msg:e,
level:1
},S.push(e),S):S;
},
init:function(e){
for(var n in e)t[n]=e[n];
var i=parseInt(t.id,10),n=parseInt(t.key,10);
return window.navigator.userAgent&&/;\s*MSIE\s*[8|7]\.0b?;/i.test(window.navigator.userAgent)?(i=S.IDS.IE,
n=0):window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Adr")>-1?(i=S.IDS.Android,
n=0):window.navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)&&(i=S.IDS.IOS,
n=0),i&&n&&(t.report=t.url+"?id="+i+"&key="+n+"&uin="+(wx&&wx.uin)+"&from="+encodeURIComponent(location.href)+"&"),
S;
},
monitor:function(e,n,i){
if(n=n||"badjs|monitor",e){
var r=new Image;
r.src="https://mp.weixin.qq.com/misc/jslog?id="+e+"&content="+encodeURIComponent(n)+"&level=error";
}
if(i){
var c=new Image;
c.src=t.url+"?id="+i+"&msg="+encodeURIComponent(n)+"&uin="+(wx&&wx.uin)+"&from="+encodeURIComponent(location.href)+"&level=4";
}
},
getConfig:function(){
return t;
},
__onerror__:e.onerror
};
return"undefined"!=typeof console&&console.error&&setTimeout(function(){
var e=((location.hash||"").match(/([#&])BJ_ERROR=([^&$]+)/)||[])[2];
e&&console.error("BJ_ERROR",decodeURIComponent(e).replace(/(:\d+:\d+)\s*/g,"$1\n"));
},0,!0),t.id=S.IDS.DEFAULT,t.key=S.KEY,n(),S.init(),S;
}(window); | 34.045643 | 508 | 0.628154 |
736582aec15d036bb0ef94c1c8018bdaa497efbd | 1,051 | js | JavaScript | src/Sections/IndexPage/MainSection.js | Chanakya888/Capital-Square-Partners | 0e36596a6d5994f80364479fbc2834195f110a94 | [
"MIT"
] | null | null | null | src/Sections/IndexPage/MainSection.js | Chanakya888/Capital-Square-Partners | 0e36596a6d5994f80364479fbc2834195f110a94 | [
"MIT"
] | null | null | null | src/Sections/IndexPage/MainSection.js | Chanakya888/Capital-Square-Partners | 0e36596a6d5994f80364479fbc2834195f110a94 | [
"MIT"
] | null | null | null | import React from "react"
import { graphql, useStaticQuery } from "gatsby"
import Img from "gatsby-image"
import ButtonComponent from "../../Components/ButtonComponent"
const MainSection = () => {
const data = useStaticQuery(graphql`
query {
file(relativePath: { eq: "main-section.jpg" }) {
childImageSharp {
fluid(maxWidth: 2000) {
...GatsbyImageSharpFluid
}
}
}
}
`)
console.log(data)
return (
<div>
<div className="pt-24 px-5 sm:px-10">
<h1 className="text-6xl leading-h1LineHeight sm:w-4/5 ">
Equity investment for serious businesses and investors alike.
</h1>
<ButtonComponent
title="Get in touch with us"
function="send"
color="black"
/>
</div>
<div className="pt-32">
<Img
fluid={data.file.childImageSharp.fluid}
alt="this is the people walking"
></Img>
</div>
</div>
)
}
export default MainSection
// export const query =
| 23.886364 | 71 | 0.569933 |
7365b04f7817c2949c466187fffff553a3ff751f | 5,006 | js | JavaScript | web/dojo/dojox/layout/ScrollPane.js | luisza/vcl | edb7b2a745b16f2a3a41ed01aa80212b07ced226 | [
"Apache-2.0"
] | null | null | null | web/dojo/dojox/layout/ScrollPane.js | luisza/vcl | edb7b2a745b16f2a3a41ed01aa80212b07ced226 | [
"Apache-2.0"
] | null | null | null | web/dojo/dojox/layout/ScrollPane.js | luisza/vcl | edb7b2a745b16f2a3a41ed01aa80212b07ced226 | [
"Apache-2.0"
] | null | null | null | /*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dojox.layout.ScrollPane"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["dojox.layout.ScrollPane"] = true;
dojo.provide("dojox.layout.ScrollPane");
dojo.experimental("dojox.layout.ScrollPane");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit._Templated");
dojo.declare("dojox.layout.ScrollPane",
[dijit.layout.ContentPane, dijit._Templated],
{
// summary: A pane that "scrolls" its content based on the mouse poisition inside
//
// description:
// A sizable container that takes it's content's natural size and creates
// a scroll effect based on the relative mouse position. It is an interesting
// way to display lists of data, or blocks of content, within a confined
// space.
//
// Horizontal scrolling is supported. Combination scrolling is not.
//
// FIXME: need to adust the _line somehow, it stops scrolling
//
// example:
// | <div dojoType="dojox.layout.ScrollPane" style="width:150px height:300px;">
// | <!-- any height content -->
// | </div>
//
// _line: dojo._Line
// storage for our top and bottom most scrollpoints
_line: null,
// _lo: the height of the visible pane
_lo: null,
_offset: 15,
// orientation: String
// either "horizontal" or "vertical" for scroll orientation.
orientation: "vertical",
// alwaysShow: Boolean
// whether the scroll helper should hide when mouseleave
autoHide: true,
templateString: dojo.cache("dojox.layout", "resources/ScrollPane.html", "<div class=\"dojoxScrollWindow\" dojoAttachEvent=\"onmouseenter: _enter, onmouseleave: _leave\">\n <div class=\"dojoxScrollWrapper\" style=\"${style}\" dojoAttachPoint=\"wrapper\" dojoAttachEvent=\"onmousemove: _calc\">\n\t<div class=\"dojoxScrollPane\" dojoAttachPoint=\"containerNode\"></div>\n </div>\n <div dojoAttachPoint=\"helper\" class=\"dojoxScrollHelper\"><span class=\"helperInner\">|</span></div>\n</div>\n"),
resize: function(size){
// summary: calculates required sizes. Call this if you add/remove content manually, or reload the content.
// if size is passed, it means we need to take care of sizing ourself (this is for IE<8)
if(size){
if(size.h){
dojo.style(this.domNode,'height',size.h+'px');
}
if(size.w){
dojo.style(this.domNode,'width',size.w+'px');
}
}
var dir = this._dir,
vert = this._vertical,
val = this.containerNode[(vert ? "scrollHeight" : "scrollWidth")];
dojo.style(this.wrapper, this._dir, this.domNode.style[this._dir]);
this._lo = dojo.coords(this.wrapper, true);
this._size = Math.max(0, val - this._lo[(vert ? "h" : "w")]);
if(!this._size){
this.helper.style.display="none";
//make sure we reset scroll position, otherwise the content may be hidden
this.wrapper[this._scroll]=0;
return;
}else{
this.helper.style.display="";
}
this._line = new dojo._Line(0 - this._offset, this._size + (this._offset * 2));
// share a relative position w the scroll offset via a line
var u = this._lo[(vert ? "h" : "w")],
r = Math.min(1, u / val), // ratio
s = u * r, // size
c = Math.floor(u - (u * r)); // center
this._helpLine = new dojo._Line(0, c);
// size the helper
dojo.style(this.helper, dir, Math.floor(s) + "px");
},
postCreate: function(){
this.inherited(arguments);
// for the helper
if(this.autoHide){
this._showAnim = dojo._fade({ node:this.helper, end:0.5, duration:350 });
this._hideAnim = dojo.fadeOut({ node:this.helper, duration: 750 });
}
// orientation helper
this._vertical = (this.orientation == "vertical");
if(!this._vertical){
dojo.addClass(this.containerNode,"dijitInline");
this._dir = "width";
this._edge = "left";
this._scroll = "scrollLeft";
}else{
this._dir = "height";
this._edge = "top";
this._scroll = "scrollTop";
}
if(this._hideAnim){
this._hideAnim.play();
}
dojo.style(this.wrapper,"overflow","hidden");
},
_set: function(/* Float */n){
if(!this._size){ return; }
// summary: set the pane's scroll offset, and position the virtual scroll helper
this.wrapper[this._scroll] = Math.floor(this._line.getValue(n));
dojo.style(this.helper, this._edge, Math.floor(this._helpLine.getValue(n)) + "px");
},
_calc: function(/* Event */e){
// summary: calculate the relative offset of the cursor over the node, and call _set
if(!this._lo){ this.resize(); }
this._set(this._vertical ?
((e.pageY - this._lo.y) / this._lo.h) :
((e.pageX - this._lo.x) / this._lo.w)
);
},
_enter: function(e){
if(this._hideAnim){
if(this._hideAnim.status() == "playing"){
this._hideAnim.stop();
}
this._showAnim.play();
}
},
_leave: function(e){
if(this._hideAnim){
this._hideAnim.play();
}
}
});
}
| 31.484277 | 504 | 0.667998 |
7365cdec083c1a0ac48393a2a8cc8fc0ef01114f | 5,403 | js | JavaScript | 20211SVAC/G35/js/app.e473ad58.js | 201503702/tytusx | 1569735832bab7ab8b6e396912f5d61dec777425 | [
"MIT"
] | null | null | null | 20211SVAC/G35/js/app.e473ad58.js | 201503702/tytusx | 1569735832bab7ab8b6e396912f5d61dec777425 | [
"MIT"
] | null | null | null | 20211SVAC/G35/js/app.e473ad58.js | 201503702/tytusx | 1569735832bab7ab8b6e396912f5d61dec777425 | [
"MIT"
] | null | null | null | (function(e){function t(t){for(var n,o,i=t[0],c=t[1],s=t[2],l=0,f=[];l<i.length;l++)o=i[l],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&f.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);p&&p(t);while(f.length)f.shift()();return u.push.apply(u,s||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var i=r[o];0!==a[i]&&(n=!1)}n&&(u.splice(t--,1),e=c(c.s=r[0]))}return e}var n={},o={1:0},a={1:0},u=[];function i(e){return c.p+"js/"+({}[e]||e)+"."+{2:"c96346eb",3:"996a1826",4:"efd95bd9"}[e]+".js"}function c(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.l=!0,r.exports}c.e=function(e){var t=[],r={2:1};o[e]?t.push(o[e]):0!==o[e]&&r[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="css/"+({}[e]||e)+"."+{2:"deeace4f",3:"31d6cfe0",4:"31d6cfe0"}[e]+".css",a=c.p+n,u=document.getElementsByTagName("link"),i=0;i<u.length;i++){var s=u[i],l=s.getAttribute("data-href")||s.getAttribute("href");if("stylesheet"===s.rel&&(l===n||l===a))return t()}var f=document.getElementsByTagName("style");for(i=0;i<f.length;i++){s=f[i],l=s.getAttribute("data-href");if(l===n||l===a)return t()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=t,p.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],p.parentNode.removeChild(p),r(u)},p.href=a;var d=document.getElementsByTagName("head")[0];d.appendChild(p)})).then((function(){o[e]=0})));var n=a[e];if(0!==n)if(n)t.push(n[2]);else{var u=new Promise((function(t,r){n=a[e]=[t,r]}));t.push(n[2]=u);var s,l=document.createElement("script");l.charset="utf-8",l.timeout=120,c.nc&&l.setAttribute("nonce",c.nc),l.src=i(e);var f=new Error;s=function(t){l.onerror=l.onload=null,clearTimeout(p);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",f.name="ChunkLoadError",f.type=n,f.request=o,r[1](f)}a[e]=void 0}};var p=setTimeout((function(){s({type:"timeout",target:l})}),12e4);l.onerror=l.onload=s,document.head.appendChild(l)}return Promise.all(t)},c.m=e,c.c=n,c.d=function(e,t,r){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(c.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(r,n,function(t){return e[t]}.bind(null,n));return r},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="",c.oe=function(e){throw console.error(e),e};var s=window["webpackJsonp"]=window["webpackJsonp"]||[],l=s.push.bind(s);s.push=t,s=s.slice();for(var f=0;f<s.length;f++)t(s[f]);var p=l;u.push([2,0]),r()})({"0047":function(e,t,r){},2:function(e,t,r){e.exports=r("2f39")},"2f39":function(e,t,r){"use strict";r.r(t);var n=r("c973"),o=r.n(n),a=(r("96cf"),r("5c7d"),r("7d6e"),r("e54f"),r("985d"),r("0047"),r("2b0e")),u=r("1f91"),i=r("42d2"),c=r("b05d"),s=r("2a19");a["a"].use(c["a"],{config:{},lang:u["a"],iconSet:i["a"],plugins:{Notify:s["a"]}});var l=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"q-app"}},[r("router-view")],1)},f=[],p={name:"App"},d=p,h=r("2877"),m=Object(h["a"])(d,l,f,!1,null,null,null),v=m.exports,b=r("2f62");a["a"].use(b["a"]);var g=function(){var e=new b["a"].Store({modules:{},strict:!1});return e},y=r("8c4f"),w=(r("e260"),r("d3b7"),r("e6cf"),r("3ca3"),r("ddb0"),[{path:"/",component:function(){return Promise.all([r.e(0),r.e(3)]).then(r.bind(null,"713b"))},children:[{path:"",component:function(){return Promise.all([r.e(0),r.e(2)]).then(r.bind(null,"8b24"))}}]},{path:"*",component:function(){return Promise.all([r.e(0),r.e(4)]).then(r.bind(null,"e51e"))}}]),x=w;a["a"].use(y["a"]);var k=function(){var e=new y["a"]({scrollBehavior:function(){return{x:0,y:0}},routes:x,mode:"hash",base:""});return e},O=function(){return P.apply(this,arguments)};function P(){return P=o()(regeneratorRuntime.mark((function e(){var t,r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("function"!==typeof g){e.next=6;break}return e.next=3,g({Vue:a["a"]});case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=g;case 7:if(t=e.t0,"function"!==typeof k){e.next=14;break}return e.next=11,k({Vue:a["a"],store:t});case 11:e.t1=e.sent,e.next=15;break;case 14:e.t1=k;case 15:return r=e.t1,t.$router=r,n={router:r,store:t,render:function(e){return e(v)}},n.el="#q-app",e.abrupt("return",{app:n,store:t,router:r});case 20:case"end":return e.stop()}}),e)}))),P.apply(this,arguments)}function j(){return S.apply(this,arguments)}function S(){return S=o()(regeneratorRuntime.mark((function e(){var t,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,O();case 2:t=e.sent,r=t.app,t.store,t.router,new a["a"](r);case 7:case"end":return e.stop()}}),e)}))),S.apply(this,arguments)}j()}}); | 5,403 | 5,403 | 0.644642 |
73674a033990fc0301e014eebcdc53cb9be4d19d | 1,207 | js | JavaScript | web/modules/contrib/layout_builder_restrictions/modules/layout_builder_restrictions_by_region/js/display_mode_form.js | Tuyuyi99/Curso-Drupal | 8bac2824ba9ff5a9a6c6ad90fee58671e41bccb5 | [
"MIT"
] | null | null | null | web/modules/contrib/layout_builder_restrictions/modules/layout_builder_restrictions_by_region/js/display_mode_form.js | Tuyuyi99/Curso-Drupal | 8bac2824ba9ff5a9a6c6ad90fee58671e41bccb5 | [
"MIT"
] | null | null | null | web/modules/contrib/layout_builder_restrictions/modules/layout_builder_restrictions_by_region/js/display_mode_form.js | Tuyuyi99/Curso-Drupal | 8bac2824ba9ff5a9a6c6ad90fee58671e41bccb5 | [
"MIT"
] | null | null | null | (function ($, Drupal) {
Drupal.behaviors.layoutBuilderRestrictionsByRegion = {
attach: function (context, settings) {
// On page load.
$( 'input.restriction-type:checked').each(function() {
displayToggle(this);
});
// On change of restrictions radios.
$( 'input.restriction-type', context ).change(function(e) {
displayToggle(this);
});
function displayToggle(element) {
var layoutPlugin = $(element).attr('data-layout-plugin');
if ($(element).val() == 'all') {
$( 'details[data-layout-plugin="' + layoutPlugin + '"] tbody tr[data-region="all_regions"]', context ).removeClass('hidden');
$( 'details[data-layout-plugin="' + layoutPlugin + '"] tbody tr:not([data-region="all_regions"])', context ).addClass('hidden');
}
else if ($(element).val() == 'per-region') {
$( 'details[data-layout-plugin="' + layoutPlugin + '"] tbody tr[data-region="all_regions"]', context ).addClass('hidden');
$( 'details[data-layout-plugin="' + layoutPlugin + '"] tbody tr:not([data-region="all_regions"])', context ).removeClass('hidden');
}
}
}
};
})(jQuery, Drupal);
| 41.62069 | 141 | 0.591549 |
736a37ec60d60955b5ce0f9a1ee0973c4f7990f5 | 3,202 | js | JavaScript | src/objects/Spring.js | DefinitelyMaybe/cannon_4_deno | bdee0cb7762ae86adc7767150d4789cd397a77b0 | [
"MIT"
] | null | null | null | src/objects/Spring.js | DefinitelyMaybe/cannon_4_deno | bdee0cb7762ae86adc7767150d4789cd397a77b0 | [
"MIT"
] | null | null | null | src/objects/Spring.js | DefinitelyMaybe/cannon_4_deno | bdee0cb7762ae86adc7767150d4789cd397a77b0 | [
"MIT"
] | null | null | null | /// <reference types="./Spring.ts" />
/// <reference lib="dom" />
import { Vec3 } from "../math/Vec3.js";
export class Spring {
constructor(bodyA, bodyB, options = {}) {
this.restLength = typeof options.restLength === "number"
? options.restLength
: 1;
this.stiffness = options.stiffness || 100;
this.damping = options.damping || 1;
this.bodyA = bodyA;
this.bodyB = bodyB;
this.localAnchorA = new Vec3();
this.localAnchorB = new Vec3();
if (options.localAnchorA) {
this.localAnchorA.copy(options.localAnchorA);
}
if (options.localAnchorB) {
this.localAnchorB.copy(options.localAnchorB);
}
if (options.worldAnchorA) {
this.setWorldAnchorA(options.worldAnchorA);
}
if (options.worldAnchorB) {
this.setWorldAnchorB(options.worldAnchorB);
}
}
setWorldAnchorA(worldAnchorA) {
this.bodyA.pointToLocalFrame(worldAnchorA, this.localAnchorA);
}
setWorldAnchorB(worldAnchorB) {
this.bodyB.pointToLocalFrame(worldAnchorB, this.localAnchorB);
}
getWorldAnchorA(result) {
this.bodyA.pointToWorldFrame(this.localAnchorA, result);
}
getWorldAnchorB(result) {
this.bodyB.pointToWorldFrame(this.localAnchorB, result);
}
applyForce() {
const k = this.stiffness;
const d = this.damping;
const l = this.restLength;
const bodyA = this.bodyA;
const bodyB = this.bodyB;
const r = applyForce_r;
const r_unit = applyForce_r_unit;
const u = applyForce_u;
const f = applyForce_f;
const tmp = applyForce_tmp;
const worldAnchorA = applyForce_worldAnchorA;
const worldAnchorB = applyForce_worldAnchorB;
const ri = applyForce_ri;
const rj = applyForce_rj;
const ri_x_f = applyForce_ri_x_f;
const rj_x_f = applyForce_rj_x_f;
this.getWorldAnchorA(worldAnchorA);
this.getWorldAnchorB(worldAnchorB);
worldAnchorA.vsub(bodyA.position, ri);
worldAnchorB.vsub(bodyB.position, rj);
worldAnchorB.vsub(worldAnchorA, r);
const rlen = r.length();
r_unit.copy(r);
r_unit.normalize();
bodyB.velocity.vsub(bodyA.velocity, u);
bodyB.angularVelocity.cross(rj, tmp);
u.vadd(tmp, u);
bodyA.angularVelocity.cross(ri, tmp);
u.vsub(tmp, u);
r_unit.scale(-k * (rlen - l) - d * u.dot(r_unit), f);
bodyA.force.vsub(f, bodyA.force);
bodyB.force.vadd(f, bodyB.force);
ri.cross(f, ri_x_f);
rj.cross(f, rj_x_f);
bodyA.torque.vsub(ri_x_f, bodyA.torque);
bodyB.torque.vadd(rj_x_f, bodyB.torque);
}
}
const applyForce_r = new Vec3();
const applyForce_r_unit = new Vec3();
const applyForce_u = new Vec3();
const applyForce_f = new Vec3();
const applyForce_worldAnchorA = new Vec3();
const applyForce_worldAnchorB = new Vec3();
const applyForce_ri = new Vec3();
const applyForce_rj = new Vec3();
const applyForce_ri_x_f = new Vec3();
const applyForce_rj_x_f = new Vec3();
const applyForce_tmp = new Vec3();
| 35.577778 | 70 | 0.624922 |
736ad4583ce28385c5e9048f8c16027319dc3709 | 99 | js | JavaScript | static/js/whyis_vue/components/table-view/index.js | tolulomo/whyis | eb50ab3301eb7efd27a1a3f6fb2305dedd910397 | [
"Apache-2.0"
] | 31 | 2018-05-30T02:41:23.000Z | 2021-10-17T01:25:20.000Z | static/js/whyis_vue/components/table-view/index.js | tolulomo/whyis | eb50ab3301eb7efd27a1a3f6fb2305dedd910397 | [
"Apache-2.0"
] | 115 | 2018-04-07T00:59:11.000Z | 2022-03-02T03:06:45.000Z | static/js/whyis_vue/components/table-view/index.js | tolulomo/whyis | eb50ab3301eb7efd27a1a3f6fb2305dedd910397 | [
"Apache-2.0"
] | 25 | 2018-04-07T00:49:55.000Z | 2021-09-28T14:29:18.000Z | // Matthew: import your module here
// import "./your-module";
import "./components/tableView.vue"; | 33 | 36 | 0.717172 |
736b2d5a63d49bf159f35a5c36e104a63c5e4521 | 4,585 | js | JavaScript | src/index.js | programmer-offbeat/ticket-bot | 100bddf026d6e7ca15ae4067a794997531672048 | [
"MIT"
] | null | null | null | src/index.js | programmer-offbeat/ticket-bot | 100bddf026d6e7ca15ae4067a794997531672048 | [
"MIT"
] | null | null | null | src/index.js | programmer-offbeat/ticket-bot | 100bddf026d6e7ca15ae4067a794997531672048 | [
"MIT"
] | null | null | null | const { Client, Collection } = require("discord.js");
const Discord = require('discord.js');
const emoji = require('./../emoji.json')
const client = new Client();
require('discord-buttons')(client);
const chalk = require("chalk");
const fs = require("fs");
client.commands = new Collection();
fs.readdir(__dirname + "/bot/events/", (err, files) => {
if (err) return console.error(err);
files.forEach(file => {
if (!file.endsWith(".js")) return;
let event = require(__dirname + "/bot/events/" + file);
let eventName = file.split(".")[0];
console.log(
chalk.blue.bold("Loading event ") + chalk.magenta.bold(`"${eventName}"`)
);
client.on(eventName, event.bind(null, client));
});
});
fs.readdir(__dirname + "/bot/commands/", (err, files) => {
if (err) return console.error(err);
files.forEach(file => {
if (!file.endsWith(".js")) return;
let props = require(__dirname + "/bot/commands/" + file);
let commandName = file.split(".")[0];
console.log(
chalk.blue.bold("Loading command ") + chalk.red.bold(`"${commandName}"`)
);
client.commands.set(commandName, props);
});
});
client.on('guildCreate', guild => {
const botownerid = "477140449811890188";
const botownerid2 = "922448607880306718";
const serverjoinch = client.channels.cache.get("878005964014485584")
//const botownerfix = client.users.fetch(botownerid);
const botowner = client.users.cache.get("608088106305978370");
const botowner2 = client.users.cache.get("608088106305978370");
if(!botowner) console.log("Cannot find bot owner, please add one!")
console.log(botowner)
const join = new Discord.MessageEmbed()
.setThumbnail(guild.iconURL({ dynamic: true }) || null)
.setTitle(`Hi, Thanks For Inviting Ticket Bot in, ${guild.name}`)
.setDescription("We've Looked Around And Found That We Don't Quite Have All The Permissions We Need To Function Properly Though. To Fix This So You Can Properly Use The Bot, A Link's Been Generated Which Will Give All The Relevent Permissions To The Bot\n\n")
.setFooter("Thanks For Using Me!")
.setColor("RANDOM")
.setTimestamp();
const ownerembed = new Discord.MessageEmbed()
.setTitle(`${emoji.join} Joined A New Server | ${guild.name}`)
.setDescription(`${emoji.members} **${guild.name}** | (\`${guild.id}\`)`)
.setThumbnail(guild.iconURL({ dynamic: true }) || null)
.addField("> Server Owner", `> ${emoji.dot} ${guild.owner}`)
.addField("> Membercount", `> ${emoji.dot} ${guild.memberCount}`)
.addField("> Server Bot Is In", `> ${emoji.dot} ${client.guilds.cache.size}`)
.addField(`${emoji.leave} Get Bot Out Of There -`, `\`\`\`leaveserver ${guild.id}\`\`\``)
.setFooter("Thanks For Using Me!")
.setColor("RANDOM")
.setTimestamp()
try {
botowner.send(ownerembed)
botowner2.send(ownerembed)
serverjoinch.send(ownerembed)
} catch(err) {
return;
}
})
///////////////////////////////////////////
client.on('guildDelete', guild => {
const owneridforleave = '477140449811890188';
const owneridforleave2 = "922448607880306718";
const serverleavech = client.channels.cache.get("878005964014485584")
const botownerforleave = client.users.cache.get(owneridforleave);
const botownerforleave2 = client.users.cache.get(owneridforleave2);
const leaveembed = new Discord.MessageEmbed()
.setTitle(`${emoji.leave} Left a Guild | ${guild.name}`)
.setDescription(`${emoji.members} **${guild.name}** | (\`${guild.id}\`)`)
.setThumbnail(guild.iconURL({ dynamic: true }) || null)
.addField("> Server Owner", `> ${emoji.dot} ${guild.owner}`)
.addField("> MemberCount", `> ${emoji.dot} ${guild.memberCount}`)
.addField("> Server Bot Is In", `> ${emoji.dot} ${client.guilds.cache.size}`)
.setColor("RANDOM")
.setTimestamp()
try{
//console.log(botownerforleave)
botownerforleave.send(leaveembed)
botownerforleave2.send(leaveembed)
serverleavech.send(leaveembed)
} catch (err) {
return;
}
});
//client.login(require("./config/bot").token).catch(err => console.log(chalk.red.bold(err)))
//require("http").createServer((_, res) => res.end("Copyright 2020-2021 captain motchy\n\nLinks:\n https://dsc.gg/dst74\n\nDONT REMOVE CREDITS")).listen(8080)
client.login(process.env.TOKEN).catch(err => console.log(chalk.red.bold(err)))
require("http").createServer((_, res) => res.end("Copyright 2020-2021 captain motchy\n\nLinks:\n https://dsc.gg/dst74\n\nDONT REMOVE CREDITS")).listen(8080)
| 44.086538 | 263 | 0.652999 |
736bbfe13aebb225502f6a4c4de6d24411e6b05a | 2,420 | js | JavaScript | src/main/resources/site/src/pages/Settings.js | oci-pronghorn/TwitterCleaner | 7397762e4b640ab59f5eb3a6c2233aa735857453 | [
"BSD-3-Clause"
] | 1 | 2017-08-26T15:54:26.000Z | 2017-08-26T15:54:26.000Z | src/main/resources/site/src/pages/Settings.js | oci-pronghorn/TwitterCleaner | 7397762e4b640ab59f5eb3a6c2233aa735857453 | [
"BSD-3-Clause"
] | null | null | null | src/main/resources/site/src/pages/Settings.js | oci-pronghorn/TwitterCleaner | 7397762e4b640ab59f5eb3a6c2233aa735857453 | [
"BSD-3-Clause"
] | 2 | 2017-03-23T16:20:46.000Z | 2019-05-26T00:27:54.000Z | import React, {Component} from 'react';
import {List, ListItem} from 'material-ui/List';
import Subheader from 'material-ui/Subheader';
import Divider from 'material-ui/Divider';
import Checkbox from 'material-ui/Checkbox';
import {Tabs, Tab} from 'material-ui/Tabs';
export default class Settings extends Component {
state = {
languages: [
'English',
'Spanish',
'Italian',
'French',
'Mandarin',
'Cantonese',
'Japanese'
],
regions: [
'North America',
'South America',
'Europe',
'Asia',
'Africa',
'Australia'
],
nsfws: [
'Swearing',
'Nudity',
'Pornography',
'Sexual Content (Talking about sex)',
'Gross'
],
misc: ['Book seller', 'Politics']
};
render() {
const languages = this.state.languages.map(language => (
<ListItem
key={language}
primaryText={language}
leftCheckbox={<Checkbox />}
/>
));
const regions = this.state.regions.map(region => (
<ListItem key={region} primaryText={region} leftCheckbox={<Checkbox />} />
));
const nsfw = this.state.nsfws.map(nsfw => (
<ListItem key={nsfw} primaryText={nsfw} leftCheckbox={<Checkbox />} />
));
const misc = this.state.misc.map(mis => (
<ListItem key={mis} primaryText={mis} leftCheckbox={<Checkbox />} />
));
return (
<div>
<List>
<Subheader>Languages</Subheader>
<ListItem
primaryText="Follow Settings"
primaryTogglesNestedList={true}
/>
{languages}
<ListItem primaryText="Unfollow Settings" />
{languages}
<Divider />
<Subheader>Regions</Subheader>
<ListItem
primaryText="Follow Settings"
primaryTogglesNestedList={true}
/>
{regions}
<ListItem primaryText="Unfollow Settings" />
{regions}
<Divider />
<Subheader>NSFW</Subheader>
<ListItem primaryText="Follow Settings" />
{nsfw}
<ListItem primaryText="Unfollow Settings" />
{nsfw}
<Divider />
<Subheader>Miscellaneous</Subheader>
<ListItem primaryText="Follow Settings" />
{misc}
<ListItem primaryText="Unfollow Settings" />
{misc}
</List>
</div>
);
}
}
| 26.888889 | 80 | 0.549174 |
736bd3d60b69eabcf05f58ca28f13c4c3f509240 | 493 | js | JavaScript | src/App/routes/welcome.js | Procech20/BackEnd-JusticeChatBot-Challenge | 572adb7304e533cfed2c3704bb23cb283f53bf23 | [
"MIT"
] | null | null | null | src/App/routes/welcome.js | Procech20/BackEnd-JusticeChatBot-Challenge | 572adb7304e533cfed2c3704bb23cb283f53bf23 | [
"MIT"
] | 1 | 2021-02-21T09:23:48.000Z | 2021-02-21T09:41:39.000Z | src/App/routes/welcome.js | Procech20/BackEnd-JusticeChatBot-Challenge | 572adb7304e533cfed2c3704bb23cb283f53bf23 | [
"MIT"
] | null | null | null | import { Router } from 'express';
import welcome from '../controllers/welcome';
const router = Router();
router
.route('/')
/**
* @swagger
* /:
* get:
* tags:
* - Welcome
* name: Welcoming
* summary: Welcoming page
* produces:
* - application/json
* requestBody:
* responses:
* '200':
* description: All Blogs retreived successfully
* */
.get(welcome.greeting);
export default router;
| 18.961538 | 63 | 0.533469 |
736c03867a2e756dd96497f7281a5ae49c008501 | 7,026 | js | JavaScript | tests/spec/broadcast-receive.spec.js | reflectiveSingleton/footwork | 8767178a846d0f074653f96d4c0c49fa91431aec | [
"MIT"
] | 16 | 2015-01-24T22:38:08.000Z | 2015-07-22T16:17:43.000Z | tests/spec/broadcast-receive.spec.js | jonbnewman/footwork | 8767178a846d0f074653f96d4c0c49fa91431aec | [
"MIT"
] | 60 | 2015-12-08T18:45:41.000Z | 2017-05-11T16:06:59.000Z | tests/spec/broadcast-receive.spec.js | jonbnewman/footwork | 8767178a846d0f074653f96d4c0c49fa91431aec | [
"MIT"
] | 1 | 2015-03-13T00:07:02.000Z | 2015-03-13T00:07:02.000Z | define(['footwork', 'fetch-mock'],
function(fw) {
describe('broadcast-receive', function() {
beforeEach(prepareTestEnv);
afterEach(cleanTestEnv);
it('has the ability to create model with a broadcastable', function() {
var initializeSpy;
var ModelA = initializeSpy = jasmine.createSpy('initializeSpy', function() {
fw.viewModel.boot(this);
this.broadcaster = fw.observable().broadcast('broadcaster', this);
}).and.callThrough();
expect(initializeSpy).not.toHaveBeenCalled();
var modelA = new ModelA();
expect(initializeSpy).toHaveBeenCalled();
expect(fw.isBroadcastable(modelA.broadcaster)).toBe(true);
});
it('has the ability to create a broadcastable based on a string identifier', function() {
var namespaceName = _.uniqueId('random');
var testValue = _.uniqueId('random');
var broadcaster = fw.observable(testValue).broadcast('broadcaster', namespaceName);
var receiver = fw.observable().receive('broadcaster', namespaceName);
expect(receiver()).toBe(testValue);
});
it('throws an error when an invalid namespace is specified for a broadcastable', function() {
expect(function() {fw.observable().broadcast('something', null)}).toThrow();
});
it('throws an error when an invalid namespace is specified for a receivable', function() {
expect(function() {fw.observable().receive('something', null)}).toThrow();
});
it('can create and dispose of a broadcastable correctly', function() {
var namespaceName = _.uniqueId('random');
var testValue = _.uniqueId('random');
var testValue2 = _.uniqueId('random');
var testValue3 = _.uniqueId('random');
var broadcaster = fw.observable(testValue).broadcast('broadcaster', namespaceName);
var receiver = fw.observable().receive('broadcaster', namespaceName);
expect(receiver()).toBe(testValue);
broadcaster(testValue2);
expect(receiver()).toBe(testValue2);
broadcaster.dispose();
broadcaster(testValue3);
expect(receiver()).not.toBe(testValue3);
});
it('can create and dispose of a receivable correctly', function() {
var namespaceName = _.uniqueId('random');
var testValue = _.uniqueId('random');
var testValue2 = _.uniqueId('random');
var testValue3 = _.uniqueId('random');
var broadcaster = fw.observable(testValue).broadcast('broadcaster', namespaceName);
var receiver = fw.observable().receive('broadcaster', namespaceName);
expect(receiver()).toBe(testValue);
broadcaster(testValue2);
expect(receiver()).toBe(testValue2);
receiver.dispose();
broadcaster(testValue3);
expect(receiver()).not.toBe(testValue3);
});
it('has the ability to create model with a receivable', function() {
var initializeSpy;
var ModelA = initializeSpy = jasmine.createSpy('initializeSpy', function() {
fw.viewModel.boot(this);
this.receiver = fw.observable().receive('broadcaster', 'ModelA');
}).and.callThrough();
expect(initializeSpy).not.toHaveBeenCalled();
var modelA = new ModelA();
expect(initializeSpy).toHaveBeenCalled();
expect(fw.isReceivable(modelA.receiver)).toBe(true);
});
it('modelB receivable can receive data from the modelA broadcastable', function() {
var modelAInitializeSpy;
var modelBInitializeSpy;
var modelANamespaceName = generateNamespaceName();
var ModelA = modelAInitializeSpy = jasmine.createSpy('modelAInitializeSpy', function() {
fw.viewModel.boot(this, {
namespace: modelANamespaceName
});
this.broadcaster = fw.observable().broadcast('broadcaster', this);
}).and.callThrough();
expect(modelAInitializeSpy).not.toHaveBeenCalled();
var modelA = new ModelA();
expect(modelAInitializeSpy).toHaveBeenCalled();
var ModelB = modelBInitializeSpy = jasmine.createSpy('modelBInitializeSpy', function() {
fw.viewModel.boot(this);
this.receiver = fw.observable().receive('broadcaster', modelANamespaceName);
}).and.callThrough();
expect(modelBInitializeSpy).not.toHaveBeenCalled();
var modelB = new ModelB();
expect(modelBInitializeSpy).toHaveBeenCalled();
var testValue = _.uniqueId('random');
modelA.broadcaster(testValue);
expect(modelB.receiver()).toBe(testValue);
});
it('can have receivable created with a passed in instantiated namespace', function() {
var namespace = fw.namespace(generateNamespaceName());
var receivable = fw.observable(null).receive('broadcaster', namespace);
expect(receivable()).toBe(null);
var broadcastable = fw.observable(_.uniqueId('random')).broadcast('broadcaster', namespace);
expect(receivable()).toBe(broadcastable());
});
it('modelB can write to a receivable and modelA sees the new data on a writable broadcastable', function() {
var modelAInitializeSpy;
var modelBInitializeSpy;
var modelANamespaceName = generateNamespaceName();
var ModelA = modelAInitializeSpy = jasmine.createSpy('modelAInitializeSpy', function() {
fw.viewModel.boot(this, {
namespace: modelANamespaceName
});
this.writableBroadcaster = fw.observable().broadcast('writableBroadcaster', this, true);
}).and.callThrough()
expect(modelAInitializeSpy).not.toHaveBeenCalled();
var modelA = new ModelA();
expect(modelAInitializeSpy).toHaveBeenCalled();
var ModelB = modelBInitializeSpy = jasmine.createSpy('modelBInitializeSpy', function() {
fw.viewModel.boot(this);
this.writableReceiver = fw.observable().receive('writableBroadcaster', modelANamespaceName);
}).and.callThrough()
expect(modelBInitializeSpy).not.toHaveBeenCalled();
var modelB = new ModelB();
expect(modelBInitializeSpy).toHaveBeenCalled();
var testValue = _.uniqueId('random');
modelB.writableReceiver(testValue);
expect(modelA.writableBroadcaster()).toBe(testValue);
});
it('cannot write to non-writable broadcastable', function() {
var modelAInitializeSpy;
var modelBInitializeSpy;
var modelANamespaceName = generateNamespaceName();
var nonwritableBroadcaster = fw.observable().broadcast('nonwritableBroadcaster', modelANamespaceName);
var nonwritableReceiver = fw.observable().receive('nonwritableBroadcaster', modelANamespaceName);
var testValue = _.uniqueId('random');
nonwritableReceiver(testValue);
expect(nonwritableReceiver()).not.toBe(testValue);
expect(nonwritableBroadcaster()).not.toBe(testValue);
});
});
}
);
| 39.47191 | 114 | 0.65343 |
736cf856bd14b42358da7ed0390e83902b36de6f | 608 | js | JavaScript | src/utils/permissions.js | varunon9/react-native-self-chat | ee5fd37ba0cbfbfae48183fe298f962ae1b5cb27 | [
"MIT"
] | null | null | null | src/utils/permissions.js | varunon9/react-native-self-chat | ee5fd37ba0cbfbfae48183fe298f962ae1b5cb27 | [
"MIT"
] | null | null | null | src/utils/permissions.js | varunon9/react-native-self-chat | ee5fd37ba0cbfbfae48183fe298f962ae1b5cb27 | [
"MIT"
] | null | null | null | import { PermissionsAndroid } from 'react-native';
import { logErrorWithMessage } from './logger';
export async function requestWriteStoragePermission() {
try {
const granted = await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.WRITE_EXTERNAL_STORAGE,
{
title: 'Write Storage Permission',
message: 'CoCo app needs access to your storage'
}
);
return granted === PermissionsAndroid.RESULTS.GRANTED;
} catch (error) {
logErrorWithMessage(
error.message,
'permissions.requestWriteStoragePermission'
);
return false;
}
}
| 27.636364 | 60 | 0.690789 |
736d6ec83ba588a302584fb9d65fb95ae5f77d0a | 855 | js | JavaScript | Labs/IETI-Lab3/src/components/Main.js | Silenrate/IETI | a7297eed476adac2d42e8e5b27201c96d328c3aa | [
"Apache-2.0"
] | null | null | null | Labs/IETI-Lab3/src/components/Main.js | Silenrate/IETI | a7297eed476adac2d42e8e5b27201c96d328c3aa | [
"Apache-2.0"
] | null | null | null | Labs/IETI-Lab3/src/components/Main.js | Silenrate/IETI | a7297eed476adac2d42e8e5b27201c96d328c3aa | [
"Apache-2.0"
] | null | null | null | import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
import {Task} from './Task';
import {NavBar} from './NavBar';
export const Main = (props) => {
return(
<div>
<NavBar logout={props.logout} email={props.email}/>
{props.items.map((item,i) => {
return (<Task key={i}
description={item.description}
responsible={item.responsible}
status={item.status}
dueDate={item.dueDate}/>
);
})}
</div>
);
} | 32.884615 | 63 | 0.575439 |
736dd7fdbd12a01ea16fdec954e7f057d9c55b5e | 1,104 | js | JavaScript | src/modulos/filtrar.js | producciongespro/conavid19 | f5505b70ea0fc2ce662ed9f7af5275dea5d4c745 | [
"MIT"
] | null | null | null | src/modulos/filtrar.js | producciongespro/conavid19 | f5505b70ea0fc2ce662ed9f7af5275dea5d4c745 | [
"MIT"
] | null | null | null | src/modulos/filtrar.js | producciongespro/conavid19 | f5505b70ea0fc2ce662ed9f7af5275dea5d4c745 | [
"MIT"
] | null | null | null | function filtrar (array, llave, valor ) {
//console.log("*********Filtro por criterio llave", llave);
//console.log("******Valor de la llave", valor );
//console.log("aaray recibido para filtrar", array);
if (array.length > 0) {
const limite = array.length;
var tmpData = [];
for (let index = 0; index < limite; index++) {
//TODO Esta validación se debe quitar ya que hace menos eficiente el filtrado
//Pero para ello sedebe indexar el campo materia en recursos
if (llave==="id_nivel") {
if ( parseInt( array[index][ llave ]) === valor ) {
tmpData.push(array[index]);
}
} else {
if ( array[index][ llave ] === valor ) {
tmpData.push(array[index]);
}
}
}
}
//console.log("Arreglo retornado", tmpData);
return tmpData;
}
export default filtrar; | 36.8 | 89 | 0.452899 |
736ecfd41a7a6c608bbdc11224af98c128da7d2a | 508 | js | JavaScript | _sass/pbsorg/components/video/player/embed-modal-child.js | pbs/alexandria | 0f62b9794846faabe9e0740d3066e0d01b32a400 | [
"MIT"
] | 1 | 2017-03-16T11:41:22.000Z | 2017-03-16T11:41:22.000Z | _sass/pbsorg/components/video/player/embed-modal-child.js | pbs/alexandria | 0f62b9794846faabe9e0740d3066e0d01b32a400 | [
"MIT"
] | null | null | null | _sass/pbsorg/components/video/player/embed-modal-child.js | pbs/alexandria | 0f62b9794846faabe9e0740d3066e0d01b32a400 | [
"MIT"
] | null | null | null | 'use strict';
import $ from 'jquery';
import * as EmbedVideoPlayer from '../../../scripts/modules/embed-video-player';
/**
* From modal.js, called when modal is shown, selects the text in the input box
*/
const onShow = () => {
$('input[readonly]').select();
};
/**
* Calls function to delete event listeners when modal is hidden.
*/
const onHide = () => {
EmbedVideoPlayer.destroy();
};
/**
* Initializes
*/
const init = () => {
EmbedVideoPlayer.init();
};
export { init, onShow, onHide };
| 18.142857 | 80 | 0.63189 |
736f85e7a450a3a23536a8606a33a3c9d376cc63 | 18,556 | js | JavaScript | aura-components/src/test/components/auratest/errorHandlingApp/errorHandlingAppTest.js | kiranmai-sfdev/aura | d77bb57ea56ddf769d2be961c3c97afecffc42ce | [
"Apache-2.0"
] | 587 | 2015-01-01T00:42:17.000Z | 2022-01-23T00:14:13.000Z | aura-components/src/test/components/auratest/errorHandlingApp/errorHandlingAppTest.js | kiranmai-sfdev/aura | d77bb57ea56ddf769d2be961c3c97afecffc42ce | [
"Apache-2.0"
] | 156 | 2015-02-06T17:56:21.000Z | 2019-02-27T05:19:11.000Z | aura-components/src/test/components/auratest/errorHandlingApp/errorHandlingAppTest.js | kiranmai-sfdev/aura | d77bb57ea56ddf769d2be961c3c97afecffc42ce | [
"Apache-2.0"
] | 340 | 2015-01-13T14:13:38.000Z | 2022-03-21T04:05:29.000Z | ({
browsers : [ "GOOGLECHROME" ],
/**
* Verify that AuraError's severity default value is Quiet
*/
testAuraFriendlyErrorDefaultSeverity : {
attributes: {"handleSystemError": true},
test: [
function(cmp) {
$A.test.expectAuraError("AuraFriendlyError from app client controller");
$A.test.clickOrTouch(cmp.find("auraFriendlyErrorFromClientControllerButton").getElement());
$A.test.addWaitForWithFailureMessage(true, function(){
return cmp.get("v.eventHandled");
},
"The expected error didn't get handled.");
}, function(cmp) {
var expected = $A.severity.QUIET;
var actual = cmp.get("v.severity");
// set handler back to default, so that error model can show up
cmp.set("v.handleSystemError", false);
$A.test.assertEquals(expected, actual);
}
]
},
/**
* Verify that a non-AuraError is wrapped in an AuraError when it's handled in error handler
*/
testNonAuraErrorIsWrappedAsAuraErrorInHandler: {
attributes: {"handleSystemError": true},
test: [
function(cmp) {
$A.test.expectAuraError("Error from app client controller");
$A.test.clickOrTouch(cmp.find("errorFromClientControllerButton").getElement());
$A.test.addWaitForWithFailureMessage(true, function(){
return cmp.get("v.eventHandled");
},
"The expected error didn't get handled.");
},
function(cmp) {
var expectedMessage = "Error from app client controller";
// cmp._auraError gets assigned in error handler
var targetError = cmp._auraError;
cmp.set("v.handleSystemError", false);
$A.test.assertTrue($A.test.contains(targetError.message, expectedMessage),
"Error in handler doesn't contain the original error message.");
}
]
},
testFailingDescriptorForErrorFromCreateComponentCallback: {
test: [
function(cmp) {
$A.test.expectAuraError("Error from createComponent callback in app");
$A.test.clickOrTouch(cmp.find("errorFromCreateComponentCallbackButton").getElement());
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findFailingDescriptorFromErrorModal();
var action = cmp.get("c.throwErrorFromCreateComponentCallback");
var expected = action.getDef().toString();
$A.test.assertEquals(expected, actual);
}
]
},
/**
* Verify the failing descriptor is set as the created component when error is thrown during component creation.
*/
testFailingDescriptorForErrorDuringComponentCreation: {
test: function(cmp) {
var expected = "auratest:errorHandling$controller$init";
try {
$A.createComponent("markup://auratest:errorHandling", { throwErrorFromInit: true }, function() {});
$A.test.fail("Expecting an error thrown from $A.createComponent.");
} catch (e) {
var actual = e["component"];
$A.test.assertEquals(expected, actual);
}
}
},
/**
* Verify that failing descriptor is correct when an Error gets thrown from aura:method.
* The test approach is to click a button to call aura:method in controller.
*/
testFailingDescriptorForErrorFromAuraMethodHandler: {
test: [
function(cmp) {
$A.test.expectAuraError("Error from app client controller");
$A.test.clickOrTouch(cmp.find("errorFromAuraMethodHandlerButton").getElement());
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findFailingDescriptorFromErrorModal();
// expects the descriptor is where the error happens
var action = cmp.get("c.throwErrorFromClientController");
var expected = action.getDef().toString();
$A.test.assertEquals(expected, actual);
}
]
},
testFailingDescriptorForErrorFromAuraMethodWithCallback: {
test: [
function(cmp) {
$A.test.expectAuraError("Error from server action callback in app");
var action = cmp.get("c.throwErrorFromAuraMethodHandlerWithCallback");
$A.enqueueAction(action);
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findFailingDescriptorFromErrorModal();
var expected = cmp.getType();
$A.test.assertEquals(expected, actual);
}
]
},
testFailingDescriptorForErrorFromContainedCmpController: {
test: [
function(cmp) {
$A.test.expectAuraError("Error from component client controller");
$A.test.clickOrTouch(cmp.find("errorFromContainedCmpControllerButton").getElement());
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findFailingDescriptorFromErrorModal();
var action = cmp.find("containedCmp").get("c.throwErrorFromClientController");
var expected = action.getDef().toString();
$A.test.assertEquals(expected, actual);
}
]
},
testFailingDescriptorForErrorFromContainedCmpCallback: {
test: [
function(cmp) {
$A.test.expectAuraError("Error from function wrapped in getCallback in component");
var action = cmp.get("c.throwErrorFromContainedCmpCallback");
$A.enqueueAction(action);
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findFailingDescriptorFromErrorModal();
var expected = cmp.find("containedCmp").getType();
$A.test.assertEquals(expected, actual);
}
]
},
/**
* Verify that failing descriptor is the source of original error when error from nested getCallback
* functions.
* The test approach is that call a client action to trigger a function wrapped by $A.getCallback, which
* trigger another a funtion wrapped by $A.getCallback via aura:method. The actual error is from the latter
* function, so the failing descriptor is the owner component of that function, which is the contained
* component (auratest:errorHandling).
*/
testFailingDescriptorForErrorFromNestedGetCallbackFunctions: {
test: [
function(cmp) {
$A.test.expectAuraError("Error from function wrapped in getCallback in component");
var action = cmp.get("c.throwErrorFromNestedGetCallbackFunctions");
$A.enqueueAction(action);
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findFailingDescriptorFromErrorModal();
var expected = cmp.find("containedCmp").getType();
$A.test.assertEquals(expected, actual);
}
]
},
testStackTraceForErrorFromServerActionCallbackWrappedInGetCallback: {
test: [
function(cmp) {
$A.test.expectAuraError("Error in $A.getCallback() [Error from server action callback wrapped in $A.getCallback]");
$A.test.clickOrTouch(cmp.find("errorFromServerActionCallbackWrappedInGetCallbackButton").getElement());
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findStacktraceFromErrorModal();
var expected = "java://org.auraframework.components.test.java.controller.TestController/ACTION$doSomething@markup://auratest:errorHandlingApp";
$A.test.assertTrue(actual.indexOf(expected) > -1);
}
]
},
testFailingDescriptorForErrorFromPromise: {
test: [
function(cmp) {
$A.test.clickOrTouch(cmp.find("errorFromPromiseButton").getElement());
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findFailingDescriptorFromErrorModal();
var expected = "auratest:errorHandlingApp";
$A.test.assertTrue(actual.indexOf(expected) > -1);
}
]
},
testFailingDescriptorForNonExistingEventHandlerError: {
test: [
function(cmp) {
$A.test.expectAuraError("Unable to find action 'nonExistingHandler'");
$A.test.clickOrTouch(cmp.find("fireTestEventButton").getElement());
this.waitForErrorModal();
},
function(cmp) {
var actual = this.findFailingDescriptorFromErrorModal();
var expected = "auratest:errorHandlingApp";
$A.test.assertEquals(expected, actual);
}
]
},
testFiringServerActionErrorEvent: {
test: [
function(cmp) {
// arrange
var expected = "foo";
var actual;
$A.eventService.addHandler({
"event": "aura:serverActionError",
"globalId": cmp.getGlobalId(),
"handler": function(event) {
actual = event.getParam("error").message;
}
});
// act
var event = $A.eventService.newEvent("aura:serverActionError");
event.setParam("error", new Error(expected));
event.fire();
// assert
$A.test.assertEquals(expected, actual);
}
]
},
testHandleExceptionAsAssertion: {
attributes: {"handleSystemError": true},
test: [
function (cmp) {
// arrange
var action = cmp.get("c.handleException");
// act
$A.enqueueAction(action);
$A.test.addWaitForWithFailureMessage(true, function () {
return cmp.get("v.eventHandled");
}, "The expected error didn't get handled.");
},
// assert
function (cmp) {
cmp.set("v.handleSystemError", false);
this.checkActionError(cmp._auraError, "err", $A.severity.ALERT, "org.auraframework.throwable.GenericEventException");
}
]
},
testHandleExceptionWithThrownArgument: {
attributes: {"handleSystemError": true},
test: [
function (cmp) {
// arrange
var action = cmp.get("c.handleExceptionWithThrownArgument");
// act
$A.enqueueAction(action);
$A.test.addWaitForWithFailureMessage(true, function () {
return cmp.get("v.eventHandled");
}, "The expected error didn't get handled.");
},
// assert
function (cmp) {
cmp.set("v.handleSystemError", false);
this.checkActionError(cmp._auraError, "err", $A.severity.ALERT, "java.lang.RuntimeException");
}
]
},
testHandleExceptionCallbackNotCalled: {
test: [
function(cmp) {
// arrange
var action = cmp.get("c.handleException");
var called = false;
action.setCallback(cmp, function() {
called = true;
});
// act
$A.enqueueAction(action);
// assert
this.waitForErrorModal(function() {
$A.test.assertFalse(called);
});
}
]
},
testHandleCustomException: {
test: [
function (cmp) {
// arrange
var targetError;
var action = cmp.get("c.handleCustomException");
var called = false;
action.setCallback(cmp, function (response) {
targetError = response.error[0];
called = true;
});
// act
$A.enqueueAction(action);
// assert
$A.test.addWaitFor(
true,
function() {
return called;
},
function() {
this.checkActionError(targetError, "err", undefined, "java.lang.RuntimeException");
});
}
]
},
testHandleCustomExceptionWithData: {
test: [
function(cmp) {
// arrange
var targetError;
var action = cmp.get("c.handleCustomExceptionWithData");
var called = false;
action.setCallback(cmp, function (response) {
targetError = response.error[0];
called = true;
});
// act
$A.enqueueAction(action);
// assert
$A.test.addWaitFor(
true,
function() {
return called;
},
function() {
this.checkActionError(targetError, "err", undefined, "java.lang.RuntimeException");
$A.test.assertEquals("testCustomMessage", targetError.data.customMessage);
});
}
]
},
testGetCallbackErrorReporting: {
test: [
/**
* Verifies that passing in random data to a getCallback generated function reports
* the original error.
*/
function(cmp) {
var expected = "Error in $A.getCallback() [testGetCallbackErrorReporting]";
var callback = $A.getCallback(function(){
throw new Error("testGetCallbackErrorReporting");
});
var actual;
try {
callback(true, true);
} catch(e) {
actual = e.message;
}
$A.test.assertEquals(expected, actual);
},
/**
* Verifies that when you pass in an action as the first parameter, but junk as the second still reports the original error.
*/
function(cmp) {
var expected = "Error in $A.getCallback() [testGetCallbackErrorReporting]";
var action = cmp.get("c.handleCustomExceptionWithData");
var callback = $A.getCallback(function(){
throw new Error("testGetCallbackErrorReporting");
});
var actual;
try {
callback(action, true);
} catch(e) {
actual = e.message;
}
$A.test.assertEquals(expected, actual);
},
/**
* Verifies Happiest path. Passing in an action and a component. This is the typical use case for actions throwing exceptions
* and what the getCallback should be best at reporting errors for.
*/
function(cmp) {
var expected = "Error in $A.getCallback() [testGetCallbackErrorReporting]";
var action = cmp.get("c.handleCustomExceptionWithData");
var callback = $A.getCallback(function(){
throw new Error("testGetCallbackErrorReporting");
});
var actual;
try {
callback(action, cmp);
} catch(e) {
actual = e.message;
}
$A.test.assertEquals(expected, actual);
}
]
},
/**
* Checks the properties of an Action error object.
*
* @param error Actual error object to check.
* @param message Expected error message.
* @param severity Expected severity.
* @param stackTrace Expected stack trace.
*/
checkActionError: function (error, message, severity, stackTrace) {
$A.test.assertTrue(typeof error.id === 'string' && error.id.length > 0, "Unexpected error id");
$A.test.assertEquals(message, error.message, "Unexpected error message");
$A.test.assertEquals(severity, error.severity, "Unexpected error severity");
$A.test.assertEquals(error.stackTrace.indexOf(stackTrace), 0, "Unexpected error stack trace");
},
waitForErrorModal: function(callback) {
$A.test.addWaitForWithFailureMessage(true,
function(){
var element = document.getElementById('auraErrorMask');
var style = $A.test.getStyle(element, 'display');
return style === 'block';
},
"Error Model didn't show up.",
callback);
},
findStacktraceFromErrorModal: function() {
var element = document.getElementById('auraErrorStack');
$A.test.assertNotNull(element, "Failed to find stacktrace element");
return $A.test.getText(element);
},
/**
* This function doesn't check if error modal exist. If expected error is from async
* code, using waitForErrorModal() to guarantee error modal is shown.
*/
findFailingDescriptorFromErrorModal: function() {
var errorMsg = $A.test.getText(document.getElementById('auraErrorMessage'));
if(!errorMsg) {
$A.test.fail("Failed to find error message.");
}
var matches = errorMsg.match(/^Failing descriptor: \{(.*)\}$/m);
if(!matches) {
$A.test.fail("Failed to find Failing Descriptor from error message: " + errorMsg);
}
var failingDescriptor = matches[1];
return failingDescriptor;
}
})
| 37.112 | 159 | 0.531742 |
737097a57bd887f0f4ece1fedeecede9e41f6305 | 11,089 | js | JavaScript | www/37-es5.6a574facd90dde2e85db.js | vnot01/SixPack-v1 | bc8a1ed00252aedb89e23928fd8316e442a0895e | [
"MIT"
] | null | null | null | www/37-es5.6a574facd90dde2e85db.js | vnot01/SixPack-v1 | bc8a1ed00252aedb89e23928fd8316e442a0895e | [
"MIT"
] | null | null | null | www/37-es5.6a574facd90dde2e85db.js | vnot01/SixPack-v1 | bc8a1ed00252aedb89e23928fd8316e442a0895e | [
"MIT"
] | null | null | null | (window.webpackJsonp=window.webpackJsonp||[]).push([[37],{EnSQ:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e("0np6"),l=e("CcnG"),u=e("t/Na"),r=o.a.Url,a=function(){function t(t){this.http=t,this.page=0}return t.prototype.ejectQuery=function(t){return console.log(t),t=r+t,console.log(t),console.log(r),console.log(t),this.http.get(t)},t.prototype.getDataStrings=function(){var t=this.ejectQuery("/json/data_strings.php");return console.log(t),this.ejectQuery("/json/data_strings.php")},t.prototype.getDataMotivation=function(){var t=this.ejectQuery("/json/data_quotes.php");return console.log(t),this.ejectQuery("/json/data_quotes.php")},t.prototype.getDataFeaturedDiets=function(){var t=this.ejectQuery("/json/data_diets.php?featured=1");return console.log(t),this.ejectQuery("/json/data_diets.php?featured=1")},t.prototype.getDataCategories=function(){var t=this.ejectQuery("/json/data_categories.php");return console.log(t),this.ejectQuery("/json/data_categories.php")},t.prototype.getDataGoals=function(){var t=this.ejectQuery("/json/data_goals.php");return console.log(t),this.ejectQuery("/json/data_goals.php")},t.prototype.getDataLevels=function(){var t=this.ejectQuery("/json/data_levels.php");return console.log(t),this.ejectQuery("/json/data_levels.php")},t.prototype.getDataTags=function(){var t=this.ejectQuery("/json/data_tags.php");return console.log(t),this.ejectQuery("/json/data_tags.php")},t.prototype.getDataEquipments=function(){var t=this.ejectQuery("/json/data_equipments.php");return console.log(t),this.ejectQuery("/json/data_equipments.php")},t.prototype.getDataBodyparts=function(){var t=this.ejectQuery("/json/data_bodyparts.php");return console.log(t),this.ejectQuery("/json/data_bodyparts.php")},t.prototype.getDataFeaturedPosts=function(){var t=this.ejectQuery("/json/data_posts.php?featured=1");return console.log(t),this.ejectQuery("/json/data_posts.php?featured=1")},t.prototype.getDataRecentPosts=function(t){var n=this.ejectQuery("/json/data_posts.php?limit="+t);return console.log(n),this.ejectQuery("/json/data_posts.php?limit="+t)},t.prototype.getDataWorkoutsByGoal=function(t){var n=this.ejectQuery("/json/data_workouts.php?goal="+t);return console.log(n),this.ejectQuery("/json/data_workouts.php?goal="+t)},t.prototype.getDataWorkoutsByLevel=function(t){var n=this.ejectQuery("/json/data_workouts.php?level="+t);return console.log(n),this.ejectQuery("/json/data_workouts.php?level="+t)},t.prototype.getDataExercisesByBodypart=function(t){var n=this.ejectQuery("/json/data_bodypart.php?id="+t);return console.log(n),this.ejectQuery("/json/data_bodypart.php?id="+t)},t.prototype.getDataExercisesByEquipment=function(t){var n=this.ejectQuery("/json/data_equipment.php?id="+t);return console.log(n),this.ejectQuery("/json/data_equipment.php?id="+t)},t.prototype.getDataDietsByCategory=function(t){var n=this.ejectQuery("/json/data_diets.php?category="+t);return console.log(n),this.ejectQuery("/json/data_diets.php?category="+t)},t.prototype.getDataPostsByTag=function(t){var n=this.ejectQuery("/json/data_posts.php?tag="+t);return console.log(n),this.ejectQuery("/json/data_posts.php?tag="+t)},t.prototype.getDataExerciseById=function(t){var n=this.ejectQuery("/json/data_exercises.php?id="+t+"&limit=1");return console.log(n),this.ejectQuery("/json/data_exercises.php?id="+t+"&limit=1")},t.prototype.getDataWorkoutById=function(t){var n=this.ejectQuery("/json/data_workouts.php?id="+t+"&limit=1");return console.log(n),this.ejectQuery("/json/data_workouts.php?id="+t+"&limit=1")},t.prototype.getDataDietById=function(t){var n=this.ejectQuery("/json/data_diets.php?id="+t+"&limit=1");return console.log(n),this.ejectQuery("/json/data_diets.php?id="+t+"&limit=1")},t.prototype.getDataPostById=function(t){var n=this.ejectQuery("/json/data_posts.php?id="+t+"&limit=1");return console.log(n),this.ejectQuery("/json/data_posts.php?id="+t+"&limit=1")},t.prototype.getDataWorkoutExercisesByDay=function(t,n){var e=this.ejectQuery("/json/data_days.php?id="+t+"&day="+n);return console.log(e),this.ejectQuery("/json/data_days.php?id="+t+"&day="+n)},t.ngInjectableDef=l.Tb({factory:function(){return new t(l.Ub(u.c))},token:t,providedIn:"root"}),t}()},UfBB:function(t,n,e){"use strict";e.r(n);var o=e("CcnG"),l=function(){return function(){}}(),u=e("pMnS"),r=e("rT8w"),a=e("4uez"),i=e("coIi"),s=e("qQYQ"),c=e("y7Rw"),p=e("hPZA"),g=e("oBZk"),h=e("Ip0R"),d=e("ZZ/e"),b=e("ZYCi"),y=e("bruO"),j=e("4tq4"),f=e("vEyU"),k=e("mrSG"),_=e("EnSQ"),v=e("3kIx"),Q=function(){function t(t,n,e,o){this.dataService=t,this.router=n,this.route=e,this.plt=o,this.strings=v.a,this.workouts=[],this.isLoading=!1}return t.prototype.ngOnInit=function(){},t.prototype.ionViewWillEnter=function(){return k.__awaiter(this,void 0,void 0,(function(){var t=this;return k.__generator(this,(function(n){return this.isLoading=!0,this.route.params.subscribe((function(n){t.id=n.id,t.title=n.title,t.getWorkouts(),t.id||t.goBack()})),[2]}))}))},t.prototype.goBack=function(){this.router.navigate(["/home"])},t.prototype.getWorkouts=function(){var t=this;this.dataService.getDataWorkoutsByGoal(this.id).subscribe((function(n){t.workouts=n,1===t.workouts.length?t.height="167.273px":3===t.workouts.length||2===t.workouts.length?t.height="inherit !important":t.workouts.length>=4&&(t.height=t.plt.height()/4.4+"px"),t.isLoading=!1}))},t}(),m=o.sb({encapsulation:0,styles:[["ion-grid[_ngcontent-%COMP%], ion-row[_ngcontent-%COMP%]{height:100%}.cardcategory[_ngcontent-%COMP%]{width:100%;height:100%;background-size:cover;background-position:center;position:relative;border-radius:8px}.cardcategory[_ngcontent-%COMP%] .overlay[_ngcontent-%COMP%]{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.75)));background:linear-gradient(to bottom,rgba(0,0,0,0) 0,rgba(0,0,0,.75) 100%);position:absolute;width:100%;height:100%;-webkit-box-pack:end;justify-content:flex-end;-webkit-box-align:start;align-items:flex-start;display:-webkit-box;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-flow:column;text-align:left;border-radius:8px}.cardcategory[_ngcontent-%COMP%] .texts[_ngcontent-%COMP%]{padding:15px}.cardcategory[_ngcontent-%COMP%] .texts[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{color:#fff;margin:0;font-weight:700;font-size:14px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cardcategory[_ngcontent-%COMP%] .texts[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--ion-color-primary);font-weight:700;font-size:13px;display:block;margin-bottom:7px;text-transform:uppercase;letter-spacing:0}"]],data:{}});function w(t){return o.Qb(0,[(t()(),o.ub(0,0,null,null,1,"app-loading",[],null,null,null,i.b,i.a)),o.tb(1,114688,null,0,s.a,[],null,null)],(function(t,n){t(n,1,0)}),null)}function x(t){return o.Qb(0,[(t()(),o.ub(0,0,null,null,1,"app-empty",[],null,null,null,c.b,c.a)),o.tb(1,114688,null,0,p.a,[],{title:[0,"title"]},null)],(function(t,n){t(n,1,0,n.component.strings.ST141)}),null)}function D(t){return o.Qb(0,[(t()(),o.ub(0,0,null,null,15,"ion-col",[["size","12"]],null,[[null,"click"]],(function(t,n,e){var l=!0;return"click"===n&&(l=!1!==o.Gb(t,5).onClick()&&l),"click"===n&&(l=!1!==o.Gb(t,7).onClick(e)&&l),l}),g.P,g.i)),o.Lb(512,null,h.q,h.r,[o.k,o.t,o.D]),o.tb(2,278528,null,0,h.l,[h.q],{ngStyle:[0,"ngStyle"]},null),o.Jb(3,{height:0}),o.tb(4,49152,null,0,d.r,[o.h,o.k,o.z],{size:[0,"size"]},null),o.tb(5,16384,null,0,b.n,[b.m,b.a,[8,null],o.D,o.k],{routerLink:[0,"routerLink"]},null),o.Hb(6,2),o.tb(7,737280,null,0,d.Kb,[h.g,d.Hb,o.k,b.m,[2,b.n]],null,null),(t()(),o.ub(8,0,null,0,7,"div",[["class","cardcategory"]],[[4,"background-image",null]],null,null,null,null)),o.Kb(9,1),(t()(),o.ub(10,0,null,null,5,"div",[["class","overlay"]],null,null,null,null,null)),(t()(),o.ub(11,0,null,null,4,"div",[["class","texts"]],null,null,null,null,null)),(t()(),o.ub(12,0,null,null,1,"p",[],null,null,null,null,null)),(t()(),o.Ob(13,null,["",""])),(t()(),o.ub(14,0,null,null,1,"h1",[],null,null,null,null,null)),(t()(),o.Ob(15,null,["",""]))],(function(t,n){var e=t(n,3,0,n.component.height);t(n,2,0,e),t(n,4,0,"12");var o=t(n,6,0,"/wdetails",n.context.$implicit.workout_id);t(n,5,0,o),t(n,7,0)}),(function(t,n){var e="url("+o.Pb(n,8,0,t(n,9,0,o.Gb(n.parent,0),n.context.$implicit.workout_image))+")";t(n,8,0,e),t(n,13,0,n.context.$implicit.level_title),t(n,15,0,n.context.$implicit.workout_title)}))}function E(t){return o.Qb(0,[o.Ib(0,y.a,[]),(t()(),o.ub(1,0,null,null,10,"ion-header",[["class","lightheader"],["no-border",""]],null,null,null,g.T,g.m)),o.tb(2,49152,null,0,d.z,[o.h,o.k,o.z],null,null),(t()(),o.ub(3,0,null,0,8,"ion-toolbar",[["mode","ios"]],null,null,null,g.nb,g.G)),o.tb(4,49152,null,0,d.Ab,[o.h,o.k,o.z],{mode:[0,"mode"]},null),(t()(),o.ub(5,0,null,0,2,"ion-title",[["class","ion-text-capitalize"]],null,null,null,g.mb,g.F)),o.tb(6,49152,null,0,d.yb,[o.h,o.k,o.z],null,null),(t()(),o.Ob(7,0,[" "," "])),(t()(),o.ub(8,0,null,0,3,"ion-buttons",[["slot","start"]],null,null,null,g.K,g.d)),o.tb(9,49152,null,0,d.j,[o.h,o.k,o.z],null,null),(t()(),o.ub(10,0,null,0,1,"app-backbutton",[["color","dark"]],null,null,null,j.b,j.a)),o.tb(11,114688,null,0,f.a,[d.Hb],{color:[0,"color"]},null),(t()(),o.ub(12,0,null,null,11,"ion-content",[],null,null,null,g.Q,g.j)),o.tb(13,49152,null,0,d.s,[o.h,o.k,o.z],null,null),(t()(),o.jb(16777216,null,0,1,null,w)),o.tb(15,16384,null,0,h.i,[o.P,o.L],{ngIf:[0,"ngIf"]},null),(t()(),o.jb(16777216,null,0,1,null,x)),o.tb(17,16384,null,0,h.i,[o.P,o.L],{ngIf:[0,"ngIf"]},null),(t()(),o.ub(18,0,null,0,5,"ion-grid",[],null,null,null,g.S,g.l)),o.tb(19,49152,null,0,d.y,[o.h,o.k,o.z],null,null),(t()(),o.ub(20,0,null,0,3,"ion-row",[],null,null,null,g.db,g.w)),o.tb(21,49152,null,0,d.hb,[o.h,o.k,o.z],null,null),(t()(),o.jb(16777216,null,0,1,null,D)),o.tb(23,278528,null,0,h.h,[o.P,o.L,o.s],{ngForOf:[0,"ngForOf"]},null)],(function(t,n){var e=n.component;t(n,4,0,"ios"),t(n,11,0,"dark"),t(n,15,0,e.isLoading),t(n,17,0,0===e.workouts.length),t(n,23,0,e.workouts)}),(function(t,n){t(n,7,0,n.component.title)}))}function P(t){return o.Qb(0,[(t()(),o.ub(0,0,null,null,1,"app-wgoals",[],null,null,null,E,m)),o.tb(1,114688,null,0,Q,[_.a,b.m,b.a,d.Ib],null,null)],(function(t,n){t(n,1,0)}),null)}var C=o.qb("app-wgoals",Q,P,{},{},[]),O=e("gIcY"),B=e("iTUp"),z=e("Lm9r"),q=e("j1ZV"),I=function(){return function(){}}();e.d(n,"WgoalsPageModuleNgFactory",(function(){return M}));var M=o.rb(l,[],(function(t){return o.Db([o.Eb(512,o.j,o.cb,[[8,[u.a,r.a,a.a,C]],[3,o.j],o.x]),o.Eb(4608,h.k,h.j,[o.u,[2,h.t]]),o.Eb(4608,O.r,O.r,[]),o.Eb(4608,d.a,d.a,[o.z,o.g]),o.Eb(4608,d.Gb,d.Gb,[d.a,o.j,o.q]),o.Eb(4608,d.Jb,d.Jb,[d.a,o.j,o.q]),o.Eb(4608,O.b,O.b,[]),o.Eb(1073742336,h.b,h.b,[]),o.Eb(1073742336,O.q,O.q,[]),o.Eb(1073742336,O.f,O.f,[]),o.Eb(1073742336,d.Cb,d.Cb,[]),o.Eb(1073742336,B.a,B.a,[]),o.Eb(1073742336,z.a,z.a,[]),o.Eb(1073742336,b.o,b.o,[[2,b.t],[2,b.m]]),o.Eb(1073742336,O.o,O.o,[]),o.Eb(1073742336,q.a,q.a,[]),o.Eb(1073742336,I,I,[]),o.Eb(1073742336,l,l,[]),o.Eb(1024,b.k,(function(){return[[{path:"",component:Q}]]}),[])])}))}}]); | 11,089 | 11,089 | 0.687167 |
7370d558fa7b7c8e373009df1528faabf5f5f402 | 157,486 | js | JavaScript | src/sap.ui.core/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js | Cynthiamissing/openui5 | 036b02ece214c9938ae0a14ec11b013f12a0f587 | [
"Apache-2.0"
] | 1 | 2018-04-17T23:58:33.000Z | 2018-04-17T23:58:33.000Z | src/sap.ui.core/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js | Cynthiamissing/openui5 | 036b02ece214c9938ae0a14ec11b013f12a0f587 | [
"Apache-2.0"
] | null | null | null | src/sap.ui.core/test/sap/ui/core/qunit/odata/v4/ODataMetaModel.qunit.js | Cynthiamissing/openui5 | 036b02ece214c9938ae0a14ec11b013f12a0f587 | [
"Apache-2.0"
] | null | null | null | /*!
* ${copyright}
*/
sap.ui.require([
"jquery.sap.global",
"sap/ui/base/SyncPromise",
"sap/ui/model/BindingMode",
"sap/ui/model/ChangeReason",
"sap/ui/model/ClientListBinding",
"sap/ui/model/Context",
"sap/ui/model/ContextBinding",
"sap/ui/model/Filter",
"sap/ui/model/MetaModel",
"sap/ui/model/PropertyBinding",
"sap/ui/model/Sorter",
"sap/ui/model/odata/OperationMode",
"sap/ui/model/odata/type/Int64",
"sap/ui/model/odata/type/Raw",
"sap/ui/model/odata/v4/AnnotationHelper",
"sap/ui/model/odata/v4/Context",
"sap/ui/model/odata/v4/lib/_Helper",
"sap/ui/model/odata/v4/ODataMetaModel",
"sap/ui/model/odata/v4/ODataModel",
"sap/ui/model/odata/v4/ValueListType",
"sap/ui/test/TestUtils",
"sap/ui/thirdparty/URI"
], function (jQuery, SyncPromise, BindingMode, ChangeReason, ClientListBinding, BaseContext,
ContextBinding, Filter, MetaModel, PropertyBinding, Sorter, OperationMode, Int64, Raw,
AnnotationHelper, Context, _Helper, ODataMetaModel, ODataModel, ValueListType, TestUtils,
URI) {
/*global QUnit, sinon */
/*eslint max-nested-callbacks: 0, no-loop-func: 0, no-warning-comments: 0 */
"use strict";
// Common := com.sap.vocabularies.Common.v1
// tea_busi := com.sap.gateway.default.iwbep.tea_busi.v0001
// tea_busi_product.v0001 := com.sap.gateway.default.iwbep.tea_busi_product.v0001
// tea_busi_supplier.v0001 := com.sap.gateway.default.iwbep.tea_busi_supplier.v0001
// UI := com.sap.vocabularies.UI.v1
var mMostlyEmptyScope = {
"$EntityContainer" : "empty.DefaultContainer",
"$Version" : "4.0",
"empty." : {
"$kind" : "Schema"
},
"empty.DefaultContainer" : {
"$kind" : "EntityContainer"
}
},
sODataMetaModel = "sap.ui.model.odata.v4.ODataMetaModel",
mProductScope = {
"$EntityContainer" : "tea_busi_product.v0001.DefaultContainer",
"$Reference" : {
"../../../../default/iwbep/tea_busi_supplier/0001/$metadata" : {
"$Include" : [
"tea_busi_supplier.v0001."
]
}
},
"$Version" : "4.0",
"tea_busi_product.v0001." : {
"$kind" : "Schema",
"$Annotations" : { // Note: simulate result of _MetadataRequestor#read
"tea_busi_product.v0001.Category/CategoryName" : {
"@Common.Label" : "CategoryName from tea_busi_product.v0001."
}
}
},
"tea_busi_product.v0001.Category" : {
"$kind" : "EntityType",
"CategoryName" : {
"$kind" : "Property",
"$Type" : "Edm.String"
}
},
"tea_busi_product.v0001.DefaultContainer" : {
"$kind" : "EntityContainer"
},
"tea_busi_product.v0001.Product" : {
"$kind" : "EntityType",
"Name" : {
"$kind" : "Property",
"$Type" : "Edm.String"
},
"PRODUCT_2_CATEGORY" : {
"$kind" : "NavigationProperty",
"$Type" : "tea_busi_product.v0001.Category"
},
"PRODUCT_2_SUPPLIER" : {
"$kind" : "NavigationProperty",
"$Type" : "tea_busi_supplier.v0001.Supplier"
}
}
},
sSampleServiceUrl
= "/sap/opu/odata4/sap/zui5_testv4/default/sap/zui5_epm_sample/0002/",
mScope = {
"$Annotations" : {
"name.space.Id" : {
"@Common.Label" : "ID"
},
"tea_busi.DefaultContainer" : {
"@DefaultContainer" : {}
},
"tea_busi.DefaultContainer/T€AMS" : {
"@T€AMS" : {}
},
"tea_busi.TEAM" : {
"@Common.Text" : {
"$Path" : "Name"
},
"@Common.Text@UI.TextArrangement" : {
"$EnumMember" : "UI.TextArrangementType/TextLast"
},
"@UI.Badge" : {
"@Common.Label" : "Label inside",
"$Type" : "UI.BadgeType",
"HeadLine" : {
"$Type" : "UI.DataField",
"Value" : {
"$Path" : "Name"
}
},
"Title" : {
"$Type" : "UI.DataField",
"Value" : {
"$Path" : "Team_Id"
}
}
},
"@UI.Badge@Common.Label" : "Best Badge Ever!",
"@UI.LineItem" : [{
"@UI.Importance" : {
"$EnumMember" : "UI.ImportanceType/High"
},
"$Type" : "UI.DataField",
"Label" : "Team ID",
"Label@Common.Label" : "Team ID's Label",
"Value" : {
"$Path" : "Team_Id"
}
}]
},
"tea_busi.TEAM/Team_Id" : {
"@Common.Label" : "Team ID",
"@Common.Text" : {
"$Path" : "Name"
},
"@Common.Text@UI.TextArrangement" : {
"$EnumMember" : "UI.TextArrangementType/TextLast"
}
},
"tea_busi.Worker" : {
"@UI.Facets" : [{
"$Type" : "UI.ReferenceFacet",
"Target" : {
// term cast
"$AnnotationPath" : "@UI.LineItem"
}
}, {
"$Type" : "UI.ReferenceFacet",
"Target" : {
// term cast at navigation property itself
"$AnnotationPath" : "EMPLOYEE_2_TEAM@Common.Label"
}
}, {
"$Type" : "UI.ReferenceFacet",
"Target" : {
// navigation property and term cast
"$AnnotationPath" : "EMPLOYEE_2_TEAM/@UI.LineItem"
}
}, {
"$Type" : "UI.ReferenceFacet",
"Target" : {
// type cast, navigation properties and term cast (at its type)
"$AnnotationPath"
: "tea_busi.TEAM/TEAM_2_EMPLOYEES/EMPLOYEE_2_TEAM/@UI.LineItem"
}
}],
"@UI.LineItem" : [{
"$Type" : "UI.DataField",
"Label" : "Team ID",
"Value" : {
"$Path" : "EMPLOYEE_2_TEAM/Team_Id"
}
}]
},
"tea_busi.Worker/EMPLOYEE_2_TEAM" : {
"@Common.Label" : "Employee's Team"
}
},
"$EntityContainer" : "tea_busi.DefaultContainer",
"empty." : {
"$kind" : "Schema"
},
"name.space." : {
"$kind" : "Schema"
},
"tea_busi." : {
"$kind" : "Schema",
"@Schema" : {}
},
"empty.Container" : {
"$kind" : "EntityContainer"
},
"name.space.BadContainer" : {
"$kind" : "EntityContainer",
"DanglingActionImport" : {
"$kind" : "ActionImport",
"$Action" : "not.Found"
},
"DanglingFunctionImport" : {
"$kind" : "FunctionImport",
"$Function" : "not.Found"
}
},
"name.space.Broken" : {
"$kind" : "Term",
"$Type" : "not.Found"
},
"name.space.BrokenFunction" : [{
"$kind" : "Function",
"$ReturnType" : {
"$Type" : "not.Found"
}
}],
"name.space.BrokenOverloads" : [{
"$kind" : "Operation"
}],
"name.space.DerivedPrimitiveFunction" : [{
"$kind" : "Function",
"$ReturnType" : {
"$Type" : "name.space.Id"
}
}],
"name.space.EmptyOverloads" : [],
"name.space.Id" : {
"$kind" : "TypeDefinition",
"$UnderlyingType" : "Edm.String",
"$MaxLength" : 10
},
"name.space.Term" : { // only case with a qualified name and a $Type
"$kind" : "Term",
"$Type" : "tea_busi.Worker"
},
"name.space.OverloadedAction" : [{
"$kind" : "Action",
"$IsBound" : true,
"$Parameter" : [{
// "$Name" : "_it",
"$Type" : "tea_busi.EQUIPMENT"
}],
"$ReturnType" : {
"$Type" : "tea_busi.EQUIPMENT"
}
}, {
"$kind" : "Action",
"$IsBound" : true,
"$Parameter" : [{
// "$Name" : "_it",
"$Type" : "tea_busi.TEAM"
}],
"$ReturnType" : {
"$Type" : "tea_busi.TEAM"
}
}, { // "An unbound action MAY have the same name as a bound action."
"$kind" : "Action",
"$ReturnType" : {
"$Type" : "tea_busi.ComplexType_Salary"
}
}, {
"$kind" : "Action",
"$IsBound" : true,
"$Parameter" : [{
// "$Name" : "_it",
"$Type" : "tea_busi.Worker"
}],
"$ReturnType" : {
"$Type" : "tea_busi.Worker"
}
}],
"name.space.OverloadedFunction" : [{
"$kind" : "Function",
"$ReturnType" : {
"$Type" : "Edm.String"
}
}, {
"$kind" : "Function",
"$ReturnType" : {
"$Type" : "Edm.String"
}
}],
"name.space.VoidAction" : [{
"$kind" : "Action"
}],
"tea_busi.AcChangeManagerOfTeam" : [{
"$kind" : "Action",
"$ReturnType" : {
"$Type" : "tea_busi.TEAM",
"@Common.Label" : "Hail to the Chief"
}
}],
"tea_busi.ComplexType_Salary" : {
"$kind" : "ComplexType",
"AMOUNT" : {
"$kind" : "Property",
"$Type" : "Edm.Decimal"
},
"CURRENCY" : {
"$kind" : "Property",
"$Type" : "Edm.String"
}
},
"tea_busi.ContainedC" : {
"$kind" : "EntityType",
"$Key" : ["Id"],
"Id" : {
"$kind" : "Property",
"$Type" : "Edm.String"
},
"C_2_EMPLOYEE" : {
"$kind" : "NavigationProperty",
"$Type" : "tea_busi.Worker"
},
"C_2_S" : {
"$ContainsTarget" : true,
"$kind" : "NavigationProperty",
"$Type" : "tea_busi.ContainedS"
}
},
"tea_busi.ContainedS" : {
"$kind" : "EntityType",
"$Key" : ["Id"],
"Id" : {
"$kind" : "Property",
"$Type" : "Edm.String"
},
"S_2_C" : {
"$ContainsTarget" : true,
"$kind" : "NavigationProperty",
"$isCollection" : true,
"$Type" : "tea_busi.ContainedC"
},
"S_2_EMPLOYEE" : {
"$kind" : "NavigationProperty",
"$Type" : "tea_busi.Worker"
}
},
"tea_busi.DefaultContainer" : {
"$kind" : "EntityContainer",
"ChangeManagerOfTeam" : {
"$kind" : "ActionImport",
"$Action" : "tea_busi.AcChangeManagerOfTeam"
},
"EMPLOYEES" : {
"$kind" : "EntitySet",
"$NavigationPropertyBinding" : {
"EMPLOYEE_2_TEAM" : "T€AMS",
"EMPLOYEE_2_EQUIPM€NTS" : "EQUIPM€NTS"
},
"$Type" : "tea_busi.Worker"
},
"EQUIPM€NTS" : {
"$kind" : "EntitySet",
"$Type" : "tea_busi.EQUIPMENT"
},
"GetEmployeeMaxAge" : {
"$kind" : "FunctionImport",
"$Function" : "tea_busi.FuGetEmployeeMaxAge"
},
"Me" : {
"$kind" : "Singleton",
"$NavigationPropertyBinding" : {
"EMPLOYEE_2_TEAM" : "T€AMS",
"EMPLOYEE_2_EQUIPM€NTS" : "EQUIPM€NTS"
},
"$Type" : "tea_busi.Worker"
},
"OverloadedAction" : {
"$kind" : "ActionImport",
"$Action" : "name.space.OverloadedAction"
},
"TEAMS" : {
"$kind" : "EntitySet",
"$NavigationPropertyBinding" : {
"TEAM_2_EMPLOYEES" : "EMPLOYEES",
"TEAM_2_CONTAINED_S/S_2_EMPLOYEE" : "EMPLOYEES"
},
"$Type" : "tea_busi.TEAM"
},
"T€AMS" : {
"$kind" : "EntitySet",
"$NavigationPropertyBinding" : {
"TEAM_2_EMPLOYEES" : "EMPLOYEES"
},
"$Type" : "tea_busi.TEAM"
},
"VoidAction" : {
"$kind" : "ActionImport",
"$Action" : "name.space.VoidAction"
}
},
"tea_busi.EQUIPMENT" : {
"$kind" : "EntityType",
"$Key" : ["ID"],
"ID" : {
"$kind" : "Property",
"$Type" : "Edm.Int32",
"$Nullable" : false
}
},
"tea_busi.FuGetEmployeeMaxAge" : [{
"$kind" : "Function",
"$ReturnType" : {
"$Type" : "Edm.Int16"
}
}],
"tea_busi.TEAM" : {
"$kind" : "EntityType",
"$Key" : ["Team_Id"],
"Team_Id" : {
"$kind" : "Property",
"$Type" : "name.space.Id",
"$Nullable" : false,
"$MaxLength" : 10
},
"Name" : {
"$kind" : "Property",
"$Type" : "Edm.String",
"$Nullable" : false,
"$MaxLength" : 40
},
"TEAM_2_EMPLOYEES" : {
"$kind" : "NavigationProperty",
"$isCollection" : true,
"$OnDelete" : "None",
"$OnDelete@Common.Label" : "None of my business",
"$ReferentialConstraint" : {
"foo" : "bar",
"foo@Common.Label" : "Just a Gigolo"
},
"$Type" : "tea_busi.Worker"
},
"TEAM_2_CONTAINED_S" : {
"$ContainsTarget" : true,
"$kind" : "NavigationProperty",
"$Type" : "tea_busi.ContainedS"
},
"TEAM_2_CONTAINED_C" : {
"$ContainsTarget" : true,
"$kind" : "NavigationProperty",
"$isCollection" : true,
"$Type" : "tea_busi.ContainedC"
},
// Note: "value" is a symbolic name for an operation's return type iff. it is
// primitive
"value" : {
"$kind" : "Property",
"$Type" : "Edm.String"
}
},
"tea_busi.Worker" : {
"$kind" : "EntityType",
"$Key" : ["ID"],
"ID" : {
"$kind" : "Property",
"$Type" : "Edm.String",
"$Nullable" : false,
"$MaxLength" : 4
},
"AGE" : {
"$kind" : "Property",
"$Type" : "Edm.Int16",
"$Nullable" : false
},
"EMPLOYEE_2_CONTAINED_S" : {
"$ContainsTarget" : true,
"$kind" : "NavigationProperty",
"$Type" : "tea_busi.ContainedS"
},
"EMPLOYEE_2_EQUIPM€NTS" : {
"$kind" : "NavigationProperty",
"$isCollection" : true,
"$Type" : "tea_busi.EQUIPMENT",
"$Nullable" : false
},
"EMPLOYEE_2_TEAM" : {
"$kind" : "NavigationProperty",
"$Type" : "tea_busi.TEAM",
"$Nullable" : false
},
"SALÃRY" : {
"$kind" : "Property",
"$Type" : "tea_busi.ComplexType_Salary"
}
},
"$$Loop" : "$$Loop/", // some endless loop
"$$Term" : "name.space.Term" // replacement for any reference to the term
},
oContainerData = mScope["tea_busi.DefaultContainer"],
aOverloadedAction = mScope["name.space.OverloadedAction"],
mSupplierScope = {
"$Version" : "4.0",
"tea_busi_supplier.v0001." : {
"$kind" : "Schema"
},
"tea_busi_supplier.v0001.Supplier" : {
"$kind" : "EntityType",
"Supplier_Name" : {
"$kind" : "Property",
"$Type" : "Edm.String"
}
}
},
oTeamData = mScope["tea_busi.TEAM"],
oTeamLineItem = mScope.$Annotations["tea_busi.TEAM"]["@UI.LineItem"],
oWorkerData = mScope["tea_busi.Worker"],
mXServiceScope = {
"$Version" : "4.0",
"$Annotations" : {}, // simulate ODataMetaModel#_mergeAnnotations
"$EntityContainer" : "tea_busi.v0001.DefaultContainer",
"$Reference" : {
// Note: Do not reference tea_busi_supplier directly from here! We want to test the
// special case that it is only indirectly referenced.
"../../../../default/iwbep/tea_busi_foo/0001/$metadata" : {
"$Include" : [
"tea_busi_foo.v0001."
]
},
"../../../../default/iwbep/tea_busi_product/0001/$metadata" : {
"$Include" : [
"ignore.me.",
"tea_busi_product.v0001."
]
},
"/empty/$metadata" : {
"$Include" : [
"empty.",
"I.still.haven't.found.what.I'm.looking.for."
]
}
},
"tea_busi.v0001." : {
"$kind" : "Schema"
},
"tea_busi.v0001.DefaultContainer" : {
"$kind" : "EntityContainer",
"EQUIPM€NTS" : {
"$kind" : "EntitySet",
"$Type" : "tea_busi.v0001.EQUIPMENT"
}
},
"tea_busi.v0001.EQUIPMENT" : {
"$kind" : "EntityType",
"EQUIPMENT_2_PRODUCT" : {
"$kind" : "NavigationProperty",
"$Type" : "tea_busi_product.v0001.Product"
}
}
},
aAllScopes = [
mMostlyEmptyScope,
mProductScope,
mScope,
mSupplierScope,
mXServiceScope
];
/**
* Checks the "get*" and "request*" methods corresponding to the named "fetch*" method,
* using the given arguments.
*
* @param {object} oTestContext
* the QUnit "this" object
* @param {object} assert
* the QUnit "assert" object
* @param {string} sMethodName
* method name "fetch*"
* @param {object[]} aArguments
* method arguments
* @param {boolean} [bThrow=false]
* whether the "get*" method throws if the promise is not fulfilled
* @returns {Promise}
* the "request*" method's promise
*/
function checkGetAndRequest(oTestContext, assert, sMethodName, aArguments, bThrow) {
var oExpectation,
sGetMethodName = sMethodName.replace("fetch", "get"),
oMetaModel = oTestContext.oMetaModel,
oReason = new Error("rejected"),
oRejectedPromise = Promise.reject(oReason),
sRequestMethodName = sMethodName.replace("fetch", "request"),
oResult = {},
oSyncPromise = SyncPromise.resolve(oRejectedPromise);
// resolve...
oExpectation = oTestContext.mock(oMetaModel).expects(sMethodName).exactly(4);
oExpectation = oExpectation.withExactArgs.apply(oExpectation, aArguments);
oExpectation.returns(SyncPromise.resolve(oResult));
// get: fulfilled
assert.strictEqual(oMetaModel[sGetMethodName].apply(oMetaModel, aArguments), oResult);
// reject...
oExpectation.returns(oSyncPromise);
oTestContext.mock(Promise).expects("resolve")
.withExactArgs(sinon.match.same(oSyncPromise))
.returns(oRejectedPromise); // return any promise (this is not unwrapping!)
// request (promise still pending!)
assert.strictEqual(oMetaModel[sRequestMethodName].apply(oMetaModel, aArguments),
oRejectedPromise);
// get: pending
if (bThrow) {
assert.throws(function () {
oMetaModel[sGetMethodName].apply(oMetaModel, aArguments);
}, new Error("Result pending"));
} else {
assert.strictEqual(oMetaModel[sGetMethodName].apply(oMetaModel, aArguments), undefined,
"pending");
}
return oSyncPromise.catch(function () {
// get: rejected
if (bThrow) {
assert.throws(function () {
oMetaModel[sGetMethodName].apply(oMetaModel, aArguments);
}, oReason);
} else {
assert.strictEqual(oMetaModel[sGetMethodName].apply(oMetaModel, aArguments),
undefined, "rejected");
}
});
}
/**
* Returns a clone, that is a deep copy, of the given object.
*
* @param {object} o
* any serializable object
* @returns {object}
* a deep copy of <code>o</code>
*/
function clone(o) {
return JSON.parse(JSON.stringify(o));
}
/**
* Runs the given test for each name/value pair in the given fixture. The name is interpreted
* as a path "[<sContextPath>'|']<sMetaPath>" and cut accordingly. The test is called with
* an almost resolved sPath (just '|' replaced by '/').
*
* @param {object} mFixture
* map<string, any>
* @param {function} fnTest
* function(string sPath, any vResult, string sContextPath, string sMetaPath)
*/
function forEach(mFixture, fnTest) {
var sPath;
for (sPath in mFixture) {
var i = sPath.indexOf("|"),
sContextPath = "",
sMetaPath = sPath.slice(i + 1),
vValue = mFixture[sPath];
if (i >= 0) {
sContextPath = sPath.slice(0, i);
sPath = sContextPath + "/" + sMetaPath;
}
fnTest(sPath, vValue, sContextPath, sMetaPath);
}
}
//*********************************************************************************************
QUnit.module("sap.ui.model.odata.v4.ODataMetaModel", {
// remember copy to ensure test isolation
mOriginalScopes : clone(aAllScopes),
afterEach : function (assert) {
assert.deepEqual(aAllScopes, this.mOriginalScopes, "metadata unchanged");
},
/*
* Allow warnings if told to; always suppress debug messages.
*/
allowWarnings : function (assert, bWarn) {
this.mock(jQuery.sap.log).expects("isLoggable").atLeast(1)
.withExactArgs(sinon.match.number, sODataMetaModel)
.callsFake(function (iLogLevel) {
switch (iLogLevel) {
case jQuery.sap.log.Level.DEBUG:
return false;
case jQuery.sap.log.Level.WARNING:
return bWarn;
default:
return true;
}
});
},
beforeEach : function () {
var oMetadataRequestor = {
read : function () { throw new Error(); }
},
sUrl = "/a/b/c/d/e/$metadata";
this.oLogMock = this.mock(jQuery.sap.log);
this.oLogMock.expects("warning").never();
this.oLogMock.expects("error").never();
this.oMetaModel = new ODataMetaModel(oMetadataRequestor, sUrl);
this.oMetaModelMock = this.mock(this.oMetaModel);
this.oModel = {
reportError : function () {
throw new Error("Unsupported operation");
},
resolve : ODataModel.prototype.resolve
};
},
/*
* Expect the given debug message with the given path, but only if debug level is on.
*/
expectDebug : function (bDebug, sMessage, sPath) {
this.oLogMock.expects("isLoggable")
.withExactArgs(jQuery.sap.log.Level.DEBUG, sODataMetaModel).returns(bDebug);
this.oLogMock.expects("debug").exactly(bDebug ? 1 : 0)
.withExactArgs(sMessage, sPath, sODataMetaModel);
},
/*
* Expects "fetchEntityContainer" to be called at least once on the current meta model,
* returning a clone of the given scope.
*
* @param {object} mScope
*/
expectFetchEntityContainer : function (mScope) {
mScope = clone(mScope);
this.oMetaModel.validate("n/a", mScope); // fill mSchema2MetadataUrl!
this.oMetaModelMock.expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(mScope));
}
});
//*********************************************************************************************
QUnit.test("basics", function (assert) {
var sAnnotationUri = "my/annotation.xml",
aAnnotationUris = [ sAnnotationUri, "uri2.xml"],
oModel = {},
oMetadataRequestor = this.oMetaModel.oRequestor,
sUrl = "/~/$metadata",
oMetaModel;
// code under test
oMetaModel = new ODataMetaModel(oMetadataRequestor, sUrl);
assert.ok(oMetaModel instanceof MetaModel);
assert.strictEqual(oMetaModel.aAnnotationUris, undefined);
assert.ok(oMetaModel.hasOwnProperty("aAnnotationUris"), "own property aAnnotationUris");
assert.strictEqual(oMetaModel.oRequestor, oMetadataRequestor);
assert.strictEqual(oMetaModel.sUrl, sUrl);
assert.strictEqual(oMetaModel.getDefaultBindingMode(), BindingMode.OneTime);
assert.strictEqual(oMetaModel.toString(),
"sap.ui.model.odata.v4.ODataMetaModel: /~/$metadata");
// code under test
oMetaModel.setDefaultBindingMode(BindingMode.OneWay);
assert.strictEqual(oMetaModel.getDefaultBindingMode(), BindingMode.OneWay);
// code under test
oMetaModel = new ODataMetaModel(oMetadataRequestor, sUrl, aAnnotationUris);
assert.strictEqual(oMetaModel.aAnnotationUris, aAnnotationUris, "arrays are passed");
// code under test
oMetaModel = new ODataMetaModel(oMetadataRequestor, sUrl, sAnnotationUri);
assert.deepEqual(oMetaModel.aAnnotationUris, [sAnnotationUri],
"single annotation is wrapped");
// code under test
oMetaModel = new ODataMetaModel(null, null, null, oModel);
// code under test
assert.strictEqual(oMetaModel.getAdapterFactoryModulePath(),
"sap/ui/model/odata/v4/meta/ODataAdapterFactory");
});
//*********************************************************************************************
QUnit.test("forbidden", function (assert) {
assert.throws(function () { //TODO implement
this.oMetaModel.bindTree();
}, new Error("Unsupported operation: v4.ODataMetaModel#bindTree"));
assert.throws(function () {
this.oMetaModel.getOriginalProperty();
}, new Error("Unsupported operation: v4.ODataMetaModel#getOriginalProperty"));
assert.throws(function () { //TODO implement
this.oMetaModel.isList();
}, new Error("Unsupported operation: v4.ODataMetaModel#isList"));
assert.throws(function () {
this.oMetaModel.refresh();
}, new Error("Unsupported operation: v4.ODataMetaModel#refresh"));
assert.throws(function () {
this.oMetaModel.setLegacySyntax(); // argument does not matter!
}, new Error("Unsupported operation: v4.ODataMetaModel#setLegacySyntax"));
assert.throws(function () {
this.oMetaModel.setDefaultBindingMode(BindingMode.TwoWay);
});
});
//*********************************************************************************************
[
undefined,
["/my/annotation.xml"],
["/my/annotation.xml", "/another/annotation.xml"]
].forEach(function (aAnnotationURI) {
var title = "fetchEntityContainer - " + JSON.stringify(aAnnotationURI);
QUnit.test(title, function (assert) {
var oRequestorMock = this.mock(this.oMetaModel.oRequestor),
aReadResults,
mRootScope = {},
oSyncPromise,
that = this;
function expectReads(bPrefetch) {
oRequestorMock.expects("read")
.withExactArgs(that.oMetaModel.sUrl, false, bPrefetch)
.returns(Promise.resolve(mRootScope));
aReadResults = [];
(aAnnotationURI || []).forEach(function (sAnnotationUrl) {
var oAnnotationResult = {};
aReadResults.push(oAnnotationResult);
oRequestorMock.expects("read")
.withExactArgs(sAnnotationUrl, true, bPrefetch)
.returns(Promise.resolve(oAnnotationResult));
});
}
this.oMetaModel.aAnnotationUris = aAnnotationURI;
this.oMetaModelMock.expects("_mergeAnnotations").never();
expectReads(true);
// code under test
assert.strictEqual(this.oMetaModel.fetchEntityContainer(true), null);
// bPrefetch => no caching
expectReads(true);
// code under test
assert.strictEqual(this.oMetaModel.fetchEntityContainer(true), null);
// now test [bPrefetch=false]
expectReads();
this.oMetaModelMock.expects("_mergeAnnotations")
.withExactArgs(mRootScope, aReadResults);
// code under test
oSyncPromise = this.oMetaModel.fetchEntityContainer();
// pending
assert.strictEqual(oSyncPromise.isPending(), true);
// already caching
assert.strictEqual(this.oMetaModel.fetchEntityContainer(), oSyncPromise);
assert.strictEqual(this.oMetaModel.fetchEntityContainer(true), oSyncPromise,
"now bPrefetch makes no difference");
return oSyncPromise.then(function (mRootScope0) {
assert.strictEqual(mRootScope0, mRootScope);
// still caching
assert.strictEqual(that.oMetaModel.fetchEntityContainer(), oSyncPromise);
});
});
});
//TODO later support "$Extends" : "<13.1.2 EntityContainer Extends>"
//*********************************************************************************************
QUnit.test("fetchEntityContainer: _mergeAnnotations fails", function (assert) {
var oError = new Error();
this.mock(this.oMetaModel.oRequestor).expects("read")
.withExactArgs(this.oMetaModel.sUrl, false, undefined)
.returns(Promise.resolve({}));
this.oMetaModelMock.expects("_mergeAnnotations").throws(oError);
return this.oMetaModel.fetchEntityContainer().then(function () {
assert.ok(false, "unexpected success");
}, function (oError0) {
assert.strictEqual(oError0, oError);
});
});
//*********************************************************************************************
QUnit.test("getMetaContext", function (assert) {
var oMetaContext;
this.oMetaModelMock.expects("getMetaPath")
.withExactArgs("/Foo/-1/bar")
.returns("/Foo/bar");
// code under test
oMetaContext = this.oMetaModel.getMetaContext("/Foo/-1/bar");
assert.strictEqual(oMetaContext.getModel(), this.oMetaModel);
assert.strictEqual(oMetaContext.getPath(), "/Foo/bar");
});
//*********************************************************************************************
QUnit.test("getMetaPath", function (assert) {
var sMetaPath = {},
sPath = {};
this.mock(_Helper).expects("getMetaPath")
.withExactArgs(sinon.match.same(sPath)).returns(sMetaPath);
assert.strictEqual(this.oMetaModel.getMetaPath(sPath), sMetaPath);
});
//*********************************************************************************************
forEach({
// absolute path
"/" : "/",
"/foo/bar|/" : "/", // context is ignored
// relative path
"" : undefined, // w/o context --> important for MetaModel#createBindingContext etc.
"|foo/bar" : undefined, // w/o context
"/|" : "/",
"/|foo/bar" : "/foo/bar",
"/foo|bar" : "/foo/bar",
"/foo/bar|" : "/foo/bar",
"/foo/|bar" : "/foo/bar",
// trailing slash is preserved
"/foo/bar/" : "/foo/bar/",
"/foo|bar/" : "/foo/bar/",
// relative path that starts with a dot
"/foo/bar|./" : "/foo/bar/",
"/foo|./bar/" : "/foo/bar/",
"/foo/|./bar/" : "/foo/bar/",
// annotations
"/foo|@bar" : "/foo@bar",
"/foo/|@bar" : "/foo/@bar",
"/foo|./@bar" : "/foo/@bar",
"/foo/|./@bar" : "/foo/@bar",
// technical properties
"/foo|$kind" : "/foo/$kind",
"/foo/|$kind" : "/foo/$kind",
"/foo|./$kind" : "/foo/$kind",
"/foo/|./$kind" : "/foo/$kind"
}, function (sPath, sResolvedPath, sContextPath, sMetaPath) {
QUnit.test("resolve: " + sContextPath + " > " + sMetaPath, function (assert) {
var oContext = sContextPath && this.oMetaModel.getContext(sContextPath);
assert.strictEqual(this.oMetaModel.resolve(sMetaPath, oContext), sResolvedPath);
});
});
//TODO make sure that Context objects are only created for absolute paths?!
//*********************************************************************************************
[".bar", ".@bar", ".$kind"].forEach(function (sPath) {
QUnit.test("resolve: unsupported relative path " + sPath, function (assert) {
var oContext = this.oMetaModel.getContext("/foo");
assert.raises(function () {
this.oMetaModel.resolve(sPath, oContext);
}, new Error("Unsupported relative path: " + sPath));
});
});
//*********************************************************************************************
QUnit.test("resolve: undefined", function (assert) {
assert.strictEqual(
this.oMetaModel.resolve(undefined, this.oMetaModel.getContext("/")),
"/");
});
//*********************************************************************************************
//TODO better map meta model path to pure JSON path (look up inside JsonModel)?
// what about @sapui.name then, which requires a literal as expected result?
// --> we could distinguish "/<path>" from "<literal>"
forEach({
// "JSON" drill-down ----------------------------------------------------------------------
"/$EntityContainer" : "tea_busi.DefaultContainer",
"/tea_busi./$kind" : "Schema",
"/tea_busi.DefaultContainer/$kind" : "EntityContainer",
// trailing slash: object vs. name --------------------------------------------------------
"/" : oContainerData,
"/$EntityContainer/" : oContainerData,
"/T€AMS/" : oTeamData,
"/T€AMS/$Type/" : oTeamData,
// scope lookup ("17.3 QualifiedName") ----------------------------------------------------
"/$EntityContainer/$kind" : "EntityContainer",
"/$EntityContainer/T€AMS/$Type" : "tea_busi.TEAM",
"/$EntityContainer/T€AMS/$Type/Team_Id" : oTeamData.Team_Id,
// "17.3 QualifiedName", e.g. type cast ---------------------------------------------------
"/tea_busi." : mScope["tea_busi."], // access to schema
"/tea_busi.DefaultContainer/EMPLOYEES/tea_busi.Worker/AGE" : oWorkerData.AGE,
// implicit $Type insertion ---------------------------------------------------------------
"/T€AMS/Team_Id" : oTeamData.Team_Id,
"/T€AMS/TEAM_2_EMPLOYEES" : oTeamData.TEAM_2_EMPLOYEES,
"/T€AMS/TEAM_2_EMPLOYEES/AGE" : oWorkerData.AGE,
// scope lookup, then implicit $Type insertion!
"/$$Term/AGE" : oWorkerData.AGE,
// "17.2 SimpleIdentifier": lookup inside current schema child ----------------------------
"/T€AMS" : oContainerData["T€AMS"],
"/T€AMS/$NavigationPropertyBinding/TEAM_2_EMPLOYEES/" : oWorkerData,
"/T€AMS/$NavigationPropertyBinding/TEAM_2_EMPLOYEES/$Type" : "tea_busi.Worker",
"/T€AMS/$NavigationPropertyBinding/TEAM_2_EMPLOYEES/AGE" : oWorkerData.AGE,
// operations -----------------------------------------------------------------------------
"/OverloadedAction" : oContainerData["OverloadedAction"],
"/OverloadedAction/$Action" : "name.space.OverloadedAction",
"/ChangeManagerOfTeam/" : oTeamData,
//TODO mScope[mScope["..."][0].$ReturnType.$Type] is where the next OData simple identifier
// would live in case of entity/complex type, but we would like to avoid warnings for
// primitive types - how to tell the difference?
// "/GetEmployeeMaxAge/" : "Edm.Int16",
// Note: "value" is a symbolic name for the whole return type iff. it is primitive
"/GetEmployeeMaxAge/value" : mScope["tea_busi.FuGetEmployeeMaxAge"][0].$ReturnType,
"/GetEmployeeMaxAge/value/$Type" : "Edm.Int16", // path may continue!
"/tea_busi.FuGetEmployeeMaxAge/value"
: mScope["tea_busi.FuGetEmployeeMaxAge"][0].$ReturnType,
"/name.space.DerivedPrimitiveFunction/value"
//TODO merge facets of return type and type definition?!
: mScope["name.space.DerivedPrimitiveFunction"][0].$ReturnType,
"/ChangeManagerOfTeam/value" : oTeamData.value,
// action overloads -----------------------------------------------------------------------
//TODO @$ui5.overload: support for split segments? etc.
"/OverloadedAction/@$ui5.overload" : sinon.match.array.deepEquals([aOverloadedAction[2]]),
"/OverloadedAction/@$ui5.overload/0" : aOverloadedAction[2],
// Note: trailing slash does not make a difference in "JSON" drill-down
"/OverloadedAction/@$ui5.overload/0/$ReturnType/" : aOverloadedAction[2].$ReturnType,
"/OverloadedAction/@$ui5.overload/0/$ReturnType/$Type" : "tea_busi.ComplexType_Salary",
"/OverloadedAction/" : mScope["tea_busi.ComplexType_Salary"],
"/name.space.OverloadedAction" : aOverloadedAction,
"/T€AMS/NotFound/name.space.OverloadedAction" : aOverloadedAction,
"/name.space.OverloadedAction/1" : aOverloadedAction[1],
"/OverloadedAction/$Action/1" : aOverloadedAction[1],
"/OverloadedAction/@$ui5.overload/AMOUNT" : mScope["tea_busi.ComplexType_Salary"].AMOUNT,
"/OverloadedAction/AMOUNT" : mScope["tea_busi.ComplexType_Salary"].AMOUNT,
"/T€AMS/name.space.OverloadedAction/Team_Id" : oTeamData.Team_Id,
"/T€AMS/name.space.OverloadedAction/@$ui5.overload"
: sinon.match.array.deepEquals([aOverloadedAction[1]]),
"/name.space.OverloadedAction/@$ui5.overload" : sinon.match.array.deepEquals([]),
// only "Action" and "Function" is expected as $kind, but others are not filtered out!
"/name.space.BrokenOverloads"
: sinon.match.array.deepEquals(mScope["name.space.BrokenOverloads"]),
// annotations ----------------------------------------------------------------------------
"/@DefaultContainer"
: mScope.$Annotations["tea_busi.DefaultContainer"]["@DefaultContainer"],
"/tea_busi.DefaultContainer@DefaultContainer"
: mScope.$Annotations["tea_busi.DefaultContainer"]["@DefaultContainer"],
"/tea_busi.DefaultContainer/@DefaultContainer" // w/o $Type, slash makes no difference!
: mScope.$Annotations["tea_busi.DefaultContainer"]["@DefaultContainer"],
"/$EntityContainer@DefaultContainer" // Note: we could change this
: mScope.$Annotations["tea_busi.DefaultContainer"]["@DefaultContainer"],
"/$EntityContainer/@DefaultContainer" // w/o $Type, slash makes no difference!
: mScope.$Annotations["tea_busi.DefaultContainer"]["@DefaultContainer"],
"/T€AMS/$Type/@UI.LineItem" : oTeamLineItem,
"/T€AMS/@UI.LineItem" : oTeamLineItem,
"/T€AMS/@UI.LineItem/0/Label" : oTeamLineItem[0].Label,
"/T€AMS/@UI.LineItem/0/@UI.Importance" : oTeamLineItem[0]["@UI.Importance"],
"/T€AMS@T€AMS"
: mScope.$Annotations["tea_busi.DefaultContainer/T€AMS"]["@T€AMS"],
"/T€AMS/@Common.Text"
: mScope.$Annotations["tea_busi.TEAM"]["@Common.Text"],
"/T€AMS/@Common.Text@UI.TextArrangement"
: mScope.$Annotations["tea_busi.TEAM"]["@Common.Text@UI.TextArrangement"],
"/T€AMS/Team_Id@Common.Text"
: mScope.$Annotations["tea_busi.TEAM/Team_Id"]["@Common.Text"],
"/T€AMS/Team_Id@Common.Text@UI.TextArrangement"
: mScope.$Annotations["tea_busi.TEAM/Team_Id"]["@Common.Text@UI.TextArrangement"],
"/tea_busi./@Schema" : mScope["tea_busi."]["@Schema"],
// inline annotations
"/ChangeManagerOfTeam/$Action/0/$ReturnType/@Common.Label" : "Hail to the Chief",
"/T€AMS/TEAM_2_EMPLOYEES/$OnDelete@Common.Label" : "None of my business",
"/T€AMS/TEAM_2_EMPLOYEES/$ReferentialConstraint/foo@Common.Label" : "Just a Gigolo",
"/T€AMS/@UI.LineItem/0/Label@Common.Label" : "Team ID's Label",
"/T€AMS/@UI.Badge@Common.Label" : "Best Badge Ever!", // annotation of annotation
"/T€AMS/@UI.Badge/@Common.Label" : "Label inside", // annotation of record
// "@" to access to all annotations, e.g. for iteration
"/T€AMS@" : mScope.$Annotations["tea_busi.DefaultContainer/T€AMS"],
"/T€AMS/@" : mScope.$Annotations["tea_busi.TEAM"],
"/T€AMS/Team_Id@" : mScope.$Annotations["tea_busi.TEAM/Team_Id"],
// "14.5.12 Expression edm:Path"
// Note: see integration test "{field>Value/$Path@com.sap.vocabularies.Common.v1.Label}"
"/T€AMS/@UI.LineItem/0/Value/$Path@Common.Text"
: mScope.$Annotations["tea_busi.TEAM/Team_Id"]["@Common.Text"],
"/T€AMS/@UI.LineItem/0/Value/$Path/@Common.Label"
: mScope.$Annotations["name.space.Id"]["@Common.Label"],
"/EMPLOYEES/@UI.LineItem/0/Value/$Path@Common.Text"
: mScope.$Annotations["tea_busi.TEAM/Team_Id"]["@Common.Text"],
// "14.5.2 Expression edm:AnnotationPath"
"/EMPLOYEES/@UI.Facets/0/Target/$AnnotationPath/"
: mScope.$Annotations["tea_busi.Worker"]["@UI.LineItem"],
"/EMPLOYEES/@UI.Facets/1/Target/$AnnotationPath/"
: mScope.$Annotations["tea_busi.Worker/EMPLOYEE_2_TEAM"]["@Common.Label"],
"/EMPLOYEES/@UI.Facets/2/Target/$AnnotationPath/"
: mScope.$Annotations["tea_busi.TEAM"]["@UI.LineItem"],
"/EMPLOYEES/@UI.Facets/3/Target/$AnnotationPath/"
: mScope.$Annotations["tea_busi.TEAM"]["@UI.LineItem"],
// @sapui.name ----------------------------------------------------------------------------
"/@sapui.name" : "tea_busi.DefaultContainer",
"/tea_busi.DefaultContainer@sapui.name" : "tea_busi.DefaultContainer",
"/tea_busi.DefaultContainer/@sapui.name" : "tea_busi.DefaultContainer", // no $Type here!
"/$EntityContainer/@sapui.name" : "tea_busi.DefaultContainer",
"/T€AMS@sapui.name" : "T€AMS",
"/T€AMS/@sapui.name" : "tea_busi.TEAM",
"/T€AMS/Team_Id@sapui.name" : "Team_Id",
"/T€AMS/TEAM_2_EMPLOYEES@sapui.name" : "TEAM_2_EMPLOYEES",
"/T€AMS/$NavigationPropertyBinding/TEAM_2_EMPLOYEES/@sapui.name" : "tea_busi.Worker",
"/T€AMS/$NavigationPropertyBinding/TEAM_2_EMPLOYEES/AGE@sapui.name" : "AGE",
"/T€AMS@T€AMS@sapui.name" : "@T€AMS",
"/T€AMS@/@T€AMS@sapui.name" : "@T€AMS",
"/T€AMS@T€AMS/@sapui.name" : "@T€AMS", // no $Type inside @T€AMS, / makes no difference!
"/T€AMS@/@T€AMS/@sapui.name" : "@T€AMS", // dito
"/T€AMS/@UI.LineItem/0/@UI.Importance/@sapui.name" : "@UI.Importance", // in "JSON" mode
"/T€AMS/Team_Id@/@Common.Label@sapui.name" : "@Common.Label" // avoid indirection here!
}, function (sPath, vResult) {
QUnit.test("fetchObject: " + sPath, function (assert) {
var oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mScope));
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath);
assert.strictEqual(oSyncPromise.isFulfilled(), true);
if (vResult && typeof vResult === "object" && "test" in vResult) {
// Sinon.JS matcher
assert.ok(vResult.test(oSyncPromise.getResult()), vResult);
} else {
assert.strictEqual(oSyncPromise.getResult(), vResult);
}
// self-guard to avoid that a complex right-hand side evaluates to undefined
assert.notStrictEqual(vResult, undefined, "use this test for defined results only!");
});
});
//TODO annotations at enum member ".../<10.2.1 Member Name>@..." (Note: "<10.2.2 Member Value>"
// might be a string! Avoid indirection!)
//TODO special cases where inline and external targeting annotations need to be merged!
//TODO support also external targeting from a different schema!
//TODO MySchema.MyFunction/MyParameter --> requires search in array?!
//TODO $count?
//TODO "For annotations targeting a property of an entity type or complex type, the path
// expression is evaluated starting at the outermost entity type or complex type named in the
// Target of the enclosing edm:Annotations element, i.e. an empty path resolves to the
// outermost type, and the first segment of a non-empty path MUST be a property or navigation
// property of the outermost type, a type cast, or a term cast." --> consequences for us?
//*********************************************************************************************
[
// "JSON" drill-down ----------------------------------------------------------------------
"/$missing",
"/tea_busi.DefaultContainer/$missing",
"/tea_busi.DefaultContainer/missing", // "17.2 SimpleIdentifier" treated like any property
"/tea_busi.FuGetEmployeeMaxAge/0/tea_busi.FuGetEmployeeMaxAge", // "0" switches to JSON
"/tea_busi.TEAM/$Key/this.is.missing",
"/tea_busi.Worker/missing", // entity container (see above) treated like any schema child
// scope lookup ("17.3 QualifiedName") ----------------------------------------------------
"/$EntityContainer/$missing",
"/$EntityContainer/missing",
// implicit $Type insertion ---------------------------------------------------------------
"/T€AMS/$Key", // avoid $Type insertion for following $ segments
"/T€AMS/missing",
"/T€AMS/$missing",
// annotations ----------------------------------------------------------------------------
"/tea_busi.Worker@missing",
"/tea_busi.Worker/@missing",
// "@" to access to all annotations, e.g. for iteration
"/tea_busi.Worker/@/@missing",
// operations -----------------------------------------------------------------------------
"/VoidAction/"
].forEach(function (sPath) {
QUnit.test("fetchObject: " + sPath + " --> undefined", function (assert) {
var oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mScope));
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath);
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.strictEqual(oSyncPromise.getResult(), undefined);
});
});
//*********************************************************************************************
QUnit.test("fetchObject: Invalid relative path w/o context", function (assert) {
var sMetaPath = "some/relative/path",
oSyncPromise;
this.oLogMock.expects("error").withExactArgs("Invalid relative path w/o context", sMetaPath,
sODataMetaModel);
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sMetaPath, null);
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.strictEqual(oSyncPromise.getResult(), null);
});
//*********************************************************************************************
["/empty.Container/@", "/T€AMS/Name@"].forEach(function (sPath) {
QUnit.test("fetchObject returns {} (anonymous empty object): " + sPath, function (assert) {
var oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mScope));
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath);
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.deepEqual(oSyncPromise.getResult(), {}); // strictEqual would not work!
});
});
//*********************************************************************************************
QUnit.test("fetchObject without $Annotations", function (assert) {
var oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mMostlyEmptyScope));
// code under test
oSyncPromise = this.oMetaModel.fetchObject("/@DefaultContainer");
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.deepEqual(oSyncPromise.getResult(), undefined); // strictEqual would not work!
});
//TODO if no annotations exist for an external target, avoid {} internally unless "@" is used?
//*********************************************************************************************
[false, true].forEach(function (bWarn) {
forEach({
"/$$Loop/" : "Invalid recursion at /$$Loop",
// Invalid segment (warning) ----------------------------------------------------------
"//$Foo" : "Invalid empty segment",
"/tea_busi./$Annotations" : "Invalid segment: $Annotations", // entrance forbidden!
// Unknown ... ------------------------------------------------------------------------
"/not.Found" : "Unknown qualified name not.Found",
"/Me/not.Found" : "Unknown qualified name not.Found", // no "at /.../undefined"!
"/not.Found@missing" : "Unknown qualified name not.Found",
"/." : "Unknown child . of tea_busi.DefaultContainer",
"/Foo" : "Unknown child Foo of tea_busi.DefaultContainer",
"/$EntityContainer/$kind/" : "Unknown child EntityContainer"
+ " of tea_busi.DefaultContainer at /$EntityContainer/$kind",
// implicit $Action, $Function, $Type insertion
"/name.space.BadContainer/DanglingActionImport/" : "Unknown qualified name not.Found"
+ " at /name.space.BadContainer/DanglingActionImport/$Action",
"/name.space.BadContainer/DanglingFunctionImport/" :
"Unknown qualified name not.Found"
+ " at /name.space.BadContainer/DanglingFunctionImport/$Function",
"/name.space.Broken/" :
"Unknown qualified name not.Found at /name.space.Broken/$Type",
"/name.space.BrokenFunction/" : "Unknown qualified name not.Found"
+ " at /name.space.BrokenFunction/0/$ReturnType/$Type",
//TODO align with "/GetEmployeeMaxAge/" : "Edm.Int16"
"/GetEmployeeMaxAge/@sapui.name" : "Unknown qualified name Edm.Int16"
+ " at /tea_busi.FuGetEmployeeMaxAge/0/$ReturnType/$Type",
"/GetEmployeeMaxAge/value/@sapui.name" : "Unknown qualified name Edm.Int16"
+ " at /tea_busi.FuGetEmployeeMaxAge/0/$ReturnType/$Type",
// implicit scope lookup
"/name.space.Broken/$Type/" :
"Unknown qualified name not.Found at /name.space.Broken/$Type",
"/tea_busi.DefaultContainer/$kind/@sapui.name" : "Unknown child EntityContainer"
+ " of tea_busi.DefaultContainer at /tea_busi.DefaultContainer/$kind",
// Unsupported path before @sapui.name ------------------------------------------------
"/$EntityContainer@sapui.name" : "Unsupported path before @sapui.name",
"/tea_busi.FuGetEmployeeMaxAge/0@sapui.name" : "Unsupported path before @sapui.name",
"/tea_busi.TEAM/$Key/not.Found/@sapui.name" : "Unsupported path before @sapui.name",
"/GetEmployeeMaxAge/value@sapui.name" : "Unsupported path before @sapui.name",
// Unsupported path after @sapui.name -------------------------------------------------
"/@sapui.name/foo" : "Unsupported path after @sapui.name",
"/$EntityContainer/T€AMS/@sapui.name/foo" : "Unsupported path after @sapui.name",
// Unsupported path after @@... -------------------------------------------------------
"/EMPLOYEES/@UI.Facets/1/Target/$AnnotationPath@@this.is.ignored/foo"
: "Unsupported path after @@this.is.ignored",
"/EMPLOYEES/@UI.Facets/1/Target/$AnnotationPath/@@this.is.ignored@foo"
: "Unsupported path after @@this.is.ignored",
"/EMPLOYEES/@UI.Facets/1/Target/$AnnotationPath@@this.is.ignored@sapui.name"
: "Unsupported path after @@this.is.ignored",
// ...is not a function but... --------------------------------------------------------
"/@@sap.ui.model.odata.v4.AnnotationHelper.invalid"
: "sap.ui.model.odata.v4.AnnotationHelper.invalid is not a function but: undefined",
"/@@sap.ui.model.odata.v4.AnnotationHelper"
: "sap.ui.model.odata.v4.AnnotationHelper is not a function but: "
+ sap.ui.model.odata.v4.AnnotationHelper,
// Unsupported overloads --------------------------------------------------------------
"/name.space.EmptyOverloads/" : "Unsupported overloads",
"/name.space.OverloadedAction/" : "Unsupported overloads",
"/name.space.OverloadedFunction/" : "Unsupported overloads"
}, function (sPath, sWarning) {
QUnit.test("fetchObject fails: " + sPath + ", warn = " + bWarn, function (assert) {
var oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mScope));
this.oLogMock.expects("isLoggable")
.withExactArgs(jQuery.sap.log.Level.WARNING, sODataMetaModel).returns(bWarn);
this.oLogMock.expects("warning").exactly(bWarn ? 1 : 0)
.withExactArgs(sWarning, sPath, sODataMetaModel);
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath);
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.deepEqual(oSyncPromise.getResult(), undefined);
});
});
});
//*********************************************************************************************
[false, true].forEach(function (bDebug) {
forEach({
// Invalid segment (debug) ------------------------------------------------------------
"/$Foo/@bar" : "Invalid segment: @bar",
"/$Foo/$Bar" : "Invalid segment: $Bar",
"/$Foo/$Bar/$Baz" : "Invalid segment: $Bar",
"/$EntityContainer/T€AMS/Team_Id/$MaxLength/." : "Invalid segment: .",
"/$EntityContainer/T€AMS/Team_Id/$Nullable/." : "Invalid segment: .",
"/$EntityContainer/T€AMS/Team_Id/NotFound/Invalid" : "Invalid segment: Invalid"
}, function (sPath, sMessage) {
QUnit.test("fetchObject fails: " + sPath + ", debug = " + bDebug, function (assert) {
var oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mScope));
this.oLogMock.expects("isLoggable")
.withExactArgs(jQuery.sap.log.Level.DEBUG, sODataMetaModel).returns(bDebug);
this.oLogMock.expects("debug").exactly(bDebug ? 1 : 0)
.withExactArgs(sMessage, sPath, sODataMetaModel);
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath);
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.deepEqual(oSyncPromise.getResult(), undefined);
});
});
});
//*********************************************************************************************
[
"/EMPLOYEES/@UI.Facets/1/Target/$AnnotationPath",
"/EMPLOYEES/@UI.Facets/1/Target/$AnnotationPath/"
].forEach(function (sPath) {
QUnit.test("fetchObject: " + sPath + "@@...isMultiple", function (assert) {
var oContext,
oInput,
fnIsMultiple = this.mock(AnnotationHelper).expects("isMultiple"),
oResult = {},
oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer").atLeast(1) // see oInput
.returns(SyncPromise.resolve(mScope));
oInput = this.oMetaModel.getObject(sPath);
fnIsMultiple
.withExactArgs(oInput, sinon.match({
context : sinon.match.object,
schemaChildName : "tea_busi.Worker"
})).returns(oResult);
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath
+ "@@sap.ui.model.odata.v4.AnnotationHelper.isMultiple");
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.strictEqual(oSyncPromise.getResult(), oResult);
oContext = fnIsMultiple.args[0][1].context;
assert.ok(oContext instanceof BaseContext);
assert.strictEqual(oContext.getModel(), this.oMetaModel);
assert.strictEqual(oContext.getPath(), sPath);
assert.strictEqual(oContext.getObject(), oInput);
});
});
//*********************************************************************************************
(function () {
var sPath,
sPathPrefix,
mPathPrefix2SchemaChildName = {
"/EMPLOYEES/@UI.Facets/1/Target/$AnnotationPath" : "tea_busi.Worker",
"/T€AMS/@UI.LineItem/0/Value/$Path@Common.Label" : "tea_busi.TEAM",
"/T€AMS/@UI.LineItem/0/Value/$Path/@Common.Label" : "name.space.Id"
},
sSchemaChildName;
for (sPathPrefix in mPathPrefix2SchemaChildName) {
sPath = sPathPrefix + "@@.computedAnnotation";
sSchemaChildName = mPathPrefix2SchemaChildName[sPathPrefix];
QUnit.test("fetchObject: " + sPath, function (assert) {
var fnComputedAnnotation,
oContext,
oInput,
oResult = {},
oScope = {
computedAnnotation : function () {}
},
oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer").atLeast(1) // see oInput
.returns(SyncPromise.resolve(mScope));
oInput = this.oMetaModel.getObject(sPathPrefix);
fnComputedAnnotation = this.mock(oScope).expects("computedAnnotation");
fnComputedAnnotation
.withExactArgs(oInput, sinon.match({
context : sinon.match.object,
schemaChildName : sSchemaChildName
})).returns(oResult);
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath, null, {scope : oScope});
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.strictEqual(oSyncPromise.getResult(), oResult);
oContext = fnComputedAnnotation.args[0][1].context;
assert.ok(oContext instanceof BaseContext);
assert.strictEqual(oContext.getModel(), this.oMetaModel);
assert.strictEqual(oContext.getPath(), sPathPrefix);
assert.strictEqual(oContext.getObject(), oInput);
});
}
}());
//*********************************************************************************************
[false, true].forEach(function (bWarn) {
QUnit.test("fetchObject: " + "...@@... throws", function (assert) {
var oError = new Error("This call failed intentionally"),
sPath = "/@@sap.ui.model.odata.v4.AnnotationHelper.isMultiple",
oSyncPromise;
this.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mScope));
this.mock(AnnotationHelper).expects("isMultiple")
.throws(oError);
this.oLogMock.expects("isLoggable")
.withExactArgs(jQuery.sap.log.Level.WARNING, sODataMetaModel).returns(bWarn);
this.oLogMock.expects("warning").exactly(bWarn ? 1 : 0).withExactArgs(
"Error calling sap.ui.model.odata.v4.AnnotationHelper.isMultiple: " + oError,
sPath, sODataMetaModel);
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath);
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.strictEqual(oSyncPromise.getResult(), undefined);
});
});
//*********************************************************************************************
[false, true].forEach(function (bDebug) {
QUnit.test("fetchObject: cross-service reference, bDebug = " + bDebug, function (assert) {
var mClonedProductScope = clone(mProductScope),
aPromises = [],
oRequestorMock = this.mock(this.oMetaModel.oRequestor),
that = this;
/*
* Expect the given debug message with the given path.
*/
function expectDebug(sMessage, sPath) {
that.expectDebug(bDebug, sMessage, sPath);
}
/*
* Code under test: ODataMetaModel#fetchObject with the given path should yield the
* given expected result.
*/
function codeUnderTest(sPath, vExpectedResult) {
aPromises.push(that.oMetaModel.fetchObject(sPath).then(function (vResult) {
assert.strictEqual(vResult, vExpectedResult);
}));
}
this.expectFetchEntityContainer(mXServiceScope);
oRequestorMock.expects("read")
.withExactArgs("/a/default/iwbep/tea_busi_product/0001/$metadata")
.returns(Promise.resolve(mClonedProductScope));
oRequestorMock.expects("read")
.withExactArgs("/a/default/iwbep/tea_busi_supplier/0001/$metadata")
.returns(Promise.resolve(mSupplierScope));
oRequestorMock.expects("read")
.withExactArgs("/empty/$metadata")
.returns(Promise.resolve(mMostlyEmptyScope));
expectDebug("Namespace tea_busi_product.v0001. found in $Include"
+ " of /a/default/iwbep/tea_busi_product/0001/$metadata"
+ " at /tea_busi.v0001.EQUIPMENT/EQUIPMENT_2_PRODUCT/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/Name");
expectDebug("Reading /a/default/iwbep/tea_busi_product/0001/$metadata"
+ " at /tea_busi.v0001.EQUIPMENT/EQUIPMENT_2_PRODUCT/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/Name");
expectDebug("Waiting for tea_busi_product.v0001."
+ " at /tea_busi.v0001.EQUIPMENT/EQUIPMENT_2_PRODUCT/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/Name");
codeUnderTest("/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/Name",
mClonedProductScope["tea_busi_product.v0001.Product"].Name);
expectDebug("Waiting for tea_busi_product.v0001."
+ " at /tea_busi.v0001.EQUIPMENT/EQUIPMENT_2_PRODUCT/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/PRODUCT_2_CATEGORY/CategoryName");
codeUnderTest("/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/PRODUCT_2_CATEGORY/CategoryName",
mClonedProductScope["tea_busi_product.v0001.Category"].CategoryName);
expectDebug("Waiting for tea_busi_product.v0001.",
"/tea_busi_product.v0001.Category/CategoryName");
codeUnderTest("/tea_busi_product.v0001.Category/CategoryName",
mClonedProductScope["tea_busi_product.v0001.Category"].CategoryName);
expectDebug("Waiting for tea_busi_product.v0001.",
"/tea_busi_product.v0001.Category/CategoryName@Common.Label");
codeUnderTest("/tea_busi_product.v0001.Category/CategoryName@Common.Label",
"CategoryName from tea_busi_product.v0001.");
expectDebug("Waiting for tea_busi_product.v0001."
+ " at /tea_busi.v0001.EQUIPMENT/EQUIPMENT_2_PRODUCT/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/PRODUCT_2_SUPPLIER/Supplier_Name");
codeUnderTest("/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/PRODUCT_2_SUPPLIER/Supplier_Name",
mSupplierScope["tea_busi_supplier.v0001.Supplier"].Supplier_Name);
expectDebug("Namespace empty. found in $Include of /empty/$metadata",
"/empty.DefaultContainer");
expectDebug("Reading /empty/$metadata", "/empty.DefaultContainer");
expectDebug("Waiting for empty.",
"/empty.DefaultContainer");
codeUnderTest("/empty.DefaultContainer", mMostlyEmptyScope["empty.DefaultContainer"]);
// Note: these are logged asynchronously!
expectDebug("Including tea_busi_product.v0001."
+ " from /a/default/iwbep/tea_busi_product/0001/$metadata"
+ " at /tea_busi.v0001.EQUIPMENT/EQUIPMENT_2_PRODUCT/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/Name");
expectDebug("Including empty. from /empty/$metadata",
"/empty.DefaultContainer");
expectDebug("Namespace tea_busi_supplier.v0001. found in $Include"
+ " of /a/default/iwbep/tea_busi_supplier/0001/$metadata"
+ " at /tea_busi_product.v0001.Product/PRODUCT_2_SUPPLIER/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/PRODUCT_2_SUPPLIER/Supplier_Name");
expectDebug("Reading /a/default/iwbep/tea_busi_supplier/0001/$metadata"
+ " at /tea_busi_product.v0001.Product/PRODUCT_2_SUPPLIER/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/PRODUCT_2_SUPPLIER/Supplier_Name");
expectDebug("Waiting for tea_busi_supplier.v0001."
+ " at /tea_busi_product.v0001.Product/PRODUCT_2_SUPPLIER/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/PRODUCT_2_SUPPLIER/Supplier_Name");
expectDebug("Including tea_busi_supplier.v0001."
+ " from /a/default/iwbep/tea_busi_supplier/0001/$metadata"
+ " at /tea_busi_product.v0001.Product/PRODUCT_2_SUPPLIER/$Type",
"/EQUIPM€NTS/EQUIPMENT_2_PRODUCT/PRODUCT_2_SUPPLIER/Supplier_Name");
return Promise.all(aPromises);
});
});
//TODO Decision: It is an error if a namespace is referenced multiple times with different URIs.
// This should be checked even when load-on-demand is used.
// (It should not even be included multiple times with the same URI!)
//TODO Check that no namespace is included which is already present!
//TODO API to load "transitive closure"
//TODO support for sync. XML Templating
//*********************************************************************************************
[false, true].forEach(function (bWarn) {
var sTitle = "fetchObject: missing cross-service reference, bWarn = " + bWarn;
QUnit.test(sTitle, function (assert) {
var sPath = "/not.found",
oSyncPromise;
this.expectFetchEntityContainer(mMostlyEmptyScope);
this.oLogMock.expects("isLoggable")
.withExactArgs(jQuery.sap.log.Level.WARNING, sODataMetaModel).returns(bWarn);
this.oLogMock.expects("warning").exactly(bWarn ? 1 : 0)
.withExactArgs("Unknown qualified name not.found", sPath, sODataMetaModel);
// code under test
oSyncPromise = this.oMetaModel.fetchObject(sPath);
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.deepEqual(oSyncPromise.getResult(), undefined);
});
});
//*********************************************************************************************
[false, true].forEach(function (bWarn) {
var sTitle = "fetchObject: referenced metadata does not contain included schema, bWarn = "
+ bWarn;
QUnit.test(sTitle, function (assert) {
var sSchemaName = "I.still.haven't.found.what.I'm.looking.for.",
sQualifiedName = sSchemaName + "Child",
sPath = "/" + sQualifiedName;
this.expectFetchEntityContainer(mXServiceScope);
this.mock(this.oMetaModel.oRequestor).expects("read")
.withExactArgs("/empty/$metadata")
.returns(Promise.resolve(mMostlyEmptyScope));
this.allowWarnings(assert, bWarn);
this.oLogMock.expects("warning").exactly(bWarn ? 1 : 0)
.withExactArgs("/empty/$metadata does not contain " + sSchemaName, sPath,
sODataMetaModel);
this.oLogMock.expects("warning").exactly(bWarn ? 1 : 0)
.withExactArgs("Unknown qualified name " + sQualifiedName, sPath, sODataMetaModel);
// code under test
return this.oMetaModel.fetchObject(sPath).then(function (vResult) {
assert.deepEqual(vResult, undefined);
});
});
});
//*********************************************************************************************
[false, true].forEach(function (bWarn) {
var sTitle = "fetchObject: cross-service reference, respect $Include; bWarn = " + bWarn;
QUnit.test(sTitle, function (assert) {
var mScope0 = {
"$Version" : "4.0",
"$Reference" : {
"../../../../default/iwbep/tea_busi_product/0001/$metadata" : {
"$Include" : [
"not.found.",
"tea_busi_product.v0001.",
"tea_busi_supplier.v0001."
]
}
}
},
mReferencedScope = {
"$Version" : "4.0",
"must.not.be.included." : {
"$kind" : "Schema"
},
"tea_busi_product.v0001." : {
"$kind" : "Schema"
},
"tea_busi_supplier.v0001." : {
"$kind" : "Schema"
}
},
oRequestorMock = this.mock(this.oMetaModel.oRequestor),
that = this;
this.expectFetchEntityContainer(mScope0);
oRequestorMock.expects("read")
.withExactArgs("/a/default/iwbep/tea_busi_product/0001/$metadata")
.returns(Promise.resolve(mReferencedScope));
this.allowWarnings(assert, bWarn);
// code under test
return this.oMetaModel.fetchObject("/tea_busi_product.v0001.")
.then(function (vResult) {
var oSyncPromise;
assert.strictEqual(vResult, mReferencedScope["tea_busi_product.v0001."]);
that.oLogMock.expects("warning").exactly(bWarn ? 1 : 0)
.withExactArgs("Unknown qualified name must.not.be.included.",
"/must.not.be.included.", sODataMetaModel);
assert.strictEqual(that.oMetaModel.getObject("/must.not.be.included."),
undefined,
"must not include schemata which are not mentioned in edmx:Include");
assert.strictEqual(that.oMetaModel.getObject("/tea_busi_supplier.v0001."),
mReferencedScope["tea_busi_supplier.v0001."]);
// now check that "not.found." does not trigger another read(),
// does finish synchronously and logs a warning
that.oLogMock.expects("warning").exactly(bWarn ? 1 : 0)
.withExactArgs("/a/default/iwbep/tea_busi_product/0001/$metadata"
+ " does not contain not.found.",
"/not.found.", sODataMetaModel);
that.oLogMock.expects("warning").exactly(bWarn ? 1 : 0)
.withExactArgs("Unknown qualified name not.found.",
"/not.found.", sODataMetaModel);
// code under test
oSyncPromise = that.oMetaModel.fetchObject("/not.found.");
assert.strictEqual(oSyncPromise.isFulfilled(), true);
assert.strictEqual(oSyncPromise.getResult(), undefined);
});
});
});
//*********************************************************************************************
QUnit.test("fetchObject: cross-service reference - validation failure", function (assert) {
var oError = new Error(),
mReferencedScope = {},
sUrl = "/a/default/iwbep/tea_busi_product/0001/$metadata";
this.expectFetchEntityContainer(mXServiceScope);
this.mock(this.oMetaModel.oRequestor).expects("read").withExactArgs(sUrl)
.returns(Promise.resolve(mReferencedScope));
this.oMetaModelMock.expects("validate")
.withExactArgs(sUrl, mReferencedScope)
.throws(oError);
return this.oMetaModel.fetchObject("/tea_busi_product.v0001.Product").then(function () {
assert.ok(false);
}, function (oError0) {
assert.strictEqual(oError0, oError);
});
});
//*********************************************************************************************
QUnit.test("fetchObject: cross-service reference - duplicate include", function (assert) {
var oRequestorMock = this.mock(this.oMetaModel.oRequestor),
// root service includes both A and B, A also includes B
mScope0 = {
"$Version" : "4.0",
"$Reference" : {
"/A/$metadata" : {
"$Include" : [
"A."
]
},
"/B/$metadata" : {
"$Include" : [
"B."
]
}
}
},
mScopeA = {
"$Version" : "4.0",
"$Reference" : {
"/B/$metadata" : {
"$Include" : [
"B.",
"B.B." // includes additional namespace from already read document
]
}
},
"A." : {
"$kind" : "Schema"
}
},
mScopeB = {
"$Version" : "4.0",
"B." : {
"$kind" : "Schema"
},
"B.B." : {
"$kind" : "Schema"
}
},
that = this;
this.expectFetchEntityContainer(mScope0);
oRequestorMock.expects("read").withExactArgs("/A/$metadata")
.returns(Promise.resolve(mScopeA));
oRequestorMock.expects("read").withExactArgs("/B/$metadata")
.returns(Promise.resolve(mScopeB));
return this.oMetaModel.fetchObject("/B.")
.then(function (vResult) {
assert.strictEqual(vResult, mScopeB["B."]);
// code under test - we must not overwrite our "$ui5.read" promise!
return that.oMetaModel.fetchObject("/A.")
.then(function (vResult) {
assert.strictEqual(vResult, mScopeA["A."]);
// Note: must not trigger read() again!
return that.oMetaModel.fetchObject("/B.B.")
.then(function (vResult) {
assert.strictEqual(vResult, mScopeB["B.B."]);
});
});
});
});
//TODO Implement consistency checks that the same namespace is always included from the same
// reference URI, no matter which referencing document.
//*********************************************************************************************
[undefined, false, true].forEach(function (bSupportReferences) {
var sTitle = "fetchObject: cross-service reference - supportReferences: "
+ bSupportReferences;
QUnit.test(sTitle, function (assert) {
var mClonedProductScope = clone(mProductScope),
oModel = new ODataModel({ // code under test
serviceUrl : "/a/b/c/d/e/",
supportReferences : bSupportReferences,
synchronizationMode : "None"
}),
sPath = "/tea_busi_product.v0001.Product",
sUrl = "/a/default/iwbep/tea_busi_product/0001/$metadata";
this.oMetaModel = oModel.getMetaModel();
this.oMetaModelMock = this.mock(this.oMetaModel);
bSupportReferences = bSupportReferences !== false; // default is true!
assert.strictEqual(this.oMetaModel.bSupportReferences, bSupportReferences);
this.expectFetchEntityContainer(mXServiceScope);
this.mock(this.oMetaModel.oRequestor).expects("read")
.exactly(bSupportReferences ? 1 : 0)
.withExactArgs(sUrl)
.returns(Promise.resolve(mClonedProductScope));
this.allowWarnings(assert, true);
this.oLogMock.expects("warning").exactly(bSupportReferences ? 0 : 1)
.withExactArgs("Unknown qualified name " + sPath.slice(1), sPath, sODataMetaModel);
// code under test
return this.oMetaModel.fetchObject(sPath).then(function (vResult) {
assert.strictEqual(vResult, bSupportReferences
? mClonedProductScope["tea_busi_product.v0001.Product"]
: undefined);
});
});
});
//*********************************************************************************************
QUnit.test("getObject, requestObject", function (assert) {
return checkGetAndRequest(this, assert, "fetchObject", ["sPath", {/*oContext*/}]);
});
//*********************************************************************************************
[{
$Type : "Edm.Boolean"
},{
$Type : "Edm.Byte"
}, {
$Type : "Edm.Date"
}, {
$Type : "Edm.DateTimeOffset"
},{
$Precision : 7,
$Type : "Edm.DateTimeOffset",
__constraints : {precision : 7}
}, {
$Type : "Edm.Decimal"
}, {
$Precision : 20,
$Scale : 5,
$Type : "Edm.Decimal",
__constraints : {maximum : "100.00", maximumExclusive : true, minimum : "0.00",
precision : 20, scale : 5}
}, {
$Precision : 20,
$Scale : "variable",
$Type : "Edm.Decimal",
__constraints : {precision : 20, scale : Infinity}
}, {
$Type : "Edm.Double"
}, {
$Type : "Edm.Guid"
}, {
$Type : "Edm.Int16"
}, {
$Type : "Edm.Int32"
}, {
$Type : "Edm.Int64"
}, {
$Type : "Edm.SByte"
}, {
$Type : "Edm.Single"
}, {
$Type : "Edm.Stream"
}, {
$Type : "Edm.String"
}, {
$MaxLength : 255,
$Type : "Edm.String",
__constraints : {maxLength : 255}
}, {
$Type : "Edm.String",
__constraints : {isDigitSequence : true}
}, {
$Type : "Edm.TimeOfDay"
}, {
$Precision : 3,
$Type : "Edm.TimeOfDay",
__constraints : {precision : 3}
}].forEach(function (oProperty0) {
// Note: take care not to modify oProperty0, clone it first!
[false, true].forEach(function (bNullable) {
// Note: JSON.parse(JSON.stringify(...)) cannot clone Infinity!
var oProperty = jQuery.extend(true, {}, oProperty0),
oConstraints = oProperty.__constraints;
delete oProperty.__constraints;
if (!bNullable) {
oProperty.$Nullable = false;
oConstraints = oConstraints || {};
oConstraints.nullable = false;
}
QUnit.test("fetchUI5Type: " + JSON.stringify(oProperty), function (assert) {
// Note: just spy on fetchModule() to make sure that the real types are used
// which check correctness of constraints
var fnFetchModuleSpy = this.spy(this.oMetaModel, "fetchModule"),
sPath = "/EMPLOYEES/0/ENTRYDATE",
oMetaContext = this.oMetaModel.getMetaContext(sPath),
that = this;
this.oMetaModelMock.expects("fetchObject").twice()
.withExactArgs(undefined, oMetaContext)
.returns(SyncPromise.resolve(oProperty));
if (oProperty.$Type === "Edm.String") { // simulate annotation for strings
this.oMetaModelMock.expects("fetchObject")
.withExactArgs("@com.sap.vocabularies.Common.v1.IsDigitSequence",
oMetaContext)
.returns(
SyncPromise.resolve(oConstraints && oConstraints.isDigitSequence));
} else if (oProperty.$Type === "Edm.Decimal") { // simulate annotation for decimals
this.oMetaModelMock.expects("fetchObject")
.withExactArgs("@Org.OData.Validation.V1.Minimum/$Decimal", oMetaContext)
.returns(
SyncPromise.resolve(oConstraints && oConstraints.minimum));
this.oMetaModelMock.expects("fetchObject")
.withExactArgs(
"@Org.OData.Validation.V1.Minimum@Org.OData.Validation.V1.Exclusive",
oMetaContext)
.returns(
SyncPromise.resolve(oConstraints && oConstraints.minimumExlusive));
this.oMetaModelMock.expects("fetchObject")
.withExactArgs("@Org.OData.Validation.V1.Maximum/$Decimal", oMetaContext)
.returns(
SyncPromise.resolve(oConstraints && oConstraints.maximum));
this.oMetaModelMock.expects("fetchObject")
.withExactArgs(
"@Org.OData.Validation.V1.Maximum@Org.OData.Validation.V1.Exclusive",
oMetaContext)
.returns(
SyncPromise.resolve(oConstraints && oConstraints.maximumExclusive));
}
// code under test
return this.oMetaModel.fetchUI5Type(sPath).then(function (oType) {
var sExpectedTypeName = "sap.ui.model.odata.type."
+ oProperty.$Type.slice(4)/*cut off "Edm."*/;
assert.strictEqual(fnFetchModuleSpy.callCount, 1);
assert.ok(fnFetchModuleSpy.calledOn(that.oMetaModel));
assert.ok(fnFetchModuleSpy.calledWithExactly(sExpectedTypeName),
fnFetchModuleSpy.printf("%C"));
assert.strictEqual(oType.getName(), sExpectedTypeName);
assert.deepEqual(oType.oConstraints, oConstraints);
assert.strictEqual(that.oMetaModel.getUI5Type(sPath), oType, "cached");
});
});
});
});
//TODO later: support for facet DefaultValue?
//*********************************************************************************************
QUnit.test("fetchUI5Type: $count", function (assert) {
var sPath = "/T€AMS/$count",
oType;
// code under test
oType = this.oMetaModel.fetchUI5Type(sPath).getResult();
assert.strictEqual(oType.getName(), "sap.ui.model.odata.type.Int64");
assert.strictEqual(this.oMetaModel.getUI5Type(sPath), oType, "cached");
});
//*********************************************************************************************
QUnit.test("fetchUI5Type: collection", function (assert) {
var sPath = "/EMPLOYEES/0/foo",
that = this;
this.oMetaModelMock.expects("fetchObject").thrice()
.withExactArgs(undefined, this.oMetaModel.getMetaContext(sPath))
.returns(SyncPromise.resolve({
$isCollection : true,
$Nullable : false, // must not be turned into a constraint for Raw!
$Type : "Edm.String"
}));
this.oLogMock.expects("warning").withExactArgs(
"Unsupported collection type, using sap.ui.model.odata.type.Raw",
sPath, sODataMetaModel);
return Promise.all([
// code under test
this.oMetaModel.fetchUI5Type(sPath).then(function (oType) {
assert.strictEqual(oType.getName(), "sap.ui.model.odata.type.Raw");
assert.strictEqual(that.oMetaModel.getUI5Type(sPath), oType, "cached");
}),
// code under test
this.oMetaModel.fetchUI5Type(sPath).then(function (oType) {
assert.strictEqual(oType.getName(), "sap.ui.model.odata.type.Raw");
})
]);
});
//*********************************************************************************************
//TODO make Edm.Duration work with OData V4
["acme.Type", "Edm.Duration", "Edm.GeographyPoint"].forEach(function (sQualifiedName) {
QUnit.test("fetchUI5Type: unsupported type " + sQualifiedName, function (assert) {
var sPath = "/EMPLOYEES/0/foo",
that = this;
this.oMetaModelMock.expects("fetchObject").twice()
.withExactArgs(undefined, this.oMetaModel.getMetaContext(sPath))
.returns(SyncPromise.resolve({
$Nullable : false, // must not be turned into a constraint for Raw!
$Type : sQualifiedName
}));
this.oLogMock.expects("warning").withExactArgs(
"Unsupported type '" + sQualifiedName + "', using sap.ui.model.odata.type.Raw",
sPath, sODataMetaModel);
// code under test
return this.oMetaModel.fetchUI5Type(sPath).then(function (oType) {
assert.strictEqual(oType.getName(), "sap.ui.model.odata.type.Raw");
assert.strictEqual(that.oMetaModel.getUI5Type(sPath), oType, "cached");
});
});
});
//*********************************************************************************************
QUnit.test("fetchUI5Type: invalid path", function (assert) {
var sPath = "/EMPLOYEES/0/invalid",
that = this;
this.oMetaModelMock.expects("fetchObject").twice()
.withExactArgs(undefined, this.oMetaModel.getMetaContext(sPath))
.returns(SyncPromise.resolve(/*no property metadata for path*/));
this.oLogMock.expects("warning").twice().withExactArgs(
"No metadata for path '" + sPath + "', using sap.ui.model.odata.type.Raw",
undefined, sODataMetaModel);
// code under test
return this.oMetaModel.fetchUI5Type(sPath).then(function (oType) {
assert.strictEqual(oType.getName(), "sap.ui.model.odata.type.Raw");
// code under test
assert.strictEqual(that.oMetaModel.getUI5Type(sPath), oType, "Type is cached");
});
});
//*********************************************************************************************
QUnit.test("getUI5Type, requestUI5Type", function (assert) {
return checkGetAndRequest(this, assert, "fetchUI5Type", ["sPath"], true);
});
//*********************************************************************************************
[{ // simple entity from a set
dataPath : "/TEAMS/0",
canonicalUrl : "/TEAMS(~1)",
requests : [{
entityType : "tea_busi.TEAM",
predicate : "(~1)"
}]
}, { // simple entity in transient context
dataPath : "/TEAMS/-1",
canonicalUrl : "/TEAMS(~1)",
requests : [{
entityType : "tea_busi.TEAM",
// TODO a transient entity does not necessarily have all key properties, but this is
// required to create a dependent cache
predicate : "(~1)"
}]
}, { // simple entity by key predicate
dataPath : "/TEAMS('4%3D2')",
canonicalUrl : "/TEAMS('4%3D2')",
requests : []
}, { // simple singleton
dataPath : "/Me",
canonicalUrl : "/Me",
requests : []
}, { // navigation to root entity
dataPath : "/TEAMS/0/TEAM_2_EMPLOYEES/1",
canonicalUrl : "/EMPLOYEES(~1)",
requests : [{
entityType : "tea_busi.Worker",
predicate : "(~1)"
}]
}, { // navigation to root entity
dataPath : "/TEAMS('42')/TEAM_2_EMPLOYEES/1",
canonicalUrl : "/EMPLOYEES(~1)",
requests : [{
entityType : "tea_busi.Worker",
predicate : "(~1)"
}]
}, { // navigation to root entity with key predicate
dataPath : "/TEAMS('42')/TEAM_2_EMPLOYEES('23')",
canonicalUrl : "/EMPLOYEES('23')",
requests : []
}, { // multiple navigation to root entity
dataPath : "/TEAMS/0/TEAM_2_EMPLOYEES/1/EMPLOYEE_2_TEAM",
canonicalUrl : "/T%E2%82%ACAMS(~1)",
requests : [{
entityType : "tea_busi.TEAM",
predicate : "(~1)"
}]
}, { // navigation from entity set to single contained entity
dataPath : "/TEAMS/0/TEAM_2_CONTAINED_S",
canonicalUrl : "/TEAMS(~1)/TEAM_2_CONTAINED_S",
requests : [{
entityType : "tea_busi.TEAM",
path : "/TEAMS/0",
predicate : "(~1)"
}]
}, { // navigation from singleton to single contained entity
dataPath : "/Me/EMPLOYEE_2_CONTAINED_S",
canonicalUrl : "/Me/EMPLOYEE_2_CONTAINED_S",
requests : []
}, { // navigation to contained entity within a collection
dataPath : "/TEAMS/0/TEAM_2_CONTAINED_C/1",
canonicalUrl : "/TEAMS(~1)/TEAM_2_CONTAINED_C(~2)",
requests : [{
entityType : "tea_busi.TEAM",
path : "/TEAMS/0",
predicate : "(~1)"
}, {
entityType : "tea_busi.ContainedC",
path : "/TEAMS/0/TEAM_2_CONTAINED_C/1",
predicate : "(~2)"
}]
}, { // navigation to contained entity with a key predicate
dataPath : "/TEAMS('42')/TEAM_2_CONTAINED_C('foo')",
canonicalUrl : "/TEAMS('42')/TEAM_2_CONTAINED_C('foo')",
requests : []
}, { // navigation from contained entity to contained entity
dataPath : "/TEAMS/0/TEAM_2_CONTAINED_S/S_2_C/1",
canonicalUrl : "/TEAMS(~1)/TEAM_2_CONTAINED_S/S_2_C(~2)",
requests : [{
entityType : "tea_busi.TEAM",
path : "/TEAMS/0",
predicate : "(~1)"
}, {
entityType : "tea_busi.ContainedC",
path : "/TEAMS/0/TEAM_2_CONTAINED_S/S_2_C/1",
predicate : "(~2)"
}]
}, { // navigation from contained to root entity
// must be appended nevertheless since we only have a type, but no set
dataPath : "/TEAMS/0/TEAM_2_CONTAINED_C/5/C_2_EMPLOYEE",
canonicalUrl : "/TEAMS(~1)/TEAM_2_CONTAINED_C(~2)/C_2_EMPLOYEE",
requests : [{
entityType : "tea_busi.TEAM",
path : "/TEAMS/0",
predicate : "(~1)"
}, {
entityType : "tea_busi.ContainedC",
path : "/TEAMS/0/TEAM_2_CONTAINED_C/5",
predicate : "(~2)"
}]
}, { // navigation from entity w/ key predicate to contained to root entity
dataPath : "/TEAMS('42')/TEAM_2_CONTAINED_C/5/C_2_EMPLOYEE",
canonicalUrl : "/TEAMS('42')/TEAM_2_CONTAINED_C(~1)/C_2_EMPLOYEE",
requests : [{
entityType : "tea_busi.ContainedC",
path : "/TEAMS('42')/TEAM_2_CONTAINED_C/5",
predicate : "(~1)"
}]
}, { // decode entity set initially, encode it finally
dataPath : "/T%E2%82%ACAMS/0",
canonicalUrl : "/T%E2%82%ACAMS(~1)",
requests : [{
entityType : "tea_busi.TEAM",
predicate : "(~1)"
}]
}, { // decode navigation property, encode entity set when building sCandidate
dataPath : "/EMPLOYEES('7')/EMPLOYEE_2_EQUIPM%E2%82%ACNTS(42)",
canonicalUrl : "/EQUIPM%E2%82%ACNTS(42)",
requests : []
}].forEach(function (oFixture) {
QUnit.test("fetchCanonicalPath: " + oFixture.dataPath, function (assert) {
var oContext = Context.create(this.oModel, undefined, oFixture.dataPath),
oContextMock = this.mock(oContext),
oPromise;
this.oMetaModelMock.expects("getMetaPath").withExactArgs(oFixture.dataPath)
.returns("metapath");
this.oMetaModelMock.expects("fetchObject").withExactArgs("metapath")
.returns(SyncPromise.resolve());
this.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mScope));
oFixture.requests.forEach(function (oRequest) {
var oEntityInstance = {"@$ui5._.predicate" : oRequest.predicate};
oContextMock.expects("fetchValue")
.withExactArgs(oRequest.path || oFixture.dataPath)
.returns(SyncPromise.resolve(oEntityInstance));
});
// code under test
oPromise = this.oMetaModel.fetchCanonicalPath(oContext);
assert.ok(!oPromise.isRejected());
return oPromise.then(function (sCanonicalUrl) {
assert.strictEqual(sCanonicalUrl, oFixture.canonicalUrl);
});
});
});
//*********************************************************************************************
[{ // simple singleton
path : "/Me|ID",
editUrl : "Me"
}, { // simple entity by key predicate
path : "/TEAMS('42')|Name",
editUrl : "TEAMS('42')"
}, { // simple entity from a set
path : "/TEAMS/0|Name",
fetchPredicates : {
"/TEAMS/0" : "tea_busi.TEAM"
},
editUrl : "TEAMS(~0)"
}, { // simple entity from a set, complex property
path : "/EMPLOYEES/0|SAL%C3%83RY/CURRENCY",
fetchPredicates : {
"/EMPLOYEES/0" : "tea_busi.Worker"
},
editUrl : "EMPLOYEES(~0)"
}, { // navigation to root entity
path : "/TEAMS/0/TEAM_2_EMPLOYEES/1|ID",
fetchPredicates : {
"/TEAMS/0/TEAM_2_EMPLOYEES/1" : "tea_busi.Worker"
},
editUrl : "EMPLOYEES(~0)"
}, { // navigation to root entity
path : "/TEAMS('42')/TEAM_2_EMPLOYEES/1|ID",
fetchPredicates : {
"/TEAMS('42')/TEAM_2_EMPLOYEES/1" : "tea_busi.Worker"
},
editUrl : "EMPLOYEES(~0)"
}, { // navigation to root entity with key predicate
path : "/TEAMS('42')/TEAM_2_EMPLOYEES('23')|ID",
editUrl : "EMPLOYEES('23')"
}, { // multiple navigation to root entity
path : "/TEAMS/0/TEAM_2_EMPLOYEES/1/EMPLOYEE_2_TEAM|Name",
fetchPredicates : {
"/TEAMS/0/TEAM_2_EMPLOYEES/1/EMPLOYEE_2_TEAM" : "tea_busi.TEAM"
},
editUrl : "T%E2%82%ACAMS(~0)"
}, { // navigation from entity set to single contained entity
path : "/TEAMS/0/TEAM_2_CONTAINED_S|Id",
fetchPredicates : {
"/TEAMS/0" : "tea_busi.TEAM"
},
editUrl : "TEAMS(~0)/TEAM_2_CONTAINED_S"
}, { // navigation from singleton to single contained entity
path : "/Me/EMPLOYEE_2_CONTAINED_S|Id",
editUrl : "Me/EMPLOYEE_2_CONTAINED_S"
}, { // navigation to contained entity within a collection
path : "/TEAMS/0/TEAM_2_CONTAINED_C/1|Id",
fetchPredicates : {
"/TEAMS/0" : "tea_busi.TEAM",
"/TEAMS/0/TEAM_2_CONTAINED_C/1" : "tea_busi.ContainedC"
},
editUrl : "TEAMS(~0)/TEAM_2_CONTAINED_C(~1)"
}, { // navigation to contained entity with a key predicate
path : "/TEAMS('42')/TEAM_2_CONTAINED_C('foo')|Id",
editUrl : "TEAMS('42')/TEAM_2_CONTAINED_C('foo')"
}, { // navigation from contained entity to contained entity
path : "/TEAMS/0/TEAM_2_CONTAINED_S/S_2_C/1|Id",
fetchPredicates : {
"/TEAMS/0" : "tea_busi.TEAM",
"/TEAMS/0/TEAM_2_CONTAINED_S/S_2_C/1" : "tea_busi.ContainedC"
},
editUrl : "TEAMS(~0)/TEAM_2_CONTAINED_S/S_2_C(~1)"
}, { // navigation from contained to root entity, resolved via navigation property binding path
path : "/TEAMS/0/TEAM_2_CONTAINED_S/S_2_EMPLOYEE|ID",
fetchPredicates : {
"/TEAMS/0/TEAM_2_CONTAINED_S/S_2_EMPLOYEE" : "tea_busi.Worker"
},
editUrl : "EMPLOYEES(~0)"
}, { // navigation from entity w/ key predicate to contained to root entity
path : "/TEAMS('42')/TEAM_2_CONTAINED_C/5/C_2_EMPLOYEE|ID",
fetchPredicates : {
"/TEAMS('42')/TEAM_2_CONTAINED_C/5" : "tea_busi.ContainedC"
},
editUrl : "TEAMS('42')/TEAM_2_CONTAINED_C(~0)/C_2_EMPLOYEE"
}, { // decode entity set initially, encode it finally
path : "/T%E2%82%ACAMS/0|Name",
fetchPredicates : {
"/T%E2%82%ACAMS/0" : "tea_busi.TEAM"
},
editUrl : "T%E2%82%ACAMS(~0)"
}, { // decode navigation property, encode entity set
path : "/EMPLOYEES('7')/EMPLOYEE_2_EQUIPM%E2%82%ACNTS(42)|ID",
editUrl : "EQUIPM%E2%82%ACNTS(42)"
}].forEach(function (oFixture) {
QUnit.test("fetchUpdateData: " + oFixture.path, function (assert) {
var i = oFixture.path.indexOf("|"),
sContextPath = oFixture.path.slice(0, i),
sPropertyPath = oFixture.path.slice(i + 1),
oContext = Context.create(this.oModel, undefined, sContextPath),
oContextMock = this.mock(oContext),
oPromise,
that = this;
this.oMetaModelMock.expects("getMetaPath")
.withExactArgs(oFixture.path.replace("|", "/")).returns("~");
this.oMetaModelMock.expects("fetchObject").withExactArgs("~")
.returns(SyncPromise.resolve(Promise.resolve()).then(function () {
that.oMetaModelMock.expects("fetchEntityContainer")
.returns(SyncPromise.resolve(mScope));
Object.keys(oFixture.fetchPredicates || {}).forEach(function (sPath, i) {
var oEntityInstance = {"@$ui5._.predicate" : "(~" + i + ")"};
// Note: the entity instance is delivered asynchronously
oContextMock.expects("fetchValue")
.withExactArgs(sPath)
.returns(SyncPromise.resolve(Promise.resolve(oEntityInstance)));
});
}));
// code under test
oPromise = this.oMetaModel.fetchUpdateData(sPropertyPath, oContext);
assert.ok(!oPromise.isRejected());
return oPromise.then(function (oResult) {
assert.strictEqual(oResult.editUrl, oFixture.editUrl);
assert.strictEqual(oResult.entityPath, sContextPath);
assert.strictEqual(oResult.propertyPath, sPropertyPath);
});
});
});
//TODO support collection properties (-> path containing index not leading to predicate)
//TODO prefer instance annotation at payload for "odata.editLink"?!
//TODO target URLs like "com.sap.gateway.default.iwbep.tea_busi_product.v0001.Container/Products(...)"?
//TODO type casts, operations?
//*********************************************************************************************
QUnit.test("fetchUpdateData: transient entity", function(assert) {
var oContext = Context.create(this.oModel, undefined, "/TEAMS/-1"),
sPropertyPath = "Name";
this.oMetaModelMock.expects("fetchEntityContainer").twice()
.returns(SyncPromise.resolve(mScope));
this.mock(oContext).expects("fetchValue").withExactArgs("/TEAMS/-1")
.returns(SyncPromise.resolve({"@$ui5._.transient" : "update"}));
// code under test
return this.oMetaModel.fetchUpdateData(sPropertyPath, oContext).then(function (oResult) {
assert.deepEqual(oResult, {
entityPath : "/TEAMS/-1",
editUrl : undefined,
propertyPath : "Name"
});
});
});
//*********************************************************************************************
QUnit.test("fetchUpdateData: fetchObject fails", function(assert) {
var oModel = this.oModel,
oContext = {
getModel : function () { return oModel; }
},
oExpectedError = new Error(),
oMetaModelMock = this.mock(this.oMetaModel),
sPath = "some/invalid/path/to/a/property";
this.mock(oModel).expects("resolve")
.withExactArgs(sPath, sinon.match.same(oContext))
.returns("~1");
oMetaModelMock.expects("getMetaPath").withExactArgs("~1").returns("~2");
oMetaModelMock.expects("fetchObject").withExactArgs("~2")
.returns(Promise.reject(oExpectedError));
// code under test
return this.oMetaModel.fetchUpdateData(sPath, oContext).then(function () {
assert.ok(false);
}, function (oError) {
assert.strictEqual(oError, oExpectedError);
});
});
//*********************************************************************************************
[{
dataPath : "/Foo/Bar",
message : "Not an entity set: Foo",
warning : "Unknown child Foo of tea_busi.DefaultContainer"
}, {
dataPath : "/TEAMS/0/Foo/Bar",
message : "Not a (navigation) property: Foo"
}, {
dataPath : "/TEAMS/0/TEAM_2_CONTAINED_S",
instance : undefined,
message : "No instance to calculate key predicate at /TEAMS/0"
}, {
dataPath : "/TEAMS/0/TEAM_2_CONTAINED_S",
instance : {},
message : "No key predicate known at /TEAMS/0"
}, {
dataPath : "/TEAMS/0/TEAM_2_CONTAINED_S",
instance : new Error("failed to load team"),
message : "failed to load team at /TEAMS/0"
}].forEach(function (oFixture) {
QUnit.test("fetchUpdateData: " + oFixture.message, function (assert) {
var oContext = Context.create(this.oModel, undefined, oFixture.dataPath),
oPromise;
this.oMetaModelMock.expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(mScope));
if ("instance" in oFixture) {
this.mock(oContext).expects("fetchValue")
.returns(oFixture.instance instanceof Error
? SyncPromise.reject(oFixture.instance)
: SyncPromise.resolve(oFixture.instance));
}
if (oFixture.warning) {
this.oLogMock.expects("isLoggable")
.withExactArgs(jQuery.sap.log.Level.WARNING, sODataMetaModel)
.returns(true);
this.oLogMock.expects("warning")
.withExactArgs(oFixture.warning, oFixture.dataPath, sODataMetaModel);
}
this.mock(this.oModel).expects("reportError")
.withExactArgs(oFixture.message, sODataMetaModel, sinon.match({
message : oFixture.dataPath + ": " + oFixture.message,
name : "Error"
}));
oPromise = this.oMetaModel.fetchUpdateData("", oContext);
assert.ok(oPromise.isRejected());
assert.strictEqual(oPromise.getResult().message,
oFixture.dataPath + ": " + oFixture.message);
oPromise.caught(); // avoid "Uncaught (in promise)"
});
});
//*********************************************************************************************
QUnit.test("fetchCanonicalPath: success", function(assert) {
var oContext = {};
this.mock(this.oMetaModel).expects("fetchUpdateData")
.withExactArgs("", sinon.match.same(oContext))
.returns(SyncPromise.resolve(Promise.resolve({
editUrl : "edit('URL')",
propertyPath : ""
})));
// code under test
return this.oMetaModel.fetchCanonicalPath(oContext).then(function (oCanonicalPath) {
assert.strictEqual(oCanonicalPath, "/edit('URL')");
});
});
//*********************************************************************************************
QUnit.test("fetchCanonicalPath: not an entity", function(assert) {
var oContext = {
getPath : function () { return "/TEAMS('4711')/Name"; }
};
this.mock(this.oMetaModel).expects("fetchUpdateData")
.withExactArgs("", sinon.match.same(oContext))
.returns(SyncPromise.resolve(Promise.resolve({
entityPath : "/TEAMS('4711')",
editUrl : "TEAMS('4711')",
propertyPath : "Name"
})));
// code under test
return this.oMetaModel.fetchCanonicalPath(oContext).then(function () {
assert.ok(false);
}, function (oError) {
assert.strictEqual(oError.message, "Context " + oContext.getPath()
+ " does not point to an entity. It should be " + "/TEAMS('4711')");
});
});
//*********************************************************************************************
QUnit.test("fetchCanonicalPath: fetchUpdateData fails", function(assert) {
var oContext = {},
oExpectedError = new Error();
this.mock(this.oMetaModel).expects("fetchUpdateData")
.withExactArgs("", sinon.match.same(oContext))
.returns(SyncPromise.resolve(Promise.reject(oExpectedError)));
// code under test
return this.oMetaModel.fetchCanonicalPath(oContext).then(function () {
assert.ok(false);
}, function (oError) {
assert.strictEqual(oError, oExpectedError);
});
});
//*********************************************************************************************
QUnit.test("getProperty = getObject", function (assert) {
assert.strictEqual(this.oMetaModel.getProperty, this.oMetaModel.getObject);
});
//*********************************************************************************************
QUnit.test("bindProperty", function (assert) {
var oBinding,
oContext = {},
mParameters = {},
sPath = "foo";
// code under test
oBinding = this.oMetaModel.bindProperty(sPath, oContext, mParameters);
assert.ok(oBinding instanceof PropertyBinding);
assert.ok(oBinding.hasOwnProperty("vValue"));
assert.strictEqual(oBinding.getContext(), oContext);
assert.strictEqual(oBinding.getModel(), this.oMetaModel);
assert.strictEqual(oBinding.getPath(), sPath);
assert.strictEqual(oBinding.mParameters, mParameters, "mParameters available internally");
assert.strictEqual(oBinding.getValue(), undefined);
// code under test: must not call getProperty() again!
assert.strictEqual(oBinding.getExternalValue(), undefined);
// code under test
assert.throws(function () {
oBinding.setExternalValue("foo");
}, /Unsupported operation: ODataMetaPropertyBinding#setValue/);
});
//*********************************************************************************************
QUnit.test("ODataMetaPropertyBinding#checkUpdate", function (assert) {
var oBinding,
oContext = {},
mParameters = {},
sPath = "foo",
oValue = {},
oPromise = SyncPromise.resolve(Promise.resolve(oValue));
oBinding = this.oMetaModel.bindProperty(sPath, oContext, mParameters);
this.oMetaModelMock.expects("fetchObject")
.withExactArgs(sPath, sinon.match.same(oContext), sinon.match.same(mParameters))
.returns(oPromise);
this.mock(oBinding).expects("_fireChange").withExactArgs({reason : ChangeReason.Change});
// code under test
oBinding.checkUpdate();
assert.strictEqual(oBinding.getValue(), undefined);
oPromise.then(function () {
assert.strictEqual(oBinding.getValue(), oValue);
});
return oPromise;
});
//*********************************************************************************************
QUnit.test("ODataMetaPropertyBinding#checkUpdate: no event", function (assert) {
var oBinding,
oContext = {},
mParameters = {},
sPath = "foo",
oValue = {},
oPromise = SyncPromise.resolve(Promise.resolve(oValue));
oBinding = this.oMetaModel.bindProperty(sPath, oContext, mParameters);
oBinding.vValue = oValue;
this.oMetaModelMock.expects("fetchObject")
.withExactArgs(sPath, sinon.match.same(oContext), sinon.match.same(mParameters))
.returns(oPromise);
this.mock(oBinding).expects("_fireChange").never();
// code under test
oBinding.checkUpdate();
return oPromise;
});
//*********************************************************************************************
QUnit.test("ODataMetaPropertyBinding#checkUpdate: bForceUpdate, sChangeReason",
function (assert) {
var oBinding,
oContext = {},
mParameters = {},
sPath = "foo",
oValue = {},
oPromise = SyncPromise.resolve(Promise.resolve(oValue));
oBinding = this.oMetaModel.bindProperty(sPath, oContext, mParameters);
oBinding.vValue = oValue;
this.oMetaModelMock.expects("fetchObject")
.withExactArgs(sPath, sinon.match.same(oContext), sinon.match.same(mParameters))
.returns(oPromise);
this.mock(oBinding).expects("_fireChange").withExactArgs({reason : "Foo"});
// code under test
oBinding.checkUpdate(true, "Foo");
return oPromise;
});
//*********************************************************************************************
QUnit.test("ODataMetaPropertyBinding#setContext", function (assert) {
var oBinding,
oBindingMock,
oContext = {};
oBinding = this.oMetaModel.bindProperty("Foo", oContext);
oBindingMock = this.mock(oBinding);
oBindingMock.expects("checkUpdate").never();
// code under test
oBinding.setContext(oContext);
oBindingMock.expects("checkUpdate").withExactArgs(false, ChangeReason.Context);
// code under test
oBinding.setContext(undefined);
assert.strictEqual(oBinding.getContext(), undefined);
oBinding = this.oMetaModel.bindProperty("/Foo");
this.mock(oBinding).expects("checkUpdate").never();
// code under test
oBinding.setContext(oContext);
});
//*********************************************************************************************
["ENTRYDATE", "/EMPLOYEES/ENTRYDATE"].forEach(function (sPath) {
QUnit.test("bindContext: " + sPath, function (assert) {
var bAbsolutePath = sPath[0] === "/",
oBinding,
oBoundContext,
iChangeCount = 0,
oContext = this.oMetaModel.getMetaContext("/EMPLOYEES"),
oContextCopy = this.oMetaModel.getMetaContext("/EMPLOYEES"),
oNewContext = this.oMetaModel.getMetaContext("/T€AMS");
// without context
oBinding = this.oMetaModel.bindContext(sPath, null);
assert.ok(oBinding instanceof ContextBinding);
assert.strictEqual(oBinding.getModel(), this.oMetaModel);
assert.strictEqual(oBinding.getPath(), sPath);
assert.strictEqual(oBinding.getContext(), null);
assert.strictEqual(oBinding.isInitial(), true);
assert.strictEqual(oBinding.getBoundContext(), null);
// with context
oBinding = this.oMetaModel.bindContext(sPath, oContextCopy);
assert.ok(oBinding instanceof ContextBinding);
assert.strictEqual(oBinding.getModel(), this.oMetaModel);
assert.strictEqual(oBinding.getPath(), sPath);
assert.strictEqual(oBinding.getContext(), oContextCopy);
assert.strictEqual(oBinding.isInitial(), true);
assert.strictEqual(oBinding.getBoundContext(), null);
// setContext **********
oBinding.attachChange(function (oEvent) {
assert.strictEqual(oEvent.getId(), "change");
iChangeCount += 1;
});
// code under test
oBinding.setContext(oContext);
assert.strictEqual(iChangeCount, 0, "still initial");
assert.strictEqual(oBinding.isInitial(), true);
assert.strictEqual(oBinding.getBoundContext(), null);
assert.strictEqual(oBinding.getContext(), oContext);
// code under test
oBinding.initialize();
assert.strictEqual(iChangeCount, 1, "ManagedObject relies on 'change' event!");
assert.strictEqual(oBinding.isInitial(), false);
oBoundContext = oBinding.getBoundContext();
assert.strictEqual(oBoundContext.getModel(), this.oMetaModel);
assert.strictEqual(oBoundContext.getPath(),
bAbsolutePath ? sPath : oContext.getPath() + "/" + sPath);
// code under test - same context
oBinding.setContext(oContext);
assert.strictEqual(iChangeCount, 1, "context unchanged");
assert.strictEqual(oBinding.getBoundContext(), oBoundContext);
// code under test
oBinding.setContext(oContextCopy);
assert.strictEqual(iChangeCount, 1, "context unchanged");
assert.strictEqual(oBinding.getBoundContext(), oBoundContext);
// code under test
// Note: checks equality on resolved path, not simply object identity of context!
oBinding.setContext(oNewContext);
if (bAbsolutePath) {
assert.strictEqual(iChangeCount, 1, "context unchanged");
assert.strictEqual(oBinding.getBoundContext(), oBoundContext);
} else {
assert.strictEqual(iChangeCount, 2, "context changed");
oBoundContext = oBinding.getBoundContext();
assert.strictEqual(oBoundContext.getModel(), this.oMetaModel);
assert.strictEqual(oBoundContext.getPath(), oNewContext.getPath() + "/" + sPath);
}
// code under test
oBinding.setContext(null);
if (bAbsolutePath) {
assert.strictEqual(iChangeCount, 1, "context unchanged");
assert.strictEqual(oBinding.getBoundContext(), oBoundContext);
} else {
assert.strictEqual(iChangeCount, 3, "context changed");
assert.strictEqual(oBinding.isInitial(), false);
assert.strictEqual(oBinding.getBoundContext(), null);
}
});
});
//*********************************************************************************************
QUnit.test("bindList", function (assert) {
var oBinding,
oContext = this.oMetaModel.getContext("/EMPLOYEES"),
aFilters = [],
sPath = "@",
aSorters = [];
// avoid request to backend during initialization
this.oMetaModelMock.expects("fetchObject").returns(SyncPromise.resolve());
// code under test
oBinding = this.oMetaModel.bindList(sPath, oContext, aSorters, aFilters);
assert.ok(oBinding instanceof ClientListBinding);
assert.strictEqual(oBinding.getModel(), this.oMetaModel);
assert.strictEqual(oBinding.getPath(), sPath);
assert.strictEqual(oBinding.getContext(), oContext);
assert.strictEqual(oBinding.aSorters, aSorters);
assert.strictEqual(oBinding.aApplicationFilters, aFilters);
});
//*********************************************************************************************
QUnit.test("ODataMetaListBinding#setContexts", function (assert) {
var oBinding,
oBindingMock,
oContext = this.oMetaModel.getContext("/EMPLOYEES"),
aContexts = [],
sPath = "path";
// avoid request to backend during initialization
this.oMetaModelMock.expects("fetchObject").returns(SyncPromise.resolve());
oBinding = this.oMetaModel.bindList(sPath, oContext);
oBindingMock = this.mock(oBinding);
oBindingMock.expects("updateIndices").withExactArgs();
oBindingMock.expects("applyFilter").withExactArgs();
oBindingMock.expects("applySort").withExactArgs();
oBindingMock.expects("_getLength").withExactArgs().returns(42);
// code under test
oBinding.setContexts(aContexts);
assert.strictEqual(oBinding.oList, aContexts);
assert.strictEqual(oBinding.iLength, 42);
});
//*********************************************************************************************
QUnit.test("ODataMetaListBinding#update (sync)", function (assert) {
var oBinding,
oBindingMock,
oContext = this.oMetaModel.getContext("/EMPLOYEES"),
aContexts = [{}],
sPath = "path";
// avoid request to backend during initialization
this.oMetaModelMock.expects("fetchObject").returns(SyncPromise.resolve());
oBinding = this.oMetaModel.bindList(sPath, oContext);
oBindingMock = this.mock(oBinding);
oBindingMock.expects("fetchContexts").withExactArgs()
.returns(SyncPromise.resolve(aContexts));
oBindingMock.expects("setContexts").withExactArgs(sinon.match.same(aContexts));
oBindingMock.expects("_fireChange").never();
// code under test
oBinding.update();
});
//*********************************************************************************************
QUnit.test("ODataMetaListBinding#update (async)", function (assert) {
var oBinding,
oBindingMock,
oContext = this.oMetaModel.getContext("/EMPLOYEES"),
aContexts = [{}],
sPath = "path",
oFetchPromise = SyncPromise.resolve(Promise.resolve()).then(function () {
// This is expected to happen after the promise is resolved
oBindingMock.expects("setContexts").withExactArgs(sinon.match.same(aContexts));
oBindingMock.expects("_fireChange").withExactArgs({reason : ChangeReason.Change});
return aContexts;
});
// avoid request to backend during initialization
this.oMetaModelMock.expects("fetchObject").returns(SyncPromise.resolve());
oBinding = this.oMetaModel.bindList(sPath, oContext);
oBindingMock = this.mock(oBinding);
oBindingMock.expects("fetchContexts").withExactArgs().returns(oFetchPromise);
oBindingMock.expects("setContexts").withExactArgs([]);
oBindingMock.expects("_fireChange").never(); // initially
// code under test
oBinding.update();
return oFetchPromise;
});
//*********************************************************************************************
QUnit.test("ODataMetaListBinding#checkUpdate", function (assert) {
var oBinding,
oBindingMock,
oContext = this.oMetaModel.getContext("/"),
sPath = "";
// avoid request to backend during initialization
this.oMetaModelMock.expects("fetchObject").returns(SyncPromise.resolve());
oBinding = this.oMetaModel.bindList(sPath, oContext);
oBindingMock = this.mock(oBinding);
this.mock(oBinding).expects("update").thrice().callsFake(function () {
this.oList = [{/*a context*/}];
});
oBindingMock.expects("_fireChange").withExactArgs({reason : ChangeReason.Change});
// code under test
oBinding.checkUpdate();
// code under test: The second call must call update, but not fire an event
oBinding.checkUpdate();
oBindingMock.expects("_fireChange").withExactArgs({reason : ChangeReason.Change});
// code under test: Must fire a change event
oBinding.checkUpdate(true);
});
//*********************************************************************************************
QUnit.test("ODataMetaListBinding#getContexts, getCurrentContexts", function (assert) {
var oBinding,
oMetaModel = this.oMetaModel, // instead of "that = this"
oContext = oMetaModel.getMetaContext("/EMPLOYEES"),
sPath = "";
function assertContextPaths(aContexts, aPaths) {
assert.notOk("diff" in aContexts, "extended change detection is ignored");
assert.deepEqual(aContexts.map(function (oContext) {
assert.strictEqual(oContext.getModel(), oMetaModel);
return oContext.getPath().replace("/EMPLOYEES/", "");
}), aPaths);
assert.deepEqual(oBinding.getCurrentContexts(), aContexts);
}
this.oMetaModelMock.expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(mScope));
oBinding = oMetaModel.bindList(sPath, oContext);
// code under test: should be ignored
oBinding.enableExtendedChangeDetection();
assertContextPaths(oBinding.getContexts(0, 2), ["ID", "AGE"]);
assertContextPaths(oBinding.getContexts(1, 2), ["AGE", "EMPLOYEE_2_CONTAINED_S"]);
assertContextPaths(oBinding.getContexts(), ["ID", "AGE", "EMPLOYEE_2_CONTAINED_S",
"EMPLOYEE_2_EQUIPM€NTS", "EMPLOYEE_2_TEAM", "SALÃRY"]);
assertContextPaths(oBinding.getContexts(0, 10), ["ID", "AGE", "EMPLOYEE_2_CONTAINED_S",
"EMPLOYEE_2_EQUIPM€NTS", "EMPLOYEE_2_TEAM", "SALÃRY"]);
oMetaModel.setSizeLimit(2);
assertContextPaths(oBinding.getContexts(), ["ID", "AGE"]);
oBinding.attachEvent("sort", function () {
assert.ok(false, "unexpected sort event");
});
oMetaModel.setSizeLimit(100);
oBinding.sort(new Sorter("@sapui.name"));
assertContextPaths(oBinding.getContexts(), ["AGE", "EMPLOYEE_2_CONTAINED_S",
"EMPLOYEE_2_EQUIPM€NTS", "EMPLOYEE_2_TEAM", "ID", "SALÃRY"]);
oBinding.attachEvent("filter", function () {
assert.ok(false, "unexpected filter event");
});
oBinding.filter(new Filter("$kind", "EQ", "Property"));
assertContextPaths(oBinding.getContexts(), ["AGE", "ID", "SALÃRY"]);
});
//*********************************************************************************************
[{
contextPath : undefined,
metaPath : "@",
result : []
}, {
// <template:repeat list="{entitySet>}" ...>
// Iterate all OData path segments, i.e. (navigation) properties.
// Implicit $Type insertion happens here!
//TODO support for $BaseType
contextPath : "/EMPLOYEES",
metaPath : "",
result : [
"/EMPLOYEES/ID",
"/EMPLOYEES/AGE",
"/EMPLOYEES/EMPLOYEE_2_CONTAINED_S",
"/EMPLOYEES/EMPLOYEE_2_EQUIPM€NTS",
"/EMPLOYEES/EMPLOYEE_2_TEAM",
"/EMPLOYEES/SALÃRY"
]
}, {
// <template:repeat list="{meta>EMPLOYEES}" ...>
// same as before, but with non-empty path
contextPath : "/",
metaPath : "EMPLOYEES",
result : [
"/EMPLOYEES/ID",
"/EMPLOYEES/AGE",
"/EMPLOYEES/EMPLOYEE_2_CONTAINED_S",
"/EMPLOYEES/EMPLOYEE_2_EQUIPM€NTS",
"/EMPLOYEES/EMPLOYEE_2_TEAM",
"/EMPLOYEES/SALÃRY"
]
}, {
// <template:repeat list="{meta>/}" ...>
// Iterate all OData path segments, i.e. entity sets and imports.
// Implicit scope lookup happens here!
metaPath : "/",
result :[
"/ChangeManagerOfTeam",
"/EMPLOYEES",
"/EQUIPM€NTS",
"/GetEmployeeMaxAge",
"/Me",
"/OverloadedAction",
"/TEAMS",
"/T€AMS",
"/VoidAction"
]
}, {
// <template:repeat list="{property>@}" ...>
// Iterate all external targeting annotations.
contextPath : "/T€AMS/Team_Id",
metaPath : "@",
result : [
"/T€AMS/Team_Id@Common.Label",
"/T€AMS/Team_Id@Common.Text",
"/T€AMS/Team_Id@Common.Text@UI.TextArrangement"
]
}, {
// <template:repeat list="{property>@}" ...>
// Iterate all external targeting annotations.
contextPath : "/T€AMS/Name",
metaPath : "@",
result : []
}, {
// <template:repeat list="{field>./@}" ...>
// Iterate all inline annotations.
contextPath : "/T€AMS/$Type/@UI.LineItem/0",
metaPath : "./@",
result : [
"/T€AMS/$Type/@UI.LineItem/0/@UI.Importance"
]
}, {
// <template:repeat list="{at>}" ...>
// Iterate all inline annotations (edge case with empty relative path).
contextPath : "/T€AMS/$Type/@UI.LineItem/0/@",
metaPath : "",
result : [
"/T€AMS/$Type/@UI.LineItem/0/@UI.Importance"
]
}, {
contextPath : undefined,
metaPath : "/Unknown",
result : [],
warning : ["Unknown child Unknown of tea_busi.DefaultContainer", "/Unknown/"]
}].forEach(function (oFixture) {
var sPath = oFixture.contextPath
? oFixture.contextPath + "|"/*make cut more visible*/ + oFixture.metaPath
: oFixture.metaPath;
QUnit.test("ODataMetaListBinding#fetchContexts (sync): " + sPath, function (assert) {
var oBinding,
oMetaModel = this.oMetaModel, // instead of "that = this"
oContext = oFixture.contextPath && oMetaModel.getContext(oFixture.contextPath);
if (oFixture.warning) {
// Note that _getContexts is called twice in this test: once from bindList via the
// constructor, once directly from the test
this.oLogMock.expects("isLoggable").twice()
.withExactArgs(jQuery.sap.log.Level.WARNING, sODataMetaModel)
.returns(true);
this.oLogMock.expects("warning").twice()
.withExactArgs(oFixture.warning[0], oFixture.warning[1], sODataMetaModel);
}
this.oMetaModelMock.expects("fetchEntityContainer").atLeast(0)
.returns(SyncPromise.resolve(mScope));
oBinding = this.oMetaModel.bindList(oFixture.metaPath, oContext);
// code under test
assert.deepEqual(oBinding.fetchContexts().getResult().map(function (oContext) {
assert.strictEqual(oContext.getModel(), oMetaModel);
return oContext.getPath();
}), oFixture.result);
});
});
//*********************************************************************************************
QUnit.test("ODataMetaListBinding#fetchContexts (async)", function (assert) {
var oBinding,
oMetaModel = this.oMetaModel,
sPath = "/foo";
// Note that fetchObject is called twice in this test: once from bindList via the
// constructor, once from fetchContexts
this.oMetaModelMock.expects("fetchObject").twice()
.withExactArgs(sPath + "/")
.returns(SyncPromise.resolve(Promise.resolve({bar: "", baz: ""})));
oBinding = this.oMetaModel.bindList(sPath);
return oBinding.fetchContexts().then(function (oResult) {
assert.deepEqual(oResult.map(function (oContext) {
assert.strictEqual(oContext.getModel(), oMetaModel);
return oContext.getPath();
}), ["/foo/bar", "/foo/baz"]);
});
});
//TODO iterate mix of inline and external targeting annotations
//TODO iterate annotations like "foo@..." for our special cases, e.g. annotations of annotation
//*********************************************************************************************
QUnit.test("events", function (assert) {
assert.throws(function () {
this.oMetaModel.attachParseError();
}, new Error("Unsupported event 'parseError': v4.ODataMetaModel#attachEvent"));
assert.throws(function () {
this.oMetaModel.attachRequestCompleted();
}, new Error("Unsupported event 'requestCompleted': v4.ODataMetaModel#attachEvent"));
assert.throws(function () {
this.oMetaModel.attachRequestFailed();
}, new Error("Unsupported event 'requestFailed': v4.ODataMetaModel#attachEvent"));
assert.throws(function () {
this.oMetaModel.attachRequestSent();
}, new Error("Unsupported event 'requestSent': v4.ODataMetaModel#attachEvent"));
});
//*********************************************************************************************
QUnit.test("validate: mSchema2MetadataUrl", function (assert) {
var mScope = {
"$Version" : "4.0",
"$Reference" : {
"/A/$metadata" : {
"$Include" : [
"A.", "A.A."
]
},
"/B/$metadata" : {
"$Include" : [
"B.", "B.B."
]
},
"../../../../default/iwbep/tea_busi_product/0001/$metadata" : {
"$Include" : [
"tea_busi_product."
]
}
}
},
sUrl = "/~/$metadata";
assert.deepEqual(this.oMetaModel.mSchema2MetadataUrl, {});
// simulate a previous reference to a schema with the _same_ reference URI --> allowed!
this.oMetaModel.mSchema2MetadataUrl["A."] = "/A/$metadata";
// code under test
assert.strictEqual(this.oMetaModel.validate(sUrl, mScope), mScope);
assert.deepEqual(this.oMetaModel.mSchema2MetadataUrl, {
"A." : "/A/$metadata",
"A.A." : "/A/$metadata",
"B." : "/B/$metadata",
"B.B." : "/B/$metadata",
"tea_busi_product." : "/a/default/iwbep/tea_busi_product/0001/$metadata"
});
});
//*********************************************************************************************
QUnit.test("getLastModified", function (assert) {
var mEmptyScope = {
"$Version" : "4.0"
},
mNewScope = {
"$Version" : "4.0",
"$Date" : "Tue, 18 Apr 2017 14:40:29 GMT"
},
iNow = Date.now(),
mOldScope = {
"$Version" : "4.0",
"$Date" : "Tue, 18 Apr 2017 14:40:29 GMT", // $LastModified wins!
"$LastModified" : "Fri, 07 Apr 2017 11:21:50 GMT"
},
mOldScopeClone = clone(mOldScope),
sUrl = "/~/$metadata"; // Note: in real life, each URL is read at most once!
// code under test (together with c'tor)
assert.strictEqual(this.oMetaModel.getLastModified().getTime(), 0, "initial value");
// code under test
assert.strictEqual(this.oMetaModel.validate(sUrl, mOldScope), mOldScope);
assert.strictEqual(this.oMetaModel.getLastModified().toISOString(),
"2017-04-07T11:21:50.000Z", "old $LastModified is used");
assert.notOk("$LastModified" in mOldScope);
// code under test
assert.strictEqual(this.oMetaModel.validate(sUrl, mNewScope), mNewScope);
assert.strictEqual(this.oMetaModel.getLastModified().toISOString(),
"2017-04-18T14:40:29.000Z", "new $Date is used");
assert.notOk("$Date" in mNewScope);
// code under test
assert.strictEqual(this.oMetaModel.validate(sUrl, mOldScopeClone), mOldScopeClone);
assert.strictEqual(this.oMetaModel.getLastModified().toISOString(),
"2017-04-18T14:40:29.000Z", "new $Date wins, old $LastModified is ignored");
assert.notOk("$LastModified" in mOldScopeClone);
// code under test
assert.strictEqual(this.oMetaModel.validate(sUrl, mEmptyScope), mEmptyScope);
assert.ok(this.oMetaModel.getLastModified().getTime() >= iNow,
"missing $Date/$LastModified is like 'now': " + this.oMetaModel.getLastModified());
});
//*********************************************************************************************
QUnit.test("getETags", function (assert) {
var sETag = 'W/"..."',
mETags,
that = this;
function codeUnderTest(sUrl, mScope) {
// code under test
assert.strictEqual(that.oMetaModel.validate(sUrl, mScope), mScope);
assert.notOk("$ETag" in mScope);
assert.notOk("$LastModified" in mScope);
}
// code under test (together with c'tor)
assert.deepEqual(this.oMetaModel.getETags(), {}, "initial value");
codeUnderTest("/~/A", {
"$Version" : "4.0",
"$LastModified" : "Fri, 07 Apr 2017 11:21:50 GMT"
});
codeUnderTest("/~/B", {
"$Version" : "4.0",
"$LastModified" : "Tue, 18 Apr 2017 14:40:29 GMT"
});
codeUnderTest("/~/C", {
"$Version" : "4.0"
});
codeUnderTest("/~/D", {
"$Version" : "4.0",
"$ETag" : sETag
});
// code under test
mETags = this.oMetaModel.getETags();
assert.deepEqual(mETags, {
"/~/A" : new Date(Date.UTC(2017, 3, 7, 11, 21, 50)),
"/~/B" : new Date(Date.UTC(2017, 3, 18, 14, 40, 29)),
"/~/C" : null,
"/~/D" : sETag // wins over null!
});
});
//*********************************************************************************************
[{
message : "Unsupported IncludeAnnotations",
scope : {
"$Version" : "4.0",
"$Reference" : {
"/A/$metadata" : {
"$Include" : [
"A."
]
},
"/B/$metadata" : {
"$IncludeAnnotations" : [{
"$TermNamespace" : "com.sap.vocabularies.Common.v1"
}]
}
}
}
}, {
message : "A schema cannot span more than one document: tea_busi."
+ " - is both included and defined",
scope : {
"$Version" : "4.0",
"$Reference" : {
"/B/$metadata" : {
"$Include" : [
"foo.", "tea_busi."
]
}
},
"tea_busi." : {
"$kind" : "Schema"
}
}
}, {
message : "A schema cannot span more than one document: tea_busi."
+ " - expected reference URI /A/$metadata but instead saw /B/$metadata",
scope : {
"$Version" : "4.0",
"$Reference" : {
"/A/$metadata" : {
"$Include" : [
"foo.", "tea_busi."
]
},
"/B/$metadata" : {
"$Include" : [
"bar.", "tea_busi."
]
}
}
}
}, {
message : "A schema cannot span more than one document: existing."
+ " - expected reference URI /$metadata but instead saw /B/$metadata",
scope : {
"$Version" : "4.0",
"$Reference" : {
"/A/$metadata" : {
"$Include" : [
"foo.", "bar."
]
},
"/B/$metadata" : {
"$Include" : [
"baz.", "existing."
]
}
}
}
}].forEach(function (oFixture) {
[false, true].forEach(function (bSupportReferences) {
var sMessage = oFixture.message,
sTitle = "validate: " + sMessage + ", supportReferences: " + bSupportReferences;
QUnit.test(sTitle, function (assert) {
var sUrl = "/~/$metadata",
that = this;
function codeUnderTest() {
var oResult = that.oMetaModel.validate(sUrl, oFixture.scope);
assert.strictEqual(oResult, oFixture.scope);
}
this.oMetaModel.bSupportReferences = bSupportReferences;
// simulate a schema that has been loaded or referenced before
this.oMetaModel.mSchema2MetadataUrl = {
"existing." : "/$metadata" // simulate schema from root service's $metadata
};
if (bSupportReferences) {
this.oLogMock.expects("error")
.withExactArgs(sMessage, sUrl, sODataMetaModel);
}
if (bSupportReferences) {
assert.throws(codeUnderTest, new Error(sUrl + ": " + sMessage));
} else {
codeUnderTest();
}
});
});
});
//*********************************************************************************************
QUnit.test("_mergeAnnotations: without annotation files", function (assert) {
// Note: target elements have been omitted for brevity
var mExpectedAnnotations = {
"same.target" : {
"@Common.Description" : "",
"@Common.Label" : {
"old" : true // Note: no aggregation of properties here!
},
"@Common.Text" : ""
},
"another.target" : {
"@Common.Label" : ""
}
},
mScope = {
"A." : {
"$kind" : "Schema",
"$Annotations" : {
"same.target" : {
"@Common.Label" : {
"old" : true
},
"@Common.Text" : ""
}
}
},
"B." : {
"$kind" : "Schema",
"$Annotations" : {
"same.target" : {
"@Common.Description" : "",
"@Common.Label" : { // illegal overwrite within $metadata, ignored!
"new" : true
}
},
"another.target" : {
"@Common.Label" : ""
}
}
},
"B.B" : {}
};
this.oMetaModelMock.expects("validate")
.withExactArgs(this.oMetaModel.sUrl, mScope);
assert.deepEqual(this.oMetaModel.mSchema2MetadataUrl, {});
// code under test
this.oMetaModel._mergeAnnotations(mScope, []);
assert.deepEqual(mScope.$Annotations, mExpectedAnnotations,
"$Annotations have been shifted and merged from schemas to root");
assert.notOk("$Annotations" in mScope["A."], "$Annotations removed from schema");
assert.notOk("$Annotations" in mScope["B."], "$Annotations removed from schema");
assert.deepEqual(this.oMetaModel.mSchema2MetadataUrl, {
"A." : this.oMetaModel.sUrl,
"B." : this.oMetaModel.sUrl
});
});
//*********************************************************************************************
QUnit.test("_mergeAnnotations: validation failure for $metadata", function (assert) {
var oError = new Error(),
mScope = {};
this.oMetaModelMock.expects("validate")
.withExactArgs(this.oMetaModel.sUrl, mScope)
.throws(oError);
assert.throws(function () {
// code under test
this.oMetaModel._mergeAnnotations(mScope, []);
}, oError);
});
//*********************************************************************************************
QUnit.test("_mergeAnnotations: validation failure in annotation file", function (assert) {
var oError = new Error(),
mScope = {},
mAnnotationScope1 = {},
mAnnotationScope2 = {};
this.oMetaModel.aAnnotationUris = ["n/a", "/my/annotation.xml"];
this.oMetaModelMock.expects("validate")
.withExactArgs(this.oMetaModel.sUrl, mScope);
this.oMetaModelMock.expects("validate")
.withExactArgs("n/a", mAnnotationScope1);
this.oMetaModelMock.expects("validate")
.withExactArgs("/my/annotation.xml", mAnnotationScope2)
.throws(oError);
assert.throws(function () {
// code under test
this.oMetaModel._mergeAnnotations(mScope, [mAnnotationScope1, mAnnotationScope2]);
}, oError);
});
//*********************************************************************************************
QUnit.test("_mergeAnnotations: with annotation files (legacy)", function (assert) {
var sNamespace = "com.sap.gateway.default.iwbep.tea_busi.v0001.",
sWorker = sNamespace + "Worker/",
sBasicSalaryCurr = sWorker + "SALARY/BASIC_SALARY_CURR",
sBasicSalaryCurr2 = "another.schema.2.SALARY/BASIC_SALARY_CURR",
sBonusCurr = sWorker + "SALARY/BONUS_CURR",
sCommonLabel = "@com.sap.vocabularies.Common.v1.Label",
sCommonQuickInfo = "@com.sap.vocabularies.Common.v1.QuickInfo",
sCommonText = "@com.sap.vocabularies.Common.v1.Text",
sBaseUrl = "/" + window.location.pathname.split("/")[1]
+ "/test-resources/sap/ui/core/qunit/odata/v4/data/",
oMetadata = jQuery.sap.sjax({url : sBaseUrl + "metadata.json", dataType : 'json'}).data,
oExpectedResult = clone(oMetadata),
oAnnotation = jQuery.sap.sjax({
url : sBaseUrl + "legacy_annotations.json",
dataType : 'json'
}).data,
oAnnotationCopy = clone(oAnnotation);
// the examples are unrealistic and only need to work in 'legacy mode'
this.oMetaModel.bSupportReferences = false;
this.oMetaModel.aAnnotationUris = ["n/a"];
this.oMetaModelMock.expects("validate")
.withExactArgs(this.oMetaModel.sUrl, oMetadata);
this.oMetaModelMock.expects("validate")
.withExactArgs("n/a", oAnnotation);
oExpectedResult.$Annotations = oMetadata[sNamespace].$Annotations;
delete oExpectedResult[sNamespace].$Annotations;
// all entries with $kind are merged
oExpectedResult["my.schema.2.FuGetEmployeeMaxAge"] =
oAnnotationCopy["my.schema.2.FuGetEmployeeMaxAge"];
oExpectedResult["my.schema.2.Entity"] =
oAnnotationCopy["my.schema.2.Entity"];
oExpectedResult["my.schema.2.DefaultContainer"] =
oAnnotationCopy["my.schema.2.DefaultContainer"];
oExpectedResult["my.schema.2."] =
oAnnotationCopy["my.schema.2."];
oExpectedResult["another.schema.2."] =
oAnnotationCopy["another.schema.2."];
// update annotations
oExpectedResult.$Annotations[sBasicSalaryCurr][sCommonLabel]
= oAnnotationCopy["my.schema.2."].$Annotations[sBasicSalaryCurr][sCommonLabel];
oExpectedResult.$Annotations[sBasicSalaryCurr][sCommonQuickInfo]
= oAnnotationCopy["my.schema.2."].$Annotations[sBasicSalaryCurr][sCommonQuickInfo];
oExpectedResult.$Annotations[sBonusCurr][sCommonText]
= oAnnotationCopy["my.schema.2."].$Annotations[sBonusCurr][sCommonText];
oExpectedResult.$Annotations[sBasicSalaryCurr2]
= oAnnotationCopy["another.schema.2."].$Annotations[sBasicSalaryCurr2];
delete oExpectedResult["my.schema.2."].$Annotations;
delete oExpectedResult["another.schema.2."].$Annotations;
// code under test
this.oMetaModel._mergeAnnotations(oMetadata, [oAnnotation]);
assert.deepEqual(oMetadata, oExpectedResult, "merged metadata as expected");
});
//*********************************************************************************************
QUnit.test("_mergeAnnotations: with annotation files", function (assert) {
var mScope0 = {
"$EntityContainer" : "tea_busi.DefaultContainer",
"$Reference" : {
"../../../../default/iwbep/tea_busi_foo/0001/$metadata" : {
"$Include" : [
"tea_busi_foo.v0001."
]
}
},
"$Version" : "4.0",
"tea_busi." : {
"$kind" : "Schema",
"$Annotations" : {
"tea_busi.DefaultContainer" : {
"@A" : "from $metadata",
"@B" : "from $metadata",
"@C" : "from $metadata"
},
"tea_busi.TEAM" : {
"@D" : ["from $metadata"],
"@E" : ["from $metadata"],
"@F" : ["from $metadata"]
}
}
},
"tea_busi.DefaultContainer" : {
"$kind" : "EntityContainer"
},
"tea_busi.EQUIPMENT" : {
"$kind" : "EntityType"
},
"tea_busi.TEAM" : {
"$kind" : "EntityType"
},
"tea_busi.Worker" : {
"$kind" : "EntityType"
}
},
mScope1 = {
"$Version" : "4.0",
"tea_busi_foo.v0001." : {
"$kind" : "Schema",
"$Annotations" : {
"tea_busi_foo.v0001.Product/Name" : {
"@Common.Label" : "from $metadata"
}
}
},
"tea_busi_foo.v0001.Product" : {
"$kind" : "EntityType",
"Name" : {
"$kind" : "Property",
"$Type" : "Edm.String"
}
}
},
mAnnotationScope1 = {
"$Version" : "4.0",
"foo." : {
"$kind" : "Schema",
"$Annotations" : {
"tea_busi.DefaultContainer" : {
"@B" : "from annotation #1",
"@C" : "from annotation #1"
},
"tea_busi.TEAM" : {
"@E" : ["from annotation #1"],
"@F" : ["from annotation #1"]
},
"tea_busi.Worker" : {
"@From.Annotation" : {
"$Type" : "some.Record",
"Label" : "from annotation #1"
},
"@From.Annotation1" : "from annotation #1"
}
}
}
},
mAnnotationScope2 = {
"$Version" : "4.0",
"bar." : {
"$kind" : "Schema",
"$Annotations" : {
"tea_busi.DefaultContainer" : {
"@C" : "from annotation #2"
},
"tea_busi.EQUIPMENT" : {
"@From.Annotation2" : "from annotation #2"
},
"tea_busi.TEAM" : {
"@F" : ["from annotation #2"]
},
"tea_busi.Worker" : {
"@From.Annotation" : {
"$Type" : "some.Record",
"Value" : "from annotation #2"
}
},
"tea_busi_foo.v0001.Product/Name" : {
"@Common.Label" : "from annotation #2"
}
}
}
},
mExpectedScope = {
"$Annotations" : {
"tea_busi.DefaultContainer" : {
"@A" : "from $metadata",
"@B" : "from annotation #1",
"@C" : "from annotation #2"
},
"tea_busi.EQUIPMENT" : {
"@From.Annotation2" : "from annotation #2"
},
"tea_busi.TEAM" : { // Note: no aggregation of array elements here!
"@D" : ["from $metadata"],
"@E" : ["from annotation #1"],
"@F" : ["from annotation #2"]
},
"tea_busi.Worker" : {
"@From.Annotation" : {
"$Type" : "some.Record",
// Note: no "Label" here!
"Value" : "from annotation #2"
},
"@From.Annotation1" : "from annotation #1"
},
"tea_busi_foo.v0001.Product/Name" : {
"@Common.Label" : "from annotation #2"
}
},
"$EntityContainer" : "tea_busi.DefaultContainer",
"$Reference" : {
"../../../../default/iwbep/tea_busi_foo/0001/$metadata" : {
"$Include" : [
"tea_busi_foo.v0001."
]
}
},
"$Version" : "4.0",
"bar." : {
"$kind" : "Schema"
},
"foo." : {
"$kind" : "Schema"
},
"tea_busi." : {
"$kind" : "Schema"
},
"tea_busi.DefaultContainer" : {
"$kind" : "EntityContainer"
},
"tea_busi.EQUIPMENT" : {
"$kind" : "EntityType"
},
"tea_busi.TEAM" : {
"$kind" : "EntityType"
},
"tea_busi.Worker" : {
"$kind" : "EntityType"
}
};
this.oMetaModel.aAnnotationUris = ["/URI/1", "/URI/2"];
this.oMetaModelMock.expects("validate")
.withExactArgs(this.oMetaModel.sUrl, mScope0);
this.oMetaModelMock.expects("validate")
.withExactArgs("/URI/1", mAnnotationScope1);
this.oMetaModelMock.expects("validate")
.withExactArgs("/URI/2", mAnnotationScope2);
assert.deepEqual(this.oMetaModel.mSchema2MetadataUrl, {});
// code under test
this.oMetaModel._mergeAnnotations(mScope0, [mAnnotationScope1, mAnnotationScope2]);
assert.deepEqual(mScope0, mExpectedScope);
assert.strictEqual(mScope0["tea_busi."].$Annotations, undefined);
assert.strictEqual(mAnnotationScope1["foo."].$Annotations, undefined);
assert.strictEqual(mAnnotationScope2["bar."].$Annotations, undefined);
assert.deepEqual(this.oMetaModel.mSchema2MetadataUrl, {
"bar." : "/URI/2",
"foo." : "/URI/1",
"tea_busi." : this.oMetaModel.sUrl
});
// prepare to load "cross-service reference"
this.oMetaModel.mSchema2MetadataUrl["tea_busi_foo.v0001."]
= "/a/default/iwbep/tea_busi_foo/0001/$metadata"; // simulate #validate of mScope0
this.oMetaModelMock.expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(mScope0));
this.mock(this.oMetaModel.oRequestor).expects("read")
.withExactArgs("/a/default/iwbep/tea_busi_foo/0001/$metadata")
.returns(Promise.resolve(mScope1));
this.oMetaModelMock.expects("validate")
.withExactArgs("/a/default/iwbep/tea_busi_foo/0001/$metadata", mScope1)
.returns(mScope1);
// code under test
return this.oMetaModel.fetchObject("/tea_busi_foo.v0001.Product/Name@Common.Label")
.then(function (sLabel) {
assert.strictEqual(sLabel, "from annotation #2", "not overwritten by $metadata");
});
});
//*********************************************************************************************
QUnit.test("_mergeAnnotations - error (legacy)", function (assert) {
var oAnnotation1 = {
"tea_busi.NewType1" : {
"$kind" : "EntityType"
}
},
oAnnotation2 = {
"tea_busi.NewType2" : {
"$kind" : "EntityType"
},
"tea_busi.ExistingType" : {
"$kind" : "EntityType"
}
},
sMessage = "A schema cannot span more than one document: tea_busi.ExistingType",
oMetadata = {
"tea_busi.ExistingType" : {
"$kind" : "EntityType"
}
};
this.oMetaModel.aAnnotationUris = ["n/a", "/my/annotation.xml"];
// legacy behavior: $Version is not checked, tea_busi.NewType2 is allowed
this.oMetaModel.bSupportReferences = false;
this.oMetaModelMock.expects("validate")
.withExactArgs(this.oMetaModel.sUrl, oMetadata);
this.oMetaModelMock.expects("validate")
.withExactArgs("n/a", oAnnotation1);
this.oMetaModelMock.expects("validate")
.withExactArgs("/my/annotation.xml", oAnnotation2);
this.oLogMock.expects("error")
.withExactArgs(sMessage, "/my/annotation.xml", sODataMetaModel);
assert.throws(function () {
// code under test
this.oMetaModel._mergeAnnotations(oMetadata, [oAnnotation1, oAnnotation2]);
}, new Error("/my/annotation.xml: " + sMessage));
});
//*********************************************************************************************
QUnit.test("_mergeAnnotations - a schema cannot span more than one document",
function (assert) {
var oAnnotation = {
"$Version" : "4.0",
"tea_busi." : {
"$kind" : "Schema"
}
},
sMessage = "A schema cannot span more than one document: tea_busi.",
oMetadata = {
"$Version" : "4.0",
"tea_busi." : {
"$kind" : "Schema"
}
};
this.oMetaModel.aAnnotationUris = ["n/a", "/my/annotation.xml"];
this.oLogMock.expects("error")
.withExactArgs(sMessage, "/my/annotation.xml", sODataMetaModel);
assert.throws(function () {
// code under test
this.oMetaModel._mergeAnnotations(oMetadata, [{"$Version" : "4.0"}, oAnnotation]);
}, new Error("/my/annotation.xml: " + sMessage));
}
);
//*********************************************************************************************
QUnit.test("getOrCreateValueListModel", function (assert) {
var oModel = new ODataModel({
serviceUrl : "/Foo/DataService/",
synchronizationMode : "None"
}),
oMetaModel = oModel.getMetaModel(),
oValueListModel;
oModel.oRequestor.mHeaders["X-CSRF-Token"] = "xyz";
// code under test
oValueListModel = oMetaModel.getOrCreateValueListModel("../ValueListService/$metadata");
assert.ok(oValueListModel instanceof ODataModel);
assert.strictEqual(oValueListModel.sServiceUrl, "/Foo/ValueListService/");
assert.strictEqual(oValueListModel.getDefaultBindingMode(), BindingMode.OneWay);
assert.strictEqual(oValueListModel.sOperationMode, OperationMode.Server);
assert.strictEqual(oValueListModel.oRequestor.mHeaders["X-CSRF-Token"], "xyz");
// code under test
assert.strictEqual(oMetaModel.getOrCreateValueListModel("/Foo/ValueListService/$metadata"),
oValueListModel);
// code under test
assert.strictEqual(oValueListModel.getMetaModel()
.getOrCreateValueListModel("/Foo/ValueListService/$metadata"),
oValueListModel);
// code under test
assert.strictEqual(oValueListModel.getMetaModel().getOrCreateValueListModel("$metadata"),
oValueListModel);
oModel = new ODataModel({
serviceUrl : "/Foo/DataService2/",
synchronizationMode : "None"
});
// code under test - even a totally different model gets the very same value list model
assert.strictEqual(oModel.getMetaModel()
.getOrCreateValueListModel("../ValueListService/$metadata"),
oValueListModel);
});
//*********************************************************************************************
QUnit.test("getOrCreateValueListModel: relative data service URL", function (assert) {
var sRelativePath = "../../../DataService/",
sAbsolutePath =
new URI(sRelativePath).absoluteTo(document.baseURL).pathname().toString(),
oModel = new ODataModel({
serviceUrl : sRelativePath,
synchronizationMode : "None"
}),
oValueListModel;
// code under test
oValueListModel = oModel.getMetaModel()
.getOrCreateValueListModel("../ValueListService/$metadata");
assert.strictEqual(oValueListModel.sServiceUrl,
new URI("../ValueListService/").absoluteTo(sAbsolutePath).toString());
});
//*********************************************************************************************
QUnit.test("fetchValueListType: unknown property", function (assert) {
var oContext = {},
sPath = "/Products('HT-1000')/Foo";
this.oMetaModelMock.expects("getMetaContext").withExactArgs(sPath).returns(oContext);
this.oMetaModelMock.expects("fetchObject")
.withExactArgs(undefined, sinon.match.same(oContext))
.returns(Promise.resolve());
// code under test
return this.oMetaModel.fetchValueListType(sPath).then(function () {
assert.ok(false);
}, function (oError) {
assert.ok(oError.message, "No metadata for " + sPath);
});
});
//*********************************************************************************************
[{
mAnnotations : {
"@some.other.Annotation" : true
},
sValueListType : ValueListType.None
}, {
mAnnotations : {
"@com.sap.vocabularies.Common.v1.ValueListReferences" : [],
"@com.sap.vocabularies.Common.v1.ValueListWithFixedValues" : true
},
sValueListType : ValueListType.Fixed
}, {
mAnnotations : {
"@com.sap.vocabularies.Common.v1.ValueListReferences" : []
},
sValueListType : ValueListType.Standard
}, {
mAnnotations : {
"@com.sap.vocabularies.Common.v1.ValueListReferences#foo" : [],
"@com.sap.vocabularies.Common.v1.ValueListWithFixedValues" : false
},
sValueListType : ValueListType.Standard
}, {
mAnnotations : {
"@com.sap.vocabularies.Common.v1.ValueListMapping#foo" : {},
"@com.sap.vocabularies.Common.v1.ValueListWithFixedValues" : false
},
sValueListType : ValueListType.Standard
}].forEach(function (oFixture) {
QUnit.test("fetchValueListType: " + oFixture.sValueListType, function (assert) {
var oContext = {},
sPropertyPath = "/ProductList('HT-1000')/Status";
this.oMetaModelMock.expects("getMetaContext")
.withExactArgs(sPropertyPath).returns(oContext);
this.oMetaModelMock.expects("fetchObject")
.withExactArgs(undefined, sinon.match.same(oContext))
.returns(SyncPromise.resolve({}));
this.oMetaModelMock.expects("getObject")
.withExactArgs("@", sinon.match.same(oContext))
.returns(oFixture.mAnnotations);
// code under test
this.oMetaModel.fetchValueListType(sPropertyPath).then(function (sValueListType) {
assert.strictEqual(sValueListType, oFixture.sValueListType);
});
});
});
//*********************************************************************************************
QUnit.test("getValueListType, requestValueListType", function (assert) {
return checkGetAndRequest(this, assert, "fetchValueListType", ["sPath"], true);
});
//*********************************************************************************************
QUnit.test("fetchValueListMappings: success", function (assert) {
var oModel = new ODataModel({
serviceUrl : "/Foo/DataService/",
synchronizationMode : "None"
}),
oMetaModelMock = this.mock(oModel.getMetaModel()),
oDefaultMapping = {
"CollectionPath" : "VH_Category1Set",
"Parameters" : [{"p1" : "foo"}]
},
oFooMapping = {
"CollectionPath" : "VH_Category2Set",
"Parameters" : [{"p2" : "bar"}]
},
oProperty = {},
oValueListMetadata = {
"$Annotations" : {
"zui5_epm_sample.Product/Category" : {
"@com.sap.vocabularies.Common.v1.ValueListMapping" : oDefaultMapping,
"@com.sap.vocabularies.Common.v1.ValueListMapping#foo" : oFooMapping
},
"some.other.Target" : {}
}
},
oValueListModel = {
getMetaModel : function () {
return {
fetchEntityContainer : function () {
return Promise.resolve(oValueListMetadata);
}
};
}
};
oMetaModelMock.expects("getObject")
.withExactArgs("/zui5_epm_sample.Product/Category")
.returns(oProperty);
// code under test
return oModel.getMetaModel()
.fetchValueListMappings(oValueListModel, "zui5_epm_sample", oProperty)
.then(function (oValueListMappings) {
assert.deepEqual(oValueListMappings, {
"" : oDefaultMapping,
"foo" : oFooMapping
});
});
});
//*********************************************************************************************
[{
annotations : {
"zui5_epm_sample.Product/CurrencyCode/type.cast" : true
},
error : "Unexpected annotation target 'zui5_epm_sample.Product/CurrencyCode/type.cast' " +
"with namespace of data service in /Foo/ValueListService"
}, {
annotations : {
"zui5_epm_sample.Product/Category" : {
"@some.other.Term" : true
}
},
error : "Unexpected annotation 'some.other.Term' for target "
+ "'zui5_epm_sample.Product/Category' with namespace of data service "
+ "in /Foo/ValueListService"
}, {
annotations : {},
error : "No annotation 'com.sap.vocabularies.Common.v1.ValueListMapping' "
+ "in /Foo/ValueListService"
}].forEach(function (oFixture) {
QUnit.test("fetchValueListMappings: " + oFixture.error, function (assert) {
var oModel = new ODataModel({
serviceUrl : "/Foo/DataService/",
synchronizationMode : "None"
}),
oMetaModel = oModel.getMetaModel(),
oMetaModelMock = this.mock(oMetaModel),
oProperty = {},
oValueListMetadata = {
"$Annotations" : oFixture.annotations
},
oValueListModel = {
getMetaModel : function () {
return {
fetchEntityContainer : function () {
return Promise.resolve(oValueListMetadata);
}
};
},
sServiceUrl : "/Foo/ValueListService"
},
sTarget = Object.keys(oFixture.annotations)[0];
oMetaModelMock.expects("getObject").atLeast(0)
.withExactArgs("/" + sTarget)
.returns(sTarget === "zui5_epm_sample.Product/Category" ? oProperty : undefined);
// code under test
return oMetaModel
.fetchValueListMappings(oValueListModel, "zui5_epm_sample", oProperty)
.then(function () {
assert.ok(false);
}, function (oError) {
assert.strictEqual(oError.message, oFixture.error);
});
});
});
//*********************************************************************************************
QUnit.test("fetchValueListMappings: value list model is data model", function (assert) {
var oModel = new ODataModel({
serviceUrl : "/Foo/DataService/",
synchronizationMode : "None"
}),
oMetaModelMock = this.mock(oModel.getMetaModel()),
oMapping = {
"CollectionPath" : "VH_CountrySet",
"Parameters" : [{"p1" : "foo"}]
},
oProperty = {
"$kind" : "Property"
},
oMetadata = {
"$EntityContainer" : "value_list.Container",
"value_list.VH_BusinessPartner" : {
"$kind" : "Entity",
"Country" : oProperty
},
"$Annotations" : {
// value list on value list
"value_list.VH_BusinessPartner/Country" : {
"@com.sap.vocabularies.Common.v1.Label" : "Country",
"@com.sap.vocabularies.Common.v1.ValueListMapping" : oMapping
},
"value_list.VH_BusinessPartner/Foo" : {/* some other field w/ value list*/}
}
};
oMetaModelMock.expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(oMetadata));
// code under test
return oModel.getMetaModel()
.fetchValueListMappings(oModel, "value_list", oProperty)
.then(function (oValueListMappings) {
assert.deepEqual(oValueListMappings, {
"" : oMapping
});
});
});
//*********************************************************************************************
[{
sPropertyPath : "/EMPLOYEES/unknown",
sExpectedError : "No metadata"
}, {
sPropertyPath : "/EMPLOYEES/AGE",
sExpectedError : "No annotation 'com.sap.vocabularies.Common.v1.ValueListReferences'"
}].forEach(function (oFixture) {
QUnit.test("requestValueListInfo: " + oFixture.sExpectedError, function (assert) {
var oModel = new ODataModel({
serviceUrl : "/~/",
synchronizationMode : "None"
});
this.mock(oModel.getMetaModel()).expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(mScope));
// code under test
return oModel.getMetaModel().requestValueListInfo(oFixture.sPropertyPath)
.then(function () {
assert.ok(false);
}, function (oError) {
assert.strictEqual(oError.message,
oFixture.sExpectedError + " for " + oFixture.sPropertyPath);
});
});
});
//*********************************************************************************************
[false, true].forEach(function (bDuplicate) {
QUnit.test("requestValueListInfo: duplicate=" + bDuplicate, function (assert) {
var sMappingUrl1 = "../ValueListService1/$metadata",
sMappingUrl2 = "../ValueListService2/$metadata",
sMappingUrlBar = "../ValueListServiceBar/$metadata",
oModel = new ODataModel({
serviceUrl : "/Foo/DataService/",
synchronizationMode : "None"
}),
oMetaModelMock = this.mock(oModel.getMetaModel()),
oProperty = {
"$kind" : "Property"
},
sPropertyPath = "/ProductList('HT-1000')/Category",
oMetadata = {
"$EntityContainer" : "zui5_epm_sample.Container",
"zui5_epm_sample.Product" : {
"$kind" : "Entity",
"Category" : oProperty
},
"$Annotations" : {
"zui5_epm_sample.Product/Category" : {
"@com.sap.vocabularies.Common.v1.ValueListReferences" :
[sMappingUrl1, sMappingUrl2],
"@com.sap.vocabularies.Common.v1.ValueListReferences#bar" :
[sMappingUrlBar],
"@com.sap.vocabularies.Common.v1.ValueListReferences#bar@an.Annotation"
: true,
"@some.other.Annotation" : true
}
},
"zui5_epm_sample.Container" : {
"ProductList" : {
"$kind" : "EntitySet",
"$Type" : "zui5_epm_sample.Product"
}
}
},
oValueListMappings1 = {
"" : {CollectionPath : ""}
},
oValueListMappings2 = {
"foo" : {CollectionPath : "foo"}
},
oValueListMappingsBar = {},
oValueListModel1 = {sServiceUrl : sMappingUrl1},
oValueListModel2 = {sServiceUrl : sMappingUrl2},
oValueListModelBar = {sServiceUrl : sMappingUrlBar};
oValueListMappingsBar[bDuplicate ? "" : "bar"] = {CollectionPath : "bar"};
oMetaModelMock.expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(oMetadata));
oMetaModelMock.expects("getOrCreateValueListModel")
.withExactArgs(sMappingUrl1)
.returns(oValueListModel1);
oMetaModelMock.expects("fetchValueListMappings")
.withExactArgs(sinon.match.same(oValueListModel1), "zui5_epm_sample",
sinon.match.same(oProperty))
.returns(Promise.resolve(oValueListMappings1));
oMetaModelMock.expects("getOrCreateValueListModel")
.withExactArgs(sMappingUrl2)
.returns(oValueListModel2);
oMetaModelMock.expects("fetchValueListMappings")
.withExactArgs(sinon.match.same(oValueListModel2), "zui5_epm_sample",
sinon.match.same(oProperty))
.returns(Promise.resolve(oValueListMappings2));
oMetaModelMock.expects("getOrCreateValueListModel")
.withExactArgs(sMappingUrlBar)
.returns(oValueListModelBar);
oMetaModelMock.expects("fetchValueListMappings")
.withExactArgs(sinon.match.same(oValueListModelBar), "zui5_epm_sample",
sinon.match.same(oProperty))
.returns(SyncPromise.resolve(oValueListMappingsBar));
// code under test
return oModel.getMetaModel()
.requestValueListInfo(sPropertyPath)
.then(function (oResult) {
assert.ok(!bDuplicate);
assert.deepEqual(oResult, {
"" : {
$model : oValueListModel1,
CollectionPath : ""
},
"foo" : {
$model : oValueListModel2,
CollectionPath : "foo"
},
"bar" : {
$model : oValueListModelBar,
CollectionPath : "bar"
}
});
}, function (oError) {
assert.ok(bDuplicate);
assert.strictEqual(oError.message,
"Annotations 'com.sap.vocabularies.Common.v1.ValueListMapping' with "
+ "identical qualifier '' for property " + sPropertyPath
+ " in " + sMappingUrlBar + " and " + sMappingUrl1);
});
});
});
//*********************************************************************************************
QUnit.test("requestValueListInfo: same model w/o reference", function (assert) {
var oProperty = {
"$kind" : "Property"
},
oValueListMappingFoo = {CollectionPath : "foo"},
oMetadata = {
"$EntityContainer" : "value_list.Container",
"value_list.Container" : {
"$kind" : "EntityContainer",
"VH_BusinessPartnerSet" : {
"$kind" : "EntitySet",
"$Type" : "value_list.VH_BusinessPartner"
}
},
"value_list.VH_BusinessPartner" : {
"$kind" : "Entity",
"Country" : oProperty
},
"$Annotations" : {
"value_list.VH_BusinessPartner/Country" : {
"@com.sap.vocabularies.Common.v1.ValueListMapping#foo" :
oValueListMappingFoo,
"@com.sap.vocabularies.Common.v1.ValueListMapping#bar" :
{CollectionPath : "bar"}
}
}
},
oModel = new ODataModel({
serviceUrl : "/Foo/ValueListService/",
synchronizationMode : "None"
}),
oMetaModelMock = this.mock(oModel.getMetaModel()),
sPropertyPath = "/VH_BusinessPartnerSet('0100000000')/Country";
oMetaModelMock.expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(oMetadata));
// code under test
return oModel.getMetaModel().requestValueListInfo(sPropertyPath).then(function (oResult) {
assert.strictEqual(oResult.foo.$model, oModel);
assert.strictEqual(oResult.bar.$model, oModel);
assert.notOk("$model" in oValueListMappingFoo);
delete oResult.foo.$model;
delete oResult.bar.$model;
assert.deepEqual(oResult, {
"foo" : {CollectionPath : "foo"},
"bar" : {CollectionPath : "bar"}
});
});
});
//*********************************************************************************************
[false, true].forEach(function (bDuplicate) {
var sTitle = "requestValueListInfo: fixed values: duplicate=" + bDuplicate;
QUnit.test(sTitle, function (assert) {
var oValueListMapping = {CollectionPath : "foo"},
oAnnotations = {
"@com.sap.vocabularies.Common.v1.ValueListWithFixedValues" : true,
"@com.sap.vocabularies.Common.v1.ValueListMapping#foo" : oValueListMapping
},
oMetadata = {
"$EntityContainer" : "value_list.Container",
"value_list.Container" : {
"$kind" : "EntityContainer",
"VH_BusinessPartnerSet" : {
"$kind" : "EntitySet",
"$Type" : "value_list.VH_BusinessPartner"
}
},
"value_list.VH_BusinessPartner" : {
"$kind" : "Entity",
"Country" : {}
},
"$Annotations" : {
"value_list.VH_BusinessPartner/Country" : oAnnotations
}
},
oModel = new ODataModel({
serviceUrl : "/Foo/ValueListService/",
synchronizationMode : "None"
}),
sPropertyPath = "/VH_BusinessPartnerSet('42')/Country";
if (bDuplicate) {
oAnnotations["@com.sap.vocabularies.Common.v1.ValueListMapping#bar"] = {};
}
this.mock(oModel.getMetaModel()).expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(oMetadata));
// code under test
return oModel.getMetaModel().requestValueListInfo(sPropertyPath)
.then(function (oResult) {
assert.notOk(bDuplicate);
assert.strictEqual(oResult[""].$model, oModel);
delete oResult[""].$model;
assert.deepEqual(oResult, {
"" : {CollectionPath : "foo"}
});
}, function (oError) {
assert.ok(bDuplicate);
assert.strictEqual(oError.message, "Annotation "
+ "'com.sap.vocabularies.Common.v1.ValueListWithFixedValues' but multiple "
+ "'com.sap.vocabularies.Common.v1.ValueListMapping' for property "
+ sPropertyPath);
});
});
});
// *********************************************************************************************
QUnit.test("requestValueListInfo: property in cross-service reference", function (assert) {
var sMappingUrl = "../ValueListService/$metadata",
oModel = new ODataModel({
serviceUrl : "/Foo/DataService/",
synchronizationMode : "None"
}),
oMetaModelMock = this.mock(oModel.getMetaModel()),
oProperty = {
"$kind" : "Property"
},
oMetadata = {
"$Version" : "4.0",
"$Reference" : {
"/Foo/EpmSample/$metadata" : {
"$Include" : ["zui5_epm_sample."]
}
},
"$EntityContainer" : "base.Container",
"base.Container" : {
"BusinessPartnerList" : {
"$kind" : "EntitySet",
"$Type" : "base.BusinessPartner"
}
},
"base.BusinessPartner" : {
"$kind" : "EntityType",
"BP_2_PRODUCT" : {
"$kind" : "NavigationProperty",
"$Type" : "zui5_epm_sample.Product"
}
}
},
oMetadataProduct = {
"$Version" : "4.0",
"zui5_epm_sample.Product" : {
"$kind" : "Entity",
"Category" : oProperty
},
"zui5_epm_sample." : {
"$kind" : "Schema",
"$Annotations" : {
"zui5_epm_sample.Product/Category" : {
"@com.sap.vocabularies.Common.v1.ValueListReferences" : [sMappingUrl]
}
}
}
},
sPropertyPath = "/BusinessPartnerList('0100000000')/BP_2_PRODUCT('HT-1000')/Category",
oRequestorMock = this.mock(oModel.oMetaModel.oRequestor),
oValueListMappings = {
"" : {CollectionPath : ""}
},
oValueListModel = {sServiceUrl : sMappingUrl};
oRequestorMock.expects("read").withExactArgs("/Foo/DataService/$metadata", false, undefined)
.returns(Promise.resolve(oMetadata));
oRequestorMock.expects("read").withExactArgs("/Foo/EpmSample/$metadata")
.returns(Promise.resolve(oMetadataProduct));
oMetaModelMock.expects("getOrCreateValueListModel")
.withExactArgs(sMappingUrl)
.returns(oValueListModel);
oMetaModelMock.expects("fetchValueListMappings")
.withExactArgs(sinon.match.same(oValueListModel), "zui5_epm_sample",
sinon.match.same(oProperty))
.returns(Promise.resolve(oValueListMappings));
// code under test
return oModel.getMetaModel().requestValueListInfo(sPropertyPath).then(function (oResult) {
assert.deepEqual(oResult, {
"" : {
$model : oValueListModel,
CollectionPath : ""
}
});
});
});
// *********************************************************************************************
QUnit.test("requestValueListInfo: same qualifier in reference and local", function (assert) {
var sMappingUrl = "../ValueListService/$metadata",
oProperty = {
"$kind" : "Property"
},
oMetadata = {
"$EntityContainer" : "zui5_epm_sample.Container",
"zui5_epm_sample.Container" : {
"$kind" : "EntityContainer",
"ProductList" : {
"$kind" : "EntitySet",
"$Type" : "zui5_epm_sample.Product"
}
},
"zui5_epm_sample.Product" : {
"$kind" : "Entity",
"Category" : oProperty
},
"$Annotations" : {
"zui5_epm_sample.Product/Category" : {
"@com.sap.vocabularies.Common.v1.ValueListReferences" : [sMappingUrl],
"@com.sap.vocabularies.Common.v1.ValueListMapping#foo" : {}
}
}
},
oModel = new ODataModel({
serviceUrl : "/Foo/ValueListService/",
synchronizationMode : "None"
}),
oMetaModelMock = this.mock(oModel.getMetaModel()),
sPropertyPath = "/ProductList('HT-1000')/Category",
oValueListModel = {};
oMetaModelMock.expects("fetchEntityContainer").atLeast(1)
.returns(SyncPromise.resolve(oMetadata));
oMetaModelMock.expects("getOrCreateValueListModel")
.withExactArgs(sMappingUrl)
.returns(oValueListModel);
oMetaModelMock.expects("fetchValueListMappings")
.withExactArgs(sinon.match.same(oValueListModel), "zui5_epm_sample",
sinon.match.same(oProperty))
.returns(Promise.resolve({"foo" : {}}));
// code under test
return oModel.getMetaModel().requestValueListInfo(sPropertyPath).then(function () {
assert.ok(false);
}, function (oError) {
assert.strictEqual(oError.message,
"Annotations 'com.sap.vocabularies.Common.v1.ValueListMapping' with identical "
+ "qualifier 'foo' for property " + sPropertyPath + " in "
+ oModel.sServiceUrl + "$metadata and " + sMappingUrl);
});
});
// *********************************************************************************************
QUnit.test("fetchModule: synchronously", function (assert) {
var vModule = {};
this.mock(sap.ui).expects("require")
.withExactArgs("sap/ui/model/odata/type/Int")
.returns(vModule); // requested module already loaded
// code under test
assert.strictEqual(this.oMetaModel.fetchModule("sap.ui.model.odata.type.Int").getResult(),
vModule);
});
// *********************************************************************************************
QUnit.test("fetchModule, asynchronous", function (assert) {
var vModule = {},
sModuleName = "sap/ui/model/odata/type/Int64",
oSapUiMock = this.mock(sap.ui);
oSapUiMock.expects("require")
.withExactArgs(sModuleName)
.returns(undefined); // requested module not yet loaded
oSapUiMock.expects("require")
.withExactArgs([sModuleName], sinon.match.func)
.callsArgWithAsync(1, vModule);
// code under test
return this.oMetaModel.fetchModule("sap.ui.model.odata.type.Int64")
.then(function (oResult) {
assert.strictEqual(oResult, vModule);
});
});
//*********************************************************************************************
if (TestUtils.isRealOData()) {
//*****************************************************************************************
QUnit.test("getValueListType, requestValueListInfo: realOData", function (assert) {
var sPath = new URI(TestUtils.proxy(sSampleServiceUrl))
.absoluteTo(window.location.pathname).toString(),
oModel = new ODataModel({
serviceUrl : sPath,
synchronizationMode : "None"
}),
oMetaModel = oModel.getMetaModel(),
sPropertyPath = "/ProductList('HT-1000')/Category";
return oMetaModel.requestObject("/ProductList/").then(function () {
assert.strictEqual(oMetaModel.getValueListType(
"/com.sap.gateway.default.zui5_epm_sample.v0002.Contact/Sex"),
ValueListType.Fixed);
assert.strictEqual(oMetaModel.getValueListType(sPropertyPath),
ValueListType.Standard);
return oMetaModel.requestValueListInfo(sPropertyPath).then(function (oResult) {
var oValueListInfo = oResult[""];
assert.strictEqual(oValueListInfo.CollectionPath, "H_EPM_PD_CATS_SH_Set");
});
});
});
//*****************************************************************************************
QUnit.test("requestValueListInfo: same model w/o reference, realOData", function (assert) {
var oModel = new ODataModel({
serviceUrl : TestUtils.proxy(sSampleServiceUrl),
synchronizationMode : "None"
}),
oMetaModel = oModel.getMetaModel(),
sPropertyPath = "/ProductList/0/CurrencyCode",
oValueListMetaModel;
return oMetaModel.requestObject("/ProductList/").then(function () {
// value list in the data service
assert.strictEqual(oMetaModel.getValueListType(sPropertyPath),
ValueListType.Standard);
return oMetaModel.requestValueListInfo(sPropertyPath);
}).then(function (oValueListInfo) {
var sPropertyPath2 = "/H_TCURC_SH_Set/1/WAERS";
// value list in the value list service
oValueListMetaModel = oValueListInfo[""].$model.getMetaModel();
assert.strictEqual(oValueListMetaModel.getValueListType(sPropertyPath2),
ValueListType.Standard);
assert.strictEqual(oValueListInfo[""].CollectionPath, "H_TCURC_SH_Set");
return oValueListMetaModel.requestValueListInfo(sPropertyPath2);
}).then(function (oValueListInfo) {
assert.strictEqual(oValueListInfo[""].$model.getMetaModel(), oValueListMetaModel);
assert.strictEqual(oValueListInfo[""].CollectionPath, "TCURC_CT_Set");
});
});
}
});
//TODO getContext vs. createBindingContext; map of "singletons" vs. memory leak | 35.129601 | 104 | 0.622252 |
737139a15f9b89753de819dea0e09bc2d2c4a47a | 3,932 | js | JavaScript | src/managers/MemberManager.js | Proxxa/Discordish | 590e1e735ef3ac2974d66c3e53705bb24626cd34 | [
"0BSD"
] | 3 | 2021-04-25T04:39:46.000Z | 2021-07-24T23:27:14.000Z | src/managers/MemberManager.js | Proxxaaa/My-Discord-API-Wrapper | 590e1e735ef3ac2974d66c3e53705bb24626cd34 | [
"0BSD"
] | null | null | null | src/managers/MemberManager.js | Proxxaaa/My-Discord-API-Wrapper | 590e1e735ef3ac2974d66c3e53705bb24626cd34 | [
"0BSD"
] | null | null | null | const GuildMember = require('../user/GuildMember')
const fetch = require('node-fetch')
const Manager = require('./Manager')
class MemberManager extends Manager {
/**
* A Manager for managing the members of a guild
* @param {Client} client The client this manager is attached to
* @param {Guild} guild The guild this manager is attached to
* @param {Array<MemberResolvable>} members An array of member resolvables
* @extends Manager
*/
constructor(client, guild, members = []) {
super(client, GuildMember, members)
/**
* The guild whose members this manager manages
* @member {Guild} guild
* @memberof MemberManager
* @instance
* @readonly
*/
Object.defineProperty(this, 'guild', {value:guild})
}
/**
* Searches for a guild member or fetches it from the API.
* @param {any} memberIdentifiable "The ID of a user, or tag of a guild member."
* @param {Boolean} forceApi "Whether or not to skip the cache"
* @returns {Promise<GuildMember>} "The User instance."
*/
fetch(memberIdentifiable, forceApi = false) {
return new Promise((resolve, reject) => {
if (typeof memberIdentifiable === 'number') memberIdentifiable = memberIdentifiable.toString()
if (this.cache.has(memberIdentifiable) && !forceApi) resolve(this.cache.get(memberIdentifiable))
else {
for (const user of this.cache) if (user[1].tag === memberIdentifiable && !forceApi) resolve(user)
fetch('https://discord.com/api/guilds/' + this.guild.id + '/members/' + memberIdentifiable, { method: 'GET', 'headers': { 'Authorization': 'Bot ' + this.client.token } })
.then(res => res.json())
.then(res => {
this.updateCache(res, this.guild)
resolve(this.cache.get(res.id))
}).catch(reject)
}
}
)}
/**
* Lists members of the guild.
* @param {Number} limit The maximum number of members to list, from 1 to 1000.
* @param {Number} after The user ID to start after
* @returns {Promise<Array<GuildMember>>}
*/
listMembers(limit = 1, after = 0) {
return new Promise((resolve, reject) => {
fetch('https://discord.com/api/guilds/' + this.guild.id + '/members?limit=' + limit + '&after=' + after, { method: 'GET', 'headers': { 'Authorization': 'Bot ' + this.client.token } })
.then(res => res.json())
.then(res => {
this.updateCache(res, this.guild)
let toRet = []
for (let memb of res) toRet.push(this.cache.get(memb.id))
resolve(toRet)
}).catch(reject)
})
}
/**
* Search for members of the guild whose names match a query.
* @param {String} query A string to compare usernames and nicknames against
* @param {Number} limit The maximum number of members to search for, from 1 to 1000.
* @returns {Promise<Array<GuildMember>>}
*/
searchMembers(query, limit = 1) {
return new Promise((resolve, reject) => {
fetch('https://discord.com/api/guilds/' + this.guild.id + '/members/search?query=' + encodeURIComponent(query) + '&limit=' + limit, { method: 'GET', 'headers': { 'Authorization': 'Bot ' + this.client.token } })
.then(res => res.json())
.then(res => {
this.updateCache(res, this.guild)
let toRet = []
for (let memb of res) toRet.push(this.cache.get(memb.id))
resolve(toRet)
}).catch(reject)
})
}
}
module.exports = MemberManager
/**
* An object which can be resolved to a guild member
* @typedef {Object} MemberResolvable
*/
| 42.27957 | 222 | 0.567141 |
737254712accab07c49119a853bfaf1cf8fbb1c8 | 137 | js | JavaScript | backend/nodejs/src/managers/index.js | panz3r/web-anime-updater-2 | 738b36c42358181c34aff6d24d92cfd7c602822f | [
"MIT"
] | null | null | null | backend/nodejs/src/managers/index.js | panz3r/web-anime-updater-2 | 738b36c42358181c34aff6d24d92cfd7c602822f | [
"MIT"
] | null | null | null | backend/nodejs/src/managers/index.js | panz3r/web-anime-updater-2 | 738b36c42358181c34aff6d24d92cfd7c602822f | [
"MIT"
] | null | null | null | export { AuthManager } from './auth'
export { SeriesManager } from './seriesManager'
export { EpisodesManager } from './episodesManager'
| 34.25 | 51 | 0.737226 |
7373027adf382a52ba704dedc38083dd55048d72 | 11,087 | js | JavaScript | public/js/Ticket/editarticket.js | Roystreet/finanzasWin | 7b53fb54d62439911863f5f7de32bf1104ad183f | [
"MIT"
] | null | null | null | public/js/Ticket/editarticket.js | Roystreet/finanzasWin | 7b53fb54d62439911863f5f7de32bf1104ad183f | [
"MIT"
] | null | null | null | public/js/Ticket/editarticket.js | Roystreet/finanzasWin | 7b53fb54d62439911863f5f7de32bf1104ad183f | [
"MIT"
] | null | null | null | $('#cont_voucher_pago').hide();
$('#cont_banks').hide();
$('.no').hide();
document.getElementById('codticket').disabled = true;
document.getElementById('cod_product').disabled = true;
document.getElementById('name_product').disabled = true;
document.getElementById('cant').disabled = true;
document.getElementById('price').disabled = true;
document.getElementById('total').disabled = true;
document.getElementById('money').disabled = true;
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } });
function mostrar(){
$("#cont_voucher_pago").show();
}
$(document).ready(function() {
$("#painvertir").select2();
$("#country").select2();
$("#state").select2();
$("#city").select2();
$("#tipago").select2();
$("#idnameproduct").select2();
$("#country").change(function(){
$('#state').html('<option value=""> Seleccione la provincia donde reside ...</option>');
$('#city').html('<option value=""> Seleccione la ciudad donde reside ...</option>');
$.ajax({
url: '/state/'+$(this).val(),
method: 'GET',
success: function(data) {
$('#state').html(data.html);
}
});
});
$("#state").change(function(){
$('#city').html('<option value=""> Seleccione la ciudad donde reside ...</option>');
$.ajax({
url: '/city/'+$(this).val(),
method: 'GET',
success: function(data) {
$('#city').html(data.html);
}
});
});
$("#voucher").change(function(){
var id_ticket=$("#id_ticket").val();
upimg(id_ticket);
});
var tipop = $("#tipago").val();
if(tipop == '6' || tipop =='5'|| tipop =='9'||tipop == '7'){
$(".no").show();
}
if(tipop == '4'||tipop == '1'){
$(".no").show();
$("#cont_banks").show();
}
if(tipop == '3'){
$(".no").show();
$("#cont_voucher_pago").show();
}
$("#tipago").change(function(){
var op = $("#tipago option:selected").text();
if(op == "DEPÓSITO")
{
$('#textCodigoOperacion').html("Número de operación");
$('#cont_voucher_pago').removeAttr("style",'display:none;');
$('.no').removeAttr("style",'display:none;');
$('#cont_banks').removeAttr("style",'display:none;');
$("#numopera").attr("required", "true");
$("#id_banck").attr("required", "true");
$("#voucher").attr("required", "true");
}
else if(op == "POCKET")
{
$('#textCodigoOperacion').html("Número de operación");
$('#cont_voucher_pago').removeAttr("style",'display:none;');
$('#cont_banks').attr("style",'display:none;');
$("#numopera").attr("required", "true");
$("#voucher").attr("required", "true");
$("#id_banck").attr("required", "false");
}
else if(op == "TRANSFERENCIA")
{
$('#cont_banks').removeAttr("style",'display:none;');
$('#cont_voucher_pago').removeAttr("style",'display:none;');
$("#numopera").attr("required", "true");
$("#id_banck").attr("required", "true");
$("#voucher").attr("required", "true");
}
else if(op == "EFECTIVO")
{
$('.no').attr("style",'display:none;');
$('#cont_banks').attr("style",'display:none;');
$('#cont_voucher_pago').attr("style",'display:none;');
$("#numopera").attr("required", "false");
$("#id_banck").attr("required", "false");
$("#voucher").attr("required", "false");
}
else if(op == "CONTADO")
{
$('#cont_banks').attr("style",'display:none;');
$('.no').attr("style",'display:none;');
$('#cont_voucher_pago').attr("style",'display:none;');
$("#numopera").attr("required", "false");
$("#id_banck").attr("required", "false");
$("#voucher").attr("required", "false");
}
else if(op == "BITCOIN"){
$('#cont_banks').attr("style",'display:none;');
$('#textCodigoOperacion').html("Numero de operación");
$('.no').removeAttr("style",'display:none;');
$('#cont_voucher_pago').attr("style",'display:none;');
$("#numopera").attr("required", "true");
$("#id_banck").attr("required", "false");
$("#voucher").attr("required", "false");
}else{
$('#cont_banks').attr("style",'display:none;');
$('#textCodigoOperacion').html("Hash");
$('#tipago').removeAttr("onkeypress");
$('.no').removeAttr("style",'display:none;');
$('#cont_voucher_pago').attr("style",'display:none;');
$("#numopera").attr("required", "true");
$("#id_banck").attr("required", "false");
$("#voucher").attr("required", "false");
}
$('#numopera').val("");
});
$("#formticket").validate({
rules: {
fechapago: { required: true, date:true },
tipago: { required: true },
painvertir: { required: true },
firstname: { required: true },
lastname: { required: true },
phone: { required: true },
email: { required: true, email: true },
country: { required: true },
state: { required: true },
address: { required: true },
id_banck: { required: true },
numopera: { required: true },
voucher: { required: true },
idnameproduct: { required: true },
},
onkeyup :false,
errorPlacement : function(error, element) {
$(element).closest('.form-group').find('.help-block').html(error.html());
},
highlight : function(element) {
$(element).closest('.form-group').removeClass('has-success').addClass('has-error');
},
unhighlight: function(element, errorClass, validClass) {
$(element).closest('.form-group').removeClass('has-error').addClass('has-success');
$(element).closest('.form-group').find('.help-block').html('');
},
submitHandler: function(form) {
alertify.confirm('Registrado', 'Confirma que desea realizar la siguiente actualizacion de ticket?', function(){
form.submit(); },function(){ }).set({labels:{ok:'Guardar', cancel: 'Cancelar'}, padding: false});
}
});
$.extend( $.validator.messages, {
required: "Este campo es obligatorio.",
remote: "Por favor, rellena este campo.",
email: "Por favor, escribe una dirección de correo válida.",
url: "Por favor, escribe una URL válida.",
date: "Por favor, escribe una fecha válida.",
dateISO: "Por favor, escribe una fecha (ISO) válida.",
number: "Por favor, escribe un número válido.",
digits: "Por favor, escribe sólo dígitos.",
creditcard: "Por favor, escribe un número de tarjeta válido.",
equalTo: "Por favor, escribe el mismo valor de nuevo.",
extension: "Por favor, escribe un valor con una extensión aceptada.",
maxlength: $.validator.format( "Por favor, no escribas más de {0} caracteres." ),
minlength: $.validator.format( "Por favor, no escribas menos de {0} caracteres." ),
rangelength: $.validator.format( "Por favor, escribe un valor entre {0} y {1} caracteres." ),
range: $.validator.format( "Por favor, escribe un valor entre {0} y {1}." ),
max: $.validator.format( "Por favor, escribe un valor menor o igual a {0}." ),
min: $.validator.format( "Por favor, escribe un valor mayor o igual a {0}." ),
nifES: "Por favor, escribe un NIF válido.",
nieES: "Por favor, escribe un NIE válido.",
cifES: "Por favor, escribe un CIF válido.",
});
});
function selectproduct(id){
var idp = id;
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } });
$.ajax({
type: "POST",
url: "/ticket/editarTicket/product",
type:"POST",
data:{id : idp},
dataType: "json",
beforeSend: function () {
},
}).done(function(d){
document.getElementById('cod_product').value = d.price.cod_product;
document.getElementById('name_product').value = d.price.name_product;
document.getElementById('cant').value = d.price.cant;
document.getElementById('price').value = d.price.price;
document.getElementById('total').value = d.price.price;
document.getElementById('money').value = d.money == 1 ? 'PEN' : "USD" ;
}).fail(function(){
alert("Error de producto");
});
}
// -------------------------------------------------------------------------------------------------------------------------------------
fichero = document.getElementById("voucher");
function upimg(id_ticket)
{//inicio up img
if($("#voucher").is(':visible'))
{
var respuesta = false;
if (fichero.files.length >= 1){
storageRef = firebase.storage().ref();
var imagenASubir = fichero.files[0];
var uploadTask = storageRef.child('imgVoucher/' + id_ticket).put(imagenASubir);
uploadTask.on(firebase.storage.TaskEvent.STATE_CHANGED,
function(snapshot){
//se va mostrando el progreso de la subida de la imagenASubir
var progress = (snapshot.bytesTransferred / snapshot.totalBytes) * 100;
console.log('Upload is ' + progress + '% done');
}, function(error) {
//gestionar el error si se produce
alert('Exite un error al tratar de subir la imagen');
}, function() {
//cuando se ha subido exitosamente la imagen
pathUrlImg = uploadTask.snapshot.ref.getDownloadURL().then(function(downloadURL) {
var data = {
'id_ticket': id_ticket,
'voucherURL': downloadURL,
'voucherName': imagenASubir.name};
$.ajax({
type: "POST",
url: "/tickets/imgSave",
type:"POST",
data : data,
dataType: "json",
}).done(function(d){
respuesta = true
alert('cargado!!');
}).fail(function(){
alert("No se enlaso la imagen con el ticket");
respuesta = false;
});
});
});
respuesta = true;
}else{
respuesta = false;
}
}
else respuesta = true;
return respuesta;
}//fin de up img
| 38.630662 | 136 | 0.507712 |
737302bf36c60d5637493674535b9c86b37c0004 | 13,834 | js | JavaScript | modules/core/server/controllers/core.helpers.controller.js | bryan-gilbert/esm-search | 1bbdebcb173d161a932d22bb91f4b0ecd556c6ae | [
"Apache-2.0",
"MIT"
] | 1 | 2020-01-29T22:35:42.000Z | 2020-01-29T22:35:42.000Z | modules/core/server/controllers/core.helpers.controller.js | bryan-gilbert/esm-search | 1bbdebcb173d161a932d22bb91f4b0ecd556c6ae | [
"Apache-2.0",
"MIT"
] | 5 | 2018-01-31T17:54:30.000Z | 2021-05-01T18:01:23.000Z | modules/core/server/controllers/core.helpers.controller.js | bryan-gilbert/esm-search | 1bbdebcb173d161a932d22bb91f4b0ecd556c6ae | [
"Apache-2.0",
"MIT"
] | 5 | 2017-05-02T21:42:18.000Z | 2019-07-09T17:01:38.000Z | 'use strict';
var _ = require ('lodash');
/**
* Get unique error field name
*/
var getUniqueErrorMessage = function (err) {
var output;
try {
var fieldName = err.errmsg.substring(err.errmsg.lastIndexOf('.$') + 2, err.errmsg.lastIndexOf('_1'));
output = fieldName.charAt(0).toUpperCase() + fieldName.slice(1) + ' already exists';
} catch (ex) {
output = 'Unique field already exists';
}
return output;
};
/**
* Get the error message from error object
*/
var getErrorMessage = function (err) {
var message = '';
if (err.code) {
switch (err.code) {
case 11000:
case 11001:
message = getUniqueErrorMessage(err);
break;
default:
message = 'Something went wrong';
}
}
else if (err.errors) {
for (var errName in err.errors) {
if (err.errors[errName].message) {
message = err.errors[errName].message;
}
}
}
else if (err.message) {
message = err.message;
}
return message;
};
var sendErrorMessage = function (res, message) {
// console.log (message);
return res.status(400).send ({
message: message
});
};
var sendError = function (res, err) {
sendErrorMessage (res, getErrorMessage (err));
};
var sendNotFound = function (res, message) {
// console.log ('not found:' + message);
return res.status(404).send ({
message: message || 'Not Found'
});
};
var sendData = function (res, model) {
res.json (model);
};
var queryResponse = function (res) {
return function (err, model) {
return err ? sendError (res, err) : sendData (res, model);
};
};
// -------------------------------------------------------------------------
//
// promise type success and fail
//
// -------------------------------------------------------------------------
var success = function (res) {
return function (result) {
res.json (result);
};
};
exports.successFunction = success;
exports.success = success;
var failure = function (res) {
return function (err) {
sendErrorMessage (res, getErrorMessage (err));
};
};
exports.errorFunction = failure;
exports.failure = failure;
exports.runPromise = function (res, p) {
p.then (success(res), failure(res));
};
var getMimeTypeFromFileName = function (filename) {
switch ((/(\.\w*)$/.exec(filename))[1]) {
case '.avi':
break;
default:
return 'application/pdf';
}
};
var streamFile = function (res, file, name, mime) {
var fs = require('fs');
fs.exists (file, function (yes) {
if (!yes) sendNotFound (res);
else {
res.setHeader ('Content-Type', mime);
res.setHeader ("Content-Disposition", 'attachment; filename='+name);
fs.createReadStream (file).pipe (res);
}
});
};
// var uri = url.parse(request.url).pathname;
// var filename = libpath.join(path, uri);
// libpath.exists(filename, function (exists) {
// if (!exists) {
// console.log('404 File Not Found: ' + filename);
// response.writeHead(404, {
// "Content-Type": "text/plain"
// });
// response.write("404 Not Found\n");
// response.end();
// return;
// } else{
// console.log('Starting download: ' + filename);
// var stream = fs.createReadStream(filename, { bufferSize: 64 * 1024 });
// stream.pipe(response);
// }
// });
exports.sendError = sendError;
exports.sendErrorMessage = sendErrorMessage;
exports.sendNotFound = sendNotFound;
exports.sendData = sendData;
exports.queryResponse = queryResponse;
exports.getErrorMessage = getErrorMessage;
exports.streamFile = streamFile;
exports.getMimeTypeFromFileName = getMimeTypeFromFileName;
// exports.fillConfigObject = function (object, query, callback) {
// var mongoose = require ('mongoose');
// var Project = mongoose.model ('Project');
// var Stream = mongoose.model ('Stream');
// var Phase = mongoose.model ('Phase') ;
// var Activity = mongoose.model ('Activity') ;
// var Task = mongoose.model ('Task') ;
// var Milestone = mongoose.model ('Milestone') ;
// var Bucket = mongoose.model ('Bucket') ;
// var Requirement = mongoose.model ('Requirement') ;
// var BucketRequirement = mongoose.model ('BucketRequirement') ;
// object.streams = [];
// object.activities = [];
// object.buckets = [];
// object.milestones = [];
// object.phases = [];
// object.requirements = [];
// object.tasks = [];
// Activity.find (query).populate('tasks').exec ()
// .then (function (result) {
// if (result) object.activities = result || [];
// return Bucket.find (query).exec ();
// })
// .then (function (result) {
// if (result) object.buckets = result || [];
// return Stream.find (query).populate('phases').exec ();
// })
// .then (function (result) {
// if (result) object.streams = result || [];
// return Milestone.find (query).populate('activities').exec ();
// })
// .then (function (result) {
// if (result) object.milestones = result || [];
// return Phase.find (query).populate('milestones').exec ();
// })
// .then (function (result) {
// if (result) object.phases = result || [];
// return Requirement.find (query).exec ();
// })
// .then (function (result) {
// if (result) object.requirements = result || [];
// return Task.find (query).exec ();
// })
// .then (function (result) {
// if (result) object.tasks = result || [];
// return BucketRequirement.find (query).exec ();
// })
// .then (function (result) {
// if (result) object.bucketrequirements = result || [];
// })
// .then (function () {
// callback (null, object);
// return;
// })
// .then (undefined, function (err) {
// callback (err);
// return;
// });
// };
var userRoles = function (user) {
var roles = (user) ? user.roles : [];
roles.push ('public');
return roles;
};
exports.userRoles = userRoles;
var userPermissions = function (thing, userRoles) {
return {
read : ( (_.intersection (userRoles, thing.read)).length > 0),
write : ( (_.intersection (userRoles, thing.write)).length > 0),
submit : ( (_.intersection (userRoles, thing.submit)).length > 0),
watch : ( (_.intersection (userRoles, thing.watch)).length > 0)
};
};
exports.userPermissions = userPermissions;
exports.userCan = function (user, permission, thing) {
var roles = userRoles (user);
if (_.indexOf (roles, 'admin') >= 0) return true;
var permissions = userPermissions (thing, roles);
return (permissions[permission]) ? true : false;
};
// -------------------------------------------------------------------------
//
// checks against acl to see if the path is permitted for the users roles
// the only real roles that matter are admin, user, guest. admin gets all,
// user is set and guest is set. policies may implement special path
// permissions
//
// -------------------------------------------------------------------------
var returnOk = function (ok, res, next) {
return ok ? next () : res.status(403).json ({ message: 'User is not authorized' });
};
exports.isAllowed = function (acl, dbg) {
return function (req, res, next) {
var roles = (req.user) ? req.user.roles : ['guest'];
//
// if the user is an admin just let it through,
//
if (_.indexOf (roles, 'admin') >= 0) return next ();
acl.areAnyRolesAllowed (roles, req.route.path, req.method.toLowerCase(), function (err, isAllowed) {
if (err) {
// An authorization error occurred.
return res.status(500).send('Unexpected authorization error');
} else {
return returnOk (isAllowed, res, next);
// if (isAllowed) {
// // Access granted! Invoke next middleware
// return next();
// } else {
// // console.log ('\n ++ the user was denied '+req.route.path+' '+req.method.toLowerCase()+'\n');
// return res.status(403).json({
// message: 'User is not authorized'
// });
// }
}
});
};
};
exports.isAuthenticated = function (req, res, next) {
return returnOk (!!req.user, res, next);
};
exports.isAdmin = function (req, res, next) {
return returnOk ((!!req.user && _.indexOf (req.user.roles, 'admin')), res, next);
};
exports.isPublic = function (req, res, next) {
return next ();
};
// -------------------------------------------------------------------------
//
// a standard way of setting crud routes.
// basename is the uri token: /api/basename/:basename
// DBClass is the database model as extended from DBModel
// policy is the policy of course
// which denotes which routes to open, if not specified it defaults to all
//
// -------------------------------------------------------------------------
exports.setCRUDRoutes = function (app, basename, DBClass, policy, which) {
var r = {};
which = which || ['getall', 'get', 'post', 'put', 'delete', 'new', 'query'];
which.map (function (p) { r[p]=true; });
//
// middleware to auto-fetch parameter
//
app.param (basename, function (req, res, next, id) {
var o = new DBClass (req.user);
o.findById(id)
.then (function (model) {
if (!model) return sendNotFound (res, DBClass.prototype.name+' not found');
req[DBClass.prototype.name] = model;
next ();
})
.catch (function (err) {
return next (err);
});
});
//
// collection routes
//
if (r.query) app.route ('/api/query/'+basename).all (policy.isAllowed)
.put (function (req, res) {
var o = new DBClass (req.user);
o.list (req.data)
.then (success(res), failure(res));
})
.get(function(req, res) {
var o = new DBClass (req.user);
var q = JSON.parse(JSON.stringify(req.query));
o.list(q)
.then(success(res), failure(res));
});
if (r.getall) app.route ('/api/'+basename).all (policy.isAllowed)
.get (function (req, res) {
var o = new DBClass (req.user);
o.list ({}, "-directoryStructure")
.then (success(res), failure(res));
});
if (r.getall) app.route ('/api/write/'+basename).all (policy.isAllowed)
.get (function (req, res) {
var o = new DBClass (req.user);
o.listwrite ()
.then (success(res), failure(res));
});
if (r.post) app.route ('/api/'+basename).all (policy.isAllowed)
.post (function (req, res) {
var o = new DBClass (req.user);
o.create (req.body)
.then (success(res), failure(res));
});
//
// model routes
//
if (r.get) app.route ('/api/'+basename+'/:'+basename).all (policy.isAllowed)
.get (function (req, res) {
var o = new DBClass (req.user);
o.read(req[DBClass.prototype.name])
.then (success(res), failure(res));
});
if (r.put) app.route ('/api/'+basename+'/:'+basename).all (policy.isAllowed)
.put (function (req, res) {
var o = new DBClass (req.user);
o.update(req[DBClass.prototype.name], req.body)
.then (success(res), failure(res));
});
if (r.delete) app.route ('/api/'+basename+'/:'+basename).all (policy.isAllowed)
.delete (function (req, res) {
var o = new DBClass (req.user);
o.delete(req[DBClass.prototype.name])
.then (success(res), failure(res));
});
if (r.new) app.route ('/api/new/'+basename).all (policy.isAllowed)
.get (function (req, res) {
var o = new DBClass (req.user);
o.new()
.then (success(res), failure(res));
});
};
// -------------------------------------------------------------------------
//
// shorthand to set the default crud permisions. admin, all, user, all, guest
// read only, not new. specific filetering needs to be done on the objects
// themselves, this is only the path
//
// -------------------------------------------------------------------------
exports.setCRUDPermissions = function (acl, base) {
acl.allow ('user', [
'/api/'+base,
'/api/'+base+'/:'+base,
'/api/new/'+base,
'/api/write/'+base,
'/api/query/'+base
],
'*'
);
acl.allow ('guest', [
'/api/'+base,
'/api/'+base+'/:'+base
],
'get'
);
};
// -------------------------------------------------------------------------
//
// set up basic permissions on a set of paths. user gets all and we expect
// special filtering of permissions on specific objects, guest only
// ever gets read only
// list is formatted like so:
// [
// [ guest, user, path ], where guest and user are truthy
// ]
//
// -------------------------------------------------------------------------
exports.setPathPermissions = function (acl, list) {
var userlist = list.map (function (v) { if (v[1]) return v[2]; });
var guestlist = list.map (function (v) { if (v[0]) return v[2]; });
// console.log ('userlist:',userlist);
// console.log ('guestlist:',guestlist);
if (userlist.length) acl.allow ('user', userlist, '*');
if (guestlist.length) acl.allow ('guest', guestlist, 'get');
};
exports.extend = function(protoProps, staticProps) {
var parent = this;
var child;
// The constructor function for the new subclass is either defined by you
// (the "constructor" property in your `extend` definition), or defaulted
// by us to simply call the parent's constructor.
if (protoProps && _.has(protoProps, 'constructor')) {
child = protoProps.constructor;
} else {
child = function(){ return parent.apply(this, arguments); };
}
// Add static properties to the constructor function, if supplied.
_.extend(child, parent, staticProps);
// Set the prototype chain to inherit from `parent`, without calling
// `parent`'s constructor function.
var Surrogate = function(){ this.constructor = child; };
Surrogate.prototype = parent.prototype;
child.prototype = new Surrogate ();
// Add prototype properties (instance properties) to the subclass,
// if supplied.
if (protoProps) _.extend(child.prototype, protoProps);
// Set a convenience property in case the parent's prototype is needed
// later.
child.__super__ = parent.prototype;
return child;
};
exports.emptyPromise = function (t) {return new Promise (function (r, e) { r (t); }); };
// exports.emptyPromise = function (t) {return t;};
| 30.404396 | 103 | 0.593393 |
73751941d9646398ce27c8babc399b32b527fdef | 5,556 | js | JavaScript | src/states/SetKeys.js | bravebunny/curvatron | 4f23ad27ccc9182fbf93f3e85ec837f6c50954db | [
"MIT"
] | 46 | 2015-01-29T20:26:32.000Z | 2021-02-10T12:39:43.000Z | src/states/SetKeys.js | Raicuparta/curvatron | 90d334c9784e816bf40ec01edb0e1c9d1d473aef | [
"MIT"
] | 191 | 2015-03-01T18:04:41.000Z | 2016-02-03T14:40:52.000Z | src/states/SetKeys.js | Raicuparta/curvatron | 90d334c9784e816bf40ec01edb0e1c9d1d473aef | [
"MIT"
] | 13 | 2015-02-03T00:35:01.000Z | 2019-04-14T18:57:46.000Z | /*eslint-disable*/
/* global keys:true, colorHex, clickButton, maxPlayers, w2, h2, localStorage,
ButtonList, colorHexDark, changingKeys:true, Phaser, defaultKeys */
/*eslint-enable*/
var setKeys = function (game) {
this.ui = {}
this.selectedPlayer = 0
this.buttons = null
this.playersButton = null
this.maxPlayers = 7
this.dialogText = null
this.previousState = null
this.gamepadMap = ['A', 'B', 'X', 'Y', 'LB', 'RB', 'LT', 'RT',
'BACK', 'START', 'L3', 'R3', 'UP', 'DOWN', 'LEFT', 'RIGHT']
}
setKeys.prototype = {
init: function (previousState) {
this.previousState = previousState
},
create: function () {
var ui = this.ui
ui.title = this.game.add.text(w2, 100, 'configure keys', {
font: '150px dosis',
fill: '#ffffff',
align: 'center'
})
ui.title.anchor.setTo(0.5, 0.5)
this.buttons = new ButtonList(this, this.game)
this.buttons.add('accept_button', 'confirm', this.backPressed)
this.playersButton = this.buttons.add(null, '< player ' + (this.selectedPlayer + 1) + ' >', this.left, this.right)
this.buttons.add('smallKey_button', 'change', this.change)
this.buttons.add('restart_button', 'reset', this.reset)
this.buttons.create()
ui.keyButton = this.game.add.sprite(w2, h2 + 320, 'key_button')
ui.keyButton.anchor.setTo(0.5, 0.5)
ui.keyText = this.game.add.text(w2, h2 + 290, '', {
font: '150px dosis',
fill: colorHex,
align: 'center'
})
ui.keyText.anchor.setTo(0.5, 0.5)
ui.gpText = this.game.add.text(w2, h2 + 425, 'controller 1', {
font: '40px dosis',
fill: 'white',
align: 'center'
})
ui.gpText.anchor.setTo(0.5, 0.5)
ui.gpText.visible = false
this.updateIcon()
this.overlay = this.add.sprite(0, 0, 'overlay')
this.overlay.width = w2 * 2
this.overlay.height = h2 * 2
this.overlay.alpha = 0.7
this.overlay.visible = false
this.dialogText = this.add.text(w2, h2, '', {
font: '80px dosis',
fill: '#ffffff',
align: 'center'
})
this.dialogText.anchor.setTo(0.5, 0.5)
this.dialogText.visible = false
this.game.input.keyboard.addCallbacks(this, this.onPressed)
this.game.input.gamepad.onUpCallback = this.onPressedGamepad.bind(this)
},
update: function () {
if (!changingKeys) {
this.buttons.update()
}
},
left: function () {
if (this.selectedPlayer === 0) {
this.selectedPlayer = this.maxPlayers
} else {
this.selectedPlayer--
}
this.playersButton.setText('< player ' + (this.selectedPlayer + 1) + ' >')
this.updateIcon()
},
right: function () {
if (this.selectedPlayer === this.maxPlayers) {
this.selectedPlayer = 0
} else {
this.selectedPlayer++
}
this.playersButton.setText('< player ' + (this.selectedPlayer + 1) + ' >')
this.updateIcon()
},
up: function () {
this.buttons.selectUp()
},
down: function () {
this.buttons.selectDown()
},
selectPress: function () {
this.buttons.selectPress()
},
selectRelease: function () {
this.buttons.selectRelease()
},
backPressed: function () {
if (changingKeys) this.hideDialog()
else {
localStorage['keys'] = JSON.stringify(keys)
this.game.state.start(this.previousState)
}
},
onPressed: function () {
if (changingKeys &&
this.game.input.keyboard.lastKey.keyCode >= 48 &&
this.game.input.keyboard.lastKey.keyCode <= 90) {
keys[this.selectedPlayer] = this.game.input.keyboard.lastKey.keyCode + ''
this.setKeyboardIcon()
this.hideDialog()
}
},
onPressedGamepad: function (button, gamepad) {
if (changingKeys && button !== Phaser.Gamepad.XBOX360_START) {
keys[this.selectedPlayer] = (gamepad + 1) + ',' + button
this.setGamepadIcon()
this.hideDialog()
}
},
updateIcon: function () {
if (keys[this.selectedPlayer].indexOf(',') === -1) {
this.setKeyboardIcon()
} else {
this.setGamepadIcon()
}
},
setGamepadIcon: function () {
this.ui.keyButton.loadTexture('gp_button')
var player = keys[this.selectedPlayer].split(',')[0]
var button = keys[this.selectedPlayer].split(',')[1]
var buttonName = this.gamepadMap[button]
this.ui.keyText.setText(buttonName)
this.ui.keyText.scale.set(1 / (buttonName.length))
this.ui.gpText.visible = true
this.ui.gpText.text = 'gamepad ' + player
},
setKeyboardIcon: function () {
this.ui.keyButton.loadTexture('key_button')
this.ui.keyText.setText(String.fromCharCode(keys[this.selectedPlayer]))
this.ui.keyText.scale.set(1)
this.ui.gpText.visible = false
},
change: function () {
this.showDialog('press the desired key for player ' + (this.selectedPlayer + 1))
},
reset: function () {
keys = defaultKeys.slice() // copy array
this.ui.keyText.setText(String.fromCharCode(keys[this.selectedPlayer]))
},
showDialog: function (text) {
this.game.input.mouse.enabled = false
this.dialogText.text = text
this.dialogText.visible = true
this.overlay.visible = true
changingKeys = true
},
hideDialog: function () {
this.game.input.mouse.enabled = true
this.dialogText.visible = false
this.overlay.visible = false
changingKeys = false
}
}
| 28.492308 | 126 | 0.602772 |
7375df36a79ea823ca5d3bd4ccd2b8f955346055 | 91 | js | JavaScript | src/menu/modules/data-module.js | Attzsthl/d2-admin | e389579c0b17be3bc681e4eeb176f25c5ee5c349 | [
"MIT"
] | 7 | 2019-07-31T02:39:38.000Z | 2021-12-13T12:44:11.000Z | src/menu/modules/data-module.js | Attzsthl/d2-admin | e389579c0b17be3bc681e4eeb176f25c5ee5c349 | [
"MIT"
] | 3 | 2020-07-16T23:13:05.000Z | 2021-05-08T14:50:12.000Z | src/menu/modules/data-module.js | Attzsthl/d2-admin | e389579c0b17be3bc681e4eeb176f25c5ee5c349 | [
"MIT"
] | 5 | 2020-02-19T02:05:51.000Z | 2021-12-30T10:51:56.000Z | export default {
path: '/data/module/index',
title: '数据中心',
icon: 'el-icon-s-data'
}
| 15.166667 | 29 | 0.615385 |
7376216ae10056e408dcdffe193e371a16ba3631 | 1,138 | js | JavaScript | test/mjsunit/baseline/verify-bytecode-offsets.js | EXHades/v8 | 5fe0aa3bc79c0a9d3ad546b79211f07105f09585 | [
"BSD-3-Clause"
] | 20,995 | 2015-01-01T05:12:40.000Z | 2022-03-31T21:39:18.000Z | test/mjsunit/baseline/verify-bytecode-offsets.js | Andrea-MariaDB-2/v8 | a0f0ebd7a876e8cb2210115adbfcffe900e99540 | [
"BSD-3-Clause"
] | 333 | 2020-07-15T17:06:05.000Z | 2021-03-15T12:13:09.000Z | test/mjsunit/baseline/verify-bytecode-offsets.js | Andrea-MariaDB-2/v8 | a0f0ebd7a876e8cb2210115adbfcffe900e99540 | [
"BSD-3-Clause"
] | 4,523 | 2015-01-01T15:12:34.000Z | 2022-03-28T06:23:41.000Z | // Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --always-sparkplug --allow-natives-syntax
// This test mainly exists to make ClusterFuzz aware of
// d8.test.verifySourcePositions.
globalValue = false;
function foo(param1, ...param2) {
try {
for (let key in param1) { param2.push(key); }
for (let a of param1) { param2.push(a); }
let [a, b] = param2;
let copy = [{literal:1}, {}, [], [1], 1, ...param2];
return a + b + copy.length;
} catch (e) {
return e.toString().match(/[a-zA-Z]+/g);
} finally {
globalValue = new String(23);
}
return Math.min(Math.random(), 0.5);
}
var obj = [...Array(10).keys()];
obj.foo = 'bar';
foo(obj, obj);
d8.test.verifySourcePositions(foo);
// Make sure invalid calls throw.
assertThrows(() => {d8.test.verifySourcePositions(0)});
assertThrows(() => {d8.test.verifySourcePositions(obj)});
assertThrows(() => {d8.test.verifySourcePositions(new Proxy(foo, {}))});
assertThrows(() => {d8.test.verifySourcePositions(%GetUndetectable())});
| 29.947368 | 73 | 0.655536 |
73769d7a86513b20f0bd119ce5eb5ad02dfcc3f6 | 2,195 | js | JavaScript | lib/pseudoTrans.js | cmjonescm/angular-translate-pseudo | ec750c5dfe2bfadf0a42bffc12bb98f60f48b4a3 | [
"MIT"
] | 2 | 2015-09-11T19:23:30.000Z | 2020-09-01T16:07:53.000Z | lib/pseudoTrans.js | cmjonescm/angular-translate-pseudo | ec750c5dfe2bfadf0a42bffc12bb98f60f48b4a3 | [
"MIT"
] | null | null | null | lib/pseudoTrans.js | cmjonescm/angular-translate-pseudo | ec750c5dfe2bfadf0a42bffc12bb98f60f48b4a3 | [
"MIT"
] | null | null | null |
var transTable =
{
"a":"á",
"e":"é",
"i":"í",
"o":"ó",
"u":"ú"
};
var dbltransTable =
{
"a":"áá",
"e":"éé",
"i":"íí",
"o":"óó",
"u":"úú"
};
var regxTable =
{
"a":/a/gi,
"e":/e/gi,
"i":/i/gi,
"o":/o/gi,
"u":/u/gi
};
var preTrans = '_';
var postTrans = '_';
var doubleUp = true;
var prePostUnderScore = true;
var spaceDots = true;
var spaceDotsCount = 2;
/**
* Perform the pseudo translation
* @param translation{object}
* @returns {object}
* @constructor
*/
exports.trans = function (translation) {
var table = translation.table;
var dotString = GetSpaceDots();
for (var key in table) {
var val = table[key];
// 1) Firstly replace all the vowels in your application or file with accented versions..
// So you replace the following: a=á e=é i=í o=ó u=ú or other similar combination depending on your language.
// 2) In some cases you might double the characters to test string expansion. So "Hello" would become "Hééllóó".
for (var transKey in transTable) {
if (doubleUp) {
val = val.replace(regxTable[transKey], dbltransTable[transKey]);
}
else
{
val = val.replace(regxTable[transKey], transTable[transKey]);
}
}
if (spaceDots) {
val = val.replace(/ /gi, dotString);
}
// 3) Add fixed pre- and post-delimiters (_)
if (prePostUnderScore) {
val = preTrans + val + postTrans;
}
table[key] = val;
}
translation.language = 'en-pseudo';
return translation;
};
exports.doubleUp = function(flag) {
doubleUp = flag;
};
exports.prePostUnderScore = function(flag) {
prePostUnderScore = flag;
};
exports.spaceDots = function(flag, count) {
spaceDots = flag;
spaceDotsCount = count;
};
/**
* Return the number of decimal points to replace for each space character.
* @returns {string}
* @constructor
*/
GetSpaceDots = function() {
var dotsString = "";
for (var i = 0; i < spaceDotsCount; i++) {
dotsString += '.';
}
return dotsString;
};
| 19.424779 | 120 | 0.561276 |
7376b0dcf0503cf5f62e89a9033747ab16f4df23 | 20,434 | js | JavaScript | files/wavesurfer.js/1.0.20/wavesurfer.min.js | adamwardecki/jsdelivr | 2c6615f1f82385b222a813bbd604f6938f800d23 | [
"MIT"
] | 1 | 2015-11-13T14:34:21.000Z | 2015-11-13T14:34:21.000Z | files/wavesurfer.js/1.0.20/wavesurfer.min.js | adamwardecki/jsdelivr | 2c6615f1f82385b222a813bbd604f6938f800d23 | [
"MIT"
] | null | null | null | files/wavesurfer.js/1.0.20/wavesurfer.min.js | adamwardecki/jsdelivr | 2c6615f1f82385b222a813bbd604f6938f800d23 | [
"MIT"
] | 1 | 2020-02-12T14:23:16.000Z | 2020-02-12T14:23:16.000Z | /* wavesurfer.js v 1.0.20 @license CC-BY 3.0 */
"use strict";var WaveSurfer={defaultParams:{height:128,waveColor:"#999",progressColor:"#555",cursorColor:"#333",cursorWidth:1,skipLength:2,minPxPerSec:20,pixelRatio:window.devicePixelRatio,fillParent:!0,scrollParent:!1,hideScrollbar:!1,audioContext:null,container:null,dragSelection:!0,loopSelection:!0,audioRate:1,interact:!0,splitChannels:!1,renderer:"Canvas",backend:"WebAudio",mediaType:"audio"},init:function(e){if(this.params=WaveSurfer.util.extend({},this.defaultParams,e),this.container="string"==typeof e.container?document.querySelector(this.params.container):this.params.container,!this.container)throw new Error("Container element not found");if(this.mediaContainer="undefined"==typeof this.params.mediaContainer?this.container:"string"==typeof this.params.mediaContainer?document.querySelector(this.params.mediaContainer):this.params.mediaContainer,!this.mediaContainer)throw new Error("Media Container element not found");this.savedVolume=0,this.isMuted=!1,this.createDrawer(),this.createBackend()},createDrawer:function(){var e=this;this.drawer=Object.create(WaveSurfer.Drawer[this.params.renderer]),this.drawer.init(this.container,this.params),this.drawer.on("redraw",function(){e.drawBuffer(),e.drawer.progress(e.backend.getPlayedPercents())}),this.drawer.on("click",function(t,i){setTimeout(function(){e.seekTo(i)},0)}),this.drawer.on("scroll",function(t){e.fireEvent("scroll",t)})},createBackend:function(){var e=this;this.backend&&this.backend.destroy(),"AudioElement"==this.params.backend&&(this.params.backend="MediaElement"),"WebAudio"!=this.params.backend||WaveSurfer.WebAudio.supportsWebAudio()||(this.params.backend="MediaElement"),this.backend=Object.create(WaveSurfer[this.params.backend]),this.backend.init(this.params),this.backend.on("finish",function(){e.fireEvent("finish")}),this.backend.on("audioprocess",function(t){e.fireEvent("audioprocess",t)})},restartAnimationLoop:function(){var e=this,t=window.requestAnimationFrame||window.webkitRequestAnimationFrame,i=function(){e.backend.isPaused()||(e.drawer.progress(e.backend.getPlayedPercents()),t(i))};i()},getDuration:function(){return this.backend.getDuration()},getCurrentTime:function(){return this.backend.getCurrentTime()},play:function(e,t){this.backend.play(e,t),this.restartAnimationLoop(),this.fireEvent("play")},pause:function(){this.backend.pause(),this.fireEvent("pause")},playPause:function(){this.backend.isPaused()?this.play():this.pause()},skipBackward:function(e){this.skip(-e||-this.params.skipLength)},skipForward:function(e){this.skip(e||this.params.skipLength)},skip:function(e){var t=this.getCurrentTime()||0,i=this.getDuration()||1;t=Math.max(0,Math.min(i,t+(e||0))),this.seekAndCenter(t/i)},seekAndCenter:function(e){this.seekTo(e),this.drawer.recenter(e)},seekTo:function(e){var t=this.backend.isPaused(),i=this.params.scrollParent;t&&(this.params.scrollParent=!1),this.backend.seekTo(e*this.getDuration()),this.drawer.progress(this.backend.getPlayedPercents()),t||(this.backend.pause(),this.backend.play()),this.params.scrollParent=i,this.fireEvent("seek",e)},stop:function(){this.pause(),this.seekTo(0),this.drawer.progress(0)},setVolume:function(e){this.backend.setVolume(e)},setPlaybackRate:function(e){this.backend.setPlaybackRate(e)},toggleMute:function(){this.isMuted?(this.backend.setVolume(this.savedVolume),this.isMuted=!1):(this.savedVolume=this.backend.getVolume(),this.backend.setVolume(0),this.isMuted=!0)},toggleScroll:function(){this.params.scrollParent=!this.params.scrollParent,this.drawBuffer()},toggleInteraction:function(){this.params.interact=!this.params.interact},drawBuffer:function(){var e=Math.round(this.getDuration()*this.params.minPxPerSec*this.params.pixelRatio),t=this.drawer.getWidth(),i=e;this.params.fillParent&&(!this.params.scrollParent||t>e)&&(i=t);var r=this.backend.getPeaks(i);this.drawer.drawPeaks(r,i),this.fireEvent("redraw",r,i)},loadArrayBuffer:function(e){var t=this;this.backend.decodeArrayBuffer(e,function(e){t.loadDecodedBuffer(e)},function(){t.fireEvent("error","Error decoding audiobuffer")})},loadDecodedBuffer:function(e){this.empty(),this.backend.load(e),this.drawBuffer(),this.fireEvent("ready")},loadBlob:function(e){var t=this,i=new FileReader;i.addEventListener("progress",function(e){t.onProgress(e)}),i.addEventListener("load",function(e){t.empty(),t.loadArrayBuffer(e.target.result)}),i.addEventListener("error",function(){t.fireEvent("error","Error reading file")}),i.readAsArrayBuffer(e)},load:function(e,t){switch(this.params.backend){case"WebAudio":return this.loadBuffer(e);case"MediaElement":return this.loadMediaElement(e,t)}},loadBuffer:function(e){return this.empty(),this.downloadArrayBuffer(e,this.loadArrayBuffer.bind(this))},loadMediaElement:function(e,t){this.empty(),this.backend.load(e,this.mediaContainer,t),this.backend.once("canplay",function(){this.drawBuffer(),this.fireEvent("ready")}.bind(this)),this.backend.once("error",function(e){this.fireEvent("error",e)}.bind(this)),!t&&this.backend.supportsWebAudio()&&this.downloadArrayBuffer(e,function(e){this.backend.decodeArrayBuffer(e,function(e){this.backend.buffer=e,this.drawBuffer()}.bind(this))}.bind(this))},downloadArrayBuffer:function(e,t){var i=this,r=WaveSurfer.util.ajax({url:e,responseType:"arraybuffer"});return r.on("progress",function(e){i.onProgress(e)}),r.on("success",t),r.on("error",function(e){i.fireEvent("error","XHR error: "+e.target.statusText)}),r},onProgress:function(e){if(e.lengthComputable)var t=e.loaded/e.total;else t=e.loaded/(e.loaded+1e6);this.fireEvent("loading",Math.round(100*t),e.target)},exportPCM:function(e,t,i){e=e||1024,t=t||1e4,i=i||!1;var r=this.backend.getPeaks(e,t),s=[].map.call(r,function(e){return Math.round(e*t)/t}),a=JSON.stringify(s);return i||window.open("data:application/json;charset=utf-8,"+encodeURIComponent(a)),a},empty:function(){this.backend.isPaused()||(this.stop(),this.backend.disconnectSource()),this.drawer.progress(0),this.drawer.setWidth(0),this.drawer.drawPeaks({length:this.drawer.getWidth()},0)},destroy:function(){this.fireEvent("destroy"),this.unAll(),this.backend.destroy(),this.drawer.destroy()}};WaveSurfer.create=function(e){var t=Object.create(WaveSurfer);return t.init(e),t},WaveSurfer.util={extend:function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach(function(t){Object.keys(t).forEach(function(i){e[i]=t[i]})}),e},getId:function(){return"wavesurfer_"+Math.random().toString(32).substring(2)},ajax:function(e){var t=Object.create(WaveSurfer.Observer),i=new XMLHttpRequest,r=!1;return i.open(e.method||"GET",e.url,!0),i.responseType=e.responseType||"json",i.addEventListener("progress",function(e){t.fireEvent("progress",e),e.lengthComputable&&e.loaded==e.total&&(r=!0)}),i.addEventListener("load",function(e){r||t.fireEvent("progress",e),t.fireEvent("load",e),200==i.status||206==i.status?t.fireEvent("success",i.response,e):t.fireEvent("error",e)}),i.addEventListener("error",function(e){t.fireEvent("error",e)}),i.send(),t.xhr=i,t}},WaveSurfer.Observer={on:function(e,t){this.handlers||(this.handlers={});var i=this.handlers[e];i||(i=this.handlers[e]=[]),i.push(t)},un:function(e,t){if(this.handlers){var i=this.handlers[e];if(i)if(t)for(var r=i.length-1;r>=0;r--)i[r]==t&&i.splice(r,1);else i.length=0}},unAll:function(){this.handlers=null},once:function(e,t){var i=this,r=function(){t.apply(this,arguments),setTimeout(function(){i.un(e,r)},0)};this.on(e,r)},fireEvent:function(e){if(this.handlers){var t=this.handlers[e],i=Array.prototype.slice.call(arguments,1);t&&t.forEach(function(e){e.apply(null,i)})}}},WaveSurfer.util.extend(WaveSurfer,WaveSurfer.Observer),WaveSurfer.WebAudio={scriptBufferSize:256,fftSize:128,PLAYING_STATE:0,PAUSED_STATE:1,FINISHED_STATE:2,supportsWebAudio:function(){return!(!window.AudioContext&&!window.webkitAudioContext)},getAudioContext:function(){return WaveSurfer.WebAudio.audioContext||(WaveSurfer.WebAudio.audioContext=new(window.AudioContext||window.webkitAudioContext)),WaveSurfer.WebAudio.audioContext},getOfflineAudioContext:function(e){return WaveSurfer.WebAudio.offlineAudioContext||(WaveSurfer.WebAudio.offlineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,e)),WaveSurfer.WebAudio.offlineAudioContext},init:function(e){this.params=e,this.ac=e.audioContext||this.getAudioContext(),this.lastPlay=this.ac.currentTime,this.startPosition=0,this.scheduledPause=null,this.states=[Object.create(WaveSurfer.WebAudio.state.playing),Object.create(WaveSurfer.WebAudio.state.paused),Object.create(WaveSurfer.WebAudio.state.finished)],this.setState(this.PAUSED_STATE),this.createVolumeNode(),this.createScriptNode(),this.createAnalyserNode(),this.setPlaybackRate(this.params.audioRate)},disconnectFilters:function(){this.filters&&(this.filters.forEach(function(e){e&&e.disconnect()}),this.filters=null)},setState:function(e){this.state!==this.states[e]&&(this.state=this.states[e],this.state.init.call(this))},setFilter:function(){this.setFilters([].slice.call(arguments))},setFilters:function(e){this.disconnectFilters(),e&&e.length?(this.filters=e,e.reduce(function(e,t){return e.connect(t),t},this.analyser).connect(this.gainNode)):this.analyser.connect(this.gainNode)},createScriptNode:function(){var e=this,t=this.scriptBufferSize;this.scriptNode=this.ac.createScriptProcessor?this.ac.createScriptProcessor(t):this.ac.createJavaScriptNode(t),this.scriptNode.connect(this.ac.destination),this.scriptNode.onaudioprocess=function(){var t=e.getCurrentTime();e.buffer&&t>e.getDuration()?e.setState(e.FINISHED_STATE):e.buffer&&t>=e.scheduledPause?e.setState(e.PAUSED_STATE):e.state===e.states[e.PLAYING_STATE]&&e.fireEvent("audioprocess",t)}},createAnalyserNode:function(){this.analyser=this.ac.createAnalyser(),this.analyser.fftSize=this.fftSize,this.analyserData=new Uint8Array(this.analyser.frequencyBinCount),this.analyser.connect(this.gainNode)},createVolumeNode:function(){this.gainNode=this.ac.createGain?this.ac.createGain():this.ac.createGainNode(),this.gainNode.connect(this.ac.destination)},setVolume:function(e){this.gainNode.gain.value=e},getVolume:function(){return this.gainNode.gain.value},decodeArrayBuffer:function(e,t,i){this.offlineAc||(this.offlineAc=this.getOfflineAudioContext(this.ac?this.ac.sampleRate:44100)),this.offlineAc.decodeAudioData(e,function(e){t(e)}.bind(this),i)},getPeaks:function(e){for(var t=this.buffer.length/e,i=~~(t/10)||1,r=this.buffer.numberOfChannels,s=[],a=[],n=0;r>n;n++)for(var o=s[n]=[],h=this.buffer.getChannelData(n),u=0;e>u;u++){for(var c=~~(u*t),d=~~(c+t),l=0,f=c;d>f;f+=i){var p=h[f];p>l?l=p:-p>l&&(l=-p)}o[u]=l,(0==n||l>a[u])&&(a[u]=l)}return this.params.splitChannels?s:a},getPlayedPercents:function(){return this.state.getPlayedPercents.call(this)},disconnectSource:function(){this.source&&this.source.disconnect()},waveform:function(){return this.analyser.getByteTimeDomainData(this.analyserData),this.analyserData},destroy:function(){this.isPaused()||this.pause(),this.unAll(),this.buffer=null,this.disconnectFilters(),this.disconnectSource(),this.gainNode.disconnect(),this.scriptNode.disconnect(),this.analyser.disconnect()},load:function(e){this.startPosition=0,this.lastPlay=this.ac.currentTime,this.buffer=e,this.createSource()},createSource:function(){this.disconnectSource(),this.source=this.ac.createBufferSource(),this.source.start=this.source.start||this.source.noteGrainOn,this.source.stop=this.source.stop||this.source.noteOff,this.source.playbackRate.value=this.playbackRate,this.source.buffer=this.buffer,this.source.connect(this.analyser)},isPaused:function(){return this.state!==this.states[this.PLAYING_STATE]},getDuration:function(){return this.buffer?this.buffer.duration:0},seekTo:function(e,t){return this.scheduledPause=null,null==e&&(e=this.getCurrentTime(),e>=this.getDuration()&&(e=0)),null==t&&(t=this.getDuration()),this.startPosition=e,this.lastPlay=this.ac.currentTime,this.state===this.states[this.FINISHED_STATE]&&this.setState(this.PAUSED_STATE),{start:e,end:t}},getPlayedTime:function(){return(this.ac.currentTime-this.lastPlay)*this.playbackRate},play:function(e,t){this.createSource();var i=this.seekTo(e,t);e=i.start,t=i.end,this.scheduledPause=t,this.source.start(0,e,t-e),this.setState(this.PLAYING_STATE)},pause:function(){this.scheduledPause=null,this.startPosition+=this.getPlayedTime(),this.source&&this.source.stop(0),this.setState(this.PAUSED_STATE)},getCurrentTime:function(){return this.state.getCurrentTime.call(this)},setPlaybackRate:function(e){e=e||1,this.isPaused()?this.playbackRate=e:(this.pause(),this.playbackRate=e,this.play())}},WaveSurfer.WebAudio.state={},WaveSurfer.WebAudio.state.playing={init:function(){},getPlayedPercents:function(){var e=this.getDuration();return this.getCurrentTime()/e||0},getCurrentTime:function(){return this.startPosition+this.getPlayedTime()}},WaveSurfer.WebAudio.state.paused={init:function(){},getPlayedPercents:function(){var e=this.getDuration();return this.getCurrentTime()/e||0},getCurrentTime:function(){return this.startPosition}},WaveSurfer.WebAudio.state.finished={init:function(){this.fireEvent("finish")},getPlayedPercents:function(){return 1},getCurrentTime:function(){return this.getDuration()}},WaveSurfer.util.extend(WaveSurfer.WebAudio,WaveSurfer.Observer),WaveSurfer.MediaElement=Object.create(WaveSurfer.WebAudio),WaveSurfer.util.extend(WaveSurfer.MediaElement,{init:function(e){this.params=e,this.media={currentTime:0,duration:0,paused:!0,playbackRate:1,play:function(){},pause:function(){}},this.mediaType=e.mediaType.toLowerCase(),this.elementPosition=e.elementPosition},load:function(e,t,i){var r=this,s=document.createElement(this.mediaType);s.controls=!1,s.autoplay=!1,s.preload="auto",s.src=e,s.addEventListener("error",function(){r.fireEvent("error","Error loading media element")}),s.addEventListener("canplay",function(){r.fireEvent("canplay")}),s.addEventListener("ended",function(){r.fireEvent("finish")}),s.addEventListener("timeupdate",function(){r.fireEvent("audioprocess",r.getCurrentTime())});var a=t.querySelector(this.mediaType);a&&t.removeChild(a),t.appendChild(s),this.media=s,this.peaks=i,this.onPlayEnd=null,this.setPlaybackRate(this.playbackRate)},isPaused:function(){return this.media.paused},getDuration:function(){var e=this.media.duration;return e>=1/0&&(e=this.media.seekable.end()),e},getCurrentTime:function(){return this.media.currentTime},getPlayedPercents:function(){return this.getCurrentTime()/this.getDuration()||0},setPlaybackRate:function(e){this.playbackRate=e||1,this.media.playbackRate=this.playbackRate},seekTo:function(e){null!=e&&(this.media.currentTime=e),this.clearPlayEnd()},play:function(e,t){this.seekTo(e),this.media.play(),t&&this.setPlayEnd(t)},pause:function(){this.media.pause(),this.clearPlayEnd()},setPlayEnd:function(e){var t=this;this.onPlayEnd=function(i){i>=e&&(t.pause(),t.seekTo(e))},this.on("audioprocess",this.onPlayEnd)},clearPlayEnd:function(){this.onPlayEnd&&(this.un("audioprocess",this.onPlayEnd),this.onPlayEnd=null)},getPeaks:function(e){return this.buffer?WaveSurfer.WebAudio.getPeaks.call(this,e):this.peaks||[]},getVolume:function(){return this.media.volume},setVolume:function(e){this.media.volume=e},destroy:function(){this.pause(),this.unAll(),this.media.parentNode&&this.media.parentNode.removeChild(this.media),this.media=null}}),WaveSurfer.AudioElement=WaveSurfer.MediaElement,WaveSurfer.Drawer={init:function(e,t){this.container=e,this.params=t,this.width=0,this.height=t.height*this.params.pixelRatio,this.lastPos=0,this.createWrapper(),this.createElements()},createWrapper:function(){this.wrapper=this.container.appendChild(document.createElement("wave")),this.style(this.wrapper,{display:"block",position:"relative",userSelect:"none",webkitUserSelect:"none",height:this.params.height+"px"}),(this.params.fillParent||this.params.scrollParent)&&this.style(this.wrapper,{width:"100%",overflowX:this.params.hideScrollbar?"hidden":"auto",overflowY:"hidden"}),this.setupWrapperEvents()},handleEvent:function(e){e.preventDefault();var t=this.wrapper.getBoundingClientRect();return(e.clientX-t.left+this.wrapper.scrollLeft)/this.wrapper.scrollWidth||0},setupWrapperEvents:function(){var e=this;this.wrapper.addEventListener("click",function(t){var i=e.wrapper.offsetHeight-e.wrapper.clientHeight;if(0!=i){var r=e.wrapper.getBoundingClientRect();if(t.clientY>=r.bottom-i)return}e.params.interact&&e.fireEvent("click",t,e.handleEvent(t))}),this.wrapper.addEventListener("scroll",function(t){e.fireEvent("scroll",t)})},drawPeaks:function(e,t){this.resetScroll(),this.setWidth(t),this.drawWave(e)},style:function(e,t){return Object.keys(t).forEach(function(i){e.style[i]!=t[i]&&(e.style[i]=t[i])}),e},resetScroll:function(){null!==this.wrapper&&(this.wrapper.scrollLeft=0)},recenter:function(e){var t=this.wrapper.scrollWidth*e;this.recenterOnPosition(t,!0)},recenterOnPosition:function(e,t){var i=this.wrapper.scrollLeft,r=~~(this.wrapper.clientWidth/2),s=e-r,a=s-i,n=this.wrapper.scrollWidth-this.wrapper.clientWidth;if(0!=n){if(!t&&a>=-r&&r>a){var o=5;a=Math.max(-o,Math.min(o,a)),s=i+a}s=Math.max(0,Math.min(n,s)),s!=i&&(this.wrapper.scrollLeft=s)}},getWidth:function(){return Math.round(this.container.clientWidth*this.params.pixelRatio)},setWidth:function(e){e!=this.width&&(this.width=e,this.params.fillParent||this.params.scrollParent?this.style(this.wrapper,{width:""}):this.style(this.wrapper,{width:~~(this.width/this.params.pixelRatio)+"px"}),this.updateSize())},setHeight:function(e){e!=this.height&&(this.height=e,this.style(this.wrapper,{height:~~(this.height/this.params.pixelRatio)+"px"}),this.updateSize())},progress:function(e){var t=1/this.params.pixelRatio,i=Math.round(e*this.width)*t;if(i<this.lastPos||i-this.lastPos>=t){if(this.lastPos=i,this.params.scrollParent){var r=~~(this.wrapper.scrollWidth*e);this.recenterOnPosition(r)}this.updateProgress(e)}},destroy:function(){this.unAll(),this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=null)},createElements:function(){},updateSize:function(){},drawWave:function(){},clearWave:function(){},updateProgress:function(){}},WaveSurfer.util.extend(WaveSurfer.Drawer,WaveSurfer.Observer),WaveSurfer.Drawer.Canvas=Object.create(WaveSurfer.Drawer),WaveSurfer.util.extend(WaveSurfer.Drawer.Canvas,{createElements:function(){var e=this.wrapper.appendChild(this.style(document.createElement("canvas"),{position:"absolute",height:"100%",zIndex:1}));if(this.waveCc=e.getContext("2d"),this.progressWave=this.wrapper.appendChild(this.style(document.createElement("wave"),{position:"absolute",zIndex:2,overflow:"hidden",width:"0",height:"100%",boxSizing:"border-box",borderRightStyle:"solid",borderRightWidth:this.params.cursorWidth+"px",borderRightColor:this.params.cursorColor})),this.params.waveColor!=this.params.progressColor){var t=this.progressWave.appendChild(document.createElement("canvas"));this.progressCc=t.getContext("2d")}},updateSize:function(){var e=Math.round(this.width/this.params.pixelRatio);this.waveCc.canvas.width=this.width,this.waveCc.canvas.height=this.height,this.style(this.waveCc.canvas,{width:e+"px"}),this.progressCc&&(this.progressCc.canvas.width=this.width,this.progressCc.canvas.height=this.height,this.style(this.progressCc.canvas,{width:e+"px"})),this.clearWave()},clearWave:function(){this.waveCc.clearRect(0,0,this.width,this.height),this.progressCc&&this.progressCc.clearRect(0,0,this.width,this.height)},drawWave:function(e,t){if(e[0]instanceof Array){var i=e;if(this.params.splitChannels)return this.setHeight(i.length*this.params.height*this.params.pixelRatio),void i.forEach(this.drawWave,this);e=i[0]}var r=.5/this.params.pixelRatio,s=this.params.height*this.params.pixelRatio,a=s*t||0,n=s/2,o=e.length,h=1;this.params.fillParent&&this.width!=o&&(h=this.width/o),this.waveCc.fillStyle=this.params.waveColor,this.progressCc&&(this.progressCc.fillStyle=this.params.progressColor),[this.waveCc,this.progressCc].forEach(function(t){if(t){t.beginPath(),t.moveTo(r,n+a);for(var i=0;o>i;i++){var s=Math.round(e[i]*n);t.lineTo(i*h+r,n+s+a)}t.lineTo(this.width+r,n+a),t.moveTo(r,n+a);for(var i=0;o>i;i++){var s=Math.round(e[i]*n);t.lineTo(i*h+r,n-s+a)}t.lineTo(this.width+r,n+a),t.closePath(),t.fill(),t.fillRect(0,n+a-r,this.width,r)}},this)},updateProgress:function(e){var t=Math.round(this.width*e)/this.params.pixelRatio;this.style(this.progressWave,{width:t+"px"})}});
//# sourceMappingURL=wavesurfer-js-map.json | 6,811.333333 | 20,342 | 0.780317 |
7376bbfd09745345a98ddf7df2fdcc7f2fb4561d | 267 | js | JavaScript | 42.setInterval_2.js | schtiell/JavascriptCurso21 | 5e176d91949df24544ce01fe3a58ae7bc78799bd | [
"MIT"
] | null | null | null | 42.setInterval_2.js | schtiell/JavascriptCurso21 | 5e176d91949df24544ce01fe3a58ae7bc78799bd | [
"MIT"
] | null | null | null | 42.setInterval_2.js | schtiell/JavascriptCurso21 | 5e176d91949df24544ce01fe3a58ae7bc78799bd | [
"MIT"
] | null | null | null | let reloj = setInterval(timer,1000);
function timer(){
let d = new Date();
let t = d.toLocaleTimeString();
document.getElementById('clock').innerHTML = t;
}
function stopClockNow (){
clearInterval(reloj);
console.info('Reloj detenido');
}
| 19.071429 | 51 | 0.651685 |
737721377558c04b2f1804bf610a084423b35385 | 4,095 | js | JavaScript | js/custom.js | saksham1991999/YogGuru-Toycathon-2020 | 8aeca657ad69b7ec6268ed7ef3f2cc1c6fe5a66b | [
"MIT"
] | null | null | null | js/custom.js | saksham1991999/YogGuru-Toycathon-2020 | 8aeca657ad69b7ec6268ed7ef3f2cc1c6fe5a66b | [
"MIT"
] | null | null | null | js/custom.js | saksham1991999/YogGuru-Toycathon-2020 | 8aeca657ad69b7ec6268ed7ef3f2cc1c6fe5a66b | [
"MIT"
] | 1 | 2021-02-10T19:04:16.000Z | 2021-02-10T19:04:16.000Z | $(function () {
"use strict";
$('body').scrollspy({
target: '#bs-example-navbar-collapse-1'
});
// for navbar background color when scrolling
$(window).scroll(function () {
var $scrolling = $(this).scrollTop();
var bc2top = $("#back-top-btn");
var stickytop = $(".nav_area");
if ($scrolling >= 10) {
stickytop.addClass('navcss');
} else {
stickytop.removeClass('navcss');
}
if ($scrolling > 150) {
bc2top.fadeIn(2000);
} else {
bc2top.fadeOut(2000);
}
});
// this is for back to top js
var bc2top = $('#back-top-btn');
bc2top.on('click', function () {
html_body.animate({
scrollTop: 0
}, 1500);
});
//==================Preloader Start==================
$(".loading").delay(3000).fadeOut(1000);
//==================Preloader End==================
//==================Sticky Menu Start==================
$(window).on("scroll", function () {
var scrolling = $(this).scrollTop();
if (scrolling >= 250) {
$(".navbar").addClass("sticky");
} else {
$(".navbar").removeClass("sticky");
}
});
//==================Sticky Menu Part End==================
// ================== Testimonials JS Slick ==================
$('.testimonial-slick').slick({
infinite: true,
slidesToShow: 2,
slidesToScroll: 1,
autoplay: true,
arrows: true,
prevArrow: '<i class="fas fa-long-arrow-alt-left slidprev"></i>',
nextArrow: '<i class="fas fa-long-arrow-alt-right slidNext"></i>',
dots: false,
autoplaySpeed: 3000,
responsive: [
{
breakpoint: 791,
settings: {
arrows: false,
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
// ================== Why choose us JS Slick ==================
$('.choose-slick').slick({
infinite: true,
slidesToShow: 3,
slidesToScroll: 1,
autoplay: false,
arrows: false,
dots: false,
autoplaySpeed: 3500,
responsive: [
{
breakpoint: 991,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
// ================== Pricing JS Slick ==================
$('.price-slick').slick({
infinite: true,
slidesToShow: 3,
slidesToScroll: 1,
autoplay: false,
arrows: false,
dots: false,
autoplaySpeed: 3500,
responsive: [
{
breakpoint: 991,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
//==================Animated Scroll Start==================
var html_body = $('html, body');
$('nav a').on('click', function () {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
html_body.animate({
scrollTop: target.offset().top - 50
}, 1500);
return false;
}
}
});
//==================Animated Scroll End==================
}); | 26.25 | 125 | 0.392186 |
73774c398227763fa091704fcdece670818dee71 | 2,174 | js | JavaScript | src/router/routes.js | suetmuiwong/scms | bb55301adc9554fa9ee3c571a3b9275111253659 | [
"MIT"
] | null | null | null | src/router/routes.js | suetmuiwong/scms | bb55301adc9554fa9ee3c571a3b9275111253659 | [
"MIT"
] | 3 | 2020-12-04T19:57:10.000Z | 2022-02-27T00:39:00.000Z | src/router/routes.js | suetmuiwong/scms | bb55301adc9554fa9ee3c571a3b9275111253659 | [
"MIT"
] | null | null | null | import layoutHeaderAside from '@/layout/header-aside'
import flow from './modules/flow'
import news from './modules/news'
import plans from './modules/plans'
import prices from './modules/prices'
import bids from './modules/bids'
import template from './modules/template'
import system from './modules/system'
import contract from './modules/contract'
import supplier from './modules/supplier'
import agent from './modules/agent'
import goods from './modules/goods'
import projects from './modules/projects'
import purchaseResults from './modules/purchaseResults'
// 由于懒加载页面太多的话会造成webpack热更新太慢,所以开发环境不使用懒加载,只有生产环境使用懒加载
const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
/**
* 在主框架内显示
*/
const frameIn = [
{
path: '/',
redirect: { name: 'index' },
component: layoutHeaderAside,
children: [
// 首页
{
path: 'index',
name: 'index',
meta: {
title: '首页',
auth: true
},
component: _import('system/index')
},
// 系统 前端日志
{
path: 'log',
name: 'log',
meta: {
title: '前端日志',
auth: true
},
component: _import('system/log')
},
// 刷新页面 必须保留
{
path: 'refresh',
name: 'refresh',
hidden: true,
component: _import('system/function/refresh')
},
// 页面重定向 必须保留
{
path: 'redirect/:route*',
name: 'redirect',
hidden: true,
component: _import('system/function/redirect')
}
]
},
flow,
news,
plans,
prices,
bids,
template,
system,
contract,
supplier,
agent,
goods,
projects,
purchaseResults
]
/**
* 在主框架之外显示
*/
const frameOut = [
// 登录
{
path: '/login',
name: 'login',
component: _import('system/login')
},
{
path: '/register',
name: 'register',
component: _import('system/register')
}
]
/**
* 错误页面
*/
const errorPage = [
{
path: '*',
name: '404',
component: _import('system/error/404')
}
]
// 导出需要显示菜单的
export const frameInRoutes = frameIn
// 重新组织后导出
export default [
...frameIn,
...frameOut,
...errorPage
]
| 18.741379 | 69 | 0.578197 |
7377c984b0b670debf405fb78a849e1b71e0ee0c | 1,493 | js | JavaScript | HomeAssignment/dependency_parser.js | EliGitHub1/nodeJSCliDepLevel | 595d6a39b5c669647bc6095187ee938c40fdf08f | [
"MIT"
] | null | null | null | HomeAssignment/dependency_parser.js | EliGitHub1/nodeJSCliDepLevel | 595d6a39b5c669647bc6095187ee938c40fdf08f | [
"MIT"
] | null | null | null | HomeAssignment/dependency_parser.js | EliGitHub1/nodeJSCliDepLevel | 595d6a39b5c669647bc6095187ee938c40fdf08f | [
"MIT"
] | null | null | null | const fs = require("fs");
module.exports = {
getLevelDependencies,
printLevelDependencies,
};
let levelDependencies = {};
let lockfile;
function addLevelDependency(level, packageName, packageData) {
const name = packageName === "" ? packageData["name"] : packageName; // account for the root package name
levelDependencies[level] = levelDependencies[level] || [];
levelDependencies[level].push({
name: name,
version: packageData["version"],
});
}
function getAllLevelDependenciesRecursivly(level, packageName) {
const pName =
packageName === "" ? packageName : `node_modules/${packageName}`; // account for the root package name
const packageData = lockfile.packages[pName];
addLevelDependency(level, packageName, packageData);
if (packageData && packageData.dependencies) {
Object.keys(packageData.dependencies).forEach((depName) =>
getAllLevelDependenciesRecursivly(level + 1, depName)
);
} else {
return levelDependencies;
}
return levelDependencies;
}
function getLevelDependencies(lockPath) {
const rawdata = fs.readFileSync(lockPath);
lockfile = JSON.parse(rawdata);
return getAllLevelDependenciesRecursivly(0, "");
}
function printLevelDependencies() {
let output = "";
Object.keys(levelDependencies).forEach((level) => {
levelDependencies[level].forEach((dep) => {
output += `Level ${level}:${"\t".repeat(level)} ${dep.name}@${
dep.version
}\n`;
});
});
console.log(output);
}
| 26.660714 | 107 | 0.695914 |
7378385ba1fd9b218637e13ab7f99c437983a2c3 | 4,293 | js | JavaScript | node_modules/reactstrap/lib/Col.js | carlazitroc/internation | 13216d8c51b6c741e0641f8810cae61e2cc0455b | [
"MIT"
] | 1 | 2018-03-06T06:23:28.000Z | 2018-03-06T06:23:28.000Z | node_modules/reactstrap/lib/Col.js | carlazitroc/internation | 13216d8c51b6c741e0641f8810cae61e2cc0455b | [
"MIT"
] | null | null | null | node_modules/reactstrap/lib/Col.js | carlazitroc/internation | 13216d8c51b6c741e0641f8810cae61e2cc0455b | [
"MIT"
] | null | null | null | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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; };
var _lodash = require('lodash.isobject');
var _lodash2 = _interopRequireDefault(_lodash);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
var _utils = require('./utils');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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 _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
var colWidths = ['xs', 'sm', 'md', 'lg', 'xl'];
var stringOrNumberProp = _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]);
var columnProps = _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.number, _propTypes2.default.string, _propTypes2.default.shape({
size: _propTypes2.default.oneOfType([_propTypes2.default.bool, _propTypes2.default.number, _propTypes2.default.string]),
push: stringOrNumberProp,
pull: stringOrNumberProp,
offset: stringOrNumberProp
})]);
var propTypes = {
tag: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.string]),
xs: columnProps,
sm: columnProps,
md: columnProps,
lg: columnProps,
xl: columnProps,
className: _propTypes2.default.string,
cssModule: _propTypes2.default.object,
widths: _propTypes2.default.array
};
var defaultProps = {
tag: 'div',
widths: colWidths
};
var getColumnSizeClass = function getColumnSizeClass(isXs, colWidth, colSize) {
if (colSize === true || colSize === '') {
return isXs ? 'col' : 'col-' + colWidth;
} else if (colSize === 'auto') {
return isXs ? 'col-auto' : 'col-' + colWidth + '-auto';
}
return isXs ? 'col-' + colSize : 'col-' + colWidth + '-' + colSize;
};
var Col = function Col(props) {
var className = props.className,
cssModule = props.cssModule,
widths = props.widths,
Tag = props.tag,
attributes = _objectWithoutProperties(props, ['className', 'cssModule', 'widths', 'tag']);
var colClasses = [];
widths.forEach(function (colWidth, i) {
var columnProp = props[colWidth];
if (!i && columnProp === undefined) {
columnProp = true;
}
delete attributes[colWidth];
if (!columnProp && columnProp !== '') {
return;
}
var isXs = !i;
var colClass = void 0;
if ((0, _lodash2.default)(columnProp)) {
var _classNames;
var colSizeInterfix = isXs ? '-' : '-' + colWidth + '-';
colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
colClasses.push((0, _utils.mapToCssModules)((0, _classnames2.default)((_classNames = {}, _defineProperty(_classNames, colClass, columnProp.size || columnProp.size === ''), _defineProperty(_classNames, 'push' + colSizeInterfix + columnProp.push, columnProp.push || columnProp.push === 0), _defineProperty(_classNames, 'pull' + colSizeInterfix + columnProp.pull, columnProp.pull || columnProp.pull === 0), _defineProperty(_classNames, 'offset' + colSizeInterfix + columnProp.offset, columnProp.offset || columnProp.offset === 0), _classNames))), cssModule);
} else {
colClass = getColumnSizeClass(isXs, colWidth, columnProp);
colClasses.push(colClass);
}
});
var classes = (0, _utils.mapToCssModules)((0, _classnames2.default)(className, colClasses), cssModule);
return _react2.default.createElement(Tag, _extends({}, attributes, { className: classes }));
};
Col.propTypes = propTypes;
Col.defaultProps = defaultProps;
exports.default = Col; | 37.008621 | 561 | 0.694386 |
73784607cbe3040722a3b14364aea2bfb2ca92d5 | 87,639 | js | JavaScript | web-app/js/prototype/rico.js | pmcneil/One-Ring | 8d222c707e4c39abb1596bbfceb6878c0af1f7ef | [
"Apache-2.0"
] | 1 | 2015-07-27T07:59:25.000Z | 2015-07-27T07:59:25.000Z | web-app/js/prototype/rico.js | pmcneil/One-Ring | 8d222c707e4c39abb1596bbfceb6878c0af1f7ef | [
"Apache-2.0"
] | null | null | null | web-app/js/prototype/rico.js | pmcneil/One-Ring | 8d222c707e4c39abb1596bbfceb6878c0af1f7ef | [
"Apache-2.0"
] | 1 | 2016-04-22T07:28:04.000Z | 2016-04-22T07:28:04.000Z | /**
*
* Copyright 2005 Sabre Airline Solutions
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
**/
//-------------------- rico.js
var Rico = {
Version: '1.1-beta2'
}
Rico.ArrayExtensions = new Array();
if (Object.prototype.extend) {
// in prototype.js...
Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] = Object.prototype.extend;
}
if (Array.prototype.push) {
// in prototype.js...
Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] = Array.prototype.push;
}
if (!Array.prototype.remove) {
Array.prototype.remove = function(dx) {
if (isNaN(dx) || dx > this.length)
return false;
for (var i = 0,n = 0; i < this.length; i++)
if (i != dx)
this[n++] = this[i];
this.length -= 1;
};
Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] = Array.prototype.remove;
}
if (!Array.prototype.removeItem) {
Array.prototype.removeItem = function(item) {
for (var i = 0; i < this.length; i++)
if (this[i] == item) {
this.remove(i);
break;
}
};
Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] = Array.prototype.removeItem;
}
if (!Array.prototype.indices) {
Array.prototype.indices = function() {
var indexArray = new Array();
for (index in this) {
var ignoreThis = false;
for (var i = 0; i < Rico.ArrayExtensions.length; i++) {
if (this[index] == Rico.ArrayExtensions[i]) {
ignoreThis = true;
break;
}
}
if (!ignoreThis)
indexArray[ indexArray.length ] = index;
}
return indexArray;
}
Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] = Array.prototype.indices;
}
// Create the loadXML method and xml getter for Mozilla
if (window.DOMParser &&
window.XMLSerializer &&
window.Node && Node.prototype && Node.prototype.__defineGetter__) {
if (!Document.prototype.loadXML) {
Document.prototype.loadXML = function (s) {
var doc2 = (new DOMParser()).parseFromString(s, "text/xml");
while (this.hasChildNodes())
this.removeChild(this.lastChild);
for (var i = 0; i < doc2.childNodes.length; i++) {
this.appendChild(this.importNode(doc2.childNodes[i], true));
}
};
}
Document.prototype.__defineGetter__("xml",
function () {
return (new XMLSerializer()).serializeToString(this);
}
);
}
document.getElementsByTagAndClassName = function(tagName, className) {
if (tagName == null)
tagName = '*';
var children = document.getElementsByTagName(tagName) || document.all;
var elements = new Array();
if (className == null)
return children;
for (var i = 0; i < children.length; i++) {
var child = children[i];
var classNames = child.className.split(' ');
for (var j = 0; j < classNames.length; j++) {
if (classNames[j] == className) {
elements.push(child);
break;
}
}
}
return elements;
}
//-------------------- ricoAccordion.js
Rico.Accordion = Class.create();
Rico.Accordion.prototype = {
initialize: function(container, options) {
this.container = $(container);
this.lastExpandedTab = null;
this.accordionTabs = new Array();
this.setOptions(options);
this._attachBehaviors();
this.container.style.borderBottom = '1px solid ' + this.options.borderColor;
// set the initial visual state...
for (var i = 1; i < this.accordionTabs.length; i++) {
this.accordionTabs[i].collapse();
this.accordionTabs[i].content.style.display = 'none';
}
this.lastExpandedTab = this.accordionTabs[0];
this.lastExpandedTab.content.style.height = this.options.panelHeight + "px";
this.lastExpandedTab.showExpanded();
this.lastExpandedTab.titleBar.style.fontWeight = this.options.expandedFontWeight;
},
setOptions: function(options) {
this.options = {
expandedBg : '#63699c',
hoverBg : '#63699c',
collapsedBg : '#6b79a5',
expandedTextColor : '#ffffff',
expandedFontWeight : 'bold',
hoverTextColor : '#ffffff',
collapsedTextColor : '#ced7ef',
collapsedFontWeight : 'normal',
hoverTextColor : '#ffffff',
borderColor : '#1f669b',
panelHeight : 200,
onHideTab : null,
onShowTab : null
}.extend(options || {});
},
showTabByIndex: function(anIndex, animate) {
var doAnimate = arguments.length == 1 ? true : animate;
this.showTab(this.accordionTabs[anIndex], doAnimate);
},
showTab: function(accordionTab, animate) {
var doAnimate = arguments.length == 1 ? true : animate;
if (this.options.onHideTab)
this.options.onHideTab(this.lastExpandedTab);
this.lastExpandedTab.showCollapsed();
var accordion = this;
var lastExpandedTab = this.lastExpandedTab;
this.lastExpandedTab.content.style.height = (this.options.panelHeight - 1) + 'px';
accordionTab.content.style.display = '';
accordionTab.titleBar.style.fontWeight = this.options.expandedFontWeight;
if (doAnimate) {
new Effect.AccordionSize(this.lastExpandedTab.content,
accordionTab.content,
1,
this.options.panelHeight,
100, 10,
{ complete: function() {
accordion.showTabDone(lastExpandedTab)
} });
this.lastExpandedTab = accordionTab;
}
else {
this.lastExpandedTab.content.style.height = "1px";
accordionTab.content.style.height = this.options.panelHeight + "px";
this.lastExpandedTab = accordionTab;
this.showTabDone(lastExpandedTab);
}
},
showTabDone: function(collapsedTab) {
collapsedTab.content.style.display = 'none';
this.lastExpandedTab.showExpanded();
if (this.options.onShowTab)
this.options.onShowTab(this.lastExpandedTab);
},
_attachBehaviors: function() {
var panels = this._getDirectChildrenByTag(this.container, 'DIV');
for (var i = 0; i < panels.length; i++) {
var tabChildren = this._getDirectChildrenByTag(panels[i], 'DIV');
if (tabChildren.length != 2)
continue; // unexpected
var tabTitleBar = tabChildren[0];
var tabContentBox = tabChildren[1];
this.accordionTabs.push(new Rico.Accordion.Tab(this, tabTitleBar, tabContentBox));
}
},
_getDirectChildrenByTag: function(e, tagName) {
var kids = new Array();
var allKids = e.childNodes;
for (var i = 0; i < allKids.length; i++)
if (allKids[i] && allKids[i].tagName && allKids[i].tagName == tagName)
kids.push(allKids[i]);
return kids;
}
};
Rico.Accordion.Tab = Class.create();
Rico.Accordion.Tab.prototype = {
initialize: function(accordion, titleBar, content) {
this.accordion = accordion;
this.titleBar = titleBar;
this.content = content;
this._attachBehaviors();
},
collapse: function() {
this.showCollapsed();
this.content.style.height = "1px";
},
showCollapsed: function() {
this.expanded = false;
this.titleBar.style.backgroundColor = this.accordion.options.collapsedBg;
this.titleBar.style.color = this.accordion.options.collapsedTextColor;
this.titleBar.style.fontWeight = this.accordion.options.collapsedFontWeight;
this.content.style.overflow = "hidden";
},
showExpanded: function() {
this.expanded = true;
this.titleBar.style.backgroundColor = this.accordion.options.expandedBg;
this.titleBar.style.color = this.accordion.options.expandedTextColor;
this.content.style.overflow = "visible";
},
titleBarClicked: function(e) {
if (this.accordion.lastExpandedTab == this)
return;
this.accordion.showTab(this);
},
hover: function(e) {
this.titleBar.style.backgroundColor = this.accordion.options.hoverBg;
this.titleBar.style.color = this.accordion.options.hoverTextColor;
},
unhover: function(e) {
if (this.expanded) {
this.titleBar.style.backgroundColor = this.accordion.options.expandedBg;
this.titleBar.style.color = this.accordion.options.expandedTextColor;
}
else {
this.titleBar.style.backgroundColor = this.accordion.options.collapsedBg;
this.titleBar.style.color = this.accordion.options.collapsedTextColor;
}
},
_attachBehaviors: function() {
this.content.style.border = "1px solid " + this.accordion.options.borderColor;
this.content.style.borderTopWidth = "0px";
this.content.style.borderBottomWidth = "0px";
this.content.style.margin = "0px";
this.titleBar.onclick = this.titleBarClicked.bindAsEventListener(this);
this.titleBar.onmouseover = this.hover.bindAsEventListener(this);
this.titleBar.onmouseout = this.unhover.bindAsEventListener(this);
}
};
//-------------------- ricoAjaxEngine.js
Rico.AjaxEngine = Class.create();
Rico.AjaxEngine.prototype = {
initialize: function() {
this.ajaxElements = new Array();
this.ajaxObjects = new Array();
this.requestURLS = new Array();
},
registerAjaxElement: function(anId, anElement) {
if (arguments.length == 1)
anElement = $(anId);
this.ajaxElements[anId] = anElement;
},
registerAjaxObject: function(anId, anObject) {
this.ajaxObjects[anId] = anObject;
},
registerRequest: function (requestLogicalName, requestURL) {
this.requestURLS[requestLogicalName] = requestURL;
},
sendRequest: function(requestName) {
var requestURL = this.requestURLS[requestName];
if (requestURL == null)
return;
var queryString = "";
if (arguments.length > 1) {
if (typeof(arguments[1]) == "object" && arguments[1].length != undefined) {
queryString = this._createQueryString(arguments[1], 0);
}
else {
queryString = this._createQueryString(arguments, 1);
}
}
new Ajax.Request(requestURL, this._requestOptions(queryString));
},
sendRequestWithData: function(requestName, xmlDocument) {
var requestURL = this.requestURLS[requestName];
if (requestURL == null)
return;
var queryString = "";
if (arguments.length > 2) {
if (typeof(arguments[2]) == "object" && arguments[2].length != undefined) {
queryString = this._createQueryString(arguments[2], 0);
}
else {
queryString = this._createQueryString(arguments, 2);
}
}
new Ajax.Request(requestURL + "?" + queryString, this._requestOptions(null, xmlDocument));
},
sendRequestAndUpdate: function(requestName, container, options) {
var requestURL = this.requestURLS[requestName];
if (requestURL == null)
return;
var queryString = "";
if (arguments.length > 3) {
if (typeof(arguments[3]) == "object" && arguments[3].length != undefined) {
queryString = this._createQueryString(arguments[3], 0);
}
else {
queryString = this._createQueryString(arguments, 3);
}
}
var updaterOptions = this._requestOptions(queryString);
updaterOptions.onComplete = null;
updaterOptions.extend(options);
new Ajax.Updater(container, requestURL, updaterOptions);
},
sendRequestWithDataAndUpdate: function(requestName, xmlDocument, container, options) {
var requestURL = this.requestURLS[requestName];
if (requestURL == null)
return;
var queryString = "";
if (arguments.length > 4) {
if (typeof(arguments[4]) == "object" && arguments[4].length != undefined) {
queryString = this._createQueryString(arguments[4], 0);
}
else {
queryString = this._createQueryString(arguments, 4);
}
}
var updaterOptions = this._requestOptions(queryString, xmlDocument);
updaterOptions.onComplete = null;
updaterOptions.extend(options);
new Ajax.Updater(container, requestURL + "?" + queryString, updaterOptions);
},
// Private -- not part of intended engine API --------------------------------------------------------------------
_requestOptions: function(queryString, xmlDoc) {
var self = this;
var requestHeaders = ['X-Rico-Version', Rico.Version ];
var sendMethod = "post"
if (arguments[1])
requestHeaders.push('Content-type', 'text/xml');
else
sendMethod = "get";
return { requestHeaders: requestHeaders,
parameters: queryString,
postBody: arguments[1] ? xmlDoc : null,
method: sendMethod,
onComplete: self._onRequestComplete.bind(self) };
},
_createQueryString: function(theArgs, offset) {
var self = this;
var queryString = ""
for (var i = offset; i < theArgs.length; i++) {
if (i != offset)
queryString += "&";
var anArg = theArgs[i];
if (anArg.name != undefined && anArg.value != undefined) {
queryString += anArg.name + "=" + escape(anArg.value);
}
else {
var ePos = anArg.indexOf('=');
var argName = anArg.substring(0, ePos);
var argValue = anArg.substring(ePos + 1);
queryString += argName + "=" + escape(argValue);
}
}
return queryString;
},
_onRequestComplete : function(request) {
//!!TODO: error handling infrastructure??
if (request.status != 200)
return;
var response = request.responseXML.getElementsByTagName("ajax-response");
if (response == null || response.length != 1)
return;
this._processAjaxResponse(response[0].childNodes);
},
_processAjaxResponse: function(xmlResponseElements) {
for (var i = 0; i < xmlResponseElements.length; i++) {
var responseElement = xmlResponseElements[i];
// only process nodes of type element.....
if (responseElement.nodeType != 1)
continue;
var responseType = responseElement.getAttribute("type");
var responseId = responseElement.getAttribute("id");
if (responseType == "object")
this._processAjaxObjectUpdate(this.ajaxObjects[ responseId ], responseElement);
else if (responseType == "element")
this._processAjaxElementUpdate(this.ajaxElements[ responseId ], responseElement);
else
alert('unrecognized AjaxResponse type : ' + responseType);
}
},
_processAjaxObjectUpdate: function(ajaxObject, responseElement) {
ajaxObject.ajaxUpdate(responseElement);
},
_processAjaxElementUpdate: function(ajaxElement, responseElement) {
ajaxElement.innerHTML = RicoUtil.getContentAsString(responseElement);
}
}
var ajaxEngine = new Rico.AjaxEngine();
//-------------------- ricoColor.js
Rico.Color = Class.create();
Rico.Color.prototype = {
initialize: function(red, green, blue) {
this.rgb = { r: red, g : green, b : blue };
},
setRed: function(r) {
this.rgb.r = r;
},
setGreen: function(g) {
this.rgb.g = g;
},
setBlue: function(b) {
this.rgb.b = b;
},
setHue: function(h) {
// get an HSB model, and set the new hue...
var hsb = this.asHSB();
hsb.h = h;
// convert back to RGB...
this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b);
},
setSaturation: function(s) {
// get an HSB model, and set the new hue...
var hsb = this.asHSB();
hsb.s = s;
// convert back to RGB and set values...
this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b);
},
setBrightness: function(b) {
// get an HSB model, and set the new hue...
var hsb = this.asHSB();
hsb.b = b;
// convert back to RGB and set values...
this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b);
},
darken: function(percent) {
var hsb = this.asHSB();
this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent, 0));
},
brighten: function(percent) {
var hsb = this.asHSB();
this.rgb = Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.min(hsb.b + percent, 1));
},
blend: function(other) {
this.rgb.r = Math.floor((this.rgb.r + other.rgb.r) / 2);
this.rgb.g = Math.floor((this.rgb.g + other.rgb.g) / 2);
this.rgb.b = Math.floor((this.rgb.b + other.rgb.b) / 2);
},
isBright: function() {
var hsb = this.asHSB();
return this.asHSB().b > 0.5;
},
isDark: function() {
return ! this.isBright();
},
asRGB: function() {
return "rgb(" + this.rgb.r + "," + this.rgb.g + "," + this.rgb.b + ")";
},
asHex: function() {
return "#" + this.rgb.r.toColorPart() + this.rgb.g.toColorPart() + this.rgb.b.toColorPart();
},
asHSB: function() {
return Rico.Color.RGBtoHSB(this.rgb.r, this.rgb.g, this.rgb.b);
},
toString: function() {
return this.asHex();
}
};
Rico.Color.createFromHex = function(hexCode) {
if (hexCode.indexOf('#') == 0)
hexCode = hexCode.substring(1);
var red = hexCode.substring(0, 2);
var green = hexCode.substring(2, 4);
var blue = hexCode.substring(4, 6);
return new Rico.Color(parseInt(red, 16), parseInt(green, 16), parseInt(blue, 16));
}
/**
* Factory method for creating a color from the background of
* an HTML element.
*/
Rico.Color.createColorFromBackground = function(elem) {
var actualColor = RicoUtil.getElementsComputedStyle($(elem), "backgroundColor", "background-color");
if (actualColor == "transparent" && elem.parent)
return Rico.Color.createColorFromBackground(elem.parent);
if (actualColor == null)
return new Rico.Color(255, 255, 255);
if (actualColor.indexOf("rgb(") == 0) {
var colors = actualColor.substring(4, actualColor.length - 1);
var colorArray = colors.split(",");
return new Rico.Color(parseInt(colorArray[0]),
parseInt(colorArray[1]),
parseInt(colorArray[2]));
}
else if (actualColor.indexOf("#") == 0) {
var redPart = parseInt(actualColor.substring(1, 3), 16);
var greenPart = parseInt(actualColor.substring(3, 5), 16);
var bluePart = parseInt(actualColor.substring(5), 16);
return new Rico.Color(redPart, greenPart, bluePart);
}
else
return new Rico.Color(255, 255, 255);
}
Rico.Color.HSBtoRGB = function(hue, saturation, brightness) {
var red = 0;
var green = 0;
var blue = 0;
if (saturation == 0) {
red = parseInt(brightness * 255.0 + 0.5);
green = red;
blue = red;
}
else {
var h = (hue - Math.floor(hue)) * 6.0;
var f = h - Math.floor(h);
var p = brightness * (1.0 - saturation);
var q = brightness * (1.0 - saturation * f);
var t = brightness * (1.0 - (saturation * (1.0 - f)));
switch (parseInt(h)) {
case 0:
red = (brightness * 255.0 + 0.5);
green = (t * 255.0 + 0.5);
blue = (p * 255.0 + 0.5);
break;
case 1:
red = (q * 255.0 + 0.5);
green = (brightness * 255.0 + 0.5);
blue = (p * 255.0 + 0.5);
break;
case 2:
red = (p * 255.0 + 0.5);
green = (brightness * 255.0 + 0.5);
blue = (t * 255.0 + 0.5);
break;
case 3:
red = (p * 255.0 + 0.5);
green = (q * 255.0 + 0.5);
blue = (brightness * 255.0 + 0.5);
break;
case 4:
red = (t * 255.0 + 0.5);
green = (p * 255.0 + 0.5);
blue = (brightness * 255.0 + 0.5);
break;
case 5:
red = (brightness * 255.0 + 0.5);
green = (p * 255.0 + 0.5);
blue = (q * 255.0 + 0.5);
break;
}
}
return { r : parseInt(red), g : parseInt(green) , b : parseInt(blue) };
}
Rico.Color.RGBtoHSB = function(r, g, b) {
var hue;
var saturaton;
var brightness;
var cmax = (r > g) ? r : g;
if (b > cmax)
cmax = b;
var cmin = (r < g) ? r : g;
if (b < cmin)
cmin = b;
brightness = cmax / 255.0;
if (cmax != 0)
saturation = (cmax - cmin) / cmax;
else
saturation = 0;
if (saturation == 0)
hue = 0;
else {
var redc = (cmax - r) / (cmax - cmin);
var greenc = (cmax - g) / (cmax - cmin);
var bluec = (cmax - b) / (cmax - cmin);
if (r == cmax)
hue = bluec - greenc;
else if (g == cmax)
hue = 2.0 + redc - bluec;
else
hue = 4.0 + greenc - redc;
hue = hue / 6.0;
if (hue < 0)
hue = hue + 1.0;
}
return { h : hue, s : saturation, b : brightness };
}
//-------------------- ricoCorner.js
Rico.Corner = {
round: function(e, options) {
var e = $(e);
this._setOptions(options);
var color = this.options.color;
if (this.options.color == "fromElement")
color = this._background(e);
var bgColor = this.options.bgColor;
if (this.options.bgColor == "fromParent")
bgColor = this._background(e.offsetParent);
this._roundCornersImpl(e, color, bgColor);
},
_roundCornersImpl: function(e, color, bgColor) {
if (this.options.border)
this._renderBorder(e, bgColor);
if (this._isTopRounded())
this._roundTopCorners(e, color, bgColor);
if (this._isBottomRounded())
this._roundBottomCorners(e, color, bgColor);
},
_renderBorder: function(el, bgColor) {
var borderValue = "1px solid " + this._borderColor(bgColor);
var borderL = "border-left: " + borderValue;
var borderR = "border-right: " + borderValue;
var style = "style='" + borderL + ";" + borderR + "'";
el.innerHTML = "<div " + style + ">" + el.innerHTML + "</div>"
},
_roundTopCorners: function(el, color, bgColor) {
var corner = this._createCorner(bgColor);
for (var i = 0; i < this.options.numSlices; i++)
corner.appendChild(this._createCornerSlice(color, bgColor, i, "top"));
el.style.paddingTop = 0;
el.insertBefore(corner, el.firstChild);
},
_roundBottomCorners: function(el, color, bgColor) {
var corner = this._createCorner(bgColor);
for (var i = (this.options.numSlices - 1); i >= 0; i--)
corner.appendChild(this._createCornerSlice(color, bgColor, i, "bottom"));
el.style.paddingBottom = 0;
el.appendChild(corner);
},
_createCorner: function(bgColor) {
var corner = document.createElement("div");
corner.style.backgroundColor = (this._isTransparent() ? "transparent" : bgColor);
return corner;
},
_createCornerSlice: function(color, bgColor, n, position) {
var slice = document.createElement("span");
var inStyle = slice.style;
inStyle.backgroundColor = color;
inStyle.display = "block";
inStyle.height = "1px";
inStyle.overflow = "hidden";
inStyle.fontSize = "1px";
var borderColor = this._borderColor(color, bgColor);
if (this.options.border && n == 0) {
inStyle.borderTopStyle = "solid";
inStyle.borderTopWidth = "1px";
inStyle.borderLeftWidth = "0px";
inStyle.borderRightWidth = "0px";
inStyle.borderBottomWidth = "0px";
inStyle.height = "0px"; // assumes css compliant box model
inStyle.borderColor = borderColor;
}
else if (borderColor) {
inStyle.borderColor = borderColor;
inStyle.borderStyle = "solid";
inStyle.borderWidth = "0px 1px";
}
if (!this.options.compact && (n == (this.options.numSlices - 1)))
inStyle.height = "2px";
this._setMargin(slice, n, position);
this._setBorder(slice, n, position);
return slice;
},
_setOptions: function(options) {
this.options = {
corners : "all",
color : "fromElement",
bgColor : "fromParent",
blend : true,
border : false,
compact : false
}.extend(options || {});
this.options.numSlices = this.options.compact ? 2 : 4;
if (this._isTransparent())
this.options.blend = false;
},
_whichSideTop: function() {
if (this._hasString(this.options.corners, "all", "top"))
return "";
if (this.options.corners.indexOf("tl") >= 0 && this.options.corners.indexOf("tr") >= 0)
return "";
if (this.options.corners.indexOf("tl") >= 0)
return "left";
else if (this.options.corners.indexOf("tr") >= 0)
return "right";
return "";
},
_whichSideBottom: function() {
if (this._hasString(this.options.corners, "all", "bottom"))
return "";
if (this.options.corners.indexOf("bl") >= 0 && this.options.corners.indexOf("br") >= 0)
return "";
if (this.options.corners.indexOf("bl") >= 0)
return "left";
else if (this.options.corners.indexOf("br") >= 0)
return "right";
return "";
},
_borderColor : function(color, bgColor) {
if (color == "transparent")
return bgColor;
else if (this.options.border)
return this.options.border;
else if (this.options.blend)
return this._blend(bgColor, color);
else
return "";
},
_setMargin: function(el, n, corners) {
var marginSize = this._marginSize(n);
var whichSide = corners == "top" ? this._whichSideTop() : this._whichSideBottom();
if (whichSide == "left") {
el.style.marginLeft = marginSize + "px";
el.style.marginRight = "0px";
}
else if (whichSide == "right") {
el.style.marginRight = marginSize + "px";
el.style.marginLeft = "0px";
}
else {
el.style.marginLeft = marginSize + "px";
el.style.marginRight = marginSize + "px";
}
},
_setBorder: function(el, n, corners) {
var borderSize = this._borderSize(n);
var whichSide = corners == "top" ? this._whichSideTop() : this._whichSideBottom();
if (whichSide == "left") {
el.style.borderLeftWidth = borderSize + "px";
el.style.borderRightWidth = "0px";
}
else if (whichSide == "right") {
el.style.borderRightWidth = borderSize + "px";
el.style.borderLeftWidth = "0px";
}
else {
el.style.borderLeftWidth = borderSize + "px";
el.style.borderRightWidth = borderSize + "px";
}
},
_marginSize: function(n) {
if (this._isTransparent())
return 0;
var marginSizes = [ 5, 3, 2, 1 ];
var blendedMarginSizes = [ 3, 2, 1, 0 ];
var compactMarginSizes = [ 2, 1 ];
var smBlendedMarginSizes = [ 1, 0 ];
if (this.options.compact && this.options.blend)
return smBlendedMarginSizes[n];
else if (this.options.compact)
return compactMarginSizes[n];
else if (this.options.blend)
return blendedMarginSizes[n];
else
return marginSizes[n];
},
_borderSize: function(n) {
var transparentBorderSizes = [ 5, 3, 2, 1 ];
var blendedBorderSizes = [ 2, 1, 1, 1 ];
var compactBorderSizes = [ 1, 0 ];
var actualBorderSizes = [ 0, 2, 0, 0 ];
if (this.options.compact && (this.options.blend || this._isTransparent()))
return 1;
else if (this.options.compact)
return compactBorderSizes[n];
else if (this.options.blend)
return blendedBorderSizes[n];
else if (this.options.border)
return actualBorderSizes[n];
else if (this._isTransparent())
return transparentBorderSizes[n];
return 0;
},
_hasString: function(str) {
for (var i = 1; i < arguments.length; i++) if (str.indexOf(arguments[i]) >= 0) return true;
return false;
},
_blend: function(c1, c2) {
var cc1 = Rico.Color.createFromHex(c1);
cc1.blend(Rico.Color.createFromHex(c2));
return cc1;
},
_background: function(el) {
try {
return Rico.Color.createColorFromBackground(el).asHex();
} catch(err) {
return "#ffffff";
}
},
_isTransparent: function() {
return this.options.color == "transparent";
},
_isTopRounded: function() {
return this._hasString(this.options.corners, "all", "top", "tl", "tr");
},
_isBottomRounded: function() {
return this._hasString(this.options.corners, "all", "bottom", "bl", "br");
},
_hasSingleTextChild: function(el) {
return el.childNodes.length == 1 && el.childNodes[0].nodeType == 3;
}
}
//-------------------- ricoDragAndDrop.js
Rico.DragAndDrop = Class.create();
Rico.DragAndDrop.prototype = {
initialize: function() {
this.dropZones = new Array();
this.draggables = new Array();
this.currentDragObjects = new Array();
this.dragElement = null;
this.lastSelectedDraggable = null;
this.currentDragObjectVisible = false;
this.interestedInMotionEvents = false;
},
registerDropZone: function(aDropZone) {
this.dropZones[ this.dropZones.length ] = aDropZone;
},
deregisterDropZone: function(aDropZone) {
var newDropZones = new Array();
var j = 0;
for (var i = 0; i < this.dropZones.length; i++) {
if (this.dropZones[i] != aDropZone)
newDropZones[j++] = this.dropZones[i];
}
this.dropZones = newDropZones;
},
clearDropZones: function() {
this.dropZones = new Array();
},
registerDraggable: function(aDraggable) {
this.draggables[ this.draggables.length ] = aDraggable;
this._addMouseDownHandler(aDraggable);
},
clearSelection: function() {
for (var i = 0; i < this.currentDragObjects.length; i++)
this.currentDragObjects[i].deselect();
this.currentDragObjects = new Array();
this.lastSelectedDraggable = null;
},
hasSelection: function() {
return this.currentDragObjects.length > 0;
},
setStartDragFromElement: function(e, mouseDownElement) {
this.origPos = RicoUtil.toDocumentPosition(mouseDownElement);
this.startx = e.screenX - this.origPos.x
this.starty = e.screenY - this.origPos.y
//this.startComponentX = e.layerX ? e.layerX : e.offsetX;
//this.startComponentY = e.layerY ? e.layerY : e.offsetY;
//this.adjustedForDraggableSize = false;
this.interestedInMotionEvents = this.hasSelection();
this._terminateEvent(e);
},
updateSelection: function(draggable, extendSelection) {
if (! extendSelection)
this.clearSelection();
if (draggable.isSelected()) {
this.currentDragObjects.removeItem(draggable);
draggable.deselect();
if (draggable == this.lastSelectedDraggable)
this.lastSelectedDraggable = null;
}
else {
this.currentDragObjects[ this.currentDragObjects.length ] = draggable;
draggable.select();
this.lastSelectedDraggable = draggable;
}
},
_mouseDownHandler: function(e) {
if (arguments.length == 0)
e = event;
// if not button 1 ignore it...
var nsEvent = e.which != undefined;
if ((nsEvent && e.which != 1) || (!nsEvent && e.button != 1))
return;
var eventTarget = e.target ? e.target : e.srcElement;
var draggableObject = eventTarget.draggable;
var candidate = eventTarget;
while (draggableObject == null && candidate.parentNode) {
candidate = candidate.parentNode;
draggableObject = candidate.draggable;
}
if (draggableObject == null)
return;
this.updateSelection(draggableObject, e.ctrlKey);
// clear the drop zones postion cache...
if (this.hasSelection())
for (var i = 0; i < this.dropZones.length; i++)
this.dropZones[i].clearPositionCache();
this.setStartDragFromElement(e, draggableObject.getMouseDownHTMLElement());
},
_mouseMoveHandler: function(e) {
var nsEvent = e.which != undefined;
if (!this.interestedInMotionEvents) {
this._terminateEvent(e);
return;
}
if (! this.hasSelection())
return;
if (! this.currentDragObjectVisible)
this._startDrag(e);
if (!this.activatedDropZones)
this._activateRegisteredDropZones();
//if ( !this.adjustedForDraggableSize )
// this._adjustForDraggableSize(e);
this._updateDraggableLocation(e);
this._updateDropZonesHover(e);
this._terminateEvent(e);
},
_makeDraggableObjectVisible: function(e) {
if (!this.hasSelection())
return;
var dragElement;
if (this.currentDragObjects.length > 1)
dragElement = this.currentDragObjects[0].getMultiObjectDragGUI(this.currentDragObjects);
else
dragElement = this.currentDragObjects[0].getSingleObjectDragGUI();
// go ahead and absolute position it...
if (RicoUtil.getElementsComputedStyle(dragElement, "position") != "absolute")
dragElement.style.position = "absolute";
// need to parent him into the document...
if (dragElement.parentNode == null || dragElement.parentNode.nodeType == 11)
document.body.appendChild(dragElement);
this.dragElement = dragElement;
this._updateDraggableLocation(e);
this.currentDragObjectVisible = true;
},
/**
_adjustForDraggableSize: function(e) {
var dragElementWidth = this.dragElement.offsetWidth;
var dragElementHeight = this.dragElement.offsetHeight;
if ( this.startComponentX > dragElementWidth )
this.startx -= this.startComponentX - dragElementWidth + 2;
if ( e.offsetY ) {
if ( this.startComponentY > dragElementHeight )
this.starty -= this.startComponentY - dragElementHeight + 2;
}
this.adjustedForDraggableSize = true;
},
**/
_updateDraggableLocation: function(e) {
var dragObjectStyle = this.dragElement.style;
dragObjectStyle.left = (e.screenX - this.startx) + "px"
dragObjectStyle.top = (e.screenY - this.starty) + "px";
},
_updateDropZonesHover: function(e) {
var n = this.dropZones.length;
for (var i = 0; i < n; i++) {
if (! this._mousePointInDropZone(e, this.dropZones[i]))
this.dropZones[i].hideHover();
}
for (var i = 0; i < n; i++) {
if (this._mousePointInDropZone(e, this.dropZones[i])) {
if (this.dropZones[i].canAccept(this.currentDragObjects))
this.dropZones[i].showHover();
}
}
},
_startDrag: function(e) {
for (var i = 0; i < this.currentDragObjects.length; i++)
this.currentDragObjects[i].startDrag();
this._makeDraggableObjectVisible(e);
},
_mouseUpHandler: function(e) {
if (! this.hasSelection())
return;
var nsEvent = e.which != undefined;
if ((nsEvent && e.which != 1) || (!nsEvent && e.button != 1))
return;
this.interestedInMotionEvents = false;
if (this.dragElement == null) {
this._terminateEvent(e);
return;
}
if (this._placeDraggableInDropZone(e))
this._completeDropOperation(e);
else {
this._terminateEvent(e);
new Effect.Position(this.dragElement,
this.origPos.x,
this.origPos.y,
200,
20,
{ complete : this._doCancelDragProcessing.bind(this) });
}
},
_completeDropOperation: function(e) {
if (this.dragElement != this.currentDragObjects[0].getMouseDownHTMLElement()) {
if (this.dragElement.parentNode != null)
this.dragElement.parentNode.removeChild(this.dragElement);
}
this._deactivateRegisteredDropZones();
this._endDrag();
this.clearSelection();
this.dragElement = null;
this.currentDragObjectVisible = false;
this._terminateEvent(e);
},
_doCancelDragProcessing: function() {
this._cancelDrag();
if (this.dragElement != this.currentDragObjects[0].getMouseDownHTMLElement()) {
if (this.dragElement.parentNode != null) {
this.dragElement.parentNode.removeChild(this.dragElement);
}
}
this._deactivateRegisteredDropZones();
this.dragElement = null;
this.currentDragObjectVisible = false;
},
_placeDraggableInDropZone: function(e) {
var foundDropZone = false;
var n = this.dropZones.length;
for (var i = 0; i < n; i++) {
if (this._mousePointInDropZone(e, this.dropZones[i])) {
if (this.dropZones[i].canAccept(this.currentDragObjects)) {
this.dropZones[i].hideHover();
this.dropZones[i].accept(this.currentDragObjects);
foundDropZone = true;
break;
}
}
}
return foundDropZone;
},
_cancelDrag: function() {
for (var i = 0; i < this.currentDragObjects.length; i++)
this.currentDragObjects[i].cancelDrag();
},
_endDrag: function() {
for (var i = 0; i < this.currentDragObjects.length; i++)
this.currentDragObjects[i].endDrag();
},
_mousePointInDropZone: function(e, dropZone) {
var absoluteRect = dropZone.getAbsoluteRect();
return e.clientX > absoluteRect.left &&
e.clientX < absoluteRect.right &&
e.clientY > absoluteRect.top &&
e.clientY < absoluteRect.bottom;
},
_addMouseDownHandler: function(aDraggable) {
var htmlElement = aDraggable.getMouseDownHTMLElement();
if (htmlElement != null) {
htmlElement.draggable = aDraggable;
this._addMouseDownEvent(htmlElement);
}
},
_activateRegisteredDropZones: function() {
var n = this.dropZones.length;
for (var i = 0; i < n; i++) {
var dropZone = this.dropZones[i];
if (dropZone.canAccept(this.currentDragObjects))
dropZone.activate();
}
this.activatedDropZones = true;
},
_deactivateRegisteredDropZones: function() {
var n = this.dropZones.length;
for (var i = 0; i < n; i++)
this.dropZones[i].deactivate();
this.activatedDropZones = false;
},
_addMouseDownEvent: function(htmlElement) {
if (typeof document.implementation != "undefined" &&
document.implementation.hasFeature("HTML", "1.0") &&
document.implementation.hasFeature("Events", "2.0") &&
document.implementation.hasFeature("CSS", "2.0")) {
htmlElement.addEventListener("mousedown", this._mouseDownHandler.bindAsEventListener(this), false);
}
else {
htmlElement.attachEvent("onmousedown", this._mouseDownHandler.bindAsEventListener(this));
}
},
_terminateEvent: function(e) {
if (e.stopPropagation != undefined)
e.stopPropagation();
else if (e.cancelBubble != undefined)
e.cancelBubble = true;
if (e.preventDefault != undefined)
e.preventDefault();
else
e.returnValue = false;
},
initializeEventHandlers: function() {
if (typeof document.implementation != "undefined" &&
document.implementation.hasFeature("HTML", "1.0") &&
document.implementation.hasFeature("Events", "2.0") &&
document.implementation.hasFeature("CSS", "2.0")) {
document.addEventListener("mouseup", this._mouseUpHandler.bindAsEventListener(this), false);
document.addEventListener("mousemove", this._mouseMoveHandler.bindAsEventListener(this), false);
}
else {
document.attachEvent("onmouseup", this._mouseUpHandler.bindAsEventListener(this));
document.attachEvent("onmousemove", this._mouseMoveHandler.bindAsEventListener(this));
}
}
}
//var dndMgr = new Rico.DragAndDrop();
//dndMgr.initializeEventHandlers();
//-------------------- ricoDraggable.js
Rico.Draggable = Class.create();
Rico.Draggable.prototype = {
initialize: function(type, htmlElement) {
this.type = type;
this.htmlElement = $(htmlElement);
this.selected = false;
},
/**
* Returns the HTML element that should have a mouse down event
* added to it in order to initiate a drag operation
*
**/
getMouseDownHTMLElement: function() {
return this.htmlElement;
},
select: function() {
this.selected = true;
if (this.showingSelected)
return;
var htmlElement = this.getMouseDownHTMLElement();
var color = Rico.Color.createColorFromBackground(htmlElement);
color.isBright() ? color.darken(0.033) : color.brighten(0.033);
this.saveBackground = RicoUtil.getElementsComputedStyle(htmlElement, "backgroundColor", "background-color");
htmlElement.style.backgroundColor = color.asHex();
this.showingSelected = true;
},
deselect: function() {
this.selected = false;
if (!this.showingSelected)
return;
var htmlElement = this.getMouseDownHTMLElement();
htmlElement.style.backgroundColor = this.saveBackground;
this.showingSelected = false;
},
isSelected: function() {
return this.selected;
},
startDrag: function() {
},
cancelDrag: function() {
},
endDrag: function() {
},
getSingleObjectDragGUI: function() {
return this.htmlElement;
},
getMultiObjectDragGUI: function(draggables) {
return this.htmlElement;
},
getDroppedGUI: function() {
return this.htmlElement;
},
toString: function() {
return this.type + ":" + this.htmlElement + ":";
}
}
//-------------------- ricoDropzone.js
Rico.Dropzone = Class.create();
Rico.Dropzone.prototype = {
initialize: function(htmlElement) {
this.htmlElement = $(htmlElement);
this.absoluteRect = null;
},
getHTMLElement: function() {
return this.htmlElement;
},
clearPositionCache: function() {
this.absoluteRect = null;
},
getAbsoluteRect: function() {
if (this.absoluteRect == null) {
var htmlElement = this.getHTMLElement();
var pos = RicoUtil.toViewportPosition(htmlElement);
this.absoluteRect = {
top: pos.y,
left: pos.x,
bottom: pos.y + htmlElement.offsetHeight,
right: pos.x + htmlElement.offsetWidth
};
}
return this.absoluteRect;
},
activate: function() {
var htmlElement = this.getHTMLElement();
if (htmlElement == null || this.showingActive)
return;
this.showingActive = true;
this.saveBackgroundColor = htmlElement.style.backgroundColor;
var fallbackColor = "#ffea84";
var currentColor = Rico.Color.createColorFromBackground(htmlElement);
if (currentColor == null)
htmlElement.style.backgroundColor = fallbackColor;
else {
currentColor.isBright() ? currentColor.darken(0.2) : currentColor.brighten(0.2);
htmlElement.style.backgroundColor = currentColor.asHex();
}
},
deactivate: function() {
var htmlElement = this.getHTMLElement();
if (htmlElement == null || !this.showingActive)
return;
htmlElement.style.backgroundColor = this.saveBackgroundColor;
this.showingActive = false;
this.saveBackgroundColor = null;
},
showHover: function() {
var htmlElement = this.getHTMLElement();
if (htmlElement == null || this.showingHover)
return;
this.saveBorderWidth = htmlElement.style.borderWidth;
this.saveBorderStyle = htmlElement.style.borderStyle;
this.saveBorderColor = htmlElement.style.borderColor;
this.showingHover = true;
htmlElement.style.borderWidth = "1px";
htmlElement.style.borderStyle = "solid";
//htmlElement.style.borderColor = "#ff9900";
htmlElement.style.borderColor = "#ffff00";
},
hideHover: function() {
var htmlElement = this.getHTMLElement();
if (htmlElement == null || !this.showingHover)
return;
htmlElement.style.borderWidth = this.saveBorderWidth;
htmlElement.style.borderStyle = this.saveBorderStyle;
htmlElement.style.borderColor = this.saveBorderColor;
this.showingHover = false;
},
canAccept: function(draggableObjects) {
return true;
},
accept: function(draggableObjects) {
var htmlElement = this.getHTMLElement();
if (htmlElement == null)
return;
n = draggableObjects.length;
for (var i = 0; i < n; i++) {
var theGUI = draggableObjects[i].getDroppedGUI();
if (RicoUtil.getElementsComputedStyle(theGUI, "position") == "absolute") {
theGUI.style.position = "static";
theGUI.style.top = "";
theGUI.style.top = "";
}
htmlElement.appendChild(theGUI);
}
}
}
//-------------------- ricoEffects.js
/**
* Use the Effect namespace for effects. If using scriptaculous effects
* this will already be defined, otherwise we'll just create an empty
* object for it...
**/
if (window.Effect == undefined)
Effect = {};
Effect.SizeAndPosition = Class.create();
Effect.SizeAndPosition.prototype = {
initialize: function(element, x, y, w, h, duration, steps, options) {
this.element = $(element);
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.duration = duration;
this.steps = steps;
this.options = arguments[7] || {};
this.sizeAndPosition();
},
sizeAndPosition: function() {
if (this.isFinished()) {
if (this.options.complete) this.options.complete(this);
return;
}
if (this.timer)
clearTimeout(this.timer);
var stepDuration = Math.round(this.duration / this.steps);
// Get original values: x,y = top left corner; w,h = width height
var currentX = this.element.offsetLeft;
var currentY = this.element.offsetTop;
var currentW = this.element.offsetWidth;
var currentH = this.element.offsetHeight;
// If values not set, or zero, we do not modify them, and take original as final as well
this.x = (this.x) ? this.x : currentX;
this.y = (this.y) ? this.y : currentY;
this.w = (this.w) ? this.w : currentW;
this.h = (this.h) ? this.h : currentH;
// how much do we need to modify our values for each step?
var difX = this.steps > 0 ? (this.x - currentX) / this.steps : 0;
var difY = this.steps > 0 ? (this.y - currentY) / this.steps : 0;
var difW = this.steps > 0 ? (this.w - currentW) / this.steps : 0;
var difH = this.steps > 0 ? (this.h - currentH) / this.steps : 0;
this.moveBy(difX, difY);
this.resizeBy(difW, difH);
this.duration -= stepDuration;
this.steps--;
this.timer = setTimeout(this.sizeAndPosition.bind(this), stepDuration);
},
isFinished: function() {
return this.steps <= 0;
},
moveBy: function(difX, difY) {
var currentLeft = this.element.offsetLeft;
var currentTop = this.element.offsetTop;
var intDifX = parseInt(difX);
var intDifY = parseInt(difY);
var style = this.element.style;
if (intDifX != 0)
style.left = (currentLeft + intDifX) + "px";
if (intDifY != 0)
style.top = (currentTop + intDifY) + "px";
},
resizeBy: function(difW, difH) {
var currentWidth = this.element.offsetWidth;
var currentHeight = this.element.offsetHeight;
var intDifW = parseInt(difW);
var intDifH = parseInt(difH);
var style = this.element.style;
if (intDifW != 0)
style.width = (currentWidth + intDifW) + "px";
if (intDifH != 0)
style.height = (currentHeight + intDifH) + "px";
}
}
Effect.Size = Class.create();
Effect.Size.prototype = {
initialize: function(element, w, h, duration, steps, options) {
new Effect.SizeAndPosition(element, null, null, w, h, duration, steps, options);
}
}
Effect.Position = Class.create();
Effect.Position.prototype = {
initialize: function(element, x, y, duration, steps, options) {
new Effect.SizeAndPosition(element, x, y, null, null, duration, steps, options);
}
}
Effect.Round = Class.create();
Effect.Round.prototype = {
initialize: function(tagName, className, options) {
var elements = document.getElementsByTagAndClassName(tagName, className);
for (var i = 0; i < elements.length; i++)
Rico.Corner.round(elements[i], options);
}
};
Effect.FadeTo = Class.create();
Effect.FadeTo.prototype = {
initialize: function(element, opacity, duration, steps, options) {
this.element = $(element);
this.opacity = opacity;
this.duration = duration;
this.steps = steps;
this.options = arguments[4] || {};
this.fadeTo();
},
fadeTo: function() {
if (this.isFinished()) {
if (this.options.complete) this.options.complete(this);
return;
}
if (this.timer)
clearTimeout(this.timer);
var stepDuration = Math.round(this.duration / this.steps);
var currentOpacity = this.getElementOpacity();
var delta = this.steps > 0 ? (this.opacity - currentOpacity) / this.steps : 0;
this.changeOpacityBy(delta);
this.duration -= stepDuration;
this.steps--;
this.timer = setTimeout(this.fadeTo.bind(this), stepDuration);
},
changeOpacityBy: function(v) {
var currentOpacity = this.getElementOpacity();
var newOpacity = Math.max(0, Math.min(currentOpacity + v, 1));
this.element.ricoOpacity = newOpacity;
this.element.style.filter = "alpha(opacity:" + Math.round(newOpacity * 100) + ")";
this.element.style.opacity = newOpacity;
/*//*/
;
},
isFinished: function() {
return this.steps <= 0;
},
getElementOpacity: function() {
if (this.element.ricoOpacity == undefined) {
var opacity;
if (this.element.currentStyle) {
opacity = this.element.currentStyle.opacity;
}
else if (document.defaultView.getComputedStyle != undefined) {
var computedStyle = document.defaultView.getComputedStyle;
opacity = computedStyle(this.element, null).getPropertyValue('opacity');
}
this.element.ricoOpacity = opacity != undefined ? opacity : 1.0;
}
return parseFloat(this.element.ricoOpacity);
}
}
Effect.AccordionSize = Class.create();
Effect.AccordionSize.prototype = {
initialize: function(e1, e2, start, end, duration, steps, options) {
this.e1 = $(e1);
this.e2 = $(e2);
this.start = start;
this.end = end;
this.duration = duration;
this.steps = steps;
this.options = arguments[6] || {};
this.accordionSize();
},
accordionSize: function() {
if (this.isFinished()) {
// just in case there are round errors or such...
this.e1.style.height = this.start + "px";
this.e2.style.height = this.end + "px";
if (this.options.complete)
this.options.complete(this);
return;
}
if (this.timer)
clearTimeout(this.timer);
var stepDuration = Math.round(this.duration / this.steps);
var diff = this.steps > 0 ? (parseInt(this.e1.offsetHeight) - this.start) / this.steps : 0;
this.resizeBy(diff);
this.duration -= stepDuration;
this.steps--;
this.timer = setTimeout(this.accordionSize.bind(this), stepDuration);
},
isFinished: function() {
return this.steps <= 0;
},
resizeBy: function(diff) {
var h1Height = this.e1.offsetHeight;
var h2Height = this.e2.offsetHeight;
var intDiff = parseInt(diff);
if (diff != 0) {
this.e1.style.height = (h1Height - intDiff) + "px";
this.e2.style.height = (h2Height + intDiff) + "px";
}
}
};
//-------------------- ricoLiveGrid.js
// Rico.LiveGridMetaData -----------------------------------------------------
Rico.LiveGridMetaData = Class.create();
Rico.LiveGridMetaData.prototype = {
initialize: function(pageSize, totalRows, columnCount, options) {
this.pageSize = pageSize;
this.totalRows = totalRows;
this.setOptions(options);
this.scrollArrowHeight = 16;
this.columnCount = columnCount;
},
setOptions: function(options) {
this.options = {
largeBufferSize : 7.0, // 7 pages
nearLimitFactor : 0.2 // 20% of buffer
}.extend(options || {});
},
getPageSize: function() {
return this.pageSize;
},
getTotalRows: function() {
return this.totalRows;
},
setTotalRows: function(n) {
this.totalRows = n;
},
getLargeBufferSize: function() {
return parseInt(this.options.largeBufferSize * this.pageSize);
},
getLimitTolerance: function() {
return parseInt(this.getLargeBufferSize() * this.options.nearLimitFactor);
}
};
// Rico.LiveGridScroller -----------------------------------------------------
Rico.LiveGridScroller = Class.create();
Rico.LiveGridScroller.prototype = {
initialize: function(liveGrid, viewPort) {
this.isIE = navigator.userAgent.toLowerCase().indexOf("msie") >= 0;
this.liveGrid = liveGrid;
this.metaData = liveGrid.metaData;
this.createScrollBar();
this.scrollTimeout = null;
this.lastScrollPos = 0;
this.viewPort = viewPort;
this.rows = new Array();
},
isUnPlugged: function() {
return this.scrollerDiv.onscroll == null;
},
plugin: function() {
this.scrollerDiv.onscroll = this.handleScroll.bindAsEventListener(this);
},
unplug: function() {
this.scrollerDiv.onscroll = null;
},
sizeIEHeaderHack: function() {
if (!this.isIE) return;
var headerTable = $(this.liveGrid.tableId + "_header");
if (headerTable)
headerTable.rows[0].cells[0].style.width =
(headerTable.rows[0].cells[0].offsetWidth + 1) + "px";
},
createScrollBar: function() {
var visibleHeight = this.liveGrid.viewPort.visibleHeight();
// create the outer div...
this.scrollerDiv = document.createElement("div");
var scrollerStyle = this.scrollerDiv.style;
scrollerStyle.borderRight = "1px solid #ababab"; // hard coded color!!!
scrollerStyle.position = "relative";
scrollerStyle.left = this.isIE ? "-6px" : "-3px";
scrollerStyle.width = "19px";
scrollerStyle.height = visibleHeight + "px";
scrollerStyle.overflow = "auto";
// create the inner div...
this.heightDiv = document.createElement("div");
this.heightDiv.style.width = "1px";
this.heightDiv.style.height = parseInt(visibleHeight *
this.metaData.getTotalRows() / this.metaData.getPageSize()) + "px";
this.scrollerDiv.appendChild(this.heightDiv);
this.scrollerDiv.onscroll = this.handleScroll.bindAsEventListener(this);
var table = this.liveGrid.table;
table.parentNode.parentNode.insertBefore(this.scrollerDiv, table.parentNode.nextSibling);
},
updateSize: function() {
var table = this.liveGrid.table;
var visibleHeight = this.viewPort.visibleHeight();
this.heightDiv.style.height = parseInt(visibleHeight *
this.metaData.getTotalRows() / this.metaData.getPageSize()) + "px";
},
rowToPixel: function(rowOffset) {
return (rowOffset / this.metaData.getTotalRows()) * this.heightDiv.offsetHeight
},
moveScroll: function(rowOffset) {
this.scrollerDiv.scrollTop = this.rowToPixel(rowOffset);
if (this.metaData.options.onscroll)
this.metaData.options.onscroll(this.liveGrid, rowOffset);
},
handleScroll: function() {
if (this.scrollTimeout)
clearTimeout(this.scrollTimeout);
var contentOffset = parseInt(this.scrollerDiv.scrollTop / this.viewPort.rowHeight);
this.liveGrid.requestContentRefresh(contentOffset);
this.viewPort.scrollTo(this.scrollerDiv.scrollTop);
if (this.metaData.options.onscroll)
this.metaData.options.onscroll(this.liveGrid, contentOffset);
this.scrollTimeout = setTimeout(this.scrollIdle.bind(this), 1200);
},
scrollIdle: function() {
if (this.metaData.options.onscrollidle)
this.metaData.options.onscrollidle();
}
};
// Rico.LiveGridBuffer -----------------------------------------------------
Rico.LiveGridBuffer = Class.create();
Rico.LiveGridBuffer.prototype = {
initialize: function(metaData, viewPort) {
this.startPos = 0;
this.size = 0;
this.metaData = metaData;
this.rows = new Array();
this.updateInProgress = false;
this.viewPort = viewPort;
this.maxBufferSize = metaData.getLargeBufferSize() * 2;
this.maxFetchSize = metaData.getLargeBufferSize();
this.lastOffset = 0;
},
getBlankRow: function() {
if (!this.blankRow) {
this.blankRow = new Array();
for (var i = 0; i < this.metaData.columnCount; i++)
this.blankRow[i] = " ";
}
return this.blankRow;
},
loadRows: function(ajaxResponse) {
var rowsElement = ajaxResponse.getElementsByTagName('rows')[0];
this.updateUI = rowsElement.getAttribute("update_ui") == "true"
var newRows = new Array()
var trs = rowsElement.getElementsByTagName("tr");
for (var i = 0; i < trs.length; i++) {
var row = newRows[i] = new Array();
var cells = trs[i].getElementsByTagName("td");
for (var j = 0; j < cells.length; j++) {
var cell = cells[j];
var convertSpaces = cell.getAttribute("convert_spaces") == "true";
var cellContent = RicoUtil.getContentAsString(cell);
row[j] = convertSpaces ? this.convertSpaces(cellContent) : cellContent;
if (!row[j])
row[j] = ' ';
}
}
return newRows;
},
update: function(ajaxResponse, start) {
var newRows = this.loadRows(ajaxResponse);
if (this.rows.length == 0) { // initial load
this.rows = newRows;
this.size = this.rows.length;
this.startPos = start;
return;
}
if (start > this.startPos) { //appending
if (this.startPos + this.rows.length < start) {
this.rows = newRows;
this.startPos = start;//
} else {
this.rows = this.rows.concat(newRows.slice(0, newRows.length));
if (this.rows.length > this.maxBufferSize) {
var fullSize = this.rows.length;
this.rows = this.rows.slice(this.rows.length - this.maxBufferSize, this.rows.length)
this.startPos = this.startPos + (fullSize - this.rows.length);
}
}
} else { //prepending
if (start + newRows.length < this.startPos) {
this.rows = newRows;
} else {
this.rows = newRows.slice(0, this.startPos).concat(this.rows);
if (this.rows.length > this.maxBufferSize)
this.rows = this.rows.slice(0, this.maxBufferSize)
}
this.startPos = start;
}
this.size = this.rows.length;
},
clear: function() {
this.rows = new Array();
this.startPos = 0;
this.size = 0;
},
isOverlapping: function(start, size) {
return ((start < this.endPos()) && (this.startPos < start + size)) || (this.endPos() == 0)
},
isInRange: function(position) {
return (position >= this.startPos) && (position + this.metaData.getPageSize() <= this.endPos());
//&& this.size() != 0;
},
isNearingTopLimit: function(position) {
return position - this.startPos < this.metaData.getLimitTolerance();
},
endPos: function() {
return this.startPos + this.rows.length;
},
isNearingBottomLimit: function(position) {
return this.endPos() - (position + this.metaData.getPageSize()) < this.metaData.getLimitTolerance();
},
isAtTop: function() {
return this.startPos == 0;
},
isAtBottom: function() {
return this.endPos() == this.metaData.getTotalRows();
},
isNearingLimit: function(position) {
return ( !this.isAtTop() && this.isNearingTopLimit(position)) ||
( !this.isAtBottom() && this.isNearingBottomLimit(position) )
},
getFetchSize: function(offset) {
var adjustedOffset = this.getFetchOffset(offset);
var adjustedSize = 0;
if (adjustedOffset >= this.startPos) { //apending
var endFetchOffset = this.maxFetchSize + adjustedOffset;
if (endFetchOffset > this.metaData.totalRows)
endFetchOffset = this.metaData.totalRows;
adjustedSize = endFetchOffset - adjustedOffset;
} else {//prepending
var adjustedSize = this.startPos - adjustedOffset;
if (adjustedSize > this.maxFetchSize)
adjustedSize = this.maxFetchSize;
}
return adjustedSize;
},
getFetchOffset: function(offset) {
var adjustedOffset = offset;
if (offset > this.startPos) //apending
adjustedOffset = (offset > this.endPos()) ? offset : this.endPos();
else { //prepending
if (offset + this.maxFetchSize >= this.startPos) {
var adjustedOffset = this.startPos - this.maxFetchSize;
if (adjustedOffset < 0)
adjustedOffset = 0;
}
}
this.lastOffset = adjustedOffset;
return adjustedOffset;
},
getRows: function(start, count) {
var begPos = start - this.startPos
var endPos = begPos + count
// er? need more data...
if (endPos > this.size)
endPos = this.size
var results = new Array()
var index = 0;
for (var i = begPos; i < endPos; i++) {
results[index++] = this.rows[i]
}
return results
},
convertSpaces: function(s) {
return s.split(" ").join(" ");
}
};
//Rico.GridViewPort --------------------------------------------------
Rico.GridViewPort = Class.create();
Rico.GridViewPort.prototype = {
initialize: function(table, rowHeight, visibleRows, buffer, liveGrid) {
this.lastDisplayedStartPos = 0;
this.div = table.parentNode;
this.table = table
this.rowHeight = rowHeight;
this.div.style.height = this.rowHeight * visibleRows;
this.div.style.overflow = "hidden";
this.buffer = buffer;
this.liveGrid = liveGrid;
this.visibleRows = visibleRows + 1;
this.lastPixelOffset = 0;
this.startPos = 0;
},
populateRow: function(htmlRow, row) {
for (var j = 0; j < row.length; j++) {
htmlRow.cells[j].innerHTML = row[j]
}
},
bufferChanged: function() {
this.refreshContents(parseInt(this.lastPixelOffset / this.rowHeight));
},
clearRows: function() {
if (!this.isBlank) {
for (var i = 0; i < this.visibleRows; i++)
this.populateRow(this.table.rows[i], this.buffer.getBlankRow());
this.isBlank = true;
}
},
clearContents: function() {
this.clearRows();
this.scrollTo(0);
this.startPos = 0;
this.lastStartPos = -1;
},
refreshContents: function(startPos) {
if (startPos == this.lastRowPos && !this.isPartialBlank && !this.isBlank) {
return;
}
if ((startPos + this.visibleRows < this.buffer.startPos)
|| (this.buffer.startPos + this.buffer.size < startPos)
|| (this.buffer.size == 0)) {
this.clearRows();
return;
}
this.isBlank = false;
var viewPrecedesBuffer = this.buffer.startPos > startPos
var contentStartPos = viewPrecedesBuffer ? this.buffer.startPos : startPos;
var contentEndPos = (this.buffer.startPos + this.buffer.size < startPos + this.visibleRows)
? this.buffer.startPos + this.buffer.size
: startPos + this.visibleRows;
var rowSize = contentEndPos - contentStartPos;
var rows = this.buffer.getRows(contentStartPos, rowSize);
var blankSize = this.visibleRows - rowSize;
var blankOffset = viewPrecedesBuffer ? 0 : rowSize;
var contentOffset = viewPrecedesBuffer ? blankSize : 0;
for (var i = 0; i < rows.length; i++) {//initialize what we have
this.populateRow(this.table.rows[i + contentOffset], rows[i]);
}
for (var i = 0; i < blankSize; i++) {// blank out the rest
this.populateRow(this.table.rows[i + blankOffset], this.buffer.getBlankRow());
}
this.isPartialBlank = blankSize > 0;
this.lastRowPos = startPos;
},
scrollTo: function(pixelOffset) {
if (this.lastPixelOffset == pixelOffset)
return;
this.refreshContents(parseInt(pixelOffset / this.rowHeight))
this.div.scrollTop = pixelOffset % this.rowHeight
this.lastPixelOffset = pixelOffset;
},
visibleHeight: function() {
return parseInt(this.div.style.height);
}
};
Rico.LiveGridRequest = Class.create();
Rico.LiveGridRequest.prototype = {
initialize: function(requestOffset, options) {
this.requestOffset = requestOffset;
}
};
// Rico.LiveGrid -----------------------------------------------------
Rico.LiveGrid = Class.create();
Rico.LiveGrid.prototype = {
initialize: function(tableId, visibleRows, totalRows, url, options) {
if (options == null)
options = {};
this.tableId = tableId;
this.table = $(tableId);
var columnCount = this.table.rows[0].cells.length
this.metaData = new Rico.LiveGridMetaData(visibleRows, totalRows, columnCount, options);
this.buffer = new Rico.LiveGridBuffer(this.metaData);
var rowCount = this.table.rows.length;
this.viewPort = new Rico.GridViewPort(this.table,
this.table.offsetHeight / rowCount,
visibleRows,
this.buffer, this);
this.scroller = new Rico.LiveGridScroller(this, this.viewPort);
this.additionalParms = options.requestParameters || [];
options.sortHandler = this.sortHandler.bind(this);
if ($(tableId + '_header'))
this.sort = new Rico.LiveGridSort(tableId + '_header', options)
this.processingRequest = null;
this.unprocessedRequest = null;
this.initAjax(url);
if (options.prefetchBuffer || options.prefetchOffset > 0) {
var offset = 0;
if (options.offset) {
offset = options.offset;
this.scroller.moveScroll(offset);
this.viewPort.scrollTo(this.scroller.rowToPixel(offset));
}
if (options.sortCol) {
this.sortCol = options.sortCol;
this.sortDir = options.sortDir;
}
this.requestContentRefresh(offset);
}
},
resetContents: function() {
this.scroller.moveScroll(0);
this.buffer.clear();
this.viewPort.clearContents();
},
sortHandler: function(column) {
this.sortCol = column.name;
this.sortDir = column.currentSort;
this.resetContents();
this.requestContentRefresh(0)
},
setRequestParams: function() {
this.additionalParms = [];
for (var i = 0; i < arguments.length; i++)
this.additionalParms[i] = arguments[i];
},
setTotalRows: function(newTotalRows) {
this.resetContents();
this.metaData.setTotalRows(newTotalRows);
this.scroller.updateSize();
},
initAjax: function(url) {
ajaxEngine.registerRequest(this.tableId + '_request', url);
ajaxEngine.registerAjaxObject(this.tableId + '_updater', this);
},
invokeAjax: function() {
},
handleTimedOut: function() {
//server did not respond in 4 seconds... assume that there could have been
//an error or something, and allow requests to be processed again...
this.processingRequest = null;
this.processQueuedRequest();
},
fetchBuffer: function(offset) {
if (this.buffer.isInRange(offset) &&
!this.buffer.isNearingLimit(offset)) {
return;
}
if (this.processingRequest) {
this.unprocessedRequest = new Rico.LiveGridRequest(offset);
return;
}
var bufferStartPos = this.buffer.getFetchOffset(offset);
this.processingRequest = new Rico.LiveGridRequest(offset);
this.processingRequest.bufferOffset = bufferStartPos;
var fetchSize = this.buffer.getFetchSize(offset);
var partialLoaded = false;
var callParms = [];
callParms.push(this.tableId + '_request');
callParms.push('id=' + this.tableId);
callParms.push('page_size=' + fetchSize);
callParms.push('offset=' + bufferStartPos);
if (this.sortCol) {
callParms.push('sort_col=' + this.sortCol);
callParms.push('sort_dir=' + this.sortDir);
}
for (var i = 0; i < this.additionalParms.length; i++)
callParms.push(this.additionalParms[i]);
ajaxEngine.sendRequest.apply(ajaxEngine, callParms);
this.timeoutHandler = setTimeout(this.handleTimedOut.bind(this), 20000); //todo: make as option
},
requestContentRefresh: function(contentOffset) {
this.fetchBuffer(contentOffset);
},
ajaxUpdate: function(ajaxResponse) {
try {
clearTimeout(this.timeoutHandler);
this.buffer.update(ajaxResponse, this.processingRequest.bufferOffset);
this.viewPort.bufferChanged();
}
catch(err) {
}
finally {
this.processingRequest = null;
}
this.processQueuedRequest();
},
processQueuedRequest: function() {
if (this.unprocessedRequest != null) {
this.requestContentRefresh(this.unprocessedRequest.requestOffset);
this.unprocessedRequest = null
}
}
};
//-------------------- ricoLiveGridSort.js
Rico.LiveGridSort = Class.create();
Rico.LiveGridSort.prototype = {
initialize: function(headerTableId, options) {
this.headerTableId = headerTableId;
this.headerTable = $(headerTableId);
this.setOptions(options);
this.applySortBehavior();
if (this.options.sortCol) {
this.setSortUI(this.options.sortCol, this.options.sortDir);
}
},
setSortUI: function(columnName, sortDirection) {
var cols = this.options.columns;
for (var i = 0; i < cols.length; i++) {
if (cols[i].name == columnName) {
this.setColumnSort(i, sortDirection);
break;
}
}
},
setOptions: function(options) {
this.options = {
sortAscendImg: 'images/sort_asc.gif',
sortDescendImg: 'images/sort_desc.gif',
imageWidth: 9,
imageHeight: 5,
ajaxSortURLParms: []
}.extend(options);
// preload the images...
new Image().src = this.options.sortAscendImg;
new Image().src = this.options.sortDescendImg;
this.sort = options.sortHandler;
if (!this.options.columns)
this.options.columns = this.introspectForColumnInfo();
else {
// allow client to pass { columns: [ ["a", true], ["b", false] ] }
// and convert to an array of Rico.TableColumn objs...
this.options.columns = this.convertToTableColumns(this.options.columns);
}
},
applySortBehavior: function() {
var headerRow = this.headerTable.rows[0];
var headerCells = headerRow.cells;
for (var i = 0; i < headerCells.length; i++) {
this.addSortBehaviorToColumn(i, headerCells[i]);
}
},
addSortBehaviorToColumn: function(n, cell) {
if (this.options.columns[n].isSortable()) {
cell.id = this.headerTableId + '_' + n;
cell.style.cursor = 'pointer';
cell.onclick = this.headerCellClicked.bindAsEventListener(this);
cell.innerHTML = cell.innerHTML + '<span id="' + this.headerTableId + '_img_' + n + '">'
+ ' </span>';
}
},
// event handler....
headerCellClicked: function(evt) {
var eventTarget = evt.target ? evt.target : evt.srcElement;
var cellId = eventTarget.id;
var columnNumber = parseInt(cellId.substring(cellId.lastIndexOf('_') + 1));
var sortedColumnIndex = this.getSortedColumnIndex();
if (sortedColumnIndex != -1) {
if (sortedColumnIndex != columnNumber) {
this.removeColumnSort(sortedColumnIndex);
this.setColumnSort(columnNumber, Rico.TableColumn.SORT_ASC);
}
else
this.toggleColumnSort(sortedColumnIndex);
}
else
this.setColumnSort(columnNumber, Rico.TableColumn.SORT_ASC);
if (this.options.sortHandler) {
this.options.sortHandler(this.options.columns[columnNumber]);
}
},
removeColumnSort: function(n) {
this.options.columns[n].setUnsorted();
this.setSortImage(n);
},
setColumnSort: function(n, direction) {
this.options.columns[n].setSorted(direction);
this.setSortImage(n);
},
toggleColumnSort: function(n) {
this.options.columns[n].toggleSort();
this.setSortImage(n);
},
setSortImage: function(n) {
var sortDirection = this.options.columns[n].getSortDirection();
var sortImageSpan = $(this.headerTableId + '_img_' + n);
if (sortDirection == Rico.TableColumn.UNSORTED)
sortImageSpan.innerHTML = ' ';
else if (sortDirection == Rico.TableColumn.SORT_ASC)
sortImageSpan.innerHTML = ' <img width="' + this.options.imageWidth + '" ' +
'height="' + this.options.imageHeight + '" ' +
'src="' + this.options.sortAscendImg + '"/>';
else if (sortDirection == Rico.TableColumn.SORT_DESC)
sortImageSpan.innerHTML = ' <img width="' + this.options.imageWidth + '" ' +
'height="' + this.options.imageHeight + '" ' +
'src="' + this.options.sortDescendImg + '"/>';
},
getSortedColumnIndex: function() {
var cols = this.options.columns;
for (var i = 0; i < cols.length; i++) {
if (cols[i].isSorted())
return i;
}
return -1;
},
introspectForColumnInfo: function() {
var columns = new Array();
var headerRow = this.headerTable.rows[0];
var headerCells = headerRow.cells;
for (var i = 0; i < headerCells.length; i++)
columns.push(new Rico.TableColumn(this.deriveColumnNameFromCell(headerCells[i], i), true));
return columns;
},
convertToTableColumns: function(cols) {
var columns = new Array();
for (var i = 0; i < cols.length; i++)
columns.push(new Rico.TableColumn(cols[i][0], cols[i][1]));
},
deriveColumnNameFromCell: function(cell, columnNumber) {
var cellContent = cell.innerText != undefined ? cell.innerText : cell.textContent;
return cellContent ? cellContent.toLowerCase().split(' ').join('_') : "col_" + columnNumber;
}
};
Rico.TableColumn = Class.create();
Rico.TableColumn.UNSORTED = 0;
Rico.TableColumn.SORT_ASC = "ASC";
Rico.TableColumn.SORT_DESC = "DESC";
Rico.TableColumn.prototype = {
initialize: function(name, sortable) {
this.name = name;
this.sortable = sortable;
this.currentSort = Rico.TableColumn.UNSORTED;
},
isSortable: function() {
return this.sortable;
},
isSorted: function() {
return this.currentSort != Rico.TableColumn.UNSORTED;
},
getSortDirection: function() {
return this.currentSort;
},
toggleSort: function() {
if (this.currentSort == Rico.TableColumn.UNSORTED || this.currentSort == Rico.TableColumn.SORT_DESC)
this.currentSort = Rico.TableColumn.SORT_ASC;
else if (this.currentSort == Rico.TableColumn.SORT_ASC)
this.currentSort = Rico.TableColumn.SORT_DESC;
},
setUnsorted: function(direction) {
this.setSorted(Rico.TableColumn.UNSORTED);
},
setSorted: function(direction) {
// direction must by one of Rico.TableColumn.UNSORTED, .SORT_ASC, or .SET_DESC...
this.currentSort = direction;
}
};
//-------------------- ricoUtil.js
var RicoUtil = {
getElementsComputedStyle: function (htmlElement, cssProperty, mozillaEquivalentCSS) {
if (arguments.length == 2)
mozillaEquivalentCSS = cssProperty;
var el = $(htmlElement);
if (el.currentStyle)
return el.currentStyle[cssProperty];
else
return document.defaultView.getComputedStyle(el, null).getPropertyValue(mozillaEquivalentCSS);
},
createXmlDocument : function() {
if (document.implementation && document.implementation.createDocument) {
var doc = document.implementation.createDocument("", "", null);
if (doc.readyState == null) {
doc.readyState = 1;
doc.addEventListener("load", function () {
doc.readyState = 4;
if (typeof doc.onreadystatechange == "function")
doc.onreadystatechange();
}, false);
}
return doc;
}
if (window.ActiveXObject)
return Try.these(
function() {
return new ActiveXObject('MSXML2.DomDocument')
},
function() {
return new ActiveXObject('Microsoft.DomDocument')
},
function() {
return new ActiveXObject('MSXML.DomDocument')
},
function() {
return new ActiveXObject('MSXML3.DomDocument')
}
) || false;
return null;
},
getContentAsString: function(parentNode) {
return parentNode.xml != undefined ?
this._getContentAsStringIE(parentNode) :
this._getContentAsStringMozilla(parentNode);
},
_getContentAsStringIE: function(parentNode) {
var contentStr = "";
for (var i = 0; i < parentNode.childNodes.length; i++)
contentStr += parentNode.childNodes[i].xml;
return contentStr;
},
_getContentAsStringMozilla: function(parentNode) {
var xmlSerializer = new XMLSerializer();
var contentStr = "";
for (var i = 0; i < parentNode.childNodes.length; i++)
contentStr += xmlSerializer.serializeToString(parentNode.childNodes[i]);
return contentStr;
},
toViewportPosition: function(element) {
return this._toAbsolute(element, true);
},
toDocumentPosition: function(element) {
return this._toAbsolute(element, false);
},
/**
* Compute the elements position in terms of the window viewport
* so that it can be compared to the position of the mouse (dnd)
* This is additions of all the offsetTop,offsetLeft values up the
* offsetParent hierarchy, ...taking into account any scrollTop,
* scrollLeft values along the way...
*
* IE has a bug reporting a correct offsetLeft of elements within a
* a relatively positioned parent!!!
**/
_toAbsolute: function(element, accountForDocScroll) {
if (navigator.userAgent.toLowerCase().indexOf("msie") == -1)
return this._toAbsoluteMozilla(element, accountForDocScroll);
var x = 0;
var y = 0;
var parent = element;
while (parent) {
var borderXOffset = 0;
var borderYOffset = 0;
if (parent != element) {
var borderXOffset = parseInt(this.getElementsComputedStyle(parent, "borderLeftWidth"));
var borderYOffset = parseInt(this.getElementsComputedStyle(parent, "borderTopWidth"));
borderXOffset = isNaN(borderXOffset) ? 0 : borderXOffset;
borderYOffset = isNaN(borderYOffset) ? 0 : borderYOffset;
}
x += parent.offsetLeft - parent.scrollLeft + borderXOffset;
y += parent.offsetTop - parent.scrollTop + borderYOffset;
parent = parent.offsetParent;
}
if (accountForDocScroll) {
x -= this.docScrollLeft();
y -= this.docScrollTop();
}
return { x:x, y:y };
},
/**
* Mozilla did not report all of the parents up the hierarchy via the
* offsetParent property that IE did. So for the calculation of the
* offsets we use the offsetParent property, but for the calculation of
* the scrollTop/scrollLeft adjustments we navigate up via the parentNode
* property instead so as to get the scroll offsets...
*
**/
_toAbsoluteMozilla: function(element, accountForDocScroll) {
var x = 0;
var y = 0;
var parent = element;
while (parent) {
x += parent.offsetLeft;
y += parent.offsetTop;
parent = parent.offsetParent;
}
parent = element;
while (parent &&
parent != document.body &&
parent != document.documentElement) {
if (parent.scrollLeft)
x -= parent.scrollLeft;
if (parent.scrollTop)
y -= parent.scrollTop;
parent = parent.parentNode;
}
if (accountForDocScroll) {
x -= this.docScrollLeft();
y -= this.docScrollTop();
}
return { x:x, y:y };
},
docScrollLeft: function() {
if (window.pageXOffset)
return window.pageXOffset;
else if (document.documentElement && document.documentElement.scrollLeft)
return document.documentElement.scrollLeft;
else if (document.body)
return document.body.scrollLeft;
else
return 0;
},
docScrollTop: function() {
if (window.pageYOffset)
return window.pageYOffset;
else if (document.documentElement && document.documentElement.scrollTop)
return document.documentElement.scrollTop;
else if (document.body)
return document.body.scrollTop;
else
return 0;
}
};
| 32.113961 | 118 | 0.572804 |
7378f4f388e34aa0ee218c19d4bac8bf23fc5e87 | 1,904 | js | JavaScript | src/asyoutypeformatter.js | Billhop/i18n.phonenumbers.js | 35a0462616f3bed9807e6668814cc28d4d4545a1 | [
"Apache-2.0"
] | 21 | 2015-03-05T12:06:44.000Z | 2020-12-01T06:24:50.000Z | src/asyoutypeformatter.js | Billhop/i18n.phonenumbers.js | 35a0462616f3bed9807e6668814cc28d4d4545a1 | [
"Apache-2.0"
] | 26 | 2015-03-06T16:10:46.000Z | 2021-06-01T12:32:23.000Z | src/asyoutypeformatter.js | Billhop/i18n.phonenumbers.js | 35a0462616f3bed9807e6668814cc28d4d4545a1 | [
"Apache-2.0"
] | 15 | 2015-09-18T20:07:51.000Z | 2019-08-09T20:22:43.000Z | 'use strict';
goog.provide('leodido.i18n.AsYoutTypeFormatter');
goog.require('i18n.phonenumbers.AsYouTypeFormatter');
/**
* Real-time phone number formatter
*
* @param {i18n.phonenumbers.RegionCode} regionCode
* @constructor
*/
var Formatter = function(regionCode) {
this.formatter = new i18n.phonenumbers.AsYouTypeFormatter(regionCode);
};
/**
* Formats a phone number on-the-fly as each digit is entered.
* @param {string} nextChar
* @return {string}
*/
Formatter.prototype.inputDigit = function(nextChar) {
return this.formatter.inputDigit(nextChar);
};
/**
Same as {@link #inputDigit}, but remembers the position where
* {@code nextChar} is inserted, so that it can be retrieved later by using
* {@link #getRememberedPosition}. The remembered position will be automatically
* adjusted if additional formatting characters are later inserted/removed in
* front of {@code nextChar}.
*
* @param {string} nextChar
* @return {string}
*/
Formatter.prototype.inputDigitAndRememberPosition = function(nextChar) {
return this.formatter.inputDigitAndRememberPosition(nextChar);
};
/**
* Returns the current position in the partially formatted phone number of the
* character which was previously passed in as the parameter of
* {@link #inputDigitAndRememberPosition}.
*
* @return {number}
*/
Formatter.prototype.getRememberedPosition = function() {
return this.formatter.getRememberedPosition();
};
goog.exportSymbol('leodido.i18n.AsYouTypeFormatter', Formatter);
goog.exportSymbol('leodido.i18n.AsYouTypeFormatter.prototype.inputDigit', Formatter.prototype.inputDigit);
goog.exportSymbol(
'leodido.i18n.AsYouTypeFormatter.prototype.inputDigitAndRememberPosition',
Formatter.prototype.inputDigitAndRememberPosition
);
goog.exportSymbol(
'leodido.i18n.AsYouTypeFormatter.prototype.getRememberedPosition',
Formatter.prototype.getRememberedPosition
);
| 28 | 106 | 0.768908 |
7379187bcc465b886f03fed14b88ff1b64a30bda | 132 | js | JavaScript | spec/support/packages/mrt-test-pkg1-by-path/package.js | fariasf/meteorite | 35e8d5ee9df33b749527c413b28a4fee73273eae | [
"MIT"
] | 130 | 2015-01-03T00:52:18.000Z | 2021-11-29T19:15:28.000Z | spec/support/packages/mrt-test-pkg2-by-path/package.js | squallyan/meteorite | 35e8d5ee9df33b749527c413b28a4fee73273eae | [
"MIT"
] | 14 | 2015-02-06T09:21:22.000Z | 2018-11-10T18:42:24.000Z | spec/support/packages/mrt-test-pkg2-by-path/package.js | squallyan/meteorite | 35e8d5ee9df33b749527c413b28a4fee73273eae | [
"MIT"
] | 27 | 2015-01-20T14:59:57.000Z | 2018-09-16T21:03:10.000Z | Package.describe({
summary: "mrt test package 1"
});
Package.on_use(function (api) {
api.add_files('server.js', 'server');
});
| 16.5 | 39 | 0.659091 |
73796ccfc726b2ef0caf0bf5abde3d590d9d5b4a | 28 | js | JavaScript | src/parser/test/flow/types/interfaces/migrated_0004.js | oonsamyi/flow | 9739400610f400ed50b6b921a79642563642b7fe | [
"MIT"
] | 20,996 | 2015-01-01T13:51:47.000Z | 2022-03-31T17:44:01.000Z | src/parser/test/flow/types/interfaces/migrated_0004.js | oonsamyi/flow | 9739400610f400ed50b6b921a79642563642b7fe | [
"MIT"
] | 8,315 | 2015-01-01T19:56:43.000Z | 2022-03-31T15:58:10.000Z | src/parser/test/flow/types/interfaces/migrated_0004.js | oonsamyi/flow | 9739400610f400ed50b6b921a79642563642b7fe | [
"MIT"
] | 2,338 | 2015-01-05T03:28:26.000Z | 2022-03-26T20:40:56.000Z | interface A extends B, C {}
| 14 | 27 | 0.678571 |
7379b7408b7ea96c20e176b5103425398b0e93f6 | 1,847 | js | JavaScript | src/js/coin.js | vanmars/functional_programming-exercises | 6dc39377073025d97bc19fcf86b707fe776cda71 | [
"Unlicense"
] | 1 | 2021-08-25T03:40:34.000Z | 2021-08-25T03:40:34.000Z | src/js/coin.js | vanmars/functional_programming-exercises | 6dc39377073025d97bc19fcf86b707fe776cda71 | [
"Unlicense"
] | null | null | null | src/js/coin.js | vanmars/functional_programming-exercises | 6dc39377073025d97bc19fcf86b707fe776cda71 | [
"Unlicense"
] | null | null | null | // Solution with Recursion
export const coinCounterRecursion = (num) => {
if (isNaN(num)) {
return "Please enter a number."
};
if (num === 0) {
return "";
} else if (num/25 >= 1) {
const quarters = Math.floor(num/25);
return `${quarters} quarters ` + coinCounterRecursion(num - quarters*25);
} else if (num/10 >= 1) {
const dimes = Math.floor(num/10);
return `${dimes} dimes ` + coinCounterRecursion(num - dimes*10);
} else if (num/5 >= 1) {
const nickels = Math.floor(num/5);
return `${nickels} nickels ` + coinCounterRecursion(num - nickels*5);
} else {
const pennies = num
return `${pennies} pennies ` + coinCounterRecursion(0);
};
}
// Two Solutions - Both Using Closures (First returns string listing all coins; second allows you to specify which type of coin you want to see the change for.)
export const coinCounterClosure1 = (num) => {
const quarters = Math.floor(num/25);
const dimes = Math.floor((num - quarters*25)/10);
const nickels = Math.floor((num - quarters*25 - dimes*10)/5);
const pennies = Math.floor((num - quarters*25 - dimes*10 - nickels*5));
return function displayChange(){
return `${quarters} quarters ${dimes} dimes ${nickels} nickels ${pennies} pennies`;
}
}
export const coinCounterClosure2 = (num) => {
const quarters = Math.floor(num/25);
const dimes = Math.floor((num - quarters*25)/10);
const nickels = Math.floor((num - quarters*25 - dimes*10)/5);
const pennies = Math.floor((num - quarters*25 - dimes*10 - nickels*5));
return function displayParticularChange(coin) {
if (coin.toLowerCase() === "quarters") {
return quarters;
} else if (coin.toLowerCase() === "dimes") {
return dimes;
} else if (coin.toLowerCase() === "nickels") {
return nickels;
} else {
return pennies;
}
}
}
| 36.215686 | 160 | 0.639415 |
737a2f04431ec0211cc06de50f675cdc9d525354 | 2,169 | js | JavaScript | Modules/CommerceSystem/Views/js/commerce-rma-support.js | nantcom/NancyBlack | f7029a86f8a21cdc2f704aac35e15ef9faeb5eb6 | [
"MS-PL"
] | 12 | 2015-05-09T00:19:53.000Z | 2021-11-15T15:11:32.000Z | Modules/CommerceSystem/Views/js/commerce-rma-support.js | nantcom/NancyBlack | f7029a86f8a21cdc2f704aac35e15ef9faeb5eb6 | [
"MS-PL"
] | 1 | 2020-07-15T22:35:13.000Z | 2020-07-15T22:35:13.000Z | Modules/CommerceSystem/Views/js/commerce-rma-support.js | nantcom/NancyBlack | f7029a86f8a21cdc2f704aac35e15ef9faeb5eb6 | [
"MS-PL"
] | 5 | 2015-07-24T04:06:06.000Z | 2020-08-10T04:25:30.000Z |
(function () {
var mod = angular.module('Page', []);
mod.controller('PageController', function ($scope, $http, $sce) {
var me = this;
$scope.object = window.allData.RMA;
$scope.rmaItems = window.allData.RMAItems;
$scope.branding = window.branding;
$scope.isAdmin = window.isAdmin == "True" ? true : false;
$scope.allStatus = ["InQueue", "CheckingIssues", "ResearchOnSolution", "WaitingForParts", "ReassembleAndTesting", "ReadyToShip", "Shipped", "Delivered"];
$scope.methods = ["DHL", "Kerry", "Carrying"];
$scope.isSerialSaving = false;
$scope.newRMAItem = {};
for (var i = 0; i < $scope.allStatus.length; i++) {
if ($scope.object.Status == $scope.allStatus[i]) {
$scope.StatusState = i;
}
}
me.addRMAItem = function () {
$scope.isSerialSaving = true;
$http.post("/rma/" + $scope.object.RMAIdentifier + "/add", $scope.newRMAItem)
.then(function (success) {
alert("Sucess! Please refresh view");
$scope.isSerialSaving = false;
}, function (error) {
alert(error.message);
$scope.isSerialSaving = false;
});
}
console.log("WARNING: Using Status list from client side");
me.getTrackUrl = function (trackingNumber, method) {
if (trackingNumber == null) {
return null;
}
if (method == $scope.methods[0]) {
return $sce.trustAsResourceUrl('http://www.dhl.com/cgi-bin/tracking.pl?AWB=' + trackingNumber);
}
if (method == $scope.methods[1]) {
return $sce.trustAsResourceUrl('https://track.aftership.com/kerry-logistics/' + trackingNumber);
}
}
me.showTransferInfo = function () {
swal(window.bankInfo);
};
});
mod.filter('newline', function ($sce) {
return function (input) {
return $sce.trustAsHtml(input.replace(/\n/g, "<br/>"));
}
});
})(); | 31.897059 | 161 | 0.521899 |
737b23490db3fd72f5cd50c1d2b1bf2177bdd2a7 | 2,916 | js | JavaScript | web-client/integration-tests/caseFromPaperDocumentScan.test.js | codyseibert/ef-cms | 5abde1b6e06719c016bbdadf7046baf3c749b9f4 | [
"CC0-1.0"
] | 52 | 2018-09-16T17:05:55.000Z | 2022-02-28T15:30:54.000Z | web-client/integration-tests/caseFromPaperDocumentScan.test.js | codyseibert/ef-cms | 5abde1b6e06719c016bbdadf7046baf3c749b9f4 | [
"CC0-1.0"
] | 2,108 | 2018-10-10T18:39:26.000Z | 2022-03-31T16:30:12.000Z | web-client/integration-tests/caseFromPaperDocumentScan.test.js | codyseibert/ef-cms | 5abde1b6e06719c016bbdadf7046baf3c749b9f4 | [
"CC0-1.0"
] | 23 | 2018-10-09T21:02:23.000Z | 2022-02-22T10:09:37.000Z | import { fakeFile, loginAs, setupTest } from './helpers';
import { petitionsClerkAddsScannedBatch } from './journey/petitionsClerkAddsScannedBatch';
import { petitionsClerkCreatesNewCase } from './journey/petitionsClerkCreatesNewCase';
import { petitionsClerkCreatesScannedPDF } from './journey/petitionsClerkCreatesScannedPDF';
import { petitionsClerkDeletesMultipleScannedBatches } from './journey/petitionsClerkDeletesMultipleScannedBatches';
import { petitionsClerkDeletesScannedBatch } from './journey/petitionsClerkDeletesScannedBatch';
import { petitionsClerkRescansAddedBatch } from './journey/petitionsClerkRescansAddedBatch';
import { petitionsClerkSelectsScannerSource } from './journey/petitionsClerkSelectsScannerSource';
import { petitionsClerkSubmitsPaperCaseToIrs } from './journey/petitionsClerkSubmitsPaperCaseToIrs';
import { petitionsClerkViewsCreateNewCase } from './journey/petitionsClerkViewsCreateNewCase';
import { petitionsClerkViewsScanView } from './journey/petitionsClerkViewsScanView';
import { practitionerViewsCaseDetailWithPaperService } from './journey/practitionerViewsCaseDetailWithPaperService';
const cerebralTest = setupTest();
describe('Case from Paper Document Scan journey', () => {
let scannerSourceIndex = 0;
let scannerSourceName = 'scanner A';
beforeEach(() => {
jest.setTimeout(30000);
global.window.localStorage.getItem = key => {
if (key === 'scannerSourceIndex') {
return `"${scannerSourceIndex}"`;
}
if (key === 'scannerSourceName') {
return `"${scannerSourceName}"`;
}
return null;
};
});
afterAll(() => {
cerebralTest.closeSocket();
});
loginAs(cerebralTest, 'petitionsclerk@example.com');
petitionsClerkViewsCreateNewCase(cerebralTest);
petitionsClerkViewsScanView(cerebralTest);
petitionsClerkSelectsScannerSource(cerebralTest, {
scannerSourceIndex,
scannerSourceName,
});
petitionsClerkAddsScannedBatch(cerebralTest, {
scannerSourceIndex,
scannerSourceName,
});
petitionsClerkDeletesScannedBatch(cerebralTest);
petitionsClerkAddsScannedBatch(cerebralTest, {
scannerSourceIndex,
scannerSourceName,
});
petitionsClerkAddsScannedBatch(cerebralTest, {
scannerSourceIndex,
scannerSourceName,
});
petitionsClerkDeletesMultipleScannedBatches(cerebralTest, { numBatches: 2 });
petitionsClerkAddsScannedBatch(cerebralTest, {
scannerSourceIndex,
scannerSourceName,
});
petitionsClerkRescansAddedBatch(cerebralTest);
petitionsClerkAddsScannedBatch(cerebralTest, {
scannerSourceIndex,
scannerSourceName,
});
petitionsClerkCreatesScannedPDF(cerebralTest);
petitionsClerkCreatesNewCase(cerebralTest, fakeFile, undefined, false);
petitionsClerkSubmitsPaperCaseToIrs(cerebralTest);
loginAs(cerebralTest, 'irsPractitioner@example.com');
practitionerViewsCaseDetailWithPaperService(cerebralTest);
});
| 37.87013 | 116 | 0.778807 |
737b49e1d04e5fec4028520951014470a262b47e | 568 | js | JavaScript | src/pages/404.js | abbystvns/abby-stevens | 1add61f33ab812e222a9e47d8d4797ad6a3f59a7 | [
"MIT"
] | null | null | null | src/pages/404.js | abbystvns/abby-stevens | 1add61f33ab812e222a9e47d8d4797ad6a3f59a7 | [
"MIT"
] | null | null | null | src/pages/404.js | abbystvns/abby-stevens | 1add61f33ab812e222a9e47d8d4797ad6a3f59a7 | [
"MIT"
] | 2 | 2019-09-23T19:34:33.000Z | 2019-09-23T22:26:14.000Z | import React from "react"
import Layout from "../components/layout"
import SEO from "../components/seo"
import Error from "../components/error"
const NotFoundPage = () => (
<Layout>
<SEO title="404: Not found" />
<div className="main">
<div className="container">
<div>
<h2>404: NOT FOUND</h2>
<div style={{ width: `25%`, marginBottom: `2rem` }}>
<Error />
</div>
<p>Sorry, that route doesn't exist! </p>
</div>
</div>
</div>
</Layout>
)
export default NotFoundPage
| 23.666667 | 62 | 0.551056 |