text
stringlengths 2
1.05M
|
|---|
/*
Rate limit a function call. Wait is the minimum number of milliseconds between calls.
If leading is true, the first call to the throttled function is immediately called.
If trailing is true, once the wait time has passed the function is called.
This code is cribbed from https://github.com/jashkenas/underscore
*/
let throttle = function(func, wait, leading=true, trailing=true) {
var timeout, context, args, result
var previous = 0
var later = function() {
previous = leading === false ? 0 : Date.now()
timeout = null
result = func.apply(context, args)
if (!timeout) context = args = null
}
var throttled = function() {
var now = Date.now()
if (!previous && leading === false) previous = now
var remaining = wait - (now - previous)
context = this
args = arguments
if (remaining <= 0 || remaining > wait) {
if (timeout) {
clearTimeout(timeout)
timeout = null
}
previous = now
result = func.apply(context, args)
if (!timeout) context = args = null
} else if (!timeout && trailing !== false) {
timeout = setTimeout(later, remaining)
}
return result
}
throttled.cancel = function() {
clearTimeout(timeout)
previous = 0
timeout = context = args = null
}
return throttled
}
let throttledConsoleLog = throttle(function(...params){
console.log(...params)
}, 1000)
export {throttle, throttledConsoleLog}
|
import React, { useEffect, useState, useMemo } from 'react';
import { Content, Input } from './style'
import Header from '../../components/Header/index'
import Label from '../../components/Label/index'
import Button from '../../components/Button/index'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCheck } from '@fortawesome/free-solid-svg-icons'
import { TransitionGroup, CSSTransition } from 'react-transition-group';
import { ToastContainer } from 'react-toastify';
import Camera from '../../assets/camera-digital.svg'
import Message from '../../utils/message'
import api from "../../services/api";
export default function New({ history }) {
const [username, setUsername] = useState('')
const [user, setUserId] = useState('')
const [company, setCompany] = useState('')
const [technologys, setTechs] = useState('')
const [price, setPrice] = useState('')
const [thumbnail, setThumbnail] = useState(null)
const preview = useMemo(() => {
return thumbnail ? URL.createObjectURL(thumbnail) : null
}, [thumbnail])
useEffect(() => {
if (!localStorage.getItem('user')) {
history.push('/')
} else {
const user = JSON.parse(localStorage.getItem('user'))
const { name, _id } = user
setUsername(name)
setUserId(_id)
}
}, [])
async function handleSubmit(event) {
event.preventDefault()
if (!company || !technologys) {
Message({message:'Preencha os campos corretamente',type:'error'})
}
else if(!thumbnail){
Message({message:'Uma imagem é obrigatória',type:'error'})
}else{
const data = new FormData()
data.append('thumbnail',thumbnail)
data.append('company',company)
data.append('price',price)
data.append('technologys',technologys)
const response = await api.post('/spots',data,{
headers:{
user_id:user
}
})
await Message(response.data)
const {type} = response.data
if(type === 'success'){
setCompany('')
setPrice('')
setTechs('')
setThumbnail(null)
setTimeout(()=> history.push('/dashboard'), 1500)
}
}
}
return (
<>
<Header name={username} history={history} />
<TransitionGroup component={null}>
<CSSTransition
timeout={300}
>
<Content>
{}
<form onSubmit={handleSubmit}>
<label
id="file_t"
className={thumbnail ? 'has-thumb' : ''}
style={{ backgroundImage: `url(${preview})` }}>
<Input
type="file"
name="thumbnail"
onChange={event => setThumbnail(event.target.files[0])} />
<img src={Camera} alt="foto" />
</label>
<Label ForI="company" htmlValue="EMPRESA *" />
<Input
type="text"
id="company"
name="company"
placeholder="Sua empresa foda"
value={company}
onChange={event => setCompany(event.target.value.trim())}
/>
<Label forI="techs" htmlValue="TECNOLOGIAS" ele="(separadas por virgula)" />
<Input
type="text"
id="techs"
name="techs"
placeholder="Tecnologias usadas "
value={technologys}
onChange={event => setTechs(event.target.value.trim())}
/>
<Label ForI="price" htmlValue="VALOR DA DIÁRIA" ele="(em branco caso seja GRATUITO)" />
<Input
type="text"
id="price"
name="price"
placeholder=" Preço da diária"
value={price}
onChange={event => setPrice(event.target.value.trim())}
/>
<Button type="submit" text="Cadastrar" icon={<FontAwesomeIcon icon={faCheck} />} />
</form>
</Content>
</CSSTransition>
</TransitionGroup>
<ToastContainer />
</>
);
}
|
/* ********************************************************************************************
* *
* Plese read the following tutorial before implementing tasks: *
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array *
* *
* NOTE : Please do not use loops! All tasks can be implmeneted using standard Array methods *
* *
******************************************************************************************** */
/**
* Returns an index of the specified element in array or -1 if element is not found
*
* @param {array} arr
* @param {any} value
* @return {number}
*
* @example
* ['Ace', 10, true], 10 => 1
* ['Array', 'Number', 'string'], 'Date' => -1
* [0, 1, 2, 3, 4, 5], 5 => 5
*/
// https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
function findElement(arr, value) {
return arr.indexOf(value);
}
/**
* Generates an array of odd numbers of the specified length
*
* @param {number} len
* @return {array}
*
* @example
* 1 => [ 1 ]
* 2 => [ 1, 3 ]
* 5 => [ 1, 3, 5, 7, 9 ]
*/
function generateOdds(len) {
return Array.from(Array(len * 2).keys()).filter((num) => num % 2 !== 0);
}
/**
* Returns the doubled array - elements of the specified array
* are repeated twice using original order
*
* @param {array} arr
* @return {array}
*
* @example
* ['Ace', 10, true] => ['Ace', 10, true, 'Ace', 10, true]
* [0, 1, 2, 3, 4, 5] => [0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]
* [] => []
*/
// https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Operators/Spread_syntax
function doubleArray(arr) {
return [...arr, ...arr];
}
/**
* Returns an array of positive numbers from the specified array in original order
*
* @param {array} arr
* @return {array}
*
* @example
* [ 0, 1, 2, 3, 4, 5 ] => [ 1, 2, 3, 4, 5 ]
* [-1, 2, -5, -4, 0] => [ 2 ]
* [] => []
*/
function getArrayOfPositives(arr) {
return arr.filter((num) => num > 0);
}
/**
* Returns the array with strings only in the specified array (in original order)
*
* @param {array} arr
* @return {array}
*
* @example
* [ 0, 1, 'cat', 3, true, 'dog' ] => [ 'cat', 'dog' ]
* [ 1, 2, 3, 4, 5 ] => []
* [ 'cat, 'dog', 'raccoon' ] => [ 'cat', 'dog', 'raccoon' ]
*/
function getArrayOfStrings(arr) {
return arr.filter((num) => typeof num === 'string');
}
/**
* Removes falsy values from the specified array
* Falsy values: false, null, 0, "", undefined, and NaN.
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean#Description)
*
* @param {array} arr
* @return {array}
*
* @example
* [ 0, false, 'cat', NaN, true, '' ] => [ 'cat', true ]
* [ 1, 2, 3, 4, 5, 'false' ] => [ 1, 2, 3, 4, 5, 'false' ]
* [ false, 0, NaN, '', undefined ] => [ ]
*/
function removeFalsyValues(/* arr */) {
throw new Error('Not implemented');
}
/**
* Returns the array of uppercase strings from the specified array
*
* @param {array} arr
* @return {array}
*
* @example
* [ 'permanent-internship', 'glutinous-shriek', 'multiplicative-elevation' ]
* => [ 'PERMANENT-INTERNSHIP', 'GLUTINOUS-SHRIEK', 'MULTIPLICATIVE-ELEVATION' ],
* [ 'a', 'b', 'c', 'd', 'e', 'f', 'g' ] => [ 'A', 'B', 'C', 'D', 'E', 'F', 'G' ]
*/
// https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/Array/map
function getUpperCaseStrings(arr) {
const c = arr.map((x) => x.toUpperCase());
return c;
}
/**
* Returns the array of string lengths from the specified string array.
*
* @param {array} arr
* @return {array}
*
* @example
* [ '', 'a', 'bc', 'def', 'ghij' ] => [ 0, 1, 2, 3, 4 ]
* [ 'angular', 'react', 'ember' ] => [ 7, 5, 5 ]
*/
function getStringsLength(arr) {
const c = arr.map((x) => x.length);
return c;
}
/**
* Inserts the item into specified array at specified index
*
* @param {array} arr
* @param {any} item
* @param {number} index
*
* @example
* [ 1, 3, 4, 5 ], 2, 1 => [ 1, 2, 3, 4, 5 ]
* [ 1, 'b', 'c'], 0, 'x' => [ 'x', 1, 'b', 'c' ]
*/
function insertItem(arr, item, index) {
return arr.splice(index, 0, item);
}
/**
* Returns the n first items of the specified array
*
* @param {array} arr
* @param {number} n
*
* @example
* [ 1, 3, 4, 5 ], 2 => [ 1, 3 ]
* [ 'a', 'b', 'c', 'd'], 3 => [ 'a', 'b', 'c' ]
*/
function getHead(arr, n) {
return arr.slice(0, n);
}
/**
* Returns the n last items of the specified array
*
* @param {array} arr
* @param {number} n
*
* @example
* [ 1, 3, 4, 5 ], 2 => [ 4, 5 ]
* [ 'a', 'b', 'c', 'd'], 3 => [ 'b', 'c', 'd' ]
*/
function getTail(arr, n) {
return arr.slice(1).slice(n * -1);
}
/**
* Returns CSV represebtation of two-dimentional numeric array.
* https://en.wikipedia.org/wiki/Comma-separated_values
*
* @param {array} arr
* @return {string}
*
* @example
* [
* [ 0, 1, 2, 3, 4 ],
* [ 10,11,12,13,14 ],
* [ 20,21,22,23,24 ],
* [ 30,31,32,33,34 ]
* ]
* =>
* '0,1,2,3,4\n'
* +'10,11,12,13,14\n'
* +'20,21,22,23,24\n'
* +'30,31,32,33,34'
*/
function toCsvText(arr) {
const c = arr.map((x) => `${x.join(',')}`);
const x = c.join('\n');
return x;
}
/**
* Transforms the numeric array into the according array of squares:
* f(x) = x * x
*
* @param {array} arr
* @return {array}
*
* @example
* [ 0, 1, 2, 3, 4, 5 ] => [ 0, 1, 4, 9, 16, 25 ]
* [ 10, 100, -1 ] => [ 100, 10000, 1 ]
*/
function toArrayOfSquares(arr) {
const c = arr.map((x) => x * x);
return c;
}
/**
* Transforms the numeric array to the according moving sum array:
* f[n] = x[0] + x[1] + x[2] +...+ x[n]
* or f[n] = f[n-1] + x[n]
*
* @param {array} arr
* @return {array}
*
* Example :
* [ 1, 1, 1, 1, 1 ] => [ 1, 2, 3, 4, 5 ]
* [ 10, -10, 10, -10, 10 ] => [ 10, 0, 10, 0, 10 ]
* [ 0, 0, 0, 0, 0] => [ 0, 0, 0, 0, 0]
* [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] => [ 1, 3, 6, 10, 15, 21, 28, 36, 45, 55 ]
*/
function getMovingSum(/* arr */) {
throw new Error('Not implemented');
}
/**
* Returns every second item from the specified array:
*
* @param {array} arr
* @return {array}
*
* Example :
* [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] => [ 2, 4, 6, 8, 10 ]
* [ 'a', 'b', 'c' , null ] => [ "b", null ]
* [ "a" ] => []
*/
function getSecondItems(/* arr */) {
throw new Error('Not implemented');
}
/**
* Propagates every item in sequence its position times
* Returns an array that consists of: one first item, two second items, tree third items etc.
*
* @param {array} arr
* @return {array}
*
* @example :
* [] => []
* [ 1 ] => [ 1 ]
* [ 'a', 'b' ] => [ 'a', 'b','b' ]
* [ 'a', 'b', 'c', null ] => [ 'a', 'b','b', 'c','c','c', null,null,null,null ]
* [ 1,2,3,4,5 ] => [ 1, 2,2, 3,3,3, 4,4,4,4, 5,5,5,5,5 ]
*/
function propagateItemsByPositionIndex(/* arr */) {
throw new Error('Not implemented');
}
/**
* Returns the 3 largest numbers from the specified array
*
* @param {array} arr
* @return {array}
*
* @example
* [] => []
* [ 1, 2 ] => [ 2, 1 ]
* [ 1, 2, 3 ] => [ 3, 2, 1 ]
* [ 1,2,3,4,5,6,7,8,9,10 ] => [ 10, 9, 8 ]
* [ 10, 10, 10, 10 ] => [ 10, 10, 10 ]
*/
function get3TopItems(arr) {
return arr.sort((a, b) => a - b).reverse().slice(0, 3);
}
/**
* Returns the number of positive numbers from specified array
*
* @param {array} arr
* @return {number}
*
* @example
* [ ] => 0
* [ -1, 0, 1 ] => 1
* [ 1, 2, 3] => 3
* [ null, 1, 'elephant' ] => 1
* [ 1, '2' ] => 1
*/
function getPositivesCount(/* arr */) {
throw new Error('Not implemented');
}
/**
* Sorts digit names
*
* @param {array} arr
* @return {array}
*
* @example
* [] => []
* [ 'nine','one' ] => [ 'one', 'nine' ]
* [ 'one','two','three' ] => [ 'one','two', 'three' ]
* [ 'nine','eight','nine','eight'] => [ 'eight','eight','nine','nine']
* [ 'one','one','one','zero' ] => [ 'zero','one','one','one' ]
*/
function sortDigitNamesByNumericOrder(/* arr */) {
throw new Error('Not implemented');
}
/**
* Returns the sum of all items in the specified array of numbers
*
* @param {array} arr
* @return {number}
*
* @example
* [] => 0
* [ 1, 2, 3 ] => 6
* [ -1, 1, -1, 1 ] => 0
* [ 1, 10, 100, 1000 ] => 1111
*/
function getItemsSum(/* arr */) {
throw new Error('Not implemented');
}
/**
* Returns the number of all falsy value in the specified array
*
* @param {array} arr
* @return {array}
*
* @example
* [] => 0
* [ 1, '', 3 ] => 1
* [ -1, 'false', null, 0 ] => 2
* [ null, undefined, NaN, false, 0, '' ] => 6
*/
function getFalsyValuesCount(/* arr */) {
throw new Error('Not implemented');
}
/**
* Returns a number of all occurences of the specified item in an array
*
* @param {array} arr
* @param {any} item
* @return {number}
*
* @example
* [ 0, 0, 1, 1, 1, 2 ], 1 => 3
* [ 1, 2, 3, 4, 5 ], 0 => 0
* [ 'a','b','c','c' ], 'c'=> 2
* [ null, undefined, null ], null => 2
* [ true, 0, 1, 'true' ], true => 1
*/
function findAllOccurences(/* arr, item */) {
throw new Error('Not implemented');
}
/**
* Concatenates all elements from specified array into single string with ',' delimeter
*
* @param {array} arr
* @return {string}
*
* @example
* [0, false, 'cat', NaN, true, ''] => '0,false,cat,NaN,true,'
* [1, 2, 3, 4, 5] => '1,2,3,4,5'
* ['rock', 'paper', 'scissors'] => 'rock,paper,scissors'
*/
function toStringList(arr) {
let x = arr.join(',');
x = (`${x}`);
return x;
}
/**
* Sorts the specified array by country name first and city name
* (if countries are equal) in ascending order.
*
* @param {array} arr
* @return {array}
*
* @example
* [
* { country: 'Russia', city: 'Moscow' },
* { country: 'Belarus', city: 'Minsk' },
* { country: 'Poland', city: 'Warsaw' },
* { country: 'Russia', city: 'Saint Petersburg' },
* { country: 'Poland', city: 'Krakow' },
* { country: 'Belarus', city: 'Brest' }
* ]
* =>
* [
* { country: 'Belarus', city: 'Brest' },
* { country: 'Belarus', city: 'Minsk' },
* { country: 'Poland', city: 'Krakow' },
* { country: 'Poland', city: 'Warsaw' },
* { country: 'Russia', city: 'Moscow' },
* { country: 'Russia', city: 'Saint Petersburg' }
* ]
*/
function sortCitiesArray(/* arr */) {
throw new Error('Not implemented');
}
/**
* Creates an indentity matrix of the specified size
*
* @param {number} n
* @return {array}
*
* @example
* 1 => [[1]]
*
* 2 => [[1,0],
* [0,1]]
*
* [[1,0,0,0,0],
* [0,1,0,0,0],
* 5 => [0,0,1,0,0],
* [0,0,0,1,0],
* [0,0,0,0,1]]
*/
function getIdentityMatrix(/* n */) {
throw new Error('Not implemented');
}
/**
* Creates an array of integers from the specified start to end (inclusive)
*
* @param {number} start
* @param {number} end
* @return {array}
*
* @example
* 1, 5 => [ 1, 2, 3, 4, 5 ]
* -2, 2 => [ -2, -1, 0, 1, 2 ]
* 0, 100 => [ 0, 1, 2, ..., 100 ]
* 3, 3 => [ 3 ]
*/
function getIntervalArray(/* start, end */) {
throw new Error('Not implemented');
}
/**
* Returns array containing only unique values from the specified array.
*
* @param {array} arr
* @return {array}
*
* @example
* [ 1, 2, 3, 3, 2, 1 ] => [ 1, 2, 3 ]
* [ 'a', 'a', 'a', 'a' ] => [ 'a' ]
* [ 1, 1, 2, 2, 3, 3, 4, 4] => [ 1, 2, 3, 4]
*/
function distinct(/* arr */) {
throw new Error('Not implemented');
}
/**
* Groups elements of the specified array by key.
* Returns multimap of keys extracted from array elements via keySelector callback
* and values extracted via valueSelector callback.
* See: https://en.wikipedia.org/wiki/Multimap
*
* @param {array} array
* @param {Function} keySelector
* @param {Function} valueSelector
* @return {Map}
*
* @example
* group([
* { country: 'Belarus', city: 'Brest' },
* { country: 'Russia', city: 'Omsk' },
* { country: 'Russia', city: 'Samara' },
* { country: 'Belarus', city: 'Grodno' },
* { country: 'Belarus', city: 'Minsk' },
* { country: 'Poland', city: 'Lodz' }
* ],
* item => item.country,
* item => item.city
* )
* =>
* Map {
* "Belarus" => ["Brest", "Grodno", "Minsk"],
* "Russia" => ["Omsk", "Samara"],
* "Poland" => ["Lodz"]
* }
*/
function group(/* array, keySelector, valueSelector */) {
throw new Error('Not implemented');
}
/**
* Projects each element of the specified array to a sequence
* and flattens the resulting sequences into one array.
*
* @param {array} arr
* @param {Function} childrenSelector, a transform function to apply to each element
* that returns an array of children
* @return {array}
*
* @example
* [[1, 2], [3, 4], [5, 6]], (x) => x => [ 1, 2, 3, 4, 5, 6 ]
* ['one','two','three'], x=>x.split('') => ['o','n','e','t','w','o','t','h','r','e','e']
*/
function selectMany(/* arr, childrenSelector */) {
throw new Error('Not implemented');
}
/**
* Returns an element from the multidimentional array by the specified indexes.
*
* @param {array} arr
* @param {array} indexes
* @return {any} element from array
*
* @example
* [[1, 2], [3, 4], [5, 6]], [0,0] => 1 (arr[0][0])
* ['one','two','three'], [2] => 'three' (arr[2])
* [[[ 1, 2, 3]]], [ 0, 0, 1 ] => 2 (arr[0][0][1])
*/
function getElementByIndexes(/* arr, indexes */) {
throw new Error('Not implemented');
}
/**
* Swaps the head and tail of the specified array:
* the head (first half) of array move to the end, the tail (last half) move to the start.
* The middle element (if exists) leave on the same position.
*
*
* @param {array} arr
* @return {array}
*
* @example
* [ 1, 2, 3, 4, 5 ] => [ 4, 5, 3, 1, 2 ]
* \----/ \----/
* head tail
*
* [ 1, 2 ] => [ 2, 1 ]
* [ 1, 2, 3, 4, 5, 6, 7, 8 ] => [ 5, 6, 7, 8, 1, 2, 3, 4 ]
*
*/
function swapHeadAndTail(/* arr */) {
throw new Error('Not implemented');
}
module.exports = {
findElement,
generateOdds,
doubleArray,
getArrayOfPositives,
getArrayOfStrings,
removeFalsyValues,
getUpperCaseStrings,
getStringsLength,
insertItem,
getHead,
getTail,
toCsvText,
toStringList,
toArrayOfSquares,
getMovingSum,
getSecondItems,
propagateItemsByPositionIndex,
get3TopItems,
getPositivesCount,
sortDigitNamesByNumericOrder,
getItemsSum,
getFalsyValuesCount,
findAllOccurences,
sortCitiesArray,
getIdentityMatrix,
getIntervalArray,
distinct,
group,
selectMany,
getElementByIndexes,
swapHeadAndTail,
};
|
(function() {
'use strict';
var S = null;
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined')
S = require('../lib/string');
else {
S = window.S;
}
function T(v) { if (!v) { throw new Error('Should be true.'); } };
function F(v) { if (v) { throw new Error('Should be false.'); } };
function EQ(v1, v2) {
if (typeof require != 'undefined' && typeof process != 'undefined') //node
require('assert').equal(v1, v2)
else
T (v1 === v2)
}
function ARY_EQ(a1, a2) {
EQ (a1.length, a2.length)
for (var i = 0; i < a1.length; ++i)
EQ (a1[i], a2[i])
}
/*if (typeof window !== "undefined" && window !== null) {
S = window.S;
} else {
S = require('../lib/string');
}*/
describe('string.js', function() {
describe('- constructor', function() {
it('should should set the internal "s" property', function() {
T (S('helo').s === 'helo')
T (S(5).s === '5')
T (S(new Date(2012, 1, 1)).s.indexOf('2012') != -1)
T (S(new RegExp()).s.substr(0,1) === '/')
T (S({}).s === '[object Object]')
T (S(null).s === null)
T (S(undefined).s === undefined)
})
})
describe('- between(left, right)', function() {
it('should extract string between `left` and `right`', function() {
EQ (S('<a>foo</a>').between('<a>', '</a>').s, 'foo')
EQ (S('<a>foo</a></a>').between('<a>', '</a>').s, 'foo')
EQ (S('<a><a>foo</a></a>').between('<a>', '</a>').s, '<a>foo')
EQ (S('<a>foo').between('<a>', '</a>').s, '')
EQ (S('Some strings } are very {weird}, dont you think?').between('{', '}').s, 'weird');
EQ (S('This is a test string').between('test').s, ' string');
EQ (S('This is a test string').between('', 'test').s, 'This is a ');
})
})
describe('- camelize()', function() {
it('should remove any underscores or dashes and convert a string into camel casing', function() {
T (S('data_rate').camelize().s === 'dataRate');
T (S('background-color').camelize().s === 'backgroundColor');
T (S('-moz-something').camelize().s === 'MozSomething');
T (S('_car_speed_').camelize().s === 'CarSpeed');
T (S('yes_we_can').camelize().s === 'yesWeCan');
})
})
describe('- capitalize()', function() {
it('should capitalize the string', function() {
T (S('jon').capitalize().s === 'Jon');
T (S('JP').capitalize().s === 'Jp');
})
})
describe('- charAt(index)', function() {
it('should return a native JavaScript string with the character at the specified position', function() {
T (S('hi').charAt(1) === 'i')
})
})
describe('- chompLeft(prefix)', function() {
it('should remove `prefix` from start of string', function() {
T (S('foobar').chompLeft('foo').s === 'bar')
T (S('foobar').chompLeft('bar').s === 'foobar')
T (S('').chompLeft('foo').s === '')
T (S('').chompLeft('').s === '')
})
})
describe('- chompRight(suffix)', function() {
it('should remove `suffix` from end of string', function() {
T (S('foobar').chompRight('foo').s === 'foobar')
T (S('foobar').chompRight('bar').s === 'foo')
T (S('').chompRight('foo').s === '')
T (S('').chompRight('').s === '')
})
})
describe('- collapseWhitespace()', function() {
it('should convert all adjacent whitespace characters to a single space and trim the ends', function() {
T (S(' Strings \t are \n\n\t fun\n! ').collapseWhitespace().s === 'Strings are fun !');
})
})
describe('- contains(substring)', function() {
it('should return true if the string contains the specified input string', function() {
T (S('JavaScript is one of the best languages!').contains('one'));
F (S('What do you think?').contains('YES!'));
})
})
describe('- count(substring)', function() {
it('should return the count of all substrings', function() {
EQ (S('JP likes to program. JP does not play in the NBA.').count("JP"), 2)
EQ (S('Does not exist.').count("Flying Spaghetti Monster"), 0)
EQ (S('Does not exist.').count("Bigfoot"), 0)
EQ (S('JavaScript is fun, therefore Node.js is fun').count("fun"), 2)
EQ (S('funfunfun').count("fun"), 3)
})
})
describe('- dasherize()', function() {
it('should convert a camel cased string into a string delimited by dashes', function() {
T (S('dataRate').dasherize().s === 'data-rate');
T (S('CarSpeed').dasherize().s === '-car-speed');
T (S('yesWeCan').dasherize().s === 'yes-we-can');
T (S('backgroundColor').dasherize().s === 'background-color');
})
})
describe('- decodeHTMLEntities()', function() {
it('should decode HTML entities into their proper string representation', function() {
EQ (S('Ken Thompson & Dennis Ritchie').decodeHTMLEntities().s, 'Ken Thompson & Dennis Ritchie');
EQ (S('3 < 4').decodeHTMLEntities().s, '3 < 4');
EQ (S('http://').decodeHTMLEntities().s, 'http://')
})
})
describe('- endsWith(suffix)', function() {
it("should return true if the string ends with the input string", function() {
T (S("hello jon").endsWith('jon'));
F (S('ffffaaa').endsWith('jon'));
T (S("").endsWith(''));
T (S("hi").endsWith(''));
T (S("hi").endsWith('hi'));
})
})
describe('- ensureLeft(prefix)', function() {
it('should prepend `prefix` if string does not start with prefix', function() {
T (S('foobar').ensureLeft('foo').s === 'foobar')
T (S('bar').ensureLeft('foo').s === 'foobar')
T (S('').ensureLeft('foo').s === 'foo')
T (S('').ensureLeft('').s === '')
})
})
describe('- ensureRight(suffix)', function() {
it('should append `suffix` if string does not end with suffix', function() {
T (S('foobar').ensureRight('bar').s === 'foobar')
T (S('foo').ensureRight('bar').s === 'foobar')
T (S('').ensureRight('foo').s === 'foo')
T (S('').ensureRight('').s === '')
})
})
describe('- escapeHTML()', function() {
it('should escape the html', function() {
T (S('<div>Blah & "blah" & \'blah\'</div>').escapeHTML().s ===
'<div>Blah & "blah" & 'blah'</div>');
T (S('<').escapeHTML().s === '&lt;');
})
})
describe('+ extendPrototype()', function() {
it('should extend the String prototype with the extra methods', function() {
S.extendPrototype();
T (" hello!".endsWith('!'));
S.restorePrototype();
})
})
describe('- humanize()', function() {
it('should humanize the string', function() {
EQ (S('the_humanize_string_method').humanize().s, 'The humanize string method')
EQ (S('ThehumanizeStringMethod').humanize().s, 'Thehumanize string method')
EQ (S('the humanize string method').humanize().s, 'The humanize string method')
EQ (S('the humanize_id string method_id').humanize().s, 'The humanize id string method')
EQ (S('the humanize string method ').humanize().s, 'The humanize string method')
EQ (S(' capitalize dash-CamelCase_underscore trim ').humanize().s, 'Capitalize dash camel case underscore trim')
EQ (S(123).humanize().s, '123')
EQ (S('').humanize().s, '')
EQ (S(null).humanize().s, '')
EQ (S(undefined).humanize().s, '')
})
})
describe('- include(substring)', function() {
it('should return true if the string contains the specified input string', function() {
T (S('JavaScript is one of the best languages!').include('one'));
F (S('What do you think?').include('YES!'));
})
})
describe('- isAlpha()', function() {
it("should return true if the string contains only letters", function() {
T (S("afaf").isAlpha());
T (S("FJslfjkasfs").isAlpha());
T (S("áéúóúÁÉÍÓÚãõÃÕàèìòùÀÈÌÒÙâêîôûÂÊÎÔÛäëïöüÄËÏÖÜçÇ").isAlpha());
F (S("adflj43faljsdf").isAlpha());
F (S("33").isAlpha());
F (S("TT....TTTafafetstYY").isAlpha());
F (S("-áéúóúÁÉÍÓÚãõÃÕàèìòùÀÈÌÒÙâêîôûÂÊÎÔÛäëïöüÄËÏÖÜçÇ").isAlpha());
F (S("").isAlpha());
})
})
describe('- isAlphaNumeric()', function() {
it("should return true if the string contains only letters and digits", function() {
T (S("afaf35353afaf").isAlphaNumeric());
T (S("FFFF99fff").isAlphaNumeric());
T (S("99").isAlphaNumeric());
T (S("afff").isAlphaNumeric());
T (S("Infinity").isAlphaNumeric());
T (S("áéúóúÁÉÍÓÚãõÃÕàèìòùÀÈÌÒÙâêîôûÂÊÎÔÛäëïöüÄËÏÖÜçÇ1234567890").isAlphaNumeric());
F (S("-Infinity").isAlphaNumeric());
F (S("-33").isAlphaNumeric());
F (S("aaff..").isAlphaNumeric());
F (S(".áéúóúÁÉÍÓÚãõÃÕàèìòùÀÈÌÒÙâêîôûÂÊÎÔÛäëïöüÄËÏÖÜçÇ1234567890").isAlphaNumeric());
})
})
describe('- isEmpty()', function() {
it('should return true if the string is solely composed of whitespace or is null', function() {
T (S(' ').isEmpty());
T (S('\t\t\t ').isEmpty());
T (S('\n\n ').isEmpty());
F (S('hey').isEmpty())
T (S(null).isEmpty())
T (S(null).isEmpty())
})
})
describe('- isLower()', function() {
it('should return true if the character or string is lowercase', function() {
T (S('a').isLower());
T (S('z').isLower());
F (S('B').isLower());
T (S('hijp').isLower());
T (S('áéúóúãõàèìòùâêîôûäëïöüç').isLower());
T (S('áéúóúãõàèìòùâêîôûäëïöüça').isLower());
F (S('hi jp').isLower());
F (S('HelLO').isLower());
F (S('ÁÉÍÓÚÃÕÀÈÌÒÙÂÊÎÔÛÄËÏÖÜÇ').isLower());
F (S('áéúóúãõàèìòùâêîôûäëïöüçÁ').isLower());
F (S('áéúóúãõàèìòùâêîôû äëïöüç').isLower());
})
})
describe('- isNumeric()', function() {
it("should return true if the string only contains digits, this would not include Infinity or -Infinity", function() {
T (S("3").isNumeric());
F (S("34.22").isNumeric());
F (S("-22.33").isNumeric());
F (S("NaN").isNumeric());
F (S("Infinity").isNumeric());
F (S("-Infinity").isNumeric());
F (S("JP").isNumeric());
F (S("-5").isNumeric());
T (S("000992424242").isNumeric());
})
})
describe('- isUpper()', function() {
it('should return true if the character or string is uppercase', function() {
F (S('a').isUpper());
F (S('z').isUpper());
T (S('B').isUpper());
T (S('HIJP').isUpper());
T (S('ÁÉÍÓÚÃÕÀÈÌÒÙÂÊÎÔÛÄËÏÖÜÇ').isUpper());
F (S('HI JP').isUpper());
F (S('HelLO').isUpper());
F (S('áéúóúãõàèìòùâêîôûäëïöüç').isUpper());
F (S('áéúóúãõàèìòùâêîôûäëïöüçÁ').isUpper());
F (S('ÁÉÍÓÚÃÕÀÈÌÒÙÂÊÎÔÛÄËÏÖÜÇá').isUpper());
})
})
describe('- latinise', function() {
it('should remove diacritics from Latin characters', function() {
T (S('crème brûlée').latinise().s === 'creme brulee')
T (S('CRÈME BRÛLÉE').latinise().s === 'CREME BRULEE')
})
})
describe('- length', function() {
it('should return the length of the string', function() {
T (S('hello').length === 5);
T (S('').length === 0);
T (S(null).length === -1);
T (S(undefined).length === -1);
})
})
describe('- left(N)', function() {
it('should return the substring denoted by N positive left-most characters', function() {
T (S('My name is JP').left(2).s === 'My');
T (S('Hi').left(0).s === '');
T (S('Hello').left(1).s === 'H');
})
it('should return the substring denoted by N negative left-most characters, equivalent to calling right(-N)', function() {
T (S('My name is JP').left(-2).s === 'JP');
})
})
describe('- pad(len, [char])', function() {
it('should pad the string in the center with specified character', function() {
T (S('hello').pad(5).s === 'hello');
T (S('hello').pad(10).s === ' hello ');
T (S('hey').pad(7).s === ' hey ');
T (S('hey').pad(5).s === ' hey ');
T (S('hey').pad(4).s === ' hey');
T (S('hey').pad(7, '-').s === '--hey--');
})
it('should work on numbers', function() {
T (S(1234).pad(4, 0).s === '1234');
T (S(1234).pad(7, 0).s === '0012340');
T (S(1234).pad(7, 1).s === '1112341');
})
it('should use the default padding character when given null', function() {
T (S('hello').pad(5, null).s === 'hello');
T (S('hello').pad(10, null).s === ' hello ');
})
})
describe('- padLeft(len, [char])', function() {
it('should left pad the string', function() {
T (S('hello').padLeft(5).s === 'hello');
T (S('hello').padLeft(10).s === ' hello');
T (S('hello').padLeft(7).s === ' hello');
T (S('hello').padLeft(6).s === ' hello');
T (S('hello').padLeft(10, '.').s === '.....hello');
})
it('should work on numbers', function() {
T (S(1234).padLeft(4, 0).s === '1234');
T (S(1234).padLeft(7, 0).s === '0001234');
T (S(1234).padLeft(7, 1).s === '1111234');
})
it('should use the default padding character when given null', function() {
T (S('hello').padLeft(5, null).s === 'hello');
T (S('hello').padLeft(10, null).s === ' hello');
})
})
describe('- padRight(len, [char])', function() {
it('should right pad the string', function() {
T (S('hello').padRight(5).s === 'hello');
T (S('hello').padRight(10).s === 'hello ');
T (S('hello').padRight(7).s === 'hello ');
T (S('hello').padRight(6).s === 'hello ');
T (S('hello').padRight(10, '.').s === 'hello.....');
})
it('should work on numbers', function() {
T (S(1234).padRight(4, 0).s === '1234');
T (S(1234).padRight(7, 0).s === '1234000');
T (S(1234).padRight(7, 1).s === '1234111');
})
it('should use the default padding character when given null', function() {
T (S('hello').padRight(5, null).s === 'hello');
T (S('hello').padRight(10, null).s === 'hello ');
})
})
describe('- parseCSV([delim],[qualifier],[escape],[lineDelimiter])', function() {
it('should parse a CSV line into an array', function() {
ARY_EQ (S("'a','b','c'").parseCSV(',', "'"), ['a', 'b', 'c'])
ARY_EQ (S('"a","b","c"').parseCSV(), ['a', 'b', 'c'])
ARY_EQ (S('a,b,c').parseCSV(',', null), ['a', 'b', 'c'])
ARY_EQ (S("'a,','b','c'").parseCSV(',', "'"), ['a,', 'b', 'c'])
ARY_EQ (S('"a","b",4,"c"').parseCSV(',', null), ['"a"', '"b"', '4', '"c"'])
ARY_EQ (S('"a","b","4","c"').parseCSV(), ['a', 'b', '4', 'c'])
ARY_EQ (S('"a","b", "4","c"').parseCSV(), ['a', 'b', '4', 'c'])
ARY_EQ (S('"a","b", 4,"c"').parseCSV(",", null), [ '"a"', '"b"', ' 4', '"c"' ])
ARY_EQ (S('"a","b\\"","d","c"').parseCSV(), ['a', 'b"', 'd', 'c'])
ARY_EQ (S('"jp","really\tlikes to code"').parseCSV(), ['jp', 'really\tlikes to code'])
ARY_EQ (S('"a","b+"","d","c"').parseCSV(",", "\"", "+"), ['a', 'b"', 'd', 'c'])
ARY_EQ (S('"a","b""","d","c"').parseCSV(",", "\"", "\""), ['a', 'b"', 'd', 'c'])
ARY_EQ (S('"a","","c"').parseCSV(), ['a', '', 'c'])
ARY_EQ (S('"","b","c"').parseCSV(), ['', 'b', 'c'])
ARY_EQ (S("'a,',b,'c'").parseCSV(',', "'"), ['a,', 'b', 'c'])
var lines = (S('"a\na","b","c"\n"a", """b\nb", "a"').parseCSV(',', '"', '"', '\n'));
ARY_EQ(lines[0], [ 'a\na', 'b', 'c' ]);
ARY_EQ(lines[1], [ 'a', '"b\nb', 'a' ]);
})
})
describe('- repeat(n)', function() {
it('should return the string concatenated with itself n times', function() {
T (S(' ').repeat(5).s === ' ');
T (S('*').repeat(3).s === '***');
})
})
describe('- replaceAll(substring, replacement)', function() {
it('should return the new string with all occurrences of substring replaced with the replacment string', function() {
T (S(' does IT work? ').replaceAll(' ', '_').s === '_does_IT_work?_');
T (S('Yes it does!').replaceAll(' ', '').s === 'Yesitdoes!')
T (S('lalala.blabla').replaceAll('.', '_').s === 'lalala_blabla')
var e = '\\', q = '"';
var r = e + q;
T (S('a').replaceAll(q, r).s === 'a');
})
})
describe('- strip([string1],[string2],...)', function() {
it('should return the new string with all occurrences of [string1],[string2],... removed', function() {
T (S('which ones will it take out one wonders').strip('on', 'er').s === 'which es will it take out e wds');
T (S(' -- 1 2 - 3 4 5 - -- 6 7 _-- 8 9 0 ').strip('-', '_', ' ').s === '1234567890');
})
})
describe('+ restorePrototype()', function() {
it('should restore the original String prototype', function() {
T (typeof ' hi'.endsWith === 'undefined');
S.extendPrototype();
T (' hi'.endsWith('hi'));
S.restorePrototype();
T (typeof ' hi'.endsWith === 'undefined');
})
})
describe('- right(N)', function() {
it('should return the substring denoted by N positive right-most characters', function() {
T (S('I AM CRAZY').right(2).s === 'ZY');
T (S('Does it work? ').right(4).s === 'k? ');
T (S('Hi').right(0).s === '');
})
it('should return the substring denoted by N negative right-most characters, equivalent to calling left(-N)', function() {
T (S('My name is JP').right(-2).s === 'My');
})
})
describe('- s', function() {
it('should return the native string', function() {
T (S('hi').s === 'hi');
T (S('hi').toString() === S('hi').s);
})
})
describe('- slugify', function() {
it('should convert the text to url slug', function() {
T (S('Global Thermonuclear Warfare').slugify().s === 'global-thermonuclear-warfare')
T (S('Fast JSON Parsing').slugify().s === 'fast-json-parsing')
T (S('Crème brûlée').slugify().s === 'creme-brulee')
})
})
describe('- startsWith(prefix)', function() {
it("should return true if the string starts with the input string", function() {
T (S("JP is a software engineer").startsWith("JP"));
F (S('wants to change the world').startsWith("politicians"));
T (S("").startsWith(""));
T (S("Hi").startsWith(""));
T (S("JP").startsWith("JP"));
})
})
describe('- stripPunctuation()', function() {
it('should strip all of the punctuation', function() {
T (S('My, st[ring] *full* of %punct)').stripPunctuation().s === 'My string full of punct')
})
})
describe('- stripTags([tag1],[tag2],...)', function() {
it('should strip all of the html tags or tags specified by the parameters', function() {
T (S('<p>just <b>some</b> text</p>').stripTags().s === 'just some text')
T (S('<p>just <b>some</b> text</p>').stripTags('p').s === 'just <b>some</b> text')
})
})
describe('- template(values, [open], [close])', function() {
it('should return the string replaced with template values', function() {
var str = "Hello {{name}}! How are you doing during the year of {{date-year}}?"
var values = {name: 'JP', 'date-year': 2013}
EQ (S(str).template(values).s, 'Hello JP! How are you doing during the year of 2013?')
str = "Hello #{name}! How are you doing during the year of #{date-year}?"
EQ (S(str).template(values, '#{', '}').s, 'Hello JP! How are you doing during the year of 2013?')
S.TMPL_OPEN = '{'
S.TMPL_CLOSE = '}'
str = "Hello {name}! How are you doing during the year of {date-year}?"
EQ (S(str).template(values).s, 'Hello JP! How are you doing during the year of 2013?')
})
it('should return the string replaces with template values with regex chars () as Open/Close', function() {
S.TMPL_OPEN = "("
S.TMPL_CLOSE = ")"
var values = {name: 'JP', 'date-year': 2013}
var str = "Hello (name)! How are you doing during the year of (date-year)?"
EQ (S(str).template(values).s, 'Hello JP! How are you doing during the year of 2013?')
})
it('should return the string replaces with template values with regex chars [] as Open/Close', function() {
S.TMPL_OPEN = '['
S.TMPL_CLOSE = ']'
var values = {name: 'JP', 'date-year': 2013}
var str = "Hello [name]! How are you doing during the year of [date-year]?"
EQ (S(str).template(values).s, 'Hello JP! How are you doing during the year of 2013?')
})
it('should return the string replaces with template values with regex chars ** as Open/Close', function() {
S.TMPL_OPEN = '*'
S.TMPL_CLOSE = '*'
var values = {name: 'JP', 'date-year': 2013}
var str = "Hello *name*! How are you doing during the year of *date-year*?"
EQ (S(str).template(values).s, 'Hello JP! How are you doing during the year of 2013?')
})
it('should return the string replaces with template values with regex chars ** as Open/Close', function() {
S.TMPL_OPEN = '$'
S.TMPL_CLOSE = '$'
var values = {name: 'JP', 'date-year': 2013}
var str = "Hello $name$! How are you doing during the year of $date-year$?"
EQ (S(str).template(values).s, 'Hello JP! How are you doing during the year of 2013?')
})
describe('> when a key has an empty value', function() {
it('should still replace with the empty value', function() {
S.TMPL_OPEN = '{{'
S.TMPL_CLOSE = '}}'
var str = "Hello {{name}}"
var values = {name: ''}
EQ (S(str).template(values).s, "Hello ")
})
})
})
describe('- times(n)', function() {
it('should return the string concatenated with itself n times', function() {
T (S(' ').times(5).s === ' ');
T (S('*').times(3).s === '***');
})
})
describe('- toFloat([precision])', function() {
it('should return the float value, wraps parseFloat', function() {
T (S('5').toFloat() === 5);
T (S('5.3').toFloat() === 5.3);
T (S(5.3).toFloat() === 5.3);
T (S('-10').toFloat() === -10);
T (S('55.3 adfafaf').toFloat() === 55.3)
T (S('afff 44').toFloat().toString() === 'NaN')
T (S(3.45522222333232).toFloat(2) === 3.46)
})
})
describe('- toBoolean', function() {
it('should convert a logical truth string to boolean', function() {
T (S('true').toBoolean());
F (S('false').toBoolean());
F (S('hello').toBoolean());
T (S(true).toBoolean());
T (S('on').toBoolean());
T (S('yes').toBoolean());
T (S('TRUE').toBoolean());
T (S('TrUe').toBoolean());
T (S('YES').toBoolean());
T (S('ON').toBoolean());
F (S('').toBoolean());
F (S(undefined).toBoolean())
F (S('undefined').toBoolean())
F (S(null).toBoolean())
F (S(false).toBoolean())
F (S({}).toBoolean())
T (S(1).toBoolean())
F (S(-1).toBoolean())
F (S(0).toBoolean())
T (S('1').toBoolean())
F (S('0').toBoolean())
})
})
describe('- toCSV(options)', function() {
it('should convert the array to csv', function() {
EQ (S(['a', 'b', 'c']).toCSV().s, '"a","b","c"');
EQ (S(['a', 'b', 'c']).toCSV(':').s, '"a":"b":"c"');
EQ (S(['a', 'b', 'c']).toCSV(':', null).s, 'a:b:c');
EQ (S(['a', 'b', 'c']).toCSV('*', "'").s, "'a'*'b'*'c'");
EQ (S(['a"', 'b', 4, 'c']).toCSV({delimiter: ',', qualifier: '"', escape: '\\', encloseNumbers: false}).s, '"a\\"","b",4,"c"');
EQ (S({firstName: 'JP', lastName: 'Richardson'}).toCSV({keys: true}).s, '"firstName","lastName"');
EQ (S({firstName: 'JP', lastName: 'Richardson'}).toCSV().s, '"JP","Richardson"');
EQ (S(['a', null, undefined, 'c']).toCSV().s, '"a","","","c"');
EQ (S(['my "foo" bar', 'barf']).toCSV({delimiter: ';', qualifier: '"', escape: '"'}).s, '"my ""foo"" bar";"barf"');
})
})
describe('- toInt()', function() {
it('should return the integer value, wraps parseInt', function() {
T (S('5').toInt() === 5);
T (S('5.3').toInt() === 5);
T (S(5.3).toInt() === 5);
T (S('-10').toInt() === -10);
T (S('55 adfafaf').toInt() === 55)
T (S('afff 44').toInt().toString() === 'NaN')
T (S('0xff').toInt() == 255)
})
})
describe('- toString()', function() {
it('should return the native string', function() {
T (S('hi').toString() === 'hi');
T (S('hi').toString() === S('hi').s);
})
})
describe('- trim()', function() {
it('should return the string with leading and trailing whitespace removed', function() {
T (S('hello ').trim().s === 'hello');
T (S(' hello ').trim().s === 'hello');
T (S('\nhello').trim().s === 'hello');
T (S('\nhello\r\n').trim().s === 'hello');
T (S('\thello\t').trim().s === 'hello');
})
})
describe('- trimLeft()', function() {
it('should return the string with leading whitespace removed', function() {
T (S(' How are you?').trimLeft().s === 'How are you?');
T (S(' JP ').trimLeft().s === 'JP ');
})
})
describe('- trimRight()', function() {
it('should return the string with trailing whitespace removed', function() {
T (S('How are you? ').trimRight().s === 'How are you?');
T (S(' JP ').trimRight().s === ' JP');
})
})
describe('- truncate(length, [chars])', function() {
it('should truncate the string, accounting for word placement and chars count', function() {
T (S('this is some long text').truncate(3).s === '...')
T (S('this is some long text').truncate(7).s === 'this is...')
T (S('this is some long text').truncate(11).s === 'this is...')
T (S('this is some long text').truncate(12).s === 'this is some...')
T (S('this is some long text').truncate(11).s === 'this is...')
T (S('this is some long text').truncate(14, ' read more').s === 'this is some read more')
EQ (S('some string').truncate(200).s, 'some string')
})
})
describe('- underscore()', function() {
it('should convert a camel cased string into a string separated by underscores', function() {
T (S('dataRate').underscore().s === 'data_rate');
T (S('CarSpeed').underscore().s === '_car_speed');
T (S('yesWeCan').underscore().s === 'yes_we_can');
})
})
describe('- unescapeHTML', function() {
it('should unescape the HTML', function() {
T (S('<div>Blah & "blah" & 'blah'</div>').unescapeHTML().s ===
'<div>Blah & "blah" & \'blah\'</div>');
T (S('&lt;').unescapeHTML().s === '<');
})
})
describe('- valueOf()', function() {
it('should return the primitive value of the string, wraps native valueOf()', function() {
T (S('hi').valueOf() === 'hi')
})
})
describe('- wrapHTML()', function () {
it('should return the string with wrapped HTML Element and their attributes', function () {
T (S('Venkat').wrapHTML().s === '<span>Venkat</span>')
T (S('Venkat').wrapHTML('div').s === '<div>Venkat</div>')
T (S('Venkat').wrapHTML('div', {
"class": "left bullet"
}).s === '<div class="left bullet">Venkat</div>')
T (S('Venkat').wrapHTML('div', {
"data-content": "my \"encoded\" content"
}).s === '<div data-content="my "encoded" content">Venkat</div>')
T (S('Venkat').wrapHTML('div', {
"id": "content",
"class": "left bullet"
}).s === '<div id="content" class="left bullet">Venkat</div>')
})
})
describe('+ VERSION', function() {
it('should exist', function() {
T (S.VERSION)
})
})
it('should import native JavaScript string methods', function() {
T (S('hi ').substr(0,1).trimRight().startsWith('h'));
T (S('hello ').concat('jp').indexOf('jp') === 6);
T (S('this is so cool').substr(0, 4).s === 'this');
})
})
}).call(this);
|
// JS OBFUSCATED TO AVOID COPY
var _0xf647 = ["\x6A\x51\x75\x65\x72\x79", "\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74", "\x6C\x6F\x61\x64", "\x66\x61\x64\x65\x4F\x75\x74", "\x5B\x64\x61\x74\x61\x2D\x6C\x6F\x61\x64\x65\x72\x3D\x22\x63\x69\x72\x63\x6C\x65\x2D\x73\x69\x64\x65\x22\x5D", "\x73\x6C\x6F\x77", "\x64\x65\x6C\x61\x79", "\x23\x70\x72\x65\x6C\x6F\x61\x64\x65\x72", "\x76\x69\x73\x69\x62\x6C\x65", "\x63\x73\x73", "\x62\x6F\x64\x79", "\x6F\x6E", "\x73\x75\x62\x6D\x69\x74", "\x66\x6F\x72\x6D\x23\x77\x72\x61\x70\x70\x65\x64", "\x76\x61\x6C\x69\x64\x61\x74\x65", "\x76\x61\x6C\x69\x64", "\x66\x61\x64\x65\x49\x6E", "\x23\x6C\x6F\x61\x64\x65\x72\x5F\x66\x6F\x72\x6D", "\x61\x63\x74\x69\x76\x65", "\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73", "\x6C\x61\x62\x65\x6C", "\x73\x69\x62\x6C\x69\x6E\x67\x73", "\x61\x64\x64\x43\x6C\x61\x73\x73", "\x70\x61\x72\x65\x6E\x74", "\x63\x6C\x69\x63\x6B", "\x2E\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x5F\x72\x61\x64\x69\x6F\x2E\x76\x65\x72\x73\x69\x6F\x6E\x5F\x32\x20\x69\x6E\x70\x75\x74\x5B\x74\x79\x70\x65\x3D\x22\x72\x61\x64\x69\x6F\x22\x5D\x2C\x20\x2E\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x5F\x63\x68\x65\x63\x6B\x2E\x76\x65\x72\x73\x69\x6F\x6E\x5F\x32\x20\x69\x6E\x70\x75\x74\x5B\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x5D", "\x66\x6F\x72\x6D", "\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74", "\x68\x61\x73\x68", "\x74\x6F\x70", "\x6F\x66\x66\x73\x65\x74", "\x73\x77\x69\x6E\x67", "\x6C\x6F\x63\x61\x74\x69\x6F\x6E", "\x61\x6E\x69\x6D\x61\x74\x65", "\x73\x74\x6F\x70", "\x68\x74\x6D\x6C\x2C\x20\x62\x6F\x64\x79", "\x61\x5B\x68\x72\x65\x66\x5E\x3D\x22\x23\x22\x5D\x2E\x6D\x6F\x62\x69\x6C\x65\x5F\x62\x74\x6E", "\x2E\x63\x64\x2D\x6F\x76\x65\x72\x6C\x61\x79\x2D\x6E\x61\x76", "\x2E\x63\x64\x2D\x6F\x76\x65\x72\x6C\x61\x79\x2D\x63\x6F\x6E\x74\x65\x6E\x74", "\x2E\x63\x64\x2D\x70\x72\x69\x6D\x61\x72\x79\x2D\x6E\x61\x76", "\x2E\x63\x64\x2D\x6E\x61\x76\x2D\x74\x72\x69\x67\x67\x65\x72", "\x72\x65\x73\x69\x7A\x65", "\x72\x65\x71\x75\x65\x73\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x46\x72\x61\x6D\x65", "\x63\x6C\x6F\x73\x65\x2D\x6E\x61\x76", "\x68\x61\x73\x43\x6C\x61\x73\x73", "\x65\x61\x73\x65\x49\x6E\x43\x75\x62\x69\x63", "\x66\x61\x64\x65\x2D\x69\x6E", "\x76\x65\x6C\x6F\x63\x69\x74\x79", "\x73\x70\x61\x6E", "\x63\x68\x69\x6C\x64\x72\x65\x6E", "\x77\x65\x62\x6B\x69\x74\x54\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x45\x6E\x64\x20\x6F\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x65\x6E\x64\x20\x6F\x54\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x45\x6E\x64\x20\x6D\x73\x54\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x45\x6E\x64\x20\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x65\x6E\x64", "\x69\x73\x2D\x68\x69\x64\x64\x65\x6E", "\x6F\x6E\x65", "\x6E\x6F\x2D\x63\x73\x73\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x73", "\x68\x74\x6D\x6C", "\x68\x65\x69\x67\x68\x74", "\x70\x6F\x77", "\x77\x69\x64\x74\x68", "\x73\x71\x72\x74", "\x70\x78"];
(function(_0xdb93x1) {
_0xf647[1];
_0xdb93x1(window)[_0xf647[11]](_0xf647[2], function() {
_0xdb93x1(_0xf647[4])[_0xf647[3]]();
_0xdb93x1(_0xf647[7])[_0xf647[6]](350)[_0xf647[3]](_0xf647[5]);
_0xdb93x1(_0xf647[10])[_0xf647[6]](350)[_0xf647[9]]({ '\x6F\x76\x65\x72\x66\x6C\x6F\x77': _0xf647[8] })
});
_0xdb93x1(_0xf647[13])[_0xf647[11]](_0xf647[12], function() {
var _0xdb93x2 = _0xdb93x1(_0xf647[13]);
_0xdb93x2[_0xf647[14]]();
if (_0xdb93x2[_0xf647[15]]()) { _0xdb93x1(_0xf647[17])[_0xf647[16]]() }
});
_0xdb93x1(_0xf647[25])[_0xf647[24]](function() { _0xdb93x1(this)[_0xf647[23]]()[_0xf647[22]](_0xf647[18])[_0xf647[21]](_0xf647[20])[_0xf647[19]](_0xf647[18]) });
var _0xdb93x3 = new FloatLabels(_0xf647[26], { style: 1 });
_0xdb93x1(_0xf647[36])[_0xf647[11]](_0xf647[24], function(_0xdb93x4) {
_0xdb93x4[_0xf647[27]]();
var _0xdb93x5 = this[_0xf647[28]];
var _0xdb93x6 = _0xdb93x1(_0xdb93x5);
_0xdb93x1(_0xf647[35])[_0xf647[34]]()[_0xf647[33]]({ '\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70': _0xdb93x6[_0xf647[30]]()[_0xf647[29]] }, 400, _0xf647[31], function() { window[_0xf647[32]][_0xf647[28]] = _0xdb93x5 })
});
var _0xdb93x7 = _0xdb93x1(_0xf647[37]),
_0xdb93x8 = _0xdb93x1(_0xf647[38]),
_0xdb93x9 = _0xdb93x1(_0xf647[39]),
_0xdb93xa = _0xdb93x1(_0xf647[40]);
_0xdb93xb();
_0xdb93x1(window)[_0xf647[11]](_0xf647[41], function() { window[_0xf647[42]](_0xdb93xb) });
_0xdb93xa[_0xf647[11]](_0xf647[24], function() {
if (!_0xdb93xa[_0xf647[44]](_0xf647[43])) {
_0xdb93xa[_0xf647[22]](_0xf647[43]);
_0xdb93x7[_0xf647[49]](_0xf647[48])[_0xf647[47]]({ translateZ: 0, scaleX: 1, scaleY: 1 }, 500, _0xf647[45], function() { _0xdb93x9[_0xf647[22]](_0xf647[46]) })
} else {
_0xdb93xa[_0xf647[19]](_0xf647[43]);
_0xdb93x8[_0xf647[49]](_0xf647[48])[_0xf647[47]]({ translateZ: 0, scaleX: 1, scaleY: 1 }, 500, _0xf647[45], function() {
_0xdb93x9[_0xf647[19]](_0xf647[46]);
_0xdb93x7[_0xf647[49]](_0xf647[48])[_0xf647[47]]({ translateZ: 0, scaleX: 0, scaleY: 0 }, 0);
_0xdb93x8[_0xf647[22]](_0xf647[51])[_0xf647[52]](_0xf647[50], function() { _0xdb93x8[_0xf647[49]](_0xf647[48])[_0xf647[47]]({ translateZ: 0, scaleX: 0, scaleY: 0 }, 0, function() { _0xdb93x8[_0xf647[19]](_0xf647[51]) }) });
if (_0xdb93x1(_0xf647[54])[_0xf647[44]](_0xf647[53])) { _0xdb93x8[_0xf647[49]](_0xf647[48])[_0xf647[47]]({ translateZ: 0, scaleX: 0, scaleY: 0 }, 0, function() { _0xdb93x8[_0xf647[19]](_0xf647[51]) }) }
})
}
});
function _0xdb93xb() {
var _0xdb93xc = (Math[_0xf647[58]](Math[_0xf647[56]](_0xdb93x1(window)[_0xf647[55]](), 2) + Math[_0xf647[56]](_0xdb93x1(window)[_0xf647[57]](), 2)) * 2);
_0xdb93x7[_0xf647[49]](_0xf647[48])[_0xf647[47]]({ scaleX: 0, scaleY: 0, translateZ: 0 }, 50)[_0xf647[47]]({ height: _0xdb93xc + _0xf647[59], width: _0xdb93xc + _0xf647[59], top: -(_0xdb93xc / 2) + _0xf647[59], left: -(_0xdb93xc / 2) + _0xf647[59] }, 0);
_0xdb93x8[_0xf647[49]](_0xf647[48])[_0xf647[47]]({ scaleX: 0, scaleY: 0, translateZ: 0 }, 50)[_0xf647[47]]({ height: _0xdb93xc + _0xf647[59], width: _0xdb93xc + _0xf647[59], top: -(_0xdb93xc / 2) + _0xf647[59], left: -(_0xdb93xc / 2) + _0xf647[59] }, 0)
}
})(window[_0xf647[0]])
|
var express = require('express');
var exphbs = require('express-handlebars');
var path = require('path');
var bodyParser = require('body-parser');
module.exports = function(app){
app.use(bodyParser.urlencoded({
extended: true,
}));
app.engine('hbs', exphbs({
extname: '.hbs',
defaultLayout: 'application',
layoutsDir: path.resolve('app/views/layouts')
}));
app.set('view engine', 'hbs');
app.set('views', path.resolve('app/views/'));
};
|
var commentTemplate = `
<div class=" thing id-{{name}} noncollapsed comment " data-author="{{author}}" data-fullname="{{name}}" data-subreddit="SubredditSimulator" data-subreddit-fullname="{{subreddit_id}}" data-type="comment" id="thing_{{name}}" onclick="click_thing(this)">
<p class="parent">
<a name="{{id}}"></a>
</p>
<div class="midcol unvoted">
<div aria-label="upvote" class="arrow up login-required archived access-required" data-event-action="upvote" role="button" tabindex="0"></div>
<div aria-label="downvote" class="arrow down login-required archived access-required" data-event-action="downvote" role="button" tabindex="0"></div>
</div>
<div class="entry unvoted">
<p class="tagline">
<a class="expand" href="javascript:void(0)" onclick="return togglecomment(this)">
[–]
</a>
<a class="author may-blank userTagged" href="https://www.reddit.com/user/{{author}}">
{{author}}
</a>
<span class="RESUserTag">
<a class="userTagLink RESUserTagImage" href="javascript:void 0" title="set a tag" username="pics_ss"></a>
</span>
<a class="voteWeight" href="#" style="display: none;">
[vw]
</a>
<span class="userattrs"></span>
<span class="score dislikes">
{{score}} points
</span>
<span class="score unvoted">
{{score}} points
</span>
<span class="score likes">
{{score}} points
</span>
<time class="" datetime="2015-06-08T17:40:32+00:00" title="Mon Jun 8 17:40:32 2015 UTC">
8 hours ago
</time>
<a class="numchildren" href="javascript:void(0)" onclick="return togglecomment(this)">
(1 child)
</a>
</p>
<form action="#" class="usertext" id="form-{{name}}6s4" onsubmit="return post_form(this, 'editusertext')">
<input name="thing_id" type="hidden" value="{{name}}">
<div class="usertext-body may-blank-within md-container ">
{{{body_html}}}
</div>
</input>
</form>
<ul class="flat-list buttons">
<li class="first">
<a class="bylink" data-event-action="permalink" href="https://www.reddit.com/r/SubredditSimulator/comments/{{link_id}}/{{id}}" rel="nofollow">
permalink
</a>
</li>
<li class="viewSource">
<a class="noCtrlF" data-text="source" href="javascript:void 0"></a>
</li>
<li class="comment-save-button save-button">
<a href="javascript:void(0)">
save
</a>
</li>
<li class="saveComments">
<a class="RES-save noCtrlF" data-text="save-RES" href="javascript:void 0" title="Save using RES - which is local only, but preserves the full text in case someone edits/deletes it"></a>
</li>
<li class="give-gold-button">
<a class="give-gold login-required access-required" data-event-action="gild" href="/gold?goldtype=gift&months=1&thing={{name}}" title="give reddit gold in appreciation of this post.">
give gold
</a>
</li>
</ul>
<div class="reportform report-{{name}}"></div>
</div>
<div class="child">
<div class="sitetable listing" id="siteTable_{{name}}"></div>
</div>
</div>
`
|
import matchdom from 'matchdom';
import Viewer from '@pageboard/pagecut/src/viewer.js';
import str2dom from '@pageboard/pagecut/src/str2dom.js';
import * as filters from './filters';
Object.assign(matchdom.filters, filters);
Document.prototype.dom = function(str) {
return str2dom(Array.prototype.join.call(arguments, '\n'), {
doc: this
});
};
Document.prototype.fuse = XMLDocument.prototype.fuse = function(obj, scope) {
this.documentElement.fuse(obj, scope);
return this;
};
Node.prototype.dom = function() {
return str2dom(Array.prototype.join.call(arguments, '\n'), {
doc: this.ownerDocument,
ns: this.namespaceURI
});
};
const mSym = matchdom.Symbols;
const reFuse = new RegExp(`\\${mSym.open}[^\\${mSym.open}\\${mSym.close}]+\\${mSym.close}`);
Node.prototype.fuse = function(obj, scope) {
// eslint-disable-next-line no-console
if (!scope) console.warn("Missing scope param");
return matchdom(this, obj, scope.$filters, {data: scope});
};
String.prototype.fuse = function(obj, scope) {
if (obj == null && scope == null) return reFuse.test(this.toString());
return matchdom(this.toString(), obj, scope ? scope.$filters : null, {data: scope});
};
export function render(res, scope, el) {
const elts = scope.$elements;
if (!res) res = {};
if (!scope.$view) scope.$view = new Viewer({
elements: elts,
doc: scope.$doc
});
if (el) install(el, scope);
scope = { ...scope };
for (const [k, rek] of Object.entries(res)) scope[`$${k}`] = rek;
const block = res.item ?? {};
const blocks = {};
if (!el && block.type) {
el = elts[block.type];
}
if (res.items) {
for (const child of res.items) {
blocks[child.id] = child;
// this case should actually be res.item.children (like blocks.search api)
// but page.get api returns res.item/res.items and we can't change it in a compatible way.
if (child.children && !res.item) {
for (const item of child.children) {
blocks[item.id] = item;
}
}
}
}
return scope.$view.from(block, blocks, {
type: el.name,
element: el,
scope: scope,
strip: !scope.$write
});
}
export function install(el, scope) {
if (el.$installed) return;
el.$installed = true;
try {
if (el.html != null) {
el.dom = str2dom(el.html, {
doc: scope.$doc,
ns: el.ns
});
el.fusable = el.html.fuse();
} else {
el.fusable = true;
}
if (el.fragments) {
let reparse = false;
for (const obj of el.fragments) {
let target;
if (obj.type === 'doc') target = scope.$element;
else if (obj.type) target = scope.$elements[obj.type] ?? {};
else target = el;
if (!target.dom) {
// eslint-disable-next-line no-console
console.warn("dom not found for fragment", obj.type, el.name);
} else {
const node = obj.path ? target.dom.querySelector(obj.path) : target.dom;
if (node) {
if (obj.html) {
node.insertAdjacentHTML(obj.position || 'afterend', obj.html);
if (obj.html.fuse()) el.fusable = true;
}
if (obj.attributes) {
for (const [key, attr] of Object.entries(obj.attributes)) {
if (key == "is" && attr) reparse = true;
node.setAttribute(key, attr);
if (attr.fuse()) el.fusable = true;
}
}
} else {
// eslint-disable-next-line no-console
console.warn("path not found", obj.path, "in", el.name, el.html);
}
}
}
if (reparse) el.dom = str2dom(el.dom.outerHTML, {
doc: scope.$doc,
ns: el.ns
});
}
if (el.install && scope.$element) {
el.install(scope);
}
} catch(err) {
// eslint-disable-next-line no-console
console.error("Invalid element", el, err);
return;
}
if (!el.dom) return;
el.render = function(block, bscope) {
const el = this;
if (!block) block = {};
const rscope = { ...scope, ...bscope, $element: el };
for (const name of ["id", "type", "parent", "child", "parents", "children", "updated_at", "created_at", "lock", "expr"]) {
const val = block[name];
if (val != null) rscope['$' + name] = val;
}
if (el.filters) rscope.$filters = { ...rscope.$filters, ...el.filters };
const data = Pageboard.merge(block.data, block.expr, (c, v) => {
if (typeof v != "string") return;
return v.fuse({
$default: c
}, {
$filters: {
magnet: function (val) {
return val;
},
bmagnet: function (val) {
return;
},
attr: function (val) {
return val;
},
'||': function (val, what) {
if (what.expr.path[0] != "$default") {
what.cancel = true;
}
return val;
}
}
});
});
let dom = el.dom && el.dom.cloneNode(true);
if (el.fuse) {
dom = el.fuse(dom, data, rscope) || dom;
} else if (el.fusable) {
if (!dom) throw new Error("Invalid element", el, "missing dom");
dom = dom.fuse(data, rscope);
if (!dom) return;
let list;
if (dom.nodeType != Node.DOCUMENT_FRAGMENT_NODE) {
list = [dom];
} else {
list = Array.from(dom.children);
}
for (const node of list) {
for (const attr of Array.from(node.attributes)) {
if (!attr.name.startsWith('style-')) continue;
const style = attr.name.split('-').slice(1).map((w, i) => {
if (i > 0) w = w[0].toUpperCase() + w.substr(1);
return w;
}).join("");
node.style[style] = attr.value;
node.removeAttribute(attr.name);
}
}
}
return dom;
};
}
|
import { txClient, queryClient, MissingWalletError } from './module';
// @ts-ignore
import { SpVuexError } from '@starport/vuex';
import { Character } from "./module/types/charservice/character";
export { Character };
async function initTxClient(vuexGetters) {
return await txClient(vuexGetters['common/wallet/signer'], {
addr: vuexGetters['common/env/apiTendermint']
});
}
async function initQueryClient(vuexGetters) {
return await queryClient({
addr: vuexGetters['common/env/apiCosmos']
});
}
function mergeResults(value, next_values) {
for (let prop of Object.keys(next_values)) {
if (Array.isArray(next_values[prop])) {
value[prop] = [...value[prop], ...next_values[prop]];
}
else {
value[prop] = next_values[prop];
}
}
return value;
}
function getStructure(template) {
let structure = { fields: [] };
for (const [key, value] of Object.entries(template)) {
let field = {};
field.name = key;
field.type = typeof value;
structure.fields.push(field);
}
return structure;
}
const getDefaultState = () => {
return {
GetAllCharsByCreator: {},
GetCharByName: {},
GetAllCharsForSale: {},
GetAllCharsOfType: {},
GetAllCharsOfOwner: {},
Character: {},
CharacterAll: {},
_Structure: {
Character: getStructure(Character.fromPartial({})),
},
_Subscriptions: new Set(),
};
};
// initial state
const state = getDefaultState();
export default {
namespaced: true,
state,
mutations: {
RESET_STATE(state) {
Object.assign(state, getDefaultState());
},
QUERY(state, { query, key, value }) {
state[query][JSON.stringify(key)] = value;
},
SUBSCRIBE(state, subscription) {
state._Subscriptions.add(subscription);
},
UNSUBSCRIBE(state, subscription) {
state._Subscriptions.delete(subscription);
}
},
getters: {
getGetAllCharsByCreator: (state) => (params = { params: {} }) => {
if (!params.query) {
params.query = null;
}
return state.GetAllCharsByCreator[JSON.stringify(params)] ?? {};
},
getGetCharByName: (state) => (params = { params: {} }) => {
if (!params.query) {
params.query = null;
}
return state.GetCharByName[JSON.stringify(params)] ?? {};
},
getGetAllCharsForSale: (state) => (params = { params: {} }) => {
if (!params.query) {
params.query = null;
}
return state.GetAllCharsForSale[JSON.stringify(params)] ?? {};
},
getGetAllCharsOfType: (state) => (params = { params: {} }) => {
if (!params.query) {
params.query = null;
}
return state.GetAllCharsOfType[JSON.stringify(params)] ?? {};
},
getGetAllCharsOfOwner: (state) => (params = { params: {} }) => {
if (!params.query) {
params.query = null;
}
return state.GetAllCharsOfOwner[JSON.stringify(params)] ?? {};
},
getCharacter: (state) => (params = { params: {} }) => {
if (!params.query) {
params.query = null;
}
return state.Character[JSON.stringify(params)] ?? {};
},
getCharacterAll: (state) => (params = { params: {} }) => {
if (!params.query) {
params.query = null;
}
return state.CharacterAll[JSON.stringify(params)] ?? {};
},
getTypeStructure: (state) => (type) => {
return state._Structure[type].fields;
}
},
actions: {
init({ dispatch, rootGetters }) {
console.log('Vuex module: charactertoken.ctok.charservice initialized!');
if (rootGetters['common/env/client']) {
rootGetters['common/env/client'].on('newblock', () => {
dispatch('StoreUpdate');
});
}
},
resetState({ commit }) {
commit('RESET_STATE');
},
unsubscribe({ commit }, subscription) {
commit('UNSUBSCRIBE', subscription);
},
async StoreUpdate({ state, dispatch }) {
state._Subscriptions.forEach(async (subscription) => {
try {
await dispatch(subscription.action, subscription.payload);
}
catch (e) {
throw new SpVuexError('Subscriptions: ' + e.message);
}
});
},
async QueryGetAllCharsByCreator({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params: { ...key }, query = null }) {
try {
const queryClient = await initQueryClient(rootGetters);
let value = (await queryClient.queryGetAllCharsByCreator(query)).data;
while (all && value.pagination && value.pagination.nextKey != null) {
let next_values = (await queryClient.queryGetAllCharsByCreator({ ...query, 'pagination.key': value.pagination.nextKey })).data;
value = mergeResults(value, next_values);
}
commit('QUERY', { query: 'GetAllCharsByCreator', key: { params: { ...key }, query }, value });
if (subscribe)
commit('SUBSCRIBE', { action: 'QueryGetAllCharsByCreator', payload: { options: { all }, params: { ...key }, query } });
return getters['getGetAllCharsByCreator']({ params: { ...key }, query }) ?? {};
}
catch (e) {
throw new SpVuexError('QueryClient:QueryGetAllCharsByCreator', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async QueryGetCharByName({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params: { ...key }, query = null }) {
try {
const queryClient = await initQueryClient(rootGetters);
let value = (await queryClient.queryGetCharByName(query)).data;
while (all && value.pagination && value.pagination.nextKey != null) {
let next_values = (await queryClient.queryGetCharByName({ ...query, 'pagination.key': value.pagination.nextKey })).data;
value = mergeResults(value, next_values);
}
commit('QUERY', { query: 'GetCharByName', key: { params: { ...key }, query }, value });
if (subscribe)
commit('SUBSCRIBE', { action: 'QueryGetCharByName', payload: { options: { all }, params: { ...key }, query } });
return getters['getGetCharByName']({ params: { ...key }, query }) ?? {};
}
catch (e) {
throw new SpVuexError('QueryClient:QueryGetCharByName', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async QueryGetAllCharsForSale({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params: { ...key }, query = null }) {
try {
const queryClient = await initQueryClient(rootGetters);
let value = (await queryClient.queryGetAllCharsForSale(query)).data;
while (all && value.pagination && value.pagination.nextKey != null) {
let next_values = (await queryClient.queryGetAllCharsForSale({ ...query, 'pagination.key': value.pagination.nextKey })).data;
value = mergeResults(value, next_values);
}
commit('QUERY', { query: 'GetAllCharsForSale', key: { params: { ...key }, query }, value });
if (subscribe)
commit('SUBSCRIBE', { action: 'QueryGetAllCharsForSale', payload: { options: { all }, params: { ...key }, query } });
return getters['getGetAllCharsForSale']({ params: { ...key }, query }) ?? {};
}
catch (e) {
throw new SpVuexError('QueryClient:QueryGetAllCharsForSale', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async QueryGetAllCharsOfType({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params: { ...key }, query = null }) {
try {
const queryClient = await initQueryClient(rootGetters);
let value = (await queryClient.queryGetAllCharsOfType(query)).data;
while (all && value.pagination && value.pagination.nextKey != null) {
let next_values = (await queryClient.queryGetAllCharsOfType({ ...query, 'pagination.key': value.pagination.nextKey })).data;
value = mergeResults(value, next_values);
}
commit('QUERY', { query: 'GetAllCharsOfType', key: { params: { ...key }, query }, value });
if (subscribe)
commit('SUBSCRIBE', { action: 'QueryGetAllCharsOfType', payload: { options: { all }, params: { ...key }, query } });
return getters['getGetAllCharsOfType']({ params: { ...key }, query }) ?? {};
}
catch (e) {
throw new SpVuexError('QueryClient:QueryGetAllCharsOfType', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async QueryGetAllCharsOfOwner({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params: { ...key }, query = null }) {
try {
const queryClient = await initQueryClient(rootGetters);
let value = (await queryClient.queryGetAllCharsOfOwner(query)).data;
while (all && value.pagination && value.pagination.nextKey != null) {
let next_values = (await queryClient.queryGetAllCharsOfOwner({ ...query, 'pagination.key': value.pagination.nextKey })).data;
value = mergeResults(value, next_values);
}
commit('QUERY', { query: 'GetAllCharsOfOwner', key: { params: { ...key }, query }, value });
if (subscribe)
commit('SUBSCRIBE', { action: 'QueryGetAllCharsOfOwner', payload: { options: { all }, params: { ...key }, query } });
return getters['getGetAllCharsOfOwner']({ params: { ...key }, query }) ?? {};
}
catch (e) {
throw new SpVuexError('QueryClient:QueryGetAllCharsOfOwner', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async QueryCharacter({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params: { ...key }, query = null }) {
try {
const queryClient = await initQueryClient(rootGetters);
let value = (await queryClient.queryCharacter(key.index)).data;
commit('QUERY', { query: 'Character', key: { params: { ...key }, query }, value });
if (subscribe)
commit('SUBSCRIBE', { action: 'QueryCharacter', payload: { options: { all }, params: { ...key }, query } });
return getters['getCharacter']({ params: { ...key }, query }) ?? {};
}
catch (e) {
throw new SpVuexError('QueryClient:QueryCharacter', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async QueryCharacterAll({ commit, rootGetters, getters }, { options: { subscribe, all } = { subscribe: false, all: false }, params: { ...key }, query = null }) {
try {
const queryClient = await initQueryClient(rootGetters);
let value = (await queryClient.queryCharacterAll(query)).data;
while (all && value.pagination && value.pagination.nextKey != null) {
let next_values = (await queryClient.queryCharacterAll({ ...query, 'pagination.key': value.pagination.nextKey })).data;
value = mergeResults(value, next_values);
}
commit('QUERY', { query: 'CharacterAll', key: { params: { ...key }, query }, value });
if (subscribe)
commit('SUBSCRIBE', { action: 'QueryCharacterAll', payload: { options: { all }, params: { ...key }, query } });
return getters['getCharacterAll']({ params: { ...key }, query }) ?? {};
}
catch (e) {
throw new SpVuexError('QueryClient:QueryCharacterAll', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async sendMsgBuyChar({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgBuyChar(value);
const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee,
gas: "200000" }, memo });
return result;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgBuyChar:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgBuyChar:Send', 'Could not broadcast Tx: ' + e.message);
}
}
},
async sendMsgUnlistSale({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgUnlistSale(value);
const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee,
gas: "200000" }, memo });
return result;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgUnlistSale:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgUnlistSale:Send', 'Could not broadcast Tx: ' + e.message);
}
}
},
async sendMsgSetSale({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgSetSale(value);
const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee,
gas: "200000" }, memo });
return result;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgSetSale:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgSetSale:Send', 'Could not broadcast Tx: ' + e.message);
}
}
},
async MsgBuyChar({ rootGetters }, { value }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgBuyChar(value);
return msg;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgBuyChar:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgBuyChar:Create', 'Could not create message: ' + e.message);
}
}
},
async MsgUnlistSale({ rootGetters }, { value }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgUnlistSale(value);
return msg;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgUnlistSale:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgUnlistSale:Create', 'Could not create message: ' + e.message);
}
}
},
async MsgSetSale({ rootGetters }, { value }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgSetSale(value);
return msg;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgSetSale:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgSetSale:Create', 'Could not create message: ' + e.message);
}
}
},
}
};
|
var gulp = require('gulp');
var dutil = require('./doc-util');
var linter = require('gulp-scss-lint');
gulp.task('copy-uswds-styles', function (done) {
dutil.logMessage('copy-uswds-styles', 'Copying Sass files from uswds');
var stream = gulp.src('./node_modules/uswds/src/stylesheets/**/*')
.pipe(gulp.dest('assets/css/vendor/uswds'));
return stream;
});
gulp.task('scss-lint', function (done) {
if (!cFlags.test) {
dutil.logMessage('scss-lint', 'Skipping linting of Sass files.');
return done();
}
return gulp.src([
'./css/**/*.scss'
])
.pipe(linter({
config: '.scss-lint.yml',
}))
.pipe(linter.failReporter('E'));
});
gulp.task('sass',
gulp.parallel(
'copy-uswds-styles'
)
);
|
/*
* Copyright 2018 NEM
*
* 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.
*/
import { sha3_256 } from 'js-sha3';
import expect from 'expect.js';
import SecretProofTransaction from '../../src/transactions/SecretProofTransaction';
import deadline from '../../src/transactions/Deadline';
import { HashAlgorithm } from '../../src/coders/hashAlgorithm';
import testUtilsSpec from '../testUtils.spec';
describe('SecretProofTransaction', () => {
const keyPair = {
publicKey: '9a49366406aca952b88badf5f1e9be6ce4968141035a60be503273ea65456b24',
privateKey: '041e2ce90c31cd65620ed16ab7a5a485e5b335d7e61c75cd9b3a2fed3e091728'
};
it('should create secret lock transaction', () => {
const hash = sha3_256.create();
hash.update('secret');
const secretProofTransaction = {
deadline: deadline(),
hashAlgorithm: HashAlgorithm.SHA3_256,
secret: hash.hex(),
recipient: 'SDUP5PLHDXKBX3UU5Q52LAY4WYEKGEWC6IB3VBFM',
proof: '9a493664'
};
const verifiableTransaction = new SecretProofTransaction.Builder()
.addDeadline(secretProofTransaction.deadline)
.addHashAlgorithm(secretProofTransaction.hashAlgorithm)
.addSecret(secretProofTransaction.secret)
.addRecipient(secretProofTransaction.recipient)
.addProof(secretProofTransaction.proof)
.build();
const transactionPayload = verifiableTransaction.signTransaction(keyPair, testUtilsSpec.generationHash);
expect(transactionPayload.payload.substring(
240,
transactionPayload.payload.length
)).to.be.equal('00F5A5207A8729B1F709CB710311751EB2FC8ACAD5A1FB8AC991B736E69B6529A390E8FEBD671DD41BEE94EC3BA5831CB608A312C2F203BA84AC04009A493664');
});
});
|
// pages/speciality/preview/purchase.js
const app = getApp().globalData;
Page({
/**
* 页面的初始数据
*/
data: {
loading: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
},
requestPayment: function() {
const self = this
self.setData({
loading: true
});
app.api.toast('暂时无法发起支付', '');
setTimeout(() => {
self.setData({
loading: false
});
}, 5000);
}
})
|
import React from "react";
import PropTypes from "prop-types";
import CircularProgress from "@material-ui/core/CircularProgress";
import { makeStyles, Button } from "@material-ui/core";
import { green } from "@material-ui/core/colors";
const useStyles = makeStyles({
root: {
display: "flex",
alignItems: "center",
marginTop: "25px",
},
wrapper: {
position: "relative",
},
buttonProgress: {
color: green[500],
position: "absolute",
top: "50%",
left: "50%",
marginTop: -12,
marginLeft: -12,
},
});
function SubmitButton(props) {
const classes = useStyles();
const [loading, setLoading] = React.useState(false);
const [success, setSuccess] = React.useState(false);
React.useEffect(() => {
setLoading(props.loading);
setSuccess(props.success);
}, [props]);
return (
<div className={classes.root}>
<div className={classes.wrapper}>
{props.onClick ? (
<Button
style={{
background: loading
? "#bbbbbb"
: success
? green[500]
: "linear-gradient(90deg, #eb334a, #f45c43)",
padding: "7.5px 25px",
color: "white",
fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
fontSize: "15px",
textTransform: "uppercase",
borderRadius: "5px",
border: "none",
height: "40px",
}}
onClick={props.onClick}
>
{props.title}
</Button>
) : (
<input
type="submit"
style={{
background: loading
? "#bbbbbb"
: success
? green[500]
: "linear-gradient(90deg, #eb334a, #f45c43)",
padding: "7.5px 25px",
color: "white",
fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
fontSize: "15px",
textTransform: "uppercase",
borderRadius: "5px",
border: "none",
height: "40px",
cursor: "pointer",
}}
value={props.title}
/>
)}
{loading && (
<CircularProgress size={24} className={classes.buttonProgress} />
)}
</div>
</div>
);
}
SubmitButton.propTypes = {
title: PropTypes.string,
loading: PropTypes.bool,
success: PropTypes.bool,
onClick: PropTypes.func,
};
export default SubmitButton;
|
import React, { useState, useEffect } from 'react';
// table
const CovidTable = () => {
const [stateData, setData] = useState([]);
useEffect(() => {
fetch( 'https://api.caw.sh/v3/covid-19/states' )
.then(response => response.json())
.then(setData);
}, []);
return (<div>
<table className="table table-dark">
<tr>
<th>State</th>
<th>Active</th>
<th>Recovered</th>
<th>Deaths</th>
<th>Population</th>
</tr>
{stateData.map((data) => (<tr><td>{data.state}</td><td>{data.active}</td><td>{data.recovered}</td><td>{data.deaths}</td><td>{data.population}</td></tr>))}
</table>
</div>
)
};
export default CovidTable;
|
const { createProxyMiddleware } = require("http-proxy-middleware");
module.exports = function (app) {
app.use(
createProxyMiddleware("/.netlify/functions/server/api", {
target: "http://localhost:9000/",
})
);
};
|
import React, {Component} from 'react';
import VariantSelector from './VariantSelector';
import Slider from './Slider'
import FormState from './FormState'
class ProductCard extends Component {
constructor(props) {
super(props);
this.state = {};
this.handleOptionChange = this.handleOptionChange.bind(this);
this.handleQuantityChange = this.handleQuantityChange.bind(this);
this.findImage = this.findImage.bind(this);
}
componentWillMount() {
this.props.product.options.forEach((selector) => {
this.setState({
selectedOptions: { [selector.name]: selector.values[0] }
});
});
}
findImage(images, variantId) {
const primary = images[0];
const image = images.filter(function (image) {
return image.variant_ids.includes(variantId);
})[0];
return (image || primary).src;
}
handleOptionChange(event) {
const target = event.target
let selectedOptions = this.state.selectedOptions;
selectedOptions[target.name] = target.value;
const selectedVariant = this.props.product.variants.edges.find((variant) => {
return variant.node.selectedOptions.every((selectedOption) => {
console.log(variant.node.selectedOptions)
return selectedOptions[selectedOption.name] === selectedOption.value;
});
}).node;
this.setState({
selectedVariant: selectedVariant,
selectedVariantImage: selectedVariant.image.src
});
}
handleQuantityChange(event) {
this.setState({
selectedVariantQuantity: event.target.value
});
}
render() {
const variantImages = [
{
src:this.props.product.images.edges[0].node.src,
alt: `${this.props.product.title} product shot1`
},
{
src:this.props.product.images.edges[0].node.src,
alt: `${this.props.product.title} product shot2`
},
{
src:this.props.product.images.edges[0].node.src,
alt: `${this.props.product.title} product shot3`
}
]
let variantImage = this.state.selectedVariantImage || this.props.product.images.edges[0].node.src
let variant = this.state.selectedVariant || this.props.product.variants.edges[0].node
let variant_selectors = this.props.product.options.map((option) => {
return (
option.values.length > 1?
<VariantSelector
handleOptionChange={this.handleOptionChange}
key={option.id.toString()}
option={option}
/>
: <div key={ option.id.toString() }>{option.values[0]}</div>
);
})
return (
<div className="col-md-4">
<div className="col-md-4">
{this.props.product.images.edges.length ? <img className="img-responsive" src={variantImage} alt={`${this.props.product.title} product shot`}/> : null}
</div>
<div className="Details__product col-md-6">
<h5 className="text-left ProductCard__title">{this.props.product.title}</h5>
<h6 className="text-left ProductCard__title">{this.props.product.vendor}</h6>
<span className="ProductCard_price">${variant.price}</span>
<FormState onAddingCart={this.props.addVariantToCart.bind(this)} variant={variant} />
</div>
</div>
);
}
}
export default ProductCard;
|
'use strict'
RIVEN.create = (append = true) => {
const lib = RIVEN.lib
Ø('mouse').create({ x: 2, y: 4 }, lib.Mouse)
Ø('init').create({ x: 2, y: 0 }, lib.Init)
Ø('query').create({ x: 8, y: 6 }, lib.Query)
Ø('model').create({ x: 12, y: 4 }, lib.Mesh, [
Ø('router').create({ x: 3, y: 0 }, lib.Router),
Ø('database').create({ x: 0, y: 4 }, lib.Database),
Ø('asulodeta').create({ x: 12, y: 8 }, lib.Table, tablatal, Yleta),
Ø('lexicon').create({ x: 3, y: 8 }, lib.Table, indental, Term),
Ø('horaire').create({ x: 6, y: 8 }, lib.Table, tablatal, Log),
Ø('issues').create({ x: 9, y: 8 }, lib.Table, indental, Issue),
Ø('glossary').create({ x: 0, y: 8 }, lib.Table, indental, List),
Ø('map').create({ x: 3, y: 4 }, lib.Map)
])
Ø('controller').create({ x: 32, y: 4 }, lib.Mesh, [
Ø('template').create({ x: 0, y: 0 }, lib.Template),
Ø(':default').create({ x: 0, y: 4 }, lib.DefaultTemplate),
Ø(':journal').create({ x: 3, y: 4 }, lib.JournalTemplate),
Ø(':calendar').create({ x: 6, y: 4 }, lib.CalendarTemplate),
Ø(':tracker').create({ x: 9, y: 4 }, lib.TrackerTemplate),
Ø('rss').create({ x: 0, y: 8 }, lib.Rss),
Ø('static').create({ x: 3, y: 8 }, lib.Static),
Ø('lxtxt').create({ x: 6, y: 8 }, lib.Lxtxt),
Ø('twtxt').create({ x: 9, y: 8 }, lib.Twtxt)
])
Ø('view').create({ x: 49, y: 4 }, lib.Mesh, [
Ø('document').create({ x: 0, y: 0 }, lib.Document, append),
Ø('terminal').create({ x: 6, y: 4 }, lib.Terminal),
Ø('header').create({ x: 0, y: 4 }, lib.Dom),
Ø('photo').create({ x: 0, y: 8 }, lib.Photo, 'photo'),
Ø('menu').create({ x: 3, y: 8 }, lib.Dom),
Ø('logo').create({ x: 6, y: 12 }, lib.Dom, 'a', null, { 'data-goto': 'home', href: '#home' }),
Ø('search').create({ x: 9, y: 12 }, lib.Input),
Ø('activity').create({ x: 3, y: 12 }, lib.Dom, 'ul'),
Ø('info').create({ x: 0, y: 12 }, lib.Dom),
Ø('glyph').create({ x: 3, y: 16 }, lib.Path),
Ø('title').create({ x: 0, y: 16 }, lib.Dom),
Ø('core').create({ x: 12, y: 4 }, lib.Dom),
Ø('content').create({ x: 15, y: 8 }, lib.Dom),
Ø('main').create({ x: 12, y: 12 }, lib.Dom),
Ø('tracker').create({ x: 15, y: 12 }, lib.Dom),
Ø('calendar').create({ x: 18, y: 12 }, lib.Dom),
Ø('journal').create({ x: 21, y: 12 }, lib.Dom),
Ø('sidebar').create({ x: 12, y: 8 }, lib.Dom),
Ø('navi').create({ x: 18, y: 8 }, lib.Dom),
Ø('footer').create({ x: 21, y: 4 }, lib.Dom),
Ø('credits').create({ x: 21, y: 8 }, lib.Dom, 'div', `
<a target='_blank' href="https://twitter.com/neauoire" class="icon twitter external"></a>
<a target='_blank' href="https://github.com/neauoire" class="icon github external"></a>
<a target='_blank' href="https://merveilles.town/@neauoire" class="icon merveilles external"></a>
<a target='_blank' href="http://webring.xxiivv.com/#random" class="icon rotonde"></a>
<a target='_blank' href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="icon cc"></a>
<a data-goto='devine lu linvega' href='#devine+lu+linvega'>Devine Lu Linvega</a> © ${new Arvelie('06I04').toString(true)}—${arvelie()}
<center>${'About'.toLink('BY-NC-SA 4.0')} <span style="color:#ccc"'>${neralie()}</span></center>
<a target='_blank' href="http://100r.co" class="icon hundredrabbits"></a><hr>
`)
])
Ø('init').syphon(['database', 'document', 'query'])
Ø('mouse').connect('query')
// Model
Ø('router').syphon('database')
Ø('router').connect('template')
Ø('database').syphon(['asulodeta', 'issues', 'horaire', 'glossary', 'lexicon'])
Ø('query').connect('router')
Ø('database').connect('map')
Ø('template').connect('document')
// Controller
Ø('template').syphon([':default', ':calendar', ':journal', ':tracker'])
// Dom
Ø('header').bind(['photo', 'menu'])
Ø('menu').bind(['logo', 'info', 'search', 'activity'])
Ø('info').bind(['glyph', 'title'])
Ø('document').bind(['terminal', 'header', 'core', 'footer'])
Ø('core').bind(['sidebar', 'content', 'navi'])
Ø('content').bind(['main', 'journal', 'tracker', 'calendar'])
Ø('footer').bind(['credits'])
// Start
Ø('init').request()
}
|
import React, { Component } from 'react'
import { Location } from '@reach/router'
import { Link } from 'gatsby'
import { Menu, X } from 'react-feather'
import Logo from './Logo'
import './Nav.css'
export class Navigation extends Component {
state = {
active: false,
activeSubNav: false,
currentPath: false
}
componentDidMount = () =>
this.setState({ currentPath: this.props.location.pathname })
handleMenuToggle = () => this.setState({ active: !this.state.active })
// Only close nav if it is open
handleLinkClick = () => this.state.active && this.handleMenuToggle()
toggleSubNav = subNav =>
this.setState({
activeSubNav: this.state.activeSubNav === subNav ? false : subNav
})
render() {
const { active } = this.state,
{ subNav } = this.props,
NavLink = ({ to, className, children, ...props }) => (
<Link
to={to}
className={`NavLink ${
to === this.state.currentPath ? 'active' : ''
} ${className}`}
onClick={this.handleLinkClick}
{...props}
>
{children}
</Link>
)
return (
<nav className={`Nav ${active ? 'Nav-active' : ''}`}>
<div className="Nav--Container container">
<Link to="/" onClick={this.handleLinkClick}>
<Logo />
</Link>
<div className="Nav--Links">
<NavLink to="/blog/">
All Posts
</NavLink>
{subNav.posts.sort().map((link, index) => (
<NavLink
to={link.slug}
key={'posts-subnav-link-' + index}
>
{link.title}
</NavLink>
))}
<NavLink to="/tags/">Tags</NavLink>
<NavLink to="/contact/">Contact</NavLink>
</div>
<button
className="Button-blank Nav--MenuButton"
onClick={this.handleMenuToggle}
>
{active ? <X /> : <Menu />}
</button>
</div>
</nav>
)
}
}
export default ({ subNav }) => (
<Location>{route => <Navigation subNav={subNav} {...route} />}</Location>
)
|
/**
* meraki
*
* This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ).
*/
'use strict';
const BaseModel = require('./BaseModel');
/**
* Creates an instance of UpdateNetworkSmProfileUmbrellaModel
*/
class UpdateNetworkSmProfileUmbrellaModel extends BaseModel {
/**
* @constructor
* @param {Object} obj The object passed to constructor
*/
constructor(obj) {
super(obj);
if (obj === undefined || obj === null) return;
this.name = this.constructor.getValue(obj.name);
this.scope = this.constructor.getValue(obj.scope);
this.appBundleIdentifier =
this.constructor.getValue(obj.appBundleIdentifier
|| obj.AppBundleIdentifier);
this.providerBundleIdentifier =
this.constructor.getValue(obj.providerBundleIdentifier
|| obj.ProviderBundleIdentifier);
this.providerConfiguration =
this.constructor.getValue(obj.providerConfiguration
|| obj.ProviderConfiguration);
this.usesCert = this.constructor.getValue(obj.usesCert);
}
/**
* Function containing information about the fields of this model
* @return {array} Array of objects containing information about the fields
*/
static mappingInfo() {
return super.mappingInfo().concat([
{ name: 'name', realName: 'name' },
{ name: 'scope', realName: 'scope' },
{ name: 'appBundleIdentifier', realName: 'AppBundleIdentifier' },
{ name: 'providerBundleIdentifier', realName: 'ProviderBundleIdentifier' },
{ name: 'providerConfiguration', realName: 'ProviderConfiguration' },
{ name: 'usesCert', realName: 'usesCert' },
]);
}
/**
* Function containing information about discriminator values
* mapped with their corresponding model class names
*
* @return {object} Object containing Key-Value pairs mapping discriminator
* values with their corresponding model classes
*/
static discriminatorMap() {
return {};
}
}
module.exports = UpdateNetworkSmProfileUmbrellaModel;
|
#!/usr/bin/env node
const { promises: fs } = require('fs');
const { resolve: resolvePath } = require('path');
const { spawn } = require('child_process');
const { diff } = require('deep-diff');
const { endpointUrl, srcPath } = require('./_constants');
const reCdnUrl = new RegExp(`^${endpointUrl}/(.+)-([\\d\\.]+)\\.js$`);
const rootPath = resolvePath(__dirname, '..');
const inPath = resolvePath(rootPath, srcPath);
const encoding = 'utf8';
function getHeadContent(filePath) {
return new Promise((resolve, reject) => {
const out = [];
const err = [];
const args = ['-C', rootPath, '--no-pager', 'show', `HEAD:${filePath}`];
const child = spawn('git', args);
child.stdout.on('data', (data) => {
out.push(data);
});
child.stderr.on('data', (data) => {
err.push(data);
});
child.on('close', (code) => {
if (err.length || code !== 0) {
return reject({ code, content: err.join('') });
}
resolve(out.join(''));
});
});
}
function renderList(arr, prefix = ' -') {
arr.forEach((item) => {
console.log(`${prefix} ${item}`);
});
console.log(); // newline
}
(async () => {
const headContent = await getHeadContent(srcPath);
const currentContent = await fs.readFile(inPath, encoding);
const differences = diff(JSON.parse(headContent), JSON.parse(currentContent));
if (!differences) {
console.log('No differences');
return;
}
const added = [];
const updated = [];
const deleted = [];
differences.forEach((d) => {
switch (d.kind) {
case 'D':
deleted.push(d.path);
break;
case 'E':
updated.push(d.rhs.replace(reCdnUrl, '$1: $2'));
break;
case 'N':
added.push(d.path);
break;
default:
console.warn('Unexpected difference', d);
}
});
if (updated.length || deleted.length) {
console.log('**Breaking Changes**\n');
}
if (updated.length) {
console.log('- UPDATED version for AMP components:\n');
renderList(updated);
}
if (deleted.length) {
console.log('- REMOVED support for AMP components:\n');
renderList(deleted);
}
if (added.length) {
console.log('**Other Changes**\n');
console.log('- ADDED support for AMP components:\n');
renderList(added);
}
})();
|
const path = require('path')
const fs = require('fs')
const assert = require('assert')
const {ensureDirSync} = require('../lib')
/* global describe:false, it:false after:false */
describe('ensureDirSync', () => {
it('should make a dir when give a not exist relative path', () => {
let dir = path.normalize('./test/he/llo/wor/ld')
ensureDirSync(dir)
assert(fs.existsSync(dir) && fs.statSync(dir).isDirectory())
})
it('should not raise error when give an exist relative path', () => {
ensureDirSync('./test')
assert(true)
})
it('should make a dir when give a not exist absolute path', () => {
let dir = path.join(process.env.PWD, './test/foo/bar')
ensureDirSync(dir)
assert(fs.existsSync(dir) && fs.statSync(dir).isDirectory())
})
it('should not raise error when give an exist absolute path', () => {
ensureDirSync(path.join(process.env.PWD, './test'))
assert(true)
})
after(() => {
/* should del dir */
})
})
|
"use strict";
/********************************************************************************
* Copyright (C) 2017 TypeFox and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the Eclipse
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
* with the GNU Classpath Exception which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
var vscode_uri_1 = require("vscode-uri");
var uri_1 = require("../common/uri");
var FileUri;
(function (FileUri) {
/**
* Creates a new file URI from the filesystem path argument.
* @param fsPath the filesystem path.
*/
function create(fsPath_) {
return new uri_1.default(vscode_uri_1.default.file(fsPath_));
}
FileUri.create = create;
/**
* Returns with the platform specific FS path that is represented by the URI argument.
*
* @param uri the file URI that has to be resolved to a platform specific FS path.
*/
function fsPath(uri) {
if (typeof uri === 'string') {
return fsPath(new uri_1.default(uri));
}
else {
// tslint:disable-next-line:no-any
return uri.codeUri.fsPath;
}
}
FileUri.fsPath = fsPath;
})(FileUri = exports.FileUri || (exports.FileUri = {}));
//# sourceMappingURL=file-uri.js.map
|
import test from 'ava';
import LIVR from '../lib/LIVR';
function patchRule(ruleName, ruleBuilder) {
return function(...params) {
const ruleValidator = ruleBuilder(...params);
const ruleArgs = params.splice(0, params.length - 1);
return (...params) => {
const errorCode = ruleValidator(...params);
if (errorCode) {
const rule = {
[ruleName]: ruleArgs
};
return {
code: errorCode,
rule
};
}
};
};
}
test('Rules replacement: Validate data with registered rules', t => {
// Patch rules
const defaultRules = LIVR.Validator.getDefaultRules();
const originalRules = {};
const newRules = {};
for (const ruleName in defaultRules) {
const ruleBuilder = defaultRules[ruleName];
originalRules[ruleName] = ruleBuilder;
newRules[ruleName] = patchRule(ruleName, ruleBuilder);
}
LIVR.Validator.registerDefaultRules(newRules);
// Test
const validator = new LIVR.Validator({
name: ['required'],
phone: { max_length: 10 }
});
const output = validator.validate({
phone: '123456789123456'
});
t.true(!output, 'Validation should fail');
t.deepEqual(
validator.getErrors(),
{
name: {
code: 'REQUIRED',
rule: { required: [] }
},
phone: {
code: 'TOO_LONG',
rule: { max_length: [10] }
}
},
'Should return detailed errors'
);
// Restore
LIVR.Validator.registerDefaultRules(originalRules);
});
|
"use strict";
const items = require("../items");
let findItemByName = (itemName) => {
return new Promise((resolve, reject) => {
if (typeof (itemName) != "number" && typeof (itemName) != "string") {
reject("Item must be a string or integer");
}
else {
if (typeof (itemName) == "number") {
resolve(itemName);
}
else if (typeof (itemName) == "string") {
for (var i = 0; i < items.length; i++) {
if (items[i].name.toLowerCase() === itemName.toLowerCase()) {
resolve(items[i].id);
}
}
reject(new Error("Item name not found"));
}
else {
reject(new Error("Item name not found"));
}
}
});
};
module.exports = {
findItemByName: findItemByName
}
|
const Spot = require('../models/Spot');
module.exports = {
async show(req, res)
{
const { user_id } = req.headers;
const spots = await Spot.find({ user: user_id });
return res.json(spots);
}
}
|
import React, { Component } from "react";
import { Table, Popconfirm, Form, Space, Button } from 'antd';
import { CategoryCreateForm } from '../forms/CategoryCreateForm';
import { EditableCell } from '../lib/EditableCell';
import CategoryModel from "../model/CategoryModel";
class NewsCategory extends Component {
formRef = React.createRef();
constructor(props) {
super(props);
this.state = {
data: [],
editingId: -1,
visible: false,
}
}
componentDidMount() {
CategoryModel.list().then(res => {
this.setState({
data: res.data
})
}).catch(e => {
console.log(e);
})
}
isEditing(record) {
return record.id == this.state.editingId;
}
edit(record) {
console.log(record)
this.formRef.current.setFieldsValue({ ...record });
this.setState({ editingId: record.id });
}
cancel() {
this.setState({ editingId: -1 });
}
handleDelete(id) {
CategoryModel.delete(id).then(res => {
this.setState({
data: this.state.data.filter((item) => item.id !== id),
});
}).catch(error => {
console.log(error);
})
}
onCreate(values) {
let data = values;
const newData = [...this.state.data];
CategoryModel.create(data).then(res => {
newData.push(res.data);
this.setState({
data: newData,
visible: false,
});
});
}
async save(id) {
try {
const row = await this.formRef.current.validateFields();
const newData = [...this.state.data];
const index = newData.findIndex((item) => id === item.id);
if (index > -1) {
const item = { ...newData[index], ...row };
newData.splice(index, 1, item);
CategoryModel.update(id, item);
}
this.setState({ data: newData, editingId: -1 });
} catch (error) {
console.log(error);
}
}
renderColumns() {
return [
{
title: 'Title',
dataIndex: 'title',
key: 'title',
editable: true,
sorter: (a, b) => a.newCases - b.newCases,
sortDirections: ['ascend', 'descend'],
},
{
title: 'Operation',
dataIndex: 'operation',
render: (_, record) => {
return this.isEditing(record) ?
<Space size='large'>
<button className="btn btn-success" onClick={() => this.save(record.id)}>Save</button>
<Popconfirm title="Sure to cancel?" onConfirm={() => this.cancel()}>
<button className="btn btn-default">Cancel</button>
</Popconfirm>
</Space>
:
<Space size='large'>
<button className="btn btn-warning" disabled={this.state.editingId != -1} onClick={() => this.edit(record)}>
<i className="zmdi zmdi-edit zmdi-hc-fw"></i>
</button>
<Popconfirm title="Sure to delete?" onConfirm={() => this.handleDelete(record.id)}>
<button className="btn btn-danger"><i className="la la-trash"></i></button>
</Popconfirm>
</Space>
}
},
].map((col) => {
return !col.editable ? col :
{
...col,
onCell: (record) => ({
record,
inputType: col.dataIndex,
dataIndex: col.dataIndex,
title: col.title,
editing: this.isEditing(record)
})
};
});
}
render() {
return (
<div className="content">
<header className="page-header">
<div className="d-flex align-items-center">
<div className="mr-auto">
<h1>News Category</h1>
</div>
<ul className="actions top-right">
<Button
type="primary"
size="large"
onClick={() => {
this.setState({ visible: true });
}}
>
New Category
</Button>
</ul>
</div>
</header>
<CategoryCreateForm
visible={this.state.visible}
onCreate={(values) => this.onCreate(values)}
onCancel={() => {
this.setState({ visible: false });
}}
size="large"
/>
<div className="card" style={{ margin: 28 }}>
<Form ref={this.formRef} name="control-ref">
<Table
components={{
body: {
cell: EditableCell,
},
}}
dataSource={this.state.data}
columns={this.renderColumns()}
rowClassName="editable-row"
pagination={{
onChange: () => this.cancel(),
}}
/>
</Form>
</div>
</div>
)
}
}
export default NewsCategory
|
// @flow
import React from 'react';
import type {ChildrenArray, Element} from 'react';
import {SortableContainer, SortableElement} from 'react-sortable-hoc';
import classNames from 'classnames';
import type {Button} from './types';
import Header from './Header';
import Item from './Item';
import multiItemSelectionStyles from './multiItemSelection.scss';
type Props<T, U, V, W> = {|
children?: ChildrenArray<Element<typeof Item>>,
disabled: boolean,
label?: string,
leftButton?: Button<U>,
loading: boolean,
onItemClick?: (itemId: T, value: ?W) => void,
onItemEdit?: (itemId: T) => void,
onItemRemove?: (itemId: T) => void,
onItemsSorted?: (oldIndex: number, newIndex: number) => void,
rightButton?: Button<V>,
sortable: boolean,
|};
type ItemWrapperProps = {
children: Element<typeof Item>,
isDisabled: boolean,
};
// Cannot use `disabled`, because that doesn't get passed down by SortableElement hoc
const ItemWrapper = ({children, isDisabled: disabled}: ItemWrapperProps) => {
const listElementClass = classNames(
multiItemSelectionStyles.listElement,
{
[multiItemSelectionStyles.disabled]: disabled,
}
);
return (
<li className={listElementClass}>
{children}
</li>
);
};
const SortableItemWrapper = SortableElement(ItemWrapper);
const ListWrapper = ({children}: Object) => (
<ul className={multiItemSelectionStyles.list}>
{children}
</ul>
);
const SortableListWrapper = SortableContainer(ListWrapper);
class MultiItemSelection<T, U: string | number, V: string | number, W> extends React.PureComponent<Props<T, U, V, W>> {
static defaultProps = {
disabled: false,
loading: false,
sortable: true,
};
static Item = Item;
handleItemEdit: (itemId: T) => void = (itemId) => {
const {onItemEdit} = this.props;
if (onItemEdit) {
onItemEdit(itemId);
}
};
handleItemRemove: (itemId: T) => void = (itemId) => {
const {onItemRemove} = this.props;
if (onItemRemove) {
onItemRemove(itemId);
}
};
handleItemsSorted = ({newIndex, oldIndex}: {newIndex: number, oldIndex: number}) => {
const {onItemsSorted} = this.props;
if (onItemsSorted) {
onItemsSorted(oldIndex, newIndex);
}
};
render() {
const {
disabled,
children,
label,
leftButton,
loading,
rightButton,
onItemClick,
onItemEdit,
onItemRemove,
sortable,
} = this.props;
const emptyList = !React.Children.count(children);
const ItemWrapperComponent = sortable ? SortableItemWrapper : ItemWrapper;
const ListWrapperComponent = sortable ? SortableListWrapper : ListWrapper;
const multiItemSelectionClass = classNames(
multiItemSelectionStyles.multiItemSelectionClass,
{
[multiItemSelectionStyles.disabled]: disabled,
}
);
return (
<div className={multiItemSelectionClass}>
<Header
disabled={disabled}
emptyList={emptyList}
label={label}
leftButton={leftButton ? {disabled, ...leftButton} : undefined}
loading={loading}
rightButton={rightButton ? {disabled, ...rightButton} : undefined}
/>
<ListWrapperComponent
axis="y"
helperClass={multiItemSelectionStyles.dragging}
lockAxis="y"
onSortEnd={this.handleItemsSorted}
useDragHandle={true}
>
{children && React.Children.map(children, (item, index) => (
<ItemWrapperComponent index={index} isDisabled={disabled}>
{
React.cloneElement(
item,
{
...item.props,
onClick: onItemClick ? onItemClick : item.props.onClick,
onEdit: onItemEdit ? this.handleItemEdit : item.props.onEdit,
onRemove: onItemRemove ? this.handleItemRemove : item.props.onRemove,
sortable,
}
)
}
</ItemWrapperComponent>
))}
</ListWrapperComponent>
</div>
);
}
}
export default MultiItemSelection;
|
import axios from "axios";
import {baseUrl} from "../utils/constantes";
export class ColorService {
getAll(){
return axios.get(baseUrl+"colores").then(res => res.data.data);
}
getOne(id){
return axios.get(baseUrl+"color/"+id).then(res => res.data);
}
create(color){
return axios.post(baseUrl+"color/", color).then(res => res.data).catch(error => error.response.data);
}
update(color){
return axios.put(baseUrl+"color/"+color.id, color).then(res => res.data).catch(error => error.response.data);;
}
softDelete(color){
return axios.put(baseUrl+"delete-color/"+color.id, color).then(res => res.data);
}
}
|
import React from 'react'
import { Icon } from './Icon'
import { kt } from './fragments'
export const FilledBlock = /*#__PURE__*/ props => <Icon {...props}>
<path d={kt + "M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"}/>
</Icon>
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["default~deals-details-deals-details-module~deals-listing-deals-listing-module~food-details-food-deta~310374f5"], {
/***/
"./node_modules/angular-pipes/fesm2015/angular-pipes.js":
/*!**************************************************************!*\
!*** ./node_modules/angular-pipes/fesm2015/angular-pipes.js ***!
\**************************************************************/
/*! exports provided: AbsPipe, BytesPipe, CapitalizePipe, CeilPipe, ChunkPipe, CountPipe, DecodeURIComponentPipe, DecodeURIPipe, DeepPipe, DefaultsPipe, DegreesPipe, DropPipe, EmptyPipe, EncodeURIComponentPipe, EncodeURIPipe, EveryPipe, FirstOrDefaultPipe, FlattenPipe, FloorPipe, GroupByPipe, HeadPipe, InitialPipe, IntersectionPipe, IsArrayPipe, IsDefinedPipe, IsEqualPipe, IsFunctionPipe, IsGreaterOrEqualPipe, IsGreaterPipe, IsIdenticalPipe, IsLessOrEqualPipe, IsLessPipe, IsNilPipe, IsNotEqualPipe, IsNotIdenticalPipe, IsNullPipe, IsNumberPipe, IsObjectPipe, IsStringPipe, IsUndefinedPipe, JoinPipe, KeysPipe, LastPipe, LatinizePipe, LeftPadPipe, MapPipe, MatchPipe, MaxPipe, MeanPipe, MinPipe, NewlinesPipe, NgAggregatePipesModule, NgArrayPipesModule, NgBooleanPipesModule, NgMathPipesModule, NgObjectPipesModule, NgPipesModule, NgStringPipesModule, OrderByPipe, OrdinalPipe, PadPipe, PluckPipe, PowPipe, RadiansPipe, RandomPipe, RangePipe, RepeatPipe, ReplacePipe, ReversePipe, ReverseStrPipe, RightPadPipe, RoundPipe, ShufflePipe, SlugifyPipe, SomePipe, SplitPipe, SqrtPipe, StripTagsPipe, SumPipe, TailPipe, TakePipe, TakeUntilPipe, TakeWhilePipe, TemplatePipe, TestPipe, ToArrayPipe, TrimPipe, TruncatePipe, UnionPipe, UniqPipe, UpperFirstPipe, WherePipe, WithPipe, WithoutPipe, WrapPipe */
/***/
function node_modulesAngularPipesFesm2015AngularPipesJs(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "AbsPipe", function () {
return AbsPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "BytesPipe", function () {
return BytesPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "CapitalizePipe", function () {
return CapitalizePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "CeilPipe", function () {
return CeilPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "ChunkPipe", function () {
return ChunkPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "CountPipe", function () {
return CountPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "DecodeURIComponentPipe", function () {
return DecodeURIComponentPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "DecodeURIPipe", function () {
return DecodeURIPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "DeepPipe", function () {
return DeepPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "DefaultsPipe", function () {
return DefaultsPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "DegreesPipe", function () {
return DegreesPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "DropPipe", function () {
return DropPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "EmptyPipe", function () {
return EmptyPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "EncodeURIComponentPipe", function () {
return EncodeURIComponentPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "EncodeURIPipe", function () {
return EncodeURIPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "EveryPipe", function () {
return EveryPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "FirstOrDefaultPipe", function () {
return FirstOrDefaultPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "FlattenPipe", function () {
return FlattenPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "FloorPipe", function () {
return FloorPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "GroupByPipe", function () {
return GroupByPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "HeadPipe", function () {
return HeadPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "InitialPipe", function () {
return InitialPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IntersectionPipe", function () {
return IntersectionPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsArrayPipe", function () {
return IsArrayPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsDefinedPipe", function () {
return IsDefinedPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsEqualPipe", function () {
return IsEqualPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsFunctionPipe", function () {
return IsFunctionPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsGreaterOrEqualPipe", function () {
return IsGreaterOrEqualPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsGreaterPipe", function () {
return IsGreaterPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsIdenticalPipe", function () {
return IsIdenticalPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsLessOrEqualPipe", function () {
return IsLessOrEqualPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsLessPipe", function () {
return IsLessPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsNilPipe", function () {
return IsNilPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsNotEqualPipe", function () {
return IsNotEqualPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsNotIdenticalPipe", function () {
return IsNotIdenticalPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsNullPipe", function () {
return IsNullPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsNumberPipe", function () {
return IsNumberPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsObjectPipe", function () {
return IsObjectPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsStringPipe", function () {
return IsStringPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "IsUndefinedPipe", function () {
return IsUndefinedPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "JoinPipe", function () {
return JoinPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "KeysPipe", function () {
return KeysPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "LastPipe", function () {
return LastPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "LatinizePipe", function () {
return LatinizePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "LeftPadPipe", function () {
return LeftPadPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "MapPipe", function () {
return MapPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "MatchPipe", function () {
return MatchPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "MaxPipe", function () {
return MaxPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "MeanPipe", function () {
return MeanPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "MinPipe", function () {
return MinPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "NewlinesPipe", function () {
return NewlinesPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "NgAggregatePipesModule", function () {
return NgAggregatePipesModule;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "NgArrayPipesModule", function () {
return NgArrayPipesModule;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "NgBooleanPipesModule", function () {
return NgBooleanPipesModule;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "NgMathPipesModule", function () {
return NgMathPipesModule;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "NgObjectPipesModule", function () {
return NgObjectPipesModule;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "NgPipesModule", function () {
return NgPipesModule;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "NgStringPipesModule", function () {
return NgStringPipesModule;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "OrderByPipe", function () {
return OrderByPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "OrdinalPipe", function () {
return OrdinalPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "PadPipe", function () {
return PadPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "PluckPipe", function () {
return PluckPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "PowPipe", function () {
return PowPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "RadiansPipe", function () {
return RadiansPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "RandomPipe", function () {
return RandomPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "RangePipe", function () {
return RangePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "RepeatPipe", function () {
return RepeatPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "ReplacePipe", function () {
return ReplacePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "ReversePipe", function () {
return ReversePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "ReverseStrPipe", function () {
return ReverseStrPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "RightPadPipe", function () {
return RightPadPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "RoundPipe", function () {
return RoundPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "ShufflePipe", function () {
return ShufflePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "SlugifyPipe", function () {
return SlugifyPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "SomePipe", function () {
return SomePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "SplitPipe", function () {
return SplitPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "SqrtPipe", function () {
return SqrtPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "StripTagsPipe", function () {
return StripTagsPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "SumPipe", function () {
return SumPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TailPipe", function () {
return TailPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TakePipe", function () {
return TakePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TakeUntilPipe", function () {
return TakeUntilPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TakeWhilePipe", function () {
return TakeWhilePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TemplatePipe", function () {
return TemplatePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TestPipe", function () {
return TestPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "ToArrayPipe", function () {
return ToArrayPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TrimPipe", function () {
return TrimPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TruncatePipe", function () {
return TruncatePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "UnionPipe", function () {
return UnionPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "UniqPipe", function () {
return UniqPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "UpperFirstPipe", function () {
return UpperFirstPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "WherePipe", function () {
return WherePipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "WithPipe", function () {
return WithPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "WithoutPipe", function () {
return WithoutPipe;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "WrapPipe", function () {
return WrapPipe;
});
/* harmony import */
var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
/*! tslib */
"./node_modules/tslib/tslib.es6.js");
/* harmony import */
var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
/*! @angular/core */
"./node_modules/@angular/core/fesm2015/core.js");
function isUndefined(value) {
return typeof value === 'undefined';
}
function isNull(value) {
return value === null;
}
function isNumber(value) {
return typeof value === 'number';
}
function isNumberFinite(value) {
return isNumber(value) && isFinite(value);
} // Not strict positive
function isPositive(value) {
return value >= 0;
}
function isInteger(value) {
// No rest, is an integer
return value % 1 === 0;
}
function isNil(value) {
return value === null || typeof value === 'undefined';
}
function isString(value) {
return typeof value === 'string';
}
function isObject(value) {
return value !== null && typeof value === 'object';
}
function isArray(value) {
return Array.isArray(value);
}
function isFunction(value) {
return typeof value === 'function';
}
function toDecimal(value, decimal) {
return Math.round(value * Math.pow(10, decimal)) / Math.pow(10, decimal);
}
function upperFirst(value) {
return value.slice(0, 1).toUpperCase() + value.slice(1);
}
function createRound(method) {
// <any>Math to suppress error
var func = Math[method];
return function (value) {
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (typeof value === 'string') {
throw new TypeError('Rounding method needs a number');
}
if (typeof precision !== 'number' || isNaN(precision)) {
precision = 0;
}
if (precision) {
var pair = "".concat(value, "e").split('e');
var val = func("".concat(pair[0], "e") + (+pair[1] + precision));
pair = "".concat(val, "e").split('e');
return +(pair[0] + 'e' + (+pair[1] - precision));
}
return func(value);
};
}
function leftPad(str) {
var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var ch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ' ';
str = String(str);
ch = toString(ch);
var i = -1;
var length = len - str.length;
while (++i < length && str.length + ch.length <= len) {
str = ch + str;
}
return str;
}
function rightPad(str) {
var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var ch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ' ';
str = String(str);
ch = toString(ch);
var i = -1;
var length = len - str.length;
while (++i < length && str.length + ch.length <= len) {
str += ch;
}
return str;
}
function toString(value) {
return "".concat(value);
}
function pad(str) {
var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var ch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ' ';
str = String(str);
ch = toString(ch);
var i = -1;
var length = len - str.length;
var left = true;
while (++i < length) {
var l = str.length + ch.length <= len ? str.length + ch.length : str.length + 1;
if (left) {
str = leftPad(str, l, ch);
} else {
str = rightPad(str, l, ch);
}
left = !left;
}
return str;
}
function flatten(input) {
var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (index >= input.length) {
return input;
}
if (isArray(input[index])) {
return flatten(input.slice(0, index).concat(input[index], input.slice(index + 1)), index);
}
return flatten(input, index + 1);
}
function getProperty(value, key) {
if (isNil(value) || !isObject(value)) {
return undefined;
}
var keys = key.split('.');
var result = value[keys.shift()];
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var _key = _step.value;
if (isNil(result) || !isObject(result)) {
return undefined;
}
result = result[_key];
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return result;
}
function sum(input) {
var initial = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
return input.reduce(function (previous, current) {
return previous + current;
}, initial);
} // http://stackoverflow.com/questions/6274339/how-can-i-shuffle-an-array-in-javascript
function shuffle(input) {
if (!isArray(input)) {
return input;
}
var copy = _toConsumableArray(input);
for (var i = copy.length; i; --i) {
var j = Math.floor(Math.random() * i);
var x = copy[i - 1];
copy[i - 1] = copy[j];
copy[j] = x;
}
return copy;
}
function deepIndexOf(collection, value) {
var index = -1;
var length = collection.length;
while (++index < length) {
if (deepEqual(value, collection[index])) {
return index;
}
}
return -1;
}
function deepEqual(a, b) {
if (a === b) {
return true;
}
if (!(typeof a === 'object' && typeof b === 'object')) {
return a === b;
}
var keysA = Object.keys(a);
var keysB = Object.keys(b);
if (keysA.length !== keysB.length) {
return false;
} // Test for A's keys different from B.
var hasOwn = Object.prototype.hasOwnProperty;
for (var i = 0; i < keysA.length; i++) {
var key = keysA[i];
if (!hasOwn.call(b, keysA[i]) || !deepEqual(a[key], b[key])) {
return false;
}
}
return true;
}
function isDeepObject(object) {
return object.__isDeepObject__;
}
function wrapDeep(object) {
return new DeepWrapper(object);
}
function unwrapDeep(object) {
if (isDeepObject(object)) {
return object.data;
}
return object;
}
var DeepWrapper = function DeepWrapper(data) {
_classCallCheck(this, DeepWrapper);
this.data = data;
this.__isDeepObject__ = true;
};
function count(input) {
if (!isArray(input) && !isObject(input) && !isString(input)) {
return input;
}
if (isObject(input)) {
return Object.keys(input).map(function (value) {
return input[value];
}).length;
}
return input.length;
}
function empty(input) {
if (!isArray(input)) {
return input;
}
return input.length === 0;
}
function every(input, predicate) {
if (!isArray(input) || !predicate) {
return input;
}
var result = true;
var i = -1;
while (++i < input.length && result) {
result = predicate(input[i], i, input);
}
return result;
}
function takeUntil(input, predicate) {
var i = -1;
var result = [];
while (++i < input.length && !predicate(input[i], i, input)) {
result[i] = input[i];
}
return result;
}
function takeWhile(input, predicate) {
return takeUntil(input, function (item, index, collection) {
return !predicate(item, index, collection);
});
}
var GroupByPipe =
/*#__PURE__*/
function () {
function GroupByPipe() {
_classCallCheck(this, GroupByPipe);
}
_createClass(GroupByPipe, [{
key: "transform",
value: function transform(input, prop) {
if (!isArray(input)) {
return input;
}
var arr = {};
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = input[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var value = _step2.value;
var field = getProperty(value, prop);
if (isUndefined(arr[field])) {
arr[field] = [];
}
arr[field].push(value);
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
return Object.keys(arr).map(function (key) {
return {
key: key,
'value': arr[key]
};
});
}
}]);
return GroupByPipe;
}();
GroupByPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'groupBy'
})], GroupByPipe);
var MaxPipe =
/*#__PURE__*/
function () {
function MaxPipe() {
_classCallCheck(this, MaxPipe);
}
_createClass(MaxPipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input)) {
return input;
}
if (input.length === 0) {
return undefined;
}
var max = input[0];
input.forEach(function (value) {
if (max < value) {
max = value;
}
});
return max;
}
}]);
return MaxPipe;
}();
MaxPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'max'
})], MaxPipe);
var MeanPipe =
/*#__PURE__*/
function () {
function MeanPipe() {
_classCallCheck(this, MeanPipe);
}
_createClass(MeanPipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input)) {
return input;
}
var count = input.length;
if (count === 0) {
return undefined;
}
return sum(input) / count;
}
}]);
return MeanPipe;
}();
MeanPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'mean'
})], MeanPipe);
var MinPipe =
/*#__PURE__*/
function () {
function MinPipe() {
_classCallCheck(this, MinPipe);
}
_createClass(MinPipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input)) {
return input;
}
if (input.length === 0) {
return undefined;
}
var min = input[0];
input.forEach(function (value) {
if (min > value) {
min = value;
}
});
return min;
}
}]);
return MinPipe;
}();
MinPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'min'
})], MinPipe);
var SumPipe =
/*#__PURE__*/
function () {
function SumPipe() {
_classCallCheck(this, SumPipe);
}
_createClass(SumPipe, [{
key: "transform",
value: function transform(input) {
return !isArray(input) ? input : sum(input);
}
}]);
return SumPipe;
}();
SumPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'sum'
})], SumPipe);
var NgAggregatePipesModule = function NgAggregatePipesModule() {
_classCallCheck(this, NgAggregatePipesModule);
};
NgAggregatePipesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
declarations: [GroupByPipe, MaxPipe, MeanPipe, MinPipe, SumPipe],
exports: [GroupByPipe, MaxPipe, MeanPipe, MinPipe, SumPipe]
})], NgAggregatePipesModule);
var EmptyPipe =
/*#__PURE__*/
function () {
function EmptyPipe() {
_classCallCheck(this, EmptyPipe);
}
_createClass(EmptyPipe, [{
key: "transform",
value: function transform(input) {
return empty(input);
}
}]);
return EmptyPipe;
}();
EmptyPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'empty'
})], EmptyPipe);
var HeadPipe =
/*#__PURE__*/
function () {
function HeadPipe() {
_classCallCheck(this, HeadPipe);
}
_createClass(HeadPipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input)) {
return input;
} // Will return undefined if length is 0
return input[0];
}
}]);
return HeadPipe;
}();
HeadPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'head'
})], HeadPipe);
var InitialPipe =
/*#__PURE__*/
function () {
function InitialPipe() {
_classCallCheck(this, InitialPipe);
}
_createClass(InitialPipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input)) {
return input;
}
return input.slice(0, input.length - 1);
}
}]);
return InitialPipe;
}();
InitialPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'initial'
})], InitialPipe);
var LastPipe =
/*#__PURE__*/
function () {
function LastPipe() {
_classCallCheck(this, LastPipe);
}
_createClass(LastPipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input)) {
return input;
} // Returns undefined if empty
return input[input.length - 1];
}
}]);
return LastPipe;
}();
LastPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'last'
})], LastPipe);
var JoinPipe =
/*#__PURE__*/
function () {
function JoinPipe() {
_classCallCheck(this, JoinPipe);
}
_createClass(JoinPipe, [{
key: "transform",
value: function transform(input) {
var character = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
if (!isArray(input)) {
return input;
}
return input.join(character);
}
}]);
return JoinPipe;
}();
JoinPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'join'
})], JoinPipe);
var TailPipe =
/*#__PURE__*/
function () {
function TailPipe() {
_classCallCheck(this, TailPipe);
}
_createClass(TailPipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input)) {
return input;
}
return input.slice(1, input.length);
}
}]);
return TailPipe;
}();
TailPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'tail'
})], TailPipe);
var UniqPipe =
/*#__PURE__*/
function () {
function UniqPipe() {
_classCallCheck(this, UniqPipe);
}
_createClass(UniqPipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input) && !isDeepObject(input)) {
return input;
}
if (isDeepObject(input)) {
var unwrappedInput = unwrapDeep(input);
if (!isArray(unwrappedInput)) {
return unwrappedInput;
}
return unwrappedInput.filter(function (value, index) {
return deepIndexOf(unwrappedInput, value) === index;
});
}
return input.filter(function (value, index) {
return input.indexOf(value) === index;
});
}
}]);
return UniqPipe;
}();
UniqPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'uniq'
})], UniqPipe);
var WithoutPipe =
/*#__PURE__*/
function () {
function WithoutPipe() {
_classCallCheck(this, WithoutPipe);
}
_createClass(WithoutPipe, [{
key: "transform",
value: function transform(input) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
if (!isArray(input) && !isDeepObject(input)) {
return input;
}
if (isDeepObject(input)) {
var unwrappedInput = unwrapDeep(input);
if (!isArray(unwrappedInput)) {
return unwrappedInput;
}
return unwrappedInput.filter(function (value) {
return deepIndexOf(args, value) === -1;
});
}
return input.filter(function (value) {
return args.indexOf(value) === -1;
});
}
}]);
return WithoutPipe;
}();
WithoutPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'without'
})], WithoutPipe);
var MapPipe =
/*#__PURE__*/
function () {
function MapPipe() {
_classCallCheck(this, MapPipe);
}
_createClass(MapPipe, [{
key: "transform",
value: function transform(input, fn) {
if (!isArray(input) || !fn) {
return input;
}
return input.map(fn);
}
}]);
return MapPipe;
}();
MapPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'map'
})], MapPipe);
var WherePipe =
/*#__PURE__*/
function () {
function WherePipe() {
_classCallCheck(this, WherePipe);
}
_createClass(WherePipe, [{
key: "transform",
/**
* Support a function or a value or the shorthand ['key', value] like the lodash shorthand.
*/
value: function transform(input, fn) {
if (!isArray(input)) {
return input;
}
if (isFunction(fn)) {
return input.filter(fn);
} else if (isArray(fn)) {
var _fn = _slicedToArray(fn, 2),
key = _fn[0],
value = _fn[1];
return input.filter(function (item) {
return getProperty(item, key) === value;
});
} else if (fn) {
return input.filter(function (item) {
return item === fn;
});
} else {
return input;
}
}
}]);
return WherePipe;
}();
WherePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'where'
})], WherePipe);
var FirstOrDefaultPipe_1;
var FirstOrDefaultPipe = FirstOrDefaultPipe_1 =
/*#__PURE__*/
function () {
function FirstOrDefaultPipe() {
_classCallCheck(this, FirstOrDefaultPipe);
}
_createClass(FirstOrDefaultPipe, [{
key: "transform",
value: function transform(input, predicate, defaultValue) {
if (!isArray(input)) {
return input;
}
if (isFunction(predicate)) {
return FirstOrDefaultPipe_1.find(input, predicate, defaultValue);
} else if (isArray(predicate)) {
var _predicate = _slicedToArray(predicate, 2),
key = _predicate[0],
value = _predicate[1];
return FirstOrDefaultPipe_1.find(input, function (item) {
return getProperty(item, key) === value;
}, defaultValue);
} else if (predicate) {
return FirstOrDefaultPipe_1.find(input, function (item) {
return item === predicate;
}, defaultValue);
} else {
return input;
}
}
}], [{
key: "find",
value: function find(input, predicate, defaultValue) {
var found = false;
var result;
var i = -1;
while (!found && ++i < input.length) {
found = predicate(input[i], i, input);
}
if (found) {
result = input[i];
}
if (typeof result === 'undefined' && typeof defaultValue !== 'undefined') {
result = defaultValue;
}
return result;
}
}]);
return FirstOrDefaultPipe;
}();
FirstOrDefaultPipe = FirstOrDefaultPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'firstOrDefault'
})], FirstOrDefaultPipe);
var RangePipe =
/*#__PURE__*/
function () {
function RangePipe() {
_classCallCheck(this, RangePipe);
}
_createClass(RangePipe, [{
key: "transform",
value: function transform(_input) {
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var start = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var step = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
var range = [];
for (var length = 0; length < size; ++length) {
range.push(start);
start += step;
}
return range;
}
}]);
return RangePipe;
}();
RangePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'range'
})], RangePipe);
var PluckPipe =
/*#__PURE__*/
function () {
function PluckPipe() {
_classCallCheck(this, PluckPipe);
}
_createClass(PluckPipe, [{
key: "transform",
value: function transform(input, key) {
if (!isArray(input) || !key) {
return input;
}
return input.map(function (value) {
return getProperty(value, key);
});
}
}]);
return PluckPipe;
}();
PluckPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'pluck'
})], PluckPipe);
var ReversePipe =
/*#__PURE__*/
function () {
function ReversePipe() {
_classCallCheck(this, ReversePipe);
}
_createClass(ReversePipe, [{
key: "transform",
value: function transform(input) {
if (!isArray(input)) {
return input;
}
return _toConsumableArray(input).reverse();
}
}]);
return ReversePipe;
}();
ReversePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'reverse'
})], ReversePipe);
var OrderByPipe_1;
var OrderByPipe = OrderByPipe_1 =
/*#__PURE__*/
function () {
function OrderByPipe() {
_classCallCheck(this, OrderByPipe);
}
_createClass(OrderByPipe, [{
key: "transform",
value: function transform(input) {
var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '+';
if (!isArray(input)) {
return input;
}
var configIsArray = isArray(config); // If config === 'param' OR ['param']
if (!configIsArray || configIsArray && config.length === 1) {
var propertyToCheck = configIsArray ? config[0] : config;
var first = propertyToCheck.substr(0, 1);
var desc = first === '-'; // First character is '-'
// Basic array (if only + or - is present)
if (!propertyToCheck || propertyToCheck === '-' || propertyToCheck === '+') {
return _toConsumableArray(input).sort(function (a, b) {
var comparator = OrderByPipe_1._orderBy(a, b);
return desc ? -comparator : comparator;
});
} else {
// If contains + or -, substring the property
var property = first === '+' || desc ? propertyToCheck.substr(1) : propertyToCheck;
return _toConsumableArray(input).sort(function (a, b) {
var comparator = OrderByPipe_1._orderBy(a[property], b[property]);
return desc ? -comparator : comparator;
});
}
} else {
// Config is an array of property
return _toConsumableArray(input).sort(function (a, b) {
for (var i = 0; i < config.length; ++i) {
var _first = config[i].substr(0, 1);
var _desc = _first === '-';
var _property = _first === '+' || _desc ? config[i].substr(1) : config[i];
var comparator = OrderByPipe_1._orderBy(a[_property], b[_property]);
var comparison = _desc ? -comparator : comparator;
if (comparison !== 0) {
return comparison;
}
}
return 0;
});
}
}
}], [{
key: "_orderBy",
value: function _orderBy(a, b) {
if (a instanceof Date && b instanceof Date) {
return a < b ? -1 : a > b ? 1 : 0;
}
var floatA = parseFloat(a);
var floatB = parseFloat(b);
if (typeof a === 'string' && typeof b === 'string' && (isNaN(floatA) || isNaN(floatB))) {
var lowerA = a.toLowerCase();
var lowerB = b.toLowerCase();
return lowerA < lowerB ? -1 : lowerA > lowerB ? 1 : 0;
}
return floatA < floatB ? -1 : floatA > floatB ? 1 : 0;
}
}]);
return OrderByPipe;
}();
OrderByPipe = OrderByPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'orderBy'
})], OrderByPipe);
var CountPipe =
/*#__PURE__*/
function () {
function CountPipe() {
_classCallCheck(this, CountPipe);
}
_createClass(CountPipe, [{
key: "transform",
value: function transform(input) {
return count(input);
}
}]);
return CountPipe;
}();
CountPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'count'
})], CountPipe);
var SomePipe =
/*#__PURE__*/
function () {
function SomePipe() {
_classCallCheck(this, SomePipe);
}
_createClass(SomePipe, [{
key: "transform",
value: function transform(input, predicate) {
if (!isArray(input) || !predicate) {
return input;
}
var result = false;
var i = -1;
while (++i < input.length && !result) {
result = predicate(input[i], i, input);
}
return result;
}
}]);
return SomePipe;
}();
SomePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'some'
})], SomePipe);
var EveryPipe =
/*#__PURE__*/
function () {
function EveryPipe() {
_classCallCheck(this, EveryPipe);
}
_createClass(EveryPipe, [{
key: "transform",
value: function transform(input, predicate) {
return every(input, predicate);
}
}]);
return EveryPipe;
}();
EveryPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'every'
})], EveryPipe);
var ShufflePipe =
/*#__PURE__*/
function () {
function ShufflePipe() {
_classCallCheck(this, ShufflePipe);
}
_createClass(ShufflePipe, [{
key: "transform",
value: function transform(input) {
return shuffle(input);
}
}]);
return ShufflePipe;
}();
ShufflePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'shuffle'
})], ShufflePipe);
var TakePipe =
/*#__PURE__*/
function () {
function TakePipe() {
_classCallCheck(this, TakePipe);
}
_createClass(TakePipe, [{
key: "transform",
value: function transform(input, quantity) {
if (!isArray(input)) {
return input;
}
return input.slice(0, quantity || 1);
}
}]);
return TakePipe;
}();
TakePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'take'
})], TakePipe);
var DropPipe =
/*#__PURE__*/
function () {
function DropPipe() {
_classCallCheck(this, DropPipe);
}
_createClass(DropPipe, [{
key: "transform",
value: function transform(input, quantity) {
if (!isArray(input)) {
return input;
}
return input.slice(quantity || 1, input.lenth);
}
}]);
return DropPipe;
}();
DropPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'drop'
})], DropPipe);
var DeepPipe =
/*#__PURE__*/
function () {
function DeepPipe() {
_classCallCheck(this, DeepPipe);
}
_createClass(DeepPipe, [{
key: "transform",
value: function transform(value) {
if (isDeepObject(value)) {
return value;
}
return wrapDeep(value);
}
}]);
return DeepPipe;
}();
DeepPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'deep'
})], DeepPipe);
var ChunkPipe =
/*#__PURE__*/
function () {
function ChunkPipe() {
_classCallCheck(this, ChunkPipe);
}
_createClass(ChunkPipe, [{
key: "transform",
value: function transform(input) {
var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
if (!isArray(input)) {
return input;
}
return [].concat.apply([], input.map(function (_elem, i) {
return i % size ? [] : [input.slice(i, i + size)];
}));
}
}]);
return ChunkPipe;
}();
ChunkPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'chunk'
})], ChunkPipe);
var FlattenPipe =
/*#__PURE__*/
function () {
function FlattenPipe() {
_classCallCheck(this, FlattenPipe);
}
_createClass(FlattenPipe, [{
key: "transform",
value: function transform(input) {
var isDeep = isDeepObject(input);
if (!isArray(input) && !isDeep) {
return input;
}
if (isDeep) {
var unwrapped = unwrapDeep(input);
if (!isArray(unwrapped)) {
return unwrapped;
}
return flatten(unwrapped, 0);
}
return [].concat.apply([], input);
}
}]);
return FlattenPipe;
}();
FlattenPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'flatten'
})], FlattenPipe);
var IntersectionPipe =
/*#__PURE__*/
function () {
function IntersectionPipe() {
_classCallCheck(this, IntersectionPipe);
}
_createClass(IntersectionPipe, [{
key: "transform",
value: function transform(a, b) {
if (!isArray(a) && !isDeepObject(a) || !isArray(b)) {
return [];
}
if (isDeepObject(a)) {
var unwrapped = unwrapDeep(a);
if (!isArray(unwrapped)) {
return [];
}
return unwrapped.reduce(function (intersection, value) {
return intersection.concat(deepIndexOf(b, value) !== -1 && deepIndexOf(intersection, value) === -1 ? value : []);
}, []);
}
return a.reduce(function (intersection, value) {
return intersection.concat(b.indexOf(value) !== -1 && intersection.indexOf(value) === -1 ? value : []);
}, []);
}
}]);
return IntersectionPipe;
}();
IntersectionPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'intersection'
})], IntersectionPipe);
var UnionPipe =
/*#__PURE__*/
function () {
function UnionPipe() {
_classCallCheck(this, UnionPipe);
}
_createClass(UnionPipe, [{
key: "transform",
value: function transform(a, b) {
if (!isArray(a) && !isDeepObject(a) || !isArray(b)) {
return [];
}
if (isDeepObject(a)) {
var unwrapped = unwrapDeep(a);
if (!isArray(unwrapped)) {
return [];
}
return [].concat(unwrapped).concat(b).filter(function (value, index, input) {
return deepIndexOf(input, value) === index;
});
}
return [].concat(a).concat(b).filter(function (value, index, input) {
return input.indexOf(value) === index;
});
}
}]);
return UnionPipe;
}();
UnionPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'union'
})], UnionPipe);
var TakeWhilePipe =
/*#__PURE__*/
function () {
function TakeWhilePipe() {
_classCallCheck(this, TakeWhilePipe);
}
_createClass(TakeWhilePipe, [{
key: "transform",
value: function transform(input, predicate) {
if (!isArray(input) || isNil(predicate)) {
return input;
}
return takeWhile(input, predicate);
}
}]);
return TakeWhilePipe;
}();
TakeWhilePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'takeWhile'
})], TakeWhilePipe);
var TakeUntilPipe =
/*#__PURE__*/
function () {
function TakeUntilPipe() {
_classCallCheck(this, TakeUntilPipe);
}
_createClass(TakeUntilPipe, [{
key: "transform",
value: function transform(input, predicate) {
if (!isArray(input) || isNil(predicate)) {
return input;
}
return takeUntil(input, predicate);
}
}]);
return TakeUntilPipe;
}();
TakeUntilPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'takeUntil'
})], TakeUntilPipe);
var NgArrayPipesModule = function NgArrayPipesModule() {
_classCallCheck(this, NgArrayPipesModule);
};
NgArrayPipesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
declarations: [EmptyPipe, HeadPipe, InitialPipe, LastPipe, JoinPipe, TailPipe, UniqPipe, WithoutPipe, MapPipe, WherePipe, RangePipe, PluckPipe, ReversePipe, OrderByPipe, CountPipe, SomePipe, EveryPipe, ShufflePipe, TakePipe, DropPipe, DeepPipe, ChunkPipe, FlattenPipe, FirstOrDefaultPipe, IntersectionPipe, UnionPipe, TakeWhilePipe, TakeUntilPipe],
exports: [EmptyPipe, HeadPipe, InitialPipe, LastPipe, JoinPipe, TailPipe, UniqPipe, WithoutPipe, MapPipe, WherePipe, RangePipe, PluckPipe, ReversePipe, OrderByPipe, CountPipe, SomePipe, EveryPipe, ShufflePipe, TakePipe, DropPipe, DeepPipe, ChunkPipe, FlattenPipe, FirstOrDefaultPipe, IntersectionPipe, UnionPipe, TakeWhilePipe, TakeUntilPipe]
})], NgArrayPipesModule);
var IsGreaterPipe =
/*#__PURE__*/
function () {
function IsGreaterPipe() {
_classCallCheck(this, IsGreaterPipe);
}
_createClass(IsGreaterPipe, [{
key: "transform",
value: function transform(first, second) {
return first > second;
}
}]);
return IsGreaterPipe;
}();
IsGreaterPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'greater'
})], IsGreaterPipe);
var IsGreaterOrEqualPipe =
/*#__PURE__*/
function () {
function IsGreaterOrEqualPipe() {
_classCallCheck(this, IsGreaterOrEqualPipe);
}
_createClass(IsGreaterOrEqualPipe, [{
key: "transform",
value: function transform(first, second) {
return first >= second;
}
}]);
return IsGreaterOrEqualPipe;
}();
IsGreaterOrEqualPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'greaterOrEqual'
})], IsGreaterOrEqualPipe);
var IsLessPipe =
/*#__PURE__*/
function () {
function IsLessPipe() {
_classCallCheck(this, IsLessPipe);
}
_createClass(IsLessPipe, [{
key: "transform",
value: function transform(first, second) {
return first < second;
}
}]);
return IsLessPipe;
}();
IsLessPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'less'
})], IsLessPipe);
var IsLessOrEqualPipe =
/*#__PURE__*/
function () {
function IsLessOrEqualPipe() {
_classCallCheck(this, IsLessOrEqualPipe);
}
_createClass(IsLessOrEqualPipe, [{
key: "transform",
value: function transform(first, second) {
return first <= second;
}
}]);
return IsLessOrEqualPipe;
}();
IsLessOrEqualPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'lessOrEqual'
})], IsLessOrEqualPipe);
var IsEqualPipe =
/*#__PURE__*/
function () {
function IsEqualPipe() {
_classCallCheck(this, IsEqualPipe);
}
_createClass(IsEqualPipe, [{
key: "transform",
value: function transform(first, second) {
return first == second;
}
}]);
return IsEqualPipe;
}();
IsEqualPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'equal'
})], IsEqualPipe);
var IsNotEqualPipe =
/*#__PURE__*/
function () {
function IsNotEqualPipe() {
_classCallCheck(this, IsNotEqualPipe);
}
_createClass(IsNotEqualPipe, [{
key: "transform",
value: function transform(first, second) {
return first != second;
}
}]);
return IsNotEqualPipe;
}();
IsNotEqualPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'notEqual'
})], IsNotEqualPipe);
var IsIdenticalPipe =
/*#__PURE__*/
function () {
function IsIdenticalPipe() {
_classCallCheck(this, IsIdenticalPipe);
}
_createClass(IsIdenticalPipe, [{
key: "transform",
value: function transform(first, second) {
return first === second;
}
}]);
return IsIdenticalPipe;
}();
IsIdenticalPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'identical'
})], IsIdenticalPipe);
var IsNotIdenticalPipe =
/*#__PURE__*/
function () {
function IsNotIdenticalPipe() {
_classCallCheck(this, IsNotIdenticalPipe);
}
_createClass(IsNotIdenticalPipe, [{
key: "transform",
value: function transform(first, second) {
return first !== second;
}
}]);
return IsNotIdenticalPipe;
}();
IsNotIdenticalPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'notIdentical'
})], IsNotIdenticalPipe);
var IsNullPipe =
/*#__PURE__*/
function () {
function IsNullPipe() {
_classCallCheck(this, IsNullPipe);
}
_createClass(IsNullPipe, [{
key: "transform",
value: function transform(value) {
return isNull(value);
}
}]);
return IsNullPipe;
}();
IsNullPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isNull'
})], IsNullPipe);
var IsUndefinedPipe =
/*#__PURE__*/
function () {
function IsUndefinedPipe() {
_classCallCheck(this, IsUndefinedPipe);
}
_createClass(IsUndefinedPipe, [{
key: "transform",
value: function transform(value) {
return isUndefined(value);
}
}]);
return IsUndefinedPipe;
}();
IsUndefinedPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isUndefined'
})], IsUndefinedPipe);
var IsNilPipe =
/*#__PURE__*/
function () {
function IsNilPipe() {
_classCallCheck(this, IsNilPipe);
}
_createClass(IsNilPipe, [{
key: "transform",
value: function transform(value) {
return isNil(value);
}
}]);
return IsNilPipe;
}();
IsNilPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isNil'
})], IsNilPipe);
var IsFunctionPipe =
/*#__PURE__*/
function () {
function IsFunctionPipe() {
_classCallCheck(this, IsFunctionPipe);
}
_createClass(IsFunctionPipe, [{
key: "transform",
value: function transform(value) {
return isFunction(value);
}
}]);
return IsFunctionPipe;
}();
IsFunctionPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isFunction'
})], IsFunctionPipe);
var IsNumberPipe =
/*#__PURE__*/
function () {
function IsNumberPipe() {
_classCallCheck(this, IsNumberPipe);
}
_createClass(IsNumberPipe, [{
key: "transform",
value: function transform(value) {
return isNumber(value);
}
}]);
return IsNumberPipe;
}();
IsNumberPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isNumber'
})], IsNumberPipe);
var IsStringPipe =
/*#__PURE__*/
function () {
function IsStringPipe() {
_classCallCheck(this, IsStringPipe);
}
_createClass(IsStringPipe, [{
key: "transform",
value: function transform(value) {
return isString(value);
}
}]);
return IsStringPipe;
}();
IsStringPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isString'
})], IsStringPipe);
var IsArrayPipe =
/*#__PURE__*/
function () {
function IsArrayPipe() {
_classCallCheck(this, IsArrayPipe);
}
_createClass(IsArrayPipe, [{
key: "transform",
value: function transform(value) {
return isArray(value);
}
}]);
return IsArrayPipe;
}();
IsArrayPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isArray'
})], IsArrayPipe);
var IsObjectPipe =
/*#__PURE__*/
function () {
function IsObjectPipe() {
_classCallCheck(this, IsObjectPipe);
}
_createClass(IsObjectPipe, [{
key: "transform",
value: function transform(value) {
return isObject(value);
}
}]);
return IsObjectPipe;
}();
IsObjectPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isObject'
})], IsObjectPipe);
var IsDefinedPipe =
/*#__PURE__*/
function () {
function IsDefinedPipe() {
_classCallCheck(this, IsDefinedPipe);
}
_createClass(IsDefinedPipe, [{
key: "transform",
value: function transform(value) {
return !isUndefined(value);
}
}]);
return IsDefinedPipe;
}();
IsDefinedPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'isDefined'
})], IsDefinedPipe);
var NgBooleanPipesModule = function NgBooleanPipesModule() {
_classCallCheck(this, NgBooleanPipesModule);
};
NgBooleanPipesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
declarations: [IsGreaterPipe, IsGreaterOrEqualPipe, IsLessPipe, IsLessOrEqualPipe, IsEqualPipe, IsNotEqualPipe, IsIdenticalPipe, IsNotIdenticalPipe, IsNilPipe, IsNullPipe, IsUndefinedPipe, IsFunctionPipe, IsNumberPipe, IsStringPipe, IsArrayPipe, IsObjectPipe, IsDefinedPipe],
exports: [IsGreaterPipe, IsGreaterOrEqualPipe, IsLessPipe, IsLessOrEqualPipe, IsEqualPipe, IsNotEqualPipe, IsIdenticalPipe, IsNotIdenticalPipe, IsNilPipe, IsNullPipe, IsUndefinedPipe, IsFunctionPipe, IsNumberPipe, IsStringPipe, IsArrayPipe, IsObjectPipe, IsDefinedPipe]
})], NgBooleanPipesModule);
var BytesPipe_1;
var BytesPipe = BytesPipe_1 =
/*#__PURE__*/
function () {
function BytesPipe() {
_classCallCheck(this, BytesPipe);
}
_createClass(BytesPipe, [{
key: "transform",
value: function transform(input) {
var decimal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var from = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'B';
var to = arguments.length > 3 ? arguments[3] : undefined;
if (!(isNumberFinite(input) && isNumberFinite(decimal) && isInteger(decimal) && isPositive(decimal))) {
return input;
}
var bytes = input;
var unit = from;
while (unit !== 'B') {
bytes *= 1024;
unit = BytesPipe_1.formats[unit].prev;
}
if (to) {
var format = BytesPipe_1.formats[to];
var result = toDecimal(BytesPipe_1.calculateResult(format, bytes), decimal);
return BytesPipe_1.formatResult(result, to);
}
for (var key in BytesPipe_1.formats) {
if (BytesPipe_1.formats.hasOwnProperty(key)) {
var _format = BytesPipe_1.formats[key];
if (bytes < _format.max) {
var _result = toDecimal(BytesPipe_1.calculateResult(_format, bytes), decimal);
return BytesPipe_1.formatResult(_result, key);
}
}
}
}
}], [{
key: "formatResult",
value: function formatResult(result, unit) {
return "".concat(result, " ").concat(unit);
}
}, {
key: "calculateResult",
value: function calculateResult(format, bytes) {
var prev = format.prev ? BytesPipe_1.formats[format.prev] : undefined;
return prev ? bytes / prev.max : bytes;
}
}]);
return BytesPipe;
}();
BytesPipe.formats = {
'B': {
max: 1024
},
'kB': {
max: Math.pow(1024, 2),
prev: 'B'
},
'KB': {
max: Math.pow(1024, 2),
prev: 'B'
},
'MB': {
max: Math.pow(1024, 3),
prev: 'kB'
},
'GB': {
max: Math.pow(1024, 4),
prev: 'MB'
},
'TB': {
max: Number.MAX_SAFE_INTEGER,
prev: 'GB'
}
};
BytesPipe = BytesPipe_1 = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'bytes'
})], BytesPipe);
var CeilPipe =
/*#__PURE__*/
function () {
function CeilPipe() {
_classCallCheck(this, CeilPipe);
}
_createClass(CeilPipe, [{
key: "transform",
value: function transform(value) {
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (isString(precision)) {
precision = parseInt(precision);
}
return createRound('ceil')(value, precision);
}
}]);
return CeilPipe;
}();
CeilPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'ceil'
})], CeilPipe);
var FloorPipe =
/*#__PURE__*/
function () {
function FloorPipe() {
_classCallCheck(this, FloorPipe);
}
_createClass(FloorPipe, [{
key: "transform",
value: function transform(value) {
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (isString(precision)) {
precision = parseInt(precision);
}
return createRound('floor')(value, precision);
}
}]);
return FloorPipe;
}();
FloorPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'floor'
})], FloorPipe);
var RoundPipe =
/*#__PURE__*/
function () {
function RoundPipe() {
_classCallCheck(this, RoundPipe);
}
_createClass(RoundPipe, [{
key: "transform",
value: function transform(value) {
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
if (isString(precision)) {
precision = parseInt(precision);
}
return createRound('round')(value, precision);
}
}]);
return RoundPipe;
}();
RoundPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'round'
})], RoundPipe);
var DegreesPipe =
/*#__PURE__*/
function () {
function DegreesPipe() {
_classCallCheck(this, DegreesPipe);
}
_createClass(DegreesPipe, [{
key: "transform",
value: function transform(input) {
if (!isNumberFinite(input)) {
return 'NaN';
}
return input * 180 / Math.PI;
}
}]);
return DegreesPipe;
}();
DegreesPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'degrees'
})], DegreesPipe);
var RadiansPipe =
/*#__PURE__*/
function () {
function RadiansPipe() {
_classCallCheck(this, RadiansPipe);
}
_createClass(RadiansPipe, [{
key: "transform",
value: function transform(input) {
if (!isNumberFinite(input)) {
return 'NaN';
}
return input * Math.PI / 180;
}
}]);
return RadiansPipe;
}();
RadiansPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'radians'
})], RadiansPipe);
var RandomPipe =
/*#__PURE__*/
function () {
function RandomPipe() {
_classCallCheck(this, RandomPipe);
}
_createClass(RandomPipe, [{
key: "transform",
value: function transform(input) {
var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
if (!isNumberFinite(min) || !isNumberFinite(max)) {
return input;
}
if (min > max) {
max = min;
min = 0;
}
return Math.random() * (max - min) + min;
}
}]);
return RandomPipe;
}();
RandomPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'random'
})], RandomPipe);
var SqrtPipe =
/*#__PURE__*/
function () {
function SqrtPipe() {
_classCallCheck(this, SqrtPipe);
}
_createClass(SqrtPipe, [{
key: "transform",
value: function transform(input) {
if (!isNumberFinite(input)) {
return 'NaN';
}
return Math.sqrt(input);
}
}]);
return SqrtPipe;
}();
SqrtPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'sqrt'
})], SqrtPipe);
var PowPipe =
/*#__PURE__*/
function () {
function PowPipe() {
_classCallCheck(this, PowPipe);
}
_createClass(PowPipe, [{
key: "transform",
value: function transform(input) {
var power = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;
if (!isNumberFinite(input)) {
return 'NaN';
}
return Math.pow(input, power);
}
}]);
return PowPipe;
}();
PowPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'pow'
})], PowPipe);
var AbsPipe =
/*#__PURE__*/
function () {
function AbsPipe() {
_classCallCheck(this, AbsPipe);
}
_createClass(AbsPipe, [{
key: "transform",
value: function transform(input) {
if (!isNumberFinite(input)) {
return 'NaN';
}
return Math.abs(input);
}
}]);
return AbsPipe;
}();
AbsPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'abs'
})], AbsPipe);
var OrdinalPipe =
/*#__PURE__*/
function () {
function OrdinalPipe() {
_classCallCheck(this, OrdinalPipe);
}
_createClass(OrdinalPipe, [{
key: "transform",
value: function transform(input) {
if (!isNumberFinite(input)) {
return 'NaN';
}
if (this.endsWithTenth(input)) {
return input + 'th';
} else {
var cardinal = input.toString().charAt(input.toString().length - 1);
switch (cardinal) {
case '1':
return input + 'st';
case '2':
return input + 'nd';
case '3':
return input + 'rd';
default:
return input + 'th';
}
}
}
}, {
key: "endsWithTenth",
value: function endsWithTenth(input) {
var beforeLastDigit = input.toString().charAt(input.toString().length - 2);
return beforeLastDigit === '1';
}
}]);
return OrdinalPipe;
}();
OrdinalPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'ordinal'
})], OrdinalPipe);
var NgMathPipesModule = function NgMathPipesModule() {
_classCallCheck(this, NgMathPipesModule);
};
NgMathPipesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
declarations: [BytesPipe, CeilPipe, FloorPipe, RoundPipe, DegreesPipe, RadiansPipe, RandomPipe, SqrtPipe, PowPipe, AbsPipe, OrdinalPipe],
exports: [BytesPipe, CeilPipe, FloorPipe, RoundPipe, DegreesPipe, RadiansPipe, RandomPipe, SqrtPipe, PowPipe, AbsPipe, OrdinalPipe]
})], NgMathPipesModule);
var KeysPipe =
/*#__PURE__*/
function () {
function KeysPipe() {
_classCallCheck(this, KeysPipe);
}
_createClass(KeysPipe, [{
key: "transform",
value: function transform(input) {
if (!isObject(input)) {
return input;
}
return Object.keys(input);
}
}]);
return KeysPipe;
}();
KeysPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'keys'
})], KeysPipe);
var ToArrayPipe =
/*#__PURE__*/
function () {
function ToArrayPipe() {
_classCallCheck(this, ToArrayPipe);
}
_createClass(ToArrayPipe, [{
key: "transform",
value: function transform(input) {
if (!isObject(input)) {
return input;
}
return Object.keys(input).map(function (value) {
return input[value];
});
}
}]);
return ToArrayPipe;
}();
ToArrayPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'toArray'
})], ToArrayPipe);
var DefaultsPipe =
/*#__PURE__*/
function () {
function DefaultsPipe() {
_classCallCheck(this, DefaultsPipe);
}
_createClass(DefaultsPipe, [{
key: "transform",
value: function transform(input, defaults) {
if (!isObject(defaults)) {
return input;
}
if (isNil(input)) {
return defaults;
}
if (isArray(input)) {
return input.map(function (item) {
if (isObject(item)) {
return Object.assign({}, defaults, item);
}
if (isNil(item)) {
return defaults;
}
return item;
});
}
if (isObject(input)) {
return Object.assign({}, defaults, input);
}
return input;
}
}]);
return DefaultsPipe;
}();
DefaultsPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'defaults'
})], DefaultsPipe);
var NgObjectPipesModule = function NgObjectPipesModule() {
_classCallCheck(this, NgObjectPipesModule);
};
NgObjectPipesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
declarations: [KeysPipe, ToArrayPipe, DefaultsPipe],
exports: [KeysPipe, ToArrayPipe, DefaultsPipe]
})], NgObjectPipesModule);
var LeftPadPipe =
/*#__PURE__*/
function () {
function LeftPadPipe() {
_classCallCheck(this, LeftPadPipe);
}
_createClass(LeftPadPipe, [{
key: "transform",
value: function transform(input) {
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var character = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ' ';
if (!isString(input)) {
return input;
}
return leftPad(input, length, character);
}
}]);
return LeftPadPipe;
}();
LeftPadPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'leftpad'
})], LeftPadPipe);
var MatchPipe =
/*#__PURE__*/
function () {
function MatchPipe() {
_classCallCheck(this, MatchPipe);
}
_createClass(MatchPipe, [{
key: "transform",
value: function transform(input, pattern, flag) {
if (!isString(input)) {
return input;
}
var regexp = pattern instanceof RegExp ? pattern : new RegExp(pattern, flag);
return input.match(regexp);
}
}]);
return MatchPipe;
}();
MatchPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'match'
})], MatchPipe);
var PadPipe =
/*#__PURE__*/
function () {
function PadPipe() {
_classCallCheck(this, PadPipe);
}
_createClass(PadPipe, [{
key: "transform",
value: function transform(input) {
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var character = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ' ';
if (!isString(input)) {
return input;
}
return pad(input, length, character);
}
}]);
return PadPipe;
}();
PadPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'pad'
})], PadPipe);
var ReplacePipe =
/*#__PURE__*/
function () {
function ReplacePipe() {
_classCallCheck(this, ReplacePipe);
}
_createClass(ReplacePipe, [{
key: "transform",
value: function transform(input, pattern, replacement) {
if (!isString(input) || isUndefined(pattern) || isUndefined(replacement)) {
return input;
}
return input.replace(pattern, replacement);
}
}]);
return ReplacePipe;
}();
ReplacePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'replace'
})], ReplacePipe);
var RightPadPipe =
/*#__PURE__*/
function () {
function RightPadPipe() {
_classCallCheck(this, RightPadPipe);
}
_createClass(RightPadPipe, [{
key: "transform",
value: function transform(input) {
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
var character = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ' ';
if (!isString(input)) {
return input;
}
return rightPad(input, length, character);
}
}]);
return RightPadPipe;
}();
RightPadPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'rightpad'
})], RightPadPipe);
var SplitPipe =
/*#__PURE__*/
function () {
function SplitPipe() {
_classCallCheck(this, SplitPipe);
}
_createClass(SplitPipe, [{
key: "transform",
value: function transform(input) {
var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
var limit = arguments.length > 2 ? arguments[2] : undefined;
if (!isString(input)) {
return input;
}
return input.split(separator, limit);
}
}]);
return SplitPipe;
}();
SplitPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'split'
})], SplitPipe);
var TestPipe =
/*#__PURE__*/
function () {
function TestPipe() {
_classCallCheck(this, TestPipe);
}
_createClass(TestPipe, [{
key: "transform",
value: function transform(input, pattern, flag) {
if (!isString(input) || !pattern) {
return input;
}
var regexp = pattern instanceof RegExp ? pattern : new RegExp(pattern, flag);
return regexp.test(input);
}
}]);
return TestPipe;
}();
TestPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'test'
})], TestPipe);
var TrimPipe =
/*#__PURE__*/
function () {
function TrimPipe() {
_classCallCheck(this, TrimPipe);
}
_createClass(TrimPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return input.trim();
}
}]);
return TrimPipe;
}();
TrimPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'trim'
})], TrimPipe);
var NewlinesPipe =
/*#__PURE__*/
function () {
function NewlinesPipe() {
_classCallCheck(this, NewlinesPipe);
}
_createClass(NewlinesPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return input.replace(/(?:\r\n|\r|\n)/g, '<br />');
}
}]);
return NewlinesPipe;
}();
NewlinesPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'newlines'
})], NewlinesPipe);
var CapitalizePipe =
/*#__PURE__*/
function () {
function CapitalizePipe() {
_classCallCheck(this, CapitalizePipe);
}
_createClass(CapitalizePipe, [{
key: "transform",
value: function transform(input) {
var all = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
if (!isString(input)) {
return input;
}
if (!all) {
return upperFirst(input.toLowerCase());
} else {
return input.toLowerCase().split(' ').map(function (value) {
return upperFirst(value);
}).join(' ');
}
}
}]);
return CapitalizePipe;
}();
CapitalizePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'capitalize'
})], CapitalizePipe);
var UpperFirstPipe =
/*#__PURE__*/
function () {
function UpperFirstPipe() {
_classCallCheck(this, UpperFirstPipe);
}
_createClass(UpperFirstPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return upperFirst(input);
}
}]);
return UpperFirstPipe;
}();
UpperFirstPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'upperfirst'
})], UpperFirstPipe);
var TemplatePipe =
/*#__PURE__*/
function () {
function TemplatePipe() {
_classCallCheck(this, TemplatePipe);
}
_createClass(TemplatePipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input) || (arguments.length <= 1 ? 0 : arguments.length - 1) === 0) {
return input;
}
var template = input;
for (var i = 0; i < (arguments.length <= 1 ? 0 : arguments.length - 1); ++i) {
template = template.replace("$".concat(i + 1), i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1]);
}
return template;
}
}]);
return TemplatePipe;
}();
TemplatePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'template'
})], TemplatePipe);
var EncodeURIPipe =
/*#__PURE__*/
function () {
function EncodeURIPipe() {
_classCallCheck(this, EncodeURIPipe);
}
_createClass(EncodeURIPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return encodeURI(input);
}
}]);
return EncodeURIPipe;
}();
EncodeURIPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'encodeURI'
})], EncodeURIPipe);
var EncodeURIComponentPipe =
/*#__PURE__*/
function () {
function EncodeURIComponentPipe() {
_classCallCheck(this, EncodeURIComponentPipe);
}
_createClass(EncodeURIComponentPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return encodeURIComponent(input);
}
}]);
return EncodeURIComponentPipe;
}();
EncodeURIComponentPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'encodeURIComponent'
})], EncodeURIComponentPipe);
var DecodeURIPipe =
/*#__PURE__*/
function () {
function DecodeURIPipe() {
_classCallCheck(this, DecodeURIPipe);
}
_createClass(DecodeURIPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return decodeURI(input);
}
}]);
return DecodeURIPipe;
}();
DecodeURIPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'decodeURI'
})], DecodeURIPipe);
var DecodeURIComponentPipe =
/*#__PURE__*/
function () {
function DecodeURIComponentPipe() {
_classCallCheck(this, DecodeURIComponentPipe);
}
_createClass(DecodeURIComponentPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return decodeURIComponent(input);
}
}]);
return DecodeURIComponentPipe;
}();
DecodeURIComponentPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'decodeURIComponent'
})], DecodeURIComponentPipe); // Inspired from https://github.com/a8m/angular-filter/blob/master/src/_filter/string/truncate.js
var TruncatePipe =
/*#__PURE__*/
function () {
function TruncatePipe() {
_classCallCheck(this, TruncatePipe);
}
_createClass(TruncatePipe, [{
key: "transform",
value: function transform(input, length, suffix, preserve) {
if (!isString(input)) {
return input;
}
length = isUndefined(length) ? input.length : length;
if (input.length <= length) {
return input;
}
preserve = preserve || false;
suffix = suffix || '';
var index = length;
if (preserve) {
if (input.indexOf(' ', length) === -1) {
index = input.length;
} else {
index = input.indexOf(' ', length);
}
}
return input.substring(0, index) + suffix;
}
}]);
return TruncatePipe;
}();
TruncatePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'truncate'
})], TruncatePipe);
var RepeatPipe =
/*#__PURE__*/
function () {
function RepeatPipe() {
_classCallCheck(this, RepeatPipe);
}
_createClass(RepeatPipe, [{
key: "transform",
value: function transform(input) {
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var characters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
if (!isString(input)) {
return input;
}
if (times <= 0) {
times = 1;
}
var repeated = [input];
for (var i = 1; i < times; ++i) {
repeated.push(input);
}
return repeated.join(characters);
}
}]);
return RepeatPipe;
}();
RepeatPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'repeat'
})], RepeatPipe);
var SlugifyPipe =
/*#__PURE__*/
function () {
function SlugifyPipe() {
_classCallCheck(this, SlugifyPipe);
}
_createClass(SlugifyPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return input.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, ' ').replace(/[\s-]+/g, '-');
}
}]);
return SlugifyPipe;
}();
SlugifyPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'slugify'
})], SlugifyPipe); // idea from https://github.com/a8m/angular-filter
var StripTagsPipe =
/*#__PURE__*/
function () {
function StripTagsPipe() {
_classCallCheck(this, StripTagsPipe);
}
_createClass(StripTagsPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input) || isUndefined(input)) return input;
return input.replace(/<\S[^><]*>/g, '');
}
}]);
return StripTagsPipe;
}();
StripTagsPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'stripTags'
})], StripTagsPipe); // idea from https://github.com/a8m/angular-filter
var LatinizePipe =
/*#__PURE__*/
function () {
function LatinizePipe() {
_classCallCheck(this, LatinizePipe);
}
_createClass(LatinizePipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input) || isUndefined(input)) {
return input;
}
var replacementList = [{
base: ' ',
chars: "\xA0"
}, {
base: '0',
chars: "\u07C0"
}, {
base: 'A',
chars: "\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"
}, {
base: 'AA',
chars: "\uA732"
}, {
base: 'AE',
chars: "\xC6\u01FC\u01E2"
}, {
base: 'AO',
chars: "\uA734"
}, {
base: 'AU',
chars: "\uA736"
}, {
base: 'AV',
chars: "\uA738\uA73A"
}, {
base: 'AY',
chars: "\uA73C"
}, {
base: 'B',
chars: "\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0181"
}, {
base: 'C',
chars: "\u24B8\uFF23\uA73E\u1E08\u0106C\u0108\u010A\u010C\xC7\u0187\u023B"
}, {
base: 'D',
chars: "\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018A\u0189\u1D05\uA779"
}, {
base: 'Dh',
chars: "\xD0"
}, {
base: 'DZ',
chars: "\u01F1\u01C4"
}, {
base: 'Dz',
chars: "\u01F2\u01C5"
}, {
base: 'E',
chars: "\u025B\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E\u1D07"
}, {
base: 'F',
chars: "\uA77C\u24BB\uFF26\u1E1E\u0191\uA77B"
}, {
base: 'G',
chars: "\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E\u0262"
}, {
base: 'H',
chars: "\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"
}, {
base: 'I',
chars: "\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"
}, {
base: 'J',
chars: "\u24BF\uFF2A\u0134\u0248\u0237"
}, {
base: 'K',
chars: "\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"
}, {
base: 'L',
chars: "\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"
}, {
base: 'LJ',
chars: "\u01C7"
}, {
base: 'Lj',
chars: "\u01C8"
}, {
base: 'M',
chars: "\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C\u03FB"
}, {
base: 'N',
chars: "\uA7A4\u0220\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u019D\uA790\u1D0E"
}, {
base: 'NJ',
chars: "\u01CA"
}, {
base: 'Nj',
chars: "\u01CB"
}, {
base: 'O',
chars: "\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"
}, {
base: 'OE',
chars: "\u0152"
}, {
base: 'OI',
chars: "\u01A2"
}, {
base: 'OO',
chars: "\uA74E"
}, {
base: 'OU',
chars: "\u0222"
}, {
base: 'P',
chars: "\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"
}, {
base: 'Q',
chars: "\u24C6\uFF31\uA756\uA758\u024A"
}, {
base: 'R',
chars: "\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"
}, {
base: 'S',
chars: "\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"
}, {
base: 'T',
chars: "\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"
}, {
base: 'Th',
chars: "\xDE"
}, {
base: 'TZ',
chars: "\uA728"
}, {
base: 'U',
chars: "\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"
}, {
base: 'V',
chars: "\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"
}, {
base: 'VY',
chars: "\uA760"
}, {
base: 'W',
chars: "\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"
}, {
base: 'X',
chars: "\u24CD\uFF38\u1E8A\u1E8C"
}, {
base: 'Y',
chars: "\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"
}, {
base: 'Z',
chars: "\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"
}, {
base: 'a',
chars: "\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250\u0251"
}, {
base: 'aa',
chars: "\uA733"
}, {
base: 'ae',
chars: "\xE6\u01FD\u01E3"
}, {
base: 'ao',
chars: "\uA735"
}, {
base: 'au',
chars: "\uA737"
}, {
base: 'av',
chars: "\uA739\uA73B"
}, {
base: 'ay',
chars: "\uA73D"
}, {
base: 'b',
chars: "\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253\u0182"
}, {
base: 'c',
chars: "\uFF43\u24D2\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"
}, {
base: 'd',
chars: "\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\u018B\u13E7\u0501\uA7AA"
}, {
base: 'dh',
chars: "\xF0"
}, {
base: 'dz',
chars: "\u01F3\u01C6"
}, {
base: 'e',
chars: "\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u01DD"
}, {
base: 'f',
chars: "\u24D5\uFF46\u1E1F\u0192"
}, {
base: 'ff',
chars: "\uFB00"
}, {
base: 'fi',
chars: "\uFB01"
}, {
base: 'fl',
chars: "\uFB02"
}, {
base: 'ffi',
chars: "\uFB03"
}, {
base: 'ffl',
chars: "\uFB04"
}, {
base: 'g',
chars: "\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\uA77F\u1D79"
}, {
base: 'h',
chars: "\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"
}, {
base: 'hv',
chars: "\u0195"
}, {
base: 'i',
chars: "\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"
}, {
base: 'j',
chars: "\u24D9\uFF4A\u0135\u01F0\u0249"
}, {
base: 'k',
chars: "\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"
}, {
base: 'l',
chars: "\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747\u026D"
}, {
base: 'lj',
chars: "\u01C9"
}, {
base: 'm',
chars: "\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"
}, {
base: 'n',
chars: "\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5\u043B\u0509"
}, {
base: 'nj',
chars: "\u01CC"
}, {
base: 'o',
chars: "\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\uA74B\uA74D\u0275\u0254\u1D11"
}, {
base: 'oe',
chars: "\u0153"
}, {
base: 'oi',
chars: "\u01A3"
}, {
base: 'oo',
chars: "\uA74F"
}, {
base: 'ou',
chars: "\u0223"
}, {
base: 'p',
chars: "\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755\u03C1"
}, {
base: 'q',
chars: "\u24E0\uFF51\u024B\uA757\uA759"
}, {
base: 'r',
chars: "\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"
}, {
base: 's',
chars: "\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B\u0282"
}, {
base: 'ss',
chars: "\xDF"
}, {
base: 't',
chars: "\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"
}, {
base: 'th',
chars: "\xFE"
}, {
base: 'tz',
chars: "\uA729"
}, {
base: 'u',
chars: "\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"
}, {
base: 'v',
chars: "\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"
}, {
base: 'vy',
chars: "\uA761"
}, {
base: 'w',
chars: "\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"
}, {
base: 'x',
chars: "\u24E7\uFF58\u1E8B\u1E8D"
}, {
base: 'y',
chars: "\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"
}, {
base: 'z',
chars: "\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"
}];
var diacriticsMap = {};
for (var i = 0; i < replacementList.length; i += 1) {
var chars = replacementList[i].chars;
for (var j = 0; j < chars.length; j += 1) {
diacriticsMap[chars[j]] = replacementList[i].base;
}
}
return input.replace(/[^\u0000-\u007e]/g, function (c) {
return diacriticsMap[c] || c;
});
}
}]);
return LatinizePipe;
}();
LatinizePipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'latinize'
})], LatinizePipe); // idea from https://github.com/a8m/angular-filter
var WrapPipe =
/*#__PURE__*/
function () {
function WrapPipe() {
_classCallCheck(this, WrapPipe);
}
_createClass(WrapPipe, [{
key: "transform",
value: function transform(input, wrap, ends) {
return isString(input) && !isUndefined(wrap) ? [wrap, input, ends || wrap].join('') : input;
}
}]);
return WrapPipe;
}();
WrapPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'wrap'
})], WrapPipe);
var WithPipe =
/*#__PURE__*/
function () {
function WithPipe() {
_classCallCheck(this, WithPipe);
}
_createClass(WithPipe, [{
key: "transform",
value: function transform(input) {
var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var ends = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var csensitive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
if (!isString(input) || isNull(start) && isNull(ends) || start == '' || ends == '') {
return input;
}
input = csensitive ? input : input.toLowerCase();
if (!isNull(start) && !isNull(ends)) {
var a = !input.indexOf(csensitive ? start : start.toLowerCase());
var b = input.indexOf(csensitive ? ends : ends.toLowerCase(), input.length - ends.length) !== -1;
if (a == true && b == true) {
return true;
} else {
return false;
}
}
if (!isNull(start)) {
return !input.indexOf(csensitive ? start : start.toLowerCase());
}
if (!isNull(ends)) {
var position = input.length - ends.length;
return input.indexOf(csensitive ? ends : ends.toLowerCase(), position) !== -1;
}
}
}]);
return WithPipe;
}();
WithPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'with'
})], WithPipe);
var ReverseStrPipe =
/*#__PURE__*/
function () {
function ReverseStrPipe() {
_classCallCheck(this, ReverseStrPipe);
}
_createClass(ReverseStrPipe, [{
key: "transform",
value: function transform(input) {
if (!isString(input)) {
return input;
}
return Array.from(input).reverse().join('');
}
}]);
return ReverseStrPipe;
}();
ReverseStrPipe = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'reverseStr'
})], ReverseStrPipe);
var NgStringPipesModule = function NgStringPipesModule() {
_classCallCheck(this, NgStringPipesModule);
};
NgStringPipesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
declarations: [LeftPadPipe, MatchPipe, PadPipe, ReplacePipe, RightPadPipe, SplitPipe, TestPipe, TrimPipe, NewlinesPipe, CapitalizePipe, UpperFirstPipe, TemplatePipe, EncodeURIPipe, EncodeURIComponentPipe, DecodeURIPipe, DecodeURIComponentPipe, TruncatePipe, RepeatPipe, SlugifyPipe, StripTagsPipe, LatinizePipe, WrapPipe, WithPipe, ReverseStrPipe],
exports: [LeftPadPipe, MatchPipe, PadPipe, ReplacePipe, RightPadPipe, SplitPipe, TestPipe, TrimPipe, NewlinesPipe, CapitalizePipe, UpperFirstPipe, TemplatePipe, EncodeURIPipe, EncodeURIComponentPipe, DecodeURIPipe, DecodeURIComponentPipe, TruncatePipe, RepeatPipe, SlugifyPipe, StripTagsPipe, LatinizePipe, WrapPipe, WithPipe, ReverseStrPipe]
})], NgStringPipesModule);
var NgPipesModule = function NgPipesModule() {
_classCallCheck(this, NgPipesModule);
};
NgPipesModule = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
exports: [NgArrayPipesModule, NgMathPipesModule, NgBooleanPipesModule, NgStringPipesModule, NgObjectPipesModule, NgAggregatePipesModule]
})], NgPipesModule); //# sourceMappingURL=angular-pipes.js.map
/***/
},
/***/
"./node_modules/dayjs/plugin/relativeTime.js":
/*!***************************************************!*\
!*** ./node_modules/dayjs/plugin/relativeTime.js ***!
\***************************************************/
/*! no static exports found */
/***/
function node_modulesDayjsPluginRelativeTimeJs(module, exports, __webpack_require__) {
!function (e, r) {
true ? module.exports = r() : undefined;
}(this, function () {
"use strict";
return function (e, r, t) {
var n = r.prototype;
t.en.relativeTime = {
future: "in %s",
past: "%s ago",
s: "a few seconds",
m: "a minute",
mm: "%d minutes",
h: "an hour",
hh: "%d hours",
d: "a day",
dd: "%d days",
M: "a month",
MM: "%d months",
y: "a year",
yy: "%d years"
};
var o = function o(e, r, n, _o) {
for (var d, i, a = n.$locale().relativeTime, u = [{
l: "s",
r: 44,
d: "second"
}, {
l: "m",
r: 89
}, {
l: "mm",
r: 44,
d: "minute"
}, {
l: "h",
r: 89
}, {
l: "hh",
r: 21,
d: "hour"
}, {
l: "d",
r: 35
}, {
l: "dd",
r: 25,
d: "day"
}, {
l: "M",
r: 45
}, {
l: "MM",
r: 10,
d: "month"
}, {
l: "y",
r: 17
}, {
l: "yy",
d: "year"
}], f = u.length, s = 0; s < f; s += 1) {
var l = u[s];
l.d && (d = _o ? t(e).diff(n, l.d, !0) : n.diff(e, l.d, !0));
var m = Math.ceil(Math.abs(d));
if (m <= l.r || !l.r) {
i = a[l.l].replace("%d", m);
break;
}
}
return r ? i : (d > 0 ? a.future : a.past).replace("%s", i);
};
n.to = function (e, r) {
return o(e, r, this, !0);
}, n.from = function (e, r) {
return o(e, r, this);
}, n.toNow = function (e) {
return this.to(t(), e);
}, n.fromNow = function (e) {
return this.from(t(), e);
};
};
});
/***/
},
/***/
"./src/app/pipes/pipes.module.ts":
/*!***************************************!*\
!*** ./src/app/pipes/pipes.module.ts ***!
\***************************************/
/*! exports provided: PipesModule */
/***/
function srcAppPipesPipesModuleTs(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "PipesModule", function () {
return PipesModule;
});
/* harmony import */
var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
/*! tslib */
"./node_modules/tslib/tslib.es6.js");
/* harmony import */
var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
/*! @angular/core */
"./node_modules/@angular/core/fesm2015/core.js");
/* harmony import */
var _angular_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
/*! @angular/common */
"./node_modules/@angular/common/fesm2015/common.js");
/* harmony import */
var _ionic_angular__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
/*! @ionic/angular */
"./node_modules/@ionic/angular/dist/fesm5.js");
/* harmony import */
var angular_pipes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
/*! angular-pipes */
"./node_modules/angular-pipes/fesm2015/angular-pipes.js");
/* harmony import */
var _time_difference_pipe__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
/*! ./time-difference.pipe */
"./src/app/pipes/time-difference.pipe.ts");
/* harmony import */
var _time_ago_pipe__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
/*! ./time-ago.pipe */
"./src/app/pipes/time-ago.pipe.ts");
var PipesModule = function PipesModule() {
_classCallCheck(this, PipesModule);
};
PipesModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
imports: [_angular_common__WEBPACK_IMPORTED_MODULE_2__["CommonModule"], _ionic_angular__WEBPACK_IMPORTED_MODULE_3__["IonicModule"].forRoot(), angular_pipes__WEBPACK_IMPORTED_MODULE_4__["NgMathPipesModule"]],
declarations: [_time_difference_pipe__WEBPACK_IMPORTED_MODULE_5__["TimeDifferencePipe"], _time_ago_pipe__WEBPACK_IMPORTED_MODULE_6__["TimeAgoPipe"]],
exports: [angular_pipes__WEBPACK_IMPORTED_MODULE_4__["FloorPipe"], _time_difference_pipe__WEBPACK_IMPORTED_MODULE_5__["TimeDifferencePipe"], _time_ago_pipe__WEBPACK_IMPORTED_MODULE_6__["TimeAgoPipe"]],
entryComponents: []
})], PipesModule);
/***/
},
/***/
"./src/app/pipes/time-ago.pipe.ts":
/*!****************************************!*\
!*** ./src/app/pipes/time-ago.pipe.ts ***!
\****************************************/
/*! exports provided: TimeAgoPipe */
/***/
function srcAppPipesTimeAgoPipeTs(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TimeAgoPipe", function () {
return TimeAgoPipe;
});
/* harmony import */
var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
/*! tslib */
"./node_modules/tslib/tslib.es6.js");
/* harmony import */
var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
/*! @angular/core */
"./node_modules/@angular/core/fesm2015/core.js");
/* harmony import */
var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
/*! dayjs */
"./node_modules/dayjs/dayjs.min.js");
/* harmony import */
var dayjs__WEBPACK_IMPORTED_MODULE_2___default =
/*#__PURE__*/
__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */
var dayjs_plugin_relativeTime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
/*! dayjs/plugin/relativeTime */
"./node_modules/dayjs/plugin/relativeTime.js");
/* harmony import */
var dayjs_plugin_relativeTime__WEBPACK_IMPORTED_MODULE_3___default =
/*#__PURE__*/
__webpack_require__.n(dayjs_plugin_relativeTime__WEBPACK_IMPORTED_MODULE_3__); // When fixed, uncomment this
// import * as dayjs from 'dayjs';
// TODO: dayjs is throiwing this ERROR:
// error TS2339: Property 'to' does not exist on type 'Dayjs'.
// Luckily there is a PR which solves it (https://github.com/iamkun/dayjs/issues/297#issuecomment-442748858)
// When fixed, remove this line:
var dayjs = dayjs__WEBPACK_IMPORTED_MODULE_2__;
var TimeAgoPipe =
/*#__PURE__*/
function () {
function TimeAgoPipe() {
_classCallCheck(this, TimeAgoPipe);
}
_createClass(TimeAgoPipe, [{
key: "transform",
value: function transform(value) {
dayjs.extend(dayjs_plugin_relativeTime__WEBPACK_IMPORTED_MODULE_3___default.a);
var timeAgo = '';
if (value) {
var withoutSuffix = dayjs(value).diff(dayjs(), 'day') < 0 ? false : true;
timeAgo = dayjs().to(dayjs(value), withoutSuffix);
}
return timeAgo;
}
}]);
return TimeAgoPipe;
}();
TimeAgoPipe = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'appTimeAgo'
})], TimeAgoPipe);
/***/
},
/***/
"./src/app/pipes/time-difference.pipe.ts":
/*!***********************************************!*\
!*** ./src/app/pipes/time-difference.pipe.ts ***!
\***********************************************/
/*! exports provided: TimeDifferencePipe */
/***/
function srcAppPipesTimeDifferencePipeTs(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "TimeDifferencePipe", function () {
return TimeDifferencePipe;
});
/* harmony import */
var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
/*! tslib */
"./node_modules/tslib/tslib.es6.js");
/* harmony import */
var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
/*! @angular/core */
"./node_modules/@angular/core/fesm2015/core.js");
/* harmony import */
var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
/*! dayjs */
"./node_modules/dayjs/dayjs.min.js");
/* harmony import */
var dayjs__WEBPACK_IMPORTED_MODULE_2___default =
/*#__PURE__*/
__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_2__); // When fixed, uncomment this
// import * as dayjs from 'dayjs';
// TODO: dayjs is throiwing this ERROR:
// error TS2339: Property 'to' does not exist on type 'Dayjs'.
// Luckily there is a PR which solves it (https://github.com/iamkun/dayjs/issues/297#issuecomment-442748858)
// When fixed, remove this line:
var dayjs = dayjs__WEBPACK_IMPORTED_MODULE_2__;
var TimeDifferencePipe =
/*#__PURE__*/
function () {
function TimeDifferencePipe() {
_classCallCheck(this, TimeDifferencePipe);
}
_createClass(TimeDifferencePipe, [{
key: "transform",
value: function transform(value) {
return dayjs(value).diff(dayjs(), 'day');
}
}]);
return TimeDifferencePipe;
}();
TimeDifferencePipe = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({
name: 'appTimeDifference'
})], TimeDifferencePipe);
/***/
},
/***/
"./src/app/shell/data-store.ts":
/*!*************************************!*\
!*** ./src/app/shell/data-store.ts ***!
\*************************************/
/*! exports provided: ShellModel, DataStore */
/***/
function srcAppShellDataStoreTs(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "ShellModel", function () {
return ShellModel;
});
/* harmony export (binding) */
__webpack_require__.d(__webpack_exports__, "DataStore", function () {
return DataStore;
});
/* harmony import */
var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
/*! tslib */
"./node_modules/tslib/tslib.es6.js");
/* harmony import */
var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
/*! rxjs */
"./node_modules/rxjs/_esm2015/index.js");
/* harmony import */
var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
/*! rxjs/operators */
"./node_modules/rxjs/_esm2015/operators/index.js");
/* harmony import */
var _config_app_shell_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
/*! ./config/app-shell.config */
"./src/app/shell/config/app-shell.config.ts");
var ShellModel = function ShellModel() {
_classCallCheck(this, ShellModel);
this.isShell = false;
};
var DataStore =
/*#__PURE__*/
function () {
function DataStore(shellModel) {
_classCallCheck(this, DataStore);
this.shellModel = shellModel; // We wait on purpose 2 secs on local environment when fetching from json to simulate the backend roundtrip.
// However, in production you should set this delay to 0 in the assets/config/app-shell.config.prod.json file.
// tslint:disable-next-line:max-line-length
this.networkDelay = _config_app_shell_config__WEBPACK_IMPORTED_MODULE_3__["AppShellConfig"].settings && _config_app_shell_config__WEBPACK_IMPORTED_MODULE_3__["AppShellConfig"].settings.networkDelay ? _config_app_shell_config__WEBPACK_IMPORTED_MODULE_3__["AppShellConfig"].settings.networkDelay : 0;
this.timeline = new rxjs__WEBPACK_IMPORTED_MODULE_1__["ReplaySubject"](1);
} // Static function with generics
// (ref: https://stackoverflow.com/a/24293088/1116959)
// Append a shell (T & ShellModel) to every value (T) emmited to the timeline
_createClass(DataStore, [{
key: "load",
value: function load(dataSourceObservable) {
var _this = this;
var dataSourceWithShellObservable = DataStore.AppendShell(dataSourceObservable, this.shellModel, this.networkDelay);
dataSourceWithShellObservable.subscribe(function (dataValue) {
_this.timeline.next(dataValue);
});
}
}, {
key: "state",
get: function get() {
return this.timeline.asObservable();
}
}], [{
key: "AppendShell",
value: function AppendShell(dataObservable, shellModel) {
var networkDelay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 400;
var delayObservable = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(true).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["delay"])(networkDelay)); // Assign shell flag accordingly
// (ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
return Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["combineLatest"])([delayObservable, dataObservable]).pipe( // Dismiss unnecessary delayValue
Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(function (_ref) {
var _ref2 = _slicedToArray(_ref, 2),
delayValue = _ref2[0],
dataValue = _ref2[1];
return Object.assign(dataValue, {
isShell: false
});
}), // Set the shell model as the initial value
Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["startWith"])(Object.assign(shellModel, {
isShell: true
})));
}
}]);
return DataStore;
}();
/***/
}
}]);
//# sourceMappingURL=default~deals-details-deals-details-module~deals-listing-deals-listing-module~food-details-food-deta~310374f5-es5.js.map
|
import { CUSTOM_THEME_ROUTE } from 'constants/colors';
import { findIndex } from 'lodash/array';
export const UPDATE_CUSTOM_THEME = 'UPDATE_CUSTOM_THEME';
export function updateCustomTheme(href) {
return { type: UPDATE_CUSTOM_THEME, payload: { href } };
}
export const INITIAL_STATE = [{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons',
}, {
rel: 'stylesheet',
href: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css',
}];
const CUSTOM_THEME_ID = 'custom-theme-styles';
export const CUSTOM_THEME_LINK = { id: CUSTOM_THEME_ID, rel: 'stylesheet' };
function handleCustomThemeChange(state, { href }) {
const i = findIndex(state, link => link.id === CUSTOM_THEME_ID);
if (href === null && i === -1) {
return state;
}
const preview = href === null
? null
: { ...(state[i] || CUSTOM_THEME_LINK), href: `/${CUSTOM_THEME_ROUTE}/${href}` };
const nextState = state.slice();
if (preview && i === -1) {
nextState.push(preview);
} else if (preview) {
nextState.splice(i, 1, preview);
} else {
nextState.splice(i, 1);
}
return nextState;
}
export default function link(state = INITIAL_STATE, action) {
switch (action.type) {
case UPDATE_CUSTOM_THEME:
return handleCustomThemeChange(state, action.payload);
default:
return state;
}
}
|
!function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=143)}([function(t,n,e){var r=e(2),i=e(19),o=e(11),u=e(12),c=e(20),a=function(t,n,e){var s,f,l,h,p=t&a.F,v=t&a.G,d=t&a.S,g=t&a.P,y=t&a.B,m=v?r:d?r[n]||(r[n]={}):(r[n]||{}).prototype,b=v?i:i[n]||(i[n]={}),_=b.prototype||(b.prototype={});for(s in v&&(e=n),e)l=((f=!p&&m&&void 0!==m[s])?m:e)[s],h=y&&f?c(l,r):g&&"function"==typeof l?c(Function.call,l):l,m&&u(m,s,l,t&a.U),b[s]!=l&&o(b,s,h),g&&_[s]!=l&&(_[s]=l)};r.core=i,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,n){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},function(t,n){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,e){var r=e(48)("wks"),i=e(34),o=e(2).Symbol,u="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=u&&o[t]||(u?o:i)("Symbol."+t))}).store=r},function(t,n,e){var r=e(22),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,n,e){t.exports=!e(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,n,e){var r=e(1),i=e(96),o=e(24),u=Object.defineProperty;n.f=e(7)?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return u(t,n,e)}catch(t){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},function(t,n,e){var r=e(25);t.exports=function(t){return Object(r(t))}},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n,e){var r=e(8),i=e(33);t.exports=e(7)?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(2),i=e(11),o=e(15),u=e(34)("src"),c=e(147),a=(""+c).split("toString");e(19).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,e,c){var s="function"==typeof e;s&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(s&&(o(e,u)||i(e,u,t[n]?""+t[n]:a.join(String(n)))),t===r?t[n]=e:c?t[n]?t[n]=e:i(t,n,e):(delete t[n],i(t,n,e)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[u]||c.call(this)}))},function(t,n,e){var r=e(0),i=e(3),o=e(25),u=/"/g,c=function(t,n,e,r){var i=String(o(t)),c="<"+n;return""!==e&&(c+=" "+e+'="'+String(r).replace(u,""")+'"'),c+">"+i+"</"+n+">"};t.exports=function(t,n){var e={};e[t]=n(c),r(r.P+r.F*i((function(){var n=""[t]('"');return n!==n.toLowerCase()||n.split('"').length>3})),"String",e)}},function(t,n,e){"use strict";var r=e(133),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function u(t){return void 0===t}function c(t){return null!==t&&"object"==typeof t}function a(t){return"[object Function]"===i.call(t)}function s(t,n){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var e=0,r=t.length;e<r;e++)n.call(null,t[e],e,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!u(t)&&null!==t.constructor&&!u(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:c,isUndefined:u,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:a,isStream:function(t){return c(t)&&a(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:s,merge:function t(){var n={};function e(e,r){"object"==typeof n[r]&&"object"==typeof e?n[r]=t(n[r],e):n[r]=e}for(var r=0,i=arguments.length;r<i;r++)s(arguments[r],e);return n},deepMerge:function t(){var n={};function e(e,r){"object"==typeof n[r]&&"object"==typeof e?n[r]=t(n[r],e):n[r]="object"==typeof e?t({},e):e}for(var r=0,i=arguments.length;r<i;r++)s(arguments[r],e);return n},extend:function(t,n,e){return s(n,(function(n,i){t[i]=e&&"function"==typeof n?r(n,e):n})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(49),i=e(25);t.exports=function(t){return r(i(t))}},function(t,n,e){var r=e(50),i=e(33),o=e(16),u=e(24),c=e(15),a=e(96),s=Object.getOwnPropertyDescriptor;n.f=e(7)?s:function(t,n){if(t=o(t),n=u(n,!0),a)try{return s(t,n)}catch(t){}if(c(t,n))return i(!r.f.call(t,n),t[n])}},function(t,n,e){var r=e(15),i=e(9),o=e(70)("IE_PROTO"),u=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?u:null}},function(t,n){var e=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=e)},function(t,n,e){var r=e(10);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,i){return t.call(n,e,r,i)}}return function(){return t.apply(n,arguments)}}},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},function(t,n,e){"use strict";var r=e(3);t.exports=function(t,n){return!!t&&r((function(){n?t.call(null,(function(){}),1):t.call(null)}))}},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t))return t;var e,i;if(n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;if("function"==typeof(e=t.valueOf)&&!r(i=e.call(t)))return i;if(!n&&"function"==typeof(e=t.toString)&&!r(i=e.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,n){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,e){var r=e(0),i=e(19),o=e(3);t.exports=function(t,n){var e=(i.Object||{})[t]||Object[t],u={};u[t]=n(e),r(r.S+r.F*o((function(){e(1)})),"Object",u)}},function(t,n,e){var r=e(20),i=e(49),o=e(9),u=e(6),c=e(86);t.exports=function(t,n){var e=1==t,a=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l,p=n||c;return function(n,c,v){for(var d,g,y=o(n),m=i(y),b=r(c,v,3),_=u(m.length),x=0,w=e?p(n,_):a?p(n,0):void 0;_>x;x++)if((h||x in m)&&(g=b(d=m[x],x,y),t))if(e)w[x]=g;else if(g)switch(t){case 3:return!0;case 5:return d;case 6:return x;case 2:w.push(d)}else if(f)return!1;return l?-1:s||f?f:w}}},function(t,n,e){"use strict";if(e(7)){var r=e(30),i=e(2),o=e(3),u=e(0),c=e(64),a=e(94),s=e(20),f=e(40),l=e(33),h=e(11),p=e(42),v=e(22),d=e(6),g=e(124),y=e(36),m=e(24),b=e(15),_=e(45),x=e(4),w=e(9),S=e(83),E=e(37),k=e(18),O=e(38).f,M=e(85),P=e(34),I=e(5),F=e(27),j=e(54),R=e(52),A=e(88),L=e(47),T=e(59),N=e(39),C=e(87),D=e(113),B=e(8),U=e(17),q=B.f,W=U.f,G=i.RangeError,V=i.TypeError,z=i.Uint8Array,H=Array.prototype,J=a.ArrayBuffer,$=a.DataView,Y=F(0),K=F(2),X=F(3),Z=F(4),Q=F(5),tt=F(6),nt=j(!0),et=j(!1),rt=A.values,it=A.keys,ot=A.entries,ut=H.lastIndexOf,ct=H.reduce,at=H.reduceRight,st=H.join,ft=H.sort,lt=H.slice,ht=H.toString,pt=H.toLocaleString,vt=I("iterator"),dt=I("toStringTag"),gt=P("typed_constructor"),yt=P("def_constructor"),mt=c.CONSTR,bt=c.TYPED,_t=c.VIEW,xt=F(1,(function(t,n){return Ot(R(t,t[yt]),n)})),wt=o((function(){return 1===new z(new Uint16Array([1]).buffer)[0]})),St=!!z&&!!z.prototype.set&&o((function(){new z(1).set({})})),Et=function(t,n){var e=v(t);if(e<0||e%n)throw G("Wrong offset!");return e},kt=function(t){if(x(t)&&bt in t)return t;throw V(t+" is not a typed array!")},Ot=function(t,n){if(!x(t)||!(gt in t))throw V("It is not a typed array constructor!");return new t(n)},Mt=function(t,n){return Pt(R(t,t[yt]),n)},Pt=function(t,n){for(var e=0,r=n.length,i=Ot(t,r);r>e;)i[e]=n[e++];return i},It=function(t,n,e){q(t,n,{get:function(){return this._d[e]}})},Ft=function(t){var n,e,r,i,o,u,c=w(t),a=arguments.length,f=a>1?arguments[1]:void 0,l=void 0!==f,h=M(c);if(null!=h&&!S(h)){for(u=h.call(c),r=[],n=0;!(o=u.next()).done;n++)r.push(o.value);c=r}for(l&&a>2&&(f=s(f,arguments[2],2)),n=0,e=d(c.length),i=Ot(this,e);e>n;n++)i[n]=l?f(c[n],n):c[n];return i},jt=function(){for(var t=0,n=arguments.length,e=Ot(this,n);n>t;)e[t]=arguments[t++];return e},Rt=!!z&&o((function(){pt.call(new z(1))})),At=function(){return pt.apply(Rt?lt.call(kt(this)):kt(this),arguments)},Lt={copyWithin:function(t,n){return D.call(kt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return Z(kt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return C.apply(kt(this),arguments)},filter:function(t){return Mt(this,K(kt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(kt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(kt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Y(kt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return et(kt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return nt(kt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return st.apply(kt(this),arguments)},lastIndexOf:function(t){return ut.apply(kt(this),arguments)},map:function(t){return xt(kt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ct.apply(kt(this),arguments)},reduceRight:function(t){return at.apply(kt(this),arguments)},reverse:function(){for(var t,n=kt(this).length,e=Math.floor(n/2),r=0;r<e;)t=this[r],this[r++]=this[--n],this[n]=t;return this},some:function(t){return X(kt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return ft.call(kt(this),t)},subarray:function(t,n){var e=kt(this),r=e.length,i=y(t,r);return new(R(e,e[yt]))(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,d((void 0===n?r:y(n,r))-i))}},Tt=function(t,n){return Mt(this,lt.call(kt(this),t,n))},Nt=function(t){kt(this);var n=Et(arguments[1],1),e=this.length,r=w(t),i=d(r.length),o=0;if(i+n>e)throw G("Wrong length!");for(;o<i;)this[n+o]=r[o++]},Ct={entries:function(){return ot.call(kt(this))},keys:function(){return it.call(kt(this))},values:function(){return rt.call(kt(this))}},Dt=function(t,n){return x(t)&&t[bt]&&"symbol"!=typeof n&&n in t&&String(+n)==String(n)},Bt=function(t,n){return Dt(t,n=m(n,!0))?l(2,t[n]):W(t,n)},Ut=function(t,n,e){return!(Dt(t,n=m(n,!0))&&x(e)&&b(e,"value"))||b(e,"get")||b(e,"set")||e.configurable||b(e,"writable")&&!e.writable||b(e,"enumerable")&&!e.enumerable?q(t,n,e):(t[n]=e.value,t)};mt||(U.f=Bt,B.f=Ut),u(u.S+u.F*!mt,"Object",{getOwnPropertyDescriptor:Bt,defineProperty:Ut}),o((function(){ht.call({})}))&&(ht=pt=function(){return st.call(this)});var qt=p({},Lt);p(qt,Ct),h(qt,vt,Ct.values),p(qt,{slice:Tt,set:Nt,constructor:function(){},toString:ht,toLocaleString:At}),It(qt,"buffer","b"),It(qt,"byteOffset","o"),It(qt,"byteLength","l"),It(qt,"length","e"),q(qt,dt,{get:function(){return this[bt]}}),t.exports=function(t,n,e,a){var s=t+((a=!!a)?"Clamped":"")+"Array",l="get"+t,p="set"+t,v=i[s],y=v||{},m=v&&k(v),b=!v||!c.ABV,w={},S=v&&v.prototype,M=function(t,e){q(t,e,{get:function(){return function(t,e){var r=t._d;return r.v[l](e*n+r.o,wt)}(this,e)},set:function(t){return function(t,e,r){var i=t._d;a&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[p](e*n+i.o,r,wt)}(this,e,t)},enumerable:!0})};b?(v=e((function(t,e,r,i){f(t,v,s,"_d");var o,u,c,a,l=0,p=0;if(x(e)){if(!(e instanceof J||"ArrayBuffer"==(a=_(e))||"SharedArrayBuffer"==a))return bt in e?Pt(v,e):Ft.call(v,e);o=e,p=Et(r,n);var y=e.byteLength;if(void 0===i){if(y%n)throw G("Wrong length!");if((u=y-p)<0)throw G("Wrong length!")}else if((u=d(i)*n)+p>y)throw G("Wrong length!");c=u/n}else c=g(e),o=new J(u=c*n);for(h(t,"_d",{b:o,o:p,l:u,e:c,v:new $(o)});l<c;)M(t,l++)})),S=v.prototype=E(qt),h(S,"constructor",v)):o((function(){v(1)}))&&o((function(){new v(-1)}))&&T((function(t){new v,new v(null),new v(1.5),new v(t)}),!0)||(v=e((function(t,e,r,i){var o;return f(t,v,s),x(e)?e instanceof J||"ArrayBuffer"==(o=_(e))||"SharedArrayBuffer"==o?void 0!==i?new y(e,Et(r,n),i):void 0!==r?new y(e,Et(r,n)):new y(e):bt in e?Pt(v,e):Ft.call(v,e):new y(g(e))})),Y(m!==Function.prototype?O(y).concat(O(m)):O(y),(function(t){t in v||h(v,t,y[t])})),v.prototype=S,r||(S.constructor=v));var P=S[vt],I=!!P&&("values"==P.name||null==P.name),F=Ct.values;h(v,gt,!0),h(S,bt,s),h(S,_t,!0),h(S,yt,v),(a?new v(1)[dt]==s:dt in S)||q(S,dt,{get:function(){return s}}),w[s]=v,u(u.G+u.W+u.F*(v!=y),w),u(u.S,s,{BYTES_PER_ELEMENT:n}),u(u.S+u.F*o((function(){y.of.call(v,1)})),s,{from:Ft,of:jt}),"BYTES_PER_ELEMENT"in S||h(S,"BYTES_PER_ELEMENT",n),u(u.P,s,Lt),N(s),u(u.P+u.F*St,s,{set:Nt}),u(u.P+u.F*!I,s,Ct),r||S.toString==ht||(S.toString=ht),u(u.P+u.F*o((function(){new v(1).slice()})),s,{slice:Tt}),u(u.P+u.F*(o((function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()}))||!o((function(){S.toLocaleString.call([1,2])}))),s,{toLocaleString:At}),L[s]=I?P:F,r||I||h(S,vt,F)}}else t.exports=function(){}},function(t,n,e){var r=e(119),i=e(0),o=e(48)("metadata"),u=o.store||(o.store=new(e(122))),c=function(t,n,e){var i=u.get(t);if(!i){if(!e)return;u.set(t,i=new r)}var o=i.get(n);if(!o){if(!e)return;i.set(n,o=new r)}return o};t.exports={store:u,map:c,has:function(t,n,e){var r=c(n,e,!1);return void 0!==r&&r.has(t)},get:function(t,n,e){var r=c(n,e,!1);return void 0===r?void 0:r.get(t)},set:function(t,n,e,r){c(e,r,!0).set(t,n)},keys:function(t,n){var e=c(t,n,!1),r=[];return e&&e.forEach((function(t,n){r.push(n)})),r},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){i(i.S,"Reflect",t)}}},function(t,n){t.exports=!1},function(t,n,e){var r=e(34)("meta"),i=e(4),o=e(15),u=e(8).f,c=0,a=Object.isExtensible||function(){return!0},s=!e(3)((function(){return a(Object.preventExtensions({}))})),f=function(t){u(t,r,{value:{i:"O"+ ++c,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,n){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!a(t))return"F";if(!n)return"E";f(t)}return t[r].i},getWeak:function(t,n){if(!o(t,r)){if(!a(t))return!0;if(!n)return!1;f(t)}return t[r].w},onFreeze:function(t){return s&&l.NEED&&a(t)&&!o(t,r)&&f(t),t}}},function(t,n,e){var r=e(5)("unscopables"),i=Array.prototype;null==i[r]&&e(11)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},function(t,n,e){var r=e(98),i=e(71);t.exports=Object.keys||function(t){return r(t,i)}},function(t,n,e){var r=e(22),i=Math.max,o=Math.min;t.exports=function(t,n){return(t=r(t))<0?i(t+n,0):o(t,n)}},function(t,n,e){var r=e(1),i=e(99),o=e(71),u=e(70)("IE_PROTO"),c=function(){},a=function(){var t,n=e(68)("iframe"),r=o.length;for(n.style.display="none",e(72).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),a=t.F;r--;)delete a.prototype[o[r]];return a()};t.exports=Object.create||function(t,n){var e;return null!==t?(c.prototype=r(t),e=new c,c.prototype=null,e[u]=t):e=a(),void 0===n?e:i(e,n)}},function(t,n,e){var r=e(98),i=e(71).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,n,e){"use strict";var r=e(2),i=e(8),o=e(7),u=e(5)("species");t.exports=function(t){var n=r[t];o&&n&&!n[u]&&i.f(n,u,{configurable:!0,get:function(){return this}})}},function(t,n){t.exports=function(t,n,e,r){if(!(t instanceof n)||void 0!==r&&r in t)throw TypeError(e+": incorrect invocation!");return t}},function(t,n,e){var r=e(20),i=e(111),o=e(83),u=e(1),c=e(6),a=e(85),s={},f={};(n=t.exports=function(t,n,e,l,h){var p,v,d,g,y=h?function(){return t}:a(t),m=r(e,l,n?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(p=c(t.length);p>b;b++)if((g=n?m(u(v=t[b])[0],v[1]):m(t[b]))===s||g===f)return g}else for(d=y.call(t);!(v=d.next()).done;)if((g=i(d,m,v.value,n))===s||g===f)return g}).BREAK=s,n.RETURN=f},function(t,n,e){var r=e(12);t.exports=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}},function(t,n,e){var r=e(4);t.exports=function(t,n){if(!r(t)||t._t!==n)throw TypeError("Incompatible receiver, "+n+" required!");return t}},function(t,n,e){var r=e(8).f,i=e(15),o=e(5)("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},function(t,n,e){var r=e(21),i=e(5)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var n,e,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,n){try{return t[n]}catch(t){}}(n=Object(t),i))?e:o?r(n):"Object"==(u=r(n))&&"function"==typeof n.callee?"Arguments":u}},function(t,n,e){var r=e(0),i=e(25),o=e(3),u=e(74),c="["+u+"]",a=RegExp("^"+c+c+"*"),s=RegExp(c+c+"*$"),f=function(t,n,e){var i={},c=o((function(){return!!u[t]()||"
"!="
"[t]()})),a=i[t]=c?n(l):u[t];e&&(i[e]=a),r(r.P+r.F*c,"String",i)},l=f.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(a,"")),2&n&&(t=t.replace(s,"")),t};t.exports=f},function(t,n){t.exports={}},function(t,n,e){var r=e(19),i=e(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e(30)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,n,e){var r=e(21);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,n){n.f={}.propertyIsEnumerable},function(t,n,e){"use strict";var r=e(1);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},function(t,n,e){var r=e(1),i=e(10),o=e(5)("species");t.exports=function(t,n){var e,u=r(t).constructor;return void 0===u||null==(e=r(u)[o])?n:i(e)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.elements={searchForm:document.querySelector(".search"),searchInput:document.querySelector(".search__field"),searchRes:document.querySelector(".results"),searchResultList:document.querySelector(".results__list"),searchResultPages:document.querySelector(".results__pages"),recipe:document.querySelector(".recipe"),shopping:document.querySelector(".shopping__list"),likesMenu:document.querySelector(".likes__field"),likesList:document.querySelector(".likes__list")};var r=n.elementStrings={loader:"loader"};n.renderLoader=function(t){var n='\n <div class="'+r.loader+'">\n <svg>\n <use href="img/icons.svg#icon-cw"></use>\n </svg>\n </div>\n ';t.insertAdjacentHTML("afterbegin",n)},n.clearLoader=function(){var t=document.querySelector("."+r.loader);t&&t.parentElement.removeChild(t)}},function(t,n,e){var r=e(16),i=e(6),o=e(36);t.exports=function(t){return function(n,e,u){var c,a=r(n),s=i(a.length),f=o(u,s);if(t&&e!=e){for(;s>f;)if((c=a[f++])!=c)return!0}else for(;s>f;f++)if((t||f in a)&&a[f]===e)return t||f||0;return!t&&-1}}},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(21);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,n,e){var r=e(22),i=e(25);t.exports=function(t){return function(n,e){var o,u,c=String(i(n)),a=r(e),s=c.length;return a<0||a>=s?t?"":void 0:(o=c.charCodeAt(a))<55296||o>56319||a+1===s||(u=c.charCodeAt(a+1))<56320||u>57343?t?c.charAt(a):o:t?c.slice(a,a+2):u-56320+(o-55296<<10)+65536}}},function(t,n,e){var r=e(4),i=e(21),o=e(5)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[o])?!!n:"RegExp"==i(t))}},function(t,n,e){var r=e(5)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],u=o[r]();u.next=function(){return{done:e=!0}},o[r]=function(){return u},t(o)}catch(t){}return e}},function(t,n,e){"use strict";var r=e(45),i=RegExp.prototype.exec;t.exports=function(t,n){var e=t.exec;if("function"==typeof e){var o=e.call(t,n);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,n)}},function(t,n,e){"use strict";e(115);var r=e(12),i=e(11),o=e(3),u=e(25),c=e(5),a=e(89),s=c("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var h=c(t),p=!o((function(){var n={};return n[h]=function(){return 7},7!=""[t](n)})),v=p?!o((function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[s]=function(){return e}),e[h](""),!n})):void 0;if(!p||!v||"replace"===t&&!f||"split"===t&&!l){var d=/./[h],g=e(u,h,""[t],(function(t,n,e,r,i){return n.exec===a?p&&!i?{done:!0,value:d.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}})),y=g[0],m=g[1];r(String.prototype,t,y),i(RegExp.prototype,h,2==n?function(t,n){return m.call(t,this,n)}:function(t){return m.call(t,this)})}}},function(t,n,e){var r=e(2).navigator;t.exports=r&&r.userAgent||""},function(t,n,e){"use strict";var r=e(2),i=e(0),o=e(12),u=e(42),c=e(31),a=e(41),s=e(40),f=e(4),l=e(3),h=e(59),p=e(44),v=e(75);t.exports=function(t,n,e,d,g,y){var m=r[t],b=m,_=g?"set":"add",x=b&&b.prototype,w={},S=function(t){var n=x[t];o(x,t,"delete"==t||"has"==t?function(t){return!(y&&!f(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!f(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof b&&(y||x.forEach&&!l((function(){(new b).entries().next()})))){var E=new b,k=E[_](y?{}:-0,1)!=E,O=l((function(){E.has(1)})),M=h((function(t){new b(t)})),P=!y&&l((function(){for(var t=new b,n=5;n--;)t[_](n,n);return!t.has(-0)}));M||((b=n((function(n,e){s(n,b,t);var r=v(new m,n,b);return null!=e&&a(e,g,r[_],r),r}))).prototype=x,x.constructor=b),(O||P)&&(S("delete"),S("has"),g&&S("get")),(P||k)&&S(_),y&&x.clear&&delete x.clear}else b=d.getConstructor(n,t,g,_),u(b.prototype,e),c.NEED=!0;return p(b,t),w[t]=b,i(i.G+i.W+i.F*(b!=m),w),y||d.setStrong(b,t,g),b}},function(t,n,e){for(var r,i=e(2),o=e(11),u=e(34),c=u("typed_array"),a=u("view"),s=!(!i.ArrayBuffer||!i.DataView),f=s,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[h[l++]])?(o(r.prototype,c,!0),o(r.prototype,a,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:c,VIEW:a}},function(t,n,e){"use strict";t.exports=e(30)||!e(3)((function(){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete e(2)[t]}))},function(t,n,e){"use strict";var r=e(0);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return new this(n)}})}},function(t,n,e){"use strict";var r=e(0),i=e(10),o=e(20),u=e(41);t.exports=function(t){r(r.S,t,{from:function(t){var n,e,r,c,a=arguments[1];return i(this),(n=void 0!==a)&&i(a),null==t?new this:(e=[],n?(r=0,c=o(a,arguments[2],2),u(t,!1,(function(t){e.push(c(t,r++))}))):u(t,!1,e.push,e),new this(e))}})}},function(t,n,e){var r=e(4),i=e(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,n,e){var r=e(2),i=e(19),o=e(30),u=e(97),c=e(8).f;t.exports=function(t){var n=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in n||c(n,t,{value:u.f(t)})}},function(t,n,e){var r=e(48)("keys"),i=e(34);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,n,e){var r=e(2).document;t.exports=r&&r.documentElement},function(t,n,e){var r=e(4),i=e(1),o=function(t,n){if(i(t),!r(n)&&null!==n)throw TypeError(n+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=e(20)(Function.call,e(17).f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},function(t,n){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(t,n,e){var r=e(4),i=e(73).set;t.exports=function(t,n,e){var o,u=n.constructor;return u!==e&&"function"==typeof u&&(o=u.prototype)!==e.prototype&&r(o)&&i&&i(t,o),t}},function(t,n,e){"use strict";var r=e(22),i=e(25);t.exports=function(t){var n=String(i(this)),e="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(n+=n))1&o&&(e+=n);return e}},function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,n){var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},function(t,n,e){"use strict";var r=e(30),i=e(0),o=e(12),u=e(11),c=e(47),a=e(80),s=e(44),f=e(18),l=e(5)("iterator"),h=!([].keys&&"next"in[].keys()),p=function(){return this};t.exports=function(t,n,e,v,d,g,y){a(e,n,v);var m,b,_,x=function(t){if(!h&&t in k)return k[t];switch(t){case"keys":case"values":return function(){return new e(this,t)}}return function(){return new e(this,t)}},w=n+" Iterator",S="values"==d,E=!1,k=t.prototype,O=k[l]||k["@@iterator"]||d&&k[d],M=O||x(d),P=d?S?x("entries"):M:void 0,I="Array"==n&&k.entries||O;if(I&&(_=f(I.call(new t)))!==Object.prototype&&_.next&&(s(_,w,!0),r||"function"==typeof _[l]||u(_,l,p)),S&&O&&"values"!==O.name&&(E=!0,M=function(){return O.call(this)}),r&&!y||!h&&!E&&k[l]||u(k,l,M),c[n]=M,c[w]=p,d)if(m={values:S?M:x("values"),keys:g?M:x("keys"),entries:P},y)for(b in m)b in k||o(k,b,m[b]);else i(i.P+i.F*(h||E),n,m);return m}},function(t,n,e){"use strict";var r=e(37),i=e(33),o=e(44),u={};e(11)(u,e(5)("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(u,{next:i(1,e)}),o(t,n+" Iterator")}},function(t,n,e){var r=e(58),i=e(25);t.exports=function(t,n,e){if(r(n))throw TypeError("String#"+e+" doesn't accept regex!");return String(i(t))}},function(t,n,e){var r=e(5)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},function(t,n,e){var r=e(47),i=e(5)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,n,e){"use strict";var r=e(8),i=e(33);t.exports=function(t,n,e){n in t?r.f(t,n,i(0,e)):t[n]=e}},function(t,n,e){var r=e(45),i=e(5)("iterator"),o=e(47);t.exports=e(19).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,n,e){var r=e(236);t.exports=function(t,n){return new(r(t))(n)}},function(t,n,e){"use strict";var r=e(9),i=e(36),o=e(6);t.exports=function(t){for(var n=r(this),e=o(n.length),u=arguments.length,c=i(u>1?arguments[1]:void 0,e),a=u>2?arguments[2]:void 0,s=void 0===a?e:i(a,e);s>c;)n[c++]=t;return n}},function(t,n,e){"use strict";var r=e(32),i=e(114),o=e(47),u=e(16);t.exports=e(79)(Array,"Array",(function(t,n){this._t=u(t),this._i=0,this._k=n}),(function(){var t=this._t,n=this._k,e=this._i++;return!t||e>=t.length?(this._t=void 0,i(1)):i(0,"keys"==n?e:"values"==n?t[e]:[e,t[e]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,n,e){"use strict";var r,i,o=e(51),u=RegExp.prototype.exec,c=String.prototype.replace,a=u,s=(r=/a/,i=/b*/g,u.call(r,"a"),u.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(s||f)&&(a=function(t){var n,e,r,i,a=this;return f&&(e=new RegExp("^"+a.source+"$(?!\\s)",o.call(a))),s&&(n=a.lastIndex),r=u.call(a,t),s&&r&&(a.lastIndex=a.global?r.index+r[0].length:n),f&&r&&r.length>1&&c.call(r[0],e,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),t.exports=a},function(t,n,e){"use strict";var r=e(57)(!0);t.exports=function(t,n,e){return n+(e?r(t,n).length:1)}},function(t,n,e){var r,i,o,u=e(20),c=e(104),a=e(72),s=e(68),f=e(2),l=f.process,h=f.setImmediate,p=f.clearImmediate,v=f.MessageChannel,d=f.Dispatch,g=0,y={},m=function(){var t=+this;if(y.hasOwnProperty(t)){var n=y[t];delete y[t],n()}},b=function(t){m.call(t.data)};h&&p||(h=function(t){for(var n=[],e=1;arguments.length>e;)n.push(arguments[e++]);return y[++g]=function(){c("function"==typeof t?t:Function(t),n)},r(g),g},p=function(t){delete y[t]},"process"==e(21)(l)?r=function(t){l.nextTick(u(m,t,1))}:d&&d.now?r=function(t){d.now(u(m,t,1))}:v?(o=(i=new v).port2,i.port1.onmessage=b,r=u(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in s("script")?function(t){a.appendChild(s("script")).onreadystatechange=function(){a.removeChild(this),m.call(t)}}:function(t){setTimeout(u(m,t,1),0)}),t.exports={set:h,clear:p}},function(t,n,e){var r=e(2),i=e(91).set,o=r.MutationObserver||r.WebKitMutationObserver,u=r.process,c=r.Promise,a="process"==e(21)(u);t.exports=function(){var t,n,e,s=function(){var r,i;for(a&&(r=u.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(a)e=function(){u.nextTick(s)};else if(!o||r.navigator&&r.navigator.standalone)if(c&&c.resolve){var f=c.resolve(void 0);e=function(){f.then(s)}}else e=function(){i.call(r,s)};else{var l=!0,h=document.createTextNode("");new o(s).observe(h,{characterData:!0}),e=function(){h.data=l=!l}}return function(r){var i={fn:r,next:void 0};n&&(n.next=i),t||(t=i,e()),n=i}}},function(t,n,e){"use strict";var r=e(10);function i(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)}t.exports.f=function(t){return new i(t)}},function(t,n,e){"use strict";var r=e(2),i=e(7),o=e(30),u=e(64),c=e(11),a=e(42),s=e(3),f=e(40),l=e(22),h=e(6),p=e(124),v=e(38).f,d=e(8).f,g=e(87),y=e(44),m=r.ArrayBuffer,b=r.DataView,_=r.Math,x=r.RangeError,w=r.Infinity,S=m,E=_.abs,k=_.pow,O=_.floor,M=_.log,P=_.LN2,I=i?"_b":"buffer",F=i?"_l":"byteLength",j=i?"_o":"byteOffset";function R(t,n,e){var r,i,o,u=new Array(e),c=8*e-n-1,a=(1<<c)-1,s=a>>1,f=23===n?k(2,-24)-k(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=E(t))!=t||t===w?(i=t!=t?1:0,r=a):(r=O(M(t)/P),t*(o=k(2,-r))<1&&(r--,o*=2),(t+=r+s>=1?f/o:f*k(2,1-s))*o>=2&&(r++,o/=2),r+s>=a?(i=0,r=a):r+s>=1?(i=(t*o-1)*k(2,n),r+=s):(i=t*k(2,s-1)*k(2,n),r=0));n>=8;u[l++]=255&i,i/=256,n-=8);for(r=r<<n|i,c+=n;c>0;u[l++]=255&r,r/=256,c-=8);return u[--l]|=128*h,u}function A(t,n,e){var r,i=8*e-n-1,o=(1<<i)-1,u=o>>1,c=i-7,a=e-1,s=t[a--],f=127&s;for(s>>=7;c>0;f=256*f+t[a],a--,c-=8);for(r=f&(1<<-c)-1,f>>=-c,c+=n;c>0;r=256*r+t[a],a--,c-=8);if(0===f)f=1-u;else{if(f===o)return r?NaN:s?-w:w;r+=k(2,n),f-=u}return(s?-1:1)*r*k(2,f-n)}function L(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function T(t){return[255&t]}function N(t){return[255&t,t>>8&255]}function C(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function D(t){return R(t,52,8)}function B(t){return R(t,23,4)}function U(t,n,e){d(t.prototype,n,{get:function(){return this[e]}})}function q(t,n,e,r){var i=p(+e);if(i+n>t[F])throw x("Wrong index!");var o=t[I]._b,u=i+t[j],c=o.slice(u,u+n);return r?c:c.reverse()}function W(t,n,e,r,i,o){var u=p(+e);if(u+n>t[F])throw x("Wrong index!");for(var c=t[I]._b,a=u+t[j],s=r(+i),f=0;f<n;f++)c[a+f]=s[o?f:n-f-1]}if(u.ABV){if(!s((function(){m(1)}))||!s((function(){new m(-1)}))||s((function(){return new m,new m(1.5),new m(NaN),"ArrayBuffer"!=m.name}))){for(var G,V=(m=function(t){return f(this,m),new S(p(t))}).prototype=S.prototype,z=v(S),H=0;z.length>H;)(G=z[H++])in m||c(m,G,S[G]);o||(V.constructor=m)}var J=new b(new m(2)),$=b.prototype.setInt8;J.setInt8(0,2147483648),J.setInt8(1,2147483649),!J.getInt8(0)&&J.getInt8(1)||a(b.prototype,{setInt8:function(t,n){$.call(this,t,n<<24>>24)},setUint8:function(t,n){$.call(this,t,n<<24>>24)}},!0)}else m=function(t){f(this,m,"ArrayBuffer");var n=p(t);this._b=g.call(new Array(n),0),this[F]=n},b=function(t,n,e){f(this,b,"DataView"),f(t,m,"DataView");var r=t[F],i=l(n);if(i<0||i>r)throw x("Wrong offset!");if(i+(e=void 0===e?r-i:h(e))>r)throw x("Wrong length!");this[I]=t,this[j]=i,this[F]=e},i&&(U(m,"byteLength","_l"),U(b,"buffer","_b"),U(b,"byteLength","_l"),U(b,"byteOffset","_o")),a(b.prototype,{getInt8:function(t){return q(this,1,t)[0]<<24>>24},getUint8:function(t){return q(this,1,t)[0]},getInt16:function(t){var n=q(this,2,t,arguments[1]);return(n[1]<<8|n[0])<<16>>16},getUint16:function(t){var n=q(this,2,t,arguments[1]);return n[1]<<8|n[0]},getInt32:function(t){return L(q(this,4,t,arguments[1]))},getUint32:function(t){return L(q(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return A(q(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return A(q(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){W(this,1,t,T,n)},setUint8:function(t,n){W(this,1,t,T,n)},setInt16:function(t,n){W(this,2,t,N,n,arguments[2])},setUint16:function(t,n){W(this,2,t,N,n,arguments[2])},setInt32:function(t,n){W(this,4,t,C,n,arguments[2])},setUint32:function(t,n){W(this,4,t,C,n,arguments[2])},setFloat32:function(t,n){W(this,4,t,B,n,arguments[2])},setFloat64:function(t,n){W(this,8,t,D,n,arguments[2])}});y(m,"ArrayBuffer"),y(b,"DataView"),c(b.prototype,u.VIEW,!0),n.ArrayBuffer=m,n.DataView=b},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){t.exports=!e(7)&&!e(3)((function(){return 7!=Object.defineProperty(e(68)("div"),"a",{get:function(){return 7}}).a}))},function(t,n,e){n.f=e(5)},function(t,n,e){var r=e(15),i=e(16),o=e(54)(!1),u=e(70)("IE_PROTO");t.exports=function(t,n){var e,c=i(t),a=0,s=[];for(e in c)e!=u&&r(c,e)&&s.push(e);for(;n.length>a;)r(c,e=n[a++])&&(~o(s,e)||s.push(e));return s}},function(t,n,e){var r=e(8),i=e(1),o=e(35);t.exports=e(7)?Object.defineProperties:function(t,n){i(t);for(var e,u=o(n),c=u.length,a=0;c>a;)r.f(t,e=u[a++],n[e]);return t}},function(t,n,e){var r=e(16),i=e(38).f,o={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return u.slice()}}(t):i(r(t))}},function(t,n,e){"use strict";var r=e(7),i=e(35),o=e(55),u=e(50),c=e(9),a=e(49),s=Object.assign;t.exports=!s||e(3)((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=s({},t)[e]||Object.keys(s({},n)).join("")!=r}))?function(t,n){for(var e=c(t),s=arguments.length,f=1,l=o.f,h=u.f;s>f;)for(var p,v=a(arguments[f++]),d=l?i(v).concat(l(v)):i(v),g=d.length,y=0;g>y;)p=d[y++],r&&!h.call(v,p)||(e[p]=v[p]);return e}:s},function(t,n){t.exports=Object.is||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}},function(t,n,e){"use strict";var r=e(10),i=e(4),o=e(104),u=[].slice,c={},a=function(t,n,e){if(!(n in c)){for(var r=[],i=0;i<n;i++)r[i]="a["+i+"]";c[n]=Function("F,a","return new F("+r.join(",")+")")}return c[n](t,e)};t.exports=Function.bind||function(t){var n=r(this),e=u.call(arguments,1),c=function(){var r=e.concat(u.call(arguments));return this instanceof c?a(n,r.length,r):o(n,r,t)};return i(n.prototype)&&(c.prototype=n.prototype),c}},function(t,n){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},function(t,n,e){var r=e(2).parseInt,i=e(46).trim,o=e(74),u=/^[-+]?0[xX]/;t.exports=8!==r(o+"08")||22!==r(o+"0x16")?function(t,n){var e=i(String(t),3);return r(e,n>>>0||(u.test(e)?16:10))}:r},function(t,n,e){var r=e(2).parseFloat,i=e(46).trim;t.exports=1/r(e(74)+"-0")!=-1/0?function(t){var n=i(String(t),3),e=r(n);return 0===e&&"-"==n.charAt(0)?-0:e}:r},function(t,n,e){var r=e(21);t.exports=function(t,n){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(n);return+t}},function(t,n,e){var r=e(4),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,n){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,n,e){var r=e(77),i=Math.pow,o=i(2,-52),u=i(2,-23),c=i(2,127)*(2-u),a=i(2,-126);t.exports=Math.fround||function(t){var n,e,i=Math.abs(t),s=r(t);return i<a?s*(i/a/u+1/o-1/o)*a*u:(e=(n=(1+u/o)*i)-(n-i))>c||e!=e?s*(1/0):s*e}},function(t,n,e){var r=e(1);t.exports=function(t,n,e,i){try{return i?n(r(e)[0],e[1]):n(e)}catch(n){var o=t.return;throw void 0!==o&&r(o.call(t)),n}}},function(t,n,e){var r=e(10),i=e(9),o=e(49),u=e(6);t.exports=function(t,n,e,c,a){r(n);var s=i(t),f=o(s),l=u(s.length),h=a?l-1:0,p=a?-1:1;if(e<2)for(;;){if(h in f){c=f[h],h+=p;break}if(h+=p,a?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;a?h>=0:l>h;h+=p)h in f&&(c=n(c,f[h],h,s));return c}},function(t,n,e){"use strict";var r=e(9),i=e(36),o=e(6);t.exports=[].copyWithin||function(t,n){var e=r(this),u=o(e.length),c=i(t,u),a=i(n,u),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?u:i(s,u))-a,u-c),l=1;for(a<c&&c<a+f&&(l=-1,a+=f-1,c+=f-1);f-- >0;)a in e?e[c]=e[a]:delete e[c],c+=l,a+=l;return e}},function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},function(t,n,e){"use strict";var r=e(89);e(0)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,n,e){e(7)&&"g"!=/./g.flags&&e(8).f(RegExp.prototype,"flags",{configurable:!0,get:e(51)})},function(t,n){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,n,e){var r=e(1),i=e(4),o=e(93);t.exports=function(t,n){if(r(t),i(n)&&n.constructor===t)return n;var e=o.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){"use strict";var r=e(120),i=e(43);t.exports=e(63)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var n=r.getEntry(i(this,"Map"),t);return n&&n.v},set:function(t,n){return r.def(i(this,"Map"),0===t?0:t,n)}},r,!0)},function(t,n,e){"use strict";var r=e(8).f,i=e(37),o=e(42),u=e(20),c=e(40),a=e(41),s=e(79),f=e(114),l=e(39),h=e(7),p=e(31).fastKey,v=e(43),d=h?"_s":"size",g=function(t,n){var e,r=p(n);if("F"!==r)return t._i[r];for(e=t._f;e;e=e.n)if(e.k==n)return e};t.exports={getConstructor:function(t,n,e,s){var f=t((function(t,r){c(t,f,n,"_i"),t._t=n,t._i=i(null),t._f=void 0,t._l=void 0,t[d]=0,null!=r&&a(r,e,t[s],t)}));return o(f.prototype,{clear:function(){for(var t=v(this,n),e=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete e[r.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var e=v(this,n),r=g(e,t);if(r){var i=r.n,o=r.p;delete e._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),e._f==r&&(e._f=i),e._l==r&&(e._l=o),e[d]--}return!!r},forEach:function(t){v(this,n);for(var e,r=u(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!g(v(this,n),t)}}),h&&r(f.prototype,"size",{get:function(){return v(this,n)[d]}}),f},def:function(t,n,e){var r,i,o=g(t,n);return o?o.v=e:(t._l=o={i:i=p(n,!0),k:n,v:e,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[d]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,n,e){s(t,n,(function(t,e){this._t=v(t,n),this._k=e,this._l=void 0}),(function(){for(var t=this._k,n=this._l;n&&n.r;)n=n.p;return this._t&&(this._l=n=n?n.n:this._t._f)?f(0,"keys"==t?n.k:"values"==t?n.v:[n.k,n.v]):(this._t=void 0,f(1))}),e?"entries":"values",!e,!0),l(n)}}},function(t,n,e){"use strict";var r=e(120),i=e(43);t.exports=e(63)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,n,e){"use strict";var r,i=e(2),o=e(27)(0),u=e(12),c=e(31),a=e(101),s=e(123),f=e(4),l=e(43),h=e(43),p=!i.ActiveXObject&&"ActiveXObject"in i,v=c.getWeak,d=Object.isExtensible,g=s.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(f(t)){var n=v(t);return!0===n?g(l(this,"WeakMap")).get(t):n?n[this._i]:void 0}},set:function(t,n){return s.def(l(this,"WeakMap"),t,n)}},b=t.exports=e(63)("WeakMap",y,m,s,!0,!0);h&&p&&(a((r=s.getConstructor(y,"WeakMap")).prototype,m),c.NEED=!0,o(["delete","has","get","set"],(function(t){var n=b.prototype,e=n[t];u(n,t,(function(n,i){if(f(n)&&!d(n)){this._f||(this._f=new r);var o=this._f[t](n,i);return"set"==t?this:o}return e.call(this,n,i)}))})))},function(t,n,e){"use strict";var r=e(42),i=e(31).getWeak,o=e(1),u=e(4),c=e(40),a=e(41),s=e(27),f=e(15),l=e(43),h=s(5),p=s(6),v=0,d=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,n){return h(t.a,(function(t){return t[0]===n}))};g.prototype={get:function(t){var n=y(this,t);if(n)return n[1]},has:function(t){return!!y(this,t)},set:function(t,n){var e=y(this,t);e?e[1]=n:this.a.push([t,n])},delete:function(t){var n=p(this.a,(function(n){return n[0]===t}));return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,o){var s=t((function(t,r){c(t,s,n,"_i"),t._t=n,t._i=v++,t._l=void 0,null!=r&&a(r,e,t[o],t)}));return r(s.prototype,{delete:function(t){if(!u(t))return!1;var e=i(t);return!0===e?d(l(this,n)).delete(t):e&&f(e,this._i)&&delete e[this._i]},has:function(t){if(!u(t))return!1;var e=i(t);return!0===e?d(l(this,n)).has(t):e&&f(e,this._i)}}),s},def:function(t,n,e){var r=i(o(n),!0);return!0===r?d(t).set(n,e):r[t._i]=e,t},ufstore:d}},function(t,n,e){var r=e(22),i=e(6);t.exports=function(t){if(void 0===t)return 0;var n=r(t),e=i(n);if(n!==e)throw RangeError("Wrong length!");return e}},function(t,n,e){var r=e(38),i=e(55),o=e(1),u=e(2).Reflect;t.exports=u&&u.ownKeys||function(t){var n=r.f(o(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){"use strict";var r=e(56),i=e(4),o=e(6),u=e(20),c=e(5)("isConcatSpreadable");t.exports=function t(n,e,a,s,f,l,h,p){for(var v,d,g=f,y=0,m=!!h&&u(h,p,3);y<s;){if(y in a){if(v=m?m(a[y],y,e):a[y],d=!1,i(v)&&(d=void 0!==(d=v[c])?!!d:r(v)),d&&l>0)g=t(n,e,v,o(v.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();n[g]=v}g++}y++}return g}},function(t,n,e){var r=e(6),i=e(76),o=e(25);t.exports=function(t,n,e,u){var c=String(o(t)),a=c.length,s=void 0===e?" ":String(e),f=r(n);if(f<=a||""==s)return c;var l=f-a,h=i.call(s,Math.ceil(l/s.length));return h.length>l&&(h=h.slice(0,l)),u?h+c:c+h}},function(t,n,e){var r=e(7),i=e(35),o=e(16),u=e(50).f;t.exports=function(t){return function(n){for(var e,c=o(n),a=i(c),s=a.length,f=0,l=[];s>f;)e=a[f++],r&&!u.call(c,e)||l.push(t?[e,c[e]]:c[e]);return l}}},function(t,n,e){var r=e(45),i=e(130);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,n,e){var r=e(41);t.exports=function(t,n){var e=[];return r(t,!1,e.push,e,n),e}},function(t,n){t.exports=Math.scale||function(t,n,e,r,i){return 0===arguments.length||t!=t||n!=n||e!=e||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-n)*(i-r)/(e-n)+r}},function(t,n,e){t.exports=e(348)},function(t,n,e){"use strict";t.exports=function(t,n){return function(){for(var e=new Array(arguments.length),r=0;r<e.length;r++)e[r]=arguments[r];return t.apply(n,e)}}},function(t,n,e){"use strict";var r=e(14);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,n,e){if(!n)return t;var o;if(e)o=e(n);else if(r.isURLSearchParams(n))o=n.toString();else{var u=[];r.forEach(n,(function(t,n){null!=t&&(r.isArray(t)?n+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),u.push(i(n)+"="+i(t))})))})),o=u.join("&")}if(o){var c=t.indexOf("#");-1!==c&&(t=t.slice(0,c)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,n,e){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,n,e){"use strict";(function(n){var r=e(14),i=e(353),o={"Content-Type":"application/x-www-form-urlencoded"};function u(t,n){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=n)}var c,a={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(c=e(138)),c),transformRequest:[function(t,n){return i(n,"Accept"),i(n,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(u(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(u(n,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};a.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){a.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){a.headers[t]=r.merge(o)})),t.exports=a}).call(this,e(137))},function(t,n){var e,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var a,s=[],f=!1,l=-1;function h(){f&&a&&(f=!1,a.length?s=a.concat(s):l=-1,s.length&&p())}function p(){if(!f){var t=c(h);f=!0;for(var n=s.length;n;){for(a=s,s=[];++l<n;)a&&a[l].run();l=-1,n=s.length}a=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(n){try{return r.call(null,t)}catch(n){return r.call(this,t)}}}(t)}}function v(t,n){this.fun=t,this.array=n}function d(){}i.nextTick=function(t){var n=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)n[e-1]=arguments[e];s.push(new v(t,n)),1!==s.length||f||c(p)},v.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,n,e){"use strict";var r=e(14),i=e(354),o=e(134),u=e(356),c=e(359),a=e(360),s=e(139);t.exports=function(t){return new Promise((function(n,f){var l=t.data,h=t.headers;r.isFormData(l)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(t.auth){var v=t.auth.username||"",d=t.auth.password||"";h.Authorization="Basic "+btoa(v+":"+d)}var g=u(t.baseURL,t.url);if(p.open(t.method.toUpperCase(),o(g,t.params,t.paramsSerializer),!0),p.timeout=t.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var e="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:e,config:t,request:p};i(n,f,r),p=null}},p.onabort=function(){p&&(f(s("Request aborted",t,"ECONNABORTED",p)),p=null)},p.onerror=function(){f(s("Network Error",t,null,p)),p=null},p.ontimeout=function(){var n="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(n=t.timeoutErrorMessage),f(s(n,t,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var y=e(361),m=(t.withCredentials||a(g))&&t.xsrfCookieName?y.read(t.xsrfCookieName):void 0;m&&(h[t.xsrfHeaderName]=m)}if("setRequestHeader"in p&&r.forEach(h,(function(t,n){void 0===l&&"content-type"===n.toLowerCase()?delete h[n]:p.setRequestHeader(n,t)})),r.isUndefined(t.withCredentials)||(p.withCredentials=!!t.withCredentials),t.responseType)try{p.responseType=t.responseType}catch(n){if("json"!==t.responseType)throw n}"function"==typeof t.onDownloadProgress&&p.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){p&&(p.abort(),f(t),p=null)})),void 0===l&&(l=null),p.send(l)}))}},function(t,n,e){"use strict";var r=e(355);t.exports=function(t,n,e,i,o){var u=new Error(t);return r(u,n,e,i,o)}},function(t,n,e){"use strict";var r=e(14);t.exports=function(t,n){n=n||{};var e={},i=["url","method","params","data"],o=["headers","auth","proxy"],u=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(i,(function(t){void 0!==n[t]&&(e[t]=n[t])})),r.forEach(o,(function(i){r.isObject(n[i])?e[i]=r.deepMerge(t[i],n[i]):void 0!==n[i]?e[i]=n[i]:r.isObject(t[i])?e[i]=r.deepMerge(t[i]):void 0!==t[i]&&(e[i]=t[i])})),r.forEach(u,(function(r){void 0!==n[r]?e[r]=n[r]:void 0!==t[r]&&(e[r]=t[r])}));var c=i.concat(o).concat(u),a=Object.keys(n).filter((function(t){return-1===c.indexOf(t)}));return r.forEach(a,(function(r){void 0!==n[r]?e[r]=n[r]:void 0!==t[r]&&(e[r]=t[r])})),e}},function(t,n,e){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.renderResults=n.limitRecipeTitle=n.highlightSelected=n.clearResults=n.clearInput=n.getInput=void 0;var r=e(53),i=(n.getInput=function(){return r.elements.searchInput.value},n.clearInput=function(){r.elements.searchInput.value=""},n.clearResults=function(){r.elements.searchResultList.innerHTML="",r.elements.searchResultPages.innerHTML=""},n.highlightSelected=function(t){Array.from(document.querySelectorAll(".results__link")).forEach((function(t){t.classList.remove("results__link--active")})),document.querySelector('.results__link[href*="'+t+'"]').classList.add("results__link--active")},n.limitRecipeTitle=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:17,e=[];return t.length>n?(t.split(" ").reduce((function(t,r){return t+r.length<=n&&e.push(r),t+r.length}),0),e.join(" ")+" ..."):t}),o=function(t){var n='\n <li>\n <a class="results__link" href="#'+t.recipe_id+'">\n <figure class="results__fig">\n <img src="'+t.image_url+'" alt="'+t.title+'">\n </figure>\n <div class="results__data">\n <h4 class="results__name">'+i(t.title)+'</h4>\n <p class="results__author">'+t.publisher+"</p>\n </div>\n </a>\n </li>\n ";r.elements.searchResultList.insertAdjacentHTML("beforeend",n)},u=function(t,n){return'\n <button class="btn-inline results__btn--'+n+'" data-goto='+("prev"===n?t-1:t+1)+">\n <span>Page "+("prev"===n?t-1:t+1)+'</span>\n <svg class="search__icon">\n <use href="img/icons.svg#icon-triangle-'+("prev"===n?"left":"right")+'"></use>\n </svg>\n </button>\n'},c=function(t,n,e){var i=Math.ceil(n/e),o=void 0;1===t&&i>1?o=u(t,"next"):t<i?o="\n "+u(t,"prev")+"\n "+u(t,"next")+"\n ":t===i&&i>1&&(o=u(t,"prev")),r.elements.searchResultPages.insertAdjacentHTML("afterbegin",o)};n.renderResults=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=(n-1)*e,i=n*e;t.slice(r,i).forEach(o),c(n,t.length,e)}},function(t,n,e){e(144),t.exports=e(346)},function(t,n,e){"use strict";(function(t){if(e(145),e(342),e(343),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;function n(t,n,e){t[n]||Object.defineProperty(t,n,{writable:!0,configurable:!0,value:e})}n(String.prototype,"padLeft","".padStart),n(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach((function(t){[][t]&&n(Array,t,Function.call.bind([][t]))}))}).call(this,e(95))},function(t,n,e){e(146),e(149),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(167),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(177),e(178),e(179),e(180),e(181),e(182),e(183),e(184),e(185),e(186),e(187),e(188),e(189),e(190),e(191),e(192),e(193),e(194),e(195),e(196),e(197),e(198),e(199),e(200),e(201),e(202),e(203),e(204),e(205),e(206),e(207),e(208),e(209),e(210),e(211),e(212),e(213),e(214),e(215),e(216),e(217),e(218),e(219),e(220),e(221),e(222),e(223),e(224),e(226),e(227),e(229),e(230),e(231),e(232),e(233),e(234),e(235),e(237),e(238),e(239),e(240),e(241),e(242),e(243),e(244),e(245),e(246),e(247),e(248),e(249),e(88),e(250),e(115),e(251),e(116),e(252),e(253),e(254),e(255),e(256),e(119),e(121),e(122),e(257),e(258),e(259),e(260),e(261),e(262),e(263),e(264),e(265),e(266),e(267),e(268),e(269),e(270),e(271),e(272),e(273),e(274),e(275),e(276),e(277),e(278),e(279),e(280),e(281),e(282),e(283),e(284),e(285),e(286),e(287),e(288),e(289),e(290),e(291),e(292),e(293),e(294),e(295),e(296),e(297),e(298),e(299),e(300),e(301),e(302),e(303),e(304),e(305),e(306),e(307),e(308),e(309),e(310),e(311),e(312),e(313),e(314),e(315),e(316),e(317),e(318),e(319),e(320),e(321),e(322),e(323),e(324),e(325),e(326),e(327),e(328),e(329),e(330),e(331),e(332),e(333),e(334),e(335),e(336),e(337),e(338),e(339),e(340),e(341),t.exports=e(19)},function(t,n,e){"use strict";var r=e(2),i=e(15),o=e(7),u=e(0),c=e(12),a=e(31).KEY,s=e(3),f=e(48),l=e(44),h=e(34),p=e(5),v=e(97),d=e(69),g=e(148),y=e(56),m=e(1),b=e(4),_=e(9),x=e(16),w=e(24),S=e(33),E=e(37),k=e(100),O=e(17),M=e(55),P=e(8),I=e(35),F=O.f,j=P.f,R=k.f,A=r.Symbol,L=r.JSON,T=L&&L.stringify,N=p("_hidden"),C=p("toPrimitive"),D={}.propertyIsEnumerable,B=f("symbol-registry"),U=f("symbols"),q=f("op-symbols"),W=Object.prototype,G="function"==typeof A&&!!M.f,V=r.QObject,z=!V||!V.prototype||!V.prototype.findChild,H=o&&s((function(){return 7!=E(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a}))?function(t,n,e){var r=F(W,n);r&&delete W[n],j(t,n,e),r&&t!==W&&j(W,n,r)}:j,J=function(t){var n=U[t]=E(A.prototype);return n._k=t,n},$=G&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},Y=function(t,n,e){return t===W&&Y(q,n,e),m(t),n=w(n,!0),m(e),i(U,n)?(e.enumerable?(i(t,N)&&t[N][n]&&(t[N][n]=!1),e=E(e,{enumerable:S(0,!1)})):(i(t,N)||j(t,N,S(1,{})),t[N][n]=!0),H(t,n,e)):j(t,n,e)},K=function(t,n){m(t);for(var e,r=g(n=x(n)),i=0,o=r.length;o>i;)Y(t,e=r[i++],n[e]);return t},X=function(t){var n=D.call(this,t=w(t,!0));return!(this===W&&i(U,t)&&!i(q,t))&&(!(n||!i(this,t)||!i(U,t)||i(this,N)&&this[N][t])||n)},Z=function(t,n){if(t=x(t),n=w(n,!0),t!==W||!i(U,n)||i(q,n)){var e=F(t,n);return!e||!i(U,n)||i(t,N)&&t[N][n]||(e.enumerable=!0),e}},Q=function(t){for(var n,e=R(x(t)),r=[],o=0;e.length>o;)i(U,n=e[o++])||n==N||n==a||r.push(n);return r},tt=function(t){for(var n,e=t===W,r=R(e?q:x(t)),o=[],u=0;r.length>u;)!i(U,n=r[u++])||e&&!i(W,n)||o.push(U[n]);return o};G||(c((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),n=function(e){this===W&&n.call(q,e),i(this,N)&&i(this[N],t)&&(this[N][t]=!1),H(this,t,S(1,e))};return o&&z&&H(W,t,{configurable:!0,set:n}),J(t)}).prototype,"toString",(function(){return this._k})),O.f=Z,P.f=Y,e(38).f=k.f=Q,e(50).f=X,M.f=tt,o&&!e(30)&&c(W,"propertyIsEnumerable",X,!0),v.f=function(t){return J(p(t))}),u(u.G+u.W+u.F*!G,{Symbol:A});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;nt.length>et;)p(nt[et++]);for(var rt=I(p.store),it=0;rt.length>it;)d(rt[it++]);u(u.S+u.F*!G,"Symbol",{for:function(t){return i(B,t+="")?B[t]:B[t]=A(t)},keyFor:function(t){if(!$(t))throw TypeError(t+" is not a symbol!");for(var n in B)if(B[n]===t)return n},useSetter:function(){z=!0},useSimple:function(){z=!1}}),u(u.S+u.F*!G,"Object",{create:function(t,n){return void 0===n?E(t):K(E(t),n)},defineProperty:Y,defineProperties:K,getOwnPropertyDescriptor:Z,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var ot=s((function(){M.f(1)}));u(u.S+u.F*ot,"Object",{getOwnPropertySymbols:function(t){return M.f(_(t))}}),L&&u(u.S+u.F*(!G||s((function(){var t=A();return"[null]"!=T([t])||"{}"!=T({a:t})||"{}"!=T(Object(t))}))),"JSON",{stringify:function(t){for(var n,e,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(e=n=r[1],(b(n)||void 0!==t)&&!$(t))return y(n)||(n=function(t,n){if("function"==typeof e&&(n=e.call(this,t,n)),!$(n))return n}),r[1]=n,T.apply(L,r)}}),A.prototype[C]||e(11)(A.prototype,C,A.prototype.valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,n,e){t.exports=e(48)("native-function-to-string",Function.toString)},function(t,n,e){var r=e(35),i=e(55),o=e(50);t.exports=function(t){var n=r(t),e=i.f;if(e)for(var u,c=e(t),a=o.f,s=0;c.length>s;)a.call(t,u=c[s++])&&n.push(u);return n}},function(t,n,e){var r=e(0);r(r.S,"Object",{create:e(37)})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(7),"Object",{defineProperty:e(8).f})},function(t,n,e){var r=e(0);r(r.S+r.F*!e(7),"Object",{defineProperties:e(99)})},function(t,n,e){var r=e(16),i=e(17).f;e(26)("getOwnPropertyDescriptor",(function(){return function(t,n){return i(r(t),n)}}))},function(t,n,e){var r=e(9),i=e(18);e(26)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,n,e){var r=e(9),i=e(35);e(26)("keys",(function(){return function(t){return i(r(t))}}))},function(t,n,e){e(26)("getOwnPropertyNames",(function(){return e(100).f}))},function(t,n,e){var r=e(4),i=e(31).onFreeze;e(26)("freeze",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(31).onFreeze;e(26)("seal",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4),i=e(31).onFreeze;e(26)("preventExtensions",(function(t){return function(n){return t&&r(n)?t(i(n)):n}}))},function(t,n,e){var r=e(4);e(26)("isFrozen",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(26)("isSealed",(function(t){return function(n){return!r(n)||!!t&&t(n)}}))},function(t,n,e){var r=e(4);e(26)("isExtensible",(function(t){return function(n){return!!r(n)&&(!t||t(n))}}))},function(t,n,e){var r=e(0);r(r.S+r.F,"Object",{assign:e(101)})},function(t,n,e){var r=e(0);r(r.S,"Object",{is:e(102)})},function(t,n,e){var r=e(0);r(r.S,"Object",{setPrototypeOf:e(73).set})},function(t,n,e){"use strict";var r=e(45),i={};i[e(5)("toStringTag")]="z",i+""!="[object z]"&&e(12)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,n,e){var r=e(0);r(r.P,"Function",{bind:e(103)})},function(t,n,e){var r=e(8).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||e(7)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,n,e){"use strict";var r=e(4),i=e(18),o=e(5)("hasInstance"),u=Function.prototype;o in u||e(8).f(u,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,n,e){var r=e(0),i=e(105);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,n,e){var r=e(0),i=e(106);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,n,e){"use strict";var r=e(2),i=e(15),o=e(21),u=e(75),c=e(24),a=e(3),s=e(38).f,f=e(17).f,l=e(8).f,h=e(46).trim,p=r.Number,v=p,d=p.prototype,g="Number"==o(e(37)(d)),y="trim"in String.prototype,m=function(t){var n=c(t,!1);if("string"==typeof n&&n.length>2){var e,r,i,o=(n=y?n.trim():h(n,3)).charCodeAt(0);if(43===o||45===o){if(88===(e=n.charCodeAt(2))||120===e)return NaN}else if(48===o){switch(n.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+n}for(var u,a=n.slice(2),s=0,f=a.length;s<f;s++)if((u=a.charCodeAt(s))<48||u>i)return NaN;return parseInt(a,r)}}return+n};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof p&&(g?a((function(){d.valueOf.call(e)})):"Number"!=o(e))?u(new v(m(n)),e,p):m(n)};for(var b,_=e(7)?s(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;_.length>x;x++)i(v,b=_[x])&&!i(p,b)&&l(p,b,f(v,b));p.prototype=d,d.constructor=p,e(12)(r,"Number",p)}},function(t,n,e){"use strict";var r=e(0),i=e(22),o=e(107),u=e(76),c=1..toFixed,a=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,n){for(var e=-1,r=n;++e<6;)r+=t*s[e],s[e]=r%1e7,r=a(r/1e7)},h=function(t){for(var n=6,e=0;--n>=0;)e+=s[n],s[n]=a(e/t),e=e%t*1e7},p=function(){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==s[t]){var e=String(s[t]);n=""===n?e:n+u.call("0",7-e.length)+e}return n},v=function(t,n,e){return 0===n?e:n%2==1?v(t,n-1,e*t):v(t*t,n/2,e)};r(r.P+r.F*(!!c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(3)((function(){c.call({})}))),"Number",{toFixed:function(t){var n,e,r,c,a=o(this,f),s=i(t),d="",g="0";if(s<0||s>20)throw RangeError(f);if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return String(a);if(a<0&&(d="-",a=-a),a>1e-21)if(e=(n=function(t){for(var n=0,e=t;e>=4096;)n+=12,e/=4096;for(;e>=2;)n+=1,e/=2;return n}(a*v(2,69,1))-69)<0?a*v(2,-n,1):a/v(2,n,1),e*=4503599627370496,(n=52-n)>0){for(l(0,e),r=s;r>=7;)l(1e7,0),r-=7;for(l(v(10,r,1),0),r=n-1;r>=23;)h(1<<23),r-=23;h(1<<r),l(1,1),h(2),g=p()}else l(0,e),l(1<<-n,0),g=p()+u.call("0",s);return g=s>0?d+((c=g.length)<=s?"0."+u.call("0",s-c)+g:g.slice(0,c-s)+"."+g.slice(c-s)):d+g}})},function(t,n,e){"use strict";var r=e(0),i=e(3),o=e(107),u=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==u.call(1,void 0)}))||!i((function(){u.call({})}))),"Number",{toPrecision:function(t){var n=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?u.call(n):u.call(n,t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,n,e){var r=e(0),i=e(2).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Number",{isInteger:e(108)})},function(t,n,e){var r=e(0);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,n,e){var r=e(0),i=e(108),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,n,e){var r=e(0);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,n,e){var r=e(0);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,n,e){var r=e(0),i=e(106);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,n,e){var r=e(0),i=e(105);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,n,e){var r=e(0),i=e(109),o=Math.sqrt,u=Math.acosh;r(r.S+r.F*!(u&&710==Math.floor(u(Number.MAX_VALUE))&&u(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,n,e){var r=e(0),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(n){return isFinite(n=+n)&&0!=n?n<0?-t(-n):Math.log(n+Math.sqrt(n*n+1)):n}})},function(t,n,e){var r=e(0),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,n,e){var r=e(0),i=e(77);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,n,e){var r=e(0),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,n,e){var r=e(0),i=e(78);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,n,e){var r=e(0);r(r.S,"Math",{fround:e(110)})},function(t,n,e){var r=e(0),i=Math.abs;r(r.S,"Math",{hypot:function(t,n){for(var e,r,o=0,u=0,c=arguments.length,a=0;u<c;)a<(e=i(arguments[u++]))?(o=o*(r=a/e)*r+1,a=e):o+=e>0?(r=e/a)*r:e;return a===1/0?1/0:a*Math.sqrt(o)}})},function(t,n,e){var r=e(0),i=Math.imul;r(r.S+r.F*e(3)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r;return 0|i*o+((65535&e>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,n,e){var r=e(0);r(r.S,"Math",{log1p:e(109)})},function(t,n,e){var r=e(0);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,n,e){var r=e(0);r(r.S,"Math",{sign:e(77)})},function(t,n,e){var r=e(0),i=e(78),o=Math.exp;r(r.S+r.F*e(3)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,n,e){var r=e(0),i=e(78),o=Math.exp;r(r.S,"Math",{tanh:function(t){var n=i(t=+t),e=i(-t);return n==1/0?1:e==1/0?-1:(n-e)/(o(t)+o(-t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,n,e){var r=e(0),i=e(36),o=String.fromCharCode,u=String.fromCodePoint;r(r.S+r.F*(!!u&&1!=u.length),"String",{fromCodePoint:function(t){for(var n,e=[],r=arguments.length,u=0;r>u;){if(n=+arguments[u++],i(n,1114111)!==n)throw RangeError(n+" is not a valid code point");e.push(n<65536?o(n):o(55296+((n-=65536)>>10),n%1024+56320))}return e.join("")}})},function(t,n,e){var r=e(0),i=e(16),o=e(6);r(r.S,"String",{raw:function(t){for(var n=i(t.raw),e=o(n.length),r=arguments.length,u=[],c=0;e>c;)u.push(String(n[c++])),c<r&&u.push(String(arguments[c]));return u.join("")}})},function(t,n,e){"use strict";e(46)("trim",(function(t){return function(){return t(this,3)}}))},function(t,n,e){"use strict";var r=e(57)(!0);e(79)(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,n=this._t,e=this._i;return e>=n.length?{value:void 0,done:!0}:(t=r(n,e),this._i+=t.length,{value:t,done:!1})}))},function(t,n,e){"use strict";var r=e(0),i=e(57)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(81),u="".endsWith;r(r.P+r.F*e(82)("endsWith"),"String",{endsWith:function(t){var n=o(this,t,"endsWith"),e=arguments.length>1?arguments[1]:void 0,r=i(n.length),c=void 0===e?r:Math.min(i(e),r),a=String(t);return u?u.call(n,a,c):n.slice(c-a.length,c)===a}})},function(t,n,e){"use strict";var r=e(0),i=e(81);r(r.P+r.F*e(82)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,n,e){var r=e(0);r(r.P,"String",{repeat:e(76)})},function(t,n,e){"use strict";var r=e(0),i=e(6),o=e(81),u="".startsWith;r(r.P+r.F*e(82)("startsWith"),"String",{startsWith:function(t){var n=o(this,t,"startsWith"),e=i(Math.min(arguments.length>1?arguments[1]:void 0,n.length)),r=String(t);return u?u.call(n,r,e):n.slice(e,e+r.length)===r}})},function(t,n,e){"use strict";e(13)("anchor",(function(t){return function(n){return t(this,"a","name",n)}}))},function(t,n,e){"use strict";e(13)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,n,e){"use strict";e(13)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,n,e){"use strict";e(13)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,n,e){"use strict";e(13)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,n,e){"use strict";e(13)("fontcolor",(function(t){return function(n){return t(this,"font","color",n)}}))},function(t,n,e){"use strict";e(13)("fontsize",(function(t){return function(n){return t(this,"font","size",n)}}))},function(t,n,e){"use strict";e(13)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,n,e){"use strict";e(13)("link",(function(t){return function(n){return t(this,"a","href",n)}}))},function(t,n,e){"use strict";e(13)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,n,e){"use strict";e(13)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,n,e){"use strict";e(13)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,n,e){"use strict";e(13)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,n,e){var r=e(0);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(24);r(r.P+r.F*e(3)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var n=i(this),e=o(n);return"number"!=typeof e||isFinite(e)?n.toISOString():null}})},function(t,n,e){var r=e(0),i=e(225);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,n,e){"use strict";var r=e(3),i=Date.prototype.getTime,o=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}:o},function(t,n,e){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&e(12)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,n,e){var r=e(5)("toPrimitive"),i=Date.prototype;r in i||e(11)(i,r,e(228))},function(t,n,e){"use strict";var r=e(1),i=e(24);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,n,e){var r=e(0);r(r.S,"Array",{isArray:e(56)})},function(t,n,e){"use strict";var r=e(20),i=e(0),o=e(9),u=e(111),c=e(83),a=e(6),s=e(84),f=e(85);i(i.S+i.F*!e(59)((function(t){Array.from(t)})),"Array",{from:function(t){var n,e,i,l,h=o(t),p="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,g=void 0!==d,y=0,m=f(h);if(g&&(d=r(d,v>2?arguments[2]:void 0,2)),null==m||p==Array&&c(m))for(e=new p(n=a(h.length));n>y;y++)s(e,y,g?d(h[y],y):h[y]);else for(l=m.call(h),e=new p;!(i=l.next()).done;y++)s(e,y,g?u(l,d,[i.value,y],!0):i.value);return e.length=y,e}})},function(t,n,e){"use strict";var r=e(0),i=e(84);r(r.S+r.F*e(3)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,n=arguments.length,e=new("function"==typeof this?this:Array)(n);n>t;)i(e,t,arguments[t++]);return e.length=n,e}})},function(t,n,e){"use strict";var r=e(0),i=e(16),o=[].join;r(r.P+r.F*(e(49)!=Object||!e(23)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,n,e){"use strict";var r=e(0),i=e(72),o=e(21),u=e(36),c=e(6),a=[].slice;r(r.P+r.F*e(3)((function(){i&&a.call(i)})),"Array",{slice:function(t,n){var e=c(this.length),r=o(this);if(n=void 0===n?e:n,"Array"==r)return a.call(this,t,n);for(var i=u(t,e),s=u(n,e),f=c(s-i),l=new Array(f),h=0;h<f;h++)l[h]="String"==r?this.charAt(i+h):this[i+h];return l}})},function(t,n,e){"use strict";var r=e(0),i=e(10),o=e(9),u=e(3),c=[].sort,a=[1,2,3];r(r.P+r.F*(u((function(){a.sort(void 0)}))||!u((function(){a.sort(null)}))||!e(23)(c)),"Array",{sort:function(t){return void 0===t?c.call(o(this)):c.call(o(this),i(t))}})},function(t,n,e){"use strict";var r=e(0),i=e(27)(0),o=e(23)([].forEach,!0);r(r.P+r.F*!o,"Array",{forEach:function(t){return i(this,t,arguments[1])}})},function(t,n,e){var r=e(4),i=e(56),o=e(5)("species");t.exports=function(t){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&null===(n=n[o])&&(n=void 0)),void 0===n?Array:n}},function(t,n,e){"use strict";var r=e(0),i=e(27)(1);r(r.P+r.F*!e(23)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(27)(2);r(r.P+r.F*!e(23)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(27)(3);r(r.P+r.F*!e(23)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(27)(4);r(r.P+r.F*!e(23)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(112);r(r.P+r.F*!e(23)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,n,e){"use strict";var r=e(0),i=e(112);r(r.P+r.F*!e(23)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,n,e){"use strict";var r=e(0),i=e(54)(!1),o=[].indexOf,u=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(u||!e(23)(o)),"Array",{indexOf:function(t){return u?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,n,e){"use strict";var r=e(0),i=e(16),o=e(22),u=e(6),c=[].lastIndexOf,a=!!c&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(a||!e(23)(c)),"Array",{lastIndexOf:function(t){if(a)return c.apply(this,arguments)||0;var n=i(this),e=u(n.length),r=e-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=e+r);r>=0;r--)if(r in n&&n[r]===t)return r||0;return-1}})},function(t,n,e){var r=e(0);r(r.P,"Array",{copyWithin:e(113)}),e(32)("copyWithin")},function(t,n,e){var r=e(0);r(r.P,"Array",{fill:e(87)}),e(32)("fill")},function(t,n,e){"use strict";var r=e(0),i=e(27)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(32)("find")},function(t,n,e){"use strict";var r=e(0),i=e(27)(6),o="findIndex",u=!0;o in[]&&Array(1)[o]((function(){u=!1})),r(r.P+r.F*u,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(32)(o)},function(t,n,e){e(39)("Array")},function(t,n,e){var r=e(2),i=e(75),o=e(8).f,u=e(38).f,c=e(58),a=e(51),s=r.RegExp,f=s,l=s.prototype,h=/a/g,p=/a/g,v=new s(h)!==h;if(e(7)&&(!v||e(3)((function(){return p[e(5)("match")]=!1,s(h)!=h||s(p)==p||"/a/i"!=s(h,"i")})))){s=function(t,n){var e=this instanceof s,r=c(t),o=void 0===n;return!e&&r&&t.constructor===s&&o?t:i(v?new f(r&&!o?t.source:t,n):f((r=t instanceof s)?t.source:t,r&&o?a.call(t):n),e?this:l,s)};for(var d=function(t){t in s||o(s,t,{configurable:!0,get:function(){return f[t]},set:function(n){f[t]=n}})},g=u(f),y=0;g.length>y;)d(g[y++]);l.constructor=s,s.prototype=l,e(12)(r,"RegExp",s)}e(39)("RegExp")},function(t,n,e){"use strict";e(116);var r=e(1),i=e(51),o=e(7),u=/./.toString,c=function(t){e(12)(RegExp.prototype,"toString",t,!0)};e(3)((function(){return"/a/b"!=u.call({source:"a",flags:"b"})}))?c((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=u.name&&c((function(){return u.call(this)}))},function(t,n,e){"use strict";var r=e(1),i=e(6),o=e(90),u=e(60);e(61)("match",1,(function(t,n,e,c){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=c(e,t,this);if(n.done)return n.value;var a=r(t),s=String(this);if(!a.global)return u(a,s);var f=a.unicode;a.lastIndex=0;for(var l,h=[],p=0;null!==(l=u(a,s));){var v=String(l[0]);h[p]=v,""===v&&(a.lastIndex=o(s,i(a.lastIndex),f)),p++}return 0===p?null:h}]}))},function(t,n,e){"use strict";var r=e(1),i=e(9),o=e(6),u=e(22),c=e(90),a=e(60),s=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;e(61)("replace",2,(function(t,n,e,v){return[function(r,i){var o=t(this),u=null==r?void 0:r[n];return void 0!==u?u.call(r,o,i):e.call(String(o),r,i)},function(t,n){var i=v(e,t,this,n);if(i.done)return i.value;var l=r(t),h=String(this),p="function"==typeof n;p||(n=String(n));var g=l.global;if(g){var y=l.unicode;l.lastIndex=0}for(var m=[];;){var b=a(l,h);if(null===b)break;if(m.push(b),!g)break;""===String(b[0])&&(l.lastIndex=c(h,o(l.lastIndex),y))}for(var _,x="",w=0,S=0;S<m.length;S++){b=m[S];for(var E=String(b[0]),k=s(f(u(b.index),h.length),0),O=[],M=1;M<b.length;M++)O.push(void 0===(_=b[M])?_:String(_));var P=b.groups;if(p){var I=[E].concat(O,k,h);void 0!==P&&I.push(P);var F=String(n.apply(void 0,I))}else F=d(E,h,k,O,P,n);k>=w&&(x+=h.slice(w,k)+F,w=k+E.length)}return x+h.slice(w)}];function d(t,n,r,o,u,c){var a=r+t.length,s=o.length,f=p;return void 0!==u&&(u=i(u),f=h),e.call(c,f,(function(e,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(a);case"<":c=u[i.slice(1,-1)];break;default:var f=+i;if(0===f)return e;if(f>s){var h=l(f/10);return 0===h?e:h<=s?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):e}c=o[f-1]}return void 0===c?"":c}))}}))},function(t,n,e){"use strict";var r=e(1),i=e(102),o=e(60);e(61)("search",1,(function(t,n,e,u){return[function(e){var r=t(this),i=null==e?void 0:e[n];return void 0!==i?i.call(e,r):new RegExp(e)[n](String(r))},function(t){var n=u(e,t,this);if(n.done)return n.value;var c=r(t),a=String(this),s=c.lastIndex;i(s,0)||(c.lastIndex=0);var f=o(c,a);return i(c.lastIndex,s)||(c.lastIndex=s),null===f?-1:f.index}]}))},function(t,n,e){"use strict";var r=e(58),i=e(1),o=e(52),u=e(90),c=e(6),a=e(60),s=e(89),f=e(3),l=Math.min,h=[].push,p="length",v=!f((function(){RegExp(4294967295,"y")}));e(61)("split",2,(function(t,n,e,f){var d;return d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(t,n){var i=String(this);if(void 0===t&&0===n)return[];if(!r(t))return e.call(i,t,n);for(var o,u,c,a=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,v=void 0===n?4294967295:n>>>0,d=new RegExp(t.source,f+"g");(o=s.call(d,i))&&!((u=d.lastIndex)>l&&(a.push(i.slice(l,o.index)),o[p]>1&&o.index<i[p]&&h.apply(a,o.slice(1)),c=o[0][p],l=u,a[p]>=v));)d.lastIndex===o.index&&d.lastIndex++;return l===i[p]?!c&&d.test("")||a.push(""):a.push(i.slice(l)),a[p]>v?a.slice(0,v):a}:"0".split(void 0,0)[p]?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,r){var i=t(this),o=null==e?void 0:e[n];return void 0!==o?o.call(e,i,r):d.call(String(i),e,r)},function(t,n){var r=f(d,t,this,n,d!==e);if(r.done)return r.value;var s=i(t),h=String(this),p=o(s,RegExp),g=s.unicode,y=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(v?"y":"g"),m=new p(v?s:"^(?:"+s.source+")",y),b=void 0===n?4294967295:n>>>0;if(0===b)return[];if(0===h.length)return null===a(m,h)?[h]:[];for(var _=0,x=0,w=[];x<h.length;){m.lastIndex=v?x:0;var S,E=a(m,v?h:h.slice(x));if(null===E||(S=l(c(m.lastIndex+(v?0:x)),h.length))===_)x=u(h,x,g);else{if(w.push(h.slice(_,x)),w.length===b)return w;for(var k=1;k<=E.length-1;k++)if(w.push(E[k]),w.length===b)return w;x=_=S}}return w.push(h.slice(_)),w}]}))},function(t,n,e){"use strict";var r,i,o,u,c=e(30),a=e(2),s=e(20),f=e(45),l=e(0),h=e(4),p=e(10),v=e(40),d=e(41),g=e(52),y=e(91).set,m=e(92)(),b=e(93),_=e(117),x=e(62),w=e(118),S=a.TypeError,E=a.process,k=E&&E.versions,O=k&&k.v8||"",M=a.Promise,P="process"==f(E),I=function(){},F=i=b.f,j=!!function(){try{var t=M.resolve(1),n=(t.constructor={})[e(5)("species")]=function(t){t(I,I)};return(P||"function"==typeof PromiseRejectionEvent)&&t.then(I)instanceof n&&0!==O.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),R=function(t){var n;return!(!h(t)||"function"!=typeof(n=t.then))&&n},A=function(t,n){if(!t._n){t._n=!0;var e=t._c;m((function(){for(var r=t._v,i=1==t._s,o=0,u=function(n){var e,o,u,c=i?n.ok:n.fail,a=n.resolve,s=n.reject,f=n.domain;try{c?(i||(2==t._h&&N(t),t._h=1),!0===c?e=r:(f&&f.enter(),e=c(r),f&&(f.exit(),u=!0)),e===n.promise?s(S("Promise-chain cycle")):(o=R(e))?o.call(e,a,s):a(e)):s(r)}catch(t){f&&!u&&f.exit(),s(t)}};e.length>o;)u(e[o++]);t._c=[],t._n=!1,n&&!t._h&&L(t)}))}},L=function(t){y.call(a,(function(){var n,e,r,i=t._v,o=T(t);if(o&&(n=_((function(){P?E.emit("unhandledRejection",i,t):(e=a.onunhandledrejection)?e({promise:t,reason:i}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=P||T(t)?2:1),t._a=void 0,o&&n.e)throw n.v}))},T=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){y.call(a,(function(){var n;P?E.emit("rejectionHandled",t):(n=a.onrejectionhandled)&&n({promise:t,reason:t._v})}))},C=function(t){var n=this;n._d||(n._d=!0,(n=n._w||n)._v=t,n._s=2,n._a||(n._a=n._c.slice()),A(n,!0))},D=function(t){var n,e=this;if(!e._d){e._d=!0,e=e._w||e;try{if(e===t)throw S("Promise can't be resolved itself");(n=R(t))?m((function(){var r={_w:e,_d:!1};try{n.call(t,s(D,r,1),s(C,r,1))}catch(t){C.call(r,t)}})):(e._v=t,e._s=1,A(e,!1))}catch(t){C.call({_w:e,_d:!1},t)}}};j||(M=function(t){v(this,M,"Promise","_h"),p(t),r.call(this);try{t(s(D,this,1),s(C,this,1))}catch(t){C.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e(42)(M.prototype,{then:function(t,n){var e=F(g(this,M));return e.ok="function"!=typeof t||t,e.fail="function"==typeof n&&n,e.domain=P?E.domain:void 0,this._c.push(e),this._a&&this._a.push(e),this._s&&A(this,!1),e.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=s(D,t,1),this.reject=s(C,t,1)},b.f=F=function(t){return t===M||t===u?new o(t):i(t)}),l(l.G+l.W+l.F*!j,{Promise:M}),e(44)(M,"Promise"),e(39)("Promise"),u=e(19).Promise,l(l.S+l.F*!j,"Promise",{reject:function(t){var n=F(this);return(0,n.reject)(t),n.promise}}),l(l.S+l.F*(c||!j),"Promise",{resolve:function(t){return w(c&&this===u?M:this,t)}}),l(l.S+l.F*!(j&&e(59)((function(t){M.all(t).catch(I)}))),"Promise",{all:function(t){var n=this,e=F(n),r=e.resolve,i=e.reject,o=_((function(){var e=[],o=0,u=1;d(t,!1,(function(t){var c=o++,a=!1;e.push(void 0),u++,n.resolve(t).then((function(t){a||(a=!0,e[c]=t,--u||r(e))}),i)})),--u||r(e)}));return o.e&&i(o.v),e.promise},race:function(t){var n=this,e=F(n),r=e.reject,i=_((function(){d(t,!1,(function(t){n.resolve(t).then(e.resolve,r)}))}));return i.e&&r(i.v),e.promise}})},function(t,n,e){"use strict";var r=e(123),i=e(43);e(63)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,n,e){"use strict";var r=e(0),i=e(64),o=e(94),u=e(1),c=e(36),a=e(6),s=e(4),f=e(2).ArrayBuffer,l=e(52),h=o.ArrayBuffer,p=o.DataView,v=i.ABV&&f.isView,d=h.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(f!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return v&&v(t)||s(t)&&g in t}}),r(r.P+r.U+r.F*e(3)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,n){if(void 0!==d&&void 0===n)return d.call(u(this),t);for(var e=u(this).byteLength,r=c(t,e),i=c(void 0===n?e:n,e),o=new(l(this,h))(a(i-r)),s=new p(this),f=new p(o),v=0;r<i;)f.setUint8(v++,s.getUint8(r++));return o}}),e(39)("ArrayBuffer")},function(t,n,e){var r=e(0);r(r.G+r.W+r.F*!e(64).ABV,{DataView:e(94).DataView})},function(t,n,e){e(28)("Int8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(28)("Uint8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(28)("Uint8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}),!0)},function(t,n,e){e(28)("Int16",2,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(28)("Uint16",2,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(28)("Int32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(28)("Uint32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(28)("Float32",4,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){e(28)("Float64",8,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},function(t,n,e){var r=e(0),i=e(10),o=e(1),u=(e(2).Reflect||{}).apply,c=Function.apply;r(r.S+r.F*!e(3)((function(){u((function(){}))})),"Reflect",{apply:function(t,n,e){var r=i(t),a=o(e);return u?u(r,n,a):c.call(r,n,a)}})},function(t,n,e){var r=e(0),i=e(37),o=e(10),u=e(1),c=e(4),a=e(3),s=e(103),f=(e(2).Reflect||{}).construct,l=a((function(){function t(){}return!(f((function(){}),[],t)instanceof t)})),h=!a((function(){f((function(){}))}));r(r.S+r.F*(l||h),"Reflect",{construct:function(t,n){o(t),u(n);var e=arguments.length<3?t:o(arguments[2]);if(h&&!l)return f(t,n,e);if(t==e){switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3])}var r=[null];return r.push.apply(r,n),new(s.apply(t,r))}var a=e.prototype,p=i(c(a)?a:Object.prototype),v=Function.apply.call(t,p,n);return c(v)?v:p}})},function(t,n,e){var r=e(8),i=e(0),o=e(1),u=e(24);i(i.S+i.F*e(3)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(t,n,e){o(t),n=u(n,!0),o(e);try{return r.f(t,n,e),!0}catch(t){return!1}}})},function(t,n,e){var r=e(0),i=e(17).f,o=e(1);r(r.S,"Reflect",{deleteProperty:function(t,n){var e=i(o(t),n);return!(e&&!e.configurable)&&delete t[n]}})},function(t,n,e){"use strict";var r=e(0),i=e(1),o=function(t){this._t=i(t),this._i=0;var n,e=this._k=[];for(n in t)e.push(n)};e(80)(o,"Object",(function(){var t,n=this._k;do{if(this._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,n,e){var r=e(17),i=e(18),o=e(15),u=e(0),c=e(4),a=e(1);u(u.S,"Reflect",{get:function t(n,e){var u,s,f=arguments.length<3?n:arguments[2];return a(n)===f?n[e]:(u=r.f(n,e))?o(u,"value")?u.value:void 0!==u.get?u.get.call(f):void 0:c(s=i(n))?t(s,e,f):void 0}})},function(t,n,e){var r=e(17),i=e(0),o=e(1);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,n){return r.f(o(t),n)}})},function(t,n,e){var r=e(0),i=e(18),o=e(1);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{has:function(t,n){return n in t}})},function(t,n,e){var r=e(0),i=e(1),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,n,e){var r=e(0);r(r.S,"Reflect",{ownKeys:e(125)})},function(t,n,e){var r=e(0),i=e(1),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,n,e){var r=e(8),i=e(17),o=e(18),u=e(15),c=e(0),a=e(33),s=e(1),f=e(4);c(c.S,"Reflect",{set:function t(n,e,c){var l,h,p=arguments.length<4?n:arguments[3],v=i.f(s(n),e);if(!v){if(f(h=o(n)))return t(h,e,c,p);v=a(0)}if(u(v,"value")){if(!1===v.writable||!f(p))return!1;if(l=i.f(p,e)){if(l.get||l.set||!1===l.writable)return!1;l.value=c,r.f(p,e,l)}else r.f(p,e,a(0,c));return!0}return void 0!==v.set&&(v.set.call(p,c),!0)}})},function(t,n,e){var r=e(0),i=e(73);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,n){i.check(t,n);try{return i.set(t,n),!0}catch(t){return!1}}})},function(t,n,e){"use strict";var r=e(0),i=e(54)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),e(32)("includes")},function(t,n,e){"use strict";var r=e(0),i=e(126),o=e(9),u=e(6),c=e(10),a=e(86);r(r.P,"Array",{flatMap:function(t){var n,e,r=o(this);return c(t),n=u(r.length),e=a(r,0),i(e,r,r,n,0,1,t,arguments[1]),e}}),e(32)("flatMap")},function(t,n,e){"use strict";var r=e(0),i=e(126),o=e(9),u=e(6),c=e(22),a=e(86);r(r.P,"Array",{flatten:function(){var t=arguments[0],n=o(this),e=u(n.length),r=a(n,0);return i(r,n,n,e,0,void 0===t?1:c(t)),r}}),e(32)("flatten")},function(t,n,e){"use strict";var r=e(0),i=e(57)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,n,e){"use strict";var r=e(0),i=e(127),o=e(62),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,n,e){"use strict";var r=e(0),i=e(127),o=e(62),u=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*u,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,n,e){"use strict";e(46)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,n,e){"use strict";e(46)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,n,e){"use strict";var r=e(0),i=e(25),o=e(6),u=e(58),c=e(51),a=RegExp.prototype,s=function(t,n){this._r=t,this._s=n};e(80)(s,"RegExp String",(function(){var t=this._r.exec(this._s);return{value:t,done:null===t}})),r(r.P,"String",{matchAll:function(t){if(i(this),!u(t))throw TypeError(t+" is not a regexp!");var n=String(this),e="flags"in a?String(t.flags):c.call(t),r=new RegExp(t.source,~e.indexOf("g")?e:"g"+e);return r.lastIndex=o(t.lastIndex),new s(r,n)}})},function(t,n,e){e(69)("asyncIterator")},function(t,n,e){e(69)("observable")},function(t,n,e){var r=e(0),i=e(125),o=e(16),u=e(17),c=e(84);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var n,e,r=o(t),a=u.f,s=i(r),f={},l=0;s.length>l;)void 0!==(e=a(r,n=s[l++]))&&c(f,n,e);return f}})},function(t,n,e){var r=e(0),i=e(128)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,n,e){var r=e(0),i=e(128)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(10),u=e(8);e(7)&&r(r.P+e(65),"Object",{__defineGetter__:function(t,n){u.f(i(this),t,{get:o(n),enumerable:!0,configurable:!0})}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(10),u=e(8);e(7)&&r(r.P+e(65),"Object",{__defineSetter__:function(t,n){u.f(i(this),t,{set:o(n),enumerable:!0,configurable:!0})}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(24),u=e(18),c=e(17).f;e(7)&&r(r.P+e(65),"Object",{__lookupGetter__:function(t){var n,e=i(this),r=o(t,!0);do{if(n=c(e,r))return n.get}while(e=u(e))}})},function(t,n,e){"use strict";var r=e(0),i=e(9),o=e(24),u=e(18),c=e(17).f;e(7)&&r(r.P+e(65),"Object",{__lookupSetter__:function(t){var n,e=i(this),r=o(t,!0);do{if(n=c(e,r))return n.set}while(e=u(e))}})},function(t,n,e){var r=e(0);r(r.P+r.R,"Map",{toJSON:e(129)("Map")})},function(t,n,e){var r=e(0);r(r.P+r.R,"Set",{toJSON:e(129)("Set")})},function(t,n,e){e(66)("Map")},function(t,n,e){e(66)("Set")},function(t,n,e){e(66)("WeakMap")},function(t,n,e){e(66)("WeakSet")},function(t,n,e){e(67)("Map")},function(t,n,e){e(67)("Set")},function(t,n,e){e(67)("WeakMap")},function(t,n,e){e(67)("WeakSet")},function(t,n,e){var r=e(0);r(r.G,{global:e(2)})},function(t,n,e){var r=e(0);r(r.S,"System",{global:e(2)})},function(t,n,e){var r=e(0),i=e(21);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{clamp:function(t,n,e){return Math.min(e,Math.max(n,t))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,n,e){var r=e(0),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},function(t,n,e){var r=e(0),i=e(131),o=e(110);r(r.S,"Math",{fscale:function(t,n,e,r,u){return o(i(t,n,e,r,u))}})},function(t,n,e){var r=e(0);r(r.S,"Math",{iaddh:function(t,n,e,r){var i=t>>>0,o=e>>>0;return(n>>>0)+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,n,e){var r=e(0);r(r.S,"Math",{isubh:function(t,n,e,r){var i=t>>>0,o=e>>>0;return(n>>>0)-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,n,e){var r=e(0);r(r.S,"Math",{imulh:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r,u=e>>16,c=r>>16,a=(u*o>>>0)+(i*o>>>16);return u*c+(a>>16)+((i*c>>>0)+(65535&a)>>16)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,n,e){var r=e(0),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},function(t,n,e){var r=e(0);r(r.S,"Math",{scale:e(131)})},function(t,n,e){var r=e(0);r(r.S,"Math",{umulh:function(t,n){var e=+t,r=+n,i=65535&e,o=65535&r,u=e>>>16,c=r>>>16,a=(u*o>>>0)+(i*o>>>16);return u*c+(a>>>16)+((i*c>>>0)+(65535&a)>>>16)}})},function(t,n,e){var r=e(0);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,n,e){"use strict";var r=e(0),i=e(19),o=e(2),u=e(52),c=e(118);r(r.P+r.R,"Promise",{finally:function(t){var n=u(this,i.Promise||o.Promise),e="function"==typeof t;return this.then(e?function(e){return c(n,t()).then((function(){return e}))}:t,e?function(e){return c(n,t()).then((function(){throw e}))}:t)}})},function(t,n,e){"use strict";var r=e(0),i=e(93),o=e(117);r(r.S,"Promise",{try:function(t){var n=i.f(this),e=o(t);return(e.e?n.reject:n.resolve)(e.v),n.promise}})},function(t,n,e){var r=e(29),i=e(1),o=r.key,u=r.set;r.exp({defineMetadata:function(t,n,e,r){u(t,n,i(e),o(r))}})},function(t,n,e){var r=e(29),i=e(1),o=r.key,u=r.map,c=r.store;r.exp({deleteMetadata:function(t,n){var e=arguments.length<3?void 0:o(arguments[2]),r=u(i(n),e,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var a=c.get(n);return a.delete(e),!!a.size||c.delete(n)}})},function(t,n,e){var r=e(29),i=e(1),o=e(18),u=r.has,c=r.get,a=r.key,s=function(t,n,e){if(u(t,n,e))return c(t,n,e);var r=o(n);return null!==r?s(t,r,e):void 0};r.exp({getMetadata:function(t,n){return s(t,i(n),arguments.length<3?void 0:a(arguments[2]))}})},function(t,n,e){var r=e(121),i=e(130),o=e(29),u=e(1),c=e(18),a=o.keys,s=o.key,f=function(t,n){var e=a(t,n),o=c(t);if(null===o)return e;var u=f(o,n);return u.length?e.length?i(new r(e.concat(u))):u:e};o.exp({getMetadataKeys:function(t){return f(u(t),arguments.length<2?void 0:s(arguments[1]))}})},function(t,n,e){var r=e(29),i=e(1),o=r.get,u=r.key;r.exp({getOwnMetadata:function(t,n){return o(t,i(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,e){var r=e(29),i=e(1),o=r.keys,u=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:u(arguments[1]))}})},function(t,n,e){var r=e(29),i=e(1),o=e(18),u=r.has,c=r.key,a=function(t,n,e){if(u(t,n,e))return!0;var r=o(n);return null!==r&&a(t,r,e)};r.exp({hasMetadata:function(t,n){return a(t,i(n),arguments.length<3?void 0:c(arguments[2]))}})},function(t,n,e){var r=e(29),i=e(1),o=r.has,u=r.key;r.exp({hasOwnMetadata:function(t,n){return o(t,i(n),arguments.length<3?void 0:u(arguments[2]))}})},function(t,n,e){var r=e(29),i=e(1),o=e(10),u=r.key,c=r.set;r.exp({metadata:function(t,n){return function(e,r){c(t,n,(void 0!==r?i:o)(e),u(r))}}})},function(t,n,e){var r=e(0),i=e(92)(),o=e(2).process,u="process"==e(21)(o);r(r.G,{asap:function(t){var n=u&&o.domain;i(n?n.bind(t):t)}})},function(t,n,e){"use strict";var r=e(0),i=e(2),o=e(19),u=e(92)(),c=e(5)("observable"),a=e(10),s=e(1),f=e(40),l=e(42),h=e(11),p=e(41),v=p.RETURN,d=function(t){return null==t?void 0:a(t)},g=function(t){var n=t._c;n&&(t._c=void 0,n())},y=function(t){return void 0===t._o},m=function(t){y(t)||(t._o=void 0,g(t))},b=function(t,n){s(t),this._c=void 0,this._o=t,t=new _(this);try{var e=n(t),r=e;null!=e&&("function"==typeof e.unsubscribe?e=function(){r.unsubscribe()}:a(e),this._c=e)}catch(n){return void t.error(n)}y(this)&&g(this)};b.prototype=l({},{unsubscribe:function(){m(this)}});var _=function(t){this._s=t};_.prototype=l({},{next:function(t){var n=this._s;if(!y(n)){var e=n._o;try{var r=d(e.next);if(r)return r.call(e,t)}catch(t){try{m(n)}finally{throw t}}}},error:function(t){var n=this._s;if(y(n))throw t;var e=n._o;n._o=void 0;try{var r=d(e.error);if(!r)throw t;t=r.call(e,t)}catch(t){try{g(n)}finally{throw t}}return g(n),t},complete:function(t){var n=this._s;if(!y(n)){var e=n._o;n._o=void 0;try{var r=d(e.complete);t=r?r.call(e,t):void 0}catch(t){try{g(n)}finally{throw t}}return g(n),t}}});var x=function(t){f(this,x,"Observable","_f")._f=a(t)};l(x.prototype,{subscribe:function(t){return new b(t,this._f)},forEach:function(t){var n=this;return new(o.Promise||i.Promise)((function(e,r){a(t);var i=n.subscribe({next:function(n){try{return t(n)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e})}))}}),l(x,{from:function(t){var n="function"==typeof this?this:x,e=d(s(t)[c]);if(e){var r=s(e.call(t));return r.constructor===n?r:new n((function(t){return r.subscribe(t)}))}return new n((function(n){var e=!1;return u((function(){if(!e){try{if(p(t,!1,(function(t){if(n.next(t),e)return v}))===v)return}catch(t){if(e)throw t;return void n.error(t)}n.complete()}})),function(){e=!0}}))},of:function(){for(var t=0,n=arguments.length,e=new Array(n);t<n;)e[t]=arguments[t++];return new("function"==typeof this?this:x)((function(t){var n=!1;return u((function(){if(!n){for(var r=0;r<e.length;++r)if(t.next(e[r]),n)return;t.complete()}})),function(){n=!0}}))}}),h(x.prototype,c,(function(){return this})),r(r.G,{Observable:x}),e(39)("Observable")},function(t,n,e){var r=e(2),i=e(0),o=e(62),u=[].slice,c=/MSIE .\./.test(o),a=function(t){return function(n,e){var r=arguments.length>2,i=!!r&&u.call(arguments,2);return t(r?function(){("function"==typeof n?n:Function(n)).apply(this,i)}:n,e)}};i(i.G+i.B+i.F*c,{setTimeout:a(r.setTimeout),setInterval:a(r.setInterval)})},function(t,n,e){var r=e(0),i=e(91);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,n,e){for(var r=e(88),i=e(35),o=e(12),u=e(2),c=e(11),a=e(47),s=e(5),f=s("iterator"),l=s("toStringTag"),h=a.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=i(p),d=0;d<v.length;d++){var g,y=v[d],m=p[y],b=u[y],_=b&&b.prototype;if(_&&(_[f]||c(_,f,h),_[l]||c(_,l,y),a[y]=h,m))for(g in r)_[g]||o(_,g,r[g],!0)}},function(t,n,e){(function(n){!function(n){"use strict";var e=Object.prototype,r=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",a="object"==typeof t,s=n.regeneratorRuntime;if(s)a&&(t.exports=s);else{(s=n.regeneratorRuntime=a?t.exports:{}).wrap=d;var f={},l={};l[o]=function(){return this};var h=Object.getPrototypeOf,p=h&&h(h(O([])));p&&p!==e&&r.call(p,o)&&(l=p);var v=b.prototype=y.prototype=Object.create(l);m.prototype=v.constructor=b,b.constructor=m,b[c]=m.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===m||"GeneratorFunction"===(n.displayName||n.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(v),t},s.awrap=function(t){return{__await:t}},_(x.prototype),x.prototype[u]=function(){return this},s.AsyncIterator=x,s.async=function(t,n,e,r){var i=new x(d(t,n,e,r));return s.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(v),v[c]="Generator",v[o]=function(){return this},v.toString=function(){return"[object Generator]"},s.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},s.values=O,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function e(e,r){return u.type="throw",u.arg=t,n.next=e,r&&(n.method="next",n.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],u=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),a=r.call(o,"finallyLoc");if(c&&a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=t,u.arg=n,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(u)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),f},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),E(e),f}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var i=r.arg;E(e)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,e){return this.delegate={iterator:O(t),resultName:n,nextLoc:e},"next"===this.method&&(this.arg=void 0),f}}}function d(t,n,e,r){var i=n&&n.prototype instanceof y?n:y,o=Object.create(i.prototype),u=new k(r||[]);return o._invoke=function(t,n,e){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return M()}for(e.method=i,e.arg=o;;){var u=e.delegate;if(u){var c=w(u,e);if(c){if(c===f)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===r)throw r="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r="executing";var a=g(t,n,e);if("normal"===a.type){if(r=e.done?"completed":"suspendedYield",a.arg===f)continue;return{value:a.arg,done:e.done}}"throw"===a.type&&(r="completed",e.method="throw",e.arg=a.arg)}}}(t,e,u),o}function g(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}function y(){}function m(){}function b(){}function _(t){["next","throw","return"].forEach((function(n){t[n]=function(t){return this._invoke(n,t)}}))}function x(t){function e(n,i,o,u){var c=g(t[n],t,i);if("throw"!==c.type){var a=c.arg,s=a.value;return s&&"object"==typeof s&&r.call(s,"__await")?Promise.resolve(s.__await).then((function(t){e("next",t,o,u)}),(function(t){e("throw",t,o,u)})):Promise.resolve(s).then((function(t){a.value=t,o(a)}),u)}u(c.arg)}var i;"object"==typeof n.process&&n.process.domain&&(e=n.process.domain.bind(e)),this._invoke=function(t,n){function r(){return new Promise((function(r,i){e(t,n,r,i)}))}return i=i?i.then(r,r):r()}}function w(t,n){var e=t.iterator[n.method];if(void 0===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=void 0,w(t,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=g(e,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;var i=r.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function S(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function E(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function O(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,i=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n};return i.next=i}}return{next:M}}function M(){return{value:void 0,done:!0}}}("object"==typeof n?n:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,e(95))},function(t,n,e){e(344),t.exports=e(19).RegExp.escape},function(t,n,e){var r=e(0),i=e(345)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},function(t,n){t.exports=function(t,n){var e=n===Object(n)?function(t){return n[t]}:n;return function(n){return String(n).replace(t,e)}}},function(t,n,e){"use strict";var r=p(e(347)),i=p(e(364)),o=p(e(365)),u=p(e(367)),c=h(e(142)),a=h(e(368)),s=h(e(370)),f=h(e(371)),l=e(53);function h(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n.default=t,n}function p(t){return t&&t.__esModule?t:{default:t}}function v(t){return function(){var n=t.apply(this,arguments);return new Promise((function(t,e){return function r(i,o){try{var u=n[i](o),c=u.value}catch(t){return void e(t)}if(!u.done)return Promise.resolve(c).then((function(t){r("next",t)}),(function(t){r("throw",t)}));t(c)}("next")}))}}var d={};window.state=d;var g,y=(g=v(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=c.getInput())){t.next=18;break}return d.search=new r.default(n),c.clearInput(),c.clearResults(),(0,l.renderLoader)(l.elements.searchRes),t.prev=6,t.next=9,d.search.getResults();case 9:(0,l.clearLoader)(),c.renderResults(d.search.result),t.next=18;break;case 13:t.prev=13,t.t0=t.catch(6),console.log(t.t0),t.t0("Something wrong with the error!"),(0,l.clearLoader)();case 18:case"end":return t.stop()}}),t,void 0,[[6,13]])}))),function(){return g.apply(this,arguments)});l.elements.searchForm.addEventListener("submit",(function(t){t.preventDefault(),y()})),l.elements.searchResultPages.addEventListener("click",(function(t){var n=t.target.closest(".btn-inline");if(n){var e=parseInt(n.dataset.goto,10);c.clearResults(),c.renderResults(d.search.result,e)}}));var m,b=(m=v(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=window.location.hash.replace("#",""),console.log(n),!n){t.next=21;break}return a.clearRecipe(),(0,l.renderLoader)(l.elements.recipe),d.search&&c.highlightSelected(n),d.recipe=new i.default(n),t.prev=7,t.next=10,d.recipe.getRecipe();case 10:d.recipe.parseIngredients(),d.recipe.calcTime(),d.recipe.calcServings(),(0,l.clearLoader)(),a.renderRecipe(d.recipe,d.likes.isLiked(n)),t.next=21;break;case 17:t.prev=17,t.t0=t.catch(7),console.log(t.t0),alert("Error processing!");case 21:case"end":return t.stop()}}),t,void 0,[[7,17]])}))),function(){return m.apply(this,arguments)});["hashchange","load"].forEach((function(t){return window.addEventListener(t,b)}));console.log(l.elements.shopping),l.elements.shopping.addEventListener("click",(function(t){var n=t.target.closest(".shopping__item").dataset.itemid;if(t.target.matches(".shopping__delete, .shopping__delete *"))console.log("id"),d.list.deleteItem(n),s.deleteItem(n);else if(t.target.matches(".shopping__count-value")){var e=parseFloat(t.target.value,10);d.list.updateCount(n,e)}}));window.addEventListener("load",(function(){d.likes=new u.default,d.likes.readStorage(),f.toggleLikeMenu(d.likes.getNumLikes()),d.likes.likes.forEach((function(t){return f.renderLike(t)}))})),l.elements.recipe.addEventListener("click",(function(t){t.target.matches(".btn-decrease, .btn-decrease *")?d.recipe.servings>1&&(d.recipe.updateServings("dec"),a.updateSearvingsIngredients(d.recipe)):t.target.matches(".btn-increase, .btn-increase *")?(d.recipe.updateServings("inc"),a.updateSearvingsIngredients(d.recipe)):t.target.matches(".recipe__btn--add, .recipe__btn--add *")?(d.list||(d.list=new o.default),d.recipe.ingredients.forEach((function(t){var n=d.list.addItem(t.count,t.unit,t.ingredient);s.renderItem(n)}))):t.target.matches(".recipe__love, .recipe__love *")&&function(){d.likes||(d.likes=new u.default);var t=d.recipe.id;if(d.likes.isLiked(t))d.likes.deleteLike(t),f.toggleLikeBtn(!1),f.deleteLike(t);else{var n=d.likes.addLike(t,d.recipe.title,d.recipe.author,d.recipe.image);f.toggleLikeBtn(!0),f.renderLike(n)}f.toggleLikeMenu(d.likes.getNumLikes())}()})),window.l=new o.default},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}(),o=e(132),u=(r=o)&&r.__esModule?r:{default:r};var c=function(){function t(n){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.query=n}var n,e;return i(t,[{key:"getResults",value:(n=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,u.default)("https://forkify-api.herokuapp.com/api/search?&q="+this.query);case 3:n=t.sent,this.result=n.data.recipes,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),alert(t.t0);case 10:case"end":return t.stop()}}),t,this,[[0,7]])})),e=function(){var t=n.apply(this,arguments);return new Promise((function(n,e){return function r(i,o){try{var u=t[i](o),c=u.value}catch(t){return void e(t)}if(!u.done)return Promise.resolve(c).then((function(t){r("next",t)}),(function(t){r("throw",t)}));n(c)}("next")}))},function(){return e.apply(this,arguments)})}]),t}();n.default=c},function(t,n,e){"use strict";var r=e(14),i=e(133),o=e(349),u=e(140);function c(t){var n=new o(t),e=i(o.prototype.request,n);return r.extend(e,o.prototype,n),r.extend(e,n),e}var a=c(e(136));a.Axios=o,a.create=function(t){return c(u(a.defaults,t))},a.Cancel=e(141),a.CancelToken=e(362),a.isCancel=e(135),a.all=function(t){return Promise.all(t)},a.spread=e(363),t.exports=a,t.exports.default=a},function(t,n,e){"use strict";var r=e(14),i=e(134),o=e(350),u=e(351),c=e(140);function a(t){this.defaults=t,this.interceptors={request:new o,response:new o}}a.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=c(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=[u,void 0],e=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){n.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){n.push(t.fulfilled,t.rejected)}));n.length;)e=e.then(n.shift(),n.shift());return e},a.prototype.getUri=function(t){return t=c(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){a.prototype[t]=function(n,e){return this.request(r.merge(e||{},{method:t,url:n}))}})),r.forEach(["post","put","patch"],(function(t){a.prototype[t]=function(n,e,i){return this.request(r.merge(i||{},{method:t,url:n,data:e}))}})),t.exports=a},function(t,n,e){"use strict";var r=e(14);function i(){this.handlers=[]}i.prototype.use=function(t,n){return this.handlers.push({fulfilled:t,rejected:n}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(n){null!==n&&t(n)}))},t.exports=i},function(t,n,e){"use strict";var r=e(14),i=e(352),o=e(135),u=e(136);function c(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return c(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(n){delete t.headers[n]})),(t.adapter||u.adapter)(t).then((function(n){return c(t),n.data=i(n.data,n.headers,t.transformResponse),n}),(function(n){return o(n)||(c(t),n&&n.response&&(n.response.data=i(n.response.data,n.response.headers,t.transformResponse))),Promise.reject(n)}))}},function(t,n,e){"use strict";var r=e(14);t.exports=function(t,n,e){return r.forEach(e,(function(e){t=e(t,n)})),t}},function(t,n,e){"use strict";var r=e(14);t.exports=function(t,n){r.forEach(t,(function(e,r){r!==n&&r.toUpperCase()===n.toUpperCase()&&(t[n]=e,delete t[r])}))}},function(t,n,e){"use strict";var r=e(139);t.exports=function(t,n,e){var i=e.config.validateStatus;!i||i(e.status)?t(e):n(r("Request failed with status code "+e.status,e.config,null,e.request,e))}},function(t,n,e){"use strict";t.exports=function(t,n,e,r,i){return t.config=n,e&&(t.code=e),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,n,e){"use strict";var r=e(357),i=e(358);t.exports=function(t,n){return t&&!r(n)?i(t,n):n}},function(t,n,e){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,n,e){"use strict";t.exports=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t}},function(t,n,e){"use strict";var r=e(14),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var n,e,o,u={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),n=r.trim(t.substr(0,o)).toLowerCase(),e=r.trim(t.substr(o+1)),n){if(u[n]&&i.indexOf(n)>=0)return;u[n]="set-cookie"===n?(u[n]?u[n]:[]).concat([e]):u[n]?u[n]+", "+e:e}})),u):u}},function(t,n,e){"use strict";var r=e(14);t.exports=r.isStandardBrowserEnv()?function(){var t,n=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");function i(t){var r=t;return n&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return t=i(window.location.href),function(n){var e=r.isString(n)?i(n):n;return e.protocol===t.protocol&&e.host===t.host}}():function(){return!0}},function(t,n,e){"use strict";var r=e(14);t.exports=r.isStandardBrowserEnv()?{write:function(t,n,e,i,o,u){var c=[];c.push(t+"="+encodeURIComponent(n)),r.isNumber(e)&&c.push("expires="+new Date(e).toGMTString()),r.isString(i)&&c.push("path="+i),r.isString(o)&&c.push("domain="+o),!0===u&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){var n=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,n,e){"use strict";var r=e(141);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var n;this.promise=new Promise((function(t){n=t}));var e=this;t((function(t){e.reason||(e.reason=new r(t),n(e.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(n){t=n})),cancel:t}},t.exports=i},function(t,n,e){"use strict";t.exports=function(t){return function(n){return t.apply(null,n)}}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}(),_axios=__webpack_require__(132),_axios2=_interopRequireDefault(_axios);function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _asyncToGenerator(t){return function(){var n=t.apply(this,arguments);return new Promise((function(t,e){return function r(i,o){try{var u=n[i](o),c=u.value}catch(t){return void e(t)}if(!u.done)return Promise.resolve(c).then((function(t){r("next",t)}),(function(t){r("throw",t)}));t(c)}("next")}))}}function _classCallCheck(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}var Recipe=function(){function Recipe(t){_classCallCheck(this,Recipe),this.id=t}var _ref;return _createClass(Recipe,[{key:"getRecipe",value:(_ref=_asyncToGenerator(regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,_axios2.default)("https://forkify-api.herokuapp.com/api/get?rId="+this.id);case 3:n=t.sent,this.title=n.data.recipe.title,this.author=n.data.recipe.publisher,this.image=n.data.recipe.image_url,this.url=n.data.recipe.source_url,this.ingredients=n.data.recipe.ingredients,t.next=15;break;case 11:t.prev=11,t.t0=t.catch(0),console.log(t.t0),alert("Somethin went wrong :(");case 15:case"end":return t.stop()}}),t,this,[[0,11]])}))),function(){return _ref.apply(this,arguments)})},{key:"calcTime",value:function(){var t=this.ingredients.length,n=Math.ceil(t/3);this.time=15*n}},{key:"calcServings",value:function(){this.servings=4}},{key:"parseIngredients",value:function parseIngredients(){var unitsLong=["tablespoons","tablespoon","ounces","ounce","teaspoons","teaspoon","cups","pounds"],unitsShort=["tbsp","tbsp","oz","oz","tsp","tsp","cup","pound"],units=[unitsShort,"kg","g"];console.log("ffggg",units);var newIngredients=this.ingredients.map((function(el){var ingredient=el.toLowerCase();unitsLong.forEach((function(t,n){ingredient=ingredient.replace(t,unitsShort[n])})),ingredient=ingredient.replace(/ *\([^)]*\) */g," ");var arrIng=ingredient.split(" "),unitIndex=arrIng.findIndex((function(t){return units.includes(t)})),objIng=void 0;if(unitIndex>-1){var arrCount=arrIng.slice(0,unitIndex),count=void 0;count=1===arrCount.length?eval(arrIng[0].replace("-","+")):eval(arrIng.slice(0,unitIndex).join("+")),objIng={count:count,unit:arrIng[unitIndex],ingredient:arrIng.slice(unitIndex+1).join(" ")}}else parseInt(arrIng[0],10)?objIng={count:parseInt(arrIng[0],10),unit:"",ingredient:arrIng.slice(1).join(" ")}:-1===unitIndex&&(objIng={count:1,unit:"",ingredient:ingredient});return objIng}));this.ingredients=newIngredients}},{key:"updateServings",value:function(t){var n=this,e="dec"===t?this.servings-1:this.servings+1;this.ingredients.forEach((function(t){t.count*=e/n.servings})),this.servings=e}}]),Recipe}();exports.default=Recipe},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,i=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}(),o=e(366),u=(r=o)&&r.__esModule?r:{default:r};var c=function(){function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.items=[]}return i(t,[{key:"addItem",value:function(t,n,e){var r={id:(0,u.default)(),count:t,unit:n,ingredient:e};return this.items.push(r),r}},{key:"deleteItem",value:function(t){var n=this.items.findIndex((function(n){return n.id===t}));this.items.splice(n,1)}},{key:"updateCount",value:function(t,n){this.items.find((function(n){return n.id===t})).count=n}}]),t}();n.default=c},function(t,n,e){(function(n){var e=n&&n.pid?n.pid.toString(36):"";function r(){var t=Date.now(),n=r.last||t;return r.last=t>n?t:n+1}t.exports=t.exports.default=function(t,n){return(t||"")+""+e+r().toString(36)+(n||"")},t.exports.process=function(t,n){return(t||"")+e+r().toString(36)+(n||"")},t.exports.time=function(t,n){return(t||"")+r().toString(36)+(n||"")}}).call(this,e(137))},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}();var i=function(){function t(){!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.likes=[]}return r(t,[{key:"addLike",value:function(t,n,e,r){var i={id:t,title:n,author:e,img:r};return this.likes.push(i),this.persistData(),i}},{key:"deleteLike",value:function(t){var n=this.likes.findIndex((function(n){return n.id===t}));this.likes.splice(n,1),this.persistData()}},{key:"isLiked",value:function(t){return-1!==this.likes.findIndex((function(n){return n.id===t}))}},{key:"getNumLikes",value:function(){return this.likes.length}},{key:"persistData",value:function(){localStorage.setItem("likes",JSON.stringify(this.likes))}},{key:"readStorage",value:function(){var t=JSON.parse(localStorage.getItem("likes"));t&&(this.likes=t)}}]),t}();n.default=i},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.updateSearvingsIngredients=n.renderRecipe=n.clearRecipe=void 0;var r=function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var e=[],r=!0,i=!1,o=void 0;try{for(var u,c=t[Symbol.iterator]();!(r=(u=c.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw o}}return e}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=e(53),o=e(369),u=(n.clearRecipe=function(){i.elements.recipe.innerHTML=""},function(t){if(t){var n=t.toString().split(".").map((function(t){return parseInt(t,10)})),e=r(n,2),i=e[0];if(!e[1])return t;if(0===i){var u=new o.Fraction(t);return u.numerator+"/"+u.denominator}var c=new o.Fraction(t-i);return i+" "+c.numerator+"/"+c.denominator}return"?"}),c=function(t){return'\n <li class="recipe__item">\n <svg class="recipe__icon">\n <use href="img/icons.svg#icon-check"></use>\n </svg>\n <div class="recipe__count">'+u(t.count)+'</div>\n <div class="recipe__ingredient">\n <span class="recipe__unit">'+t.unit+"</span>\n "+t.ingredient+"\n\n </div>\n </li>\n"};n.renderRecipe=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];console.log(t);var e='\n <figure class="recipe__fig">\n <img src="'+t.image+'" alt="'+t.title+'" class="recipe__img">\n <h1 class="recipe__title">\n <span>'+t.title+'</span>\n </h1>\n </figure>\n\n <div class="recipe__details">\n\n <div class="recipe__info">\n <svg class="recipe__info-icon">\n <use href="img/icons.svg#icon-stopwatch"></use>\n </svg>\n <span class="recipe__info-data recipe__info-data--minutes">'+t.time+'</span>\n <span class="recipe__info-text"> minutes</span>\n </div>\n\n <div class="recipe__info">\n <svg class="recipe__info-icon">\n <use href="img/icons.svg#icon-man"></use>\n </svg>\n <span class="recipe__info-data recipe__info-data--people">'+t.servings+'</span>\n <span class="recipe__info-text"> servings</span>\n <div class="recipe__info-buttons">\n <button class="btn-tiny btn-decrease">\n <svg>\n <use href="img/icons.svg#icon-circle-with-minus"></use>\n </svg>\n </button>\n <button class="btn-tiny btn-increase">\n <svg>\n <use href="img/icons.svg#icon-circle-with-plus"></use>\n </svg>\n </button>\n </div>\n </div>\n \n <button class="recipe__love">\n <svg class="header__likes">\n <use href="img/icons.svg#icon-heart'+(n?"":"-outlined")+'"></use>\n </svg>\n </button>\n\n </div>\n\n <div class="recipe__ingredients">\n <ul class="recipe__ingredient-list">\n '+t.ingredients.map((function(t){return c(t)})).join("")+'\n </ul>\n\n <button class="btn-small recipe__btn recipe__btn--add">\n <svg class="search__icon">\n <use href="img/icons.svg#icon-shopping-cart"></use>\n </svg>\n <span>Add to shopping list</span>\n </button>\n </div>\n\n <div class="recipe__directions">\n <h2 class="heading-2">How to cook it</h2>\n <p class="recipe__directions-text">\n This recipe was carefully designed and tested by\n <span class="recipe__by">'+t.author+'</span>. Please check out directions at their website.\n </p>\n <a class="btn-small recipe__btn" href="'+t.url+'" target="_blank">\n <span>Directions</span>\n <svg class="search__icon">\n <use href="img/icons.svg#icon-triangle-right"></use>\n </svg>\n </a>\n </div>\n ';i.elements.recipe.insertAdjacentHTML("afterbegin",e)},n.updateSearvingsIngredients=function(t){document.querySelector(".recipe__info-data--people").textContent=t.servings,Array.from(document.querySelectorAll(".recipe__count")).forEach((function(n,e){n.textContent=u(t.ingredients[e].count)}))}},function(t,n){var e,r;Fraction=function(t,n){if(void 0!==t&&n)"number"==typeof t&&"number"==typeof n?(this.numerator=t,this.denominator=n):"string"==typeof t&&"string"==typeof n&&(this.numerator=parseInt(t),this.denominator=parseInt(n));else if(void 0===n)if(num=t,"number"==typeof num)this.numerator=num,this.denominator=1;else if("string"==typeof num){var e,r,i=num.split(" ");if(i[0]&&(e=i[0]),i[1]&&(r=i[1]),e%1==0&&r&&r.match("/"))return new Fraction(e).add(new Fraction(r));if(!e||r)return;if("string"==typeof e&&e.match("/")){var o=e.split("/");this.numerator=o[0],this.denominator=o[1]}else{if("string"==typeof e&&e.match("."))return new Fraction(parseFloat(e));this.numerator=parseInt(e),this.denominator=1}}this.normalize()},Fraction.prototype.clone=function(){return new Fraction(this.numerator,this.denominator)},Fraction.prototype.toString=function(){if("NaN"===this.denominator)return"NaN";var t=this.numerator/this.denominator>0?Math.floor(this.numerator/this.denominator):Math.ceil(this.numerator/this.denominator),n=this.numerator%this.denominator,e=this.denominator,r=[];return 0!=t&&r.push(t),0!=n&&r.push((0===t?n:Math.abs(n))+"/"+e),r.length>0?r.join(" "):0},Fraction.prototype.rescale=function(t){return this.numerator*=t,this.denominator*=t,this},Fraction.prototype.add=function(t){var n=this.clone();return t=t instanceof Fraction?t.clone():new Fraction(t),td=n.denominator,n.rescale(t.denominator),t.rescale(td),n.numerator+=t.numerator,n.normalize()},Fraction.prototype.subtract=function(t){var n=this.clone();return t=t instanceof Fraction?t.clone():new Fraction(t),td=n.denominator,n.rescale(t.denominator),t.rescale(td),n.numerator-=t.numerator,n.normalize()},Fraction.prototype.multiply=function(t){var n=this.clone();if(t instanceof Fraction)n.numerator*=t.numerator,n.denominator*=t.denominator;else{if("number"!=typeof t)return n.multiply(new Fraction(t));n.numerator*=t}return n.normalize()},Fraction.prototype.divide=function(t){var n=this.clone();if(t instanceof Fraction)n.numerator*=t.denominator,n.denominator*=t.numerator;else{if("number"!=typeof t)return n.divide(new Fraction(t));n.denominator*=t}return n.normalize()},Fraction.prototype.equals=function(t){t instanceof Fraction||(t=new Fraction(t));var n=this.clone().normalize();t=t.clone().normalize();return n.numerator===t.numerator&&n.denominator===t.denominator},Fraction.prototype.normalize=(e=function(t){return"number"==typeof t&&(t>0&&t%1>0&&t%1<1||t<0&&t%-1<0&&t%-1>-1)},r=function(t,n){if(n){var e=Math.pow(10,n);return Math.round(t*e)/e}return Math.round(t)},function(){if(e(this.denominator)){var t=r(this.denominator,9),n=Math.pow(10,t.toString().split(".")[1].length);this.denominator=Math.round(this.denominator*n),this.numerator*=n}e(this.numerator)&&(t=r(this.numerator,9),n=Math.pow(10,t.toString().split(".")[1].length),this.numerator=Math.round(this.numerator*n),this.denominator*=n);var i=Fraction.gcf(this.numerator,this.denominator);return this.numerator/=i,this.denominator/=i,(this.numerator<0&&this.denominator<0||this.numerator>0&&this.denominator<0)&&(this.numerator*=-1,this.denominator*=-1),this}),Fraction.gcf=function(t,n){var e=[],r=Fraction.primeFactors(t),i=Fraction.primeFactors(n);return r.forEach((function(t){var n=i.indexOf(t);n>=0&&(e.push(t),i.splice(n,1))})),0===e.length?1:function(){var t,n=e[0];for(t=1;t<e.length;t++)n*=e[t];return n}()},Fraction.primeFactors=function(t){for(var n=Math.abs(t),e=[],r=2;r*r<=n;)n%r==0?(e.push(r),n/=r):r++;return 1!=n&&e.push(n),e},t.exports.Fraction=Fraction},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deleteItem=n.renderItem=void 0;var r=e(53);n.renderItem=function(t){var n='\n <li class="shopping__item" data-itemid='+t.id+'>\n <div class="shopping__count">\n <input type="number" value="'+t.count+'" step="'+t.count+'" class ="shopping__count-value"/>\n <p>'+t.unit+'</p>\n </div>\n <p class="shopping__description">'+t.ingredient+'</p>\n <button class="shopping__delete btn-tiny">\n <svg>\n <use href="img/icons.svg#icon-circle-with-cross"></use>\n </svg>\n </button>\n </li>\n ';r.elements.shopping.insertAdjacentHTML("beforeend",n)},n.deleteItem=function(t){var n=document.querySelector('[data-itemid="'+t+'"]');n&&n.parentElement.removeChild(n)}},function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deleteLike=n.renderLike=n.toggleLikeMenu=n.toggleLikeBtn=void 0;var r=e(53),i=e(142);n.toggleLikeBtn=function(t){var n=t?"icon-heart":"icon-heart-outlined";document.querySelector(".recipe__love use").setAttribute("href","img/icons.svg#"+n)},n.toggleLikeMenu=function(t){r.elements.likesMenu.style.visibility=t>0?"visible":"hidden"},n.renderLike=function(t){var n='\n <li>\n <a class="likes__link" href="#'+t.id+'">\n <figure class="likes__fig">\n <img src="'+t.img+'" alt="'+t.title+'" />\n </figure>\n <div class="likes__data">\n <h4 class="likes__name">'+(0,i.limitRecipeTitle)(t.title)+'</h4>\n <p class="likes__author">'+t.author+"</p>\n </div>\n </a>\n </li> \n ";r.elements.likesList.insertAdjacentHTML("beforeend",n)},n.deleteLike=function(t){var n=document.querySelector('.likes__link[href*="'+t+'"]').parentElement;n&&n.parentElement.removeChild(n)}}]);
|
!function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=1092)}({0:function(t,e,i){"use strict";function o(t,e,i,o,n,r,u,a,l,s){var c,d="function"==typeof t?t.options:t;if(l){d.components||(d.components={});var f=Object.prototype.hasOwnProperty;for(var p in l)f.call(l,p)&&!f.call(d.components,p)&&(d.components[p]=l[p])}if(s&&((s.beforeCreate||(s.beforeCreate=[])).unshift((function(){this[s.__module]=this})),(d.mixins||(d.mixins=[])).push(s)),e&&(d.render=e,d.staticRenderFns=i,d._compiled=!0),o&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),u?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(u)},d._ssrRegister=c):n&&(c=a?function(){n.call(this,this.$root.$options.shadowRoot)}:n),c)if(d.functional){d._injectStyles=c;var h=d.render;d.render=function(t,e){return c.call(e),h(t,e)}}else{var g=d.beforeCreate;d.beforeCreate=g?[].concat(g,c):[c]}return{exports:t,options:d}}i.d(e,"a",(function(){return o}))},1:function(t,e){t.exports={"u-line-1":{lines:1,textOverflow:"ellipsis",overflow:"hidden"},"u-line-2":{lines:2,textOverflow:"ellipsis",overflow:"hidden"},"u-line-3":{lines:3,textOverflow:"ellipsis",overflow:"hidden"},"u-line-4":{lines:4,textOverflow:"ellipsis",overflow:"hidden"},"u-line-5":{lines:5,textOverflow:"ellipsis",overflow:"hidden"},"u-border":{borderWidth:"0.5",borderColor:"#dadbde",borderStyle:"solid"},"u-border-top":{borderTopWidth:"0.5",borderColor:"#dadbde",borderTopStyle:"solid"},"u-border-left":{borderLeftWidth:"0.5",borderColor:"#dadbde",borderLeftStyle:"solid"},"u-border-right":{borderRightWidth:"0.5",borderColor:"#dadbde",borderRightStyle:"solid"},"u-border-bottom":{borderBottomWidth:"0.5",borderColor:"#dadbde",borderBottomStyle:"solid"},"u-border-top-bottom":{borderTopWidth:"0.5",borderBottomWidth:"0.5",borderColor:"#dadbde",borderTopStyle:"solid",borderBottomStyle:"solid"},"u-reset-button":{paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0},"u-hover-class":{opacity:.7},"u-primary-light":{color:"#ecf5ff"},"u-warning-light":{color:"#fdf6ec"},"u-success-light":{color:"#f5fff0"},"u-error-light":{color:"#fef0f0"},"u-info-light":{color:"#f4f4f5"},"u-primary-light-bg":{backgroundColor:"#ecf5ff"},"u-warning-light-bg":{backgroundColor:"#fdf6ec"},"u-success-light-bg":{backgroundColor:"#f5fff0"},"u-error-light-bg":{backgroundColor:"#fef0f0"},"u-info-light-bg":{backgroundColor:"#f4f4f5"},"u-primary-dark":{color:"#398ade"},"u-warning-dark":{color:"#f1a532"},"u-success-dark":{color:"#53c21d"},"u-error-dark":{color:"#e45656"},"u-info-dark":{color:"#767a82"},"u-primary-dark-bg":{backgroundColor:"#398ade"},"u-warning-dark-bg":{backgroundColor:"#f1a532"},"u-success-dark-bg":{backgroundColor:"#53c21d"},"u-error-dark-bg":{backgroundColor:"#e45656"},"u-info-dark-bg":{backgroundColor:"#767a82"},"u-primary-disabled":{color:"#9acafc"},"u-warning-disabled":{color:"#f9d39b"},"u-success-disabled":{color:"#a9e08f"},"u-error-disabled":{color:"#f7b2b2"},"u-info-disabled":{color:"#c4c6c9"},"u-primary":{color:"#3c9cff"},"u-warning":{color:"#f9ae3d"},"u-success":{color:"#5ac725"},"u-error":{color:"#f56c6c"},"u-info":{color:"#909399"},"u-primary-bg":{backgroundColor:"#3c9cff"},"u-warning-bg":{backgroundColor:"#f9ae3d"},"u-success-bg":{backgroundColor:"#5ac725"},"u-error-bg":{backgroundColor:"#f56c6c"},"u-info-bg":{backgroundColor:"#909399"},"u-main-color":{color:"#303133"},"u-content-color":{color:"#606266"},"u-tips-color":{color:"#909193"},"u-light-color":{color:"#c0c4cc"},"u-block":{paddingTop:"14",paddingRight:"14",paddingBottom:"14",paddingLeft:"14"},"u-block__section":{marginBottom:"10"},"u-block__title":{marginTop:"10",fontSize:"15",color:"#606266",marginBottom:"10"},"u-cell-icon":{width:"36rpx",height:"36rpx",marginRight:"8rpx"},"u-page":{paddingTop:"15",paddingRight:"15",paddingBottom:"40",paddingLeft:"15"},"u-demo-block":{flex:1,marginBottom:"23"},"u-demo-block__content":{flexDirection:"column"},"u-demo-block__title":{fontSize:"14",color:"#8f9ca2",marginBottom:"8",flexDirection:"row"},"@VERSION":2}},100:function(t,e,i){"use strict";i.r(e);var o=i(63),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},101:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{type:{type:String,default:uni.$u.props.text.type},show:{type:Boolean,default:uni.$u.props.text.show},text:{type:[String,Number],default:uni.$u.props.text.text},prefixIcon:{type:String,default:uni.$u.props.text.prefixIcon},suffixIcon:{type:String,default:uni.$u.props.text.suffixIcon},mode:{type:String,default:uni.$u.props.text.mode},href:{type:String,default:uni.$u.props.text.href},format:{type:[String,Function],default:uni.$u.props.text.format},call:{type:Boolean,default:uni.$u.props.text.call},openType:{type:String,default:uni.$u.props.text.openType},bold:{type:Boolean,default:uni.$u.props.text.bold},block:{type:Boolean,default:uni.$u.props.text.block},lines:{type:[String,Number],default:uni.$u.props.text.lines},color:{type:String,default:uni.$u.props.text.color},size:{type:[String,Number],default:uni.$u.props.text.size},iconStyle:{type:[Object,String],default:uni.$u.props.text.iconStyle},decoration:{tepe:String,default:uni.$u.props.text.decoration},margin:{type:[Object,String,Number],default:uni.$u.props.text.margin},lineHeight:{type:[String,Number],default:uni.$u.props.text.lineHeight},align:{type:String,default:uni.$u.props.text.align},wordWrap:{type:String,default:uni.$u.props.text.wordWrap}}};e.default=o},102:function(t,e,i){"use strict";i.r(e);var o=i(72),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},1092:function(t,e,i){"use strict";i.r(e);i(8);var o=i(340);"undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(t){var e=this.constructor;return this.then((function(i){return e.resolve(t()).then((function(){return i}))}),(function(i){return e.resolve(t()).then((function(){throw i}))}))}),o.default.mpType="page",o.default.route="pages/componentsC/skeleton/skeleton",o.default.el="#root",new Vue(o.default)},1093:function(t,e,i){"use strict";i.r(e);var o=i(788),n=i(653);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var u=i(0);var a=Object(u.a)(n.default,o.b,o.c,!1,null,"161f9e59","7753642c",!1,o.a,void 0);(function(t){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(i(930).default,this.options.style):Object.assign(this.options.style,i(930).default)}).call(a),e.default=a.exports},1094:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{loading:{type:Boolean,default:uni.$u.props.skeleton.loading},animate:{type:Boolean,default:uni.$u.props.skeleton.animate},rows:{type:[String,Number],default:uni.$u.props.skeleton.rows},rowsWidth:{type:[String,Number,Array],default:uni.$u.props.skeleton.rowsWidth},rowsHeight:{type:[String,Number,Array],default:uni.$u.props.skeleton.rowsHeight},title:{type:Boolean,default:uni.$u.props.skeleton.title},titleWidth:{type:[String,Number],default:uni.$u.props.skeleton.titleWidth},titleHeight:{type:[String,Number],default:uni.$u.props.skeleton.titleHeight},avatar:{type:Boolean,default:uni.$u.props.skeleton.avatar},avatarSize:{type:[String,Number],default:uni.$u.props.skeleton.avatarSize},avatarShape:{type:String,default:uni.$u.props.skeleton.avatarShape}}};e.default=o},114:function(t,e,i){"use strict";i.r(e);var o=i(76),n=i(68);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var u=i(0),a=Object(u.a)(n.default,o.b,o.c,!1,null,null,"0b47f918",!1,o.a,void 0);e.default=a.exports},115:function(t,e,i){"use strict";i.r(e);var o=i(65),n=i(61);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var u=i(0);var a=Object(u.a)(n.default,o.b,o.c,!1,null,"0f0cb6d2","41b0230c",!1,o.a,void 0);(function(t){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(i(100).default,this.options.style):Object.assign(this.options.style,i(100).default)}).call(a),e.default=a.exports},116:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{color:{type:String,default:uni.$u.props.link.color},fontSize:{type:[String,Number],default:uni.$u.props.link.fontSize},underLine:{type:Boolean,default:uni.$u.props.link.underLine},href:{type:String,default:uni.$u.props.link.href},mpTips:{type:String,default:uni.$u.props.link.mpTips},lineColor:{type:String,default:uni.$u.props.link.lineColor},text:{type:String,default:uni.$u.props.link.text}}};e.default=o},117:function(t,e,i){"use strict";i.r(e);var o=i(77),n=i(70);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var u=i(0);var a=Object(u.a)(n.default,o.b,o.c,!1,null,"2f1fcf04","c71db8a8",!1,o.a,void 0);(function(t){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(i(102).default,this.options.style):Object.assign(this.options.style,i(102).default)}).call(a),e.default=a.exports},118:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={computed:{value:function(){var t=this.text,e=this.mode,i=this.format,o=this.href;return"price"===e?(/^\d+(\.\d+)?$/.test(t)||uni.$u.error("\u91d1\u989d\u6a21\u5f0f\u4e0b\uff0ctext\u53c2\u6570\u9700\u8981\u4e3a\u91d1\u989d\u683c\u5f0f"),uni.$u.test.func(i)?i(t):uni.$u.priceFormat(t,2)):"date"===e?(!uni.$u.test.date(t)&&uni.$u.error("\u65e5\u671f\u6a21\u5f0f\u4e0b\uff0ctext\u53c2\u6570\u9700\u8981\u4e3a\u65e5\u671f\u6216\u65f6\u95f4\u6233\u683c\u5f0f"),uni.$u.test.func(i)?i(t):this.formart?uni.$u.timeFormat(t,i):uni.$u.timeFormat(t,"yyyy-mm-dd")):"phone"===e?(!uni.$u.test.mobile(t)&&uni.$u.error("\u624b\u673a\u53f7\u6a21\u5f0f\u4e0b\uff0ctext\u53c2\u6570\u9700\u8981\u4e3a\u624b\u673a\u53f7\u7801\u683c\u5f0f"),uni.$u.test.func(i)?i(t):"encrypt"===i?"".concat(t.substr(0,3),"****").concat(t.substr(7)):t):"name"===e?("string"!=typeof t&&uni.$u.error("\u59d3\u540d\u6a21\u5f0f\u4e0b\uff0ctext\u53c2\u6570\u9700\u8981\u4e3a\u5b57\u7b26\u4e32\u683c\u5f0f"),uni.$u.test.func(i)?i(t):"encrypt"===i?this.formatName(t):t):"link"===e?(!uni.$u.test.url(o)&&uni.$u.error("\u8d85\u94fe\u63a5\u6a21\u5f0f\u4e0b\uff0chref\u53c2\u6570\u9700\u8981\u4e3aURL\u683c\u5f0f"),t):t}},methods:{formatName:function(t){var e="";if(2===t.length)e=t.substr(0,1)+"*";else if(t.length>2){for(var i="",o=0,n=t.length-2;o<n;o++)i+="*";e=t.substr(0,1)+i+t.substr(-1,1)}else e=t;return e}}};e.default=o},17:function(t,e,i){"use strict";i.r(e);var o=i(18),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},177:function(t,e,i){"use strict";i.r(e);var o=i(178),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},178:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,n=(o=i(809))&&o.__esModule?o:{default:o};var r={name:"u-switch",mixins:[uni.$u.mpMixin,uni.$u.mixin,n.default],watch:{value:{immediate:!0,handler:function(t){t!==this.inactiveValue&&t!==this.activeValue&&uni.$u.error("v-mode\u7ed1\u5b9a\u7684\u503c\u5fc5\u987b\u4e3ainactiveValue\u3001activeValue\u4e8c\u8005\u4e4b\u4e00")}}},data:function(){return{bgColor:"#ffffff"}},computed:{switchStyle:function(){var t={};return t.width=uni.$u.addUnit(2*this.size+2),t.height=uni.$u.addUnit(Number(this.size)+2),this.customInactiveColor&&(t.borderColor="rgba(0, 0, 0, 0)"),t.backgroundColor=this.value===this.activeValue?this.activeColor:this.inactiveColor,t},nodeStyle:function(){var t={};return t.width=uni.$u.addUnit(this.size-this.space),t.height=uni.$u.addUnit(this.size-this.space),t.transform="translateX(".concat(this.value===this.activeValue?-this.space:-this.size,"px)"),t},bgStyle:function(){var t={};return t.width=uni.$u.addUnit(2*Number(this.size)-this.size/2),t.height=uni.$u.addUnit(this.size),t.backgroundColor=this.inactiveColor,t.transform="scale(".concat(this.value===this.activeValue?0:1,")"),t},customInactiveColor:function(){return"#fff"!==this.inactiveColor&&"#ffffff"!==this.inactiveColor}},methods:{clickHandler:function(){var t=this;if(!this.disabled&&!this.loading){var e=this.value===this.activeValue?this.inactiveValue:this.activeValue;this.asyncChange||this.$emit("input",e),this.$nextTick((function(){t.$emit("change",e)}))}}}};e.default=r},179:function(t,e){t.exports={"u-switch":{flexDirection:"row",position:"relative",backgroundColor:"#ffffff",borderWidth:"1",borderRadius:"100",transitionProperty:"backgroundColor",transitionDuration:400,borderColor:"rgba(0,0,0,0.12)",borderStyle:"solid",justifyContent:"flex-end",alignItems:"center",overflow:"hidden"},"u-switch__node":{flexDirection:"row",alignItems:"center",justifyContent:"center",borderRadius:"100",backgroundColor:"#ffffff",boxShadow:"1px 1px 1px 0 rgba(0, 0, 0, 0.25)",transitionProperty:"transform",transitionDuration:400,transitionTimingFunction:"cubic-bezier(0.3,1.05,0.4,1.05)"},"u-switch__bg":{position:"absolute",borderRadius:"100",backgroundColor:"#FFFFFF",transitionProperty:"transform",transitionDuration:400,borderTopLeftRadius:0,borderBottomLeftRadius:0,transitionTimingFunction:"ease"},"u-switch--disabled":{opacity:.6},"@VERSION":2}},18:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,n=(o=i(83))&&o.__esModule?o:{default:o};var r=weex.requireModule("animation"),u={name:"u-loading-icon",mixins:[uni.$u.mpMixin,uni.$u.mixin,n.default],data:function(){return{array12:Array.from({length:12}),aniAngel:360,webviewHide:!1,loading:!1}},computed:{otherBorderColor:function(){var t=uni.$u.colorGradient(this.color,"#ffffff",100)[80];return"circle"===this.mode?this.inactiveColor?this.inactiveColor:t:"transparent"}},watch:{show:function(t){var e=this;t&&!this.loading&&setTimeout((function(){e.startAnimate()}),30)}},mounted:function(){this.init()},methods:{init:function(){var t=this;setTimeout((function(){t.show&&t.nvueAnimate(),t.show&&t.addEventListenerToWebview()}),20)},addEventListenerToWebview:function(){var t=this,e=getCurrentPages(),i=e[e.length-1].$getAppWebview();i.addEventListener("hide",(function(){t.webviewHide=!0})),i.addEventListener("show",(function(){t.webviewHide=!1}))},nvueAnimate:function(){"spinner"!==this.mode&&this.startAnimate()},startAnimate:function(){var t=this;this.loading=!0;var e=this.$refs.ani;e&&r.transition(e,{styles:{transform:"rotate(".concat(this.aniAngel,"deg)"),transformOrigin:"center center"},duration:this.duration,timingFunction:this.timingFunction},(function(){t.aniAngel+=360,t.show&&!t.webviewHide?t.startAnimate():t.loading=!1}))}}};e.default=u},19:function(t,e){t.exports={"u-loading-icon":{flexDirection:"row",alignItems:"center",justifyContent:"center",color:"#c8c9cc"},"u-loading-icon__text":{marginLeft:"4",color:"#606266",fontSize:"14",lineHeight:"20"},"u-loading-icon__spinner":{width:"30",height:"30",position:"relative"},"u-loading-icon__spinner--semicircle":{borderWidth:"2",borderColor:"rgba(0,0,0,0)",borderTopRightRadius:"100",borderTopLeftRadius:"100",borderBottomLeftRadius:"100",borderBottomRightRadius:"100",borderStyle:"solid"},"u-loading-icon__spinner--circle":{borderTopRightRadius:"100",borderTopLeftRadius:"100",borderBottomLeftRadius:"100",borderBottomRightRadius:"100",borderWidth:"2",borderTopColor:"#e5e5e5",borderRightColor:"#e5e5e5",borderBottomColor:"#e5e5e5",borderLeftColor:"#e5e5e5",borderStyle:"solid"},"u-loading-icon--vertical":{flexDirection:"column"},"@VERSION":2}},2:function(t,e,i){"use strict";i.r(e);var o=i(3),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},21:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("view",{staticClass:["u-loading-icon"],class:[t.vertical&&"u-loading-icon--vertical"],style:[t.$u.addStyle(t.customStyle)]},[t.webviewHide?t._e():i("view",{ref:"ani",staticClass:["u-loading-icon__spinner"],class:["u-loading-icon__spinner--"+t.mode],style:{color:t.color,width:t.$u.addUnit(t.size),height:t.$u.addUnit(t.size),borderTopColor:t.color,borderBottomColor:t.otherBorderColor,borderLeftColor:t.otherBorderColor,borderRightColor:t.otherBorderColor,"animation-duration":t.duration+"ms","animation-timing-function":"semicircle"===t.mode||"circle"===t.mode?t.timingFunction:""}},["spinner"===t.mode?i("block",[t.webviewHide?t._e():i("loading-indicator",{staticClass:["u-loading-indicator"],style:{color:t.color,width:t.$u.addUnit(t.size),height:t.$u.addUnit(t.size)},attrs:{animating:!0}})]):t._e()],1),t.text?i("u-text",{staticClass:["u-loading-icon__text"],style:{fontSize:t.$u.addUnit(t.textSize),color:t.textColor},appendAsTree:!0,attrs:{append:"tree"}},[t._v(t._s(t.text))]):t._e()]):t._e()},n=[]},22:function(t,e,i){"use strict";i.r(e);var o=i(23),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},221:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return o}));var o={uLoadingIcon:i(67).default},n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("view",{staticClass:["u-switch"],class:[t.disabled&&"u-switch--disabled"],style:[t.switchStyle,t.$u.addStyle(t.customStyle)],on:{click:t.clickHandler}},[i("view",{staticClass:["u-switch__bg"],style:[t.bgStyle]}),i("view",{ref:"u-switch__node",staticClass:["u-switch__node"],class:[t.value&&"u-switch__node--on"],style:[t.nodeStyle]},[i("u-loading-icon",{attrs:{show:t.loading,mode:"circle",timingFunction:"linear",color:t.value?t.activeColor:"#AAABAD",size:.6*t.size}})],1)])},r=[]},23:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,n=(o=i(85))&&o.__esModule?o:{default:o};var r={name:"u-gap",mixins:[uni.$u.mpMixin,uni.$u.mixin,n.default],computed:{gapStyle:function(){var t={backgroundColor:this.bgColor,height:uni.$u.addUnit(this.height),marginTop:uni.$u.addUnit(this.marginTop),marginBottom:uni.$u.addUnit(this.marginBottom)};return uni.$u.deepMerge(t,uni.$u.addStyle(this.customStyle))}}};e.default=r},24:function(t,e){t.exports={"@VERSION":2}},25:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var o=function(){var t=this.$createElement;return(this._self._c||t)("view",{staticClass:["u-gap"],style:[this.gapStyle]})},n=[]},26:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={"uicon-level":"\ue693","uicon-column-line":"\ue68e","uicon-checkbox-mark":"\ue807","uicon-folder":"\ue7f5","uicon-movie":"\ue7f6","uicon-star-fill":"\ue669","uicon-star":"\ue65f","uicon-phone-fill":"\ue64f","uicon-phone":"\ue622","uicon-apple-fill":"\ue881","uicon-chrome-circle-fill":"\ue885","uicon-backspace":"\ue67b","uicon-attach":"\ue632","uicon-cut":"\ue948","uicon-empty-car":"\ue602","uicon-empty-coupon":"\ue682","uicon-empty-address":"\ue646","uicon-empty-favor":"\ue67c","uicon-empty-permission":"\ue686","uicon-empty-news":"\ue687","uicon-empty-search":"\ue664","uicon-github-circle-fill":"\ue887","uicon-rmb":"\ue608","uicon-person-delete-fill":"\ue66a","uicon-reload":"\ue788","uicon-order":"\ue68f","uicon-server-man":"\ue6bc","uicon-search":"\ue62a","uicon-fingerprint":"\ue955","uicon-more-dot-fill":"\ue630","uicon-scan":"\ue662","uicon-share-square":"\ue60b","uicon-map":"\ue61d","uicon-map-fill":"\ue64e","uicon-tags":"\ue629","uicon-tags-fill":"\ue651","uicon-bookmark-fill":"\ue63b","uicon-bookmark":"\ue60a","uicon-eye":"\ue613","uicon-eye-fill":"\ue641","uicon-mic":"\ue64a","uicon-mic-off":"\ue649","uicon-calendar":"\ue66e","uicon-calendar-fill":"\ue634","uicon-trash":"\ue623","uicon-trash-fill":"\ue658","uicon-play-left":"\ue66d","uicon-play-right":"\ue610","uicon-minus":"\ue618","uicon-plus":"\ue62d","uicon-info":"\ue653","uicon-info-circle":"\ue7d2","uicon-info-circle-fill":"\ue64b","uicon-question":"\ue715","uicon-error":"\ue6d3","uicon-close":"\ue685","uicon-checkmark":"\ue6a8","uicon-android-circle-fill":"\ue67e","uicon-android-fill":"\ue67d","uicon-ie":"\ue87b","uicon-IE-circle-fill":"\ue889","uicon-google":"\ue87a","uicon-google-circle-fill":"\ue88a","uicon-setting-fill":"\ue872","uicon-setting":"\ue61f","uicon-minus-square-fill":"\ue855","uicon-plus-square-fill":"\ue856","uicon-heart":"\ue7df","uicon-heart-fill":"\ue851","uicon-camera":"\ue7d7","uicon-camera-fill":"\ue870","uicon-more-circle":"\ue63e","uicon-more-circle-fill":"\ue645","uicon-chat":"\ue620","uicon-chat-fill":"\ue61e","uicon-bag-fill":"\ue617","uicon-bag":"\ue619","uicon-error-circle-fill":"\ue62c","uicon-error-circle":"\ue624","uicon-close-circle":"\ue63f","uicon-close-circle-fill":"\ue637","uicon-checkmark-circle":"\ue63d","uicon-checkmark-circle-fill":"\ue635","uicon-question-circle-fill":"\ue666","uicon-question-circle":"\ue625","uicon-share":"\ue631","uicon-share-fill":"\ue65e","uicon-shopping-cart":"\ue621","uicon-shopping-cart-fill":"\ue65d","uicon-bell":"\ue609","uicon-bell-fill":"\ue640","uicon-list":"\ue650","uicon-list-dot":"\ue616","uicon-zhihu":"\ue6ba","uicon-zhihu-circle-fill":"\ue709","uicon-zhifubao":"\ue6b9","uicon-zhifubao-circle-fill":"\ue6b8","uicon-weixin-circle-fill":"\ue6b1","uicon-weixin-fill":"\ue6b2","uicon-twitter-circle-fill":"\ue6ab","uicon-twitter":"\ue6aa","uicon-taobao-circle-fill":"\ue6a7","uicon-taobao":"\ue6a6","uicon-weibo-circle-fill":"\ue6a5","uicon-weibo":"\ue6a4","uicon-qq-fill":"\ue6a1","uicon-qq-circle-fill":"\ue6a0","uicon-moments-circel-fill":"\ue69a","uicon-moments":"\ue69b","uicon-qzone":"\ue695","uicon-qzone-circle-fill":"\ue696","uicon-baidu-circle-fill":"\ue680","uicon-baidu":"\ue681","uicon-facebook-circle-fill":"\ue68a","uicon-facebook":"\ue689","uicon-car":"\ue60c","uicon-car-fill":"\ue636","uicon-warning-fill":"\ue64d","uicon-warning":"\ue694","uicon-clock-fill":"\ue638","uicon-clock":"\ue60f","uicon-edit-pen":"\ue612","uicon-edit-pen-fill":"\ue66b","uicon-email":"\ue611","uicon-email-fill":"\ue642","uicon-minus-circle":"\ue61b","uicon-minus-circle-fill":"\ue652","uicon-plus-circle":"\ue62e","uicon-plus-circle-fill":"\ue661","uicon-file-text":"\ue663","uicon-file-text-fill":"\ue665","uicon-pushpin":"\ue7e3","uicon-pushpin-fill":"\ue86e","uicon-grid":"\ue673","uicon-grid-fill":"\ue678","uicon-play-circle":"\ue647","uicon-play-circle-fill":"\ue655","uicon-pause-circle-fill":"\ue654","uicon-pause":"\ue8fa","uicon-pause-circle":"\ue643","uicon-eye-off":"\ue648","uicon-eye-off-outline":"\ue62b","uicon-gift-fill":"\ue65c","uicon-gift":"\ue65b","uicon-rmb-circle-fill":"\ue657","uicon-rmb-circle":"\ue677","uicon-kefu-ermai":"\ue656","uicon-server-fill":"\ue751","uicon-coupon-fill":"\ue8c4","uicon-coupon":"\ue8ae","uicon-integral":"\ue704","uicon-integral-fill":"\ue703","uicon-home-fill":"\ue964","uicon-home":"\ue965","uicon-hourglass-half-fill":"\ue966","uicon-hourglass":"\ue967","uicon-account":"\ue628","uicon-plus-people-fill":"\ue626","uicon-minus-people-fill":"\ue615","uicon-account-fill":"\ue614","uicon-thumb-down-fill":"\ue726","uicon-thumb-down":"\ue727","uicon-thumb-up":"\ue733","uicon-thumb-up-fill":"\ue72f","uicon-lock-fill":"\ue979","uicon-lock-open":"\ue973","uicon-lock-opened-fill":"\ue974","uicon-lock":"\ue97a","uicon-red-packet-fill":"\ue690","uicon-photo-fill":"\ue98b","uicon-photo":"\ue98d","uicon-volume-off-fill":"\ue659","uicon-volume-off":"\ue644","uicon-volume-fill":"\ue670","uicon-volume":"\ue633","uicon-red-packet":"\ue691","uicon-download":"\ue63c","uicon-arrow-up-fill":"\ue6b0","uicon-arrow-down-fill":"\ue600","uicon-play-left-fill":"\ue675","uicon-play-right-fill":"\ue676","uicon-rewind-left-fill":"\ue679","uicon-rewind-right-fill":"\ue67a","uicon-arrow-downward":"\ue604","uicon-arrow-leftward":"\ue601","uicon-arrow-rightward":"\ue603","uicon-arrow-upward":"\ue607","uicon-arrow-down":"\ue60d","uicon-arrow-right":"\ue605","uicon-arrow-left":"\ue60e","uicon-arrow-up":"\ue606","uicon-skip-back-left":"\ue674","uicon-skip-forward-right":"\ue672","uicon-rewind-right":"\ue66f","uicon-rewind-left":"\ue671","uicon-arrow-right-double":"\ue68d","uicon-arrow-left-double":"\ue68c","uicon-wifi-off":"\ue668","uicon-wifi":"\ue667","uicon-empty-data":"\ue62f","uicon-empty-history":"\ue684","uicon-empty-list":"\ue68b","uicon-empty-page":"\ue627","uicon-empty-order":"\ue639","uicon-man":"\ue697","uicon-woman":"\ue69c","uicon-man-add":"\ue61c","uicon-man-add-fill":"\ue64c","uicon-man-delete":"\ue61a","uicon-man-delete-fill":"\ue66a","uicon-zh":"\ue70a","uicon-en":"\ue692"}},264:function(t,e,i){"use strict";i.r(e);var o=i(179),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},27:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{name:{type:String,default:uni.$u.props.icon.name},color:{type:String,default:uni.$u.props.icon.color},size:{type:[String,Number],default:uni.$u.props.icon.size},bold:{type:Boolean,default:uni.$u.props.icon.bold},index:{type:[String,Number],default:uni.$u.props.icon.index},hoverClass:{type:String,default:uni.$u.props.icon.hoverClass},customPrefix:{type:String,default:uni.$u.props.icon.customPrefix},label:{type:[String,Number],default:uni.$u.props.icon.label},labelPos:{type:String,default:uni.$u.props.icon.labelPos},labelSize:{type:[String,Number],default:uni.$u.props.icon.labelSize},labelColor:{type:String,default:uni.$u.props.icon.labelColor},space:{type:[String,Number],default:uni.$u.props.icon.space},imgMode:{type:String,default:uni.$u.props.icon.imgMode},width:{type:[String,Number],default:uni.$u.props.icon.width},height:{type:[String,Number],default:uni.$u.props.icon.height},top:{type:[String,Number],default:uni.$u.props.icon.top},stop:{type:Boolean,default:uni.$u.props.icon.stop}}};e.default=o},3:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(i(26)),n=r(i(27));function r(t){return t&&t.__esModule?t:{default:t}}weex.requireModule("dom").addRule("fontFace",{fontFamily:"uicon-iconfont",src:"url('".concat("https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf","')")});var u={name:"u-icon",data:function(){return{}},mixins:[uni.$u.mpMixin,uni.$u.mixin,n.default],computed:{uClasses:function(){var t=[];return t.push(this.customPrefix+"-"+this.name),this.color&&this.$u.config.type.includes(this.color)&&t.push("u-icon__icon--"+this.color),t},iconStyle:function(){var t={};return t={fontSize:this.$u.addUnit(this.size),lineHeight:this.$u.addUnit(this.size),fontWeight:this.bold?"bold":"normal",top:this.$u.addUnit(this.top)},this.color&&!this.$u.config.type.includes(this.color)&&(t.color=this.color),t},isImg:function(){return-1!==this.name.indexOf("/")},imgStyle:function(){var t={};return t.width=this.width?this.$u.addUnit(this.width):this.$u.addUnit(this.size),t.height=this.height?this.$u.addUnit(this.height):this.$u.addUnit(this.size),t},icon:function(){return o.default["uicon-"+this.name]||this.name}},methods:{clickHandler:function(t){this.$emit("click",this.index),this.stop&&this.$u.preventEvent(t)}}};e.default=u},32:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return weex.requireModule(t)}},340:function(t,e,i){"use strict";var o=i(740),n=i(656),r=i(0);var u=Object(r.a)(n.default,o.b,o.c,!1,null,null,"0aff7d18",!1,o.a,void 0);(function(t){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(i(931).default,this.options.style):Object.assign(this.options.style,i(931).default)}).call(u),e.default=u.exports},36:function(t,e,i){"use strict";i.r(e);var o=i(19),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},4:function(t,e){t.exports={"u-icon":{alignItems:"center"},"u-icon--left":{flexDirection:"row-reverse",alignItems:"center"},"u-icon--right":{flexDirection:"row",alignItems:"center"},"u-icon--top":{flexDirection:"column-reverse",justifyContent:"center"},"u-icon--bottom":{flexDirection:"column",justifyContent:"center"},"u-icon__icon":{fontFamily:"uicon-iconfont",position:"relative",flexDirection:"row",alignItems:"center"},"u-icon__icon--primary":{color:"#3c9cff"},"u-icon__icon--success":{color:"#5ac725"},"u-icon__icon--error":{color:"#f56c6c"},"u-icon__icon--warning":{color:"#f9ae3d"},"u-icon__icon--info":{color:"#909399"},"@VERSION":2}},45:function(t,e,i){"use strict";i.r(e);var o=i(24),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},5:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("view",{staticClass:["u-icon"],class:["u-icon--"+t.labelPos],on:{click:t.clickHandler}},[t.isImg?i("u-image",{staticClass:["u-icon__img"],style:[t.imgStyle,t.$u.addStyle(t.customStyle)],attrs:{src:t.name,mode:t.imgMode}}):i("u-text",{staticClass:["u-icon__icon"],class:t.uClasses,style:[t.iconStyle,t.$u.addStyle(t.customStyle)],appendAsTree:!0,attrs:{hoverClass:t.hoverClass,append:"tree"}},[t._v(t._s(t.icon))]),""!==t.label?i("u-text",{staticClass:["u-icon__label"],style:{color:t.labelColor,fontSize:t.$u.addUnit(t.labelSize),marginLeft:"right"==t.labelPos?t.$u.addUnit(t.space):0,marginTop:"bottom"==t.labelPos?t.$u.addUnit(t.space):0,marginRight:"left"==t.labelPos?t.$u.addUnit(t.space):0,marginBottom:"top"==t.labelPos?t.$u.addUnit(t.space):0},appendAsTree:!0,attrs:{append:"tree"}},[t._v(t._s(t.label))]):t._e()],1)},n=[]},6:function(t,e,i){"use strict";i.r(e);var o=i(5),n=i(2);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var u=i(0);var a=Object(u.a)(n.default,o.b,o.c,!1,null,"63fb8f8b","7b59562c",!1,o.a,void 0);(function(t){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(i(7).default,this.options.style):Object.assign(this.options.style,i(7).default)}).call(a),e.default=a.exports},61:function(t,e,i){"use strict";i.r(e);var o=i(62),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},62:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o,n=(o=i(116))&&o.__esModule?o:{default:o};var r={name:"u-link",mixins:[uni.$u.mpMixin,uni.$u.mixin,n.default],computed:{linkStyle:function(){return{color:this.color,fontSize:uni.$u.addUnit(this.fontSize),lineHeight:uni.$u.addUnit(uni.$u.getPx(this.fontSize)+2),textDecoration:this.underLine?"underline":"none"}}},methods:{openLink:function(){plus.runtime.openURL(this.href),this.$emit("click")}}};e.default=r},63:function(t,e){t.exports={"u-link":{flexDirection:"row",flexWrap:"wrap",flex:1},"@VERSION":2}},65:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var o=function(){var t=this.$createElement;return(this._self._c||t)("u-text",{staticClass:["u-link"],style:[this.linkStyle,this.$u.addStyle(this.customStyle)],appendAsTree:!0,attrs:{append:"tree"},on:{click:this.openLink}},[this._v(this._s(this.text))])},n=[]},653:function(t,e,i){"use strict";i.r(e);var o=i(654),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},654:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(i(66)),n=r(i(1094));function r(t){return t&&t.__esModule?t:{default:t}}function u(t,e,i,o,n,r,u){try{var a=t[r](u),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(o,n)}function a(t){return function(){var e=this,i=arguments;return new Promise((function(o,n){var r=t.apply(e,i);function a(t){u(r,o,n,a,l,"next",t)}function l(t){u(r,o,n,a,l,"throw",t)}a(void 0)}))}}var l=t("dom"),s=t("animation"),c={name:"u-skeleton",mixins:[uni.$u.mpMixin,uni.$u.mixin,n.default],data:function(){return{width:0}},watch:{loading:function(){this.getComponentWidth()}},computed:{rowsArray:function(){/%$/.test(this.rowsHeight)&&uni.$u.error("rowsHeight\u53c2\u6570\u4e0d\u652f\u6301\u767e\u5206\u6bd4\u5355\u4f4d");for(var t=[],e=0;e<this.rows;e++){var i={},o=uni.$u.test.array(this.rowsWidth)?this.rowsWidth[e]||(e===this.row-1?"70%":"100%"):e===this.rows-1?"70%":this.rowsWidth,n=uni.$u.test.array(this.rowsHeight)?this.rowsHeight[e]||"18px":this.rowsHeight;i.marginTop=this.title||0!==e?this.title&&0===e?"20px":"12px":0,/%$/.test(o)?i.width=uni.$u.addUnit(this.width*parseInt(o)/100):i.width=uni.$u.addUnit(o),i.height=uni.$u.addUnit(n),t.push(i)}return t},uTitleWidth:function(){var t=0;return t=/%$/.test(this.titleWidth)?uni.$u.addUnit(this.width*parseInt(this.titleWidth)/100):uni.$u.addUnit(this.titleWidth),uni.$u.addUnit(t)}},mounted:function(){this.init()},methods:{init:function(){this.getComponentWidth(),this.loading&&this.animate&&this.setNvueAnimation()},setNvueAnimation:function(){var t=this;return a(o.default.mark((function e(){var i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uni.$u.sleep(500);case 2:(i=t.$refs["u-skeleton__wrapper"])&&t.loading&&t.animate&&s.transition(i,{styles:{opacity:.5},duration:600},(function(){s.transition(i,{styles:{opacity:1},duration:600},(function(){t.loading&&t.animate&&t.setNvueAnimation()}))}));case 4:case"end":return e.stop()}}),e)})))()},getComponentWidth:function(){var t=this;return a(o.default.mark((function e(){var i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uni.$u.sleep(20);case 2:(i=t.$refs["u-skeleton__wrapper__content"])&&l.getComponentRect(i,(function(e){t.width=e.size.width}));case 4:case"end":return e.stop()}}),e)})))()}}};e.default=c}).call(this,i(32).default)},655:function(t,e){t.exports={"u-skeleton":{flex:1},"u-skeleton__wrapper":{flexDirection:"row"},"u-skeleton__wrapper__avatar":{backgroundColor:"#F1F2F4",marginRight:"15"},"u-skeleton__wrapper__avatar--circle":{borderRadius:"100"},"u-skeleton__wrapper__avatar--square":{borderRadius:"4"},"u-skeleton__wrapper__content":{flex:1},"u-skeleton__wrapper__content__rows":{backgroundColor:"#F1F2F4",borderRadius:"3"},"u-skeleton__wrapper__content__title":{backgroundColor:"#F1F2F4",borderRadius:"3"},"@VERSION":2}},656:function(t,e,i){"use strict";var o=i(657),n=i.n(o);e.default=n.a},657:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={data:function(){return{switch1:!0,switch2:!1}}}},658:function(t,e){t.exports={"u-skeleton-slot":{flexDirection:"row",alignItems:"flex-start"},"u-skeleton-slot__image":{width:"40",height:"40",borderRadius:"100"},"u-skeleton-slot__content":{marginLeft:"10",flex:1},"@VERSION":2}},66:function(t,e,i){t.exports=i(79)},67:function(t,e,i){"use strict";i.r(e);var o=i(21),n=i(17);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var u=i(0);var a=Object(u.a)(n.default,o.b,o.c,!1,null,"770e8abd","059849e8",!1,o.a,void 0);(function(t){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(i(36).default,this.options.style):Object.assign(this.options.style,i(36).default)}).call(a),e.default=a.exports},68:function(t,e,i){"use strict";i.r(e);var o=i(69),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},69:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(i(117)),n=r(i(101));function r(t){return t&&t.__esModule?t:{default:t}}var u={name:"u--text",mixins:[uni.$u.mpMixin,n.default,uni.$u.mixin],components:{uvText:o.default}};e.default=u},7:function(t,e,i){"use strict";i.r(e);var o=i(4),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},70:function(t,e,i){"use strict";i.r(e);var o=i(71),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},71:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(i(118)),n=(r(i(91)),r(i(92)),r(i(101)));function r(t){return t&&t.__esModule?t:{default:t}}var u={name:"u--text",mixins:[uni.$u.mpMixin,uni.$u.mixin,o.default,n.default],computed:{valueStyle:function(){var t={textDecoration:this.decoration,fontWeight:this.bold?"bold":"normal",wordWrap:this.wordWrap,fontSize:uni.$u.addUnit(this.size)};return!this.type&&(t.color=this.color),this.isNvue&&this.lines&&(t.lines=this.lines),this.lineHeight&&(t.lineHeight=uni.$u.addUnit(this.lineHeight)),!this.isNvue&&this.block&&(t.display="block"),uni.$u.deepMerge(t,uni.$u.addStyle(this.customStyle))},isNvue:function(){return!0,!0},isMp:function(){return!1}},data:function(){return{}},methods:{clickHandler:function(){"phone"===this.mode&&uni.$u.test.mobile(this.text)&&uni.makePhoneCall({phoneNumber:this.text}),this.$emit("click")}}};e.default=u},72:function(t,e){t.exports={"u-text":{flexDirection:"row",alignItems:"center",flexWrap:"nowrap",flex:1},"u-text__price":{fontSize:"14",color:"#606266"},"u-text__value":{fontSize:"14",flexDirection:"row",color:"#606266",flexWrap:"wrap",textOverflow:"ellipsis",alignItems:"center"},"u-text__value--primary":{color:"#3c9cff"},"u-text__value--warning":{color:"#f9ae3d"},"u-text__value--success":{color:"#5ac725"},"u-text__value--info":{color:"#909399"},"u-text__value--error":{color:"#f56c6c"},"u-text__value--main":{color:"#303133"},"u-text__value--content":{color:"#606266"},"u-text__value--tips":{color:"#909193"},"u-text__value--light":{color:"#c0c4cc"},"@VERSION":2}},740:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return o}));var o={uSkeleton:i(1093).default,uSwitch:i(808).default,uGap:i(84).default,"u-Text":i(114).default},n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("scroll-view",{staticStyle:{flexDirection:"column"},attrs:{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true"}},[i("view",{staticClass:["u-page"]},[i("view",{staticClass:["u-demo-block"]},[i("u-text",{staticClass:["u-demo-block__title"],appendAsTree:!0,attrs:{append:"tree"}},[t._v("\u57fa\u7840\u4f7f\u7528")]),i("view",{staticClass:["u-demo-block__content"]},[i("u-skeleton",{attrs:{rows:"3",title:!0,loading:!0}})],1)]),i("view",{staticClass:["u-demo-block"]},[i("u-text",{staticClass:["u-demo-block__title"],appendAsTree:!0,attrs:{append:"tree"}},[t._v("\u81ea\u5b9a\u4e49\u6bb5\u843d\u884c\u6570")]),i("view",{staticClass:["u-demo-block__content"]},[i("u-skeleton",{attrs:{rows:"2",title:!0,loading:!0}})],1)]),i("view",{staticClass:["u-demo-block"]},[i("u-text",{staticClass:["u-demo-block__title"],appendAsTree:!0,attrs:{append:"tree"}},[t._v("\u8bbe\u7f6e\u6bb5\u843d\u5bbd\u5ea6")]),i("view",{staticClass:["u-demo-block__content"]},[i("u-skeleton",{attrs:{rows:"2",title:!0,rowsWidth:["100%","35%"],loading:!0}})],1)]),i("view",{staticClass:["u-demo-block"]},[i("u-text",{staticClass:["u-demo-block__title"],appendAsTree:!0,attrs:{append:"tree"}},[t._v("\u8bbe\u7f6e\u6bb5\u843d\u9ad8\u5ea6")]),i("view",{staticClass:["u-demo-block__content"]},[i("u-skeleton",{attrs:{rows:"3",title:!0,rowsWidth:["100%","100%","100%"],rowsHeight:["18px","18px","80px"],loading:!0}})],1)]),i("view",{staticClass:["u-demo-block"]},[i("u-text",{staticClass:["u-demo-block__title"],appendAsTree:!0,attrs:{append:"tree"}},[t._v("\u662f\u5426\u5f00\u542f\u52a8\u753b")]),i("u-switch",{attrs:{space:"2",inactiveColor:"#e6e6e6"},model:{value:t.switch1,callback:function(e){t.switch1=e},expression:"switch1"}}),i("u-gap",{attrs:{height:"15",bgColor:"#fff"}}),i("view",{staticClass:["u-demo-block__content"]},[i("u-skeleton",{attrs:{animate:t.switch1,rows:"3",title:!0,loading:!0}})],1)],1),i("view",{staticClass:["u-demo-block"]},[i("u-text",{staticClass:["u-demo-block__title"],appendAsTree:!0,attrs:{append:"tree"}},[t._v("\u5c55\u793a\u5934\u50cf")]),i("u-gap",{attrs:{height:"15",bgColor:"#fff"}}),i("view",{staticClass:["u-demo-block__content"]},[i("u-skeleton",{attrs:{animate:t.switch1,rows:"3",title:!0,loading:!0,avatar:!0}})],1)],1),i("view",{staticClass:["u-demo-block"]},[i("u-text",{staticClass:["u-demo-block__title"],appendAsTree:!0,attrs:{append:"tree"}},[t._v("\u5207\u6362\u72b6\u6001")]),i("u-switch",{attrs:{space:"2",inactiveColor:"#e6e6e6"},model:{value:t.switch2,callback:function(e){t.switch2=e},expression:"switch2"}}),i("u-gap",{attrs:{height:"15",bgColor:"#fff"}}),i("view",{staticClass:["u-demo-block__content"]},[i("u-skeleton",{attrs:{rows:"2",title:!0,loading:t.switch2,avatar:!0,rowsHeight:"14"}},[i("view",[i("view",{staticClass:["u-skeleton-slot"]},[i("u-image",{staticClass:["u-skeleton-slot__image"],attrs:{src:"/static/uview/common/logo.png"}}),i("view",{staticClass:["u-skeleton-slot__content"]},[i("u--text",{attrs:{text:"\u5229\u5251\u51fa\u9798,\u4e00\u7edf\u6c5f\u6e56",type:"main",size:"16"}}),i("u--text",{attrs:{type:"tips",size:"14",customStyle:"margin-top: 5px",text:"\u4f17\u591a\u7ec4\u4ef6\u8986\u76d6\u5f00\u53d1\u8fc7\u7a0b\u7684\u5404\u4e2a\u9700\u6c42\uff0c\u7ec4\u4ef6\u529f\u80fd\u4e30\u5bcc\uff0c\u591a\u7aef\u517c\u5bb9\u3002\u8ba9\u60a8\u5feb\u901f\u96c6\u6210\uff0c\u5f00\u7bb1\u5373\u7528"}})],1)],1)])])],1),i("u-gap",{attrs:{height:"50",bgColor:"transparent"}})],1)])])},r=[]},76:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement;return(t._self._c||e)("uvText",{attrs:{type:t.type,show:t.show,text:t.text,prefixIcon:t.prefixIcon,suffixIcon:t.suffixIcon,mode:t.mode,href:t.href,format:t.format,call:t.call,openType:t.openType,bold:t.bold,block:t.block,lines:t.lines,color:t.color,size:t.size,iconStyle:t.iconStyle,margin:t.margin,lineHeight:t.lineHeight,align:t.align,wordWrap:t.wordWrap,customStyle:t.customStyle},on:{click:function(e){t.$emit("click")}}})},n=[]},77:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return r})),i.d(e,"a",(function(){return o}));var o={uIcon:i(6).default,uLink:i(115).default},n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("view",{staticClass:["u-text"],class:[],style:{margin:t.margin,justifyContent:"left"===t.align?"flex-start":"center"===t.align?"center":"flex-end"},on:{click:t.clickHandler}},["price"===t.mode?i("u-text",{class:["u-text__price",t.type&&"u-text__value--"+t.type],style:[t.valueStyle],appendAsTree:!0,attrs:{append:"tree"}},[t._v("\uffe5")]):t._e(),t.prefixIcon?i("view",{staticClass:["u-text__prefix-icon"]},[i("u-icon",{attrs:{name:t.prefixIcon,customStyle:t.$u.addStyle(t.iconStyle)}})],1):t._e(),"link"===t.mode?i("u-link",{attrs:{text:t.value,href:t.href,underLine:!0}}):t.openType&&t.isMp?[i("button",{staticClass:["u-reset-button","u-text__value"],style:[t.valueStyle],attrs:{dataIndex:t.index,openType:t.openType,lang:t.lang,sessionFrom:t.sessionFrom,sendMessageTitle:t.sendMessageTitle,sendMessagePath:t.sendMessagePath,sendMessageImg:t.sendMessageImg,showMessageCard:t.showMessageCard,appParameter:t.appParameter},on:{getuserinfo:t.onGetUserInfo,contact:t.onContact,getphonenumber:t.onGetPhoneNumber,error:t.onError,launchapp:t.onLaunchApp,opensetting:t.onOpenSetting}},[t._v("\n "+t._s(t.value)+"\n ")])]:i("u-text",{staticClass:["u-text__value"],class:[t.type&&"u-text__value--"+t.type,t.lines&&"u-line-"+t.lines],style:[t.valueStyle],appendAsTree:!0,attrs:{append:"tree"}},[t._v(t._s(t.value))]),t.suffixIcon?i("view",{staticClass:["u-text__suffix-icon"]},[i("u-icon",{attrs:{name:t.suffixIcon,customStyle:t.$u.addStyle(t.iconStyle)}})],1):t._e()],2):t._e()},r=[]},788:function(t,e,i){"use strict";i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("view",{staticClass:["u-skeleton"]},[t.loading?i("view",{ref:"u-skeleton__wrapper",staticClass:["u-skeleton__wrapper"],staticStyle:{display:"flex",flexDirection:"row"}},[t.avatar?i("view",{staticClass:["u-skeleton__wrapper__avatar"],class:["u-skeleton__wrapper__avatar--"+t.avatarShape,t.animate&&"animate"],style:{height:t.$u.addUnit(t.avatarSize),width:t.$u.addUnit(t.avatarSize)}}):t._e(),i("view",{ref:"u-skeleton__wrapper__content",staticClass:["u-skeleton__wrapper__content"],staticStyle:{flex:"1"}},[t.title?i("view",{staticClass:["u-skeleton__wrapper__content__title"],class:[t.animate&&"animate"],style:{width:t.uTitleWidth,height:t.$u.addUnit(t.titleHeight)}}):t._e(),t._l(t.rowsArray,(function(e,o){return i("view",{key:o,staticClass:["u-skeleton__wrapper__content__rows"],class:[t.animate&&"animate"],style:{width:e.width,height:e.height,marginTop:e.marginTop}})}))],2)]):t._t("default")],2)},n=[]},79:function(t,e,i){var o=function(t){"use strict";var e=Object.prototype,i=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},n=o.iterator||"@@iterator",r=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function a(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,i){return t[e]=i}}function l(t,e,i,o){var n=e&&e.prototype instanceof d?e:d,r=Object.create(n.prototype),u=new $(o||[]);return r._invoke=function(t,e,i){var o="suspendedStart";return function(n,r){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw r;return k()}for(i.method=n,i.arg=r;;){var u=i.delegate;if(u){var a=b(u,i);if(a){if(a===c)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===o)throw o="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o="executing";var l=s(t,e,i);if("normal"===l.type){if(o=i.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(o="completed",i.method="throw",i.arg=l.arg)}}}(t,i,u),r}function s(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var c={};function d(){}function f(){}function p(){}var h={};h[n]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(S([])));m&&m!==e&&i.call(m,n)&&(h=m);var y=p.prototype=d.prototype=Object.create(h);function _(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function v(t,e){var o;this._invoke=function(n,r){function u(){return new e((function(o,u){!function o(n,r,u,a){var l=s(t[n],t,r);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==typeof d&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,u,a)}),(function(t){o("throw",t,u,a)})):e.resolve(d).then((function(t){c.value=t,u(c)}),(function(t){return o("throw",t,u,a)}))}a(l.arg)}(n,r,o,u)}))}return o=o?o.then(u,u):u()}}function b(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return c;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var o=s(i,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,c;var n=o.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,c):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,c)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,r=function e(){for(;++o<t.length;)if(i.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:k}}function k(){return{value:void 0,done:!0}}return f.prototype=y.constructor=p,p.constructor=f,f.displayName=a(p,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},_(v.prototype),v.prototype[r]=function(){return this},t.AsyncIterator=v,t.async=function(e,i,o,n,r){void 0===r&&(r=Promise);var u=new v(l(e,i,o,n),r);return t.isGeneratorFunction(i)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},_(y),a(y,u,"Generator"),y[n]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var o=e.pop();if(o in t)return i.value=o,i.done=!1,i}return i.done=!0,i}},t.values=S,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(i,o){return u.type="throw",u.arg=t,e.next=i,o&&(e.method="next",e.arg=void 0),!!o}for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],u=r.completion;if("root"===r.tryLoc)return o("end");if(r.tryLoc<=this.prev){var a=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(a&&l){if(this.prev<r.catchLoc)return o(r.catchLoc,!0);if(this.prev<r.finallyLoc)return o(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return o(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return o(r.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var n=this.tryEntries[o];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var u=r?r.completion:{};return u.type=t,u.arg=e,r?(this.method="next",this.next=r.finallyLoc,c):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),c},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),x(i),c}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var o=i.completion;if("throw"===o.type){var n=o.arg;x(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:S(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),c}},t}(t.exports);try{regeneratorRuntime=o}catch(t){Function("r","regeneratorRuntime = r")(o)}},8:function(t,e,i){Vue.prototype.__$appStyle__={},Vue.prototype.__merge_style&&Vue.prototype.__merge_style(i(9).default,Vue.prototype.__$appStyle__)},808:function(t,e,i){"use strict";i.r(e);var o=i(221),n=i(177);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var u=i(0);var a=Object(u.a)(n.default,o.b,o.c,!1,null,"50a816b6","4c8de468",!1,o.a,void 0);(function(t){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(i(264).default,this.options.style):Object.assign(this.options.style,i(264).default)}).call(a),e.default=a.exports},809:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{loading:{type:Boolean,default:uni.$u.props.switch.loading},disabled:{type:Boolean,default:uni.$u.props.switch.disabled},size:{type:[String,Number],default:uni.$u.props.switch.size},activeColor:{type:String,default:uni.$u.props.switch.activeColor},inactiveColor:{type:String,default:uni.$u.props.switch.inactiveColor},value:{type:[Boolean,String,Number],default:uni.$u.props.switch.value},activeValue:{type:[String,Number,Boolean],default:uni.$u.props.switch.activeValue},inactiveValue:{type:[String,Number,Boolean],default:uni.$u.props.switch.inactiveValue},asyncChange:{type:Boolean,default:uni.$u.props.switch.asyncChange},space:{type:[String,Number],default:uni.$u.props.switch.space}}};e.default=o},83:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{show:{type:Boolean,default:uni.$u.props.loadingIcon.show},color:{type:String,default:uni.$u.props.loadingIcon.color},textColor:{type:String,default:uni.$u.props.loadingIcon.textColor},vertical:{type:Boolean,default:uni.$u.props.loadingIcon.vertical},mode:{type:String,default:uni.$u.props.loadingIcon.mode},size:{type:[String,Number],default:uni.$u.props.loadingIcon.size},textSize:{type:[String,Number],default:uni.$u.props.loadingIcon.textSize},text:{type:[String,Number],default:uni.$u.props.loadingIcon.text},timingFunction:{type:String,default:uni.$u.props.loadingIcon.timingFunction},duration:{type:[String,Number],default:uni.$u.props.loadingIcon.duration},inactiveColor:{type:String,default:uni.$u.props.loadingIcon.inactiveColor}}};e.default=o},84:function(t,e,i){"use strict";i.r(e);var o=i(25),n=i(22);for(var r in n)"default"!==r&&function(t){i.d(e,t,(function(){return n[t]}))}(r);var u=i(0);var a=Object(u.a)(n.default,o.b,o.c,!1,null,"72836044","6ec69190",!1,o.a,void 0);(function(t){this.options.style||(this.options.style={}),Vue.prototype.__merge_style&&Vue.prototype.__$appStyle__&&Vue.prototype.__merge_style(Vue.prototype.__$appStyle__,this.options.style),Vue.prototype.__merge_style?Vue.prototype.__merge_style(i(45).default,this.options.style):Object.assign(this.options.style,i(45).default)}).call(a),e.default=a.exports},85:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{bgColor:{type:String,default:uni.$u.props.gap.bgColor},height:{type:[String,Number],default:uni.$u.props.gap.height},marginTop:{type:[String,Number],default:uni.$u.props.gap.marginTop},marginBottom:{type:[String,Number],default:uni.$u.props.gap.marginBottom}}};e.default=o},9:function(t,e,i){"use strict";i.r(e);var o=i(1),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},91:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{lang:String,sessionFrom:String,sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,showMessageCard:Boolean,appParameter:String,formType:String,openType:String}};e.default=o},92:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o={props:{openType:String},methods:{onGetUserInfo:function(t){this.$emit("getuserinfo",t.detail)},onContact:function(t){this.$emit("contact",t.detail)},onGetPhoneNumber:function(t){this.$emit("getphonenumber",t.detail)},onError:function(t){this.$emit("error",t.detail)},onLaunchApp:function(t){this.$emit("launchapp",t.detail)},onOpenSetting:function(t){this.$emit("opensetting",t.detail)}}};e.default=o},930:function(t,e,i){"use strict";i.r(e);var o=i(655),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a},931:function(t,e,i){"use strict";i.r(e);var o=i(658),n=i.n(o);for(var r in o)"default"!==r&&function(t){i.d(e,t,(function(){return o[t]}))}(r);e.default=n.a}});
|
exports['delete'] = {
insert: [
{name: 'Rick Blalock'},
{name: 'Dawson Toth'}
]
};
|
// 建档管理
import request from '@/utils/request'
// 建档维护列表
export function recordList(params) {
return request({
url: '/customer/customer/bookbuilding/getByCustTypeId',
method: 'post',
params
})
}
// 建档维护新增与编辑
export function recordSaveAndEdit(data) {
return request({
url: '/customer/customer/bookbuilding/saveAndEdit',
method: 'post',
data
})
}
// 机构客户类型列表
export function customerTypeList(data) {
return request({
url: '/customer/custType/list',
method: 'post',
params: data
})
}
// 建档维护停用
export function recordDisable(data) {
return request({
url: '/customer/customer/bookbuilding/disable',
method: 'post',
params: data
})
}
// 建档维护启用
export function recordUnDisable(data) {
return request({
url: '/customer/customer/bookbuilding/enable',
method: 'post',
params: data
})
}
// 建档查询详情
export function getConfigChangeRecord(data) {
return request({
url: '/admin/config/getConfigChangeRecord',
method: 'post',
data: data
})
}
|
'use strict';
const fz = require('./converters/fromZigbee');
const tz = require('./converters/toZigbee');
const store = {};
const repInterval = {
MAX: 62000,
HOUR: 3600,
MINUTES_5: 300,
MINUTE: 60,
};
const bind = async (endpoint, target, clusters) => {
for (const cluster of clusters) {
await endpoint.bind(cluster, target);
}
};
const configureReporting = {
currentPositionLiftPercentage: async (endpoint) => {
const payload = [{
attribute: 'currentPositionLiftPercentage',
minimumReportInterval: 1,
maximumReportInterval: repInterval.MAX,
reportableChange: 1,
}];
await endpoint.configureReporting('closuresWindowCovering', payload);
},
batteryPercentageRemaining: async (endpoint) => {
const payload = [{
attribute: 'batteryPercentageRemaining',
minimumReportInterval: repInterval.HOUR,
maximumReportInterval: repInterval.MAX,
reportableChange: 0,
}];
await endpoint.configureReporting('genPowerCfg', payload);
},
batteryVoltage: async (endpoint) => {
const payload = [{
attribute: 'batteryVoltage',
minimumReportInterval: repInterval.HOUR,
maximumReportInterval: repInterval.MAX,
reportableChange: 0,
}];
await endpoint.configureReporting('genPowerCfg', payload);
},
batteryAlarmState: async (endpoint) => {
const payload = [{
attribute: 'batteryAlarmState',
minimumReportInterval: repInterval.HOUR,
maximumReportInterval: repInterval.MAX,
reportableChange: 0,
}];
await endpoint.configureReporting('genPowerCfg', payload);
},
onOff: async (endpoint) => {
const payload = [{
attribute: 'onOff',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('genOnOff', payload);
},
lockState: async (endpoint) => {
const payload = [{
attribute: 'lockState',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('closuresDoorLock', payload);
},
brightness: async (endpoint) => {
const payload = [{
attribute: 'currentLevel',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 1,
}];
await endpoint.configureReporting('genLevelCtrl', payload);
},
occupancy: async (endpoint) => {
const payload = [{
attribute: 'occupancy',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('msOccupancySensing', payload);
},
temperature: async (endpoint) => {
const payload = [{
attribute: 'measuredValue',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 25,
}];
await endpoint.configureReporting('msTemperatureMeasurement', payload);
},
pressure: async (endpoint) => {
const payload = [{
attribute: 'measuredValue',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('msPressureMeasurement', payload);
},
illuminance: async (endpoint) => {
const payload = [{
attribute: 'measuredValue',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('msIlluminanceMeasurement', payload);
},
instantaneousDemand: async (endpoint) => {
const payload = [{
attribute: 'instantaneousDemand',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 1,
}];
await endpoint.configureReporting('seMetering', payload);
},
currentSummDelivered: async (endpoint) => {
const payload = [{
attribute: 'currentSummDelivered',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 1,
}];
await endpoint.configureReporting('seMetering', payload);
},
currentSummReceived: async (endpoint) => {
const payload = [{
attribute: 'currentSummReceived',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 1,
}];
await endpoint.configureReporting('seMetering', payload);
},
thermostatTemperature: async (endpoint) => {
const payload = [{
attribute: 'localTemp',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('hvacThermostat', payload);
},
thermostatTemperatureCalibration: async (endpoint) => {
const payload = [{
attribute: 'localTemperatureCalibration',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('hvacThermostat', payload);
},
thermostatOccupiedHeatingSetpoint: async (endpoint) => {
const payload = [{
attribute: 'occupiedHeatingSetpoint',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('hvacThermostat', payload);
},
thermostatPIHeatingDemand: async (endpoint) => {
const payload = [{
attribute: 'pIHeatingDemand',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('hvacThermostat', payload);
},
thermostatRunningState: async (endpoint) => {
const payload = [{
attribute: 'runningState',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('hvacThermostat', payload);
},
presentValue: async (endpoint) => {
const payload = [{
attribute: 'presentValue',
minimumReportInterval: 10,
maximumReportInterval: repInterval.MINUTE,
reportableChange: 1,
}];
await endpoint.configureReporting('genBinaryInput', payload);
},
activePower: async (endpoint) => {
const payload = [{
attribute: 'activePower',
minimumReportInterval: 1,
maximumReportInterval: repInterval.MINUTES_5,
reportableChange: 1,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
rmsCurrent: async (endpoint) => {
const payload = [{
attribute: 'rmsCurrent',
minimumReportInterval: 1,
maximumReportInterval: repInterval.MINUTES_5,
reportableChange: 1,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
rmsVoltage: async (endpoint) => {
const payload = [{
attribute: 'rmsVoltage',
minimumReportInterval: 1,
maximumReportInterval: repInterval.MINUTES_5,
reportableChange: 1,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
powerFactor: async (endpoint) => {
const payload = [{
attribute: 'powerFactor',
minimumReportInterval: 1,
maximumReportInterval: repInterval.MINUTES_5,
reportableChange: 1,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
acVoltageMultiplier: async (endpoint) => {
const payload = [{
attribute: 'acVoltageMultiplier',
minimumReportInterval: 10,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
acVoltageDivisor: async (endpoint) => {
const payload = [{
attribute: 'acVoltageDivisor',
minimumReportInterval: 10,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
acCurrentMultiplier: async (endpoint) => {
const payload = [{
attribute: 'acCurrentMultiplier',
minimumReportInterval: 10,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
acCurrentDivisor: async (endpoint) => {
const payload = [{
attribute: 'acCurrentDivisor',
minimumReportInterval: 10,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
acPowerMultiplier: async (endpoint) => {
const payload = [{
attribute: 'acPowerMultiplier',
minimumReportInterval: 10,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
acPowerDivisor: async (endpoint) => {
const payload = [{
attribute: 'acPowerDivisor',
minimumReportInterval: 10,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('haElectricalMeasurement', payload);
},
fanMode: async (endpoint) => {
const payload = [{
attribute: 'fanMode',
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 0,
}];
await endpoint.configureReporting('hvacFanCtrl', payload);
},
};
const generic = {
light_onoff_brightness: {
supports: 'on/off, brightness',
fromZigbee: [fz.on_off, fz.brightness, fz.ignore_basic_report],
toZigbee: [tz.light_onoff_brightness, tz.ignore_transition, tz.light_alert],
},
light_onoff_brightness_colortemp: {
supports: 'on/off, brightness, color temperature',
fromZigbee: [fz.color_colortemp, fz.on_off, fz.brightness],
toZigbee: [tz.light_onoff_brightness, tz.light_colortemp, tz.ignore_transition, tz.light_alert],
},
light_onoff_brightness_colorxy: {
supports: 'on/off, brightness, color xy',
fromZigbee: [fz.color_colortemp, fz.on_off, fz.brightness],
toZigbee: [tz.light_onoff_brightness, tz.light_color, tz.ignore_transition, tz.light_alert],
},
light_onoff_brightness_colortemp_colorxy: {
supports: 'on/off, brightness, color temperature, color xy',
fromZigbee: [
fz.color_colortemp, fz.on_off, fz.brightness,
fz.ignore_basic_report,
],
toZigbee: [
tz.light_onoff_brightness, tz.light_color_colortemp, tz.ignore_transition,
tz.light_alert,
],
},
};
const gledopto = {
light: {
supports: generic.light_onoff_brightness_colortemp_colorxy.supports,
fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee,
toZigbee: [
tz.gledopto_light_onoff_brightness, tz.gledopto_light_color_colortemp_white, tz.ignore_transition,
tz.light_alert,
],
},
};
const tzHuePowerOnBehavior = [tz.hue_power_on_behavior, tz.hue_power_on_brightness, tz.hue_power_on_color_temperature];
const hue = {
light_onoff_brightness: {
supports: generic.light_onoff_brightness.supports + ', power-on behavior',
fromZigbee: generic.light_onoff_brightness.fromZigbee,
toZigbee: generic.light_onoff_brightness.toZigbee.concat(tzHuePowerOnBehavior),
},
light_onoff_brightness_colortemp: {
supports: generic.light_onoff_brightness_colortemp.supports + ', power-on behavior',
fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee,
toZigbee: generic.light_onoff_brightness_colortemp.toZigbee.concat(tzHuePowerOnBehavior),
},
light_onoff_brightness_colorxy: {
supports: generic.light_onoff_brightness_colorxy.supports + ', power-on behavior',
fromZigbee: generic.light_onoff_brightness_colorxy.fromZigbee,
toZigbee: generic.light_onoff_brightness_colorxy.toZigbee.concat(tzHuePowerOnBehavior),
},
light_onoff_brightness_colortemp_colorxy: {
supports: generic.light_onoff_brightness_colortemp_colorxy.supports + ', power-on behavior',
fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee,
toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee.concat(tzHuePowerOnBehavior),
},
};
const devices = [
// Xiaomi
{
zigbeeModel: ['lumi.light.aqcn02'],
model: 'ZNLDP12LM',
vendor: 'Xiaomi',
description: 'Aqara smart LED bulb',
extend: generic.light_onoff_brightness_colortemp,
fromZigbee: [
fz.brightness, fz.color_colortemp, fz.on_off, fz.xiaomi_bulb_interval,
fz.ignore_light_brightness_report, fz.ignore_light_color_colortemp_report,
fz.ignore_occupancy_report, fz.ignore_humidity_report,
fz.ignore_pressure_report, fz.ignore_temperature_report,
],
},
{
zigbeeModel: ['lumi.sensor_switch'],
model: 'WXKG01LM',
vendor: 'Xiaomi',
description: 'MiJia wireless switch',
supports: 'single, double, triple, quadruple, many, long, long_release click',
fromZigbee: [fz.xiaomi_battery_3v, fz.WXKG01LM_click],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_switch.aq2', 'lumi.remote.b1acn01'],
model: 'WXKG11LM',
vendor: 'Xiaomi',
description: 'Aqara wireless switch',
supports: 'single, double click (and triple, quadruple, hold, release depending on model)',
fromZigbee: [
fz.xiaomi_battery_3v, fz.WXKG11LM_click,
fz.xiaomi_action_click_multistate,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_switch.aq3', 'lumi.sensor_swit'],
model: 'WXKG12LM',
vendor: 'Xiaomi',
description: 'Aqara wireless switch (with gyroscope)',
supports: 'single, double, shake, hold, release',
fromZigbee: [
fz.xiaomi_battery_3v, fz.WXKG12LM_action_click_multistate,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_86sw1', 'lumi.remote.b186acn01'],
model: 'WXKG03LM',
vendor: 'Xiaomi',
description: 'Aqara single key wireless wall switch',
supports: 'single (and double, hold, release and long click depending on model)',
fromZigbee: [
fz.xiaomi_battery_3v, fz.WXKG03LM_click,
fz.xiaomi_action_click_multistate,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_86sw2', 'lumi.sensor_86sw2.es1', 'lumi.remote.b286acn01'],
model: 'WXKG02LM',
vendor: 'Xiaomi',
description: 'Aqara double key wireless wall switch',
supports: 'left, right, both click (and double, long click for left, right and both depending on model)',
fromZigbee: [
fz.xiaomi_battery_3v, fz.WXKG02LM_click,
fz.WXKG02LM_click_multistate,
],
toZigbee: [],
endpoint: (device) => {
return {'left': 1, 'right': 2, 'both': 3};
},
},
{
zigbeeModel: ['lumi.ctrl_neutral1'],
model: 'QBKG04LM',
vendor: 'Xiaomi',
// eslint-disable-next-line
description: 'Aqara single key wired wall switch without neutral wire. Doesn\'t work as a router and doesn\'t support power meter',
supports: 'release/hold, on/off',
fromZigbee: [
fz.QBKG04LM_QBKG11LM_state, fz.QBKG04LM_buttons,
fz.QBKG04LM_QBKG11LM_operation_mode, fz.ignore_basic_report,
],
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode],
endpoint: (device) => {
return {'system': 1, 'default': 2};
},
},
{
zigbeeModel: ['lumi.ctrl_ln1.aq1', 'lumi.ctrl_ln1'],
model: 'QBKG11LM',
vendor: 'Xiaomi',
description: 'Aqara single key wired wall switch',
supports: 'on/off, power measurement',
fromZigbee: [
fz.QBKG04LM_QBKG11LM_state, fz.QBKG11LM_power, fz.QBKG04LM_QBKG11LM_operation_mode,
fz.QBKG11LM_click,
fz.ignore_multistate_report, fz.xiaomi_power,
],
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode],
},
{
zigbeeModel: ['lumi.ctrl_neutral2'],
model: 'QBKG03LM',
vendor: 'Xiaomi',
// eslint-disable-next-line
description: 'Aqara double key wired wall switch without neutral wire. Doesn\'t work as a router and doesn\'t support power meter',
supports: 'release/hold, on/off, temperature',
fromZigbee: [
fz.QBKG03LM_QBKG12LM_LLKZMK11LM_state, fz.QBKG03LM_buttons,
fz.QBKG03LM_QBKG12LM_operation_mode, fz.ignore_basic_report,
fz.generic_device_temperature,
],
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode],
endpoint: (device) => {
return {'system': 1, 'left': 2, 'right': 3};
},
},
{
zigbeeModel: ['lumi.ctrl_ln2.aq1'],
model: 'QBKG12LM',
vendor: 'Xiaomi',
description: 'Aqara double key wired wall switch',
supports: 'on/off, power measurement',
fromZigbee: [
fz.QBKG03LM_QBKG12LM_LLKZMK11LM_state, fz.QBKG12LM_LLKZMK11LM_power, fz.QBKG03LM_QBKG12LM_operation_mode,
fz.QBKG12LM_click, fz.ignore_multistate_report, fz.xiaomi_power,
],
toZigbee: [tz.on_off, tz.xiaomi_switch_operation_mode],
endpoint: (device) => {
return {'left': 1, 'right': 2};
},
},
{
zigbeeModel: ['lumi.sens', 'lumi.sensor_ht'],
model: 'WSDCGQ01LM',
vendor: 'Xiaomi',
description: 'MiJia temperature & humidity sensor',
supports: 'temperature and humidity',
fromZigbee: [
fz.xiaomi_battery_3v, fz.WSDCGQ01LM_WSDCGQ11LM_interval, fz.xiaomi_temperature, fz.humidity,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.weather'],
model: 'WSDCGQ11LM',
vendor: 'Xiaomi',
description: 'Aqara temperature, humidity and pressure sensor',
supports: 'temperature, humidity and pressure',
fromZigbee: [
fz.xiaomi_battery_3v, fz.xiaomi_temperature, fz.humidity, fz.generic_pressure,
fz.WSDCGQ01LM_WSDCGQ11LM_interval,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_motion'],
model: 'RTCGQ01LM',
vendor: 'Xiaomi',
description: 'MiJia human body movement sensor',
supports: 'occupancy',
fromZigbee: [fz.xiaomi_battery_3v, fz.occupancy_with_timeout],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_motion.aq2'],
model: 'RTCGQ11LM',
vendor: 'Xiaomi',
description: 'Aqara human body movement and illuminance sensor',
supports: 'occupancy and illuminance',
fromZigbee: [
fz.xiaomi_battery_3v, fz.occupancy_with_timeout, fz.generic_illuminance,
fz.RTCGQ11LM_interval,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_magnet'],
model: 'MCCGQ01LM',
vendor: 'Xiaomi',
description: 'MiJia door & window contact sensor',
supports: 'contact',
fromZigbee: [
fz.xiaomi_battery_3v, fz.xiaomi_contact,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_magnet.aq2'],
model: 'MCCGQ11LM',
vendor: 'Xiaomi',
description: 'Aqara door & window contact sensor',
supports: 'contact',
fromZigbee: [
fz.xiaomi_battery_3v, fz.xiaomi_contact, fz.xiaomi_contact_interval,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_wleak.aq1'],
model: 'SJCGQ11LM',
vendor: 'Xiaomi',
description: 'Aqara water leak sensor',
supports: 'water leak true/false',
fromZigbee: [fz.xiaomi_battery_3v, fz.SJCGQ11LM_water_leak_iaszone],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_cube', 'lumi.sensor_cube.aqgl01'],
model: 'MFKZQ01LM',
vendor: 'Xiaomi',
description: 'Mi/Aqara smart home cube',
supports: 'shake, wakeup, fall, tap, slide, flip180, flip90, rotate_left and rotate_right',
fromZigbee: [
fz.xiaomi_battery_3v, fz.MFKZQ01LM_action_multistate, fz.MFKZQ01LM_action_analog,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.plug'],
model: 'ZNCZ02LM',
description: 'Mi power plug ZigBee',
supports: 'on/off, power measurement',
vendor: 'Xiaomi',
fromZigbee: [
fz.on_off, fz.xiaomi_power, fz.xiaomi_plug_state, fz.ignore_occupancy_report,
fz.ignore_illuminance_report,
],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
// By default this device is in group 0; remove it otherwise the E1743 will control it.
// https://github.com/Koenkk/zigbee2mqtt/issues/2059
const endpoint = device.getEndpoint(1);
await endpoint.removeFromGroup(0);
},
},
{
zigbeeModel: ['lumi.plug.mitw01'],
model: 'ZNCZ03LM',
description: 'Mi power plug ZigBee TW',
supports: 'on/off, power measurement',
vendor: 'Xiaomi',
fromZigbee: [
fz.on_off, fz.xiaomi_power, fz.xiaomi_plug_state,
fz.ignore_occupancy_report,
fz.ignore_illuminance_report,
],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['lumi.ctrl_86plug', 'lumi.ctrl_86plug.aq1'],
model: 'QBCZ11LM',
description: 'Aqara socket Zigbee',
supports: 'on/off, power measurement',
vendor: 'Xiaomi',
fromZigbee: [
fz.on_off, fz.xiaomi_power, fz.xiaomi_plug_state,
],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['lumi.sensor_smoke'],
model: 'JTYJ-GD-01LM/BW',
description: 'MiJia Honeywell smoke detector',
supports: 'smoke',
vendor: 'Xiaomi',
fromZigbee: [fz.xiaomi_battery_3v, fz.JTYJGD01LMBW_smoke, fz.JTYJGD01LMBW_smoke_density],
toZigbee: [tz.JTQJBF01LMBW_JTYJGD01LMBW_sensitivity, tz.JTQJBF01LMBW_JTYJGD01LMBW_selfest],
},
{
zigbeeModel: ['lumi.sensor_natgas'],
model: 'JTQJ-BF-01LM/BW',
vendor: 'Xiaomi',
description: 'MiJia gas leak detector ',
supports: 'gas',
fromZigbee: [fz.JTQJBF01LMBW_gas, fz.JTQJBF01LMBW_sensitivity, fz.JTQJBF01LMBW_gas_density],
toZigbee: [tz.JTQJBF01LMBW_JTYJGD01LMBW_sensitivity, tz.JTQJBF01LMBW_JTYJGD01LMBW_selfest],
},
{
zigbeeModel: ['lumi.lock.v1'],
model: 'A6121',
vendor: 'Xiaomi',
description: 'Vima Smart Lock',
supports: 'inserted, forgotten, key error',
fromZigbee: [fz.xiaomi_lock_report],
toZigbee: [],
},
{
zigbeeModel: ['lumi.vibration.aq1'],
model: 'DJT11LM',
vendor: 'Xiaomi',
description: 'Aqara vibration sensor',
supports: 'drop, tilt and touch',
fromZigbee: [
fz.xiaomi_battery_3v, fz.DJT11LM_vibration,
],
toZigbee: [tz.DJT11LM_vibration_sensitivity],
},
{
zigbeeModel: ['lumi.curtain', 'lumi.curtain.aq2'],
model: 'ZNCLDJ11LM',
description: 'Aqara curtain motor',
supports: 'open, close, stop, position',
vendor: 'Xiaomi',
fromZigbee: [fz.ZNCLDJ11LM_ZNCLDJ12LM_curtain_analog_output, fz.cover_position_tilt, fz.ignore_basic_report],
toZigbee: [tz.ZNCLDJ11LM_ZNCLDJ12LM_control],
},
{
zigbeeModel: ['lumi.curtain.hagl04'],
model: 'ZNCLDJ12LM',
vendor: 'Xiaomi',
description: 'Aqara B1 curtain motor ',
supports: 'open, close, stop, position',
fromZigbee: [fz.ZNCLDJ11LM_ZNCLDJ12LM_curtain_analog_output, fz.cover_position_tilt, fz.ignore_basic_report],
toZigbee: [tz.ZNCLDJ11LM_ZNCLDJ12LM_control],
onEvent: async (type, data, device) => {
// The position (genAnalogOutput.presentValue) reported via an attribute contains an invaid value
// however when reading it will provide the correct value.
if (data.type === 'attributeReport' && data.cluster === 'genAnalogOutput') {
await device.endpoints[0].read('genAnalogOutput', ['presentValue']);
}
},
},
{
zigbeeModel: ['lumi.relay.c2acn01'],
model: 'LLKZMK11LM',
vendor: 'Xiaomi',
description: 'Aqara wireless relay controller',
supports: 'on/off, power measurement',
fromZigbee: [
fz.QBKG03LM_QBKG12LM_LLKZMK11LM_state, fz.QBKG12LM_LLKZMK11LM_power, fz.xiaomi_power,
fz.ignore_multistate_report,
],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'l1': 1, 'l2': 2};
},
},
{
zigbeeModel: ['lumi.lock.acn02'],
model: 'ZNMS12LM',
description: 'Aqara S2 Lock',
supports: 'report: open, close, operation',
vendor: 'Xiaomi',
fromZigbee: [
fz.ZNMS12LM_ZNMS13LM_closuresDoorLock_report, fz.ignore_basic_report,
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.lock.acn03'],
model: 'ZNMS13LM',
description: 'Aqara S2 Lock Pro',
supports: 'report: open, close, operation',
vendor: 'Xiaomi',
fromZigbee: [
fz.ZNMS12LM_ZNMS13LM_closuresDoorLock_report, fz.ignore_basic_report,
],
toZigbee: [],
},
// TuYa
{
zigbeeModel: ['TS0201'],
model: 'TS0201',
vendor: 'TuYa',
description: 'Temperature & humidity sensor with display',
supports: 'temperature and humidity',
fromZigbee: [fz.xiaomi_battery_3v, fz.temperature, fz.humidity],
toZigbee: [],
},
// IKEA
{
zigbeeModel: [
'TRADFRI bulb E27 WS opal 980lm', 'TRADFRI bulb E26 WS opal 980lm',
'TRADFRI bulb E27 WS\uFFFDopal 980lm',
],
model: 'LED1545G12',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E26/E27 980 lumen, dimmable, white spectrum, opal white',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI bulb E27 WS clear 950lm', 'TRADFRI bulb E26 WS clear 950lm'],
model: 'LED1546G12',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E26/E27 950 lumen, dimmable, white spectrum, clear',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI bulb E27 opal 1000lm', 'TRADFRI bulb E27 W opal 1000lm'],
model: 'LED1623G12',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E27 1000 lumen, dimmable, opal white',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['TRADFRI bulb GU10 WS 400lm'],
model: 'LED1537R6',
vendor: 'IKEA',
description: 'TRADFRI LED bulb GU10 400 lumen, dimmable, white spectrum',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI bulb GU10 W 400lm'],
model: 'LED1650R5',
vendor: 'IKEA',
description: 'TRADFRI LED bulb GU10 400 lumen, dimmable',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['TRADFRI bulb E14 WS opal 400lm', 'TRADFRI bulb E12 WS opal 400lm'],
model: 'LED1536G5',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E12/E14 400 lumen, dimmable, white spectrum, opal white',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI bulb GU10 WW 400lm'],
model: 'LED1837R5',
vendor: 'IKEA',
description: 'TRADFRI LED bulb GU10 400 lumen, dimmable',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['TRADFRI bulb E27 WW clear 250lm'],
model: 'LED1842G3',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E27 WW clear 250 lumen, dimmable',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['TRADFRI bulb E14 WS opal 600lm'],
model: 'LED1733G7',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E14 600 lumen, dimmable, white spectrum, opal white',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI bulb E26 opal 1000lm', 'TRADFRI bulb E26 W opal 1000lm'],
model: 'LED1622G12',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E26 1000 lumen, dimmable, opal white',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: [
'TRADFRI bulb E27 CWS opal 600lm',
'TRADFRI bulb E26 CWS opal 600lm',
'TRADFRI bulb E14 CWS opal 600lm'],
model: 'LED1624G9',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E14/E26/E27 600 lumen, dimmable, color, opal white',
extend: generic.light_onoff_brightness_colorxy,
},
{
zigbeeModel: [
'TRADFRI bulb E14 W op/ch 400lm', 'TRADFRI bulb E12 W op/ch 400lm',
'TRADFRI bulb E17 W op/ch 400lm',
],
model: 'LED1649C5',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E12/E14/E17 400 lumen, dimmable warm white, chandelier opal',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['TRADFRI bulb E27 WS opal 1000lm', 'TRADFRI bulb E26 WS opal 1000lm'],
model: 'LED1732G11',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E27 1000 lumen, dimmable, white spectrum, opal white',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI bulb E27 WW 806lm'],
model: 'LED1836G9',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E27 806 lumen, dimmable, warm white',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['TRADFRI bulb E27 WS clear 806lm'],
model: 'LED1736G9',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E27 806 lumen, dimmable, white spectrum, clear',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LEPTITER Recessed spot light'],
model: 'T1820',
vendor: 'IKEA',
description: 'LEPTITER Recessed spot light, dimmable, white spectrum',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI wireless dimmer'],
model: 'ICTC-G-1',
vendor: 'IKEA',
description: 'TRADFRI wireless dimmer',
supports: 'brightness [0-255] (quick rotate for instant 0/255), action',
fromZigbee: [
fz.cmd_move, fz.cmd_move_with_onoff, fz.cmd_stop, fz.cmd_stop_with_onoff,
fz.cmd_move_to_level_with_onoff, fz.generic_battery,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genLevelCtrl', 'genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['TRADFRI transformer 10W', 'TRADFRI Driver 10W'],
model: 'ICPSHC24-10EU-IL-1',
vendor: 'IKEA',
description: 'TRADFRI driver for wireless control (10 watt)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['TRADFRI transformer 30W', 'TRADFRI Driver 30W'],
model: 'ICPSHC24-30EU-IL-1',
vendor: 'IKEA',
description: 'TRADFRI driver for wireless control (30 watt)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['FLOALT panel WS 30x30'],
model: 'L1527',
vendor: 'IKEA',
description: 'FLOALT LED light panel, dimmable, white spectrum (30x30 cm)',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['FLOALT panel WS 60x60'],
model: 'L1529',
vendor: 'IKEA',
description: 'FLOALT LED light panel, dimmable, white spectrum (60x60 cm)',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['FLOALT panel WS 30x90'],
model: 'L1528',
vendor: 'IKEA',
description: 'FLOALT LED light panel, dimmable, white spectrum (30x90 cm)',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['SURTE door WS 38x64'],
model: 'L1531',
vendor: 'IKEA',
description: 'SURTE door light panel, dimmable, white spectrum (38x64 cm)',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI control outlet'],
model: 'E1603/E1702',
description: 'TRADFRI control outlet',
supports: 'on/off',
vendor: 'IKEA',
fromZigbee: [
fz.on_off, fz.ignore_genLevelCtrl_report, fz.ignore_basic_report,
],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['TRADFRI remote control'],
model: 'E1524/E1810',
description: 'TRADFRI remote control',
supports:
'toggle, arrow left/right click/hold/release, brightness up/down click/hold/release',
vendor: 'IKEA',
fromZigbee: [
fz.cmdToggle, fz.E1524_arrow_click, fz.E1524_arrow_hold, fz.E1524_arrow_release,
fz.E1524_brightness_up_click, fz.E1524_brightness_down_click, fz.E1524_brightness_up_hold,
fz.E1524_brightness_up_release, fz.E1524_brightness_down_hold, fz.E1524_brightness_down_release,
fz.generic_battery, fz.E1524_hold,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['TRADFRI on/off switch'],
model: 'E1743',
vendor: 'IKEA',
description: 'TRADFRI ON/OFF switch',
supports: 'on, off, brightness up/down/stop',
fromZigbee: [
fz.genOnOff_cmdOn, fz.genOnOff_cmdOff, fz.E1743_brightness_up, fz.E1743_brightness_down,
fz.E1743_brightness_stop, fz.generic_battery,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['SYMFONISK Sound Controller'],
model: 'E1744',
vendor: 'IKEA',
description: 'SYMFONISK sound controller',
supports: 'volume up/down, play/pause, skip forward/backward',
fromZigbee: [fz.cmd_move, fz.cmd_stop, fz.E1744_play_pause, fz.E1744_skip, fz.generic_battery],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genLevelCtrl', 'genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['TRADFRI motion sensor'],
model: 'E1525',
vendor: 'IKEA',
description: 'TRADFRI motion sensor',
supports: 'occupancy',
fromZigbee: [fz.generic_battery, fz.E1525_occupancy],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['TRADFRI signal repeater'],
model: 'E1746',
description: 'TRADFRI signal repeater',
supports: 'linkquality',
vendor: 'IKEA',
fromZigbee: [fz.E1746_linkquality],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const payload = [{attribute: 'modelId', minimumReportInterval: 3600, maximumReportInterval: 14400}];
await endpoint.configureReporting('genBasic', payload);
},
},
{
zigbeeModel: ['FYRTUR block-out roller blind'],
model: 'E1757',
vendor: 'IKEA',
description: 'FYRTUR roller blind',
supports: 'open, close, stop, position',
fromZigbee: [fz.cover_position_tilt, fz.battery_percentage_remaining],
toZigbee: [tz.cover_state, tz.cover_position_tilt],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
await configureReporting.batteryPercentageRemaining(endpoint);
await configureReporting.currentPositionLiftPercentage(endpoint);
},
},
{
zigbeeModel: ['KADRILJ roller blind'],
model: 'E1926',
vendor: 'IKEA',
description: 'KADRILJ roller blind',
supports: 'open, close, stop, position',
fromZigbee: [fz.cover_position_tilt, fz.battery_percentage_remaining],
toZigbee: [tz.cover_state, tz.cover_position_tilt],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
await configureReporting.batteryPercentageRemaining(endpoint);
await configureReporting.currentPositionLiftPercentage(endpoint);
},
},
{
zigbeeModel: ['TRADFRI open/close remote'],
model: 'E1766',
vendor: 'IKEA',
description: 'TRADFRI open/close remote',
supports: 'click',
fromZigbee: [fz.generic_battery, fz.cover_close, fz.cover_open, fz.cover_stop],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['GUNNARP panel 40*40'],
model: 'T1829',
description: 'GUNNARP panel 40*40',
vendor: 'IKEA',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TRADFRI bulb E12 WS opal 600lm'],
model: 'LED1738G7',
vendor: 'IKEA',
description: 'TRADFRI LED bulb E12 600 lumen, dimmable, white spectrum, opal white',
extend: generic.light_onoff_brightness_colortemp,
},
// Philips
{
zigbeeModel: ['LTC012'],
model: '3306431P7',
vendor: 'Philips',
description: 'Hue Struana',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LLC012', 'LLC011'],
model: '7299760PH',
vendor: 'Philips',
description: 'Hue Bloom',
extend: hue.light_onoff_brightness_colorxy,
},
{
zigbeeModel: ['LLC020'],
model: '7146060PH',
vendor: 'Philips',
description: 'Hue Go',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LCC001'],
model: '4090531P7',
vendor: 'Philips',
description: 'Hue Flourish white and color ambiance ceiling light',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LCG002'],
model: '929001953101',
vendor: 'Philips',
description: 'Hue White and Color Ambiance GU10',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LWA004'],
model: '8718699688820',
vendor: 'Philips',
description: 'Hue Filament Standard A60/E27 bluetooth',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LWB004'],
model: '433714',
vendor: 'Philips',
description: 'Hue Lux A19 bulb E27',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LWB006', 'LWB014'],
model: '9290011370',
vendor: 'Philips',
description: 'Hue white A60 bulb E27',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LWA001'],
model: '8718699673147',
vendor: 'Philips',
description: 'Hue white A60 bulb E27 bluetooth',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LTA001'],
model: '9290022169',
vendor: 'Philips',
description: 'Hue white ambiance E27 with Bluetooth',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LWB010'],
model: '8718696449691',
vendor: 'Philips',
description: 'Hue White Single bulb B22',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LWG001'],
model: '9290018195',
vendor: 'Philips',
description: 'Hue white GU10',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LWG004'],
model: 'LWG004',
vendor: 'Philips',
description: 'Hue white GU10 bluetooth',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LWO001'],
model: '8718699688882',
vendor: 'Philips',
description: 'Hue white Filament bulb G93 E27 bluetooth',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LST001'],
model: '7299355PH',
vendor: 'Philips',
description: 'Hue white and color ambiance LightStrip',
extend: hue.light_onoff_brightness_colorxy,
},
{
zigbeeModel: ['LST002'],
model: '915005106701',
vendor: 'Philips',
description: 'Hue white and color ambiance LightStrip plus',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LST003', 'LST004'],
model: '9290018187B',
vendor: 'Philips',
description: 'Hue white and color ambiance LightStrip Outdoor',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LCA001', 'LCA002'],
model: '9290022166',
vendor: 'Philips',
description: 'Hue white and color ambiance E26/E27',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LCT001', 'LCT007', 'LCT010', 'LCT012', 'LCT014', 'LCT015', 'LCT016'],
model: '9290012573A',
vendor: 'Philips',
description: 'Hue white and color ambiance E26/E27/E14',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LCT002'],
model: '9290002579A',
vendor: 'Philips',
description: 'Hue white and color ambiance BR30',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LCT003'],
model: '8718696485880',
vendor: 'Philips',
description: 'Hue white and color ambiance GU10',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LCT024'],
model: '915005733701',
vendor: 'Philips',
description: 'Hue White and color ambiance Play Lightbar',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LTW011'],
model: '464800',
vendor: 'Philips',
description: 'Hue white ambiance BR30 flood light',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTW012'],
model: '8718696695203',
vendor: 'Philips',
description: 'Hue white ambiance E14',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LWE002'],
model: '9290020399',
vendor: 'Philips',
description: 'Hue white E14',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LTW013'],
model: '8718696598283',
vendor: 'Philips',
description: 'Hue white ambiance GU10',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTG002'],
model: '929001953301',
vendor: 'Philips',
description: 'Hue white ambiance GU10 with Bluetooth',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTW015'],
model: '9290011998B',
vendor: 'Philips',
description: 'Hue white ambiance E26',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTA002'],
model: '9290022167',
vendor: 'Philips',
description: 'Hue white ambiance E26 with Bluetooth',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTW010', 'LTW001', 'LTW004'],
model: '8718696548738',
vendor: 'Philips',
description: 'Hue white ambiance E26/E27',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTW017'],
model: '915005587401',
vendor: 'Philips',
description: 'Hue white ambiance Adore light',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LCW001'],
model: '4090130P7',
vendor: 'Philips',
description: 'Hue Sana',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LTC001'],
model: '3261030P7',
vendor: 'Philips',
description: 'Hue Being',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTC003'],
model: '3261331P7',
vendor: 'Philips',
description: 'Hue white ambiance Still',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTC011'],
model: '4096730U7',
vendor: 'Philips',
description: 'Hue Cher ceiling light',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTC013'],
model: '3216131P5',
vendor: 'Philips',
description: 'Hue white ambiance Aurelle square panel light',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTC015'],
model: '3216331P5',
vendor: 'Philips',
description: 'Hue white ambiance Aurelle rectangle panel light',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTC016'],
model: '3216431P5',
vendor: 'Philips',
description: 'Hue white ambiance Aurelle round panel light',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LTP003', 'LTP001'],
model: '4033930P7',
vendor: 'Philips',
description: 'Hue white ambiance suspension Fair',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LWF002'],
model: '9290011370B',
vendor: 'Philips',
description: 'Hue white A60 bulb E27',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LWB015'],
model: '046677476816',
vendor: 'Philips',
description: 'Hue white PAR38 outdoor',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LLC010'],
model: '7199960PH',
vendor: 'Philips',
description: 'Hue Iris',
extend: hue.light_onoff_brightness_colorxy,
},
{
zigbeeModel: ['RWL020', 'RWL021'],
model: '324131092621',
vendor: 'Philips',
description: 'Hue dimmer switch',
supports: 'on/off, brightness, up/down/hold/release, click count',
fromZigbee: [
fz._324131092621_ignore_on, fz._324131092621_ignore_off, fz._324131092621_ignore_step,
fz._324131092621_ignore_stop, fz._324131092621_notification,
fz.battery_percentage_remaining,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint1 = device.getEndpoint(1);
await bind(endpoint1, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
const endpoint2 = device.getEndpoint(2);
const options = {manufacturerCode: 0x100B, disableDefaultResponse: true};
await endpoint2.write('genBasic', {0x0031: {value: 0x000B, type: 0x19}}, options);
await bind(endpoint2, coordinatorEndpoint, ['manuSpecificPhilips', 'genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint2);
},
endpoint: (device) => {
return {'ep1': 1, 'ep2': 2};
},
},
{
zigbeeModel: ['SML001'],
model: '9290012607',
vendor: 'Philips',
description: 'Hue motion sensor',
supports: 'occupancy, temperature, illuminance',
fromZigbee: [
fz.battery_percentage_remaining, fz.occupancy, fz.temperature,
fz.generic_illuminance,
fz.ignore_basic_report,
],
toZigbee: [tz.occupancy_timeout, tz.hue_motion_sensitivity],
endpoint: (device) => {
return {
'default': 2, // default
'ep1': 1,
'ep2': 2, // e.g. for write to msOccupancySensing
};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
const binds = ['genPowerCfg', 'msIlluminanceMeasurement', 'msTemperatureMeasurement', 'msOccupancySensing'];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.batteryPercentageRemaining(endpoint);
await configureReporting.occupancy(endpoint);
await configureReporting.temperature(endpoint);
await configureReporting.illuminance(endpoint);
},
},
{
zigbeeModel: ['SML002'],
model: '9290019758',
vendor: 'Philips',
description: 'Hue motion outdoor sensor',
supports: 'occupancy, temperature, illuminance',
fromZigbee: [
fz.battery_percentage_remaining, fz.occupancy, fz.temperature,
fz.generic_illuminance,
],
toZigbee: [tz.occupancy_timeout, tz.hue_motion_sensitivity],
endpoint: (device) => {
return {
'default': 2, // default
'ep1': 1,
'ep2': 2, // e.g. for write to msOccupancySensing
};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
const binds = ['genPowerCfg', 'msIlluminanceMeasurement', 'msTemperatureMeasurement', 'msOccupancySensing'];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.batteryPercentageRemaining(endpoint);
await configureReporting.occupancy(endpoint);
await configureReporting.temperature(endpoint);
await configureReporting.illuminance(endpoint);
},
},
{
zigbeeModel: ['LOM001'],
model: '929002240401',
vendor: 'Philips',
description: 'Hue smart plug - EU',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(11);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['LOM002'],
model: '046677552343',
vendor: 'Philips',
description: 'Hue smart plug bluetooth',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(11);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['LLC014'],
model: '7099860PH',
vendor: 'Philips',
description: 'LivingColors Aura',
extend: hue.light_onoff_brightness_colorxy,
},
{
zigbeeModel: ['LTC014'],
model: '3216231P5',
vendor: 'Philips',
description: 'Hue white ambiance Aurelle rectangle panel light',
extend: hue.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['1744530P7'],
model: '8718696170625',
vendor: 'Philips',
description: 'Hue Fuzo outdoor wall light',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['1743630P7'],
model: '17436/30/P7',
vendor: 'Philips',
description: 'Hue Welcome white flood light',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['LCS001'],
model: '1741830P7',
vendor: 'Philips',
description: 'Hue Lily outdoor spot light',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LWV001'],
model: '929002241201',
vendor: 'Philips',
description: 'Hue white filament Edison E27 LED',
extend: hue.light_onoff_brightness,
},
{
zigbeeModel: ['HML004'],
model: '3115331PH',
vendor: 'Philips',
description: 'Phoenix light',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
// Belkin
{
zigbeeModel: ['MZ100'],
model: 'F7C033',
vendor: 'Belkin',
description: 'WeMo smart LED bulb',
fromZigbee: [
fz.brightness, fz.on_off,
],
supports: generic.light_onoff_brightness.supports,
toZigbee: generic.light_onoff_brightness.toZigbee,
},
// EDP
{
zigbeeModel: ['ZB-SmartPlug-1.0.0'],
model: 'PLUG EDP RE:DY',
vendor: 'EDP',
description: 're:dy plug',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.generic_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(85);
await configureReporting.onOff(endpoint);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
{
zigbeeModel: ['ZB-RelayControl-1.0.0'],
model: 'SWITCH EDP RE:DY',
vendor: 'EDP',
description: 're:dy switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(85);
await configureReporting.onOff(endpoint);
},
},
// Custom devices (DiY)
{
zigbeeModel: ['lumi.router'],
model: 'CC2530.ROUTER',
vendor: 'Custom devices (DiY)',
description: '[CC2530 router](http://ptvo.info/cc2530-based-zigbee-coordinator-and-router-112/)',
supports: 'state, description, type, rssi',
fromZigbee: [
fz.CC2530ROUTER_state, fz.CC2530ROUTER_meta, fz.ignore_basic_report,
],
toZigbee: [tz.ptvo_switch_trigger],
},
{
zigbeeModel: ['ptvo.switch'],
model: 'ptvo.switch',
vendor: 'Custom devices (DiY)',
description: '[Multi-channel relay switch](https://ptvo.info/zigbee-switch-configurable-firmware-router-199/)',
supports: 'hold, single, double and triple click, on/off',
fromZigbee: [fz.ptvo_switch_state, fz.ptvo_switch_buttons],
toZigbee: [tz.on_off, tz.ptvo_switch_trigger],
endpoint: (device) => {
return {'bottom_left': 1, 'bottom_right': 2, 'top_left': 3, 'top_right': 4, 'center': 5};
},
},
{
zigbeeModel: ['DNCKAT_S001'],
model: 'DNCKATSW001',
vendor: 'Custom devices (DiY)',
description: '[DNCKAT single key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['DNCKAT_S002'],
model: 'DNCKATSW002',
vendor: 'Custom devices (DiY)',
description: '[DNCKAT double key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)',
supports: 'hold/release, on/off',
fromZigbee: [fz.DNCKAT_S00X_state, fz.DNCKAT_S00X_buttons],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'left': 1, 'right': 2};
},
},
{
zigbeeModel: ['DNCKAT_S003'],
model: 'DNCKATSW003',
vendor: 'Custom devices (DiY)',
description: '[DNCKAT triple key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)',
supports: 'hold/release, on/off',
fromZigbee: [fz.DNCKAT_S00X_state, fz.DNCKAT_S00X_buttons],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'left': 1, 'center': 2, 'right': 3};
},
},
{
zigbeeModel: ['DNCKAT_S004'],
model: 'DNCKATSW004',
vendor: 'Custom devices (DiY)',
description: '[DNCKAT quadruple key wired wall light switch](https://github.com/dzungpv/dnckatsw00x/)',
supports: 'hold/release, on/off',
fromZigbee: [fz.DNCKAT_S00X_state, fz.DNCKAT_S00X_buttons],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'bottom_left': 1, 'bottom_right': 2, 'top_left': 3, 'top_right': 4};
},
},
{
zigbeeModel: ['ZigUP'],
model: 'ZigUP',
vendor: 'Custom devices (DiY)',
description: '[CC2530 based ZigBee relais, switch, sensor and router](https://github.com/formtapez/ZigUP/)',
supports: 'relais, RGB-stripe, sensors, S0-counter, ADC, digital I/O',
fromZigbee: [fz.ZigUP_parse],
toZigbee: [tz.on_off, tz.light_color, tz.ZigUP_lock],
},
{
zigbeeModel: ['DIYRuZ_R4_5'],
model: 'DIYRuZ_R4_5',
vendor: 'Custom devices (DiY)',
description: '[DiY 4 Relays + 4 switches + 1 buzzer](http://modkam.ru/?p=1054)',
supports: 'on/off',
fromZigbee: [fz.DNCKAT_S00X_state],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'bottom_left': 1, 'bottom_right': 2, 'top_left': 3, 'top_right': 4, 'center': 5};
},
},
{
zigbeeModel: ['DIYRuZ_KEYPAD20'],
model: 'DIYRuZ_KEYPAD20',
vendor: 'Custom devices (DiY)',
description: '[DiY 20 button keypad](http://modkam.ru/?p=1114)',
supports: 'click',
fromZigbee: [fz.keypad20states, fz.keypad20_battery],
toZigbee: [],
endpoint: (device) => {
return {
'btn_1': 1, 'btn_2': 2, 'btn_3': 3, 'btn_4': 4, 'btn_5': 5,
'btn_6': 6, 'btn_7': 7, 'btn_8': 8, 'btn_9': 9, 'btn_10': 10,
'btn_11': 11, 'btn_12': 12, 'btn_13': 13, 'btn_14': 14, 'btn_15': 15,
'btn_16': 16, 'btn_17': 17, 'btn_18': 18, 'btn_19': 19, 'btn_20': 20,
};
},
},
{
zigbeeModel: ['DIYRuZ_magnet'],
model: 'DIYRuZ_magnet',
vendor: 'DIYRuZ',
description: '[DIYRuZ contact sensor](https://modkam.ru/?p=1220)',
supports: 'contact',
fromZigbee: [fz.keypad20_battery, fz.xiaomi_contact],
toZigbee: [],
},
{
zigbeeModel: ['ZWallRemote0'],
model: 'ZWallRemote0',
vendor: 'Custom devices (DiY)',
description: 'Matts Wall Switch Remote (https://github.com/mattlokes/ZWallRemote)',
supports: 'on/off',
fromZigbee: [fz.cmdToggle],
toZigbee: [],
},
{
zigbeeModel: ['DTB190502A1'],
model: 'DTB190502A1',
vendor: 'Custom devices (DiY)',
description: '[CC2530 based IO Board https://databyte.ch/?portfolio=zigbee-erstes-board-dtb190502a)',
supports: 'switch, buttons',
fromZigbee: [fz.DTB190502A1_parse],
toZigbee: [tz.DTB190502A1_LED],
},
// eCozy
{
zigbeeModel: ['Thermostat'],
model: '1TST-EU',
vendor: 'eCozy',
description: 'Smart heating thermostat',
supports: 'temperature, occupancy, un-/occupied heating, schedule',
fromZigbee: [
fz.generic_battery_voltage,
fz.thermostat_att_report,
],
toZigbee: [
tz.factory_reset, tz.thermostat_local_temperature, tz.thermostat_local_temperature_calibration,
tz.thermostat_occupancy, tz.thermostat_occupied_heating_setpoint,
tz.thermostat_unoccupied_heating_setpoint, tz.thermostat_setpoint_raise_lower,
tz.thermostat_remote_sensing, tz.thermostat_control_sequence_of_operation, tz.thermostat_system_mode,
tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_weekly_schedule_rsp,
tz.thermostat_relay_status_log, tz.thermostat_relay_status_log_rsp,
],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(3);
const binds = [
'genBasic', 'genPowerCfg', 'genIdentify', 'genTime', 'genPollCtrl', 'hvacThermostat',
'hvacUserInterfaceCfg',
];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.thermostatTemperature(endpoint);
},
},
// OSRAM
{
zigbeeModel: ['Outdoor Lantern W RGBW OSRAM'],
model: '4058075816718',
vendor: 'OSRAM',
description: 'SMART+ outdoor wall lantern RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['Classic A60 RGBW'],
model: 'AA69697',
vendor: 'OSRAM',
description: 'Classic A60 RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['CLA60 RGBW OSRAM'],
model: 'AC03645',
vendor: 'OSRAM',
description: 'LIGHTIFY LED CLA60 E27 RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['CLA60 TW OSRAM'],
model: 'AC03642',
vendor: 'OSRAM',
description: 'SMART+ CLASSIC A 60 TW',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['PAR16 DIM Z3'],
model: 'AC08560',
vendor: 'OSRAM',
description: 'SMART+ LED PAR16 GU10',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['CLA60 RGBW Z3'],
model: 'AC03647',
vendor: 'OSRAM',
description: 'SMART+ LED CLASSIC E27 RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
// AA70155 is model number of both bulbs.
zigbeeModel: ['LIGHTIFY A19 Tunable White', 'Classic A60 TW'],
model: 'AA70155',
vendor: 'OSRAM',
description: 'LIGHTIFY LED A19 tunable white / Classic A60 TW',
supports: generic.light_onoff_brightness_colortemp.supports,
toZigbee: generic.light_onoff_brightness_colortemp.toZigbee.concat([tz.osram_cmds]),
fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee,
},
{
zigbeeModel: ['PAR16 50 TW'],
model: 'AA68199',
vendor: 'OSRAM',
description: 'LIGHTIFY LED PAR16 50 GU10 tunable white',
supports: generic.light_onoff_brightness_colortemp.supports,
toZigbee: generic.light_onoff_brightness_colortemp.toZigbee.concat([tz.osram_cmds]),
fromZigbee: generic.light_onoff_brightness_colortemp.fromZigbee,
},
{
zigbeeModel: ['Classic B40 TW - LIGHTIFY'],
model: 'AB32840',
vendor: 'OSRAM',
description: 'LIGHTIFY LED Classic B40 tunable white',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['Ceiling TW OSRAM'],
model: '4058075816794',
vendor: 'OSRAM',
description: 'Smart+ Ceiling TW',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['Classic A60 W clear - LIGHTIFY'],
model: 'AC03641',
vendor: 'OSRAM',
description: 'LIGHTIFY LED Classic A60 clear',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['Surface Light W �C LIGHTIFY'],
model: '4052899926158',
vendor: 'OSRAM',
description: 'LIGHTIFY Surface Light TW',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['Surface Light TW'],
model: 'AB401130055',
vendor: 'OSRAM',
description: 'LIGHTIFY Surface Light LED Tunable White',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['Plug 01'],
model: 'AB3257001NJ',
description: 'Smart+ plug',
supports: 'on/off',
vendor: 'OSRAM',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(3);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['Plug Z3'],
model: 'AC10691',
description: 'Smart+ plug',
supports: 'on/off',
vendor: 'OSRAM',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
let endpoint = device.getEndpoint(3);
// Endpoint 3 is not always present, use endpoint 1 in that case
// https://github.com/Koenkk/zigbee2mqtt/issues/2178
if (!endpoint) endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['Flex RGBW', 'LIGHTIFY Indoor Flex RGBW', 'LIGHTIFY Flex RGBW'],
model: '4052899926110',
vendor: 'OSRAM',
description: 'Flex RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LIGHTIFY Outdoor Flex RGBW', 'LIGHTIFY FLEX OUTDOOR RGBW'],
model: '4058075036185',
vendor: 'OSRAM',
description: 'Outdoor Flex RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['Gardenpole RGBW-Lightify'],
model: '4058075036147',
vendor: 'OSRAM',
description: 'Smart+ gardenpole RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['Gardenpole Mini RGBW OSRAM'],
model: 'AC0363900NJ',
vendor: 'OSRAM',
description: 'Smart+ mini gardenpole RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['PAR 16 50 RGBW - LIGHTIFY'],
model: 'AB35996',
vendor: 'OSRAM',
description: 'Smart+ Spot GU10 Multicolor',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['PAR16 RGBW Z3'],
model: 'AC08559',
vendor: 'OSRAM',
description: 'SMART+ Spot GU10 Multicolor',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['B40 DIM Z3'],
model: 'AC08562',
vendor: 'OSRAM',
description: 'SMART+ Candle E14 Dimmable White',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['Motion Sensor-A'],
model: 'AC01353010G',
vendor: 'OSRAM',
description: 'SMART+ Motion Sensor',
supports: 'occupancy and temperature',
fromZigbee: [
fz.temperature,
fz.iaszone_occupancy_2,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['MR16 TW OSRAM'],
model: 'AC03648',
vendor: 'OSRAM',
description: 'SMART+ spot GU5.3 tunable white',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['Lightify Switch Mini'],
model: 'AC0251100NJ',
vendor: 'OSRAM',
description: 'Smart+ switch mini',
supports: 'circle, up, down and hold/release',
fromZigbee: [
fz.AC0251100NJ_cmdOn, fz.AC0251100NJ_cmdMoveWithOnOff, fz.AC0251100NJ_cmdStop,
fz.AC0251100NJ_cmdMoveToColorTemp, fz.AC0251100NJ_cmdMoveHue, fz.AC0251100NJ_cmdMoveToSaturation,
fz.AC0251100NJ_cmdOff, fz.AC0251100NJ_cmdMove, fz.battery_3V,
fz.AC0251100NJ_cmdMoveToLevelWithOnOff,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint1 = device.getEndpoint(1);
const endpoint2 = device.getEndpoint(2);
const endpoint3 = device.getEndpoint(3);
await bind(endpoint1, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'genPowerCfg']);
await bind(endpoint2, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await bind(endpoint3, coordinatorEndpoint, ['genLevelCtrl', 'lightingColorCtrl']);
await configureReporting.batteryVoltage(endpoint1);
},
},
{
zigbeeModel: ['SubstiTube'],
model: 'ST8AU-CON',
vendor: 'OSRAM',
description: 'OSRAM SubstiTUBE T8 Advanced UO Connected',
extend: generic.light_onoff_brightness,
},
// Hive
{
zigbeeModel: ['FWBulb01'],
model: 'HALIGHTDIMWWE27',
vendor: 'Hive',
description: 'Active smart bulb white LED (E27)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['FWBulb02UK'],
model: 'HALIGHTDIMWWB22',
vendor: 'Hive',
description: 'Active smart bulb white LED (B22)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['SLP2b', 'SLP2c'],
model: '1613V',
vendor: 'Hive',
description: 'Active plug',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.generic_power, fz.temperature],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(9);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
{
zigbeeModel: ['TWBulb01US'],
model: 'HV-GSCXZB269',
vendor: 'Hive',
description: 'Active light cool to warm white (E26) ',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TWBulb01UK'],
model: 'HV-GSCXZB279_HV-GSCXZB229',
vendor: 'Hive',
description: 'Active light, warm to cool white (E27 & B22)',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['TWGU10Bulb01UK'],
model: 'HV-GUCXZB5',
vendor: 'Hive',
description: 'Active light, warm to cool white (GU10)',
extend: generic.light_onoff_brightness_colortemp,
},
// Innr
{
zigbeeModel: ['BF 263'],
model: 'BF 263',
vendor: 'Innr',
description: 'B22 filament bulb dimmable',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RB 185 C'],
model: 'RB 185 C',
vendor: 'Innr',
description: 'E27 bulb RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['BY 185 C'],
model: 'BY 185 C',
vendor: 'Innr',
description: 'B22 bulb RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['RB 250 C'],
model: 'RB 250 C',
vendor: 'Innr',
description: 'E14 bulb RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['RB 265'],
model: 'RB 265',
vendor: 'Innr',
description: 'E27 bulb',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RF 265'],
model: 'RF 265',
vendor: 'Innr',
description: 'E27 bulb filament clear',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RB 278 T'],
model: 'RB 278 T',
vendor: 'Innr',
description: 'E27 bulb',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RB 285 C'],
model: 'RB 285 C',
vendor: 'Innr',
description: 'E27 bulb RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['BY 285 C'],
model: 'BY 285 C',
vendor: 'Innr',
description: 'B22 bulb RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['RB 165'],
model: 'RB 165',
vendor: 'Innr',
description: 'E27 bulb',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RB 175 W'],
model: 'RB 175 W',
vendor: 'Innr',
description: 'E27 bulb warm dimming',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RB 178 T'],
model: 'RB 178 T',
vendor: 'Innr',
description: 'Smart bulb tunable white E27',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['BY 178 T'],
model: 'BY 178 T',
vendor: 'Innr',
description: 'Smart bulb tunable white B22',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['RS 122'],
model: 'RS 122',
vendor: 'Innr',
description: 'GU10 spot',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RS 125'],
model: 'RS 125',
vendor: 'Innr',
description: 'GU10 spot',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RS 225'],
model: 'RS 225',
vendor: 'Innr',
description: 'GU10 Spot',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RS 128 T'],
model: 'RS 128 T',
vendor: 'Innr',
description: 'GU10 spot 350 lm, dimmable, white spectrum',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['RS 228 T'],
model: 'RS 228 T',
vendor: 'Innr',
description: 'GU10 spot 350 lm, dimmable, white spectrum',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['RB 145'],
model: 'RB 145',
vendor: 'Innr',
description: 'E14 candle',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RB 245'],
model: 'RB 245',
vendor: 'Innr',
description: 'E14 candle',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RB 248 T'],
model: 'RB 248 T',
vendor: 'Innr',
description: 'E14 candle with white spectrum',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['RB 148 T'],
model: 'RB 148 T',
vendor: 'Innr',
description: 'E14 candle with white spectrum',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['RF 263'],
model: 'RF 263',
vendor: 'Innr',
description: 'E27 filament bulb dimmable',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['BY 165', 'BY 265'],
model: 'BY 165',
vendor: 'Innr',
description: 'B22 bulb dimmable',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['PL 110'],
model: 'PL 110',
vendor: 'Innr',
description: 'Puck Light',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['ST 110'],
model: 'ST 110',
vendor: 'Innr',
description: 'Strip Light',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['UC 110'],
model: 'UC 110',
vendor: 'Innr',
description: 'Under cabinet light',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['DL 110 N'],
model: 'DL 110 N',
vendor: 'Innr',
description: 'Spot narrow',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['DL 110 W'],
model: 'DL 110 W',
vendor: 'Innr',
description: 'Spot wide',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['SL 110 N'],
model: 'SL 110 N',
vendor: 'Innr',
description: 'Spot Flex narrow',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['SL 110 M'],
model: 'SL 110 M',
vendor: 'Innr',
description: 'Spot Flex medium',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['SL 110 W'],
model: 'SL 110 W',
vendor: 'Innr',
description: 'Spot Flex wide',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['SP 120'],
model: 'SP 120',
vendor: 'Innr',
description: 'Smart plug',
supports: 'on/off, power measurement',
fromZigbee: [fz.SP120_power, fz.on_off, fz.ignore_genLevelCtrl_report],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement']);
await configureReporting.onOff(endpoint);
await configureReporting.activePower(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.rmsVoltage(endpoint);
},
},
{
zigbeeModel: ['SP 222'],
model: 'SP 222',
vendor: 'Innr',
description: 'Smart plug',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
// Sylvania
{
zigbeeModel: ['LIGHTIFY RT Tunable White'],
model: '73742',
vendor: 'Sylvania',
description: 'LIGHTIFY LED adjustable white RT 5/6',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['RT RGBW'],
model: '73741',
vendor: 'Sylvania',
description: 'LIGHTIFY LED adjustable color RT 5/6',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LIGHTIFY BR Tunable White'],
model: '73740',
vendor: 'Sylvania',
description: 'LIGHTIFY LED adjustable white BR30',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LIGHTIFY BR RGBW', 'BR30 RGBW'],
model: '73739',
vendor: 'Sylvania',
description: 'LIGHTIFY LED RGBW BR30',
supports: generic.light_onoff_brightness_colortemp_colorxy.supports,
toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee.concat([tz.osram_cmds]),
fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee,
},
{
zigbeeModel: ['LIGHTIFY A19 RGBW', 'A19 RGBW'],
model: '73693',
vendor: 'Sylvania',
description: 'LIGHTIFY LED RGBW A19',
supports: generic.light_onoff_brightness_colortemp_colorxy.supports,
toZigbee: generic.light_onoff_brightness_colortemp_colorxy.toZigbee.concat([tz.osram_cmds]),
fromZigbee: generic.light_onoff_brightness_colortemp_colorxy.fromZigbee,
},
{
zigbeeModel: ['LIGHTIFY A19 ON/OFF/DIM', 'LIGHTIFY A19 ON/OFF/DIM 10 Year'],
model: '74283',
vendor: 'Sylvania',
description: 'LIGHTIFY LED soft white dimmable A19',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['A19 W 10 year'],
model: '74696',
vendor: 'Sylvania',
description: 'LIGHTIFY LED soft white dimmable A19',
supports: generic.light_onoff_brightness.supports,
toZigbee: generic.light_onoff_brightness.toZigbee.concat([tz.osram_cmds]),
fromZigbee: generic.light_onoff_brightness.fromZigbee.concat([
fz.ignore_light_color_colortemp_report,
]),
},
{
zigbeeModel: ['PLUG'],
model: '72922-A',
vendor: 'Sylvania',
description: 'SMART+ Smart Plug',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['A19 TW 10 year'],
model: '71831',
vendor: 'Sylvania',
description: 'Smart Home adjustable white A19 LED bulb',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['MR16 TW'],
model: '74282',
vendor: 'Sylvania',
description: 'Smart Home adjustable white MR16 LED bulb',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['LIGHTIFY Gardenspot RGB'],
model: 'LTFY004',
vendor: 'Sylvania',
description: 'LIGHTIFY LED gardenspot mini RGB',
extend: generic.light_onoff_brightness_colorxy,
},
{
zigbeeModel: ['PAR38 W 10 year'],
model: '74580',
vendor: 'Sylvania',
description: 'Smart Home soft white PAR38 outdoor bulb',
extend: generic.light_onoff_brightness,
},
// GE
{
zigbeeModel: ['SoftWhite'],
model: 'PSB19-SW27',
vendor: 'GE',
description: 'Link smart LED light bulb, A19 soft white (2700K)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['ZLL Light'],
model: '22670',
vendor: 'GE',
description: 'Link smart LED light bulb, A19/BR30 soft white (2700K)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['45852'],
model: '45852GE',
vendor: 'GE',
description: 'ZigBee plug-in smart dimmer',
supports: 'on/off, brightness',
fromZigbee: [fz.brightness, fz.on_off],
toZigbee: [tz.light_onoff_brightness, tz.ignore_transition],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['45853'],
model: '45853GE',
vendor: 'GE',
description: 'Plug-in smart switch',
supports: 'on/off',
fromZigbee: [fz.on_off, fz.generic_power],
toZigbee: [tz.on_off, tz.ignore_transition],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
{
zigbeeModel: ['45856'],
model: '45856GE',
vendor: 'GE',
description: 'In-wall smart switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off, tz.ignore_transition],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['45857'],
model: '45857GE',
vendor: 'GE',
description: 'ZigBee in-wall smart dimmer',
supports: 'on/off, brightness',
fromZigbee: [fz.brightness, fz.on_off],
toZigbee: [tz.light_onoff_brightness, tz.ignore_transition],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['Smart Switch'],
model: 'PTAPT-WH02',
vendor: 'GE',
description: 'Quirky smart switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'default': 2};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(2);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
// Sengled
{
zigbeeModel: ['E11-G13'],
model: 'E11-G13',
vendor: 'Sengled',
description: 'Element Classic (A19)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['E11-G23', 'E11-G33'],
model: 'E11-G23/E11-G33',
vendor: 'Sengled',
description: 'Element Classic (A60)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['Z01-CIA19NAE26'],
model: 'Z01-CIA19NAE26',
vendor: 'Sengled',
description: 'Element Touch (A19)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['Z01-A19NAE26'],
model: 'Z01-A19NAE26',
vendor: 'Sengled',
description: 'Element Plus (A19)',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['Z01-A60EAE27'],
model: 'Z01-A60EAE27',
vendor: 'Sengled',
description: 'Element Plus (A60)',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['E11-N1EA'],
model: 'E11-N1EA',
vendor: 'Sengled',
description: 'Element Plus Color (A19)',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['E12-N14'],
model: 'E12-N14',
vendor: 'Sengled',
description: 'Element Classic (BR30)',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['E1A-AC2'],
model: 'E1ACA4ABE38A',
vendor: 'Sengled',
description: 'Element downlight smart LED bulb',
extend: generic.light_onoff_brightness,
},
// Swann
{
zigbeeModel: ['SWO-KEF1PA'],
model: 'SWO-KEF1PA',
vendor: 'Swann',
description: 'Key fob remote',
supports: 'panic, home, away, sleep',
fromZigbee: [fz.KEF1PA_arm, fz.KEF1PA_panic],
toZigbee: [tz.factory_reset],
},
{
zigbeeModel: ['SWO-WDS1PA'],
model: 'SWO-WDS1PA',
vendor: 'Swann',
description: 'Window/door sensor',
supports: 'contact',
fromZigbee: [fz.iaszone_contact],
toZigbee: [],
},
// JIAWEN
{
zigbeeModel: ['FB56-ZCW08KU1.1', 'FB56-ZCW08KU1.0'],
model: 'K2RGBW01',
vendor: 'JIAWEN',
description: 'Wireless Bulb E27 9W RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
// Netvox
{
zigbeeModel: ['Z809AE3R'],
model: 'Z809A',
vendor: 'Netvox',
description: 'Power socket with power consumption monitoring',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.Z809A_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement']);
await configureReporting.onOff(endpoint);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
await configureReporting.powerFactor(endpoint);
},
},
// Nanoleaf
{
zigbeeModel: ['NL08-0800'],
model: 'NL08-0800',
vendor: 'Nanoleaf',
description: 'Smart Ivy Bulb E27',
extend: generic.light_onoff_brightness,
},
// Nue, 3A
{
zigbeeModel: ['FTB56+ZSN15HG1.0'],
model: 'HGZB-1S',
vendor: 'Nue / 3A',
description: 'Smart 1 key scene wall switch',
supports: 'on/off, click',
toZigbee: [tz.on_off],
fromZigbee: [fz.scenes_recall_click, fz.ignore_power_report],
},
{
zigbeeModel: ['FTB56+ZSN16HG1.0'],
model: 'HGZB-02S',
vendor: 'Nue / 3A',
description: 'Smart 2 key scene wall switch',
supports: 'on/off, click',
toZigbee: [tz.on_off],
fromZigbee: [fz.scenes_recall_click, fz.ignore_power_report],
},
{
zigbeeModel: ['FB56+ZSN08KJ2.3'],
model: 'HGZB-045',
vendor: 'Nue / 3A',
description: 'Smart 4 key scene wall switch',
supports: 'on/off, click',
toZigbee: [tz.on_off],
fromZigbee: [fz.scenes_recall_click, fz.ignore_power_report],
},
{
zigbeeModel: ['LXN56-DC27LX1.1'],
model: 'LXZB-02A',
vendor: 'Nue / 3A',
description: 'Smart light controller',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['FNB56-ZSW03LX2.0', 'LXN-3S27LX1.0'],
model: 'HGZB-43',
vendor: 'Nue / 3A',
description: 'Smart light switch - 3 gang v2.0',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'top': 1, 'center': 2, 'bottom': 3};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['FB56+ZSW1IKJ1.7', 'FB56+ZSW1IKJ2.5'],
model: 'HGZB-043',
vendor: 'Nue / 3A',
description: 'Smart light switch - 3 gang',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'top': 16, 'center': 17, 'bottom': 18};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(18), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['FB56+ZSC05HG1.0', 'FNB56-ZBW01LX1.2'],
model: 'HGZB-04D / HGZB-4D-UK',
vendor: 'Nue / 3A',
description: 'Smart dimmer wall switch',
supports: 'on/off, brightness',
toZigbee: [tz.on_off, tz.light_brightness],
fromZigbee: [fz.on_off, fz.brightness],
},
{
zigbeeModel: ['FB56+ZSW1HKJ1.7', 'FB56+ZSW1HKJ2.5'],
model: 'HGZB-042',
vendor: 'Nue / 3A',
description: 'Smart light switch - 2 gang',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'top': 16, 'bottom': 17};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(16), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(17), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['FNB56-ZSW02LX2.0', 'LXN-2S27LX1.0'],
model: 'HGZB-42',
vendor: 'Nue / 3A',
description: 'Smart light switch - 2 gang v2.0',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'top': 11, 'bottom': 12};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(11), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(12), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['FNB56-SKT1JXN1.0'],
model: 'HGZB-20A',
vendor: 'Nue / 3A',
description: 'Power plug',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(11), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['FB56+ZSW1GKJ2.5', 'LXN-1S27LX1.0'],
model: 'HGZB-41',
vendor: 'Nue / 3A',
description: 'Smart one gang wall switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['FNB56-SKT1DHG1.4'],
model: 'MG-AUWS01',
vendor: 'Nue / 3A',
description: 'Smart Double GPO',
supports: 'on/off',
fromZigbee: [fz.nue_power_state],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'left': 12, 'right': 11};
},
},
{
zigbeeModel: ['FNB56-ZCW25FB1.9'],
model: 'XY12S-15',
vendor: 'Nue / 3A',
description: 'Smart light controller RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['FNB56-ZSW23HG1.1', 'LXN56-LC27LX1.1'],
model: 'HGZB-01A',
vendor: 'Nue / 3A',
description: 'Smart in-wall switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['FNB56-ZSC01LX1.2', 'FB56+ZSW05HG1.2', 'FB56+ZSC04HG1.0'],
model: 'HGZB-02A',
vendor: 'Nue / 3A',
description: 'Smart light controller',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['FNB56-ZSW01LX2.0'],
model: 'HGZB-42-UK / HGZB-41',
description: 'Smart switch 1 or 2 gang',
vendor: 'Nue / 3A',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['FNB56-ZCW25FB1.6', 'FNB56-ZCW25FB2.1'],
model: 'HGZB-06A',
vendor: 'Nue / 3A',
description: 'Smart 7W E27 light bulb',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['LXN56-0S27LX1.1'],
model: 'HGZB-20-UK',
vendor: 'Nue / 3A',
description: 'Power plug',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
// Smart Home Pty
{
zigbeeModel: ['FB56-ZCW11HG1.2', 'FB56-ZCW11HG1.4'],
model: 'HGZB-07A',
vendor: 'Smart Home Pty',
description: 'RGBW Downlight',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['FNB56-SKT1EHG1.2'],
model: 'HGZB-20-DE',
vendor: 'Smart Home Pty',
description: 'Power plug',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
// Gledopto
{
zigbeeModel: ['GL-C-006'],
model: 'GL-C-006',
vendor: 'Gledopto',
description: 'Zigbee LED controller WW/CW',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature',
},
{
zigbeeModel: ['GL-C-007'],
model: 'GL-C-007',
vendor: 'Gledopto',
description: 'Zigbee LED controller RGBW',
extend: gledopto.light,
supports: 'on/off, brightness, color, white',
},
{
zigbeeModel: ['GL-C-008', 'GLEDOPTO'],
model: 'GL-C-008',
vendor: 'Gledopto',
description: 'Zigbee LED controller RGB + CCT',
extend: gledopto.light,
meta: {options: {disableDefaultResponse: true}},
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-C-008S'],
model: 'GL-C-008S',
vendor: 'Gledopto',
description: 'Zigbee LED controller RGB + CCT plus model',
extend: gledopto.light,
meta: {options: {disableDefaultResponse: true}},
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-C-009'],
model: 'GL-C-009',
vendor: 'Gledopto',
description: 'Zigbee LED controller dimmer',
extend: gledopto.light,
supports: 'on/off, brightness',
},
{
zigbeeModel: ['GL-MC-001'],
model: 'GL-MC-001',
vendor: 'Gledopto',
description: 'Zigbee USB mini LED controller RGB + CCT',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-S-004Z'],
model: 'GL-S-004Z',
vendor: 'Gledopto',
description: 'Zigbee Smart WW/CW GU10',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature',
},
{
zigbeeModel: ['GL-S-007Z'],
model: 'GL-S-007Z',
vendor: 'Gledopto',
description: 'Smart RGBW GU10',
extend: gledopto.light,
supports: 'on/off, brightness, color, white',
},
{
zigbeeModel: ['GL-B-001Z'],
model: 'GL-B-001Z',
vendor: 'Gledopto',
description: 'Smart 4W E14 RGB / CCT LED bulb',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-G-001Z'],
model: 'GL-G-001Z',
vendor: 'Gledopto',
description: 'Smart garden lamp',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-B-007Z'],
model: 'GL-B-007Z',
vendor: 'Gledopto',
description: 'Smart 6W E27 RGB / CCT LED bulb',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-B-008Z'],
model: 'GL-B-008Z',
vendor: 'Gledopto',
description: 'Smart 12W E27 RGB / CCT LED bulb',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-B-008ZS'],
model: 'GL-B-008ZS',
vendor: 'Gledopto',
description: 'Smart 12W E27 RGB / CW LED bulb',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-D-003Z'],
model: 'GL-D-003Z',
vendor: 'Gledopto',
description: 'LED RGB + CCT downlight ',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-D-005Z'],
model: 'GL-D-005Z',
vendor: 'Gledopto',
description: 'LED RGB + CCT downlight ',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-S-003Z'],
model: 'GL-S-003Z',
vendor: 'Gledopto',
description: 'Smart RGBW GU10 ',
extend: gledopto.light,
supports: 'on/off, brightness, color, white',
},
{
zigbeeModel: ['HOMA2023'],
model: 'GD-CZ-006',
vendor: 'Gledopto',
description: 'Zigbee LED Driver',
extend: gledopto.light,
supports: 'on/off, brightness',
},
{
zigbeeModel: ['GL-FL-004TZ'],
model: 'GL-FL-004TZ',
vendor: 'Gledopto',
description: 'Zigbee 10W floodlight RGB CCT',
extend: gledopto.light,
supports: 'on/off, brightness, color temperature, color',
},
{
zigbeeModel: ['GL-W-001Z'],
model: 'GL-W-001Z',
vendor: 'Gledopto',
description: 'Zigbee ON/OFF Wall Switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
onEvent: async (type, data, device) => {
// This device doesn't support reporting.
// Therefore we read the on/off state every 5 seconds.
// This is the same way as the Hue bridge does it.
if (type === 'stop') {
clearInterval(store[device.ieeeAddr]);
} else if (!store[device.ieeeAddr]) {
store[device.ieeeAddr] = setInterval(async () => {
try {
await device.endpoints[0].read('genOnOff', ['onOff']);
} catch (error) {
// Do nothing
}
}, 5000);
}
},
},
// ROBB
{
zigbeeModel: ['ROB_200-004-0'],
model: 'ROB_200-004-0',
vendor: 'ROBB',
description: 'ZigBee AC phase-cut dimmer',
supports: 'on/off, brightness',
fromZigbee: [fz.brightness, fz.on_off, fz.ignore_light_brightness_report],
toZigbee: [tz.light_onoff_brightness, tz.ignore_transition],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await configureReporting.onOff(endpoint);
},
},
// SmartThings
{
zigbeeModel: ['PGC313'],
model: 'STSS-MULT-001',
vendor: 'SmartThings',
description: 'Multipurpose sensor',
supports: 'contact',
fromZigbee: [fz.smartthings_contact],
toZigbee: [],
},
{
zigbeeModel: ['tagv4'],
model: 'STS-PRS-251',
vendor: 'SmartThings',
description: 'Arrival sensor',
supports: 'presence',
fromZigbee: [
fz.STS_PRS_251_presence, fz.battery_3V,
fz.STS_PRS_251_beeping,
],
toZigbee: [tz.STS_PRS_251_beep],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await configureReporting.batteryVoltage(endpoint);
await configureReporting.presentValue(endpoint);
},
},
{
zigbeeModel: ['3325-S'],
model: '3325-S',
vendor: 'SmartThings',
description: 'Motion sensor (2015 model)',
supports: 'occupancy and temperature',
fromZigbee: [
fz.temperature,
fz.iaszone_occupancy_2,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['3321-S'],
model: '3321-S',
vendor: 'SmartThings',
description: 'Multi Sensor (2015 model)',
supports: 'contact and temperature',
fromZigbee: [
fz.temperature, fz.smartsense_multi,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement']);
await configureReporting.temperature(endpoint);
},
},
{
zigbeeModel: ['outlet'],
model: 'IM6001-OTP05',
vendor: 'SmartThings',
description: 'Outlet',
supports: 'on/off',
fromZigbee: [fz.on_off, fz.ignore_onoff_report],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['outletv4'],
model: 'STS-OUT-US-2',
vendor: 'SmartThings',
description: 'Outlet',
supports: 'on/off',
fromZigbee: [fz.on_off, fz.ignore_onoff_report],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['motion'],
model: 'IM6001-MTP01',
vendor: 'SmartThings',
description: 'Motion sensor (2018 model)',
supports: 'occupancy and temperature',
fromZigbee: [
fz.temperature,
fz.ignore_iaszone_report,
fz.iaszone_occupancy_1, fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['motionv4'],
model: 'STS-IRM-250',
vendor: 'SmartThings',
description: 'Motion sensor (2016 model)',
supports: 'occupancy and temperature',
fromZigbee: [
fz.temperature, fz.iaszone_occupancy_2,
fz.iaszone_occupancy_1, fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['3305-S'],
model: '3305-S',
vendor: 'SmartThings',
description: 'Motion sensor (2014 model)',
supports: 'occupancy and temperature',
fromZigbee: [
fz.temperature, fz.iaszone_occupancy_2,
fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['3300-S'],
model: '3300-S',
vendor: 'SmartThings',
description: 'Door sensor',
supports: 'contact and temperature',
fromZigbee: [fz.temperature, fz.smartsense_multi, fz.iaszone_contact, fz.battery_3V],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['multiv4'],
model: 'F-MLT-US-2',
vendor: 'SmartThings',
description: 'Multipurpose sensor (2016 model)',
supports: 'contact',
fromZigbee: [fz.temperature, fz.battery_3V, fz.iaszone_contact],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['multi'],
model: 'IM6001-MPP01',
vendor: 'SmartThings',
description: 'Multipurpose sensor (2018 model)',
supports: 'contact',
fromZigbee: [fz.temperature, fz.iaszone_contact, fz.battery_3V, fz.ignore_iaszone_attreport],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
/**
* Note: humidity not (yet) implemented, as this seems to use proprietary cluster
* see Smartthings device handler (profileID: 0x9194, clusterId: 0xFC45
* https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/861ec6b88eb45273e341436a23d35274dc367c3b/
* devicetypes/smartthings/smartsense-temp-humidity-sensor.src/smartsense-temp-humidity-sensor.groovy#L153-L156
*/
zigbeeModel: ['3310-S'],
model: '3310-S',
vendor: 'SmartThings',
description: 'Temperature and humidity sensor',
supports: 'temperature',
fromZigbee: [
fz.temperature,
fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['IM6001-WLP01'],
model: 'IM6001-WLP01',
vendor: 'SmartThings',
description: 'Water leak sensor',
supports: 'water leak',
fromZigbee: [
fz.temperature,
fz.st_leak, fz.battery_3V,
],
toZigbee: [],
},
{
zigbeeModel: ['3315-S'],
model: '3315-S',
vendor: 'SmartThings',
description: 'Water sensor',
supports: 'water and temperature',
fromZigbee: [
fz.temperature,
fz.st_leak, fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['water'],
model: 'F-WTR-UK-V2',
vendor: 'SmartThings',
description: 'Water leak sensor (2018 model)',
supports: 'water leak and temperature',
fromZigbee: [
fz.temperature,
fz.st_leak, fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['3315-G'],
model: '3315-G',
vendor: 'SmartThings',
description: 'Water sensor',
supports: 'water and temperature',
fromZigbee: [
fz.temperature,
fz.st_leak, fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['button'],
model: 'IM6001-BTP01',
vendor: 'SmartThings',
description: 'Button',
supports: 'single click, double click, hold and temperature',
fromZigbee: [
fz.st_button_state,
fz.generic_battery,
fz.temperature,
fz.ignore_iaszone_attreport,
fz.ignore_temperature_report,
],
toZigbee: [],
},
// Trust
{
zigbeeModel: ['WATER_TPV14'],
model: 'ZWLD-100',
vendor: 'Trust',
description: 'Water leakage detector',
supports: 'water leak',
fromZigbee: [
fz.ias_water_leak_alarm_1,
fz.ignore_basic_report,
],
toZigbee: [],
},
{
zigbeeModel: ['\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'+
'\u0000\u0000\u0000\u0000\u0000'],
model: 'ZYCT-202',
vendor: 'Trust',
description: 'Remote control',
supports: 'on, off, stop, up-press, down-press',
fromZigbee: [
fz.ZYCT202_on, fz.ZYCT202_off, fz.ZYCT202_stop, fz.ZYCT202_up_down,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await configureReporting.onOff(endpoint);
},
},
{
zigbeeModel: ['ZLL-DimmableLigh'],
model: 'ZLED-2709',
vendor: 'Trust',
description: 'Smart Dimmable LED Bulb',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['ZLL-ColorTempera'],
model: 'ZLED-TUNE9',
vendor: 'Trust',
description: 'Smart tunable LED bulb',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['VMS_ADUROLIGHT'],
model: 'ZPIR-8000',
vendor: 'Trust',
description: 'Motion Sensor',
supports: 'occupancy',
fromZigbee: [fz.iaszone_occupancy_2],
toZigbee: [],
},
{
zigbeeModel: ['CSW_ADUROLIGHT'],
model: 'ZCTS-808',
vendor: 'Trust',
description: 'Wireless contact sensor',
supports: 'contact',
fromZigbee: [
fz.iaszone_contact, fz.battery_percentage_remaining,
fz.ignore_basic_report,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// Paulmann
{
zigbeeModel: ['Switch Controller '],
model: '50043',
vendor: 'Paulmann',
description: 'SmartHome Zigbee Cephei Switch Controller',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['Dimmablelight '],
model: '50045',
vendor: 'Paulmann',
description: 'SmartHome Zigbee LED-stripe',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['RGBW light'],
model: '50049',
vendor: 'Paulmann',
description: 'SmartHome Yourled RGB Controller',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['CCT light'],
model: '50064',
vendor: 'Paulmann',
description: 'SmartHome led spot',
extend: generic.light_onoff_brightness_colortemp,
},
// Bitron
{
zigbeeModel: ['AV2010/34'],
model: 'AV2010/34',
vendor: 'Bitron',
description: '4-Touch single click buttons',
supports: 'click',
fromZigbee: [fz.ignore_power_report, fz.AV2010_34_click],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
},
},
{
zigbeeModel: ['902010/22'],
model: 'AV2010/22',
vendor: 'Bitron',
description: 'Wireless motion detector',
supports: 'occupancy',
fromZigbee: [fz.iaszone_occupancy_1_with_timeout],
toZigbee: [],
},
{
zigbeeModel: ['902010/25'],
model: 'AV2010/25',
vendor: 'Bitron',
description: 'Video wireless socket',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.bitron_power],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.instantaneousDemand(endpoint);
},
},
{
zigbeeModel: ['902010/32'],
model: 'AV2010/32',
vendor: 'Bitron',
description: 'Wireless wall thermostat with relay',
supports: 'temperature, heating/cooling system control',
fromZigbee: [
fz.bitron_thermostat_att_report,
fz.bitron_battery_att_report,
],
toZigbee: [
tz.thermostat_occupied_heating_setpoint, tz.thermostat_local_temperature_calibration,
tz.thermostat_local_temperature, tz.thermostat_running_state,
tz.thermostat_temperature_display_mode,
],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const binds = [
'genBasic', 'genPowerCfg', 'genIdentify', 'genPollCtrl', 'hvacThermostat', 'hvacUserInterfaceCfg',
];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.thermostatTemperature(endpoint);
await configureReporting.thermostatTemperatureCalibration(endpoint);
await configureReporting.thermostatOccupiedHeatingSetpoint(endpoint);
await configureReporting.thermostatRunningState(endpoint);
await configureReporting.batteryAlarmState(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
// Iris
{
zigbeeModel: ['3210-L'],
model: '3210-L',
vendor: 'Iris',
description: 'Smart plug',
supports: 'on/off',
fromZigbee: [fz.on_off, fz.electrical_measurement],
toZigbee: [tz.on_off],
meta: {configureKey: 4},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement']);
await endpoint.read('haElectricalMeasurement', [
'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
]);
await configureReporting.onOff(endpoint);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
},
},
{
zigbeeModel: ['3326-L'],
model: '3326-L',
vendor: 'Iris',
description: 'Motion and temperature sensor',
supports: 'occupancy and temperature',
fromZigbee: [fz.iaszone_occupancy_2, fz.temperature, fz.battery_3V_2100],
toZigbee: [],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['3320-L'],
model: '3320-L',
vendor: 'Iris',
description: 'Contact and temperature sensor',
supports: 'contact and temperature',
fromZigbee: [fz.iris_3320L_contact, fz.temperature, fz.battery_3V_2100],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
// ksentry
{
zigbeeModel: ['Lamp_01'],
model: 'KS-SM001',
vendor: 'Ksentry Electronics',
description: '[Zigbee OnOff Controller](http://ksentry.manufacturer.globalsources.com/si/6008837134660'+
'/pdtl/ZigBee-module/1162731630/zigbee-on-off-controller-modules.htm)',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
// Ninja Blocks
{
zigbeeModel: ['Ninja Smart plug'],
model: 'Z809AF',
vendor: 'Ninja Blocks',
description: 'Zigbee smart plug with power meter',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.generic_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
// Commercial Electric
{
zigbeeModel: ['Zigbee CCT Downlight'],
model: '53170161',
vendor: 'Commercial Electric',
description: 'Matte White Recessed Retrofit Smart Led Downlight - 4 Inch',
extend: generic.light_onoff_brightness_colortemp,
},
// ilux
{
zigbeeModel: ['LEColorLight'],
model: '900008-WW',
vendor: 'ilux',
description: 'Dimmable A60 E27 LED Bulb',
extend: generic.light_onoff_brightness,
},
// Dresden Elektronik
{
zigbeeModel: ['FLS-PP3'],
model: 'Mega23M12',
vendor: 'Dresden Elektronik',
description: 'ZigBee Light Link wireless electronic ballast',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['FLS-CT'],
model: 'XVV-Mega23M12',
vendor: 'Dresden Elektronik',
description: 'ZigBee Light Link wireless electronic ballast color temperature',
extend: generic.light_onoff_brightness_colortemp,
},
// Centralite Swiss Plug
{
zigbeeModel: ['4256251-RZHAC', '4257050-RZHAC'],
model: '4256251-RZHAC',
vendor: 'Centralite',
description: 'White Swiss power outlet switch with power meter',
supports: 'switch and power meter',
fromZigbee: [fz.on_off, fz.RZHAC_4256251_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
},
},
{
zigbeeModel: ['4257050-ZHAC'],
model: '4257050-ZHAC',
vendor: 'Centralite',
description: '3-Series smart dimming outlet',
supports: 'on/off, brightness, power meter',
fromZigbee: [fz.restorable_brightness, fz.on_off, fz.electrical_measurement],
toZigbee: [tz.light_onoff_restorable_brightness],
meta: {configureKey: 3},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'haElectricalMeasurement']);
await endpoint.read('haElectricalMeasurement', [
'acVoltageMultiplier', 'acVoltageDivisor', 'acCurrentMultiplier',
'acCurrentDivisor', 'acPowerMultiplier', 'acPowerDivisor',
]);
await configureReporting.onOff(endpoint);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
},
},
// Blaupunkt
{
zigbeeModel: ['SCM-R_00.00.03.15TC', 'SCM_00.00.03.14TC'],
model: 'SCM-S1',
vendor: 'Blaupunkt',
description: 'Roller shutter',
supports: 'open/close',
fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff],
toZigbee: [tz.cover_position_via_brightness, tz.cover_open_close_via_brightness],
},
// Lupus
{
zigbeeModel: ['SCM_00.00.03.11TC'],
model: '12031',
vendor: 'Lupus',
description: 'Roller shutter',
supports: 'open/close',
fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff],
toZigbee: [tz.cover_position_via_brightness, tz.cover_open_close_via_brightness],
},
{
zigbeeModel: ['PSMP5_00.00.03.11TC'],
model: '12050',
vendor: 'Lupus',
description: 'LUPUSEC mains socket with power meter',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.bitron_power],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.instantaneousDemand(endpoint);
},
},
// Climax
{
zigbeeModel: ['PSS_00.00.00.15TC'],
model: 'PSS-23ZBS',
vendor: 'Climax',
description: 'Power plug',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['SCM-3_00.00.03.15'],
model: 'SCM-5ZBS',
vendor: 'Climax',
description: 'Roller shutter',
supports: 'open/close',
fromZigbee: [fz.cover_position_via_brightness, fz.cover_state_via_onoff],
toZigbee: [tz.cover_position_via_brightness, tz.cover_open_close_via_brightness],
},
{
zigbeeModel: ['PSM_00.00.00.35TC'],
model: 'PSM-29ZBSR',
vendor: 'Climax',
description: 'Power plug',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
// HEIMAN
{
zigbeeModel: ['CO_V15'],
model: 'HS1CA-M',
description: 'Smart carbon monoxide sensor',
supports: 'carbon monoxide',
vendor: 'HEIMAN',
fromZigbee: [fz.heiman_carbon_monoxide, fz.battery_200],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
await configureReporting.batteryAlarmState(endpoint);
},
},
{
zigbeeModel: ['PIRSensor-N'],
model: 'HS3MS',
vendor: 'HEIMAN',
description: 'Smart motion sensor',
supports: 'occupancy',
fromZigbee: [fz.iaszone_occupancy_1],
toZigbee: [],
},
{
zigbeeModel: ['SmartPlug'],
model: 'HS2SK',
description: 'Smart metering plug',
supports: 'on/off, power measurement',
vendor: 'HEIMAN',
fromZigbee: [fz.on_off, fz.HS2SK_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
},
},
{
zigbeeModel: ['SMOK_V16', 'b5db59bfd81e4f1f95dc57fdbba17931', 'SMOK_YDLV10', 'SmokeSensor-EM'],
model: 'HS1SA',
vendor: 'HEIMAN',
description: 'Smoke detector',
supports: 'smoke',
fromZigbee: [
fz.heiman_smoke,
fz.battery_200,
fz.heiman_smoke_enrolled,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
await configureReporting.batteryAlarmState(endpoint);
},
},
{
zigbeeModel: ['SmokeSensor-N'],
model: 'HS3SA',
vendor: 'HEIMAN',
description: 'Smoke detector',
supports: 'smoke',
fromZigbee: [fz.heiman_smoke, fz.battery_200],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['GASSensor-N'],
model: 'HS3CG',
vendor: 'HEIMAN',
description: 'Combustible gas sensor',
supports: 'gas',
fromZigbee: [fz.iaszone_gas_1],
toZigbee: [],
},
{
zigbeeModel: ['GASSensor-EN'],
model: 'HS1CG-M',
vendor: 'HEIMAN',
description: 'Combustible gas sensor',
supports: 'gas',
fromZigbee: [fz.iaszone_gas_1],
toZigbee: [],
},
{
zigbeeModel: ['GAS_V15'],
model: 'HS1CG_M',
vendor: 'HEIMAN',
description: 'Combustible gas sensor',
supports: 'gas',
fromZigbee: [fz.iaszone_gas_2],
toZigbee: [],
},
{
zigbeeModel: ['DoorSensor-N'],
model: 'HS1DS/HS3DS',
vendor: 'HEIMAN',
description: 'Door sensor',
supports: 'contact',
fromZigbee: [fz.iaszone_contact],
toZigbee: [],
},
{
zigbeeModel: ['DOOR_TPV13'],
model: 'HEIMAN-M1',
vendor: 'HEIMAN',
description: 'Door sensor',
supports: 'contact',
fromZigbee: [fz.iaszone_contact],
toZigbee: [],
},
{
zigbeeModel: ['DoorSensor-EM'],
model: 'HS1DS-E',
vendor: 'HEIMAN',
description: 'Door sensor',
supports: 'contact',
fromZigbee: [fz.iaszone_contact],
toZigbee: [],
},
{
zigbeeModel: ['WaterSensor-N'],
model: 'HS1WL/HS3WL',
vendor: 'HEIMAN',
description: 'Water leakage sensor',
supports: 'water leak',
fromZigbee: [fz.ias_water_leak_alarm_1],
toZigbee: [],
},
{
zigbeeModel: ['WaterSensor-EM'],
model: 'HS1-WL-E',
vendor: 'HEIMAN',
description: 'Water leakage sensor',
supports: 'water leak',
fromZigbee: [fz.ias_water_leak_alarm_1],
toZigbee: [],
},
{
zigbeeModel: ['RC_V14'],
model: 'HS1RC-M',
vendor: 'HEIMAN',
description: 'Smart remote controller',
supports: 'action',
fromZigbee: [
fz.battery_200,
fz.heiman_smart_controller_armmode, fz.heiman_smart_controller_emergency,
],
toZigbee: [],
},
{
zigbeeModel: ['COSensor-EM', 'COSensor-N'],
model: 'HS1CA-E',
vendor: 'HEIMAN',
description: 'Smart carbon monoxide sensor',
supports: 'carbon monoxide',
fromZigbee: [fz.heiman_carbon_monoxide, fz.battery_200],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
await configureReporting.batteryAlarmState(endpoint);
},
},
{
zigbeeModel: ['WarningDevice'],
model: 'HS2WD-E',
vendor: 'HEIMAN',
description: 'Smart siren',
supports: 'warning',
fromZigbee: [fz.battery_200],
toZigbee: [tz.warning],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// Oujiabao
{
zigbeeModel: ['OJB-CR701-YZ'],
model: 'CR701-YZ',
vendor: 'Oujiabao',
description: 'Gas and carbon monoxide alarm',
supports: 'gas and carbon monoxide',
fromZigbee: [fz.OJBCR701YZ_statuschange],
toZigbee: [],
},
// Calex
{
zigbeeModel: ['EC-Z3.0-CCT'],
model: '421786',
vendor: 'Calex',
description: 'LED A60 Zigbee GLS-lamp',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['EC-Z3.0-RGBW'],
model: '421792',
vendor: 'Calex',
description: 'LED A60 Zigbee RGB lamp',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
// EcoSmart
{
zigbeeModel: ['zhaRGBW'],
model: 'D1821',
vendor: 'EcoSmart',
description: 'A19 RGB bulb',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
// eslint-disable-next-line
zigbeeModel: ['\u0000\u0002\u0000\u0004\u0000\f^I\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e','\u0000\u0002\u0000\u0004^��&\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e'],
model: 'D1531',
vendor: 'EcoSmart',
description: 'A19 bright white bulb',
extend: generic.light_onoff_brightness,
},
{
// eslint-disable-next-line
zigbeeModel: ['\u0000\u0002\u0000\u0004\u0012 �P\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e'],
model: 'D1532',
vendor: 'EcoSmart',
description: 'A19 soft white bulb',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['zhaTunW'],
model: 'D1542',
vendor: 'EcoSmart',
description: 'GU10 adjustable white bulb',
extend: generic.light_onoff_brightness_colortemp,
},
// Airam
{
zigbeeModel: ['ZBT-DimmableLight'],
model: '4713407',
vendor: 'Airam',
description: 'LED OP A60 ZB 9W/827 E27',
extend: generic.light_onoff_brightness,
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await configureReporting.onOff(endpoint);
const payload = [{
attribute: 'currentLevel',
minimumReportInterval: 300,
maximumReportInterval: repInterval.HOUR,
reportableChange: 1,
}];
await endpoint.configureReporting('genLevelCtrl', payload);
},
},
{
zigbeeModel: ['ZBT-Remote-EU-DIMV1A2'],
model: 'AIRAM-CTR.U',
vendor: 'Airam',
description: 'CTR.U remote',
supports: 'on/off, brightness up/down and click/hold/release',
fromZigbee: [
fz.genOnOff_cmdOn, fz.genOnOff_cmdOff, fz.CTR_U_brightness_updown_click,
fz.CTR_U_brightness_updown_hold, fz.CTR_U_brightness_updown_release, fz.CTR_U_scene,
fz.ignore_basic_report,
],
toZigbee: [],
},
// Paul Neuhaus
{
zigbeeModel: ['NLG-CCT light '],
model: '100.424.11',
vendor: 'Paul Neuhaus',
description: 'Q-INIGO LED ceiling light',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['Neuhaus NLG-TW light'],
model: '100.469.65',
vendor: 'Paul Neuhaus',
description: 'Q-INIGO, LED panel, Smart-Home RGB',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['NLG-RGBW light '],
model: '100.110.39',
vendor: 'Paul Neuhaus',
description: 'Q-FLAG LED Panel, Smart-Home RGBW',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['NLG-plug '],
model: '100.425.90',
vendor: 'Paul Neuhaus',
description: 'Q-PLUG adapter plug with night orientation light',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
// iCasa
{
zigbeeModel: ['ICZB-IW11D'],
model: 'ICZB-IW11D',
vendor: 'iCasa',
description: 'Zigbee 3.0 Dimmer',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['ICZB-IW11SW'],
model: 'ICZB-IW11SW',
vendor: 'iCasa',
description: 'Zigbee 3.0 Switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['ICZB-KPD18S'],
model: 'ICZB-KPD18S',
vendor: 'iCasa',
description: 'Zigbee 3.0 Keypad Pulse 8S',
supports: 'click',
fromZigbee: [fz.scenes_recall_click, fz.genOnOff_cmdOn, fz.genOnOff_cmdOff],
toZigbee: [],
},
{
zigbeeModel: ['ICZB-FC'],
model: 'ICZB-B1FC60/B3FC64/B2FC95/B2FC125',
vendor: 'iCasa',
description: 'Zigbee 3.0 Filament Lamp 60/64/95/125 mm, 806 lumen, dimmable, clear',
extend: generic.light_onoff_brightness_colortemp,
},
// Busch-Jaeger
{
zigbeeModel: ['PU01'],
model: '6717-84',
vendor: 'Busch-Jaeger',
description: 'Adaptor plug',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
// Müller Licht
{
zigbeeModel: ['ZBT-ExtendedColor'],
model: '404000/404005/404012',
vendor: 'Müller Licht',
description: 'Tint LED bulb GU10/E14/E27 350/470/806 lumen, dimmable, color, opal white',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['ZBT-ColorTemperature'],
model: '404006/404008/404004',
vendor: 'Müller Licht',
description: 'Tint LED bulb GU10/E14/E27 350/470/806 lumen, dimmable, opal white',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['ZBT-Remote-ALL-RGBW'],
model: 'MLI-404011',
description: 'Tint remote control',
supports: 'toggle, brightness, other buttons are not supported yet!',
vendor: 'Müller Licht',
fromZigbee: [
fz.tint404011_on, fz.tint404011_off, fz.cmdToggle, fz.tint404011_brightness_updown_click,
fz.tint404011_move_to_color_temp, fz.tint404011_move_to_color, fz.tint404011_scene,
fz.tint404011_brightness_updown_release, fz.tint404011_brightness_updown_hold,
],
toZigbee: [],
},
// Salus
{
zigbeeModel: ['SP600'],
model: 'SP600',
vendor: 'Salus',
description: 'Smart plug',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.SP600_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(9);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
// AduroSmart
{
zigbeeModel: ['ZLL-ExtendedColo'],
model: '81809',
vendor: 'AduroSmart',
description: 'ERIA colors and white shades smart light bulb A19',
extend: generic.light_onoff_brightness_colortemp_colorxy,
endpoint: (device) => {
return {
'default': 2,
};
},
},
{
zigbeeModel: ['Adurolight_NCC'],
model: '81825',
vendor: 'AduroSmart',
description: 'ERIA smart wireless dimming switch',
supports: 'on, off, up, down',
fromZigbee: [fz.eria_81825_on, fz.eria_81825_off, fz.eria_81825_updown],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
},
},
// Eurotronic
{
zigbeeModel: ['SPZB0001'],
model: 'SPZB0001',
vendor: 'Eurotronic',
description: 'Spirit Zigbee wireless heater thermostat',
supports: 'temperature, heating system control',
fromZigbee: [
fz.thermostat_att_report,
fz.eurotronic_thermostat,
fz.battery_percentage_remaining,
],
toZigbee: [
tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint,
tz.thermostat_local_temperature_calibration, tz.eurotronic_thermostat_system_mode,
tz.eurotronic_system_mode, tz.eurotronic_error_status, tz.thermostat_setpoint_raise_lower,
tz.thermostat_control_sequence_of_operation, tz.thermostat_remote_sensing,
tz.eurotronic_current_heating_setpoint, tz.eurotronic_trv_mode, tz.eurotronic_valve_position,
],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const options = {manufacturerCode: 4151};
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'hvacThermostat']);
await configureReporting.thermostatTemperature(endpoint);
await endpoint.configureReporting('hvacThermostat', [{
attribute: {ID: 0x4003, type: 41},
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 25,
}], options);
await endpoint.configureReporting('hvacThermostat', [{
attribute: {ID: 0x4008, type: 34},
minimumReportInterval: 0,
maximumReportInterval: repInterval.HOUR,
reportableChange: 1,
}], options);
},
},
// Livolo
{
zigbeeModel: ['TI0001 '],
model: 'TI0001',
description:
'Zigbee switch (1 and 2 gang) ' +
'[work in progress](https://github.com/Koenkk/zigbee2mqtt/issues/592)',
vendor: 'Livolo',
supports: 'on/off',
fromZigbee: [fz.livolo_switch_state, fz.livolo_switch_state_raw],
toZigbee: [tz.livolo_switch_on_off],
endpoint: (device) => {
return {'left': 6, 'right': 6};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(6);
await endpoint.command('genOnOff', 'toggle', {}, {});
},
onEvent: async (type, data, device) => {
if (['start', 'deviceAnnounce'].includes(type)) {
const endpoint = device.getEndpoint(6);
await endpoint.command('genOnOff', 'toggle', {}, {});
}
},
},
// Bosch
{
zigbeeModel: ['RFDL-ZB-MS'],
model: 'RADON TriTech ZB',
vendor: 'Bosch',
description: 'Wireless motion detector',
supports: 'occupancy and temperature',
fromZigbee: [fz.temperature, fz.battery_3V, fz.iaszone_occupancy_1],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['ISW-ZPR1-WP13'],
model: 'ISW-ZPR1-WP13',
vendor: 'Bosch',
description: 'Motion sensor',
supports: 'occupancy and temperature',
fromZigbee: [
fz.temperature,
fz.battery_3V, fz.iaszone_occupancy_1,
fz.ignore_iaszone_report,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(5);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
},
},
// Immax
{
zigbeeModel: ['IM-Z3.0-DIM'],
model: 'IM-Z3.0-DIM',
vendor: 'Immax',
description: 'LED E14/230V C35 5W TB 440LM ZIGBEE DIM',
extend: generic.light_onoff_brightness,
},
// Yale
{
zigbeeModel: ['YRD446 BLE TSDB'],
model: 'YRD426NRSC',
vendor: 'Yale',
description: 'Assure lock',
supports: 'lock/unlock, battery',
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery_200],
toZigbee: [tz.generic_lock],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await configureReporting.lockState(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['YRD226 TSDB'],
model: 'YRD226HA2619',
vendor: 'Yale',
description: 'Assure lock',
supports: 'lock/unlock, battery',
fromZigbee: [fz.lock, fz.battery_200],
toZigbee: [tz.generic_lock],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await configureReporting.lockState(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['YRD256 TSDB'],
model: 'YRD256HA20BP',
vendor: 'Yale',
description: 'Assure lock SL',
supports: 'lock/unlock, battery',
fromZigbee: [
fz.lock,
fz.lock_operation_event,
fz.battery_200,
],
toZigbee: [tz.generic_lock],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await configureReporting.lockState(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['iZBModule01'],
model: 'YMF40',
vendor: 'Yale',
description: 'Real living lock',
supports: 'lock/unlock, battery',
fromZigbee: [fz.lock_operation_event, fz.battery_200],
toZigbee: [tz.generic_lock],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await configureReporting.lockState(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['YRD210 PB DB'],
model: 'YRD210-HA-605',
vendor: 'Yale',
description: 'Real living keyless push button deadbolt lock',
supports: 'lock/unlock, battery',
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery_200],
toZigbee: [tz.generic_lock],
meta: {options: {disableDefaultResponse: true}, configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['closuresDoorLock', 'genPowerCfg']);
await configureReporting.lockState(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['YRD226/246 TSDB'],
model: 'YRD226/246 TSDB',
vendor: 'Yale',
description: 'Assure lock',
supports: 'lock/unlock, battery',
fromZigbee: [fz.lock, fz.battery_percentage_remaining, fz.lock_operation_event],
toZigbee: [tz.generic_lock],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await configureReporting.lockState(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// Keen Home
{
zigbeeModel: [
'SV01-410-MP-1.0', 'SV01-410-MP-1.1', 'SV01-410-MP-1.4', 'SV01-410-MP-1.5', 'SV01-412-MP-1.0',
'SV01-610-MP-1.0', 'SV01-612-MP-1.0',
],
model: 'SV01',
vendor: 'Keen Home',
description: 'Smart vent',
supports: 'open, close, position, temperature, pressure, battery',
fromZigbee: [
fz.cover_position_via_brightness, fz.temperature,
fz.generic_battery, fz.keen_home_smart_vent_pressure,
fz.ignore_onoff_report,
],
toZigbee: [
tz.cover_open_close_via_brightness,
tz.cover_position_via_brightness,
],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const binds = ['genLevelCtrl', 'genPowerCfg', 'msTemperatureMeasurement', 'msPressureMeasurement'];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.temperature(endpoint);
await configureReporting.pressure(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['SV02-410-MP-1.3', 'SV02-610-MP-1.3'],
model: 'SV02',
vendor: 'Keen Home',
description: 'Smart vent',
supports: 'open, close, position, temperature, pressure, battery',
fromZigbee: [
fz.cover_position_via_brightness, fz.temperature,
fz.generic_battery, fz.keen_home_smart_vent_pressure,
fz.ignore_onoff_report,
],
toZigbee: [
tz.cover_open_close_via_brightness,
tz.cover_position_via_brightness,
],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const binds = ['genLevelCtrl', 'genPowerCfg', 'msTemperatureMeasurement', 'msPressureMeasurement'];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.temperature(endpoint);
await configureReporting.pressure(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// AXIS
{
zigbeeModel: ['Gear'],
model: 'GR-ZB01-W',
vendor: 'AXIS',
description: 'Gear window shade motor',
supports: 'open, close, position, battery',
fromZigbee: [fz.cover_position_via_brightness, fz.generic_battery],
toZigbee: [tz.cover_open_close_via_brightness, tz.cover_position_via_brightness],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genLevelCtrl', 'genPowerCfg']);
await configureReporting.brightness(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// ELKO
{
zigbeeModel: ['ElkoDimmerZHA'],
model: '316GLEDRF',
vendor: 'ELKO',
description: 'ZigBee in-wall smart dimmer',
supports: 'on/off, brightness',
fromZigbee: [fz.brightness, fz.on_off],
toZigbee: [tz.light_onoff_brightness, tz.ignore_transition],
meta: {options: {disableDefaultResponse: true}, configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
// LivingWise
{
zigbeeModel: ['abb71ca5fe1846f185cfbda554046cce'],
model: 'LVS-ZB500D',
vendor: 'LivingWise',
description: 'ZigBee smart dimmer switch',
supports: 'on/off, brightness',
toZigbee: [tz.light_onoff_brightness],
fromZigbee: [
fz.on_off, fz.brightness, fz.ignore_light_brightness_report,
fz.ignore_genIdentify,
],
},
{
zigbeeModel: ['545df2981b704114945f6df1c780515a'],
model: 'LVS-ZB15S',
vendor: 'LivingWise',
description: 'ZigBee smart in-wall switch',
supports: 'on/off',
toZigbee: [tz.on_off],
fromZigbee: [fz.on_off, fz.ignore_basic_report],
},
{
zigbeeModel: ['e70f96b3773a4c9283c6862dbafb6a99'],
model: 'LVS-SM10ZW',
vendor: 'LivingWise',
description: 'Door or window contact switch',
supports: 'contact',
fromZigbee: [fz.iaszone_contact],
toZigbee: [],
},
{
zigbeeModel: ['895a2d80097f4ae2b2d40500d5e03dcc'],
model: 'LVS-SN10ZW_SN11',
vendor: 'LivingWise',
description: 'Occupancy sensor',
supports: 'occupancy',
fromZigbee: [fz.battery_200, fz.iaszone_occupancy_1_with_timeout],
toZigbee: [],
},
{
zigbeeModel: ['55e0fa5cdb144ba3a91aefb87c068cff'],
model: 'LVS-ZB15R',
vendor: 'LivingWise',
description: 'Zigbee smart outlet',
supports: 'on/off',
fromZigbee: [fz.on_off, fz.ignore_basic_report],
toZigbee: [tz.on_off],
},
// Stelpro
{
zigbeeModel: ['ST218'],
model: 'ST218',
vendor: 'Stelpro',
description: 'Built-in electronic thermostat',
supports: 'temperature ',
fromZigbee: [fz.thermostat_att_report],
toZigbee: [
tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint,
],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(25);
const binds = [
'genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg',
'msTemperatureMeasurement',
];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.thermostatTemperature(endpoint);
},
},
// Nyce
{
zigbeeModel: ['3011'],
model: 'NCZ-3011-HA',
vendor: 'Nyce',
description: 'Door/window sensor',
supports: 'motion, humidity and temperature',
fromZigbee: [
fz.ignore_basic_report,
fz.ignore_genIdentify, fz.ignore_poll_ctrl,
fz.generic_battery, fz.ignore_iaszone_report,
fz.iaszone_occupancy_2, fz.iaszone_contact,
],
toZigbee: [],
},
{
zigbeeModel: ['3043'],
model: 'NCZ-3043-HA',
vendor: 'Nyce',
description: 'Ceiling motion sensor',
supports: 'motion, humidity and temperature',
fromZigbee: [
fz.occupancy, fz.humidity, fz.temperature, fz.ignore_basic_report,
fz.ignore_genIdentify, fz.ignore_poll_ctrl,
fz.generic_battery, fz.ignore_iaszone_report,
fz.iaszone_occupancy_2,
],
toZigbee: [],
},
{
zigbeeModel: ['3041'],
model: 'NCZ-3041-HA',
vendor: 'Nyce',
description: 'Wall motion sensor',
supports: 'motion, humidity and temperature',
fromZigbee: [
fz.occupancy, fz.humidity, fz.temperature, fz.ignore_basic_report,
fz.ignore_genIdentify, fz.ignore_poll_ctrl,
fz.generic_battery, fz.ignore_iaszone_report,
fz.iaszone_occupancy_2,
],
toZigbee: [],
},
{
zigbeeModel: ['3045'],
model: 'NCZ-3045-HA',
vendor: 'Nyce',
description: 'Curtain motion sensor',
supports: 'motion, humidity and temperature',
fromZigbee: [
fz.occupancy, fz.humidity, fz.temperature, fz.ignore_basic_report,
fz.ignore_genIdentify, fz.ignore_poll_ctrl,
fz.generic_battery, fz.ignore_iaszone_report,
fz.iaszone_occupancy_2,
],
toZigbee: [],
},
// Securifi
{
zigbeeModel: ['PP-WHT-US'],
model: 'PP-WHT-US',
vendor: 'Securifi',
description: 'Peanut Smart Plug',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.peanut_electrical],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'haElectricalMeasurement']);
await configureReporting.onOff(endpoint);
await configureReporting.rmsVoltage(endpoint);
await configureReporting.rmsCurrent(endpoint);
await configureReporting.activePower(endpoint);
await configureReporting.acVoltageMultiplier(endpoint);
await configureReporting.acVoltageDivisor(endpoint);
await configureReporting.acCurrentMultiplier(endpoint);
await configureReporting.acCurrentDivisor(endpoint);
await configureReporting.acPowerMultiplier(endpoint);
await configureReporting.acPowerDivisor(endpoint);
},
},
// Visonic
{
zigbeeModel: ['MCT-350 SMA'],
model: 'MCT-350 SMA',
vendor: 'Visonic',
description: 'Magnetic door & window contact sensor',
supports: 'contact',
fromZigbee: [fz.iaszone_contact],
toZigbee: [],
},
{
zigbeeModel: ['MCT-340 E'],
model: 'MCT-340 E',
vendor: 'Visonic',
description: 'Magnetic door & window contact sensor',
supports: 'contact, temperature',
fromZigbee: [fz.iaszone_contact, fz.temperature, fz.battery_cr2032],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['MCT-340 SMA'],
model: 'MCT-340 SMA',
vendor: 'Visonic',
description: 'Magnetic door & window contact sensor',
supports: 'contact, temperature',
fromZigbee: [fz.iaszone_contact, fz.temperature, fz.battery_cr2032],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// Sunricher
{
zigbeeModel: ['ZG9101SAC-HP'],
model: 'ZG9101SAC-HP',
vendor: 'Sunricher',
description: 'ZigBee AC phase-cut dimmer',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['ZG2833K4_EU06'],
model: 'SR-ZG9001K4-DIM2',
vendor: 'Sunricher',
description: 'ZigBee double key wall switch',
supports: 'on/off, brightness',
fromZigbee: [
fz.genOnOff_cmdOn, fz.genOnOff_cmdOff, fz.cmd_move_with_onoff, fz.cmd_stop_with_onoff, fz.generic_battery,
],
toZigbee: [],
},
// Shenzhen Homa
{
zigbeeModel: ['HOMA1008'],
model: 'HLD812-Z-SC',
vendor: 'Shenzhen Homa',
description: 'Smart LED driver',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['HOMA1002'],
model: 'HLC610-Z',
vendor: 'Shenzhen Homa',
description: 'Wireless dimmable controller',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['HOMA1031'],
model: 'HLC821-Z-SC',
vendor: 'Shenzhen Homa',
description: 'ZigBee AC phase-cut dimmer',
extend: generic.light_onoff_brightness,
},
// Honyar
{
zigbeeModel: ['00500c35'],
model: 'U86K31ND6',
vendor: 'Honyar',
description: '3 gang switch ',
supports: 'on/off',
fromZigbee: [],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'left': 1, 'center': 2, 'right': 3};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint1 = device.getEndpoint(1);
const endpoint2 = device.getEndpoint(2);
const endpoint3 = device.getEndpoint(3);
await bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint1);
await bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint2);
await bind(endpoint3, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint3);
},
},
// Danalock
{
zigbeeModel: ['V3-BTZB'],
model: 'V3-BTZB',
vendor: 'Danalock',
description: 'BT/ZB smartlock',
supports: 'lock/unlock, battery',
fromZigbee: [fz.lock, fz.lock_operation_event, fz.battery_200],
toZigbee: [tz.generic_lock],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await configureReporting.lockState(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// NET2GRID
{
zigbeeModel: ['SP31 '],
model: 'N2G-SP',
vendor: 'NET2GRID',
description: 'White Net2Grid power outlet switch with power meter',
supports: 'on/off, power and energy measurement',
fromZigbee: [fz.genOnOff_cmdOn, fz.genOnOff_cmdOff, fz.on_off, fz.generic_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint1 = device.getEndpoint(1);
await bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint1);
const endpoint10 = device.getEndpoint(10);
await configureReporting.instantaneousDemand(endpoint10);
await configureReporting.currentSummDelivered(endpoint10);
await configureReporting.currentSummReceived(endpoint10);
await endpoint10.read('seMetering', ['unitOfMeasure', 'multiplier', 'divisor']);
},
},
// Third Reality
{
zigbeeModel: ['3RSS008Z'],
model: '3RSS008Z',
vendor: 'Third Reality',
description: 'RealitySwitch Plus',
supports: 'on/off, battery',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off, tz.ignore_transition],
},
// Hampton Bay
{
zigbeeModel: ['HDC52EastwindFan', 'HBUniversalCFRemote'],
model: '99432',
vendor: 'Hampton Bay',
description: 'Universal wink enabled white ceiling fan premier remote control',
supports: 'on/off, brightness, fan_mode and fan_state',
fromZigbee: generic.light_onoff_brightness.fromZigbee.concat([
fz.generic_fan_mode,
]),
toZigbee: generic.light_onoff_brightness.toZigbee.concat([tz.fan_mode]),
meta: {options: {disableDefaultResponse: true}, configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'hvacFanCtrl']);
await configureReporting.onOff(endpoint);
await configureReporting.brightness(endpoint);
await configureReporting.fanMode(endpoint);
},
},
{
zigbeeModel: ['ETI 12-in Puff light'],
model: '54668161',
vendor: 'Hampton Bay',
description: '12 in. LED smart puff',
extend: generic.light_onoff_brightness_colortemp,
},
// Iluminize
{
zigbeeModel: ['DIM Lighting'],
model: '511.10',
vendor: 'Iluminize',
description: 'Zigbee LED-Controller ',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['511.201'],
model: '511.201',
vendor: 'Iluminize',
description: 'HV LED dimmer',
extend: generic.light_onoff_brightness,
},
// Anchor
{
zigbeeModel: ['FB56-SKT17AC1.4'],
model: '67200BL',
description: 'Vetaar smart plug',
supports: 'on/off',
vendor: 'Anchor',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(3);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
// Gira
{
zigbeeModel: [' Remote'],
model: '2430-100',
vendor: 'Gira',
description: 'ZigBee Light Link wall transmitter',
supports: 'action',
fromZigbee: [
fz.GIRA2430_scene_click, fz.GIRA2430_on_click, fz.GIRA2430_off_click, fz.GIRA2430_down_hold,
fz.GIRA2430_up_hold, fz.GIRA2430_stop,
],
toZigbee: [],
},
// RGB genie
{
zigbeeModel: ['ZGRC-KEY-013'],
model: 'ZGRC-KEY-013',
vendor: 'RGB Genie',
description: '3 Zone remote and dimmer',
supports: 'click',
fromZigbee: [
fz.generic_battery, fz.ZGRC013_brightness_onoff, fz.ZGRC013_brightness, fz.ZGRC013_brightness_stop,
fz.ZGRC013_cmdOn, fz.ZGRC013_cmdOff, fz.ZGRC013_scene,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
},
},
// Sercomm
{
zigbeeModel: ['SZ-ESW01'],
model: 'SZ-ESW01',
vendor: 'Sercomm',
description: 'Telstra smart plug',
supports: 'on/off, power consumption',
fromZigbee: [fz.on_off, fz.SZ_ESW01_AU_power],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await configureReporting.instantaneousDemand(endpoint);
},
},
{
zigbeeModel: ['SZ-ESW01-AU'],
model: 'SZ-ESW01-AU',
vendor: 'Sercomm',
description: 'Telstra smart plug',
supports: 'on/off, power consumption',
fromZigbee: [fz.on_off, fz.SZ_ESW01_AU_power],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await configureReporting.instantaneousDemand(endpoint);
},
},
{
zigbeeModel: ['XHS2-SE'],
model: 'XHS2-SE',
vendor: 'Sercomm',
description: 'Magnetic door & window contact sensor',
supports: 'contact, temperature',
fromZigbee: [fz.iaszone_contact, fz.temperature, fz.battery_3V_2100],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
{
zigbeeModel: ['SZ-DWS04'],
model: 'SZ-DWS04',
vendor: 'Sercomm',
description: 'Magnetic door & window contact sensor',
// temperature not working yet: https://github.com/Koenkk/zigbee-herdsman-converters/issues/744
supports: 'contact',
fromZigbee: [fz.iaszone_contact, fz.temperature, fz.battery_3V_2100],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// Leedarson
{
zigbeeModel: ['LED_GU10_OWDT'],
model: 'ZM350STW1TCF',
vendor: 'Leedarson',
description: 'LED PAR16 50 GU10 tunable white',
extend: generic.light_onoff_brightness_colortemp,
},
{
zigbeeModel: ['M350ST-W1R-01'],
model: 'M350STW1',
vendor: 'Leedarson',
description: 'LED PAR16 50 GU10',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['ZHA-DimmableLight'],
model: 'A806S-Q1R',
vendor: 'Leedarson',
description: 'LED E27 tunable white',
extend: generic.light_onoff_brightness,
},
{
zigbeeModel: ['LED_E27_OWDT'],
model: 'ZA806SQ1TCF',
vendor: 'Leedarson',
description: 'LED E27 tunable white',
extend: generic.light_onoff_brightness_colortemp,
},
// GMY
{
zigbeeModel: ['CCT box'],
model: 'B07KG5KF5R',
vendor: 'GMY Smart Bulb',
description: 'GMY Smart bulb, 470lm, vintage dimmable, 2700-6500k, E27',
extend: generic.light_onoff_brightness_colortemp,
},
// Meazon
{
zigbeeModel: [
'101.301.001649', '101.301.001838', '101.301.001802', '101.301.001738',
'101.301.001412', '101.301.001765', '101.301.001814',
],
model: 'MEAZON_BIZY_PLUG',
vendor: 'Meazon',
description: 'Bizy plug meter',
supports: 'on/off, power, energy measurement and temperature',
fromZigbee: [
fz.genOnOff_cmdOn, fz.genOnOff_cmdOff, fz.on_off,
fz.meazon_meter,
],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(10);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
await configureReporting.onOff(endpoint);
const options = {manufacturerCode: 4406, disableDefaultResponse: false};
await endpoint.write('seMetering', {0x1005: {value: 0x063e, type: 25}}, options);
await configureReporting.onOff(endpoint);
await endpoint.configureReporting('seMetering', [{
attribute: {ID: 0x2000, type: 0x29},
minimumReportInterval: 1,
maximumReportInterval: repInterval.MINUTES_5,
reportableChange: 1,
}], options);
},
},
{
zigbeeModel: ['102.106.000235', '102.106.001111', '102.106.000348', '102.106.000256', '102.106.001242'],
model: 'MEAZON_DINRAIL',
vendor: 'Meazon',
description: 'DinRail 1-phase meter',
supports: 'on/off, power, energy measurement and temperature',
fromZigbee: [
fz.genOnOff_cmdOn, fz.genOnOff_cmdOff, fz.on_off,
fz.meazon_meter,
],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(10);
await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
await configureReporting.onOff(endpoint);
const options = {manufacturerCode: 4406, disableDefaultResponse: false};
await endpoint.write('seMetering', {0x1005: {value: 0x063e, type: 25}}, options);
await configureReporting.onOff(endpoint);
await endpoint.configureReporting('seMetering', [{
attribute: {ID: 0x2000, type: 0x29},
minimumReportInterval: 1,
maximumReportInterval: repInterval.MINUTES_5,
reportableChange: 1,
}], options);
},
},
// Konke
{
zigbeeModel: ['3AFE170100510001'],
model: '2AJZ4KPKEY',
vendor: 'Konke',
description: 'Multi-function button',
supports: 'single, double and long click',
fromZigbee: [
fz.konke_click,
fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['3AFE14010402000D', '3AFE27010402000D', '3AFE28010402000D'],
model: '2AJZ4KPBS',
vendor: 'Konke',
description: 'Motion sensor',
supports: 'occupancy',
fromZigbee: [fz.iaszone_occupancy_1_with_timeout, fz.battery_3V],
toZigbee: [],
},
{
zigbeeModel: ['3AFE140103020000'],
model: '2AJZ4KPFT',
vendor: 'Konke',
description: 'Temperature and humidity sensor',
supports: 'temperature and humidity',
fromZigbee: [
fz.temperature,
fz.humidity,
fz.battery_3V,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'msTemperatureMeasurement']);
await configureReporting.batteryVoltage(endpoint);
await configureReporting.temperature(endpoint);
},
},
{
zigbeeModel: ['3AFE130104020015', '3AFE270104020015'],
model: '2AJZ4KPDR',
vendor: 'Konke',
description: 'Contact sensor',
supports: 'contact',
fromZigbee: [fz.iaszone_contact, fz.battery_3V],
toZigbee: [],
},
{
zigbeeModel: ['LH07321'],
model: 'LH07321',
vendor: 'Konke',
description: 'Water detector',
supports: 'water_leak',
fromZigbee: [fz.ias_water_leak_alarm_1],
toZigbee: [],
},
// TUYATEC
{
zigbeeModel: ['RH3040'],
model: 'RH3040',
vendor: 'TUYATEC',
description: 'PIR sensor',
supports: 'occupancy',
fromZigbee: [
fz.battery_percentage_remaining, fz.generic_battery_voltage,
fz.ignore_basic_report,
fz.iaszone_occupancy_1,
],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genPowerCfg']);
await configureReporting.batteryVoltage(endpoint);
},
},
{
zigbeeModel: ['RH3052'],
model: 'TT001ZAV20',
vendor: 'TUYATEC',
description: 'Temperature & humidity sensor',
supports: 'temperature and humidity',
fromZigbee: [
fz.humidity, fz.temperature, fz.battery_200,
],
toZigbee: [],
},
// Zemismart
{
zigbeeModel: ['TS0002'],
model: 'ZM-CSW002-D',
vendor: 'Zemismart',
description: '2 gang switch',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep, fz.generic_power],
toZigbee: [tz.on_off, tz.ignore_transition],
endpoint: (device) => {
return {'l1': 1, 'l2': 2};
},
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.onOff(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
{
zigbeeModel: ['NUET56-DL27LX1.1'],
model: 'LXZB-12A',
vendor: 'Zemismart',
description: 'RGB LED downlight',
extend: generic.light_onoff_brightness_colortemp_colorxy,
},
{
zigbeeModel: ['TS0302'],
model: 'ZM-CSW032-D',
vendor: 'Zemismart',
description: 'Curtain/roller blind switch',
supports: 'open, close, stop',
fromZigbee: [fz.ignore_basic_report, fz.cover_position_tilt],
toZigbee: [tz.cover_state],
},
// Sinope
{
zigbeeModel: ['TH1123ZB'],
model: 'TH1123ZB',
vendor: 'Sinope',
description: 'Zigbee line volt thermostat',
supports: 'local temp, units, keypad lockout, mode, state, backlight, outdoor temp, time',
fromZigbee: [
fz.thermostat_att_report,
],
toZigbee: [
tz.thermostat_local_temperature,
tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint,
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout,
tz.thermostat_system_mode, tz.thermostat_running_state,
tz.sinope_thermostat_occupancy, tz.sinope_thermostat_backlight_autodim_param, tz.sinope_thermostat_time,
tz.sinope_thermostat_enable_outdoor_temperature, tz.sinope_thermostat_outdoor_temperature,
],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const binds = [
'genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg',
'msTemperatureMeasurement',
];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.thermostatTemperature(endpoint);
await configureReporting.thermostatOccupiedHeatingSetpoint(endpoint);
await configureReporting.thermostatPIHeatingDemand(endpoint);
},
},
// Lutron
{
zigbeeModel: ['LZL4BWHL01 Remote'],
model: 'LZL4BWHL01',
vendor: 'Lutron',
description: 'Connected bulb remote control',
supports: 'on/off, brightness',
fromZigbee: [fz.GIRA2430_down_hold, fz.GIRA2430_up_hold, fz.E1524_hold, fz.GIRA2430_stop],
toZigbee: [],
},
// Zen
{
zigbeeModel: ['Zen-01'],
model: 'Zen-01-W',
vendor: 'Zen',
description: 'Thermostat',
supports: 'temperature, heating/cooling system control',
fromZigbee: [
fz.generic_battery_voltage,
fz.thermostat_att_report,
],
toZigbee: [
tz.factory_reset, tz.thermostat_local_temperature, tz.thermostat_local_temperature_calibration,
tz.thermostat_occupancy, tz.thermostat_occupied_heating_setpoint,
tz.thermostat_occupied_cooling_setpoint,
tz.thermostat_unoccupied_heating_setpoint, tz.thermostat_setpoint_raise_lower,
tz.thermostat_remote_sensing, tz.thermostat_control_sequence_of_operation, tz.thermostat_system_mode,
tz.thermostat_weekly_schedule, tz.thermostat_clear_weekly_schedule, tz.thermostat_weekly_schedule_rsp,
tz.thermostat_relay_status_log, tz.thermostat_relay_status_log_rsp,
],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(3);
const binds = [
'genBasic', 'genIdentify', 'genPowerCfg', 'genTime', 'hvacThermostat', 'hvacUserInterfaceCfg',
];
await bind(endpoint, coordinatorEndpoint, binds);
await configureReporting.thermostatTemperature(endpoint);
},
},
// Hej
{
zigbeeModel: ['HejSW01'],
model: 'GLSK3ZB-1711',
vendor: 'Hej',
description: 'Goqual 1 gang Switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
{
zigbeeModel: ['HejSW02'],
model: 'GLSK3ZB-1712',
vendor: 'Hej',
description: 'Goqual 2 gang Switch',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'top': 1, 'bottom': 2};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['HejSW03'],
model: 'GLSK3ZB-1713',
vendor: 'Hej',
description: 'Goqual 3 gang Switch',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'top': 1, 'center': 2, 'bottom': 3};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['HejSW04'],
model: 'GLSK6ZB-1714',
vendor: 'Hej',
description: 'Goqual 4 gang Switch',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'top_left': 1, 'bottom_left': 2, 'top_right': 3, 'bottom_right': 4};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['HejSW05'],
model: 'GLSK6ZB-1715',
vendor: 'Hej',
description: 'Goqual 5 gang Switch',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'top_left': 1, 'center_left': 2, 'bottom_left': 3, 'top_right': 4, 'bottom_right': 5};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
},
},
{
zigbeeModel: ['HejSW06'],
model: 'GLSK6ZB-1716',
vendor: 'Hej',
description: 'Goqual 6 gang Switch',
supports: 'on/off',
fromZigbee: [fz.generic_state_multi_ep],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {
'top_left': 1, 'center_left': 2, 'bottom_left': 3,
'top_right': 4, 'center_right': 5, 'bottom_right': 6,
};
},
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
await bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(2), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(3), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(4), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(5), coordinatorEndpoint, ['genOnOff']);
await bind(device.getEndpoint(6), coordinatorEndpoint, ['genOnOff']);
},
},
// Dawon DNS
{
zigbeeModel: ['PM-C140-ZB'],
model: 'PM-C140-ZB',
vendor: 'Dawon DNS',
description: 'IOT remote control smart buried-type outlet',
supports: 'on/off, power and energy measurement',
fromZigbee: [fz.on_off, fz.generic_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
// CREE
{
zigbeeModel: ['Connected A-19 60W Equivalent ', 'Connected A-19 60W Equivalent '],
model: 'B00TN589ZG',
vendor: 'CREE',
description: 'Connected bulb',
extend: generic.light_onoff_brightness,
},
// Ubisys
{
zigbeeModel: ['S1 (5501)', 'S1-R (5601)'],
model: 'S1',
vendor: 'Ubisys',
description: 'Power switch S1',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.generic_power],
toZigbee: [tz.on_off],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(3);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
{
zigbeeModel: ['S2 (5502)', 'S2-R (5602)'],
model: 'S2',
vendor: 'Ubisys',
description: 'Power switch S2',
supports: 'on/off, power measurement',
fromZigbee: [fz.on_off, fz.generic_power],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'l1': 1, 'l2': 2};
},
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(5);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
{
zigbeeModel: ['D1 (5503)', 'D1-R (5603)'],
model: 'D1',
vendor: 'Ubisys',
description: 'Universal dimmer D1',
supports: 'on/off, brightness, power measurement',
fromZigbee: [fz.on_off, fz.brightness, fz.generic_power],
toZigbee: [tz.light_onoff_brightness],
meta: {configureKey: 2},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(4);
await configureReporting.instantaneousDemand(endpoint);
await endpoint.read('seMetering', ['multiplier', 'divisor']);
},
},
{
zigbeeModel: ['J1 (5502)', 'J1-R (5602)'],
model: 'J1',
vendor: 'Ubisys',
description: 'Shutter control J1',
supports: 'open, close, stop, position, tilt',
fromZigbee: [fz.cover_position_tilt],
toZigbee: [tz.cover_state, tz.cover_position_tilt, tz.ubisys_configure_j1],
},
// Lingan
{
zigbeeModel: ['SA-003-Zigbee'],
model: 'DZ4743-00B',
vendor: 'Lingan',
description: 'Zigbee OnOff controller',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genOnOff']);
},
},
// Lutron
{
zigbeeModel: ['Z3-1BRL'],
model: 'Z3-1BRL',
vendor: 'Lutron',
description: 'Aurora smart bulb dimmer',
supports: 'brightness',
fromZigbee: [fz.dimmer_passthru_brightness],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['genLevelCtrl']);
},
},
// Piri
{
zigbeeModel: ['GASSensor-EM'],
model: 'HSIO18008',
vendor: 'Piri',
description: 'Combustible gas sensor',
supports: 'gas',
fromZigbee: [fz.iaszone_gas_1],
toZigbee: [],
},
// PEQ
{
zigbeeModel: ['3300'],
model: '3300-P',
vendor: 'PEQ',
description: 'Door & window contact sensor',
supports: 'contact, temperature',
fromZigbee: [fz.temperature, fz.iaszone_contact, fz.battery_3V],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
await bind(endpoint, coordinatorEndpoint, ['msTemperatureMeasurement', 'genPowerCfg']);
await configureReporting.temperature(endpoint);
await configureReporting.batteryVoltage(endpoint);
await configureReporting.batteryPercentageRemaining(endpoint);
},
},
// Lonsonho
{
zigbeeModel: ['Plug_01'],
model: '4000116784070',
vendor: 'Lonsonho',
description: 'Smart plug EU',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(11);
await configureReporting.onOff(endpoint);
},
},
// iHORN
{
zigbeeModel: ['113D'],
model: 'LH-32ZB',
vendor: 'iHORN',
description: 'Temperature & humidity sensor',
supports: 'temperature and humidity',
fromZigbee: [fz.humidity, fz.temperature, fz.battery_200],
toZigbee: [],
},
// ITEAD
{
zigbeeModel: ['BASICZBR3'],
model: 'BASICZBR3',
vendor: 'ITEAD',
description: 'SONOFF ZigBee DIY Smart Switch',
supports: 'on/off',
fromZigbee: [fz.on_off],
toZigbee: [tz.on_off],
},
// TERNCY
{
zigbeeModel: ['TERNCY-PP01'],
model: 'TERNCY-PP01',
vendor: 'TERNCY',
description: 'Awareness switch',
supports: 'temperature, occupancy, illuminance, click, double click, triple click',
fromZigbee: [
fz.terncy_temperature, fz.occupancy_with_timeout,
fz.generic_illuminance, fz.terncy_raw, fz.generic_battery,
],
toZigbee: [],
},
// ORVIBO
{
zigbeeModel: ['3c4e4fc81ed442efaf69353effcdfc5f'],
model: 'CR11S8UZ',
vendor: 'ORVIBO',
description: 'Smart sticker switch',
supports: 'click, hold, release',
fromZigbee: [fz.orvibo_raw],
toZigbee: [],
},
];
module.exports = devices.map((device) =>
device.extend ? Object.assign({}, device.extend, device) : device
);
|
import { Injectable, EventEmitter } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { ConfigurationService } from './configuration.service';
import { GithubService } from './github.service';
import { SearchQueryBuilderService } from './searchquerybuilder.service';
@Injectable()
export class QuestionService {
constructor(configuration: ConfigurationService, githubService: GithubService, searchQueryBuilderService: SearchQueryBuilderService) {
this.configuration = configuration;
this.github = githubService;
this.searchQueryBuilder = searchQueryBuilderService;
this.onQuestionCreated = new EventEmitter();
this.onQuestionUpdated = new EventEmitter();
this.questions = new BehaviorSubject([]);
this.totalCountOfQuestions = 0;
this.totalCountOfHiddenQuestions = 0;
this.page = 0;
this.lastSearchQuery = undefined;
}
fetchQuestions(searchQuery, page) {
this.lastSearchQuery = searchQuery;
this.page = page || 1;
if (this.page === 1) {
this.totalCountOfHiddenQuestions = 0;
}
const searchString = this.searchQueryBuilder.buildQueryString(searchQuery);
const questionsResponse = this.github.searchIssues(searchString, this.page);
questionsResponse.subscribe((response) => {
const filteredItems = this.filterItemsByLockedState(response.items);
this.totalCountOfQuestions = this.calculateTotalCountOfQuestions(response.total_count,
response.items.length,
filteredItems.length);
const items = this.page === 1 ? filteredItems : this.questions.value.concat(filteredItems);
this.questions.next(items);
});
return questionsResponse;
}
calculateTotalCountOfQuestions(totalCountOfItems, countOfReturnedItems, countOfFilteredItems) {
this.totalCountOfHiddenQuestions = this.totalCountOfHiddenQuestions + (countOfReturnedItems - countOfFilteredItems);
return totalCountOfItems - this.totalCountOfHiddenQuestions;
}
filterItemsByLockedState(items) {
return items.filter((item) => item.locked === false);
}
hasMoreQuestions() {
if (this.totalCountOfQuestions > 0 && this.questions.value) {
return this.totalCountOfQuestions > this.questions.value.length;
}
return false;
}
fetchMoreQuestions() {
if (this.hasMoreQuestions()) {
return this.fetchQuestions(this.lastSearchQuery, this.page + 1);
}
return undefined;
}
fetchQuestion(id) {
return this.github.getIssue(id);
}
postQuestion(question) {
const isAnswered = question.isAnswered;
return this.github.postIssue(question)
.then((newQuestion) => {
return this.changeQuestionToAnsweredWhenIsAnswered(newQuestion, isAnswered);
})
.then((newQuestion) => {
const items = [newQuestion].concat(this.questions.value);
this.questions.next(items);
this.onQuestionCreated.emit(newQuestion);
});
}
changeQuestionToAnsweredWhenIsAnswered(question, isAnswered) {
if (isAnswered) {
return this.markQuestionAsAnswered(question);
}
return Promise.resolve(question);
}
markQuestionAsAnswered(question) {
question.state = 'closed';
return this.updateQuestion(question);
}
markQuestionAsUnanswered(question) {
question.state = 'open';
return this.updateQuestion(question);
}
updateQuestion(question) {
return this.github.patchIssue(question.number, this.createIssueFromQuestion(question))
.then((updatedQuestion) => {
const items = this.questions.value;
const index = items.findIndex((item) => item.number === updatedQuestion.number);
items[index] = updatedQuestion;
this.questions.next(items);
this.onQuestionUpdated.emit(updatedQuestion);
return updatedQuestion;
});
}
createIssueFromQuestion(question) {
return {
title: question.title,
body: question.body,
state: question.state,
labels: question.labels.map((label) => label.name)
};
}
}
|
import React, {Component,useState} from 'react';
import Head from 'next/head';
import Router from 'next/router';
import Link from 'next/link';
import {Container, Navbar, Nav, NavItem, NavDropdown, Form, FormControl, Button, Modal, Badge} from 'react-bootstrap';
import API from '../lib/axios';
import {logout, isLogin, isAdmin} from '../lib/utils';
import {ImagesUrl} from '../lib/urls';
import SearchForm from './searchForm';
import {FaBars, FaSignInAlt, FaSignOutAlt, FaKey,FaUser,FaShoppingCart, FaDatabase} from 'react-icons/fa';
import Skeleton from 'react-loading-skeleton';
import { toast } from 'react-toastify';
function Cart(props) {
const [show, setShow] = useState(false);
const handleClose = () => setShow(false);
const handleShow = () => setShow(true);
const removeCart = () => {
localStorage.setItem('cartItem', JSON.stringify([]));
toast.success("Keranjang dikosongkan", {position: "top-center"});
setTimeout(()=>{
Router.reload();
},4000);
}
return (
<>
<Button onClick={handleShow} className="btn text-light" >
<FaShoppingCart size="1.25em" /> {props.cartCount ? <Badge pill bg="danger">{props.cartCount}</Badge> : ""}
</Button>
<Modal show={show} size="lg" onHide={handleClose} animation={false} backdrop="static" keyboard={false}>
<Modal.Header closeButton>
<Modal.Title>Keranjang Belanja</Modal.Title>
</Modal.Header>
<Modal.Body>
{props.cartCount ? <span className="text-danger">{props.cartCount}</span> : ""}
<Button variant="danger" onClick={removeCart}>Hapus</Button>
</Modal.Body>
<Modal.Footer>
<Button variant="light" onClick={handleClose}>
Tutup
</Button>
<Button variant="primary" onClick={handleClose}>
Pesan
</Button>
</Modal.Footer>
</Modal>
</>
);
}
class MyNavbar extends Component{
constructor(props) {
super(props)
this.state = {
Menu: [],
login:false,
id: '',
name: '',
foto:'',
email:'',
user: false,
admin: false,
url: ImagesUrl(),
theme: '',
loading: true
}
}
Logout = () => {
logout();
}
componentDidMount = () => {
if(localStorage.getItem('isAdmin')){
console.log('ADMIN')
const data = JSON.parse(localStorage.getItem('isAdmin'))
const id = data[0].email
console.log(id)
API.GetUserId(id).then(res=>{
setTimeout(() => this.setState({
id: res.data[0].id,
name: res.data[0].name,
email: res.data[0].email,
loading: false,
login: true
}), 100);
})
} else if(localStorage.getItem('isLogin')){
console.log('USER')
this.setState({
login : true
})
} else {
console.log('ORA LOGIN')
this.setState({
login : false
})
}
API.GetMenu().then(res => {
setTimeout(() => this.setState({
Menu: res.data,
loading: false,
}), 100);
})
API.GetSetting().then(res=>{
this.setState({
theme: res.data[0].theme,
})
})
//if (isAdmin()) {
//return( Router.push('/admin') )
//}
}
render(){
const {Menu} = this.state;
const ListMenu = Menu.map((m, i) => (
<li key={i}><Link href={m.url} passHref><a className="nav-link"> {m.menu} </a></Link></li>
))
return(
<>
<Navbar sticky="top" bg="primary" variant="dark" className="shadow py-3" expand="md" >
<Container fluid>
<Link href="/" passHref><Navbar.Brand className="fw-bold">{this.props.setting.company}</Navbar.Brand></Link>
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-navbar-nav" className="sub-menu-bar">
<ul className="navbar-nav me-auto">
{ this.state.loading ?<><Skeleton width={180} height={25} /></>:<>{ListMenu}</>}
</ul>
<SearchForm/>
{this.state.login === false ?
<>
<Cart cartCount={this.props.cartCount} />
<Link href="/login" passHref><Button className="btn text-light"><FaUser size="1.25em" /></Button></Link>
</>
:
<>
<ul id="nav" className="navbar-nav">
{/*<NavDropdown title=
{this.state.foto ? (
<>
<img
alt="Foto"
width="30"
className="rounded-circle"
src={this.state.url+this.state.foto} /> {this.state.email}
</>
) : (
<>
<img
alt="Foto"
width="30"
className="rounded-circle"
src={this.state.url+'no-avatar.png'} /> {this.state.email}
</>
)} id="basic-nav-dropdown" align="end"> */}
<NavDropdown title={<><FaUser size="1.25em"/> {this.state.email}</>} id="basic-nav-dropdown" align="end">
<NavDropdown.Item>{this.state.email}</NavDropdown.Item>
<Link href="/admin" passHref><NavDropdown.Item><FaDatabase/> Dashboard</NavDropdown.Item></Link>
<Link href="/admin/password" passHref><NavDropdown.Item><FaKey/> Ganti Password</NavDropdown.Item></Link>
<NavDropdown.Item onClick={this.Logout} href=''><FaSignOutAlt/> Logout</NavDropdown.Item>
</NavDropdown>
</ul>
</>
}
</Navbar.Collapse>
</Container>
</Navbar>
</>
);
}
}
export default MyNavbar;
|
var searchData=
[
['send',['Send',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#abaf0bc6898e64208fcc2e2d75e9b9b47a94966d90747b97d1f0f206c98a8b1ac3',1,'VectorNav::Protocol::Uart']]],
['sendandoff',['SendAndOff',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#abaf0bc6898e64208fcc2e2d75e9b9b47a7991e673608980b17b31ea409f7322c8',1,'VectorNav::Protocol::Uart']]],
['senssat',['SensSat',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#a259e3833888488dedc2d761d035634a2a513b76ceeb04770a91feaa39724d8aaa',1,'VectorNav::Protocol::Uart']]],
['serialbufferoverflow',['SerialBufferOverflow',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#ad02591d7d544ac0f9c1369ad52590ee1a7ff525f0bfa644d188d3f7a186a3f59c',1,'VectorNav::Protocol::Uart']]],
['sufficientdynamicmotion',['SufficientDynamicMotion',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#aac109bc8f59ca31b0b2f731c1623f83aab2816d94a54fd9ffe95075a5c2fadcc7',1,'VectorNav::Protocol::Uart']]],
['syncincnt',['SyncInCnt',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#acc1334ff93b85c8052f05af92748dc06ab8e9125476bb04ab197469960d6e621b',1,'VectorNav.Protocol.Uart.SyncInCnt()'],['../namespace_vector_nav_1_1_protocol_1_1_uart.html#ac92e037f9703c1ad4a4025158adb4046ab8e9125476bb04ab197469960d6e621b',1,'VectorNav.Protocol.Uart.SyncInCnt()']]],
['syncincount',['SyncInCount',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#aa0f7400584ddae26a1d9da0914d2454ca00919c9d2e1e58e3fbe475d212127e72',1,'VectorNav::Protocol::Uart']]],
['syncinfalling',['SyncInFalling',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#a13ed463d7152b387f58121f31ee6aa3ba80a23290ff54ee1391d2f9872ff5e51e',1,'VectorNav::Protocol::Uart']]],
['syncinrising',['SyncInRising',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#a13ed463d7152b387f58121f31ee6aa3babb37398a769b44b43c27d3b208930838',1,'VectorNav::Protocol::Uart']]],
['syncintime',['SyncInTime',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#aa0f7400584ddae26a1d9da0914d2454ca03a0ed8dee7ead9f43a8cf6ca2d020db',1,'VectorNav::Protocol::Uart']]],
['syncoutcounter',['SyncOutCounter',['../namespace_vector_nav_1_1_protocol_1_1_uart.html#aa0f7400584ddae26a1d9da0914d2454ca5801b96b62c5902241ee4c2d5d8ff276',1,'VectorNav::Protocol::Uart']]]
];
|
(function(d){ const l = d['de'] = d['de'] || {}; l.dictionary=Object.assign( l.dictionary||{}, {"%0 of %1":"%0 von %1",Aquamarine:"Aquamarinblau","Austral sign":"Austral-Zeichen",Big:"Groß","Bitcoin sign":"Bitcoin-Zeichen",Black:"Schwarz","Block quote":"Blockzitat",Blue:"Blau","Blue marker":"Blauer Marker",Bold:"Fett","Bulleted List":"Aufzählungsliste",Cancel:"Abbrechen","Cannot upload file:":"Datei kann nicht hochgeladen werden:","Cedi sign":"Cedi-Zeichen","Cent sign":"Cent-Zeichen","Centered image":"zentriertes Bild","Change image text alternative":"Alternativ Text ändern","Character categories":"Zeichenkategorien","Characters: %0":"Zeichen: %0 ","Choose heading":"Überschrift auswählen",Code:"Code","Colon sign":"Colón-Zeichen",Column:"Spalte","Could not insert image at the current position.":"Das Bild konnte an der aktuellen Position nicht eingefügt werden.","Could not obtain resized image URL.":"Die URL des angepassten Bildes konnte nicht abgerufen werden.","Cruzeiro sign":"Cruzeiro-Zeichen","Currency sign":"Währungssymbol","Decrease indent":"Einzug verkleinern",Default:"Standard","Delete column":"Spalte löschen","Delete row":"Zeile löschen","Dim grey":"Dunkelgrau","Document colors":"Dokumentfarben","Dollar sign":"Dollar-Zeichen","Dong sign":"Đồng-Zeichen",Downloadable:"Herunterladbar","Drachma sign":"Drachme-Zeichen","Dropdown toolbar":"Dropdown-Liste Werkzeugleiste","Edit link":"Link bearbeiten","Editor toolbar":"Editor Werkzeugleiste","Enter image caption":"Bildunterschrift eingeben","Euro sign":"Euro-Zeichen","Euro-currency sign":"Euro-Währungszeichen","Font Background Color":"Hintergrundfarbe","Font Color":"Schriftfarbe","Font Family":"Schriftart","Font Size":"Schriftgröße","French franc sign":"Französischer Franc-Zeichen","Full size image":"Bild in voller Größe","German penny sign":"Pfennig-Zeichen",Green:"Grün","Green marker":"Grüner Marker","Green pen":"Grüne Schriftfarbe",Grey:"Grau","Guarani sign":"Guaraní-Zeichen","Header column":"Kopfspalte","Header row":"Kopfzeile",Heading:"Überschrift","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4","Heading 5":"Überschrift 5","Heading 6":"Überschrift 6",Highlight:"Texthervorhebung","Hryvnia sign":"Hrywnja-Zeichen",Huge:"Sehr groß","Image toolbar":"Bild Werkzeugleiste","image widget":"Bild-Steuerelement","Increase indent":"Einzug vergrößern","Indian rupee sign":"Indische Rupie-Zeichen","Insert column left":"Spalte links einfügen","Insert column right":"Spalte rechts einfügen","Insert image":"Bild einfügen","Insert image or file":"Bild oder Datei einfügen","Insert media":"Medium einfügen","Insert row above":"Zeile oben einfügen","Insert row below":"Zeile unten einfügen","Insert table":"Tabelle einfügen","Inserting image failed":"Einfügen des Bildes fehlgeschlagen",Italic:"Kursiv","Kip sign":"Kip-Zeichen","Left aligned image":"linksbündiges Bild","Light blue":"Hellblau","Light green":"Hellgrün","Light grey":"Hellgrau",Link:"Link","Link URL":"Link Adresse","Lira sign":"Lira-Zeichen","Livre tournois sign":"Livre tournois-Zeichen","Manat sign":"Manat-Zeichen","Media URL":"Medien-Url","media widget":"Medien-Widget","Merge cell down":"Zelle unten verbinden","Merge cell left":"Zelle links verbinden","Merge cell right":"Zelle rechts verbinden","Merge cell up":"Zelle verbinden","Merge cells":"Zellen verbinden","Mill sign":"Mill-Zeichen","Naira sign":"Naira-Zeichen","New sheqel sign":"Schekel-Zeichen",Next:"Nächste","Nordic mark sign":"Nordische Mark-Zeichen","Numbered List":"Nummerierte Liste","Open in a new tab":"In neuem Tab öffnen","Open link in new tab":"Link im neuen Tab öffnen",Orange:"Orange","Page break":"Seitenumbruch",Paragraph:"Absatz","Paste the media URL in the input.":"Medien-URL in das Eingabefeld einfügen.","Peseta sign":"Peseta-Zeichen","Peso sign":"Philippinischer Peso-Zeichen","Pink marker":"Pinker Marker","Pound sign":"Pfund-Zeichen",Previous:"vorherige",Purple:"Violett",Red:"Rot","Red pen":"Rote Schriftfarbe",Redo:"Wiederherstellen","Remove color":"Farbe entfernen","Remove highlight":"Texthervorhebung entfernen","Rich Text Editor":"Rich Text Editor","Rich Text Editor, %0":"Rich-Text-Editor, %0","Right aligned image":"rechtsbündiges Bild",Row:"Zeile","Ruble sign":"Rubel-Zeichen","Rupee sign":"Rupie-Zeichen",Save:"Speichern","Select column":"","Select row":"","Selecting resized image failed":"Das angepasste Bild konnte nicht ausgewählt werden.","Show more items":"Mehr anzeigen","Side image":"Seitenbild",Small:"Klein","Special characters":"Sonderzeichen","Spesmilo sign":"Spesmilo-Zeichen","Split cell horizontally":"Zelle horizontal teilen","Split cell vertically":"Zelle vertikal teilen",Subscript:"Tiefgestellt",Superscript:"Hochgestellt","Table toolbar":"Tabelle Werkzeugleiste","Tenge sign":"Tenge-Zeichen","Text alternative":"Textalternative","Text highlight toolbar":"Text hervorheben Werkzeugleiste","The URL must not be empty.":"Die Url darf nicht leer sein","This link has no URL":"Dieser Link hat keine Adresse","This media URL is not supported.":"Diese Medien-Url wird nicht unterstützt",Tiny:"Sehr klein","Tip: Paste the URL into the content to embed faster.":"Tipp: Zum schnelleren Einbetten können Sie die Medien-URL in den Inhalt einfügen.","Tugrik sign":"Tugrik-Zeichen","Turkish lira sign":"Türkische Lira-Zeichen",Turquoise:"Türkis",Underline:"Unterstrichen",Undo:"Rückgängig",Unlink:"Link entfernen","Upload failed":"Hochladen fehlgeschlagen","Upload in progress":"Upload läuft",White:"Weiß","Widget toolbar":"Widget Werkzeugleiste","Won sign":"Won-Zeichen","Words: %0":"Wörter: %0 ",Yellow:"Gelb","Yellow marker":"Gelber Marker","Yen sign":"Yen-Zeichen"} );l.getPluralForm=function(n){return (n != 1);;};})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
|
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
const blockResources = require(`./block-resources`)
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on(`task`, Object.assign({}, blockResources))
}
|
var editedServiceID = 0;
$('#btnAddNewModal').click(function() {
$('#resource').val('');
$('#AddNewModal').modal('show');
});
$('#btnAddNew').click(function() {
if (!$('#newPortfolioForm').valid()) {
return;
}
showSpinner('#addModalContent');
$.ajax({
url: base_url + "api/resource/add",
method: "POST",
data: new FormData(document.getElementById('newPortfolioForm')),
contentType: false,
cache: false,
processData: false,
dataType: "json",
success: function (res) {
hideSpinner('#addModalContent');
if (res.success == true) {
showSuccessToastr('Add New Portfolio');
document.location.reload();
}
else {
showErrorToastr('Add New Portfolio');
}
},
error: function (err) {
hideSpinner('#addModalContent');
showErrorToastr('Add New Portfolio');
}
});
});
function deleteService(ID) {
editedServiceID = ID;
$('#deleteModal').modal('show');
}
$('#btnDelete').click(function() {
$.ajax({
url : base_url + 'api/resource/delete',
method : 'post',
data: {
ID : editedServiceID
},
success: function() {
showSuccessToastr('Delete Portfolio');
document.location.reload();
},
error: function(err) {
showErrorToastr('Delete Portfolio');
}
})
})
function editService(ID) {
$('#ID_Edit').val(ID);
showSpinner('body');
$.ajax({
url: base_url + 'api/resource/get',
type: 'post',
data: {
ID : ID
},
success: function(res) {
hideSpinner('body');
var data = JSON.parse(res);
data = data.data;
if (data.success == false) {
showErrorToastr('Get Detail');
return;
}
$('#Title_Edit').val(data.Title);
$('#imgPortfolio').attr('src', base_url + 'assets/images/ingredients/' + data.Attach);
$('#editModal').modal('show');
}
});
}
$('.portfolio-camera').click(function() {
$('#Portfolio_Edit').click();
});
$('#Portfolio_Edit').change(function () {
readURL(this, $('#imgPortfolio'));
});
function readURL(input, avatar) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$(avatar)
.attr('src', e.target.result);
};
reader.readAsDataURL(input.files[0]);
}
}
$('#btnUpdate').click(function() {
showSpinner('#editModalContent');
$.ajax({
url: base_url + 'api/resource/update',
method: "POST",
data: new FormData(document.getElementById('updateServiceForm')),
contentType: false,
cache: false,
processData: false,
dataType: "json",
success: function(res){
hideSpinner('#editModalContent');
if (res.success == true)
document.location.reload();
else
showErrorToastr(res.message);
},
error: function(err) {
hideSpinner('#editModalContent');
showErrorToastr('Update Portfolio');
}
})
})
function showSpinner(target) {
App.blockUI({
target: target,
animate: true
});
}
function hideSpinner(target) {
App.unblockUI(target);
}
|
import React from 'react'
import QA from '../../components/quarterly-analysis';
export default () => <QA title="Hotels" type="Hotels" />
|
module.exports = {
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": "plugin:vue/essential",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"vue"
],
"rules": {
}
};
|
import { test, forCases, given } from 'sazerac'
import OreCategory from './ore-category.service.js'
describe('OreCategory', function () {
test(OreCategory.prototype.transform, () => {
forCases([
given({ data: { category: 'admin_tools' } }),
given({ data: { category: 'admin tools' } }),
]).expect({
category: 'admin tools',
})
})
test(OreCategory.render, () => {
given({ category: 'admin tools' }).expect({
message: 'admin tools',
})
})
})
|
(function() {
var app = angular.module('diagnostics', ['common']);
}());
|
import moment from 'moment';
import {Response} from 'ember-cli-mirage';
import {dasherize} from '@ember/string';
import {isArray} from '@ember/array';
import {isBlank, isEmpty} from '@ember/utils';
import {paginateModelCollection} from '../utils';
function normalizeBooleanParams(arr) {
if (!isArray(arr)) {
return arr;
}
return arr.map((i) => {
if (i === 'true') {
return true;
} else if (i === 'false') {
return false;
} else {
return i;
}
});
}
// TODO: use GQL to parse filter string?
function extractFilterParam(param, filter) {
let filterRegex = new RegExp(`${param}:(.*?)(?:\\+|$)`);
let match;
let [, result] = filter.match(filterRegex) || [];
if (result.startsWith('[')) {
match = result.replace(/^\[|\]$/g, '').split(',');
} else if (result) {
match = [result];
}
return normalizeBooleanParams(match);
}
// NOTE: mirage requires Model objects when saving relationships, however the
// `attrs` on POST/PUT requests will contain POJOs for authors and tags so we
// need to replace them
function extractAuthors(postAttrs, users) {
return postAttrs.authors.map(author => users.find(author.id));
}
function extractTags(postAttrs, tags) {
return postAttrs.tags.map((requestTag) => {
let tag = tags.find(requestTag.id);
if (!tag) {
tag = tag.create(requestTag);
}
return tag;
});
}
export default function mockPosts(server) {
server.post('/posts', function ({posts, users, tags}) {
let attrs = this.normalizedRequestAttrs();
attrs.authors = extractAuthors(attrs, users);
attrs.tags = extractTags(attrs, tags);
if (isBlank(attrs.slug) && !isBlank(attrs.title)) {
attrs.slug = dasherize(attrs.title);
}
return posts.create(attrs);
});
// TODO: handle authors filter
server.get('/posts/', function ({posts}, {queryParams}) {
let {filter, page, limit} = queryParams;
page = +page || 1;
limit = +limit || 15;
let statusFilter = extractFilterParam('status', filter);
let collection = posts.all().filter((post) => {
let matchesStatus = true;
if (!isEmpty(statusFilter)) {
matchesStatus = statusFilter.includes(post.status);
}
return matchesStatus;
});
return paginateModelCollection('posts', collection, page, limit);
});
server.get('/posts/:id/', function ({posts}, {params}) {
let {id} = params;
let post = posts.find(id);
return post || new Response(404, {}, {
errors: [{
errorType: 'NotFoundError',
message: 'Post not found.'
}]
});
});
server.put('/posts/:id/', function ({posts, users, tags}, {params}) {
let attrs = this.normalizedRequestAttrs();
let post = posts.find(params.id);
attrs.authors = extractAuthors(attrs, users);
attrs.tags = extractTags(attrs, tags);
attrs.updatedAt = moment.utc().toDate();
return post.update(attrs);
});
server.del('/posts/:id/');
}
|
import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);
/* Layout */
import Layout from "@/layout";
/**
* Note: sub-menu only appear when route children.length >= 1
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
*
* hidden: true if set true, item will not show in the sidebar(default is false)
* alwaysShow: true if set true, will always show the root menu
* if not set alwaysShow, when item has more than one children route,
* it will becomes nested mode, otherwise not show the root menu
* redirect: noRedirect if set noRedirect will no redirect in the breadcrumb
* name:'router-name' the name is used by <keep-alive> (must set!!!)
* meta : {
roles: ['admin','editor'] control the page roles (you can set multiple roles)
title: 'title' the name show in sidebar and breadcrumb (recommend set)
icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
breadcrumb: false if set false, the item will hidden in breadcrumb(default is true)
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
}
*/
/**
* constantRoutes
* a base page that does not have permission requirements
* all roles can be accessed
*/
export const constantRoutes = [
{
path: "/login",
component: () => import("@/views/login/index"),
hidden: true,
},
{
path: "/register",
component: () => import("@/views/register/index"),
hidden: true,
},
{
path: "/404",
component: () => import("@/views/404"),
hidden: true,
},
{
path: "/",
component: Layout,
redirect: "/dashboard",
children: [
{
path: "dashboard",
name: "Dashboard",
component: () => import("@/views/dashboard/index"),
meta: { title: "首页", icon: "dashboard" },
},
],
},
{
path: "/datasheet",
component: Layout,
redirect: "/datasheet/list",
name: "datasheet",
meta: { title: "物性表", icon: "form" },
alwaysShow: true,
children: [
{
path: "list",
name: "DatasheetList",
component: () => import("@/views/Datasheet/DatasheetList"),
meta: { title: "物性表列表", icon: "sort" },
},
{
path: "filler",
name: "filler",
component: () => import("@/views/Datasheet/FillerList"),
meta: { title: "填充物", icon: "nested" },
},
],
},
{
path: "/application",
component: Layout,
redirect: "/application/list",
name: "application",
alwaysShow: true,
meta: { title: "应用库", icon: "app" },
children: [
{
path: "list",
name: "classification",
component: () => import("@/views/Application/Classification.vue"),
meta: { title: "应用分类", icon: "sort" },
},
],
},
{
path: "/categories",
component: Layout,
children: [
{
path: "list",
name: "categories",
component: () => import("@/views/Categories/CategoriesList"),
meta: { title: "材料种类", icon: "nested" },
},
],
},
{
path: "/use",
component: Layout,
children: [
{
path: "index",
name: "use",
component: () => import("@/views/Application/UseList.vue"),
meta: { title: "用途", icon: "tree" },
},
],
},
{
path: "/news",
component: Layout,
redirect: "/news/list",
name: "news",
meta: { title: "资讯库", icon: "form" },
children: [
{
path: "list",
component: () => import("@/views/News/NewsList"),
meta: { title: "资讯库", icon: "form" },
},
],
},
{
path: "/system",
component: Layout,
name: "system",
meta: { title: "系统管理", icon: "system" },
alwaysShow: true,
children: [
{
path: "center",
component: () => import("@/views/System//PersonalCenter"),
meta: { title: "个人中心", icon: "user" },
},
],
},
// 404 page must be placed at the end !!!
{ path: "*", redirect: "/404", hidden: true },
];
const createRouter = () =>
new Router({
// mode: "history", // require service support
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes,
});
const router = createRouter();
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
export function resetRouter() {
const newRouter = createRouter();
router.matcher = newRouter.matcher; // reset router
}
export default router;
|
"use strict";
const lib_1 = require("../lib");
module.exports = {
'can create dynamic references with service and key with colons'(test) {
// GIVEN
const stack = new lib_1.Stack();
// WHEN
const ref = new lib_1.CfnDynamicReference(lib_1.CfnDynamicReferenceService.SSM, 'a:b:c');
// THEN
test.equal(stack.resolve(ref), '{{resolve:ssm:a:b:c}}');
test.done();
},
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5keW5hbWljLXJlZmVyZW5jZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QuZHluYW1pYy1yZWZlcmVuY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUNBLGdDQUFnRjtBQUVoRixpQkFBUztJQUNQLGdFQUFnRSxDQUFDLElBQVU7UUFDekUsUUFBUTtRQUNSLE1BQU0sS0FBSyxHQUFHLElBQUksV0FBSyxFQUFFLENBQUM7UUFFMUIsT0FBTztRQUNQLE1BQU0sR0FBRyxHQUFHLElBQUkseUJBQW1CLENBQUMsZ0NBQTBCLENBQUMsR0FBRyxFQUFFLE9BQU8sQ0FBQyxDQUFDO1FBRTdFLE9BQU87UUFDUCxJQUFJLENBQUMsS0FBSyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLEVBQUUsdUJBQXVCLENBQUMsQ0FBQztRQUV4RCxJQUFJLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDZCxDQUFDO0NBQ0YsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFRlc3QgfSBmcm9tICdub2RldW5pdCc7XG5pbXBvcnQgeyBDZm5EeW5hbWljUmVmZXJlbmNlLCBDZm5EeW5hbWljUmVmZXJlbmNlU2VydmljZSwgU3RhY2sgfSBmcm9tICcuLi9saWInO1xuXG5leHBvcnQgPSB7XG4gICdjYW4gY3JlYXRlIGR5bmFtaWMgcmVmZXJlbmNlcyB3aXRoIHNlcnZpY2UgYW5kIGtleSB3aXRoIGNvbG9ucycodGVzdDogVGVzdCkge1xuICAgIC8vIEdJVkVOXG4gICAgY29uc3Qgc3RhY2sgPSBuZXcgU3RhY2soKTtcblxuICAgIC8vIFdIRU5cbiAgICBjb25zdCByZWYgPSBuZXcgQ2ZuRHluYW1pY1JlZmVyZW5jZShDZm5EeW5hbWljUmVmZXJlbmNlU2VydmljZS5TU00sICdhOmI6YycpO1xuXG4gICAgLy8gVEhFTlxuICAgIHRlc3QuZXF1YWwoc3RhY2sucmVzb2x2ZShyZWYpLCAne3tyZXNvbHZlOnNzbTphOmI6Y319Jyk7XG5cbiAgICB0ZXN0LmRvbmUoKTtcbiAgfSxcbn07XG4iXX0=
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const chai = require('chai');
chai.should();
const sinon = require('sinon');
const JavaVisitor = require('../../../../lib/codegen/fromcto/java/javavisitor.js');
const AbstractPlugin = require('../../../../lib/codegen/abstractplugin.js');
const ClassDeclaration = require('@accordproject/concerto-core').ClassDeclaration;
const EnumDeclaration = require('@accordproject/concerto-core').EnumDeclaration;
const fileWriter = require('../../../../lib/filewriter');
describe('JavaMissingPlugin', function () {
let javaVisit;
let mockFileWriter;
beforeEach(() => {
javaVisit = new JavaVisitor();
javaVisit.plugin = new AbstractPlugin();
mockFileWriter = sinon.createStubInstance(fileWriter);
});
describe('startClassFile', () => {
it('should fail to write a java class file header', () => {
let param = {
fileWriter: mockFileWriter
};
let mockClass = sinon.createStubInstance(ClassDeclaration);
mockClass.isClassDeclaration.returns(true);
mockClass.getModelFile.returns({
getNamespace: () => {
return 'org.acme.people';
},
getName: () => {
return 'Bob';
}
});
(function () { javaVisit.startClassFile(mockClass, param); }).should.throw('addClassImport not implemented in default plugin');
});
});
describe('visitEnumDeclaration', () => {
it('should fail to write an enum declaration and call accept on each property', () => {
let acceptSpy = sinon.spy();
let param = {
fileWriter: mockFileWriter
};
let mockEnumDeclaration = sinon.createStubInstance(EnumDeclaration);
mockEnumDeclaration.isEnum.returns(true);
mockEnumDeclaration.getName.returns('Bob');
mockEnumDeclaration.getOwnProperties.returns([{
accept: acceptSpy
},
{
accept: acceptSpy
}]);
sinon.stub(javaVisit, 'startClassFile');
sinon.stub(javaVisit, 'endClassFile');
(function () { javaVisit.visitEnumDeclaration(mockEnumDeclaration, param); }).should.throw('addEnumAnnotations not implemented in default plugin');
});
});
describe('visitClassDeclaration', () => {
let acceptSpy;
let param;
let mockClassDeclaration;
beforeEach(() => {
acceptSpy = sinon.spy();
param = {
fileWriter: mockFileWriter
};
mockClassDeclaration = sinon.createStubInstance(ClassDeclaration);
mockClassDeclaration.isClassDeclaration.returns(true);
mockClassDeclaration.getName.returns('Bob');
mockClassDeclaration.getModelFile.returns({
getImports: () => {
return ['oranges', 'apples'];
}
});
mockClassDeclaration.getOwnProperties.returns([{
accept: acceptSpy
},
{
accept: acceptSpy
}]);
mockClassDeclaration.isConcept.returns(false);
mockClassDeclaration.isAbstract.returns(false);
mockClassDeclaration.getSuperType.returns(false);
mockClassDeclaration.getIdentifierFieldName.returns(false);
sinon.stub(javaVisit, 'startClassFile');
sinon.stub(javaVisit, 'endClassFile');
});
it('should fail to write a class declaration and call accept on each property', () => {
(function () { javaVisit.visitClassDeclaration(mockClassDeclaration, param); }).should.throw('addClassAnnotations not implemented in default plugin');
});
it('should fail to write additional class declaration methods', () => {
(function () { javaVisit.plugin.addClassMethods(mockClassDeclaration, param); }).should.throw('addClassMethods not implemented in default plugin');
});
});
});
|
class ESVec2 {
constructor(x=0.0, y=0.0) {
this.x = x;
this.y = y;
}
add(vec2) {
this.x += vec2.x;
this.y += vec2.y;
return this;
}
sub(vec2) {
this.x -= vec2.x;
this.y -= vec2.y;
return this;
}
mul(vec2) {
this.x *= vec2.x;
this.y *= vec2.y;
return this;
}
div(vec2) {
this.x /= vec2.x;
this.y /= vec2.y;
return this;
}
addXY(x, y) {
this.x += x;
this.y += y;
return this;
}
subXY(x, y) {
this.x -= x;
this.y -= y;
return this;
}
mulXY(x, y) {
this.x *= x;
this.y *= y;
return this;
}
divXY(x, y) {
this.x /= x;
this.y /= y;
return this;
}
addC(c) {
this.x += c;
this.y += c;
return this;
}
subC(c) {
this.x -= c;
this.y -= c;
return this;
}
mulK(c) {
this.x *= c;
this.y *= c;
return this;
}
divC(c) {
this.x /= c;
this.y /= c;
return this;
}
negate() {
this.x = -this.x;
this.y = -this.y;
return this;
}
dot(vec2) {
return this.x * vec2.x +
this.y * vec2.y;
}
lengthSqr() {
return this.dot(this);
}
length() {
return Math.sqrt(this.dot(this));
}
set(vec2) {
this.x = vec2.x;
this.y = vec2.y;
return this;
}
setXY(x, y) {
this.x = x;
this.y = y;
return this;
}
normalize() {
const len = this.length();
this.x /= len;
this.y /= len;
return this;
}
equals(other) {
if (other instanceof ESVec2)
return this.x == other.x &&
this.y == other.y;
return false;
}
toString() {
return this.x + ", " + this.y;
}
}
|
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
export default class Breadcrumb extends Component {
render() {
const path = window.location.pathname.split('/').filter(v => v);
return (
<span className="breadcrumb">
<span>
<Link to="/">root</Link>
</span>
{
path.map((part, i) => {
console.log(path.slice(0, i).join('/') + `/${part}`)
return (
<span key={i}>
<span>/</span>
<Link to={`${i > 0 ? '/' : ''}` + path.slice(0, i).join('/') + `/${part}`}>{part}</Link>
</span>
)
})
}
</span>
)
}
}
|
const lang = "en-US";
module.exports = lang;
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
import { CONST_EXPR } from 'angular2/src/facade/lang';
import { StringMapWrapper } from 'angular2/src/facade/collection';
import { EventEmitter, ObservableWrapper } from 'angular2/src/facade/async';
import { Directive, forwardRef, Provider, Inject, Optional, Self } from 'angular2/core';
import { NgControl } from './ng_control';
import { NG_VALIDATORS, NG_ASYNC_VALIDATORS } from '../validators';
import { NG_VALUE_ACCESSOR } from './control_value_accessor';
import { setUpControl, composeValidators, composeAsyncValidators, isPropertyUpdated, selectValueAccessor } from './shared';
const formControlBinding = CONST_EXPR(new Provider(NgControl, { useExisting: forwardRef(() => NgFormControl) }));
/**
* Binds an existing {@link Control} to a DOM element.
*
* ### Example ([live demo](http://plnkr.co/edit/jcQlZ2tTh22BZZ2ucNAT?p=preview))
*
* In this example, we bind the control to an input element. When the value of the input element
* changes, the value of the control will reflect that change. Likewise, if the value of the
* control changes, the input element reflects that change.
*
* ```typescript
* @Component({
* selector: 'my-app',
* template: `
* <div>
* <h2>NgFormControl Example</h2>
* <form>
* <p>Element with existing control: <input type="text"
* [ngFormControl]="loginControl"></p>
* <p>Value of existing control: {{loginControl.value}}</p>
* </form>
* </div>
* `,
* directives: [CORE_DIRECTIVES, FORM_DIRECTIVES]
* })
* export class App {
* loginControl: Control = new Control('');
* }
* ```
*
* ###ngModel
*
* We can also use `ngModel` to bind a domain model to the form.
*
* ### Example ([live demo](http://plnkr.co/edit/yHMLuHO7DNgT8XvtjTDH?p=preview))
*
* ```typescript
* @Component({
* selector: "login-comp",
* directives: [FORM_DIRECTIVES],
* template: "<input type='text' [ngFormControl]='loginControl' [(ngModel)]='login'>"
* })
* class LoginComp {
* loginControl: Control = new Control('');
* login:string;
* }
* ```
*/
export let NgFormControl = class extends NgControl {
constructor(_validators, _asyncValidators, valueAccessors) {
super();
this._validators = _validators;
this._asyncValidators = _asyncValidators;
this.update = new EventEmitter();
this.valueAccessor = selectValueAccessor(this, valueAccessors);
}
ngOnChanges(changes) {
if (this._isControlChanged(changes)) {
setUpControl(this.form, this);
this.form.updateValueAndValidity({ emitEvent: false });
}
if (isPropertyUpdated(changes, this.viewModel)) {
this.form.updateValue(this.model);
this.viewModel = this.model;
}
}
get path() { return []; }
get validator() { return composeValidators(this._validators); }
get asyncValidator() { return composeAsyncValidators(this._asyncValidators); }
get control() { return this.form; }
viewToModelUpdate(newValue) {
this.viewModel = newValue;
ObservableWrapper.callEmit(this.update, newValue);
}
_isControlChanged(changes) {
return StringMapWrapper.contains(changes, "form");
}
};
NgFormControl = __decorate([
Directive({
selector: '[ngFormControl]',
bindings: [formControlBinding],
inputs: ['form: ngFormControl', 'model: ngModel'],
outputs: ['update: ngModelChange'],
exportAs: 'ngForm'
}),
__param(0, Optional()),
__param(0, Self()),
__param(0, Inject(NG_VALIDATORS)),
__param(1, Optional()),
__param(1, Self()),
__param(1, Inject(NG_ASYNC_VALIDATORS)),
__param(2, Optional()),
__param(2, Self()),
__param(2, Inject(NG_VALUE_ACCESSOR)),
__metadata('design:paramtypes', [Array, Array, Array])
], NgFormControl);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmdfZm9ybV9jb250cm9sLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYW5ndWxhcjIvc3JjL2NvbW1vbi9mb3Jtcy9kaXJlY3RpdmVzL25nX2Zvcm1fY29udHJvbC50cyJdLCJuYW1lcyI6WyJOZ0Zvcm1Db250cm9sIiwiTmdGb3JtQ29udHJvbC5jb25zdHJ1Y3RvciIsIk5nRm9ybUNvbnRyb2wubmdPbkNoYW5nZXMiLCJOZ0Zvcm1Db250cm9sLnBhdGgiLCJOZ0Zvcm1Db250cm9sLnZhbGlkYXRvciIsIk5nRm9ybUNvbnRyb2wuYXN5bmNWYWxpZGF0b3IiLCJOZ0Zvcm1Db250cm9sLmNvbnRyb2wiLCJOZ0Zvcm1Db250cm9sLnZpZXdUb01vZGVsVXBkYXRlIiwiTmdGb3JtQ29udHJvbC5faXNDb250cm9sQ2hhbmdlZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O09BQU8sRUFBQyxVQUFVLEVBQUMsTUFBTSwwQkFBMEI7T0FDNUMsRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLGdDQUFnQztPQUN4RCxFQUFDLFlBQVksRUFBRSxpQkFBaUIsRUFBQyxNQUFNLDJCQUEyQjtPQUNsRSxFQUlMLFNBQVMsRUFDVCxVQUFVLEVBQ1YsUUFBUSxFQUNSLE1BQU0sRUFDTixRQUFRLEVBQ1IsSUFBSSxFQUNMLE1BQU0sZUFBZTtPQUNmLEVBQUMsU0FBUyxFQUFDLE1BQU0sY0FBYztPQUUvQixFQUFhLGFBQWEsRUFBRSxtQkFBbUIsRUFBQyxNQUFNLGVBQWU7T0FDckUsRUFBdUIsaUJBQWlCLEVBQUMsTUFBTSwwQkFBMEI7T0FDekUsRUFDTCxZQUFZLEVBQ1osaUJBQWlCLEVBQ2pCLHNCQUFzQixFQUN0QixpQkFBaUIsRUFDakIsbUJBQW1CLEVBQ3BCLE1BQU0sVUFBVTtBQUdqQixNQUFNLGtCQUFrQixHQUNwQixVQUFVLENBQUMsSUFBSSxRQUFRLENBQUMsU0FBUyxFQUFFLEVBQUMsV0FBVyxFQUFFLFVBQVUsQ0FBQyxNQUFNLGFBQWEsQ0FBQyxFQUFDLENBQUMsQ0FBQyxDQUFDO0FBRXhGOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBOENHO0FBQ0gseUNBT21DLFNBQVM7SUFNMUNBLFlBQStEQSxXQUNWQSxFQUNnQkEsZ0JBQ2hCQSxFQUV6Q0EsY0FBc0NBO1FBQ2hEQyxPQUFPQSxDQUFDQTtRQU5xREEsZ0JBQVdBLEdBQVhBLFdBQVdBLENBQ3JCQTtRQUNnQkEscUJBQWdCQSxHQUFoQkEsZ0JBQWdCQSxDQUNoQ0E7UUFQckRBLFdBQU1BLEdBQUdBLElBQUlBLFlBQVlBLEVBQUVBLENBQUNBO1FBVzFCQSxJQUFJQSxDQUFDQSxhQUFhQSxHQUFHQSxtQkFBbUJBLENBQUNBLElBQUlBLEVBQUVBLGNBQWNBLENBQUNBLENBQUNBO0lBQ2pFQSxDQUFDQTtJQUVERCxXQUFXQSxDQUFDQSxPQUFzQ0E7UUFDaERFLEVBQUVBLENBQUNBLENBQUNBLElBQUlBLENBQUNBLGlCQUFpQkEsQ0FBQ0EsT0FBT0EsQ0FBQ0EsQ0FBQ0EsQ0FBQ0EsQ0FBQ0E7WUFDcENBLFlBQVlBLENBQUNBLElBQUlBLENBQUNBLElBQUlBLEVBQUVBLElBQUlBLENBQUNBLENBQUNBO1lBQzlCQSxJQUFJQSxDQUFDQSxJQUFJQSxDQUFDQSxzQkFBc0JBLENBQUNBLEVBQUNBLFNBQVNBLEVBQUVBLEtBQUtBLEVBQUNBLENBQUNBLENBQUNBO1FBQ3ZEQSxDQUFDQTtRQUNEQSxFQUFFQSxDQUFDQSxDQUFDQSxpQkFBaUJBLENBQUNBLE9BQU9BLEVBQUVBLElBQUlBLENBQUNBLFNBQVNBLENBQUNBLENBQUNBLENBQUNBLENBQUNBO1lBQy9DQSxJQUFJQSxDQUFDQSxJQUFJQSxDQUFDQSxXQUFXQSxDQUFDQSxJQUFJQSxDQUFDQSxLQUFLQSxDQUFDQSxDQUFDQTtZQUNsQ0EsSUFBSUEsQ0FBQ0EsU0FBU0EsR0FBR0EsSUFBSUEsQ0FBQ0EsS0FBS0EsQ0FBQ0E7UUFDOUJBLENBQUNBO0lBQ0hBLENBQUNBO0lBRURGLElBQUlBLElBQUlBLEtBQWVHLE1BQU1BLENBQUNBLEVBQUVBLENBQUNBLENBQUNBLENBQUNBO0lBRW5DSCxJQUFJQSxTQUFTQSxLQUFrQkksTUFBTUEsQ0FBQ0EsaUJBQWlCQSxDQUFDQSxJQUFJQSxDQUFDQSxXQUFXQSxDQUFDQSxDQUFDQSxDQUFDQSxDQUFDQTtJQUU1RUosSUFBSUEsY0FBY0EsS0FBdUJLLE1BQU1BLENBQUNBLHNCQUFzQkEsQ0FBQ0EsSUFBSUEsQ0FBQ0EsZ0JBQWdCQSxDQUFDQSxDQUFDQSxDQUFDQSxDQUFDQTtJQUVoR0wsSUFBSUEsT0FBT0EsS0FBY00sTUFBTUEsQ0FBQ0EsSUFBSUEsQ0FBQ0EsSUFBSUEsQ0FBQ0EsQ0FBQ0EsQ0FBQ0E7SUFFNUNOLGlCQUFpQkEsQ0FBQ0EsUUFBYUE7UUFDN0JPLElBQUlBLENBQUNBLFNBQVNBLEdBQUdBLFFBQVFBLENBQUNBO1FBQzFCQSxpQkFBaUJBLENBQUNBLFFBQVFBLENBQUNBLElBQUlBLENBQUNBLE1BQU1BLEVBQUVBLFFBQVFBLENBQUNBLENBQUNBO0lBQ3BEQSxDQUFDQTtJQUVPUCxpQkFBaUJBLENBQUNBLE9BQTZCQTtRQUNyRFEsTUFBTUEsQ0FBQ0EsZ0JBQWdCQSxDQUFDQSxRQUFRQSxDQUFDQSxPQUFPQSxFQUFFQSxNQUFNQSxDQUFDQSxDQUFDQTtJQUNwREEsQ0FBQ0E7QUFDSFIsQ0FBQ0E7QUFsREQ7SUFBQyxTQUFTLENBQUM7UUFDVCxRQUFRLEVBQUUsaUJBQWlCO1FBQzNCLFFBQVEsRUFBRSxDQUFDLGtCQUFrQixDQUFDO1FBQzlCLE1BQU0sRUFBRSxDQUFDLHFCQUFxQixFQUFFLGdCQUFnQixDQUFDO1FBQ2pELE9BQU8sRUFBRSxDQUFDLHVCQUF1QixDQUFDO1FBQ2xDLFFBQVEsRUFBRSxRQUFRO0tBQ25CLENBQUM7SUFPWSxXQUFDLFFBQVEsRUFBRSxDQUFBO0lBQUMsV0FBQyxJQUFJLEVBQUUsQ0FBQTtJQUFDLFdBQUMsTUFBTSxDQUFDLGFBQWEsQ0FBQyxDQUFBO0lBRTFDLFdBQUMsUUFBUSxFQUFFLENBQUE7SUFBQyxXQUFDLElBQUksRUFBRSxDQUFBO0lBQUMsV0FBQyxNQUFNLENBQUMsbUJBQW1CLENBQUMsQ0FBQTtJQUVoRCxXQUFDLFFBQVEsRUFBRSxDQUFBO0lBQUMsV0FBQyxJQUFJLEVBQUUsQ0FBQTtJQUFDLFdBQUMsTUFBTSxDQUFDLGlCQUFpQixDQUFDLENBQUE7O2tCQWlDM0Q7QUFBQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7Q09OU1RfRVhQUn0gZnJvbSAnYW5ndWxhcjIvc3JjL2ZhY2FkZS9sYW5nJztcbmltcG9ydCB7U3RyaW5nTWFwV3JhcHBlcn0gZnJvbSAnYW5ndWxhcjIvc3JjL2ZhY2FkZS9jb2xsZWN0aW9uJztcbmltcG9ydCB7RXZlbnRFbWl0dGVyLCBPYnNlcnZhYmxlV3JhcHBlcn0gZnJvbSAnYW5ndWxhcjIvc3JjL2ZhY2FkZS9hc3luYyc7XG5pbXBvcnQge1xuICBPbkNoYW5nZXMsXG4gIFNpbXBsZUNoYW5nZSxcbiAgUXVlcnksXG4gIERpcmVjdGl2ZSxcbiAgZm9yd2FyZFJlZixcbiAgUHJvdmlkZXIsXG4gIEluamVjdCxcbiAgT3B0aW9uYWwsXG4gIFNlbGZcbn0gZnJvbSAnYW5ndWxhcjIvY29yZSc7XG5pbXBvcnQge05nQ29udHJvbH0gZnJvbSAnLi9uZ19jb250cm9sJztcbmltcG9ydCB7Q29udHJvbH0gZnJvbSAnLi4vbW9kZWwnO1xuaW1wb3J0IHtWYWxpZGF0b3JzLCBOR19WQUxJREFUT1JTLCBOR19BU1lOQ19WQUxJREFUT1JTfSBmcm9tICcuLi92YWxpZGF0b3JzJztcbmltcG9ydCB7Q29udHJvbFZhbHVlQWNjZXNzb3IsIE5HX1ZBTFVFX0FDQ0VTU09SfSBmcm9tICcuL2NvbnRyb2xfdmFsdWVfYWNjZXNzb3InO1xuaW1wb3J0IHtcbiAgc2V0VXBDb250cm9sLFxuICBjb21wb3NlVmFsaWRhdG9ycyxcbiAgY29tcG9zZUFzeW5jVmFsaWRhdG9ycyxcbiAgaXNQcm9wZXJ0eVVwZGF0ZWQsXG4gIHNlbGVjdFZhbHVlQWNjZXNzb3Jcbn0gZnJvbSAnLi9zaGFyZWQnO1xuaW1wb3J0IHtWYWxpZGF0b3JGbiwgQXN5bmNWYWxpZGF0b3JGbn0gZnJvbSAnLi92YWxpZGF0b3JzJztcblxuY29uc3QgZm9ybUNvbnRyb2xCaW5kaW5nID1cbiAgICBDT05TVF9FWFBSKG5ldyBQcm92aWRlcihOZ0NvbnRyb2wsIHt1c2VFeGlzdGluZzogZm9yd2FyZFJlZigoKSA9PiBOZ0Zvcm1Db250cm9sKX0pKTtcblxuLyoqXG4gKiBCaW5kcyBhbiBleGlzdGluZyB7QGxpbmsgQ29udHJvbH0gdG8gYSBET00gZWxlbWVudC5cbiAqXG4gKiAjIyMgRXhhbXBsZSAoW2xpdmUgZGVtb10oaHR0cDovL3BsbmtyLmNvL2VkaXQvamNRbFoydFRoMjJCWloydWNOQVQ/cD1wcmV2aWV3KSlcbiAqXG4gKiBJbiB0aGlzIGV4YW1wbGUsIHdlIGJpbmQgdGhlIGNvbnRyb2wgdG8gYW4gaW5wdXQgZWxlbWVudC4gV2hlbiB0aGUgdmFsdWUgb2YgdGhlIGlucHV0IGVsZW1lbnRcbiAqIGNoYW5nZXMsIHRoZSB2YWx1ZSBvZiB0aGUgY29udHJvbCB3aWxsIHJlZmxlY3QgdGhhdCBjaGFuZ2UuIExpa2V3aXNlLCBpZiB0aGUgdmFsdWUgb2YgdGhlXG4gKiBjb250cm9sIGNoYW5nZXMsIHRoZSBpbnB1dCBlbGVtZW50IHJlZmxlY3RzIHRoYXQgY2hhbmdlLlxuICpcbiAqICBgYGB0eXBlc2NyaXB0XG4gKiBAQ29tcG9uZW50KHtcbiAqICAgc2VsZWN0b3I6ICdteS1hcHAnLFxuICogICB0ZW1wbGF0ZTogYFxuICogICAgIDxkaXY+XG4gKiAgICAgICA8aDI+TmdGb3JtQ29udHJvbCBFeGFtcGxlPC9oMj5cbiAqICAgICAgIDxmb3JtPlxuICogICAgICAgICA8cD5FbGVtZW50IHdpdGggZXhpc3RpbmcgY29udHJvbDogPGlucHV0IHR5cGU9XCJ0ZXh0XCJcbiAqIFtuZ0Zvcm1Db250cm9sXT1cImxvZ2luQ29udHJvbFwiPjwvcD5cbiAqICAgICAgICAgPHA+VmFsdWUgb2YgZXhpc3RpbmcgY29udHJvbDoge3tsb2dpbkNvbnRyb2wudmFsdWV9fTwvcD5cbiAqICAgICAgIDwvZm9ybT5cbiAqICAgICA8L2Rpdj5cbiAqICAgYCxcbiAqICAgZGlyZWN0aXZlczogW0NPUkVfRElSRUNUSVZFUywgRk9STV9ESVJFQ1RJVkVTXVxuICogfSlcbiAqIGV4cG9ydCBjbGFzcyBBcHAge1xuICogICBsb2dpbkNvbnRyb2w6IENvbnRyb2wgPSBuZXcgQ29udHJvbCgnJyk7XG4gKiB9XG4gKiAgYGBgXG4gKlxuICogIyMjbmdNb2RlbFxuICpcbiAqIFdlIGNhbiBhbHNvIHVzZSBgbmdNb2RlbGAgdG8gYmluZCBhIGRvbWFpbiBtb2RlbCB0byB0aGUgZm9ybS5cbiAqXG4gKiAjIyMgRXhhbXBsZSAoW2xpdmUgZGVtb10oaHR0cDovL3BsbmtyLmNvL2VkaXQveUhNTHVITzdETmdUOFh2dGpUREg/cD1wcmV2aWV3KSlcbiAqXG4gKiAgYGBgdHlwZXNjcmlwdFxuICogQENvbXBvbmVudCh7XG4gKiAgICAgIHNlbGVjdG9yOiBcImxvZ2luLWNvbXBcIixcbiAqICAgICAgZGlyZWN0aXZlczogW0ZPUk1fRElSRUNUSVZFU10sXG4gKiAgICAgIHRlbXBsYXRlOiBcIjxpbnB1dCB0eXBlPSd0ZXh0JyBbbmdGb3JtQ29udHJvbF09J2xvZ2luQ29udHJvbCcgWyhuZ01vZGVsKV09J2xvZ2luJz5cIlxuICogICAgICB9KVxuICogY2xhc3MgTG9naW5Db21wIHtcbiAqICBsb2dpbkNvbnRyb2w6IENvbnRyb2wgPSBuZXcgQ29udHJvbCgnJyk7XG4gKiAgbG9naW46c3RyaW5nO1xuICogfVxuICogIGBgYFxuICovXG5ARGlyZWN0aXZlKHtcbiAgc2VsZWN0b3I6ICdbbmdGb3JtQ29udHJvbF0nLFxuICBiaW5kaW5nczogW2Zvcm1Db250cm9sQmluZGluZ10sXG4gIGlucHV0czogWydmb3JtOiBuZ0Zvcm1Db250cm9sJywgJ21vZGVsOiBuZ01vZGVsJ10sXG4gIG91dHB1dHM6IFsndXBkYXRlOiBuZ01vZGVsQ2hhbmdlJ10sXG4gIGV4cG9ydEFzOiAnbmdGb3JtJ1xufSlcbmV4cG9ydCBjbGFzcyBOZ0Zvcm1Db250cm9sIGV4dGVuZHMgTmdDb250cm9sIGltcGxlbWVudHMgT25DaGFuZ2VzIHtcbiAgZm9ybTogQ29udHJvbDtcbiAgdXBkYXRlID0gbmV3IEV2ZW50RW1pdHRlcigpO1xuICBtb2RlbDogYW55O1xuICB2aWV3TW9kZWw6IGFueTtcblxuICBjb25zdHJ1Y3RvcihAT3B0aW9uYWwoKSBAU2VsZigpIEBJbmplY3QoTkdfVkFMSURBVE9SUykgcHJpdmF0ZSBfdmFsaWRhdG9yczpcbiAgICAgICAgICAgICAgICAgIC8qIEFycmF5PFZhbGlkYXRvcnxGdW5jdGlvbj4gKi8gYW55W10sXG4gICAgICAgICAgICAgIEBPcHRpb25hbCgpIEBTZWxmKCkgQEluamVjdChOR19BU1lOQ19WQUxJREFUT1JTKSBwcml2YXRlIF9hc3luY1ZhbGlkYXRvcnM6XG4gICAgICAgICAgICAgICAgICAvKiBBcnJheTxWYWxpZGF0b3J8RnVuY3Rpb24+ICovIGFueVtdLFxuICAgICAgICAgICAgICBAT3B0aW9uYWwoKSBAU2VsZigpIEBJbmplY3QoTkdfVkFMVUVfQUNDRVNTT1IpXG4gICAgICAgICAgICAgIHZhbHVlQWNjZXNzb3JzOiBDb250cm9sVmFsdWVBY2Nlc3NvcltdKSB7XG4gICAgc3VwZXIoKTtcbiAgICB0aGlzLnZhbHVlQWNjZXNzb3IgPSBzZWxlY3RWYWx1ZUFjY2Vzc29yKHRoaXMsIHZhbHVlQWNjZXNzb3JzKTtcbiAgfVxuXG4gIG5nT25DaGFuZ2VzKGNoYW5nZXM6IHtba2V5OiBzdHJpbmddOiBTaW1wbGVDaGFuZ2V9KTogdm9pZCB7XG4gICAgaWYgKHRoaXMuX2lzQ29udHJvbENoYW5nZWQoY2hhbmdlcykpIHtcbiAgICAgIHNldFVwQ29udHJvbCh0aGlzLmZvcm0sIHRoaXMpO1xuICAgICAgdGhpcy5mb3JtLnVwZGF0ZVZhbHVlQW5kVmFsaWRpdHkoe2VtaXRFdmVudDogZmFsc2V9KTtcbiAgICB9XG4gICAgaWYgKGlzUHJvcGVydHlVcGRhdGVkKGNoYW5nZXMsIHRoaXMudmlld01vZGVsKSkge1xuICAgICAgdGhpcy5mb3JtLnVwZGF0ZVZhbHVlKHRoaXMubW9kZWwpO1xuICAgICAgdGhpcy52aWV3TW9kZWwgPSB0aGlzLm1vZGVsO1xuICAgIH1cbiAgfVxuXG4gIGdldCBwYXRoKCk6IHN0cmluZ1tdIHsgcmV0dXJuIFtdOyB9XG5cbiAgZ2V0IHZhbGlkYXRvcigpOiBWYWxpZGF0b3JGbiB7IHJldHVybiBjb21wb3NlVmFsaWRhdG9ycyh0aGlzLl92YWxpZGF0b3JzKTsgfVxuXG4gIGdldCBhc3luY1ZhbGlkYXRvcigpOiBBc3luY1ZhbGlkYXRvckZuIHsgcmV0dXJuIGNvbXBvc2VBc3luY1ZhbGlkYXRvcnModGhpcy5fYXN5bmNWYWxpZGF0b3JzKTsgfVxuXG4gIGdldCBjb250cm9sKCk6IENvbnRyb2wgeyByZXR1cm4gdGhpcy5mb3JtOyB9XG5cbiAgdmlld1RvTW9kZWxVcGRhdGUobmV3VmFsdWU6IGFueSk6IHZvaWQge1xuICAgIHRoaXMudmlld01vZGVsID0gbmV3VmFsdWU7XG4gICAgT2JzZXJ2YWJsZVdyYXBwZXIuY2FsbEVtaXQodGhpcy51cGRhdGUsIG5ld1ZhbHVlKTtcbiAgfVxuXG4gIHByaXZhdGUgX2lzQ29udHJvbENoYW5nZWQoY2hhbmdlczoge1trZXk6IHN0cmluZ106IGFueX0pOiBib29sZWFuIHtcbiAgICByZXR1cm4gU3RyaW5nTWFwV3JhcHBlci5jb250YWlucyhjaGFuZ2VzLCBcImZvcm1cIik7XG4gIH1cbn1cbiJdfQ==
|
/**
* 登录业务逻辑
*/
'use strict';
import './fundDetails.less';
import fundDetailTpl from './fundDetails.tpl.html';
import Tool from '../../utils/tool';
import widget from '../../utils/widget';
import fundGdInFo from '../../components/fundGood-info/fundGood-info.html';
import ydsyTpl from '../../components/ydsyTpl/ydsyTpl.html';
import HistoricalNetTpl from '../../components/fund-netValue/fund-netValue.html';
import fundProductElemTpl from '../../components/fund-productElem/fund-productElem.html';
import fundPerForManCe from '../../components/fund-performance/fund-performance.html';
import fundDetailStore from '../../store/fundDetail_store';
import highCharts from 'highcharts';
import Constant from '../../utils/constant';
export default class FundDetail extends widget {
constructor() {
super();
}
init(page) {
try {
$('.view').attr('data-page', 'fundDetail');
let pageLeg = $('.fundDetail-page').length;
if(pageLeg === 0) {
window.location.reload();
}
let _fundDetailTpl = Tool.renderTpl(fundDetailTpl);
$('.fundDetail-page').html('').append($(_fundDetailTpl));
this.fundGoodInfo();
this.productElements();
$('.framework7-root').on('click', '.fundDeHrefRegFund', () => { window.location.href = `${Constant.Href_Route}fund.html?tab2=active` });
$('.framework7-root').on('click', '.fundHrefBul', () => { window.location.href = `${Constant.Href_Route}fundBulletin.html?code=${Tool.parseURL('code')}`; });
$('.framework7-root').on('click', '.reservationHref', () => { window.location.href = `${Constant.Href_Route}reservation.html?code=${Tool.parseURL('code')}&name=${encodeURI($('.sdx-fund-jjCpH1').text())}`; });
} catch (e) {
console.log(e.message);
}
}
/*
获取基金产品信息
*/
fundGoodInfo() {
fundDetailStore.postChanPin({
data: {
action: 'chanpin',
ChanPinCode: Tool.parseURL('code'),
cid: sessionStorage.getItem('cid'),
}
}, (res) => {
let json = res['chanpin'];
this.netValue = [...res['chanpin']['lishijingzhi']];
let dateArr = [];
let dateArrLsJz = [];
json['total_unit_net_worth'] = json.total_unit_net_worth.toFixed(4);
json['create_date'] = json['create_date'].substring(0, 11).replace(/\//g, ".");
json['unit_net_worth_date'] = json['unit_net_worth_date'].replace(/\//g, ".");
json['year_return_rate'] = (json['year_return_rate']).toFixed(1);
json['found'] = ((json['total_unit_net_worth'] - 1) * 100).toFixed(1);
let echoFundGdInFoTpl = Tool.renderTpl(fundGdInFo, json);
$('.sdxEchoCpInfo').html('').append($(echoFundGdInFoTpl));
for(let j = 0; j < json['yueshouyi'].length; j++) {
let getTime = new Date(json['yueshouyi'][j].date).getTime();
json['yueshouyi'][j].format = new Date(getTime).getFullYear() + '年' + (new Date(getTime).getMonth() + 1) + '月';
json['yueshouyi'][j].year = new Date(getTime).getFullYear();
dateArr.push(new Date(getTime).getFullYear());
}
for(let j = 0; j < json['lishijingzhi'].length; j++) {
let getTime = new Date(json['lishijingzhi'][j].date).getTime();
json['lishijingzhi'][j].format = new Date(getTime).getFullYear() + '年' + (new Date(getTime).getMonth() + 1) + '月';
json['lishijingzhi'][j].year = new Date(getTime).getFullYear();
json['lishijingzhi'][j].unit_net_worth = json['lishijingzhi'][j].unit_net_worth.toFixed(4);
json['lishijingzhi'][j].total_unit_net_worth = json['lishijingzhi'][j].total_unit_net_worth.toFixed(4);
dateArrLsJz.push(new Date(getTime).getFullYear());
}
let formatArr = this.removeArrValue(dateArr);
let formatArrLsJz = this.removeArrValue(dateArrLsJz);
$('.fundPerForManCe').html('').append($(Tool.renderTpl(fundPerForManCe, json)));
this.productRequirements();
this.postNetValue(json['lishijingzhi']);
this.monthlyIncome(json['yueshouyi'], formatArr, json);
this.HistoricalNetVal(formatArrLsJz, json['lishijingzhi']);
})
}
/*
获取产品风格要求
*/
productRequirements() {
fundDetailStore.postChanpinFenggeyaoqiu({
data: {
action: 'ChanpinFenggeyaoqiu',
cid: sessionStorage.getItem('cid'),
chanpinCode: Tool.parseURL('code'),
tongxingzhen: sessionStorage.getItem('idCard'),
}
}, (res) => {
sessionStorage.setItem('rgFlag', res.is_rgFlag);
if(res.is_rgFlag === undefined) {
$('.rgFlagFalse').show();
$('.rgFlagTrue').hide();
} else {
$('.rgFlagFalse').hide();
$('.rgFlagTrue').show();
}
})
}
/*
获取净值走势
*/
postNetValue(jz) {
let jzJson = jz;
let companyJzArr = [];
let addUpArr = [];
let dateSFM = '';
let _categories = [];
for(let i = 0; i < jzJson.length; i++) {
companyJzArr.push(jzJson[i]['unit_net_worth']);
addUpArr.push(jzJson[i]['total_unit_net_worth']);
dateSFM = /\d{4}[/]\d{1,2}[/]\d{1,2}/g.exec(jz[i].date);
_categories.push(dateSFM[0]);
}
let numArray = addUpArr.map((value)=>{
return parseFloat(value);
});
let companyArray = companyJzArr.map((value)=>{
return parseFloat(value);
});
highCharts.chart('containerJzZs', {
chart: {
type: 'spline'
},
title: {
text: ' '
},
subtitle: {
text: ' '
},
xAxis: {
// lineWidth: 0,
tickWidth: 0,
tickInterval: _categories.length - 1,
categories: _categories,
plotBands: [{
from: 4.5,
to: 6.5,
}],
labels: {
overflow: 'justify'
},
// tickWidth: 0,
// type: 'datetime',
// labels: {
// overflow: 'justify'
// },
// categories: _categories,
// tickInterval: _categories.length - 2,
},
colors: ['#438eff', '#ff7246'],
yAxis: {
title: {
text: ' '
},
min: 0,
minorGridLineWidth: 0,
gridLineWidth: 0,
alternateGridColor: null,
},
tooltip: {
valueSuffix: ' ',
// formatter: function() {
// return '<b>' + this.series.userOptions.name + ':</b>' + this.y + '<br><b>' + this.series.userOptions.name2 + ':</b>' + this.series.userOptions.data2[this.point.index];
// },
pointFormatter: function() {
if(this.color === '#438eff') {
this.color2 = '#ff7246';
}
if(this.color === '#ff7246') {
this.color2 = '#438eff';
}
return '<span style="color: '+this.color+'">\u25CF</span> '+
this.series.userOptions.name+': <b>'+ this.y +'</b><br/>' + '<span style="color: '+this.color2+'">\u25CF</span> '+
this.series.userOptions.name2+': <b>'+ this.series.userOptions.data2[this.index] +'</b><br/> '
}
},
credits: {
enabled: false
},
plotOptions: {
spline: {
lineWidth: 4,
states: {
hover: {
lineWidth: 5
}
},
marker: {
enabled: false
},
}
},
series: [{
name: '单位净值',
name2: '累计净值',
data: companyArray,
data2: numArray,
}, {
name: '累计净值',
name2: '单位净值',
data: numArray,
data2: companyArray,
}],
navigation: {
menuItemStyle: {
fontSize: '10px'
}
}
});
}
/*
获取月度收益
*/
monthlyIncome(sy, formatArr, jsonRes) {
let self = this;
let _jsonRes = jsonRes;
let syJson = sy;
let _newData = [];
this.DrawMonthlyIncome(sy);
myApp.picker({
input: '#pickerZxt',
cols: [
{
textAlign: 'center',
values: ['全部', ...formatArr]
}
],
toolbarCloseText: '完成',
closeByOutsideClick: false,
onClose: function (p) {
if(p.value[0] !== '全部') {
_newData.splice(0, _newData.length);
syJson.filter((val) => {
if(val.year === parseInt(p.value[0])) {
_newData.push(val);
}
});
} else {
_newData = [...syJson];
}
$('.monthlyQb').text(p.value[0]);
$('.monSyText').text(p.value[0]);
_jsonRes['yueshouyi'] = _newData;
self.againDrawMonthlyIncome(_newData, _jsonRes);
},
});
}
/*
绘制月度收益
*/
DrawMonthlyIncome(sy) {
let syJson = sy;
let profitSyArr = [];
let date = [];
for(let i = 0; i < syJson.length; i++) {
profitSyArr.push(syJson[i]['return_ratio']);
date.push(syJson[i]['date'].substring(0, 7).replace(/\//g, "."));
}
highCharts.chart('containerYdSy', {
chart: {
type: 'column'
},
title: {
text: ' '
},
colors: ['#df3d3e', '#c9c9c9'],
xAxis: {
lineWidth: 0,
tickWidth: 0,
categories: date,
tickInterval: date.length - 1,
},
yAxis: {
title: {
text: ' '
},
labels: {
formatter: function () {
return this.value + '%';
}
}
},
credits: {
enabled: false
},
series: [{
name: '盈利',
data: profitSyArr,
tooltip: {
valueSuffix: '%'
}
}]
});
}
/*
重新绘制月度收益
*/
againDrawMonthlyIncome(newData, jsonRes) {
$('.ydList').html('').append($(Tool.renderTpl(ydsyTpl, jsonRes)));
let syJson = newData;
let profitSyArr = [];
let date = [];
for(let i = 0; i < syJson.length; i++) {
profitSyArr.push(syJson[i]['return_ratio']);
date.push(syJson[i]['date'].substring(0, 7).replace(/\//g, "."));
}
highCharts.chart('containerYdSy', {
chart: {
type: 'column'
},
title: {
text: ' '
},
colors: ['#df3d3e', '#c9c9c9'],
xAxis: {
lineWidth: 0,
tickWidth: 0,
categories: date,
tickInterval: date.length - 1,
},
yAxis: {
title: {
text: ' '
},
labels: {
formatter: function () {
return this.value + '%';
}
}
},
credits: {
enabled: false
},
series: [{
name: '盈利',
data: profitSyArr,
tooltip: {
valueSuffix: '%'
}
}]
});
}
/*
获取历史净值
*/
HistoricalNetVal(formatArr, historyZz) {
let self = this;
self.fitData = false;
self.monthDataFit = false;
$('.dateYearValue').text(formatArr[formatArr.length - 1]);
let _hisZz = historyZz;
let _arrDate = [];
let hashArr = [];
let hashArr2 = [];
let oldMonth = [];
let lastArr = [];
let lastArr2 = [];
let lastArr3 = [];
let lastArr4 = [];
let lastArr5 = [];
let valLeg = [];
for(let i = 0; i < _hisZz.length; i++) {
let getTime = new Date(_hisZz[i].date).getTime();
_arrDate.push({
year: new Date(getTime).getFullYear(),
monthStr: new Date(getTime).getMonth() + 1,
month: [new Date(getTime).getMonth() + 1],
..._hisZz[i],
forDate: _hisZz[i].date.substring(0, 10).replace(/\//g, '/'),
});
}
_arrDate.filter((val, item) => {
if(_arrDate[0].year !== _arrDate[item].year) {
self.fitData = true;
if(_arrDate[_arrDate.length - 1].year.toString() === val.year.toString()) {
hashArr2.push(_arrDate[item].monthStr);
lastArr2.push(val);
lastArr2.forEach((v, l) => {
if (lastArr2[l].monthStr > lastArr2[0].monthStr) {
self.monthDataFit = true;
lastArr3.push(lastArr2[l]);
} else {
lastArr4.push(lastArr2[l]);
}
})
}
} else {
if(!self.fitData) {
hashArr.push(_arrDate[item].monthStr);
valLeg.push(val);
if(_arrDate[0].monthStr < _arrDate[item].monthStr) {
lastArr.push(val);
} else {
lastArr5.push(val);
}
}
}
});
oldMonth = [...lastArr];
hashArr = self.removeArrValue(hashArr);
if(!self.monthDataFit) {
lastArr3 = lastArr4;
}
if(valLeg.length === 1) {
lastArr = valLeg;
}
if(!self.fitData && valLeg.length > 1) {
lastArr = lastArr5;
}
if(lastArr3.length > 1) {
lastArr3.shift();
}
$('.historicalNetValue').html('').append($(Tool.renderTpl(HistoricalNetTpl, self.fitData ? lastArr3 : lastArr)));
myApp.picker({
input: '#calendarDateYear',
cols: [
{
textAlign: 'center',
values: [...formatArr],
displayValue: [...formatArr],
}
],
toolbarCloseText: '完成',
closeByOutsideClick: false,
onClose: function(p) {
let newYearArr = [];
let newMonthArr = [];
$('.dateYearValue').text(p.value[0]);
lastArr.splice(0, lastArr.length);
oldMonth.splice(0, oldMonth.length);
_arrDate.filter((val) => {
if(val.year === parseInt(p.value[0])) {
lastArr.push(val);
}
});
let maxi = 0;
for (let k = 0; k < lastArr.length; k++) {
newMonthArr.push(lastArr[k].monthStr);
if (lastArr[k].monthStr > lastArr[maxi].monthStr) {
newYearArr.push(lastArr[k]);
} else {
oldMonth.push(lastArr[k])
}
}
if(newYearArr.length < 1) {
newYearArr = lastArr;
}
myPickerMonth.params.cols[0].values = self.removeArrValue(newMonthArr);
myPickerMonth.params.cols[0].value = self.removeArrValue(newMonthArr);
myPickerMonth.params.cols[0].displayValue = self.removeArrValue(newMonthArr);
$('.dateMonthValue').text(newYearArr[0].monthStr);
$('.historicalNetValue').html('').append($(Tool.renderTpl(HistoricalNetTpl, newYearArr)));
},
});
$('.dateMonthValue').text(_arrDate[_arrDate.length - 1].month);
let myPickerMonth = myApp.picker({
input: '#calendarDateMonth',
cols: [
{
textAlign: 'center',
values: self.fitData ? self.removeArrValue(hashArr2) : hashArr,
}
],
toolbarCloseText: '完成',
closeByOutsideClick: false,
onClose: function (p) {
let _val = $('.dateYearValue').text();
let list = [];
_arrDate.filter((val) => {
if(val.monthStr === parseInt(p.params.cols[0].value) && val.year === parseInt(_val)) {
list.push(val);
}
});
if(p.params.cols[0].value.length > 1) {
// console.log(p.params.cols[0].value);
$('.dateMonthValue').html(p.params.cols[0].value);
} else {
$('.dateMonthValue').html(p.params.cols[0].value);
}
$('.historicalNetValue').html('').append($(Tool.renderTpl(HistoricalNetTpl, list)));
},
});
}
/*
获取产品要素
*/
productElements() {
fundDetailStore.postChanpinYaoSu({
data: {
action: 'ChanpinYaoSu',
cid: sessionStorage.getItem('cid'),
chanpinCode: Tool.parseURL('code'),
}
}, (res) => {
if(res.chanPinYaoSuList.length === 0) {
$('.stockLeg0').show();
}
let echoFundProductElemTpl = Tool.renderTpl(fundProductElemTpl, res);
$('.productElement').html('').append($(echoFundProductElemTpl));
})
}
};
|
var searchData=
[
['packetdir',['packetDir',['../class_aft_packet.html#abb4a2fdfaf0d2ecfb1b60c480dd22a04',1,'AftPacket']]],
['packetmode',['packetMode',['../class_aft_policer.html#af28e130276d9591f52b41f40670ee2e0',1,'AftPolicer']]],
['params',['params',['../class_aft_parameters.html#ade2f30759311b7fd0ad46343eb2aaa7e',1,'AftParameters']]],
['parentnode',['parentNode',['../class_aft_entry.html#af3bdcb6bc41cf14cf0482395bbc02728',1,'AftEntry']]],
['portindex',['portIndex',['../class_aft_port.html#afe5a0e82c102fe777cef649a7bf48599',1,'AftPort::portIndex()'],['../class_aft_packet.html#a6e1e90bd81be847a199bfd4304258992',1,'AftPacket::portIndex()'],['../class_aft_port_entry.html#a2296b4fd70ce9d9f6ed2626745e61bf7',1,'AftPortEntry::portIndex()']]],
['portname',['portName',['../class_aft_port_entry.html#aa13e4e11f222e7bf890d5daba36dd31d',1,'AftPortEntry']]],
['portnext',['portNext',['../class_aft_port.html#a23ffdd543ceeeb7c3d73d9e448a80a57',1,'AftPort::portNext()'],['../class_aft_port_entry.html#a4666235b280dc13f1b803222b0b4dead',1,'AftPortEntry::portNext()']]],
['porttype',['portType',['../class_aft_port.html#ad58463b9bd06d9324a6dbc707dd653fe',1,'AftPort::portType()'],['../class_aft_port_entry.html#aa3ee3ee5c5a8257af2ead5b84584cef8',1,'AftPortEntry::portType()']]],
['push',['push',['../class_aft_insert.html#a7a3dca691958743b79417e7a4956390c',1,'AftInsert::push(const AftNodePtr &node, AftNodeToken nodeToken, const std::string &name)'],['../class_aft_insert.html#a73dcce8750e22baeafc30cdb06f6ebaf',1,'AftInsert::push(const AftNodePtr &node)'],['../class_aft_insert.html#ace4c9cf8adb2d825d1270f285237a877',1,'AftInsert::push(const AftNodePtr &node, const std::string &name)'],['../class_aft_insert.html#a80c21f29c65d557cfab1a1a48199591a',1,'AftInsert::push(const AftNodePtr &node, AftNodeToken nodeToken)'],['../class_aft_insert.html#a5590cd669f429bfc18d850571d1f6a46',1,'AftInsert::push(const AftEntryPtr &entry)'],['../class_aft_remove.html#a05fcd6e15de05320c09807aadc107981',1,'AftRemove::push(const AftNodeToken nodeToken)'],['../class_aft_remove.html#a542af528693e8dc46f0fe1e2a5581416',1,'AftRemove::push(const AftNodePtr &node)'],['../class_aft_remove.html#addde06f97e650e1c816d0f000dab2d55',1,'AftRemove::push(const AftEntryPtr &entry)']]]
];
|
const assert = require('assert');
module.exports = function onSvclibRequest(baseConnection, svclibRequest) {
assert(this.isHub());
this.svclib_.accept('svclib_request', baseConnection, svclibRequest);
};
|
/*
* /MathJax/localization/de/HTML-CSS.js
*
* Copyright (c) 2009-2016 The MathJax Consortium
*
* 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.
*/
MathJax.Localization.addTranslation("de","HTML-CSS",{version:"2.7.0-beta",isLoaded:true,strings:{LoadWebFont:"Lade Webfont %1",CantLoadWebFont:"Webschriftart %1 konnte nicht geladen werden",FirefoxCantLoadWebFont:"Firefox kann keine Webschriften von einem entfernten Rechner laden",CantFindFontUsing:"Es konnte keine g\u00FCltige Schriftart in %1 gefunden werden",WebFontsNotAvailable:"Webschriften sind nicht verf\u00FCgbar. Verwende stattdessen Bildschriften."}});MathJax.Ajax.loadComplete("[MathJax]/localization/de/HTML-CSS.js");
|
var DeferredMixin = Ember.DeferredMixin, // ember-runtime/mixins/deferred
Evented = Ember.Evented, // ember-runtime/mixins/evented
run = Ember.run, // ember-metal/run-loop
get = Ember.get; // ember-metal/accessors
var LoadPromise = Ember.Mixin.create(Evented, DeferredMixin, {
init: function() {
this._super.apply(this, arguments);
this.one('didLoad', function() {
run(this, 'resolve', this);
});
if (get(this, 'isLoaded')) {
this.trigger('didLoad');
}
}
});
DS.LoadPromise = LoadPromise;
|
/**
* @fileoverview
* @author Sungho Kim(sungho-kim@nhnent.com) FE Development Team/NHN Ent.
*/
import MarkdownEditor from './markdownEditor';
import MarkdownPreview from './mdPreview';
import WysiwygEditor from './wysiwygEditor';
import Layout from './layout';
import EventManager from './eventManager';
import CommandManager from './commandManager';
import extManager from './extManager';
import ImportManager from './importManager';
import CodeBlockManager from './codeBlockManager';
import Convertor from './convertor';
import ViewOnly from './viewOnly';
import i18n from './i18n';
import DefaultUI from './ui/defaultUI';
// markdown commands
import mdBold from './markdownCommands/bold';
import mdItalic from './markdownCommands/italic';
import mdStrike from './markdownCommands/strike';
import mdBlockquote from './markdownCommands/blockquote';
import mdHeading from './markdownCommands/heading';
import mdParagraph from './markdownCommands/paragraph';
import mdHR from './markdownCommands/hr';
import mdAddLink from './markdownCommands/addLink';
import mdAddImage from './markdownCommands/addImage';
import mdUL from './markdownCommands/ul';
import mdOL from './markdownCommands/ol';
import mdTable from './markdownCommands/table';
import mdTask from './markdownCommands/task';
import mdCode from './markdownCommands/code';
import mdCodeBlock from './markdownCommands/codeBlock';
// wysiwyg Commands
import wwBold from './wysiwygCommands/bold';
import wwItalic from './wysiwygCommands/italic';
import wwStrike from './wysiwygCommands/strike';
import wwBlockquote from './wysiwygCommands/blockquote';
import wwAddImage from './wysiwygCommands/addImage';
import wwAddLink from './wysiwygCommands/addLink';
import wwHR from './wysiwygCommands/hr';
import wwHeading from './wysiwygCommands/heading';
import wwParagraph from './wysiwygCommands/paragraph';
import wwUL from './wysiwygCommands/ul';
import wwOL from './wysiwygCommands/ol';
import wwTable from './wysiwygCommands/table';
import wwTableAddRow from './wysiwygCommands/tableAddRow';
import wwTableAddCol from './wysiwygCommands/tableAddCol';
import wwTableRemoveRow from './wysiwygCommands/tableRemoveRow';
import wwTableRemoveCol from './wysiwygCommands/tableRemoveCol';
import wwTableAlignCol from './wysiwygCommands/tableAlignCol';
import wwTableRemove from './wysiwygCommands/tableRemove';
import wwIncreaseDepth from './wysiwygCommands/increaseDepth';
import wwDecreaseDepth from './wysiwygCommands/decreaseDepth';
import wwTask from './wysiwygCommands/task';
import wwCode from './wysiwygCommands/code';
import wwCodeBlock from './wysiwygCommands/codeBlock';
const {util} = tui;
const __nedInstance = [];
/**
* @callback addImageBlobHook
* @param {File|Blob} fileOrBlob - image blob
* @param {callback} callback - callback function to be called after
* @param {string} source - source of an event the item belongs to. 'paste', 'drop', 'ui'
*/
/**
* Class ToastUIEditor
*/
class ToastUIEditor {
/**
* ToastUI Editor
* @param {object} options Option object
* @param {string} [options.height='300px'] - Editor's height style value. Height is applied as border-box ex) '300px', '100%', 'auto'
* @param {string} [options.minHeight='200px'] - Editor's min-height style value in pixel ex) '300px'
* @param {string} options.initialValue - Editor's initial value
* @param {string} options.previewStyle - Markdown editor's preview style (tab, vertical)
* @param {string} options.initialEditType - Initial editor type (markdown, wysiwyg)
* @param {object} options.events - eventlist Event list
* @param {function} options.events.load - It would be emitted when editor fully load
* @param {function} options.events.change - It would be emitted when content changed
* @param {function} options.events.stateChange - It would be emitted when format change by cursor position
* @param {function} options.events.focus - It would be emitted when editor get focus
* @param {function} options.events.blur - It would be emitted when editor loose focus
* @param {object} options.hooks - Hook list
* @param {function} options.hooks.previewBeforeHook - Submit preview to hook URL before preview be shown
* @param {addImageBlobHook} options.hooks.addImageBlobHook - hook for image upload.
* @param {string} language - language
* @param {boolean} [options.useCommandShortcut=true] - whether use keyboard shortcuts to perform commands
* @param {boolean} useDefaultHTMLSanitizer - use default htmlSanitizer
* @param {string[]} options.codeBlockLanguages - supported code block languages to be listed
*/
constructor(options) {
this.options = $.extend({
previewStyle: 'tab',
initialEditType: 'markdown',
height: '300px',
minHeight: '200px',
language: 'en_US',
useDefaultHTMLSanitizer: true,
useCommandShortcut: true,
codeBlockLanguages: CodeBlockManager.getHighlightJSLanguages()
}, options);
this.eventManager = new EventManager();
this.importManager = new ImportManager(this.eventManager);
this.commandManager = new CommandManager(this, {
useCommandShortcut: this.options.useCommandShortcut
});
this.convertor = new Convertor(this.eventManager);
if (this.options.useDefaultHTMLSanitizer) {
this.convertor.initHtmlSanitizer();
}
if (this.options.hooks) {
util.forEach(this.options.hooks, (fn, key) => this.addHook(key, fn));
}
if (this.options.events) {
util.forEach(this.options.events, (fn, key) => this.on(key, fn));
}
this.layout = new Layout(options, this.eventManager);
this.i18n = i18n;
this.i18n.setCode(this.options.language);
this.setUI(this.options.UI || new DefaultUI(this));
this.mdEditor = MarkdownEditor.factory(this.layout.getMdEditorContainerEl(), this.eventManager);
this.preview = new MarkdownPreview(this.layout.getPreviewEl(), this.eventManager, this.convertor);
this.wwEditor = WysiwygEditor.factory(this.layout.getWwEditorContainerEl(), this.eventManager, {
useCommandShortcut: this.options.useCommandShortcut
});
this.toMarkOptions = null;
this.changePreviewStyle(this.options.previewStyle);
this.changeMode(this.options.initialEditType, true);
this.setValue(this.options.initialValue, false);
this.minHeight(this.options.minHeight);
this.height(this.options.height);
extManager.applyExtension(this, this.options.exts);
this.eventManager.emit('load', this);
__nedInstance.push(this);
}
/**
* 프리뷰가 보여지는 방식을 변경한다
* @memberof ToastUIEditor
* @param {string} style 스타일 이름 tab, vertical
*/
changePreviewStyle(style) {
this.layout.changePreviewStyle(style);
this.mdPreviewStyle = style;
this.eventManager.emit('changePreviewStyle', style);
this.eventManager.emit('previewNeedsRefresh');
}
/**
* call commandManager's exec method
* @memberof ToastUIEditor
*/
exec(...args) {
this.commandManager.exec(...args);
}
addCommand(type, props) {
if (!props) {
this.commandManager.addCommand(type);
} else {
this.commandManager.addCommand(CommandManager.command(type, props));
}
}
/**
* After added command.
*/
afterAddedCommand() {
this.eventManager.emit('afterAddedCommand', this);
}
/**
* Bind eventHandler to event type
* @memberof ToastUIEditor
* @param {string} type Event type
* @param {function} handler Event handler
*/
on(type, handler) {
this.eventManager.listen(type, handler);
}
/**
* Unbind eventHandler from event type
* @memberof ToastUIEditor
* @param {string} type Event type
*/
off(type) {
this.eventManager.removeEventHandler(type);
}
/**
* Add hook to TUIEditor event
* @memberof ToastUIEditor
* @param {string} type Event type
* @param {function} handler Event handler
*/
addHook(type, handler) {
this.eventManager.removeEventHandler(type);
this.eventManager.listen(type, handler);
}
/**
* Remove hook from TUIEditor event
* @memberof ToastUIEditor
* @param {string} type Event type
*/
removeHook(type) {
this.eventManager.removeEventHandler(type);
}
/**
* Get CodeMirror instance
* @memberof ToastUIEditor
* @returns {CodeMirror}
*/
getCodeMirror() {
return this.mdEditor.getEditor();
}
/**
* Get SquireExt instance
* @memberof ToastUIEditor
* @returns {SquireExt}
*/
getSquire() {
return this.wwEditor.getEditor();
}
/**
* Set focus to current Editor
* @memberof ToastUIEditor
*/
focus() {
this.getCurrentModeEditor().focus();
}
/**
* Remove focus of current Editor
* @memberof ToastUIEditor
*/
blur() {
this.getCurrentModeEditor().blur();
}
/**
* Set cursor position to end
* @memberof ToastUIEditor
*/
moveCursorToEnd() {
this.getCurrentModeEditor().moveCursorToEnd();
}
/**
* Set cursor position to start
* @memberof ToastUIEditor
*/
moveCursorToStart() {
this.getCurrentModeEditor().moveCursorToStart();
}
/**
* Set markdown syntax text.
* @memberof ToastUIEditor
* @param {string} markdown - markdown syntax text.
* @param {boolean} [cursorToEnd=true] - move cursor to contents end
*/
setMarkdown(markdown, cursorToEnd = true) {
markdown = markdown || '';
if (this.isMarkdownMode()) {
this.mdEditor.setValue(markdown, cursorToEnd);
} else {
this.wwEditor.setValue(this.convertor.toHTML(markdown), cursorToEnd);
}
this.eventManager.emit('setMarkdownAfter', markdown);
}
/**
* Set html value.
* @memberof ToastUIEditor
* @param {string} html - html syntax text
* @param {boolean} [cursorToEnd=true] - move cursor to contents end
*/
setHtml(html, cursorToEnd = true) {
html = html || '';
this.wwEditor.setValue(html);
if (this.isMarkdownMode()) {
const markdown = this.convertor.toMarkdown(this.wwEditor.getValue(), this.toMarkOptions);
this.mdEditor.setValue(markdown, cursorToEnd);
this.eventManager.emit('setMarkdownAfter', markdown);
}
}
/**
* Set markdown syntax text.
* @memberof ToastUIEditor
* @param {string} value - markdown syntax text
* @param {boolean} [cursorToEnd=true] - move cursor to contents end
* @deprecated
*/
setValue(value, cursorToEnd = true) {
this.setMarkdown(value, cursorToEnd);
}
/**
* Get markdown syntax text.
* @memberof ToastUIEditor
* @returns {string}
*/
getMarkdown() {
let markdown;
if (this.isMarkdownMode()) {
markdown = this.mdEditor.getValue();
} else {
markdown = this.convertor.toMarkdown(this.wwEditor.getValue(), this.toMarkOptions);
}
return markdown;
}
/**
* Get html syntax text.
* @memberof ToastUIEditor
* @returns {string}
*/
getHtml() {
if (this.isWysiwygMode()) {
this.mdEditor.setValue(this.convertor.toMarkdown(this.wwEditor.getValue(), this.toMarkOptions));
}
return this.convertor.toHTML(this.mdEditor.getValue());
}
/**
* Get editor value.
* @memberof ToastUIEditor
* @returns {string}
* @deprecated
*/
getValue() {
return this.getMarkdown();
}
/**
* insert text
* @param {string} text - text string to insert
* @memberof ToastUIEditor
*/
insertText(text) {
if (this.isMarkdownMode()) {
this.mdEditor.replaceSelection(text);
} else {
this.wwEditor.insertText(text);
}
}
/**
* Add widget to selection
* @memberof ToastUIEditor
* @param {Range} selection Current selection
* @param {Node} node widget node
* @param {string} style Adding style "over" or "bottom"
* @param {number} [offset] Offset for adjust position
*/
addWidget(selection, node, style, offset) {
this.getCurrentModeEditor().addWidget(selection, node, style, offset);
}
/**
* Set and return edithr height
* @memberof ToastUIEditor
* @param {string} height - editor height
* @returns {string} editor height
*/
height(height) {
if (util.isExisty(height)) {
if (height === 'auto') {
this.options.el.classList.add('auto-height');
this.minHeight(this.minHeight());
} else {
this.options.el.classList.remove('auto-height');
this.minHeight(height);
}
if (util.isNumber(height)) {
height = `${height}px`;
}
this.options.el.style.height = height;
this._height = height;
}
return this._height;
}
/**
* Set / Get min content height
* @param {string} minHeight - min content height in pixel
* @memberof ToastUIEditor
* @returns {string} - min height in pixel
*/
minHeight(minHeight) {
if (util.isExisty(minHeight)) {
const editorHeight = this._ui.getEditorHeight();
const editorSectionHeight = this._ui.getEditorSectionHeight();
const diffHeight = editorHeight - editorSectionHeight;
this._minHeight = minHeight;
minHeight = parseInt(minHeight, 10);
minHeight = Math.max(minHeight - diffHeight, 0);
this.wwEditor.setMinHeight(minHeight);
this.mdEditor.setMinHeight(minHeight);
this.preview.setMinHeight(minHeight);
}
return this._minHeight;
}
/**
* Get current editor mode name
* @memberof ToastUIEditor
* @returns {string}
*/
getCurrentModeEditor() {
let editor;
if (this.isMarkdownMode()) {
editor = this.mdEditor;
} else {
editor = this.wwEditor;
}
return editor;
}
/**
* Return true if current editor mode is Markdown
* @memberof ToastUIEditor
* @returns {boolean}
*/
isMarkdownMode() {
return this.currentMode === 'markdown';
}
/**
* Return true if current editor mode is WYSIWYG
* @memberof ToastUIEditor
* @returns {boolean}
*/
isWysiwygMode() {
return this.currentMode === 'wysiwyg';
}
/**
* Return false
* @memberof ToastUIEditor
* @returns {boolean}
*/
isViewOnly() {
return false;
}
/**
* Get current Markdown editor's preview style
* @memberof ToastUIEditor
* @returns {string}
*/
getCurrentPreviewStyle() {
return this.mdPreviewStyle;
}
/**
* Change editor's mode to given mode string
* @memberof ToastUIEditor
* @param {string} mode - Editor mode name of want to change
* @param {boolean} isWithoutFocus - Change mode without focus
*/
changeMode(mode, isWithoutFocus) {
if (this.currentMode === mode) {
return;
}
this.eventManager.emit('changeModeBefore', this.currentMode);
this.currentMode = mode;
if (this.isWysiwygMode()) {
this.layout.switchToWYSIWYG();
this.wwEditor.setValue(this.convertor.toHTML(this.mdEditor.getValue()), !isWithoutFocus);
this.eventManager.emit('changeModeToWysiwyg');
} else {
this.layout.switchToMarkdown();
this.mdEditor.setValue(
this.convertor.toMarkdown(this.wwEditor.getValue(), this.toMarkOptions), !isWithoutFocus
);
this.getCodeMirror().refresh();
this.eventManager.emit('changeModeToMarkdown');
}
this.eventManager.emit('changeMode', mode);
if (!isWithoutFocus) {
this.focus();
}
}
/**
* Remove TUIEditor from document
* @memberof ToastUIEditor
*/
remove() {
const self = this;
let i = __nedInstance.length - 1;
this.wwEditor.remove();
this.mdEditor.remove();
this.layout.remove();
if (this.getUI()) {
this.getUI().remove();
}
this.eventManager.emit('removeEditor');
this.eventManager.events.forEach((value, key) => {
self.off(key);
});
this.eventManager = null;
for (; i >= 0; i -= 1) {
if (__nedInstance[i] === this) {
__nedInstance.splice(i, 1);
}
}
}
/**
* Hide TUIEditor
* @memberof ToastUIEditor
*/
hide() {
this.eventManager.emit('hide', this);
}
/**
* Show TUIEditor
* @memberof ToastUIEditor
*/
show() {
this.eventManager.emit('show', this);
this.getCodeMirror().refresh();
}
/**
* Scroll Editor content to Top
* @memberof ToastUIEditor
* @param {number} value Scroll amount
* @returns {number}
*/
scrollTop(value) {
return this.getCurrentModeEditor().scrollTop(value);
}
/**
* Set UI to private UI property
* @memberof ToastUIEditor
* @param {UI} UI UI instance
*/
setUI(UI) {
this._ui = UI;
}
/**
* Get _ui property
* @memberof ToastUIEditor
* @returns {UI}
*/
getUI() {
return this._ui;
}
/**
* Reset TUIEditor
* @memberof ToastUIEditor
*/
reset() {
this.wwEditor.reset();
this.mdEditor.reset();
}
/**
* Get current range
* @memberof ToastUIEditor
* @returns {{start, end}|Range}
*/
getRange() {
return this.getCurrentModeEditor().getRange();
}
/**
* Get text object of current range
* @memberof ToastUIEditor
* @param {{start, end}|Range} range Range object of each editor
* @returns {object} TextObject class
*/
getTextObject(range) {
return this.getCurrentModeEditor().getTextObject(range);
}
/**
* get selected text
* @returns {string} - selected text
* @memberof ToastUIEditor
*/
getSelectedText() {
const range = this.getRange();
const textObject = this.getTextObject(range);
return textObject.getTextContent() || '';
}
/**
* get markdownit with code highlight instance from convertor
* @returns {markdownit} - markdownit instance
* @memberof ToastUIEditor
*/
getMarkdownHighlightRenderer() {
return this.convertor.getMarkdownHighlightRenderer();
}
/**
* set markdownit instance
* @param {markdownit} markdownitHighlight - markdownit instance
* @memberof ToastUIEditor
*/
setMarkdownHighlightRenderer(markdownitHighlight) {
this.convertor.setMarkdownHighlightRenderer(markdownitHighlight);
}
/**
* Get instance of TUIEditor
* @memberof ToastUIEditor
* @returns {Array}
*/
static getInstances() {
return __nedInstance;
}
/**
* Define extension
* @memberof ToastUIEditor
* @param {string} name Extension name
* @param {ExtManager~extension} ext extension
*/
static defineExtension(name, ext) {
extManager.defineExtension(name, ext);
}
/**
* Factory method for Editor
* @memberof ToastUIEditor
* @param {object} options Option for initialize TUIEditor
* @returns {ToastUIEditor}
*/
static factory(options) {
let tuiEditor;
if (options.viewOnly) {
tuiEditor = new ViewOnly(options);
} else {
tuiEditor = new ToastUIEditor(options);
tuiEditor.addCommand(mdBold);
tuiEditor.addCommand(mdItalic);
tuiEditor.addCommand(mdBlockquote);
tuiEditor.addCommand(mdHeading);
tuiEditor.addCommand(mdParagraph);
tuiEditor.addCommand(mdHR);
tuiEditor.addCommand(mdAddLink);
tuiEditor.addCommand(mdAddImage);
tuiEditor.addCommand(mdUL);
tuiEditor.addCommand(mdOL);
tuiEditor.addCommand(mdTable);
tuiEditor.addCommand(mdTask);
tuiEditor.addCommand(mdCode);
tuiEditor.addCommand(mdCodeBlock);
tuiEditor.addCommand(mdStrike);
tuiEditor.addCommand(wwBold);
tuiEditor.addCommand(wwItalic);
tuiEditor.addCommand(wwBlockquote);
tuiEditor.addCommand(wwUL);
tuiEditor.addCommand(wwOL);
tuiEditor.addCommand(wwAddImage);
tuiEditor.addCommand(wwAddLink);
tuiEditor.addCommand(wwHR);
tuiEditor.addCommand(wwHeading);
tuiEditor.addCommand(wwParagraph);
tuiEditor.addCommand(wwIncreaseDepth);
tuiEditor.addCommand(wwDecreaseDepth);
tuiEditor.addCommand(wwTask);
tuiEditor.addCommand(wwTable);
tuiEditor.addCommand(wwTableAddRow);
tuiEditor.addCommand(wwTableAddCol);
tuiEditor.addCommand(wwTableRemoveRow);
tuiEditor.addCommand(wwTableRemoveCol);
tuiEditor.addCommand(wwTableAlignCol);
tuiEditor.addCommand(wwTableRemove);
tuiEditor.addCommand(wwCode);
tuiEditor.addCommand(wwCodeBlock);
tuiEditor.addCommand(wwStrike);
}
return tuiEditor;
}
}
/**
* Export i18n instance
* @type {I18n}
*/
ToastUIEditor.i18n = i18n;
module.exports = ToastUIEditor;
|
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
import { _ as _objectWithoutProperties, I as Icon, a as _extends } from '../../Icon-7c760541.js';
import React from 'react';
import '@carbon/icon-helpers';
import 'prop-types';
var _circle, _path, _path2;
var WatsonHealthLaunchStudy_216 = /*#__PURE__*/React.forwardRef(function WatsonHealthLaunchStudy_216(_ref, ref) {
var children = _ref.children,
rest = _objectWithoutProperties(_ref, ["children"]);
return /*#__PURE__*/React.createElement(Icon, _extends({
width: 16,
height: 16,
viewBox: "0 0 32 32",
xmlns: "http://www.w3.org/2000/svg",
fill: "currentColor",
ref: ref
}, rest), _circle || (_circle = /*#__PURE__*/React.createElement("circle", {
cx: "23",
cy: "7",
r: "1"
})), _path || (_path = /*#__PURE__*/React.createElement("path", {
d: "M26 4v6H6V4H26m0-2H6A2 2 0 004 4v6a2 2 0 002 2H26a2 2 0 002-2V4a2 2 0 00-2-2zM20.59 21.41L17 17.83 17 30 15 30 15 17.83 11.41 21.41 10 20 16 14 22 20 20.59 21.41z"
})), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
d: "M8 6H20V8H8z"
})), children);
});
export default WatsonHealthLaunchStudy_216;
|
import React from 'react';
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux';
import Routers from './router';
import 'lib-flexible';
import "assets/styles/index.scss";
import store from './store';
import "@babel/polyfill";
const render = Component =>
ReactDOM.render(
<Provider store={ store }>
<Component />
</Provider>,
document.getElementById('root')
)
render(Routers)
if(module.hot) {
module.hot.accept();
}
|
const path = require('path');
const express = require('express');
const app = express();
const http = require('http').createServer(app);
const io = require('socket.io')(http);
var sanitize = require('mongo-sanitize');
const connect = require('../database/connection.js');
const { Login, GetAllMessages, SaveMessage, logErrorToConsole } = require('../database/index.js');
// const { User } = require('../database/User.js');
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use('/', express.static(path.join(__dirname, '..', 'client', 'dist')));
// app.get('/', express.static('/'));
app.delete('/message/id/:id', (req, res) => {
let _id = req.body._id;
connect.then((db) => {
Message.deleteOne({ _id })
.then(result => {
console.log(result);
res.status(204).send(result);
})
.catch((err) => {
console.error(err);
res.status(503).send('There was an error deleting this.');
});
});
});
io.on('connection', (socket) => {
socket.on('Login', async ({ name }) => {
await connect
.then( async (db) => {
name = sanitize(name);
var user = await Login(name, socket.emit);
socket.emit('logged in', user.id);
socket.broadcast.emit('message', `${user.name} has joined`);
socket.emit('message', `Welcome to Social Journal, ${user.name}`);
console.log(`${user.name} has connected`);
var messages = await GetAllMessages();
socket.emit('Channel Messages', messages);
})
.catch(logErrorToConsole);
});
socket.on('chat message', async ({user, message}) => {
connect.then((db) => {
_id = sanitize(user.userId);
message = sanitize(message);
SaveMessage(_id, message, user)
.then(({ user, _doc }) => {
_doc.user = user;
socket.emit('new message', _doc);
socket.broadcast.emit('new message', _doc);
})
.catch(logErrorToConsole);
});
});
socket.on('disconnect', () => {
console.log('A user disconnected');
io.emit('message', 'A user has disconnected');
});
});
http.listen(3000, () => {
console.log('listening on *:3000');
});
const userSockets = {};
|
import Vue from 'vue'
import store from '@/store'
/**
* Action 权限指令
* 指令用法:
* - 在需要控制 action 级别权限的组件上使用 v-action:[method] , 如下:
* <i-button v-action:add >添加用户</a-button>
* <a-button v-action:delete>删除用户</a-button>
* <a v-action:edit @click="edit(record)">修改</a>
*
* - 当前用户没有权限时,组件上使用了该指令则会被隐藏
* - 当后台权限跟 pro 提供的模式不同时,只需要针对这里的权限过滤进行修改即可
*
* @see https://github.com/sendya/ant-design-pro-vue/pull/53
*/
const action = Vue.directive('action', {
inserted(el, binding, vnode) {
const actionName = binding.arg
const { roles } = store.getters
const elVal = vnode.context.$route.meta.permission
const permissionId = elVal instanceof String && [elVal] || elVal
roles.permissions.forEach((p) => {
if (!permissionId.includes(p.permissionId)) {
return
}
if (p.actionList && !p.actionList.includes(actionName)) {
el.parentNode && el.parentNode.removeChild(el) || (el.style.display = 'none')
}
})
},
})
export default action
|
/*!
* OpenUI5
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
// Provides class sap.ui.core.support.plugins.ControlTree (ControlTree support plugin)
sap.ui.define([
'sap/ui/core/support/Plugin',
'sap/ui/core/util/serializer/ViewSerializer',
'sap/ui/core/util/File',
'sap/ui/thirdparty/jszip',
'sap/ui/base/DataType',
'sap/ui/core/Element',
'sap/ui/core/ElementMetadata',
'sap/ui/core/UIArea',
'sap/ui/core/mvc/View',
'sap/ui/core/mvc/XMLView',
'sap/ui/model/Binding',
'sap/ui/model/CompositeBinding',
'sap/base/util/ObjectPath',
"sap/ui/thirdparty/jquery",
"sap/ui/events/KeyCodes",
"sap/base/security/encodeXML",
'sap/ui/core/mvc/Controller' // provides sap.ui.controller
], function(
Plugin,
ViewSerializer,
File,
JSZip,
DataType,
Element,
ElementMetadata,
UIArea,
View,
XMLView,
Binding,
CompositeBinding,
ObjectPath,
jQueryDOM,
KeyCodes,
encodeXML
) {
"use strict";
/*global alert */
var $ = jQuery;
/**
* Creates an instance of sap.ui.core.support.plugins.ControlTree.
* @class This class represents the ControlTree plugin for the support tool functionality of UI5. This class is internal and all its functions must not be used by an application.
*
* @extends sap.ui.core.support.Plugin
* @version 1.96.0
* @private
* @alias sap.ui.core.support.plugins.ControlTree
*/
var ControlTree = Plugin.extend("sap.ui.core.support.plugins.ControlTree", {
constructor : function(oSupportStub) {
Plugin.apply(this, [ "sapUiSupportControlTree", "Control Tree", oSupportStub]);
this._oStub = oSupportStub;
if (this.runsAsToolPlugin()) {
// TOOLS SIDE!
this._aEventIds = [
"sapUiSupportSelectorSelect",
this.getId() + "ReceiveControlTree",
this.getId() + "ReceiveControlTreeExport",
this.getId() + "ReceiveControlTreeExportError",
this.getId() + "TriggerRequestProperties",
this.getId() + "ReceiveProperties",
this.getId() + "ReceiveBindingInfos",
this.getId() + "ReceiveMethods",
this.getId() + "ReceivePropertiesMethods"
];
this._breakpointId = "sapUiSupportBreakpoint";
this._tab = {
properties: "Properties",
bindinginfos: "BindingInfos",
breakpoints: "Breakpoints",
exports: "Export"
};
this._currentTab = this._tab.properties;
} else {
// APPS SIDE!
this._aEventIds = [
this.getId() + "RequestControlTree",
this.getId() + "RequestControlTreeSerialize",
this.getId() + "RequestProperties",
this.getId() + "RequestBindingInfos",
this.getId() + "ChangeProperty",
this.getId() + "RefreshBinding"
];
// register as core plugin
var that = this;
sap.ui.getCore().registerPlugin({
startPlugin: function(oCore) {
that.oCore = oCore;
},
stopPlugin: function() {
that.oCore = undefined;
}
});
}
}
});
ControlTree.prototype.init = function(oSupportStub){
Plugin.prototype.init.apply(this, arguments);
if (this.runsAsToolPlugin()) {
initInTools.call(this, oSupportStub);
} else {
initInApps.call(this, oSupportStub);
}
};
function initInTools(oSupportStub) {
$(document)
.on("click", "li img.sapUiControlTreeIcon", $.proxy(this._onIconClick, this))
.on("click", "li.sapUiControlTreeElement div", $.proxy(this._onNodeClick, this))
.on("click", "li.sapUiControlTreeLink div", $.proxy(this._onControlTreeLinkClick, this))
.on("click", "#sapUiSupportControlTabProperties", $.proxy(this._onPropertiesTab, this))
.on("click", "#sapUiSupportControlTabBindingInfos", $.proxy(this._onBindingInfosTab, this))
.on("click", "#sapUiSupportControlTabBreakpoints", $.proxy(this._onMethodsTab, this))
.on("click", "#sapUiSupportControlTabExport", $.proxy(this._onExportTab, this))
.on("change", "[data-sap-ui-name]", $.proxy(this._onPropertyChange, this))
.on("change", "[data-sap-ui-method]", $.proxy(this._onPropertyBreakpointChange, this))
.on("keyup", '.sapUiSupportControlMethods input[type="text"]', $.proxy(this._autoComplete, this))
.on("blur", '.sapUiSupportControlMethods input[type="text"]', $.proxy(this._updateSelectOptions, this))
.on("change", '.sapUiSupportControlMethods select', $.proxy(this._selectOptionsChanged, this))
.on("click", '#sapUiSupportControlAddBreakPoint', $.proxy(this._onAddBreakpointClicked, this))
.on("click", '#sapUiSupportControlExportToXml', $.proxy(this._onExportToXmlClicked, this))
.on("click", '#sapUiSupportControlExportToHtml', $.proxy(this._onExportToHtmlClicked, this))
.on("click", '#sapUiSupportControlActiveBreakpoints img.remove-breakpoint', $.proxy(this._onRemoveBreakpointClicked, this))
.on("click", '#sapUiSupportControlPropertiesArea a.control-tree', $.proxy(this._onNavToControl, this))
.on("click", '#sapUiSupportControlPropertiesArea img.sapUiSupportRefreshBinding', $.proxy(this._onRefreshBinding, this));
this.renderContentAreas();
}
ControlTree.prototype.exit = function(oSupportStub) {
Plugin.prototype.exit.apply(this, arguments);
if (this.runsAsToolPlugin()) {
$(document)
.off('click', 'li img.sapUiControlTreeIcon')
.off('click', 'li div')
.off("click", "li.sapUiControlTreeLink")
.off("click", "#sapUiSupportControlTabProperties")
.off("click", "#sapUiSupportControlTabBindings")
.off("click", "#sapUiSupportControlTabBreakpoints")
.off("click", "#sapUiSupportControlTabExport")
.off('change', '[data-sap-ui-name]')
.off('change', '[data-sap-ui-method]')
.off('keyup', '.sapUiSupportControlMethods input[type="text"]')
.off('blur', '.sapUiSupportControlMethods select')
.off('change', '.sapUiSupportControlMethods select')
.off('click', '#sapUiSupportControlAddBreakPoint')
.off('click', '#sapUiSupportControlExportToXml')
.off('click', '#sapUiSupportControlExportToHtml')
.off('click', '#sapUiSupportControlActiveBreakpoints img.remove-breakpoint')
.off('click', '#sapUiSupportControlPropertiesArea a.control-tree')
.off('click', '#sapUiSupportControlPropertiesArea img.sapUiSupportRefreshBinding');
}
};
// -------------------------------
// Rendering
// -------------------------------
function basename(s) {
if ( s == null ) {
return "";
}
s = String(s);
return s.slice(1 + s.lastIndexOf('.'));
}
function encode(s) {
return s == null ? "" : encodeXML(String(s));
}
ControlTree.prototype.renderContentAreas = function() {
var rm = sap.ui.getCore().createRenderManager();
rm.write('<div class="sapUiSupportControlTreeTitle">You can find a control in this tree by clicking it in the application UI while pressing the Ctrl+Alt+Shift keys.</div>');
rm.write('<div id="sapUiSupportControlTreeArea"><ul class="sapUiSupportControlTreeList"></ul></div>');
rm.write('<div id="sapUiSupportControlTabs" class="sapUiSupportControlTabsHidden">');
rm.write('<button id="sapUiSupportControlTabProperties" class="sapUiSupportBtn sapUiSupportTab sapUiSupportTabLeft">Properties</button>');
rm.write('<button id="sapUiSupportControlTabBindingInfos" class="sapUiSupportBtn sapUiSupportTab">Binding Infos</button>');
rm.write('<button id="sapUiSupportControlTabBreakpoints" class="sapUiSupportBtn sapUiSupportTab">Breakpoints</button>');
rm.write('<button id="sapUiSupportControlTabExport" class="sapUiSupportBtn sapUiSupportTab sapUiSupportTabRight">Export</button>');
rm.write('</div>');
rm.write('<div id="sapUiSupportControlPropertiesArea"></div>');
rm.flush(this.$().get(0));
rm.destroy();
};
ControlTree.prototype.renderControlTree = function(aControlTree) {
var rm = sap.ui.getCore().createRenderManager();
function renderNode (iIndex, mElement) {
var bHasChildren = mElement.aggregation.length > 0 || mElement.association.length > 0;
rm.write("<li id=\"sap-debug-controltree-" + encode(mElement.id) + "\" class=\"sapUiControlTreeElement\">");
var sImage = bHasChildren ? "minus" : "space";
rm.write("<img class=\"sapUiControlTreeIcon\" src=\"../../debug/images/" + sImage + ".gif\">");
if (mElement.isAssociation) {
rm.write("<img title=\"Association\" class=\"sapUiControlTreeIcon\" src=\"../../debug/images/link.gif\">");
}
var sClass = basename(mElement.type);
rm.write('<div>');
rm.write('<span class="name" title="' + encode(mElement.type) + '">' + encode(sClass) + ' - ' + encode(mElement.id) + '</span>');
rm.write('<span class="sapUiSupportControlTreeBreakpointCount sapUiSupportItemHidden" title="Number of active breakpoints / methods"></span>');
rm.write('</div>');
if (mElement.aggregation.length > 0) {
rm.write("<ul>");
$.each(mElement.aggregation, renderNode);
rm.write("</ul>");
}
if (mElement.association.length > 0) {
rm.write("<ul>");
$.each(mElement.association, function(iIndex, oValue) {
if (oValue.isAssociationLink) {
var sType = basename(oValue.type);
rm.write("<li data-sap-ui-controlid=\"" + encode(oValue.id) + "\" class=\"sapUiControlTreeLink\">");
rm.write("<img class=\"sapUiControlTreeIcon\" align=\"middle\" src=\"../../debug/images/space.gif\">");
rm.write("<img class=\"sapUiControlTreeIcon\" align=\"middle\" src=\"../../debug/images/link.gif\">");
rm.write("<div><span title=\"Association '" + encode(oValue.name) + "' to '" + encode(oValue.id) + "' with type '" + encode(oValue.type) + "'\">" +
encode(sType) + " - " + encode(oValue.id) + " (" + encode(oValue.name) + ")</span></div>");
rm.write("</li>");
} else {
renderNode(0 /* not used */, oValue);
}
});
rm.write("</ul>");
}
rm.write("</li>");
}
$.each(aControlTree, renderNode);
rm.flush(this.$().find("#sapUiSupportControlTreeArea > ul.sapUiSupportControlTreeList").get(0));
rm.destroy();
};
ControlTree.prototype.renderPropertiesTab = function(aControlProps, sControlId) {
var rm = sap.ui.getCore().createRenderManager();
rm.write('<ul class="sapUiSupportControlTreeList" data-sap-ui-controlid="' + encode(sControlId) + '">');
$.each(aControlProps, function(iIndex, oValue) {
rm.write("<li>");
rm.write("<span><label class='sapUiSupportLabel'>BaseType:</label> <code>" + encode(oValue.control) + "</code></span>");
if (oValue.properties.length > 0 || oValue.aggregations.length > 0) {
rm.write('<div class="get" title="Activate debugger for get-method">G</div><div class="set" title="Activate debugger for set-method">S</div>');
rm.write("<div class=\"sapUiSupportControlProperties\"><table><colgroup><col width=\"50%\"><col width=\"50%\"></colgroup>");
$.each(oValue.properties, function(iIndex, oProperty) {
rm.write("<tr><td>");
rm.write("<label class='sapUiSupportLabel'>" + encode(oProperty.name) + ((oProperty.isBound) ?
'<img title="Value is bound (see Binding Infos)" src="../../debug/images/link.gif">' : "") + "</label>");
rm.write("</td><td>");
if (oProperty.type === "boolean") {
rm.write("<input type='checkbox' ");
rm.write("data-sap-ui-name='" + encode(oProperty.name) + "' ");
if (oProperty.value == true) {
rm.write("checked='checked'");
}
rm.write(">");
} else if (oProperty.enumValues) {
rm.write("<div><select ");
rm.write("data-sap-ui-name='" + encode(oProperty.name) + "'>");
$.each(oProperty.enumValues, function(sKey, sValue) {
rm.write("<option");
if (sKey === oProperty.value) {
rm.write(" selected");
}
rm.write(">");
rm.writeEscaped("" + sKey);
rm.write("</option>");
});
rm.write("</select></div>");
} else {
rm.write("<div><input type='text' ");
rm.write("data-sap-ui-name='" + encode(oProperty.name) + "' ");
if (oProperty.value) {
rm.write("value='");
rm.writeEscaped("" + oProperty.value);
rm.write("'");
}
rm.write("></div>");
}
rm.write("</td>");
rm.write('<td><input type="checkbox" data-sap-ui-method="' + encode(oProperty._sGetter) + '" title="Activate debugger for ' + encode(oProperty._sGetter) + '"');
if (oProperty.bp_sGetter) {
rm.write("checked='checked'");
}
rm.write('></td>');
rm.write('<td><input type="checkbox" data-sap-ui-method="' + encode(oProperty._sMutator) + '" title="Activate debugger for ' + encode(oProperty._sMutator) + '"');
if (oProperty.bp_sMutator) {
rm.write("checked='checked'");
}
rm.write('></td>');
rm.write("</tr>");
});
$.each(oValue.aggregations, function(iIndex, oAggregation) {
rm.write("<tr><td>");
rm.write("<label class='sapUiSupportLabel'>" + encode(oAggregation.name) + "</label>");
rm.write("</td><td>");
rm.write(encode(oAggregation.value));
rm.write("</td>");
rm.write('<td><input type="checkbox" data-sap-ui-method="' + encode(oAggregation._sGetter) + '" title="Activate debugger for ' + encode(oAggregation._sGetter) + '"');
if (oAggregation.bp_sGetter) {
rm.write("checked='checked'");
}
rm.write('></td>');
rm.write('<td><input type="checkbox" data-sap-ui-method="' + encode(oAggregation._sMutator) + '" title="Activate debugger for ' + encode(oAggregation._sMutator) + '"');
if (oAggregation.bp_sMutator) {
rm.write("checked='checked'");
}
rm.write('></td>');
rm.write("</tr>");
});
rm.write("</table></div>");
}
rm.write("</li>");
});
rm.write("</ul>");
rm.flush(this.$().find("#sapUiSupportControlPropertiesArea").get(0));
rm.destroy();
this.$().find("#sapUiSupportControlTabs").removeClass("sapUiSupportControlTabsHidden");
this.selectTab(this._tab.properties);
};
ControlTree.prototype.renderBindingsTab = function(mBindingInfos, sControlId) {
var rm = sap.ui.getCore().createRenderManager();
if (mBindingInfos.contexts.length > 0) {
rm.write('<h2>Contexts</h2>');
rm.write('<ul class="sapUiSupportControlTreeList" data-sap-ui-controlid="' + encode(sControlId) + '">');
$.each(mBindingInfos.contexts, function(iContextIndex, oContext) {
rm.write('<li>');
rm.write('<span><label class="sapUiSupportLabel">Model Name: ' + encode(oContext.modelName) + '</label></span>');
rm.write('<div class="sapUiSupportControlProperties">');
rm.write('<table><colgroup><col width="15%"><col width="35%"><col width="50%"></colgroup>');
rm.write('<tbody>');
// Path
rm.write('<tr><td colspan="2">');
rm.write('<label class="sapUiSupportLabel">Path</label>');
rm.write('</td><td>');
rm.write('<div><span');
if (oContext.invalidPath) {
rm.write(' class="sapUiSupportModelPathInvalid"');
} else if (oContext.unverifiedPath) {
rm.write(' class="sapUiSupportModelPathUnverified"');
}
rm.write('>' + encode(oContext.path));
if (oContext.invalidPath) {
rm.write(' (invalid)');
} else if (oContext.unverifiedPath) {
rm.write(' (unverified)');
}
rm.write('</span></div>');
rm.write('</td></tr>');
if (oContext.location) {
// Inherited from
rm.write('<tr><td colspan="2">');
rm.write('<label class="sapUiSupportLabel">Inherited from</label>');
rm.write('</td><td>');
rm.write('<div><a class="control-tree sapUiSupportLink" title="' + encode(oContext.location.name) + '" data-sap-ui-control-id="' + encode(oContext.location.id) + '" href="#">' +
encode(basename(oContext.location.name)) +
' (' + encode(oContext.location.id) + ')</a></div>');
rm.write('</td></tr>');
}
rm.write('</tbody></table></div></li>');
});
rm.write('</ul>');
}
if (mBindingInfos.bindings.length > 0) {
rm.write('<h2>Bindings</h2>');
rm.write('<ul class="sapUiSupportControlTreeList" data-sap-ui-controlid="' + encode(sControlId) + '">');
$.each(mBindingInfos.bindings, function(iBindingInfoIndex, oBindingInfo) {
rm.write('<li data-sap-ui-binding-name="' + encode(oBindingInfo.name) + '">');
rm.write('<span>');
rm.write('<label class="sapUiSupportLabel">' + encode(oBindingInfo.name) + '</label>');
rm.write('<img class="sapUiSupportRefreshBinding" title="Refresh Binding" src="../../debug/images/refresh.gif">');
rm.write('</span>');
$.each(oBindingInfo.bindings, function(iBindingIndex, oBinding) {
rm.write('<div class="sapUiSupportControlProperties">');
rm.write('<table><colgroup><col width="15%"><col width="35%"><col width="50%"></colgroup>');
rm.write('<tbody>');
// Path
rm.write('<tr><td colspan="2">');
rm.write('<label class="sapUiSupportLabel">Path</label>');
rm.write('</td><td>');
rm.write('<div><span');
if (oBinding.invalidPath) {
rm.write(' class="sapUiSupportModelPathInvalid"');
} else if (oBinding.unverifiedPath) {
rm.write(' class="sapUiSupportModelPathUnverified"');
}
rm.write('>' + encode(oBinding.path));
if (oBinding.invalidPath) {
rm.write(' (invalid)');
} else if (oBinding.unverifiedPath) {
rm.write(' (unverified)');
}
rm.write('</span></div>');
rm.write('</td></tr>');
// Absolute-Path
rm.write('<tr><td colspan="2">');
rm.write('<label class="sapUiSupportLabel">Absolute Path</label>');
rm.write('</td><td>');
if (typeof oBinding.absolutePath !== 'undefined') {
rm.write('<div>' + encode(oBinding.absolutePath) + '</div>');
} else {
rm.write('<div>No binding</div>');
}
rm.write('</td></tr>');
// Relative
rm.write('<tr><td colspan="2">');
rm.write('<label class="sapUiSupportLabel">Relative</label>');
rm.write('</td><td>');
if (typeof oBinding.isRelative !== 'undefined') {
rm.write('<div>' + encode(oBinding.isRelative) + '</div>');
} else {
rm.write('<div>No binding</div>');
}
rm.write('</td></tr>');
// Binding-Type
rm.write('<tr><td colspan="2">');
rm.write('<label class="sapUiSupportLabel">Binding Type</label>');
rm.write('</td><td>');
if (!oBindingInfo.type) {
rm.write('<div>No binding</div>');
} else {
rm.write('<div title="' + encode(oBindingInfo.type) + '">' + encode(basename(oBindingInfo.type)) + '</div>');
}
rm.write('</td></tr>');
// Binding-Mode
if (oBinding.mode) {
rm.write('<tr><td colspan="2">');
rm.write('<label class="sapUiSupportLabel">Binding Mode</label>');
rm.write('</td><td>');
rm.write('<div>' + encode(oBinding.mode) + '</div>');
rm.write('</td></tr>');
}
// Model-Name
rm.write('<tr><td>');
rm.write('<label class="sapUiSupportLabel">Model</label>');
rm.write('</td><td>');
rm.write('<label class="sapUiSupportLabel">Name</label>');
rm.write('</td><td>');
if (oBinding.model && oBinding.model.name) {
rm.write('<div>' + encode(oBinding.model.name) + '</div>');
} else {
rm.write('<div>No binding</div>');
}
rm.write('</td></tr>');
// Model-Type
rm.write('<tr><td>');
rm.write('</td><td>');
rm.write('<label class="sapUiSupportLabel">Type</label>');
rm.write('</td><td>');
if (oBinding.model && oBinding.model.type) {
rm.write('<div><span title="' + encode(oBinding.model.type) + '">' + encode(basename(oBinding.model.type)) + '</span></div>');
} else {
rm.write('<div><span>No binding</span></div>');
}
rm.write('</td></tr>');
// Model-DefaultBindingMode
rm.write('<tr><td>');
rm.write('</td><td>');
rm.write('<label class="sapUiSupportLabel">Default Binding Mode</label>');
rm.write('</td><td>');
if (oBinding.model && oBinding.model.bindingMode) {
rm.write('<div><span>' + encode(oBinding.model.bindingMode) + '</span></div>');
} else {
rm.write('<div><span>No binding</span></div>');
}
rm.write('</td></tr>');
// Model-Location
rm.write('<tr><td>');
rm.write('</td><td>');
rm.write('<label class="sapUiSupportLabel">Location</label>');
rm.write('</td><td>');
if (oBinding.model && oBinding.model.location && oBinding.model.location.type) {
if (oBinding.model.location.type === 'control') {
rm.write('<div><a class="control-tree sapUiSupportLink" title="' + encode(oBinding.model.location.name) + '" data-sap-ui-control-id="' + encode(oBinding.model.location.id) + '" href="#">' +
encode(basename(oBinding.model.location.name)) +
' (' + encode(oBinding.model.location.id) + ')</a></div>');
} else {
rm.write('<div><span title="sap.ui.getCore()">Core</span></div>');
}
} else {
rm.write('<div><span>No binding</span></div>');
}
rm.write('</td></tr>');
rm.write('</tbody></table></div>');
});
rm.write('</li>');
});
rm.write('</ul>');
}
rm.flush(this.$().find("#sapUiSupportControlPropertiesArea").get(0));
rm.destroy();
};
ControlTree.prototype.renderBreakpointsTab = function(aMethods, sControlId) {
var rm = sap.ui.getCore().createRenderManager();
rm.write('<div class="sapUiSupportControlMethods" data-sap-ui-controlid="' + encode(sControlId) + '">');
rm.write('<select id="sapUiSupportControlMethodsSelect" class="sapUiSupportAutocomplete sapUiSupportSelect"><option></option>');
$.each(aMethods, function(iIndex, oValue) {
if (!oValue.active) {
rm.write('<option>' + encode(oValue.name) + '</option>');
}
});
rm.write('</select>');
rm.write('<input class="sapUiSupportControlBreakpointInput sapUiSupportAutocomplete" type="text">');
rm.write('<button id="sapUiSupportControlAddBreakPoint" class="sapUiSupportRoundedButton ">Add breakpoint</button>');
rm.write('<hr class="no-border"><ul id="sapUiSupportControlActiveBreakpoints" class="sapUiSupportList sapUiSupportBreakpointList">');
$.each(aMethods, function(iIndex, oValue) {
if (!oValue.active) {
return;
}
rm.write('<li><span>' + encode(oValue.name) + '</span>' +
'<img class="remove-breakpoint" src="../../debug/images/delete.gif"></li>');
});
rm.write('</ul></div>');
rm.flush(this.$().find("#sapUiSupportControlPropertiesArea").get(0));
rm.destroy();
this.selectTab(this._tab.breakpoints);
this.$().find('.sapUiSupportControlBreakpointInput').trigger("focus");
};
ControlTree.prototype.renderExportTab = function() {
var rm = sap.ui.getCore().createRenderManager();
rm.write('<button id="sapUiSupportControlExportToXml" class="sapUiSupportRoundedButton sapUiSupportExportButton">Export To XML</button>');
rm.write('<br><br>');
rm.write('<button id="sapUiSupportControlExportToHtml" class="sapUiSupportRoundedButton sapUiSupportExportButton">Export To HTML</button>');
rm.flush(this.$().find("#sapUiSupportControlPropertiesArea").get(0));
rm.destroy();
this.selectTab(this._tab.exports);
};
ControlTree.prototype.requestProperties = function(sControlId) {
this._oStub.sendEvent(this._breakpointId + "RequestInstanceMethods", {
controlId: sControlId,
callback: this.getId() + "ReceivePropertiesMethods"
});
};
ControlTree.prototype.updateBreakpointCount = function(sControlId, mBpCount) {
var $breakpoints = $("#sap-debug-controltree-" + sControlId + " > div span.sapUiSupportControlTreeBreakpointCount");
if (mBpCount.active > 0) {
$breakpoints.text(mBpCount.active + " / " + mBpCount.all).toggleClass("sapUiSupportItemHidden", false);
} else {
$breakpoints.text("").toggleClass("sapUiSupportItemHidden", true);
}
};
// -------------------------------
// App-Side Event Handler
// -------------------------------
ControlTree.prototype.onsapUiSupportControlTreeTriggerRequestProperties = function(oEvent) {
this.requestProperties(oEvent.getParameter("controlId"));
};
ControlTree.prototype.onsapUiSupportControlTreeReceivePropertiesMethods = function(oEvent) {
var sControlId = oEvent.getParameter("controlId");
this._oStub.sendEvent(this.getId() + "RequestProperties", {
id: sControlId,
breakpointMethods: oEvent.getParameter("methods")
});
this.updateBreakpointCount(sControlId, JSON.parse(oEvent.getParameter("breakpointCount")));
};
ControlTree.prototype.onsapUiSupportControlTreeReceiveControlTree = function(oEvent) {
this.renderControlTree(JSON.parse(oEvent.getParameter("controlTree")));
};
ControlTree.prototype.onsapUiSupportControlTreeReceiveControlTreeExportError = function(oEvent) {
var sErrorMessage = oEvent.getParameter("errorMessage");
this._drawAlert(sErrorMessage);
};
ControlTree.prototype._drawAlert = function(sErrorMessage) {
/*eslint-disable no-alert */
alert("ERROR: The selected element cannot not be exported.\nPlease choose an other one.\n\nReason:\n" + sErrorMessage);
/*eslint-enable no-alert */
};
ControlTree.prototype.onsapUiSupportControlTreeReceiveControlTreeExport = function(oEvent) {
var zip;
var mViews = JSON.parse(oEvent.getParameter("serializedViews"));
var sType = oEvent.getParameter("sType");
if (!$.isEmptyObject(mViews)) {
zip = new JSZip();
for (var oViewName in mViews) {
var data = mViews[oViewName];
zip.file(oViewName.replace(/\./g, '/') + ".view." + sType.toLowerCase() , data);
}
}
if (zip) {
var oContent = zip.generate({
type: "blob"
});
File.save(oContent, sType.toUpperCase() + "Export", "zip", "application/zip");
}
};
ControlTree.prototype.onsapUiSupportSelectorSelect = function(oEvent) {
this.selectControl(oEvent.getParameter("id"));
};
ControlTree.prototype.onsapUiSupportControlTreeReceiveProperties = function(oEvent) {
this.renderPropertiesTab(JSON.parse(oEvent.getParameter("properties")), oEvent.getParameter("id"));
};
ControlTree.prototype.onsapUiSupportControlTreeReceiveBindingInfos = function(oEvent) {
this.renderBindingsTab(JSON.parse(oEvent.getParameter("bindinginfos")), oEvent.getParameter("id"));
};
ControlTree.prototype.onsapUiSupportControlTreeReceiveMethods = function(oEvent) {
var sControlId = oEvent.getParameter("controlId");
this.renderBreakpointsTab(JSON.parse(oEvent.getParameter("methods")), sControlId);
this.updateBreakpointCount(sControlId, JSON.parse(oEvent.getParameter("breakpointCount")));
};
// -------------------------------
// DOM Event Handler
// -------------------------------
ControlTree.prototype._onNodeClick = function(oEvent) {
var $span = $(oEvent.target);
var $li = $span.closest("li");
if ($li.hasClass("sapUiControlTreeElement")) {
$(".sapUiControlTreeElement > div").removeClass("sapUiSupportControlTreeSelected");
$li.children("div").addClass("sapUiSupportControlTreeSelected");
this._oStub.sendEvent("sapUiSupportSelectorHighlight", {id: $li.attr("id").substring("sap-debug-controltree-".length)});
var sId = $li.attr("id").substring("sap-debug-controltree-".length);
if ($span.hasClass("sapUiSupportControlTreeBreakpointCount")) {
this._currentTab = this._tab.breakpoints;
}
this.onAfterControlSelected(sId);
}
oEvent.stopPropagation();
};
ControlTree.prototype._onIconClick = function(oEvent) {
var $source = $(oEvent.target);
if ($source.parent().attr("data-sap-ui-collapsed")) {
$source.attr("src", $source.attr("src").replace("plus", "minus")).parent().removeAttr("data-sap-ui-collapsed");
$source.siblings("ul").toggleClass("sapUiSupportItemHidden", false);
} else {
$source.attr("src", $source.attr("src").replace("minus", "plus")).parent().attr("data-sap-ui-collapsed", "true");
$source.siblings("ul").toggleClass("sapUiSupportItemHidden", true);
}
if (oEvent.stopPropagation) {
oEvent.stopPropagation();
}
};
ControlTree.prototype._onControlTreeLinkClick = function(oEvent) {
this.selectControl($(oEvent.target).closest("li").attr("data-sap-ui-controlid"));
};
ControlTree.prototype._onPropertiesTab = function(oEvent) {
if (this.selectTab(this._tab.properties)) {
this.requestProperties(this.getSelectedControlId());
}
};
ControlTree.prototype._onBindingInfosTab = function(oEvent) {
if (this.selectTab(this._tab.bindinginfos)) {
this._oStub.sendEvent(this.getId() + "RequestBindingInfos", {
id: this.getSelectedControlId()
});
}
};
ControlTree.prototype._onMethodsTab = function(oEvent) {
if (this.selectTab(this._tab.breakpoints)) {
this._oStub.sendEvent(this._breakpointId + "RequestInstanceMethods", {
controlId: this.getSelectedControlId(),
callback: this.getId() + "ReceiveMethods"
});
}
};
ControlTree.prototype._onExportTab = function(oEvent) {
if (this.selectTab(this._tab.exports)) {
this.renderExportTab();
// this.renderControlTree(JSON.parse(oEvent.getParameter("controlTree")));
}
};
ControlTree.prototype._autoComplete = function(oEvent) {
if (oEvent.keyCode == KeyCodes.ENTER) {
this._updateSelectOptions(oEvent);
this._onAddBreakpointClicked();
}
if (oEvent.keyCode >= KeyCodes.ARROW_LEFT && oEvent.keyCode <= KeyCodes.ARROW_DOWN) {
return;
}
var $input = $(oEvent.target),
$select = $input.prev("select"),
sInputVal = $input.val();
if (sInputVal == "") {
return;
}
var aOptions = $select.find("option").map(function() {
return $(this).val();
}).get();
var sOption;
for (var i = 0; i < aOptions.length; i++) {
sOption = aOptions[i];
if (sOption.toUpperCase().indexOf(sInputVal.toUpperCase()) == 0) {
var iCurrentStart = $input.cursorPos();
if (oEvent.keyCode == KeyCodes.BACKSPACE) {
iCurrentStart--;
}
$input.val(sOption);
$input.selectText(iCurrentStart, sOption.length);
break;
}
}
return;
};
ControlTree.prototype._updateSelectOptions = function(oEvent) {
var oSelect = oEvent.target;
if (oSelect.tagName == "INPUT") {
var sValue = oSelect.value;
oSelect = oSelect.previousSibling;
var aOptions = oSelect.options;
for (var i = 0;i < aOptions.length;i++) {
var sText = aOptions[i].value || aOptions[i].text;
if (sText.toUpperCase() == sValue.toUpperCase()) {
oSelect.selectedIndex = i;
break;
}
}
}
var selIndex = oSelect.selectedIndex;
var sClassName = oSelect.options[selIndex].value || oSelect.options[selIndex].text;
if (oSelect.nextSibling && oSelect.nextSibling.tagName == "INPUT") {
oSelect.nextSibling.value = sClassName;
}
};
ControlTree.prototype._onAddBreakpointClicked = function (oEvent) {
var $select = this.$().find("#sapUiSupportControlMethodsSelect");
this._oStub.sendEvent(this._breakpointId + "ChangeInstanceBreakpoint", {
controlId: $select.closest("[data-sap-ui-controlid]").attr("data-sap-ui-controlid"),
methodName: $select.val(),
active: true,
callback: this.getId() + "ReceiveMethods"
});
};
ControlTree.prototype._onExportToXmlClicked = function (oEvent) {
this._startSerializing("XML");
};
ControlTree.prototype._onExportToHtmlClicked = function (oEvent) {
this._startSerializing("HTML");
};
ControlTree.prototype._startSerializing = function (sTypeValue) {
var sSelectedId = this.getSelectedControlId();
if (sSelectedId) {
this._oStub.sendEvent(this.getId() + "RequestControlTreeSerialize", { controlID: sSelectedId, sType: sTypeValue });
} else {
this._drawAlert("Nothing to export. Please select an item in the control tree.");
}
};
ControlTree.prototype._onRemoveBreakpointClicked = function (oEvent) {
var $img = $(oEvent.target);
this._oStub.sendEvent(this._breakpointId + "ChangeInstanceBreakpoint", {
controlId: $img.closest("[data-sap-ui-controlid]").attr("data-sap-ui-controlid"),
methodName: $img.siblings('span').text(),
active: false,
callback: this.getId() + "ReceiveMethods"
});
};
ControlTree.prototype._selectOptionsChanged = function (oEvent) {
var oSelect = oEvent.target;
var oInput = oSelect.nextSibling;
oInput.value = oSelect.options[oSelect.selectedIndex].value;
};
ControlTree.prototype._onPropertyChange = function(oEvent) {
var oSource = oEvent.target;
var $input = $(oSource);
var sId = $input.closest("[data-sap-ui-controlid]").attr("data-sap-ui-controlid");
var sValue = $input.val();
if ($input.attr("type") === "checkbox") {
sValue = "" + $input.is(":checked");
}
this._oStub.sendEvent(this.getId() + "ChangeProperty", {id: sId, name: $input.attr("data-sap-ui-name"), value: sValue });
};
ControlTree.prototype._onPropertyBreakpointChange = function(oEvent) {
var $checkbox = $(oEvent.target);
this._oStub.sendEvent(this._breakpointId + "ChangeInstanceBreakpoint", {
controlId: $checkbox.closest("[data-sap-ui-controlid]").attr("data-sap-ui-controlid"),
methodName: $checkbox.attr("data-sap-ui-method"),
active: $checkbox.is(":checked"),
callback: this.getId() + "TriggerRequestProperties"
});
};
ControlTree.prototype._onNavToControl = function(oEvent) {
var $link = $(oEvent.target);
var sId = $link.attr("data-sap-ui-control-id");
if (sId !== this.getSelectedControlId()) {
this.selectControl(sId);
}
};
ControlTree.prototype._onRefreshBinding = function(oEvent) {
var $img = $(oEvent.target);
var sId = $img.closest("[data-sap-ui-controlid]").attr("data-sap-ui-controlid");
var sName = $img.closest("[data-sap-ui-binding-name]").attr("data-sap-ui-binding-name");
this._oStub.sendEvent(this.getId() + "RefreshBinding", {
id: sId,
name: sName
});
};
ControlTree.prototype.selectTab = function(sTab) {
var $button = this.$().find("#sapUiSupportControlTab" + sTab);
if ($button.hasClass("active")) {
return false;
}
this.$().find("#sapUiSupportControlTabs button").removeClass("active");
$button.addClass("active");
this._currentTab = sTab;
return true;
};
ControlTree.prototype.getSelectedControlId = function() {
var $sret = this.$().find(".sapUiSupportControlTreeSelected");
if ($sret.length === 0) {
return undefined;
} else {
return $sret.parent().attr("id").substring("sap-debug-controltree-".length);
}
};
ControlTree.prototype.selectControl = function(sControlId) {
if (!sControlId) {
return;
}
$(".sapUiControlTreeElement > div").removeClass("sapUiSupportControlTreeSelected");
var that = this;
jQueryDOM(document.getElementById("sap-debug-controltree-" + sControlId)).parents("[data-sap-ui-collapsed]").each(function(iIndex, oValue) {
that._onIconClick({ target: $(oValue).find("img:first").get(0) });
});
var oPosition = jQueryDOM(document.getElementById("sap-debug-controltree-" + sControlId)).children("div").addClass("sapUiSupportControlTreeSelected").position();
var iScrollTop = this.$().find("#sapUiSupportControlTreeArea").scrollTop();
this.$().find("#sapUiSupportControlTreeArea").scrollTop(iScrollTop + oPosition.top);
this.onAfterControlSelected(sControlId);
};
ControlTree.prototype.onAfterControlSelected = function(sId) {
if (this._currentTab == this._tab.properties) {
this.requestProperties(sId);
} else if (this._currentTab == this._tab.breakpoints) {
this._oStub.sendEvent(this._breakpointId + "RequestInstanceMethods", {
controlId: sId,
callback: this.getId() + "ReceiveMethods"
});
} else if (this._currentTab == this._tab.bindinginfos) {
this._oStub.sendEvent(this.getId() + "RequestBindingInfos", {
id: this.getSelectedControlId()
});
}
};
//=================================================================================================
//=================================================================================================
// APP SIDE
//=================================================================================================
//=================================================================================================
function initInApps(oSupportStub) {
this.onsapUiSupportControlTreeRequestControlTree();
}
ControlTree.prototype.onsapUiSupportControlTreeRequestControlTree = function(oEvent) {
this._oStub.sendEvent(this.getId() + "ReceiveControlTree", { controlTree: JSON.stringify(this.getControlTree()) });
};
ControlTree.prototype.onsapUiSupportControlTreeRequestControlTreeSerialize = function(oEvent) {
var oControl = this.oCore.byId(oEvent.getParameter("controlID"));
var sType = oEvent.getParameter("sType");
var oViewSerializer;
var mViews;
var sViewName = sType + "ViewExported";
XMLView.create({
definition: document
}).then(function (oView) {
oView.setViewName(sViewName);
oView._controllerName = sType + "ViewController";
try {
if (oControl) {
if (oControl instanceof View) {
oViewSerializer = new ViewSerializer(oControl, window, "sap.m");
} else {
oView.addContent(oControl.clone());
oViewSerializer = new ViewSerializer(oView, window, "sap.m");
}
// By now just XML and HTML can be serialized
mViews = (sType && sType !== "XML") ? oViewSerializer.serializeToHTML() : oViewSerializer.serializeToXML();
} else {
var oUIArea = this.oCore.getUIArea(oEvent.getParameter("controlID"));
var aContent = oUIArea.getContent();
for ( var i = 0; i < aContent.length; i++) {
oView.addContent(aContent[i]);
}
oViewSerializer = new ViewSerializer(oView, window, "sap.m");
// By now just XML and HTML can be serialized
mViews = (sType && sType !== "XML") ? oViewSerializer.serializeToHTML() : oViewSerializer.serializeToXML();
for ( var i = 0; i < aContent.length; i++) {
oUIArea.addContent(aContent[i]);
}
}
if (oViewSerializer) {
this._oStub.sendEvent(this.getId() + "ReceiveControlTreeExport", { serializedViews: JSON.stringify(mViews), sType: sType });
}
} catch (err) {
this._oStub.sendEvent(this.getId() + "ReceiveControlTreeExportError", { errorMessage: err.message });
}
}.bind(this));
};
ControlTree.prototype.onsapUiSupportControlTreeRequestProperties = function(oEvent) {
var breakpointMethods = JSON.parse(oEvent.getParameter("breakpointMethods"));
var aControlProps = this.getControlProperties(oEvent.getParameter("id"), breakpointMethods);
this._oStub.sendEvent(this.getId() + "ReceiveProperties", {
id: oEvent.getParameter("id"),
properties: JSON.stringify(aControlProps)
});
};
ControlTree.prototype.onsapUiSupportControlTreeChangeProperty = function(oEvent) {
var sId = oEvent.getParameter("id");
var oControl = this.oCore.byId(sId);
if (oControl) {
var sName = oEvent.getParameter("name");
var sValue = oEvent.getParameter("value");
var oProperty = oControl.getMetadata().getProperty(sName);
if (oProperty && oProperty.type) {
var oType = DataType.getType(oProperty.type);
if (oType instanceof DataType) {
// DATATYPE
var vValue = oType.parseValue(sValue);
if (oType.isValid(vValue) && vValue !== "(null)" ) {
oControl[oProperty._sMutator](vValue);
}
} else if (oType) {
// ENUM
if (oType[sValue]) {
oControl[oProperty._sMutator](sValue);
}
}
}
}
};
ControlTree.prototype.onsapUiSupportControlTreeRequestBindingInfos = function(oEvent) {
var sId = oEvent.getParameter("id");
this._oStub.sendEvent(this.getId() + "ReceiveBindingInfos", {
id: sId,
bindinginfos: JSON.stringify(this.getControlBindingInfos(sId))
});
};
ControlTree.prototype.onsapUiSupportControlTreeRefreshBinding = function(oEvent) {
var sId = oEvent.getParameter("id");
var sBindingName = oEvent.getParameter("name");
this.refreshBinding(sId, sBindingName);
this._oStub.sendEvent(this.getId() + "ReceiveBindingInfos", {
id: sId,
bindinginfos: JSON.stringify(this.getControlBindingInfos(sId))
});
};
// -------------------------------
// Private Methods
// -------------------------------
ControlTree.prototype.getControlTree = function() {
var oCore = this.oCore,
aControlTree = [],
mAllElements = {};
function serializeElement(oElement) {
var mElement = {id: oElement.getId(), type: "", aggregation: [], association: []};
mAllElements[mElement.id] = mElement.id;
if (oElement instanceof UIArea) {
mElement.library = "sap.ui.core";
mElement.type = "sap.ui.core.UIArea";
$.each(oElement.getContent(), function(iIndex, oElement) {
var mChild = serializeElement(oElement);
mElement.aggregation.push(mChild);
});
} else {
mElement.library = oElement.getMetadata().getLibraryName();
mElement.type = oElement.getMetadata().getName();
if (oElement.mAggregations) {
/*eslint-disable no-loop-func */
for (var sAggrName in oElement.mAggregations) {
var oAggrElement = oElement.mAggregations[sAggrName];
if (oAggrElement) {
var aElements = $.isArray(oAggrElement) ? oAggrElement : [oAggrElement];
$.each(aElements, function(iIndex, oValue) {
// tooltips are also part of aggregations
if (oValue instanceof Element) {
var mChild = serializeElement(oValue);
mElement.aggregation.push(mChild);
}
});
}
}
/*eslint-enable no-loop-func */
}
if (oElement.mAssociations) {
var mAssocMetadata = oElement.getMetadata().getAllAssociations();
/*eslint-disable no-loop-func */
for (var sAssocName in oElement.mAssociations) {
var sAssocId = oElement.mAssociations[sAssocName];
var sAssocType = (mAssocMetadata[sAssocName]) ? mAssocMetadata[sAssocName].type : null;
if (sAssocId && sAssocType) {
var aAssocIds = $.isArray(sAssocId) ? sAssocId : [sAssocId];
$.each(aAssocIds, function(iIndex, oValue) {
mElement.association.push({ id: oValue, type: sAssocType, name: sAssocName, isAssociationLink: true });
});
}
}
/*eslint-enable no-loop-func */
}
}
return mElement;
}
$.each(oCore.mUIAreas, function(iIndex, oUIArea) {
var mElement = serializeElement(oUIArea);
aControlTree.push(mElement);
});
function serializeAssociations(iIndex, mElement) {
/*eslint-disable no-loop-func */
for (var i = 0; i < mElement.association.length; i++) {
var mAssoc = mElement.association[i];
if (!mAllElements[mAssoc.id]) {
var oType = ObjectPath.get(mAssoc.type || "");
if (!(typeof oType === "function")) {
continue;
}
var sStereotype = oType.getMetadata().getStereotype(),
oObj = null;
switch (sStereotype) {
case "element":
case "control":
oObj = oCore.byId(mAssoc.id);
break;
case "component":
oObj = oCore.getComponent(mAssoc.id);
break;
case "template":
oObj = oCore.getTemplate(mAssoc.id);
break;
default:
break;
}
if (!oObj) {
continue;
}
mElement.association[i] = serializeElement(oObj);
mElement.association[i].isAssociation = true;
serializeAssociations(0, mElement.association[i]);
}
}
/*eslint-enable no-loop-func */
$.each(mElement.aggregation, serializeAssociations);
}
$.each(aControlTree, serializeAssociations);
return aControlTree;
};
ControlTree.prototype.getControlProperties = function(sId, mMethods) {
var pSimpleType = /^((boolean|string|int|float)(\[\])?)$/;
var aControlProps = [];
var oControl = this.oCore.byId(sId);
if (!oControl && this.oCore.getUIArea(sId)) {
aControlProps.push({
control: "sap.ui.core.UIArea",
properties: [],
aggregations: []
});
} else if (oControl) {
var oMetadata = oControl.getMetadata();
/*eslint-disable no-loop-func */
while (oMetadata instanceof ElementMetadata) {
var mControlProp = {
control: oMetadata.getName(),
properties: [],
aggregations: []
};
var mProperties = oMetadata.getProperties();
$.each(mProperties, function(sKey, oProperty) {
var mProperty = {};
$.each(oProperty, function(sName, sValue) {
if (sName.substring(0, 1) !== "_" || (sName == '_sGetter' || sName == '_sMutator')) {
mProperty[sName] = sValue;
}
if (sName == '_sGetter' || sName == '_sMutator') {
mProperty["bp" + sName] = mMethods.filter(function(o) {
return o.name === sValue && o.active;
}).length === 1;
}
var oType = DataType.getType(oProperty.type);
if (oType && !(oType instanceof DataType)) {
mProperty["enumValues"] = oType;
}
});
mProperty.value = oControl.getProperty(sKey);
mProperty.isBound = !!oControl.mBindingInfos[sKey];
mControlProp.properties.push(mProperty);
});
var mAggregations = oMetadata.getAggregations();
$.each(mAggregations, function(sKey, oAggregation) {
if (oAggregation.altTypes && oAggregation.altTypes[0] && pSimpleType.test(oAggregation.altTypes[0]) && typeof (oControl.getAggregation(sKey)) !== 'object') {
var mAggregation = {};
$.each(oAggregation, function(sName, sValue) {
if (sName.substring(0, 1) !== "_" || (sName == '_sGetter' || sName == '_sMutator')) {
mAggregation[sName] = sValue;
}
if (sName == '_sGetter' || sName == '_sMutator') {
mAggregation["bp" + sName] = mMethods.filter(function(o) {
return o.name === sValue && o.active;
}).length === 1;
}
});
mAggregation.value = oControl.getAggregation(sKey);
mControlProp.aggregations.push(mAggregation);
}
});
aControlProps.push(mControlProp);
oMetadata = oMetadata.getParent();
}
/*eslint-enable no-loop-func */
}
return aControlProps;
};
ControlTree.prototype.getControlBindingInfos = function(sId) {
var mControlBindingInfos = {
bindings: [],
contexts: []
};
var oControl = this.oCore.byId(sId);
if (!oControl) {
return mControlBindingInfos;
}
var mBindingInfos = oControl.mBindingInfos;
var that = this;
/*eslint-disable no-loop-func */
for (var bindingName in mBindingInfos) {
if (mBindingInfos.hasOwnProperty(bindingName)) {
var mBindingInfo = mBindingInfos[bindingName];
var aBindings = [];
var aBindingInfoBuffer, aBindingBuffer = [];
if ($.isArray(mBindingInfo.parts)) {
aBindingInfoBuffer = mBindingInfo.parts;
} else {
aBindingInfoBuffer = [ mBindingInfo ];
}
if (mBindingInfo.binding instanceof CompositeBinding) {
aBindingBuffer = mBindingInfo.binding.getBindings();
} else if (mBindingInfo.binding instanceof Binding) {
aBindingBuffer = [ mBindingInfo.binding ];
}
$.each(aBindingInfoBuffer, function(iIndex, oInfo) {
var mData = {};
mData.invalidPath = true;
mData.path = oInfo.path;
mData.mode = oInfo.mode;
mData.model = {
name: oInfo.model
};
if (aBindingBuffer.length > iIndex && aBindingBuffer[iIndex]) {
var oBinding = aBindingBuffer[iIndex],
oModel = oBinding.getModel(),
sPath = oBinding.getPath(),
sAbsolutePath;
if (oModel) {
sAbsolutePath = oModel.resolve(sPath, oBinding.getContext());
if (oModel.isA("sap.ui.model.odata.v4.ODataModel")) { // ODataModel v4 throws an exception on getProperty()
mData.unverifiedPath = true;
mData.invalidPath = false; // otherwise path is shown as invalid
} else {
if (oModel.getProperty(sAbsolutePath) !== undefined && oModel.getProperty(sAbsolutePath) !== null) {
mData.invalidPath = false;
} else if (oModel.getProperty(sPath) !== undefined && oModel.getProperty(sPath) !== null) {
mData.invalidPath = false;
sAbsolutePath = sPath;
}
}
}
mData.absolutePath = (typeof (sAbsolutePath) === 'undefined') ? 'Unresolvable' : sAbsolutePath;
mData.isRelative = oBinding.isRelative();
mData.model = that.getBindingModelInfo(oBinding, oControl);
}
aBindings.push(mData);
});
mControlBindingInfos.bindings.push({
name: bindingName,
type: (mBindingInfo.binding) ? mBindingInfo.binding.getMetadata().getName() : undefined,
bindings: aBindings
});
}
}
/*eslint-enable no-loop-func */
function getContextInfos(oContext, sModelName) {
var mContextInfos = {
modelName: (sModelName === 'undefined') ? 'none (default)' : sModelName,
path: oContext.getPath()
};
if (oContext.getModel().isA("sap.ui.model.odata.v4.ODataModel")) { // ODataModel v4 throws an exception on getObject()
mContextInfos.unverifiedPath = true;
} else {
if (!oContext.getObject() == null) {
mContextInfos.invalidPath = true;
}
}
return mContextInfos;
}
var mContexts = oControl.oBindingContexts;
for (var modelName in mContexts) {
if (mContexts.hasOwnProperty(modelName)) {
mControlBindingInfos.contexts.push(getContextInfos(mContexts[modelName], modelName));
}
}
var mContexts = oControl.oPropagatedProperties.oBindingContexts;
for (var modelName in mContexts) {
if (mContexts.hasOwnProperty(modelName) && !oControl.oBindingContexts[modelName]) {
var mContext = getContextInfos(mContexts[modelName], modelName);
var oCurrentControl = oControl;
do {
if (oCurrentControl.oBindingContexts[modelName] == mContexts[modelName]) {
mContext.location = {
id: oCurrentControl.getId(),
name: oCurrentControl.getMetadata().getName()
};
break;
}
} while ( (oCurrentControl = oCurrentControl.getParent()) );
mControlBindingInfos.contexts.push(mContext);
}
}
return mControlBindingInfos;
};
ControlTree.prototype.getBindingModelInfo = function(oBinding, oControl) {
var mModelInfo = {};
var oBindingModel = oBinding.getModel();
function getModelName(oModels) {
for (var sModelName in oModels) {
if (oModels.hasOwnProperty(sModelName)) {
if (oModels[sModelName] === oBindingModel) {
return sModelName;
}
}
}
return null;
}
mModelInfo.name = getModelName(oControl.oModels) || getModelName(oControl.oPropagatedProperties.oModels);
if (mModelInfo.name) {
var oCurrentControl = oControl;
// check for the model on control level (including all parents)
do {
if (oCurrentControl.oModels[mModelInfo.name] === oBindingModel) {
mModelInfo.location = {
type: 'control',
id: oCurrentControl.getId(),
name: oCurrentControl.getMetadata().getName()
};
break;
}
} while ( (oCurrentControl = oCurrentControl.getParent()) );
// check for core model if no model was found
if (!mModelInfo.location) {
var oCoreModel = null;
if (mModelInfo.name === 'undefined') {
oCoreModel = this.oCore.getModel();
} else {
oCoreModel = this.oCore.getModel(mModelInfo.name);
}
if (oCoreModel) {
mModelInfo.location = {
type: 'core'
};
}
}
}
// Get Model Type (JSON, XML, OData)
mModelInfo.type = oBindingModel.getMetadata().getName();
mModelInfo.bindingMode = oBindingModel.getDefaultBindingMode();
// Default Model (undefined)
mModelInfo.name = (mModelInfo.name === 'undefined') ? 'none (default)' : mModelInfo.name;
return mModelInfo;
};
ControlTree.prototype.refreshBinding = function(sId, sBindingName) {
var oControl = this.oCore.byId(sId);
var mBindingInfo = oControl.mBindingInfos[sBindingName];
if (!oControl || !mBindingInfo) {
return;
}
var oBinding = mBindingInfo.binding;
if (!oBinding) {
return;
}
if (oBinding instanceof CompositeBinding) {
var aBindings = oBinding.getBindings();
for ( var i = 0; i < aBindings.length; i++) {
aBindings[i].refresh();
}
} else {
oBinding.refresh();
}
};
return ControlTree;
});
|
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import { useStaticQuery, graphql } from "gatsby"
import Header from "./header"
import "./layout.css"
const Layout = ({ children }) => {
const data = useStaticQuery(graphql`
query SiteTitleQueryRoot {
site {
siteMetadata {
title
}
}
}
`)
return (
<>
<Header siteTitle={data.site.siteMetadata.title} />
<div
style={{
margin: `0 auto`,
maxWidth: 960,
padding: `0px 1.0875rem 1.45rem`,
paddingTop: 0,
}}
>
<main>{children}</main>
<footer>
© {new Date().getFullYear()}, Built with
{` `}
<a href="https://www.gatsbyjs.org">Gatsby</a>
</footer>
</div>
</>
)
}
Layout.propTypes = {
children: PropTypes.node.isRequired,
}
export default Layout
|
module.exports = controller => {
var report = null;
controller.registerTrigger('serverCommunication::websocket::authentication', 'icheques', (data, callback) => {
callback();
if (report) {
report.close();
}
if (data.commercialReference) {
return;
}
report = controller.call('report',
'Como você encontrou o CreditHub?',
'Conte como ouviu falar de nós ou informe o sistema (ERP) que utiliza.',
'',
true);
var form = report.form(controller);
var samaritano = form.addInput('samaritano', 'text', 'Referência');
var autocomplete = controller.call('autocomplete', samaritano);
var fill = (val, submit) => e => {
e.preventDefault();
samaritano.val(val);
if (submit)
form.element().submit();
};
autocomplete.item('Sites de Busca (aka. Google)', null, 'Eu encontrei o iCheques através de um site de buscas.').click(fill('Buscador do Google'));
autocomplete.item('E-mail Marketing (não SPAM)', null, 'Eu recebi um e-mail marketing muito banaca de vocês.').click(fill('E-mail Marketing'));
autocomplete.item('Um Amigo Apresentou', null, 'Um camarada meu apresentou o iCheques e agora virei fã.').click(fill('Referência de um Amigo'));
controller.call('instantSearch', samaritano, (search, ac, cb) => {
controller.serverCommunication.call('SELECT FROM \'ICHEQUESAUTHENTICATION\'.\'ReferenceAutocomplete\'', {
data: {input: search},
success(doc) {
$('BPQL body references node', doc).each((idx, vl) => {
ac.item('Antecipadora de Cheques', $('nome', vl).text(), 'A antecipadora me apresentou o iCheques para operarmos on-line.').click(fill($('username', vl).text(), true));
});
},
complete() {
cb();
}
});
}, autocomplete);
form.addSubmit('send', 'Enviar');
form.element().submit(e => {
e.preventDefault();
if (!samaritano.val()) {
samaritano.addClass('error');
return;
}
controller.call('alert', {
icon: 'badges',
title: 'Muito obrigado! Nós agradecemos a informação.',
subtitle: 'Além do saco de moedas vamos entregar esta medalha para quem te protegeu dos cheques ruins.'
});
controller.serverCommunication.call('UPDATE \'ICHEQUES\'.\'COMMERCIALREFERENCE\'', {
data: {input: samaritano.val()}
});
localStorage.hasCommercialReference = true;
report.close();
});
report.gamification('crown');
$('.app-content').prepend(report.element());
});
};
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: The body may not re-declare variables declared in the head
info: |
IterationStatement :
for ( LexicalDeclaration Expressionopt ; Expressionopt ) Statement
It is a Syntax Error if any element of the BoundNames of LexicalDeclaration
also occurs in the VarDeclaredNames of Statement.
negative:
phase: early
type: SyntaxError
esid: sec-for-statement
es6id: 13.7.4
---*/
for (const x; false; ) {
var x;
}
|
module.exports = {
BUCKET: process.env.AWS_S3_BUCKET,
BUCKET_URL: `https://s3.amazonaws.com/${process.env.AWS_S3_BUCKET}`,
};
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.shallowEqual = exports.objectDiff = exports.normalizeTransitionDuration = exports.normalizeOffset = exports.numberToWord = exports.numberToWordMap = exports.keyboardKey = exports.SUI = exports.META = exports.leven = exports.isBrowser = exports.partitionHTMLInputProps = exports.htmlInputProps = exports.htmlInputEvents = exports.htmlInputAttrs = exports.getElementType = exports.getUnhandledProps = exports.eventStack = exports.makeDebugger = exports.debug = exports.customPropTypes = exports.useWidthProp = exports.useVerticalAlignProp = exports.useTextAlignProp = exports.useOnlyProp = exports.useValueAndKey = exports.useKeyOrValueAndKey = exports.useKeyOnly = exports.childrenUtils = exports.mergeChildMappings = exports.getChildMapping = exports.AutoControlledComponent = undefined;
var _AutoControlledComponent = require('./AutoControlledComponent');
Object.defineProperty(exports, 'AutoControlledComponent', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_AutoControlledComponent).default;
}
});
var _childMapping = require('./childMapping');
Object.defineProperty(exports, 'getChildMapping', {
enumerable: true,
get: function get() {
return _childMapping.getChildMapping;
}
});
Object.defineProperty(exports, 'mergeChildMappings', {
enumerable: true,
get: function get() {
return _childMapping.mergeChildMappings;
}
});
var _classNameBuilders = require('./classNameBuilders');
Object.defineProperty(exports, 'useKeyOnly', {
enumerable: true,
get: function get() {
return _classNameBuilders.useKeyOnly;
}
});
Object.defineProperty(exports, 'useKeyOrValueAndKey', {
enumerable: true,
get: function get() {
return _classNameBuilders.useKeyOrValueAndKey;
}
});
Object.defineProperty(exports, 'useValueAndKey', {
enumerable: true,
get: function get() {
return _classNameBuilders.useValueAndKey;
}
});
Object.defineProperty(exports, 'useOnlyProp', {
enumerable: true,
get: function get() {
return _classNameBuilders.useOnlyProp;
}
});
Object.defineProperty(exports, 'useTextAlignProp', {
enumerable: true,
get: function get() {
return _classNameBuilders.useTextAlignProp;
}
});
Object.defineProperty(exports, 'useVerticalAlignProp', {
enumerable: true,
get: function get() {
return _classNameBuilders.useVerticalAlignProp;
}
});
Object.defineProperty(exports, 'useWidthProp', {
enumerable: true,
get: function get() {
return _classNameBuilders.useWidthProp;
}
});
var _debug = require('./debug');
Object.defineProperty(exports, 'debug', {
enumerable: true,
get: function get() {
return _debug.debug;
}
});
Object.defineProperty(exports, 'makeDebugger', {
enumerable: true,
get: function get() {
return _debug.makeDebugger;
}
});
var _factories = require('./factories');
Object.keys(_factories).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _factories[key];
}
});
});
var _getUnhandledProps = require('./getUnhandledProps');
Object.defineProperty(exports, 'getUnhandledProps', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_getUnhandledProps).default;
}
});
var _getElementType = require('./getElementType');
Object.defineProperty(exports, 'getElementType', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_getElementType).default;
}
});
var _htmlInputPropsUtils = require('./htmlInputPropsUtils');
Object.defineProperty(exports, 'htmlInputAttrs', {
enumerable: true,
get: function get() {
return _htmlInputPropsUtils.htmlInputAttrs;
}
});
Object.defineProperty(exports, 'htmlInputEvents', {
enumerable: true,
get: function get() {
return _htmlInputPropsUtils.htmlInputEvents;
}
});
Object.defineProperty(exports, 'htmlInputProps', {
enumerable: true,
get: function get() {
return _htmlInputPropsUtils.htmlInputProps;
}
});
Object.defineProperty(exports, 'partitionHTMLInputProps', {
enumerable: true,
get: function get() {
return _htmlInputPropsUtils.partitionHTMLInputProps;
}
});
var _isBrowser = require('./isBrowser');
Object.defineProperty(exports, 'isBrowser', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_isBrowser).default;
}
});
var _leven = require('./leven');
Object.defineProperty(exports, 'leven', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_leven).default;
}
});
var _keyboardKey = require('./keyboardKey');
Object.defineProperty(exports, 'keyboardKey', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_keyboardKey).default;
}
});
var _numberToWord = require('./numberToWord');
Object.defineProperty(exports, 'numberToWordMap', {
enumerable: true,
get: function get() {
return _numberToWord.numberToWordMap;
}
});
Object.defineProperty(exports, 'numberToWord', {
enumerable: true,
get: function get() {
return _numberToWord.numberToWord;
}
});
var _objectDiff = require('./objectDiff');
Object.defineProperty(exports, 'objectDiff', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_objectDiff).default;
}
});
var _childrenUtils2 = require('./childrenUtils');
var _childrenUtils = _interopRequireWildcard(_childrenUtils2);
var _customPropTypes2 = require('./customPropTypes');
var _customPropTypes = _interopRequireWildcard(_customPropTypes2);
var _eventStack2 = require('./eventStack');
var _eventStack3 = _interopRequireDefault(_eventStack2);
var _META2 = require('./META');
var _META = _interopRequireWildcard(_META2);
var _SUI2 = require('./SUI');
var _SUI = _interopRequireWildcard(_SUI2);
var _normalizeOffset2 = require('./normalizeOffset');
var _normalizeOffset3 = _interopRequireDefault(_normalizeOffset2);
var _normalizeTransitionDuration2 = require('./normalizeTransitionDuration');
var _normalizeTransitionDuration3 = _interopRequireDefault(_normalizeTransitionDuration2);
var _shallowEqual2 = require('./shallowEqual');
var _shallowEqual3 = _interopRequireDefault(_shallowEqual2);
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.childrenUtils = _childrenUtils;
exports.customPropTypes = _customPropTypes;
exports.eventStack = _eventStack3.default;
exports.META = _META;
exports.SUI = _SUI;
exports.normalizeOffset = _normalizeOffset3.default;
exports.normalizeTransitionDuration = _normalizeTransitionDuration3.default;
exports.shallowEqual = _shallowEqual3.default;
|
var authRbac = require('auth-rbac');
var httpBasic = require('./httpBasic');
function authRbacHttpBasic(realm) {
return authRbac.frontend({
extractCredentials: httpBasic.extractCredentials,
askForCredentials: httpBasic.askForCredentials(realm)
});
}
module.exports = authRbacHttpBasic;
|
// @flow
/*
* This file is auto-generated! Do not modify it directly.
* To re-generate run 'make build'
*/
import { FLIPPED_ALIAS_KEYS } from "../../definitions";
export const EXPRESSION_TYPES = FLIPPED_ALIAS_KEYS["Expression"];
export const BINARY_TYPES = FLIPPED_ALIAS_KEYS["Binary"];
export const SCOPABLE_TYPES = FLIPPED_ALIAS_KEYS["Scopable"];
export const BLOCKPARENT_TYPES = FLIPPED_ALIAS_KEYS["BlockParent"];
export const BLOCK_TYPES = FLIPPED_ALIAS_KEYS["Block"];
export const STATEMENT_TYPES = FLIPPED_ALIAS_KEYS["Statement"];
export const TERMINATORLESS_TYPES = FLIPPED_ALIAS_KEYS["Terminatorless"];
export const COMPLETIONSTATEMENT_TYPES =
FLIPPED_ALIAS_KEYS["CompletionStatement"];
export const CONDITIONAL_TYPES = FLIPPED_ALIAS_KEYS["Conditional"];
export const LOOP_TYPES = FLIPPED_ALIAS_KEYS["Loop"];
export const WHILE_TYPES = FLIPPED_ALIAS_KEYS["While"];
export const EXPRESSIONWRAPPER_TYPES = FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
export const FOR_TYPES = FLIPPED_ALIAS_KEYS["For"];
export const FORXSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS["ForXStatement"];
export const FUNCTION_TYPES = FLIPPED_ALIAS_KEYS["Function"];
export const FUNCTIONPARENT_TYPES = FLIPPED_ALIAS_KEYS["FunctionParent"];
export const PUREISH_TYPES = FLIPPED_ALIAS_KEYS["Pureish"];
export const DECLARATION_TYPES = FLIPPED_ALIAS_KEYS["Declaration"];
export const PATTERNLIKE_TYPES = FLIPPED_ALIAS_KEYS["PatternLike"];
export const LVAL_TYPES = FLIPPED_ALIAS_KEYS["LVal"];
export const TSENTITYNAME_TYPES = FLIPPED_ALIAS_KEYS["TSEntityName"];
export const LITERAL_TYPES = FLIPPED_ALIAS_KEYS["Literal"];
export const IMMUTABLE_TYPES = FLIPPED_ALIAS_KEYS["Immutable"];
export const USERWHITESPACABLE_TYPES = FLIPPED_ALIAS_KEYS["UserWhitespacable"];
export const METHOD_TYPES = FLIPPED_ALIAS_KEYS["Method"];
export const OBJECTMEMBER_TYPES = FLIPPED_ALIAS_KEYS["ObjectMember"];
export const PROPERTY_TYPES = FLIPPED_ALIAS_KEYS["Property"];
export const UNARYLIKE_TYPES = FLIPPED_ALIAS_KEYS["UnaryLike"];
export const PATTERN_TYPES = FLIPPED_ALIAS_KEYS["Pattern"];
export const CLASS_TYPES = FLIPPED_ALIAS_KEYS["Class"];
export const MODULEDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
export const EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["ExportDeclaration"];
export const MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
export const FLOW_TYPES = FLIPPED_ALIAS_KEYS["Flow"];
export const FLOWBASEANNOTATION_TYPES =
FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
export const FLOWDECLARATION_TYPES = FLIPPED_ALIAS_KEYS["FlowDeclaration"];
export const FLOWPREDICATE_TYPES = FLIPPED_ALIAS_KEYS["FlowPredicate"];
export const JSX_TYPES = FLIPPED_ALIAS_KEYS["JSX"];
export const TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS["TSTypeElement"];
export const TSTYPE_TYPES = FLIPPED_ALIAS_KEYS["TSType"];
|
const Discord = require('discord.js');
const client = new Discord.Client();
const ayarlar = require('./ayarlar.json');
const chalk = require('chalk');
const fs = require('fs');
const moment = require('moment');
require('./util/eventLoader')(client);
var prefix = ayarlar.prefix;
const log = message => {
console.log(`[${moment().format('YYYY-MM-DD HH:mm:ss')}] ${message}`);
};
client.commands = new Discord.Collection();
client.aliases = new Discord.Collection();
fs.readdir('./komutlar/', (err, files) => {
if (err) console.error(err);
log(`${files.length} komut yüklenecek.`);
files.forEach(f => {
let props = require(`./komutlar/${f}`);
log(`Yüklenen komut: ${props.help.name}.`);
client.commands.set(props.help.name, props);
props.conf.aliases.forEach(alias => {
client.aliases.set(alias, props.help.name);
});
});
});
client.reload = command => {
return new Promise((resolve, reject) => {
try {
delete require.cache[require.resolve(`./komutlar/${command}`)];
let cmd = require(`./komutlar/${command}`);
client.commands.delete(command);
client.aliases.forEach((cmd, alias) => {
if (cmd === command) client.aliases.delete(alias);
});
client.commands.set(command, cmd);
cmd.conf.aliases.forEach(alias => {
client.aliases.set(alias, cmd.help.name);
});
resolve();
} catch (e){
reject(e);
}
});
};
client.on('guildBanAdd' , (guild, user) => {
let aramızakatılanlar = guild.channels.find('name', 'aramıza-katılanlar');
if (!aramızakatılanlar) return;
aramızakatılanlar.send('https://media.giphy.com/media/8njotXALXXNrW/giphy.gif **Adalet dağıtma zamanı gelmiş!** '+ user.username +'**Bakıyorum da suç işlemiş,Yargı dağıtmaya devam** :fist: :writing_hand: :spy:' );
});
client.load = command => {
return new Promise((resolve, reject) => {
try {
let cmd = require(`./komutlar/${command}`);
client.commands.set(command, cmd);
cmd.conf.aliases.forEach(alias => {
client.aliases.set(alias, cmd.help.name);
});
resolve();
} catch (e){
reject(e);
}
});
};
client.unload = command => {
return new Promise((resolve, reject) => {
try {
delete require.cache[require.resolve(`./komutlar/${command}`)];
let cmd = require(`./komutlar/${command}`);
client.commands.delete(command);
client.aliases.forEach((cmd, alias) => {
if (cmd === command) client.aliases.delete(alias);
});
resolve();
} catch (e){
reject(e);
}
});
};
client.on('message', msg => {
if (msg.content.toLowerCase() === 'sa') {
msg.reply('AleykümSelam , Hoşgeldin! Nasılsın ? ');
}
if (msg.content.toLowerCase() === 'merhaba') {
msg.reply('merhabaa :heart:');
}
if (msg.content.toLowerCase() === 'hey bot') {
msg.reply('buyrun ; İsteğinizi alayım');
}
if (msg.content.toLowerCase() === 'selam') {
msg.reply('Aleykümselam, hoşgeldin nasılsın?');
}
if (msg.content.toLowerCase() === 'merhabalar') {
msg.reply('Sanada Merrrrhabalar');
}
if (msg.content.toLowerCase() === 'mal') {
msg.reply('Lütfen daha az argo kelime kullanalım.');
}
if (msg.content.toLowerCase() === 'gerizekalı') {
msg.reply('Lütfen daha az argo kelime kullanalım.');
}
if (msg.content.toLowerCase() === 'aptal') {
msg.reply('Lütfen daha az argo kelime kullanalım.');
}
if (msg.content.toLowerCase() === 'öküz') {
msg.reply('Lütfen daha az argo kelime kullanalım.');
}
if (msg.content === 'ping') {
msg.reply('Pong! ping ');
}
if (msg.content.toLowerCase() === prefix + 'youtube' ) {
msg.reply('Bot yapımcısı youtube kanalı - HusooTV')
}
if (msg.content.toLowerCase() === prefix + 'bot davet' ) {
msg.reply('https://discordapp.com/oauth2/authorize?client_id=606930624519077908&scope=bot&permissions=2087971903')
}
if (msg.content.toLowerCase() === prefix + 'iletişim' ) {
msg.reply('Gmail - htanriverdi147@gmail.com')
}
});
client.elevation = message => {
if(!message.guild) {
return; }
let permlvl = 0;
if (message.member.hasPermission("BAN_MEMBERS")) permlvl = 2;
if (message.member.hasPermission("ADMINISTRATOR")) permlvl = 3;
if (message.author.id === ayarlar.sahip) permlvl = 4;
return permlvl;
};
var regToken = /[\w\d]{24}\.[\w\d]{6}\.[\w\d-_]{27}/g;
client.on('warn', e => {
console.log(chalk.bgYellow(e.replace(regToken, 'that was redacted')));
});
client.on('error', e => {
console.log(chalk.bgRed(e.replace(regToken, 'that was redacted')));
});
client.login(ayarlar.token);
|
const path = require('path')
const fs = require('fs')
const _ = require('lodash')
const cosmiconfig = require('cosmiconfig')
const { ConfigMissingError } = require('../common/errors')
const packageJson = require('../../package.json')
const getSolhintCoreConfigPath = name => {
if (name === 'solhint:recommended') {
return path.resolve(__dirname, '../../conf/rulesets/solhint-recommended.js')
}
if (name === 'solhint:all') {
return path.resolve(__dirname, '../../conf/rulesets/solhint-all.js')
}
if (name === 'solhint:default') {
return path.resolve(__dirname, '../../conf/rulesets/solhint-default.js')
}
throw new ConfigMissingError(name)
}
const createEmptyConfig = () => ({
excludedFiles: {},
extends: {},
globals: {},
env: {},
rules: {},
parserOptions: {}
})
const loadConfig = configFile => {
if (configFile && !fs.existsSync(configFile)) {
throw new Error(`The config file passed as a parameter does not exist`)
}
// Use cosmiconfig to get the config from different sources
const appDirectory = fs.realpathSync(process.cwd())
const moduleName = packageJson.name
const cosmiconfigOptions = {
searchPlaces: [
'package.json',
`.${moduleName}.json`,
`.${moduleName}rc`,
`.${moduleName}rc.json`,
`.${moduleName}rc.yaml`,
`.${moduleName}rc.yml`,
`.${moduleName}rc.js`,
`${moduleName}.config.js`
]
}
const explorer = cosmiconfig(moduleName, cosmiconfigOptions)
// if a specific path was specified, just load it and ignore default paths
if (configFile) {
return explorer.loadSync(configFile).config
}
const searchedFor = explorer.searchSync(appDirectory)
if (!searchedFor) {
throw new ConfigMissingError()
}
return searchedFor.config || createEmptyConfig()
}
const configGetter = path => {
let extensionPath = null
if (path.startsWith('solhint:')) {
extensionPath = getSolhintCoreConfigPath(path)
} else {
// Load packages with rules
extensionPath = `solhint-config-${path}`
}
const extensionConfig = require(extensionPath)
return extensionConfig
}
const applyExtends = (config, getter = configGetter) => {
if (!config.extends) {
return config
}
if (!Array.isArray(config.extends)) {
config.extends = [config.extends]
}
return config.extends.reduceRight((previousValue, parentPath) => {
try {
const extensionConfig = getter(parentPath)
return _.merge({}, extensionConfig, previousValue)
} catch (e) {
throw new ConfigMissingError(parentPath)
}
}, config)
}
module.exports = {
applyExtends,
configGetter,
loadConfig
}
|
import React from "react";
import { graphql } from "gatsby";
import styled from "styled-components";
import Layout from "layout/layout";
import SEO from "components/seo";
import Comment from "components/comment";
import { rhythm } from "styles/typography";
import Markdown from "styles/markdown";
import PostHead from "../components/postHead";
const BlogPost = ({ data }) => {
const {
markdownRemark: {
frontmatter: { title, desc, thumbnail, alt, client, date },
html,
},
} = data;
let featuredImgFluid = thumbnail.childImageSharp.fluid;
const ogImagePath = thumbnail && thumbnail.childImageSharp.fixed.src;
return (
<Layout>
<SEO title={title} description={desc} image={ogImagePath} />
<main>
<article>
<PostHead
title={title}
client={client}
thumbnail={featuredImgFluid}
alt={alt}
date={date}
/>
<OuterWrapper>
<InnerWrapper>
<div>
<Markdown
dangerouslySetInnerHTML={{ __html: html }}
rhythm={rhythm}
/>
</div>
</InnerWrapper>
</OuterWrapper>
</article>
<CommentWrap>
<Comment />
</CommentWrap>
</main>
</Layout>
);
};
const OuterWrapper = styled.div`
margin-top: var(--sizing-xl);
@media (max-width: ${({ theme }) => theme.device.sm}) {
margin-top: var(--sizing-lg);
}
`;
const InnerWrapper = styled.div`
width: var(--post-width);
margin: 0 auto;
padding-bottom: var(--sizing-lg);
@media (max-width: ${({ theme }) => theme.device.sm}) {
width: 87.5%;
}
`;
const CommentWrap = styled.section`
width: 100%;
padding: 0 var(--padding-sm);
margin: 0 auto;
margin-bottom: var(--sizing-xl);
@media (max-width: ${({ theme }) => theme.device.sm}) {
width: auto;
}
`;
export const query = graphql`
query ($slug: String!) {
markdownRemark(fields: { slug: { eq: $slug } }) {
html
frontmatter {
title
desc
client
thumbnail {
childImageSharp {
fluid(quality: 100, sizes: "maxWidth: 3840") {
...GatsbyImageSharpFluid
}
fixed(quality: 100) {
src
}
}
}
date(formatString: "YYYY")
category
}
}
}
`;
export default BlogPost;
|
/*global define*/
define({
"_widgetLabel": "Nakładka siatki",
"description": "Widżet niestandardowy Web AppBuilder służący do wyświetlania nakładki siatki współrzędnych."
});
|
import React, { PureComponent } from 'react'
import { Provider } from 'react-redux';
import { persistStore } from 'redux-persist';
import { AsyncStorage } from 'react-native';
import immutableTransform from 'redux-persist-transform-immutable';
import createStore from './redux/store';
import rootSaga from './redux/saga';
import App from './App';
import { View } from 'react-native';
// require('moment').locale('zh-cn');
// create store
const { store, run } = createStore();
// go saga
run(rootSaga);
// data persist
persistStore(store, {
whitelist: ['userState'],
storage: AsyncStorage,
transforms: [immutableTransform()],
keyPrefix: 'cnode'
});
export default class extends PureComponent {
render() {
return (
<Provider store={store}>
<App />
</Provider>
)
}
};
|
#!/usr/bin/env node
'use strict';
const express = require('express');
const router = express.Router();
/* GET users listing. */
router.get('/', (req, res, next) => {
res.send('User endpoint under construction.');
});
module.exports = router;
|
// @flow
import cx from 'classnames';
import React from 'react';
type Props = {
className: ?string,
};
const Bars = (props: Props) => (
<g
{...props}
className={cx('bars', props.className)}
/>
);
export default Bars;
|
import React from 'react'
import { Link } from 'gatsby'
const link = (props) =>{
let Listed = props.arrList.map((e) =>{
var newUrl = ((e).replace(/[ /]/g, "-").trim().toLowerCase());
let filterUrl = (newUrl === 'home') ? '/' : newUrl;
return (
<li>
<Link
to={filterUrl}>
{e}
</Link>
</li>
)
})
return (
<>
{Listed}
{/* <li><Link to="/">Home</Link></li>
<li><Link to="/about-the-author">About the Author</Link></li>
<li><Link to="/books">book</Link></li>
<li><Link to="/contact">Contact</Link></li> */}
</>
)
}
export default link;
|
import React, { PropTypes } from 'react';
import styles from './UserHomePage.less';
import withStyles from '../../decorators/withStyles';
import withAuthentication from '../../decorators/withAuthentication';
import { Link } from 'react-router';
import UserMenu from '../UserMenu';
// import Link from '../../utils/Link';
// import AppActions from '../../actions/AppActions';
// import AuthService from '../../auth/AuthService';
@withAuthentication
@withStyles(styles)
class UserHomePage extends React.Component {
static contextTypes = {
onSetTitle: PropTypes.func.isRequired,
onPageNotFound: PropTypes.func.isRequired
};
render() {
console.log('UserHomePage.render()! user:', this.props.user);
let title = this.props.user.name;
this.context.onSetTitle(title);
return (
<div className="userhome">
<UserMenu />
<div className="userhome-container">
<Link to="neighbourhood">Go to your neighbourhood</Link>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean consequat
tortor fermentum mi fermentum dignissim. Nullam vel ipsum ut ligula elementum
lobortis. Maecenas aliquam, massa laoreet lacinia pretium, nisi urna venenatis
tortor, nec imperdiet tellus libero efficitur metus. Fusce semper posuere
ligula, et facilisis metus bibendum interdum. Mauris at mauris sit amet sem
pharetra commodo a eu leo. Nam at est non risus cursus maximus. Nam feugiat
augue libero, id consectetur tortor bibendum non. Quisque nec fringilla lorem.
Nullam efficitur vulputate mauris, nec maximus leo dignissim id.</p>
</div>
</div>
);
}
}
export default UserHomePage;
|
/**
* Created by admin on 2018/11/1.
*/
/*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,p,d,h=w.ajaxSetup({},n),g=h.context||h,y=h.context&&(g.nodeType||g.jquery)?w(g):w.event,v=w.Deferred(),m=w.Callbacks("once memory"),x=h.statusCode||{},b={},T={},C="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this},overrideMimeType:function(e){return null==c&&(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this},abort:function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}};if(v.promise(E),h.url=((t||h.url||Ct.href)+"").replace(Rt,Ct.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(M)||[""],null==h.crossDomain){l=r.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Bt.protocol+"//"+Bt.host!=l.protocol+"//"+l.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=w.param(h.data,h.traditional)),_t(It,h,n,E),c)return E;(f=w.event&&h.global)&&0==w.active++&&w.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Mt.test(h.type),o=h.url.replace(Lt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(qt,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(kt.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ht,"$1"),d=(kt.test(o)?"&":"?")+"_="+Et+++d),h.url=o+d),h.ifModified&&(w.lastModified[o]&&E.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&E.setRequestHeader("If-None-Match",w.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&E.setRequestHeader("Content-Type",h.contentType),E.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+$t+"; q=0.01":""):h.accepts["*"]);for(p in h.headers)E.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(g,E,h)||c))return E.abort();if(C="abort",m.add(h.complete),E.done(h.success),E.fail(h.error),i=_t(Wt,h,n,E)){if(E.readyState=1,f&&y.trigger("ajaxSend",[E,h]),c)return E;h.async&&h.timeout>0&&(u=e.setTimeout(function(){E.abort("timeout")},h.timeout));try{c=!1,i.send(b,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(t,n,r,s){var l,p,d,b,T,C=n;c||(c=!0,u&&e.clearTimeout(u),i=void 0,a=s||"",E.readyState=t>0?4:0,l=t>=200&&t<300||304===t,r&&(b=Xt(h,E,r)),b=Ut(h,b,E,l),l?(h.ifModified&&((T=E.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=T),(T=E.getResponseHeader("etag"))&&(w.etag[o]=T)),204===t||"HEAD"===h.type?C="nocontent":304===t?C="notmodified":(C=b.state,p=b.data,l=!(d=b.error))):(d=C,!t&&C||(C="error",t<0&&(t=0))),E.status=t,E.statusText=(n||C)+"",l?v.resolveWith(g,[p,C,E]):v.rejectWith(g,[E,C,d]),E.statusCode(x),x=void 0,f&&y.trigger(l?"ajaxSuccess":"ajaxError",[E,h,l?p:d]),m.fireWith(g,[E,C]),f&&(y.trigger("ajaxComplete",[E,h]),--w.active||w.event.trigger("ajaxStop")))}return E},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],function(e,t){w[t]=function(e,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}}),w._evalUrl=function(e){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(e){}};var Vt={0:200,1223:204},Gt=w.ajaxSettings.xhr();h.cors=!!Gt&&"withCredentials"in Gt,h.ajax=Gt=!!Gt,w.ajaxTransport(function(t){var n,r;if(h.cors||Gt&&!t.crossDomain)return{send:function(i,o){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)s.setRequestHeader(a,i[a]);n=function(e){return function(){n&&(n=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Vt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=n(),r=s.onerror=s.ontimeout=n("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{s.send(t.hasContent&&t.data||null)}catch(e){if(n)throw e}},abort:function(){n&&n()}}}),w.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),w.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=w("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),r.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Yt=[],Qt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Yt.pop()||w.expando+"_"+Et++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=!1!==t.jsonp&&(Qt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=g(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(Qt,"$1"+i):!1!==t.jsonp&&(t.url+=(kt.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||w.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?w(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,Yt.push(i)),a&&g(o)&&o(a[0]),a=o=void 0}),"script"}),h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=A.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=xe([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=vt(e.slice(s)),e=e.slice(0,s)),g(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.expr.pseudos.animated=function(e){return w.grep(w.timers,function(t){return e===t.elem}).length},w.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=w.css(e,"position"),f=w(e),p={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=w.css(e,"top"),u=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),g(t)&&(t=t.call(e,n,w.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+i),"using"in t?t.using.call(e,p):f.css(p)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||be})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return z(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=_e(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),We.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return z(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,s):w.style(t,n,i,s)},t,a?i:void 0,a)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=N,w.isFunction=g,w.isWindow=y,w.camelCase=G,w.type=x,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var Jt=e.jQuery,Kt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=Kt),t&&e.jQuery===w&&(e.jQuery=Jt),w},t||(e.jQuery=e.$=w),w});
|
import React from 'react';
import createSvg from './utils/createSvg';
export default createSvg(<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 14.5v-9l6 4.5-6 4.5z" />, 'PlayCircleFilled', '0 0 24 24');
|
import MockRedis from '../../src';
describe('setex', () => {
it('should set value and expire', () => {
const redis = new MockRedis();
return redis
.setex('foo', 1, 'bar')
.then((status) => expect(status).toBe('OK'))
.then(() => {
expect(redis.data.get('foo')).toBe('bar');
expect(redis.expires.has('foo')).toBe(true);
});
});
});
|
import _ from 'lodash';
import moment from 'moment';
import VislibVisualizationsPointSeriesProvider from './_point_series';
import getColor from 'ui/vislib/components/color/heatmap_color';
export default function HeatmapChartFactory(Private) {
const PointSeries = Private(VislibVisualizationsPointSeriesProvider);
const defaults = {
color: undefined, // todo
fillColor: undefined // todo
};
/**
* Line Chart Visualization
*
* @class HeatmapChart
* @constructor
* @extends Chart
* @param handler {Object} Reference to the Handler Class Constructor
* @param el {HTMLElement} HTML element to which the chart will be appended
* @param chartData {Object} Elasticsearch query results for this specific chart
*/
class HeatmapChart extends PointSeries {
constructor(handler, chartEl, chartData, seriesConfigArgs) {
super(handler, chartEl, chartData, seriesConfigArgs);
this.seriesConfig = _.defaults(seriesConfigArgs || {}, defaults);
this.handler.visConfig.set('legend', {
labels: this.getHeatmapLabels(this.handler.visConfig),
colors: this.getHeatmapColors(this.handler.visConfig)
});
const colors = this.handler.visConfig.get('legend.colors', null);
if (colors) {
this.handler.vis.uiState.setSilent('vis.defaultColors', null);
this.handler.vis.uiState.setSilent('vis.defaultColors', colors);
}
}
getHeatmapLabels(cfg) {
const percentageMode = cfg.get('percentageMode');
const colorsNumber = cfg.get('colorsNumber');
const colorsRange = cfg.get('colorsRange');
const zAxisConfig = this.getValueAxis().axisConfig;
const zAxisFormatter = zAxisConfig.get('labels.axisFormatter');
const zScale = this.getValueAxis().getScale();
const [min, max] = zScale.domain();
const labels = [];
if (cfg.get('setColorRange')) {
colorsRange.forEach(range => {
const from = isFinite(range.from) ? zAxisFormatter(range.from) : range.from;
const to = isFinite(range.to) ? zAxisFormatter(range.to) : range.to;
labels.push(`${from} - ${to}`);
});
} else {
if (max === min) {
return [ min.toString() ];
}
for (let i = 0; i < colorsNumber; i++) {
let label;
let val = i / colorsNumber;
let nextVal = (i + 1) / colorsNumber;
if (percentageMode) {
val = Math.ceil(val * 100);
nextVal = Math.ceil(nextVal * 100);
label = `${val}% - ${nextVal}%`;
} else {
val = val * (max - min) + min;
nextVal = nextVal * (max - min) + min;
if (max > 1) {
val = Math.ceil(val);
nextVal = Math.ceil(nextVal);
}
if (isFinite(val)) val = zAxisFormatter(val);
if (isFinite(nextVal)) nextVal = zAxisFormatter(nextVal);
label = `${val} - ${nextVal}`;
}
labels.push(label);
}
}
return labels;
}
getHeatmapColors(cfg) {
const colorsNumber = cfg.get('colorsNumber');
const invertColors = cfg.get('invertColors');
const colorSchema = cfg.get('colorSchema');
const labels = this.getHeatmapLabels(cfg);
const colors = {};
for (const i in labels) {
if (labels[i]) {
const val = invertColors ? 1 - i / colorsNumber : i / colorsNumber;
colors[labels[i]] = getColor(val, colorSchema);
}
}
return colors;
}
addSquares(svg, data) {
const xScale = this.getCategoryAxis().getScale();
const yScale = this.handler.valueAxes[1].getScale();
const zScale = this.getValueAxis().getScale();
const tooltip = this.baseChart.tooltip;
const isTooltip = this.handler.visConfig.get('tooltip.show');
const isHorizontal = this.getCategoryAxis().axisConfig.isHorizontal();
const colorsNumber = this.handler.visConfig.get('colorsNumber');
const setColorRange = this.handler.visConfig.get('setColorRange');
const colorsRange = this.handler.visConfig.get('colorsRange');
const color = this.handler.data.getColorFunc();
const labels = this.handler.visConfig.get('legend.labels');
const zAxisConfig = this.getValueAxis().axisConfig;
const zAxisFormatter = zAxisConfig.get('labels.axisFormatter');
const showLabels = zAxisConfig.get('labels.show');
const layer = svg.append('g')
.attr('class', 'series');
const squares = layer
.selectAll('g.square')
.data(data.values);
squares
.exit()
.remove();
let barWidth;
if (this.getCategoryAxis().axisConfig.isTimeDomain()) {
const { min, interval } = this.handler.data.get('ordered');
const start = min;
const end = moment(min).add(interval).valueOf();
barWidth = xScale(end) - xScale(start);
if (!isHorizontal) barWidth *= -1;
}
function x(d) {
return xScale(d.x);
}
function y(d) {
return yScale(d.series);
}
const [min, max] = zScale.domain();
function getColorBucket(d) {
let val = 0;
if (setColorRange && colorsRange.length) {
const bucket = _.find(colorsRange, range => {
return range.from <= d.y && range.to > d.y;
});
return bucket ? colorsRange.indexOf(bucket) : -1;
} else {
if (isNaN(min) || isNaN(max)) {
val = colorsNumber - 1;
} else if (min === max) {
val = 0;
} else {
val = (d.y - min) / (max - min); /* get val from 0 - 1 */
val = Math.min(colorsNumber - 1, Math.floor(val * colorsNumber));
}
}
return !isNaN(val) ? val : -1;
}
function label(d) {
const colorBucket = getColorBucket(d);
if (colorBucket === -1) d.hide = true;
return labels[colorBucket];
}
function z(d) {
if (label(d) === '') return 'transparent';
return color(label(d));
}
const squareWidth = barWidth || xScale.rangeBand();
const squareHeight = yScale.rangeBand();
squares
.enter()
.append('g')
.attr('class', 'square');
squares.append('rect')
.attr('x', x)
.attr('width', squareWidth)
.attr('y', y)
.attr('height', squareHeight)
.attr('data-label', label)
.attr('fill', z)
.attr('style', 'cursor: pointer; stroke: black; stroke-width: 0.1px')
.style('display', d => {
return d.hide ? 'none' : 'initial';
});
// todo: verify that longest label is not longer than the barwidth
// or barwidth is not smaller than textheight (and vice versa)
//
if (showLabels) {
const rotate = zAxisConfig.get('labels.rotate');
const rotateRad = rotate * Math.PI / 180;
const cellPadding = 5;
const maxLength = Math.min(
Math.abs(squareWidth / Math.cos(rotateRad)),
Math.abs(squareHeight / Math.sin(rotateRad))
) - cellPadding;
const maxHeight = Math.min(
Math.abs(squareWidth / Math.sin(rotateRad)),
Math.abs(squareHeight / Math.cos(rotateRad))
) - cellPadding;
let hiddenLabels = false;
squares.append('text')
.text(d => zAxisFormatter(d.y))
.style('display', function (d) {
const textLength = this.getBBox().width;
const textHeight = this.getBBox().height;
const textTooLong = textLength > maxLength;
const textTooWide = textHeight > maxHeight;
if (!d.hide && (textTooLong || textTooWide)) {
hiddenLabels = true;
}
return d.hide || textTooLong || textTooWide ? 'none' : 'initial';
})
.style('dominant-baseline', 'central')
.style('text-anchor', 'middle')
.style('fill', zAxisConfig.get('labels.color'))
.attr('x', function (d) {
const center = x(d) + squareWidth / 2;
return center;
})
.attr('y', function (d) {
const center = y(d) + squareHeight / 2;
return center;
})
.attr('transform', function (d) {
const horizontalCenter = x(d) + squareWidth / 2;
const verticalCenter = y(d) + squareHeight / 2;
return `rotate(${rotate},${horizontalCenter},${verticalCenter})`;
});
if (hiddenLabels) {
this.baseChart.handler.alerts.show('Some labels were hidden due to size constrains');
}
}
if (isTooltip) {
squares.call(tooltip.render());
}
return squares.selectAll('rect');
}
/**
* Renders d3 visualization
*
* @method draw
* @returns {Function} Creates the line chart
*/
draw() {
const self = this;
return function (selection) {
selection.each(function () {
const svg = self.chartEl.append('g');
svg.data([self.chartData]);
const squares = self.addSquares(svg, self.chartData);
self.addCircleEvents(squares);
self.events.emit('rendered', {
chart: self.chartData
});
return svg;
});
};
}
}
return HeatmapChart;
}
|
/*!
Autosize v1.18.9 - 2014-05-27
Automatically adjust textarea height based on user input.
(c) 2014 Jack Moore - http://www.jacklmoore.com/autosize
license: http://www.opensource.org/licenses/mit-license.php
*/
(function(e){var t,o={className:"autosizejs",id:"autosizejs",append:"\n",callback:!1,resizeDelay:10,placeholder:!0},i='<textarea tabindex="-1" style="position:absolute; top:-999px; left:0; right:auto; bottom:auto; border:0; padding: 0; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden; transition:none; -webkit-transition:none; -moz-transition:none;"/>',n=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],s=e(i).data("autosize",!0)[0];s.style.lineHeight="99px","99px"===e(s).css("lineHeight")&&n.push("lineHeight"),s.style.lineHeight="",e.fn.autosize=function(i){return this.length?(i=e.extend({},o,i||{}),s.parentNode!==document.body&&e(document.body).append(s),this.each(function(){function o(){var t,o=window.getComputedStyle?window.getComputedStyle(u,null):!1;o?(t=u.getBoundingClientRect().width,(0===t||"number"!=typeof t)&&(t=parseInt(o.width,10)),e.each(["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],function(e,i){t-=parseInt(o[i],10)})):t=p.width(),s.style.width=Math.max(t,0)+"px"}function a(){var a={};if(t=u,s.className=i.className,s.id=i.id,d=parseInt(p.css("maxHeight"),10),e.each(n,function(e,t){a[t]=p.css(t)}),e(s).css(a).attr("wrap",p.attr("wrap")),o(),window.chrome){var r=u.style.width;u.style.width="0px",u.offsetWidth,u.style.width=r}}function r(){var e,n;t!==u?a():o(),s.value=!u.value&&i.placeholder?(p.attr("placeholder")||"")+i.append:u.value+i.append,s.style.overflowY=u.style.overflowY,n=parseInt(u.style.height,10),s.scrollTop=0,s.scrollTop=9e4,e=s.scrollTop,d&&e>d?(u.style.overflowY="scroll",e=d):(u.style.overflowY="hidden",c>e&&(e=c)),e+=w,n!==e&&(u.style.height=e+"px",f&&i.callback.call(u,u))}function l(){clearTimeout(h),h=setTimeout(function(){var e=p.width();e!==g&&(g=e,r())},parseInt(i.resizeDelay,10))}var d,c,h,u=this,p=e(u),w=0,f=e.isFunction(i.callback),z={height:u.style.height,overflow:u.style.overflow,overflowY:u.style.overflowY,wordWrap:u.style.wordWrap,resize:u.style.resize},g=p.width(),y=p.css("resize");p.data("autosize")||(p.data("autosize",!0),("border-box"===p.css("box-sizing")||"border-box"===p.css("-moz-box-sizing")||"border-box"===p.css("-webkit-box-sizing"))&&(w=p.outerHeight()-p.height()),c=Math.max(parseInt(p.css("minHeight"),10)-w||0,p.height()),p.css({overflow:"hidden",overflowY:"hidden",wordWrap:"break-word"}),"vertical"===y?p.css("resize","none"):"both"===y&&p.css("resize","horizontal"),"onpropertychange"in u?"oninput"in u?p.on("input.autosize keyup.autosize",r):p.on("propertychange.autosize",function(){"value"===event.propertyName&&r()}):p.on("input.autosize",r),i.resizeDelay!==!1&&e(window).on("resize.autosize",l),p.on("autosize.resize",r),p.on("autosize.resizeIncludeStyle",function(){t=null,r()}),p.on("autosize.destroy",function(){t=null,clearTimeout(h),e(window).off("resize",l),p.off("autosize").off(".autosize").css(z).removeData("autosize")}),r())})):this}})(window.jQuery||window.$);
|
'use strict';
/* ------------------------------------------------------------------------------------------------
CHALLENGE 1
Write a function named forLoopTwoToThe that, given an array of integers as input, iterates over the array and returns a new array. The returned array should contain the result of raising 2 to the power of the original input element.
You may choose to complete this challenge using a for loop, for...in syntax, or for...of syntax.
For example, twoToThe([1,2,3]) returns [2,4,8] because 2 ^ 1 = 2, 2 ^ 2 = 4, and 2 ^ 3 = 8.
------------------------------------------------------------------------------------------------ */
const forLoopTwoToThe = arr => {
const array = [];
for (let i = 0; i < arr.length; i++) {
let number = Math.pow(2, arr[i]);
array.push(number);
}
return array;
};
/* ------------------------------------------------------------------------------------------------
CHALLENGE 2
Write a function named forEachTwoToThe that produces the same output as your forLoopTwoToThe function from challenge 1, but uses forEach instead of a for loop.
------------------------------------------------------------------------------------------------ */
const forEachTwoToThe = arr => {
const array = [];
arr.forEach(i => {
let number = Math.pow(2, i);
array.push(number);
});
return array;
};
/* ------------------------------------------------------------------------------------------------
CHALLENGE 3
Write a function named mapTwoToThe that produces the same output as your forLoopTwoToThe function from challenge 1 and your forEachTwoToThe function from challenge 2, but uses map instead of a for loop or forEach.
------------------------------------------------------------------------------------------------ */
const mapTwoToThe = arr => {
return arr.map(item => Math.pow(2, item));
};
/* ------------------------------------------------------------------------------------------------
CHALLENGE 4
Write a function named charCode that, given an array of letters as an input, uses map to return a new array where each element is the result of the `charCodeAt` method on the original array element.
Read the MDN documentation on String.charCodeAt() if necessary.
For example: charCode(['h','i']) returns [104, 105].
------------------------------------------------------------------------------------------------ */
//return arr.map(num => num.charCodeAt());
const charCode = arr => {
let array = arr.map(item => {
return item.charCodeAt();
});
return array;
};
/* ------------------------------------------------------------------------------------------------
CHALLENGE 5
Write a function that, given an array of numbers as input, uses map to return a new array where each element is either the string "even" or the string "odd", based on each value.
If any element in the array is not a number, the resulting array should have the string "N/A" in its place.
For example: evenOdd([1,2,3]) returns ['odd','even','odd'].
------------------------------------------------------------------------------------------------ */
// if(typeof num !== 'number'){
// return 'N/A';
// }
// return num % 2 === 0? 'even' : 'odd';
// }
const evenOdd = arr => {
let result = arr.map(item => {
if (item % 2 === 0) return 'even';
if (item % 2 === 1) return 'odd';
return 'N/A';
});
return result;
};
/* ------------------------------------------------------------------------------------------------
CHALLENGE 6
Use the snorlaxAbilities data, below, for this challenge.
Write a function named extractAbilities that, given the array of abilities, uses map to create an array containing only the ability name.
Note: Because this function is expecting the array of abilities, it will be invoked as:
extractAbilities(snorlaxAbilities.abilities)
------------------------------------------------------------------------------------------------ */
const snorlaxAbilities = {
abilities: [
{
slot: 3,
is_hidden: true,
ability: {
url: 'https://pokeapi.co/api/v2/ability/82/',
name: 'gluttony'
}
},
{
slot: 2,
is_hidden: false,
ability: {
url: 'https://pokeapi.co/api/v2/ability/56/',
name: 'cute charm'
}
},
{
slot: 1,
is_hidden: false,
ability: {
url: 'https://pokeapi.co/api/v2/ability/17/',
name: 'immunity'
}
}
],
name: 'snorlax',
weight: 4600
};
const extractAbilities = arr => {
return arr.map(item => item.ability.name);
};
/* ------------------------------------------------------------------------------------------------
CHALLENGE 7
Use the snorlaxStats data, below, for this challenge.
Write a function named extractStats that, given an array of stats, uses map to return an array of objects containing the stat name and the total.
The total should be the sum of the effort and the baseStat.
Here is an example of a single array element: { name: 'speed', total: 35 }
------------------------------------------------------------------------------------------------ */
const snorlaxStats = {
stats: [
{
stat: {
url: 'https://pokeapi.co/api/v2/stat/6/',
name: 'speed'
},
effort: 5,
baseStat: 30
},
{
stat: {
url: 'https://pokeapi.co/api/v2/stat/5/',
name: 'special-defense'
},
effort: 2,
baseStat: 110
},
{
stat: {
url: 'https://pokeapi.co/api/v2/stat/4/',
name: 'special-attack'
},
effort: 9,
baseStat: 65
}
],
name: 'snorlax',
weight: 4600
};
const extractStats = arr => {
let totals = arr.map(power => {
return { name: power.stat.name, total: power.effort + power.baseStat };
});
return totals;
};
/* ------------------------------------------------------------------------------------------------
TESTS
All the code below will verify that your functions are working to solve the challenges.
DO NOT CHANGE any of the below code.
Run your tests from the console: jest challenges-07.test.js
------------------------------------------------------------------------------------------------ */
describe('Testing challenge 1', () => {
test('It should return two raised to the power of the integer', () => {
expect(forLoopTwoToThe([0, 4, 5])).toStrictEqual([1, 16, 32]);
expect(forLoopTwoToThe([0, 4, 5]).length).toStrictEqual(3);
});
test('It should return decimals if the integer is negative', () => {
expect(forLoopTwoToThe([-1, -2, -3])).toStrictEqual([0.5, 0.25, 0.125]);
});
});
describe('Testing challenge 2', () => {
test('It should return two raised to the power of the integer', () => {
expect(forEachTwoToThe([0, 4, 5])).toStrictEqual([1, 16, 32]);
expect(forEachTwoToThe([0, 4, 5]).length).toStrictEqual(3);
});
test('It should return decimals if the integer is negative', () => {
expect(forEachTwoToThe([-1, -2, -3])).toStrictEqual([0.5, 0.25, 0.125]);
});
});
describe('Testing challenge 3', () => {
test('It should return two raised to the power of the integer', () => {
expect(mapTwoToThe([0, 4, 5])).toStrictEqual([1, 16, 32]);
expect(mapTwoToThe([0, 4, 5]).length).toStrictEqual(3);
});
test('It should return decimals if the integer is negative', () => {
expect(mapTwoToThe([-1, -2, -3])).toStrictEqual([0.5, 0.25, 0.125]);
});
});
describe('Testing challenge 4', () => {
test('It should return an array containing the character code for each letter', () => {
expect(charCode(['C', 'o', 'd', 'e', '3', '0', '1'])).toStrictEqual([
67,
111,
100,
101,
51,
48,
49
]);
expect(charCode(['C', 'o', 'd', 'e', '3', '0', '1']).length).toStrictEqual(
7
);
});
});
describe('Testing challenge 5', () => {
test('It should return an array containing the keys from an object', () => {
expect(evenOdd([5, 8, 2, 6, 9, 13, 542, 541])).toStrictEqual([
'odd',
'even',
'even',
'even',
'odd',
'odd',
'even',
'odd'
]);
expect(evenOdd([5, 8, 2, 6, 9, 13, 542, 541]).length).toStrictEqual(8);
});
test('It should work with all odd numbers', () => {
expect(evenOdd([1, 3, 5, 7, 9])).toStrictEqual([
'odd',
'odd',
'odd',
'odd',
'odd'
]);
expect(evenOdd([1, 3, 5, 7, 9]).length).toStrictEqual(5);
});
test('It should work with all even numbers', () => {
expect(evenOdd([2, 4, 6, 8, 10])).toStrictEqual([
'even',
'even',
'even',
'even',
'even'
]);
expect(evenOdd([2, 4, 6, 8, 10]).length).toStrictEqual(5);
});
test('It should return the string "N/A" if a non-number is included in the array', () => {
expect(evenOdd([5, 8, 2, 'hi'])).toStrictEqual([
'odd',
'even',
'even',
'N/A'
]);
expect(evenOdd([5, 8, 2, 'hi']).length).toStrictEqual(4);
});
});
describe('Testing challenge 6', () => {
test('It should return an array containing only the ability names', () => {
expect(extractAbilities(snorlaxAbilities.abilities)).toStrictEqual([
'gluttony',
'cute charm',
'immunity'
]);
expect(extractAbilities(snorlaxAbilities.abilities).length).toStrictEqual(
3
);
});
});
describe('Testing challenge 7', () => {
test('It should return an array containing objects with name and total values', () => {
expect(extractStats(snorlaxStats.stats)).toStrictEqual([
{ name: 'speed', total: 35 },
{ name: 'special-defense', total: 112 },
{ name: 'special-attack', total: 74 }
]);
expect(extractStats(snorlaxStats.stats).length).toStrictEqual(3);
});
});
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("royplayer")):"function"==typeof define&&define.amd?define(["royplayer"],e):"object"==typeof exports?exports["royplayer-dash"]=e(require("royplayer")):t["royplayer-dash"]=e(t.royplayer)}(window,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=83)}([function(t,e,n){"use strict";(function(){t.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o,s,a,u,c,h,l,f,p,d,y,m,g,v,b={}.hasOwnProperty;v=n(3),g=v.isObject,m=v.isFunction,y=v.isEmpty,d=v.getValue,c=null,i=null,o=null,s=null,a=null,f=null,p=null,l=null,u=null,r=null,h=null,e=null,t.exports=function(){function t(t){this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=n(30),i=n(32),o=n(33),s=n(34),a=n(35),f=n(40),p=n(41),l=n(42),u=n(72),r=n(0),h=n(139),n(31),e=n(140))}return Object.defineProperty(t.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new h(this.children)),this.childNodeList}}),Object.defineProperty(t.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){var t;return t=this.parent.children.indexOf(this),this.parent.children[t-1]||null}}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){var t;return t=this.parent.children.indexOf(this),this.parent.children[t+1]||null}}),Object.defineProperty(t.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(t.prototype,"textContent",{get:function(){var t,e,n,i,o;if(this.nodeType===r.Element||this.nodeType===r.DocumentFragment){for(o="",e=0,n=(i=this.children).length;e<n;e++)(t=i[e]).textContent&&(o+=t.textContent);return o}return null},set:function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),t.prototype.setParent=function(t){var e,n,r,i,o;for(this.parent=t,t&&(this.options=t.options,this.stringify=t.stringify),o=[],n=0,r=(i=this.children).length;n<r;n++)e=i[n],o.push(e.setParent(this));return o},t.prototype.element=function(t,e,n){var r,i,o,s,a,u,c,h,l,f,p;if(u=null,null===e&&null==n&&(e=(l=[{},null])[0],n=l[1]),null==e&&(e={}),e=d(e),g(e)||(n=(f=[e,n])[0],e=f[1]),null!=t&&(t=d(t)),Array.isArray(t))for(o=0,c=t.length;o<c;o++)i=t[o],u=this.element(i);else if(m(t))u=this.element(t.apply());else if(g(t)){for(a in t)if(b.call(t,a))if(p=t[a],m(p)&&(p=p.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===a.indexOf(this.stringify.convertAttKey))u=this.attribute(a.substr(this.stringify.convertAttKey.length),p);else if(!this.options.separateArrayItems&&Array.isArray(p)&&y(p))u=this.dummy();else if(g(p)&&y(p))u=this.element(a);else if(this.options.keepNullNodes||null!=p)if(!this.options.separateArrayItems&&Array.isArray(p))for(s=0,h=p.length;s<h;s++)i=p[s],(r={})[a]=i,u=this.element(r);else g(p)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===a.indexOf(this.stringify.convertTextKey)?u=this.element(p):(u=this.element(a)).element(p):u=this.element(a,p);else u=this.dummy()}else u=this.options.keepNullNodes||null!==n?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===t.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===t.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===t.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===t.indexOf(this.stringify.convertRawKey)?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===t.indexOf(this.stringify.convertPIKey)?this.instruction(t.substr(this.stringify.convertPIKey.length),n):this.node(t,e,n):this.dummy();if(null==u)throw new Error("Could not create any elements with: "+t+". "+this.debugInfo());return u},t.prototype.insertBefore=function(t,e,n){var r,i,o,s,a;if(null!=t?t.type:void 0)return s=e,(o=t).setParent(this),s?(i=children.indexOf(s),a=children.splice(i),children.push(o),Array.prototype.push.apply(children,a)):children.push(o),o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(t));return i=this.parent.children.indexOf(this),a=this.parent.children.splice(i),r=this.parent.element(t,e,n),Array.prototype.push.apply(this.parent.children,a),r},t.prototype.insertAfter=function(t,e,n){var r,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(t));return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),r=this.parent.element(t,e,n),Array.prototype.push.apply(this.parent.children,o),r},t.prototype.remove=function(){var t;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return t=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[t,t-t+1].concat([])),this.parent},t.prototype.node=function(t,e,n){var r,i;return null!=t&&(t=d(t)),e||(e={}),e=d(e),g(e)||(n=(i=[e,n])[0],e=i[1]),r=new c(this,t,e),null!=n&&r.text(n),this.children.push(r),r},t.prototype.text=function(t){var e;return g(t)&&this.element(t),e=new p(this,t),this.children.push(e),this},t.prototype.cdata=function(t){var e;return e=new i(this,t),this.children.push(e),this},t.prototype.comment=function(t){var e;return e=new o(this,t),this.children.push(e),this},t.prototype.commentBefore=function(t){var e,n;return e=this.parent.children.indexOf(this),n=this.parent.children.splice(e),this.parent.comment(t),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.commentAfter=function(t){var e,n;return e=this.parent.children.indexOf(this),n=this.parent.children.splice(e+1),this.parent.comment(t),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.raw=function(t){var e;return e=new f(this,t),this.children.push(e),this},t.prototype.dummy=function(){return new u(this)},t.prototype.instruction=function(t,e){var n,r,i,o,s;if(null!=t&&(t=d(t)),null!=e&&(e=d(e)),Array.isArray(t))for(o=0,s=t.length;o<s;o++)n=t[o],this.instruction(n);else if(g(t))for(n in t)b.call(t,n)&&(r=t[n],this.instruction(n,r));else m(e)&&(e=e.apply()),i=new l(this,t,e),this.children.push(i);return this},t.prototype.instructionBefore=function(t,e){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n),this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.instructionAfter=function(t,e){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1),this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.declaration=function(t,e,n){var i,o;return i=this.document(),o=new s(i,t,e,n),0===i.children.length?i.children.unshift(o):i.children[0].type===r.Declaration?i.children[0]=o:i.children.unshift(o),i.root()||i},t.prototype.dtd=function(t,e){var n,i,o,s,u,c,h,l,f;for(n=this.document(),i=new a(n,t,e),o=s=0,c=(l=n.children).length;s<c;o=++s)if(l[o].type===r.DocType)return n.children[o]=i,i;for(o=u=0,h=(f=n.children).length;u<h;o=++u)if(f[o].isRoot)return n.children.splice(o,0,i),i;return n.children.push(i),i},t.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},t.prototype.root=function(){var t;for(t=this;t;){if(t.type===r.Document)return t.rootObject;if(t.isRoot)return t;t=t.parent}},t.prototype.document=function(){var t;for(t=this;t;){if(t.type===r.Document)return t;t=t.parent}},t.prototype.end=function(t){return this.document().end(t)},t.prototype.prev=function(){var t;if((t=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[t-1]},t.prototype.next=function(){var t;if(-1===(t=this.parent.children.indexOf(this))||t===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[t+1]},t.prototype.importDocument=function(t){var e;return(e=t.root().clone()).parent=this,e.isRoot=!1,this.children.push(e),this},t.prototype.debugInfo=function(t){var e,n;return null!=(t=t||this.name)||(null!=(e=this.parent)?e.name:void 0)?null==t?"parent: <"+this.parent.name+">":(null!=(n=this.parent)?n.name:void 0)?"node: <"+t+">, parent: <"+this.parent.name+">":"node: <"+t+">":""},t.prototype.ele=function(t,e,n){return this.element(t,e,n)},t.prototype.nod=function(t,e,n){return this.node(t,e,n)},t.prototype.txt=function(t){return this.text(t)},t.prototype.dat=function(t){return this.cdata(t)},t.prototype.com=function(t){return this.comment(t)},t.prototype.ins=function(t,e){return this.instruction(t,e)},t.prototype.doc=function(){return this.document()},t.prototype.dec=function(t,e,n){return this.declaration(t,e,n)},t.prototype.e=function(t,e,n){return this.element(t,e,n)},t.prototype.n=function(t,e,n){return this.node(t,e,n)},t.prototype.t=function(t){return this.text(t)},t.prototype.d=function(t){return this.cdata(t)},t.prototype.c=function(t){return this.comment(t)},t.prototype.r=function(t){return this.raw(t)},t.prototype.i=function(t,e){return this.instruction(t,e)},t.prototype.u=function(){return this.up()},t.prototype.importXMLBuilder=function(t){return this.importDocument(t)},t.prototype.replaceChild=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.removeChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendChild=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.hasChildNodes=function(){return 0!==this.children.length},t.prototype.cloneNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isSupported=function(t,e){return!0},t.prototype.hasAttributes=function(){return 0!==this.attribs.length},t.prototype.compareDocumentPosition=function(t){var n;return this,this===t?0:this.document()!==t.document()?(n=e.Disconnected|e.ImplementationSpecific,Math.random()<.5?n|=e.Preceding:n|=e.Following,n):this.isAncestor(t)?e.Contains|e.Preceding:this.isDescendant(t)?e.Contains|e.Following:this.isPreceding(t)?e.Preceding:e.Following},t.prototype.isSameNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.lookupPrefix=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isDefaultNamespace=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.lookupNamespaceURI=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(t){var e,n,r;if(t.nodeType!==this.nodeType)return!1;if(t.children.length!==this.children.length)return!1;for(e=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;e=0<=r?++n:--n)if(!this.children[e].isEqualNode(t.children[e]))return!1;return!0},t.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.setUserData=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.getUserData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.contains=function(t){return!!t&&(t===this||this.isDescendant(t))},t.prototype.isDescendant=function(t){var e,n,r,i;for(n=0,r=(i=this.children).length;n<r;n++){if(t===(e=i[n]))return!0;if(e.isDescendant(t))return!0}return!1},t.prototype.isAncestor=function(t){return t.isDescendant(this)},t.prototype.isPreceding=function(t){var e,n;return e=this.treePosition(t),n=this.treePosition(this),-1!==e&&-1!==n&&e<n},t.prototype.isFollowing=function(t){var e,n;return e=this.treePosition(t),n=this.treePosition(this),-1!==e&&-1!==n&&e>n},t.prototype.treePosition=function(t){var e,n;return n=0,e=!1,this.foreachTreeNode(this.document(),(function(r){if(n++,!e&&r===t)return e=!0})),e?n:-1},t.prototype.foreachTreeNode=function(t,e){var n,r,i,o,s;for(t||(t=this.document()),r=0,i=(o=t.children).length;r<i;r++){if(s=e(n=o[r]))return s;if(s=this.foreachTreeNode(n,e))return s}},t}()}).call(void 0)},function(t,e,n){"use strict";var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){var e,n,i,o,s,a,u,c=[].slice,h={}.hasOwnProperty;e=function(){var t,e,n,r,i,o;if(o=arguments[0],i=2<=arguments.length?c.call(arguments,1):[],s(Object.assign))Object.assign.apply(null,arguments);else for(t=0,n=i.length;t<n;t++)if(null!=(r=i[t]))for(e in r)h.call(r,e)&&(o[e]=r[e]);return o},s=function(t){return!!t&&"[object Function]"===Object.prototype.toString.call(t)},a=function(t){var e;return!!t&&("function"===(e=void 0===t?"undefined":r(t))||"object"===e)},i=function(t){return s(Array.isArray)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},o=function(t){var e;if(i(t))return!t.length;for(e in t)if(h.call(t,e))return!1;return!0},u=function(t){var e,n;return a(t)&&(n=Object.getPrototypeOf(t))&&(e=n.constructor)&&"function"==typeof e&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)},n=function(t){return s(t.valueOf)?t.valueOf():t},t.exports.assign=e,t.exports.isFunction=s,t.exports.isObject=a,t.exports.isArray=i,t.exports.isEmpty=o,t.exports.isPlainObject=u,t.exports.getValue=n}).call(void 0)},function(t,e,n){"use strict";var r=n(50)("wks"),i=n(51),o=n(2).Symbol,s="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=s&&o[t]||(s?o:i)("Symbol."+t))}).store=r},function(t,e,n){"use strict";var r=n(20),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=l;var o=Object.create(n(12));o.inherits=n(7);var s=n(76),a=n(46);o.inherits(l,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var h=u[c];l.prototype[h]||(l.prototype[h]=a.prototype[h])}function l(t){if(!(this instanceof l))return new l(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){"use strict";var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":i(window))&&(r=window)}t.exports=r},function(t,e,n){"use strict";"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){"use strict";var r=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=r)},function(t,e,n){"use strict";var r=n(10);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return"object"===(void 0===t?"undefined":r(t))?null!==t:"function"==typeof t}},function(t,e,n){"use strict";var r,i,o,s,a,u,c,h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=n(109),f=n(126),p=Function.prototype.apply,d=Function.prototype.call,y=Object.create,m=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0};i=function(t,e){var n,i;return f(e),i=this,r.call(this,t,n=function(){o.call(i,t,n),p.call(e,this,arguments)}),n.__eeOnceListener__=e,this},a={on:r=function(t,e){var n;return f(e),v.call(this,"__ee__")?n=this.__ee__:(n=b.value=y(null),m(this,"__ee__",b),b.value=null),n[t]?"object"===h(n[t])?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:i,off:o=function(t,e){var n,r,i,o;if(f(e),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"===(void 0===(r=n[t])?"undefined":h(r)))for(o=0;i=r[o];++o)i!==e&&i.__eeOnceListener__!==e||(2===r.length?n[t]=r[o?0:1]:r.splice(o,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:s=function(t){var e,n,r,i,o;if(v.call(this,"__ee__")&&(i=this.__ee__[t]))if("object"===(void 0===i?"undefined":h(i))){for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];for(i=i.slice(),e=0;r=i[e];++e)p.call(r,this,o)}else switch(arguments.length){case 1:d.call(i,this);break;case 2:d.call(i,this,arguments[1]);break;case 3:d.call(i,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),e=1;e<n;++e)o[e-1]=arguments[e];p.call(i,this,o)}}},u={on:l(r),once:l(i),off:l(o),emit:l(s)},c=g({},u),t.exports=e=function(t){return null==t?y(c):g(Object(t),u)},e.methods=a},function(t,e,n){"use strict";(function(t){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"===(void 0===t?"undefined":n(t))},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"===(void 0===t?"undefined":n(t))&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===(void 0===t?"undefined":n(t))||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(44).Buffer)},function(t,e,n){"use strict";var r=n(14);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){"use strict";t.exports=!n(54)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";(function(){var e,r={}.hasOwnProperty;e=n(1),t.exports=function(t){function e(t){e.__super__.constructor.call(this,t),this.value=""}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),Object.defineProperty(e.prototype,"data",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(e.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(e.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),e.prototype.clone=function(){return Object.create(this)},e.prototype.substringData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendData=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.insertData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.deleteData=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.replaceData=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(t){return!!e.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.data===this.data},e}(e)}).call(void 0)},function(t,e,n){"use strict";(function(){t.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},function(t,e,n){"use strict";var r,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o="object"===("undefined"==typeof Reflect?"undefined":i(Reflect))?Reflect:null,s=o&&"function"==typeof o.apply?o.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function u(){u.init.call(this)}t.exports=u,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function h(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+(void 0===t?"undefined":i(t)))}function l(t){return void 0===t._maxListeners?u.defaultMaxListeners:t._maxListeners}function f(t,e,n,r){var i,o,s,a;if(h(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=l(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=p.bind(r);return i.listener=n,r.wrapFn=i,i}function y(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):g(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");c=t}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},u.prototype.getMaxListeners=function(){return l(this)},u.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)s(u,this,e);else{var c=u.length,h=g(u,c);for(n=0;n<c;++n)s(h[n],this,e)}return!0},u.prototype.addListener=function(t,e){return f(this,t,e,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(t,e){return f(this,t,e,!0)},u.prototype.once=function(t,e){return h(e),this.on(t,d(this,t,e)),this},u.prototype.prependOnceListener=function(t,e){return h(e),this.prependListener(t,d(this,t,e)),this},u.prototype.removeListener=function(t,e){var n,r,i,o,s;if(h(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},u.prototype.listeners=function(t){return y(this,t,!0)},u.prototype.rawListeners=function(t){return y(this,t,!1)},u.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},u.prototype.listenerCount=m,u.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){"use strict";var r,i,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(t){r=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,h=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?h=c.concat(h):f=-1,h.length&&d())}function d(){if(!l){var t=u(p);l=!0;for(var e=h.length;e;){for(c=h,h=[];++f<e;)c&&c[f].run();f=-1,e=h.length}c=null,l=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];h.push(new y(t,e)),1!==h.length||l||u(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,n(19))},function(t,e,n){"use strict";var r=n(44),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,n){"use strict";var r=n(9),i=n(86),o=n(87),s=Object.defineProperty;e.f=n(15)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(120)();t.exports=function(t){return t!==r&&null!==t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(11),s=(r=o)&&r.__esModule?r:{default:r};var a=function(){function t(e,n,r){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(0,s.default)(this),this.url=e,this.on=!1,!t.queue.some((function(t){return t.url===e}))){var i=new XMLHttpRequest;i.target=this,i.responseType="arraybuffer",i.open("get",e),r&&(this.range=r,this.id=r.join("-"),i.setRequestHeader("Range","bytes="+r.join("-"))),i.onload=function(){200===i.status||206===i.status?n&&n instanceof Function&&n(i.response):404===i.status&&n&&n instanceof Function&&n("Not Found"),i.target.remove()},i.onerror=function(){i.target.remove()},i.onabort=function(){i.target.remove()},this.xhr=i,t.queue.push(this),this.update()}}return i(t,[{key:"cancel",value:function(){this.xhr.abort()}},{key:"remove",value:function(){var e=this;t.queue.filter((function(n,r){return n.url===e.url&&(t.queue.splice(r,1),!0)})),this.update()}},{key:"update",value:function(){var e=t.queue,n=e.filter((function(t){return t.on})),r=e.filter((function(t){return!t.on})),i=t.limit-n.length;r.forEach((function(t,e){e<i&&t.run()}))}},{key:"run",value:function(){1===this.xhr.readyState?(this.on=!0,this.xhr.send()):this.remove()}}],[{key:"clear",value:function(){t.queue.forEach((function(t){t.on&&t.cancel()})),t.queue.length=0}}]),t}();a.queue=[],a.limit=2,window.Task=a,e.default=a,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(28),s=(r=o)&&r.__esModule?r:{default:r};var a=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(e instanceof ArrayBuffer))throw new s.default("parse","",{line:9,handle:"[Stream] constructor",msg:"data is valid"});this.buffer=e,this.dataview=new DataView(e),this.dataview.position=0}return i(t,[{key:"skip",value:function(e){for(var n=Math.floor(e/4),r=e%4,i=0;i<n;i++)t.readByte(this.dataview,4);r>0&&t.readByte(this.dataview,r)}},{key:"readUint8",value:function(){return t.readByte(this.dataview,1)}},{key:"readUint16",value:function(){return t.readByte(this.dataview,2)}},{key:"readUint32",value:function(){return t.readByte(this.dataview,4)}},{key:"readUint64",value:function(){return t.readByte(this.dataview,8)}},{key:"readInt8",value:function(){return t.readByte(this.dataview,1,!0)}},{key:"readInt16",value:function(){return t.readByte(this.dataview,2,!0)}},{key:"readInt32",value:function(){return t.readByte(this.dataview,4,!0)}},{key:"position",set:function(t){this.dataview.position=t},get:function(){return this.dataview.position}}],[{key:"readByte",value:function(t,e,n){var r=void 0;switch(e){case 1:r=n?t.getInt8(t.position):t.getUint8(t.position);break;case 2:r=n?t.getInt16(t.position):t.getUint16(t.position);break;case 3:if(n)throw"not supported for readByte 3";r=t.getUint8(t.position)<<16,r|=t.getUint8(t.position+1)<<8,r|=t.getUint8(t.position+2);break;case 4:r=n?t.getInt32(t.position):t.getUint32(t.position);break;case 8:if(n)throw new s.default("parse","",{line:73,handle:"[Stream] readByte",msg:"not supported for readBody 8"});r=t.getUint32(t.position)<<32,r|=t.getUint32(t.position+4);break;default:r=""}return t.position+=e,r}}]),t}();e.default=a,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(24),o=(r=i)&&r.__esModule?r:{default:r},s=n(129);function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var c=function(t){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";a(this,e),r.version=s.version;var o=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return o.url=i,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(o.default.Errors);e.default=c,t.exports=e.default},function(t,e,n){"use strict";(function(){e.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o,s,a,u,c,h={}.hasOwnProperty;c=n(3),u=c.isObject,a=c.isFunction,s=c.getValue,o=n(1),e=n(0),r=n(71),i=n(31),t.exports=function(t){function n(t,r,i){var o,s,a,u;if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(r),this.type=e.Element,this.attribs={},this.schemaTypeInfo=null,null!=i&&this.attribute(i),t.type===e.Document&&(this.isRoot=!0,this.documentObject=t,t.rootObject=this,t.children))for(s=0,a=(u=t.children).length;s<a;s++)if((o=u[s]).type===e.DocType){o.name=this.name;break}}return function(t,e){for(var n in e)h.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(n.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(n.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new i(this.attribs)),this.attributeMap}}),n.prototype.clone=function(){var t,e,n,r;for(e in(n=Object.create(this)).isRoot&&(n.documentObject=null),n.attribs={},r=this.attribs)h.call(r,e)&&(t=r[e],n.attribs[e]=t.clone());return n.children=[],this.children.forEach((function(t){var e;return(e=t.clone()).parent=n,n.children.push(e)})),n},n.prototype.attribute=function(t,e){var n,i;if(null!=t&&(t=s(t)),u(t))for(n in t)h.call(t,n)&&(i=t[n],this.attribute(n,i));else a(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.attribs[t]=new r(this,t,""):null!=e&&(this.attribs[t]=new r(this,t,e));return this},n.prototype.removeAttribute=function(t){var e,n,r;if(null==t)throw new Error("Missing attribute name. "+this.debugInfo());if(t=s(t),Array.isArray(t))for(n=0,r=t.length;n<r;n++)e=t[n],delete this.attribs[e];else delete this.attribs[t];return this},n.prototype.toString=function(t){return this.options.writer.element(this,this.options.writer.filterOptions(t))},n.prototype.att=function(t,e){return this.attribute(t,e)},n.prototype.a=function(t,e){return this.attribute(t,e)},n.prototype.getAttribute=function(t){return this.attribs.hasOwnProperty(t)?this.attribs[t].value:null},n.prototype.setAttribute=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getAttributeNode=function(t){return this.attribs.hasOwnProperty(t)?this.attribs[t]:null},n.prototype.setAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.removeAttributeNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.setAttributeNS=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.removeAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getAttributeNodeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.setAttributeNodeNS=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.hasAttribute=function(t){return this.attribs.hasOwnProperty(t)},n.prototype.hasAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.setIdAttribute=function(t,e){return this.attribs.hasOwnProperty(t)?this.attribs[t].isId:e},n.prototype.setIdAttributeNS=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.setIdAttributeNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.isEqualNode=function(t){var e,r,i;if(!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(t))return!1;if(t.namespaceURI!==this.namespaceURI)return!1;if(t.prefix!==this.prefix)return!1;if(t.localName!==this.localName)return!1;if(t.attribs.length!==this.attribs.length)return!1;for(e=r=0,i=this.attribs.length-1;0<=i?r<=i:r>=i;e=0<=i?++r:--r)if(!this.attribs[e].isEqualNode(t.attribs[e]))return!1;return!0},n}(o)}).call(void 0)},function(t,e,n){"use strict";(function(){t.exports=function(){function t(t){this.nodes=t}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.getNamedItem=function(t){return this.nodes[t]},t.prototype.setNamedItem=function(t){var e;return e=this.nodes[t.nodeName],this.nodes[t.nodeName]=t,e||null},t.prototype.removeNamedItem=function(t){var e;return e=this.nodes[t],delete this.nodes[t],e||null},t.prototype.item=function(t){return this.nodes[Object.keys(this.nodes)[t]]||null},t.prototype.getNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")},t.prototype.setNamedItemNS=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.removeNamedItemNS=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;e=n(0),r=n(16),t.exports=function(t){function n(t,r){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=e.CData,this.value=this.stringify.cdata(r)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.cdata(this,this.options.writer.filterOptions(t))},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;e=n(0),r=n(16),t.exports=function(t){function n(t,r){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=e.Comment,this.value=this.stringify.comment(r)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.comment(this,this.options.writer.filterOptions(t))},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o={}.hasOwnProperty;i=n(3).isObject,r=n(1),e=n(0),t.exports=function(t){function n(t,r,o,s){var a;n.__super__.constructor.call(this,t),i(r)&&(r=(a=r).version,o=a.encoding,s=a.standalone),r||(r="1.0"),this.type=e.Declaration,this.version=this.stringify.xmlVersion(r),null!=o&&(this.encoding=this.stringify.xmlEncoding(o)),null!=s&&(this.standalone=this.stringify.xmlStandalone(s))}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.toString=function(t){return this.options.writer.declaration(this,this.options.writer.filterOptions(t))},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o,s,a,u,c,h={}.hasOwnProperty;c=n(3).isObject,u=n(1),e=n(0),r=n(36),o=n(37),i=n(38),s=n(39),a=n(31),t.exports=function(t){function n(t,r,i){var o,s,a,u,h,l;if(n.__super__.constructor.call(this,t),this.type=e.DocType,t.children)for(s=0,a=(u=t.children).length;s<a;s++)if((o=u[s]).type===e.Element){this.name=o.name;break}this.documentObject=t,c(r)&&(r=(h=r).pubID,i=h.sysID),null==i&&(i=(l=[r,i])[0],r=l[1]),null!=r&&(this.pubID=this.stringify.dtdPubID(r)),null!=i&&(this.sysID=this.stringify.dtdSysID(i))}return function(t,e){for(var n in e)h.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"entities",{get:function(){var t,n,r,i,o;for(i={},n=0,r=(o=this.children).length;n<r;n++)(t=o[n]).type!==e.EntityDeclaration||t.pe||(i[t.name]=t);return new a(i)}}),Object.defineProperty(n.prototype,"notations",{get:function(){var t,n,r,i,o;for(i={},n=0,r=(o=this.children).length;n<r;n++)(t=o[n]).type===e.NotationDeclaration&&(i[t.name]=t);return new a(i)}}),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),n.prototype.element=function(t,e){var n;return n=new i(this,t,e),this.children.push(n),this},n.prototype.attList=function(t,e,n,i,o){var s;return s=new r(this,t,e,n,i,o),this.children.push(s),this},n.prototype.entity=function(t,e){var n;return n=new o(this,!1,t,e),this.children.push(n),this},n.prototype.pEntity=function(t,e){var n;return n=new o(this,!0,t,e),this.children.push(n),this},n.prototype.notation=function(t,e){var n;return n=new s(this,t,e),this.children.push(n),this},n.prototype.toString=function(t){return this.options.writer.docType(this,this.options.writer.filterOptions(t))},n.prototype.ele=function(t,e){return this.element(t,e)},n.prototype.att=function(t,e,n,r,i){return this.attList(t,e,n,r,i)},n.prototype.ent=function(t,e){return this.entity(t,e)},n.prototype.pent=function(t,e){return this.pEntity(t,e)},n.prototype.not=function(t,e){return this.notation(t,e)},n.prototype.up=function(){return this.root()||this.documentObject},n.prototype.isEqualNode=function(t){return!!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&(t.name===this.name&&(t.publicId===this.publicId&&t.systemId===this.systemId))},n}(u)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;r=n(1),e=n(0),t.exports=function(t){function n(t,r,i,o,s,a){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==i)throw new Error("Missing DTD attribute name. "+this.debugInfo(r));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(r));if(!s)throw new Error("Missing DTD attribute default. "+this.debugInfo(r));if(0!==s.indexOf("#")&&(s="#"+s),!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r));if(a&&!s.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r));this.elementName=this.stringify.name(r),this.type=e.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(o),a&&(this.defaultValue=this.stringify.dtdAttDefault(a)),this.defaultValueType=s}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.toString=function(t){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(t))},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o={}.hasOwnProperty;i=n(3).isObject,r=n(1),e=n(0),t.exports=function(t){function n(t,r,o,s){if(n.__super__.constructor.call(this,t),null==o)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(null==s)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!r,this.name=this.stringify.name(o),this.type=e.EntityDeclaration,i(s)){if(!s.pubID&&!s.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(s.pubID&&!s.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,null!=s.pubID&&(this.pubID=this.stringify.dtdPubID(s.pubID)),null!=s.sysID&&(this.sysID=this.stringify.dtdSysID(s.sysID)),null!=s.nData&&(this.nData=this.stringify.dtdNData(s.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}else this.value=this.stringify.dtdEntityValue(s),this.internal=!0}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(n.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlVersion",{get:function(){return null}}),n.prototype.toString=function(t){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(t))},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;r=n(1),e=n(0),t.exports=function(t){function n(t,r,i){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(r),this.type=e.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.toString=function(t){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(t))},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;r=n(1),e=n(0),t.exports=function(t){function n(t,r,i){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD notation name. "+this.debugInfo(r));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r));this.name=this.stringify.name(r),this.type=e.NotationDeclaration,null!=i.pubID&&(this.pubID=this.stringify.dtdPubID(i.pubID)),null!=i.sysID&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),n.prototype.toString=function(t){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(t))},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;e=n(0),r=n(1),t.exports=function(t){function n(t,r){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing raw text. "+this.debugInfo());this.type=e.Raw,this.value=this.stringify.raw(r)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.raw(this,this.options.writer.filterOptions(t))},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;e=n(0),r=n(16),t.exports=function(t){function n(t,r){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=e.Text,this.value=this.stringify.text(r)}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"wholeText",{get:function(){var t,e,n;for(n="",e=this.previousSibling;e;)n=e.data+n,e=e.previousSibling;for(n+=this.data,t=this.nextSibling;t;)n+=t.data,t=t.nextSibling;return n}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.text(this,this.options.writer.filterOptions(t))},n.prototype.splitText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.replaceWholeText=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;e=n(0),r=n(16),t.exports=function(t){function n(t,r,i){if(n.__super__.constructor.call(this,t),null==r)throw new Error("Missing instruction target. "+this.debugInfo());this.type=e.ProcessingInstruction,this.target=this.stringify.insTarget(r),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(t))},n.prototype.isEqualNode=function(t){return!!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(t)&&t.target===this.target},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r={}.hasOwnProperty;e=n(74),t.exports=function(t){function e(t){e.__super__.constructor.call(this,t)}return function(t,e){for(var n in e)r.call(e,n)&&(t[n]=e[n]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,t),e.prototype.document=function(t,e){var n,r,i,o,s;for(e=this.filterOptions(e),o="",r=0,i=(s=t.children).length;r<i;r++)n=s[r],o+=this.writeChildNode(n,e,0);return e.pretty&&o.slice(-e.newline.length)===e.newline&&(o=o.slice(0,-e.newline.length)),o},e}(e)}).call(void 0)},function(t,e,n){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var r=n(145),i=n(146),o=n(75);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|p(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(h(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function f(t,e){var n=e.length<0?0:0|p(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return D(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=n;o<a;o++)if(c(t,o)===c(e,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var l=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){l=!1;break}if(l)return o}return-1}function b(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function w(t,e,n,r){return q(U(e,t.length-n),t,n,r)}function _(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function T(t,e,n,r){return _(t,e,n,r)}function E(t,e,n,r){return q(V(e),t,n,r)}function x(t,e,n,r){return q(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function O(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,c=t[i],h=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(h=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,l=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return c(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return h(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):y.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(r,i),h=t.slice(e,n),l=0;l<a;++l)if(c[l]!==h[l]){o=c[l],s=h[l];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return T(this,t,e,n);case"base64":return E(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function D(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function P(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=B(t[o]);return i}function N(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function M(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function R(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(t,e,n,r,o){return o||R(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function k(t,e,n,r,o){return o||R(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||A(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||A(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||A(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||A(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||A(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||A(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||A(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||A(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||C(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);C(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):M(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):M(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return j(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return j(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return k(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return k(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=u.isBuffer(t)?t:U(new u(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function U(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(6))},function(t,e,n){"use strict";(e=t.exports=n(76)).Stream=e,e.Readable=e,e.Writable=n(46),e.Duplex=n(5),e.Transform=n(80),e.PassThrough=n(153)},function(t,e,n){"use strict";(function(e,r,i){var o=n(20);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;v.WritableState=g;var c=Object.create(n(12));c.inherits=n(7);var h={deprecate:n(152)},l=n(77),f=n(21).Buffer,p=i.Uint8Array||function(){};var d,y=n(78);function m(){}function g(t,e){a=a||n(5),t=t||{};var r=e instanceof a;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(x,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),x(t,e))}(t,n,r,e,i);else{var s=T(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),r?u(w,t,n,s,i):w(t,n,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function v(t){if(a=a||n(5),!(d.call(v,this)||this instanceof a))return new v(t);this._writableState=new g(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function b(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),x(t,e)}function _(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,h=n.encoding,l=n.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,h,l),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function T(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function E(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),x(t,e)}))}function x(t,e){var n=T(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(E,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(v,l),g.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(g.prototype,"buffer",{get:h.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===v&&(t&&t._writableState instanceof g)}})):d=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,n){var r,i=this._writableState,s=!1,a=!i.objectMode&&(r=t,f.isBuffer(r)||r instanceof p);return a&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=m),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(r,s),i=!1),i}(this,i,t,n))&&(i.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,a,r,i,o);return u}(this,i,a,t,e,n)),s},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},v.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,x(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(19),n(79).setImmediate,n(6))},function(t,e,n){"use strict";var r=n(21).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=h,this.end=l,e=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function h(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";t.exports=!1},function(t,e,n){"use strict";var r=n(22),i=n(4)("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){"use strict";var r=n(8),i=n(2),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(48)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){"use strict";var r=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+i).toString(36))}},function(t,e,n){"use strict";var r=n(2),i=n(8),o=n(53),s=n(56),a=n(13),u=function t(e,n,u){var c,h,l,f,p=e&t.F,d=e&t.G,y=e&t.P,m=e&t.B,g=d?r:e&t.S?r[n]||(r[n]={}):(r[n]||{}).prototype,v=d?i:i[n]||(i[n]={}),b=v.prototype||(v.prototype={});for(c in d&&(u=n),u)l=((h=!p&&g&&void 0!==g[c])?g:u)[c],f=m&&h?a(l,r):y&&"function"==typeof l?a(Function.call,l):l,g&&s(g,c,l,e&t.U),v[c]!=l&&o(v,c,f),y&&b[c]!=l&&(b[c]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){"use strict";var r=n(23),i=n(88);t.exports=n(15)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){"use strict";var r=n(10),i=n(2).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){"use strict";var r=n(2),i=n(53),o=n(57),s=n(51)("src"),a=n(89),u=(""+a).split("toString");n(8).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(o(n,s)||i(n,s,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[s]||a.call(this)}))},function(t,e,n){"use strict";var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,n){"use strict";t.exports={}},function(t,e,n){"use strict";var r=n(60),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){"use strict";var r=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:r)(t)}},function(t,e,n){"use strict";var r,i,o,s=n(13),a=n(96),u=n(97),c=n(55),h=n(2),l=h.process,f=h.setImmediate,p=h.clearImmediate,d=h.MessageChannel,y=h.Dispatch,m=0,g={},v=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},b=function(t){v.call(t.data)};f&&p||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++m]=function(){a("function"==typeof t?t:Function(t),e)},r(m),m},p=function(t){delete g[t]},"process"==n(22)(l)?r=function(t){l.nextTick(s(v,t,1))}:y&&y.now?r=function(t){y.now(s(v,t,1))}:d?(o=(i=new d).port2,i.port1.onmessage=b,r=s(o.postMessage,o,1)):h.addEventListener&&"function"==typeof postMessage&&!h.importScripts?(r=function(t){h.postMessage(t+"","*")},h.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),v.call(t)}}:function(t){setTimeout(s(v,t,1),0)}),t.exports={set:f,clear:p}},function(t,e,n){"use strict";var r=n(14);function i(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){"use strict";var r=n(2).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";t.exports=function(t){return null!=t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={ArrayBufferToString:function(t){for(var e="",n=new Uint8Array(t),r=0;r<n.length;r++)e+=String.fromCharCode(n[r]);return e},StringToArrayBuffer:function(t){for(var e=new ArrayBuffer(t.length),n=new Uint8Array(e),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return e},Base64ToHex:function(t){for(var e=window.atob(t.replace(/-/g,"+").replace(/_/g,"/")),n="",r=0;r<e.length;r++)n+=("0"+e.charCodeAt(r).toString(16)).substr(-2);return n},HexToBase64:function(t){for(var e="",n=0;n<t.length;n+=2)e+=String.fromCharCode(parseInt(t.substr(n,2),16));return window.btoa(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},findBox:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(t.type!==e){if(t&&t.subBox){var i=t.subBox.filter((function(t){return t.type===e}));i.length?i.forEach((function(t){return n.push(t)})):t.subBox.forEach((function(t){return r.findBox(t,e,n)}))}}else n.push(t);return(n=[].concat(n)).length>1?n:n[0]},padStart:function(t,e,n){for(var r=String(n),i=e>>0,o=Math.ceil(i/r.length),s=[],a=String(t);o--;)s.push(r);return s.join("").substring(0,i-a.length)+a},durationConvert:function(t){var e=0,n=0,r=0;return(t=t.slice(t.indexOf("PT")+2)).indexOf("H")>-1&&t.indexOf("M")>-1&&t.indexOf("S")>-1?(e=parseFloat(t.slice(0,t.indexOf("H"))),n=parseFloat(t.slice(t.indexOf("H")+1,t.indexOf("M"))),r=parseFloat(t.slice(t.indexOf("M")+1,t.indexOf("S")))):t.indexOf("H")<0&&t.indexOf("M")>0&&t.indexOf("S")>-1?(n=parseFloat(t.slice(0,t.indexOf("M"))),r=parseFloat(t.slice(t.indexOf("M")+1,t.indexOf("S")))):t.indexOf("H")<0&&t.indexOf("M")<0&&t.indexOf("S")>-1&&(r=parseFloat(t.slice(0,t.indexOf("S")))),3600*e+60*n+r},preFixInterge:function(t,e){return(Array(e).join(0)+t).slice(-e)},toHex:function(){for(var t=[],e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return n.forEach((function(e){t.push(r.padStart(Number(e).toString(16),2,0))})),t},sum:function(){for(var t=0,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){t+=e})),t},toUTF8:function(t){for(var e=encodeURIComponent(t),n=unescape(e),r=new Uint8Array(n.length),i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r.buffer},fromHex:function(t){for(var e=new Uint8Array(t.length/2),n=0;n<t.length;n+=2)e[n/2]=window.parseInt(t.substr(n,2),16);return e},fromCharCode:function(t){for(var e="",n=0;n<t.length;n+=16e3){var r=t.subarray(n,n+16e3);e+=String.fromCharCode.apply(null,r)}return e},toBase64:function(t,e){var n=r.fromCharCode(t);e=void 0===e||e;var i=window.btoa(n).replace(/\+/g,"-").replace(/\//g,"_");return e?i:i.replace(/=*$/,"")}};e.default=r,t.exports=e.default},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.default=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.url,i=e.method,o=void 0===i?"GET":i,s=e.type,a=void 0===s?"arraybuffer":s,u=e.data,c=void 0===u?{}:u;return r(this,t),new Promise((function(t,e){var r=new window.XMLHttpRequest,i=o.toUpperCase(),s=[];for(var u in a&&(r.responseType=a),c)s.push("k="+c[u]);if("GET"===i)r.open(i,n+"?"+s.join("&")),r.send();else{if("post"!==i)throw new Error("xhr "+i+" is not supported");0===n.indexOf("data:application/json;base64")?(r.open(i,n,!0),r.timeout=0,r.withCredentials=!1,r.send(s)):(r.open(i,n),r.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r.send(s.join("&")))}r.onload=function(){200===r.status||206===r.status?t(r):e(r)},r.onerror=function(){e(r)}}))},t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=s(n(27)),o=s(n(28));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.headSize=8,this.size=0,this.type="",this.subBox=[],this.start=-1}return r(t,[{key:"readHeader",value:function(t){if(this.start=t.position,this.size=t.readUint32(),this.type=String.fromCharCode(t.readUint8(),t.readUint8(),t.readUint8(),t.readUint8()),1===this.size)this.size=t.readUint64();else if(0===this.size&&"mdat"!==this.type)throw new o.default("parse","",{line:19,handle:"[Box] readHeader",msg:"parse mp4 mdat box failed"});if("uuid"===this.type)for(var e=[],n=0;n<16;n++)e.push(t.readUint8())}},{key:"readBody",value:function(e){var n=this.size-e.position+this.start,r=this.type;this.data=e.buffer.slice(e.position,e.position+n),e.position+=this.data.byteLength;var i=void 0;(i=t.containerBox.find((function(t){return t===r}))?t.containerParser:t[r])&&i instanceof Function&&i.call(this)}},{key:"read",value:function(t){this.readHeader(t),this.readBody(t)}}],[{key:"containerParser",value:function(){for(var e=new i.default(this.data),n=e.buffer.byteLength;e.position<n;){var r=new t;r.readHeader(e),this.subBox.push(r),r.readBody(e)}delete this.data,e=null}}]),t}();a.containerBox=["moov","trak","edts","mdia","minf","dinf","stbl","mvex","moof","traf","mfra"],e.default=a,t.exports=e.default},function(t,e,n){"use strict";(function(){t.exports=function(){function t(){}return t.prototype.hasFeature=function(t,e){return!0},t.prototype.createDocumentType=function(t,e,n){throw new Error("This DOM method is not implemented.")},t.prototype.createDocument=function(t,e,n){throw new Error("This DOM method is not implemented.")},t.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},t.prototype.getFeature=function(t,e){throw new Error("This DOM method is not implemented.")},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o,s,a,u,c={}.hasOwnProperty;u=n(3).isPlainObject,i=n(69),r=n(136),o=n(1),e=n(0),a=n(73),s=n(43),t.exports=function(t){function n(t){n.__super__.constructor.call(this,null),this.name="#document",this.type=e.Document,this.documentURI=null,this.domConfig=new r,t||(t={}),t.writer||(t.writer=new s),this.options=t,this.stringify=new a(t)}return function(t,e){for(var n in e)c.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),Object.defineProperty(n.prototype,"implementation",{value:new i}),Object.defineProperty(n.prototype,"doctype",{get:function(){var t,n,r,i;for(n=0,r=(i=this.children).length;n<r;n++)if((t=i[n]).type===e.DocType)return t;return null}}),Object.defineProperty(n.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(n.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(n.prototype,"xmlEncoding",{get:function(){return 0!==this.children.length&&this.children[0].type===e.Declaration?this.children[0].encoding:null}}),Object.defineProperty(n.prototype,"xmlStandalone",{get:function(){return 0!==this.children.length&&this.children[0].type===e.Declaration&&"yes"===this.children[0].standalone}}),Object.defineProperty(n.prototype,"xmlVersion",{get:function(){return 0!==this.children.length&&this.children[0].type===e.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(n.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(n.prototype,"origin",{get:function(){return null}}),Object.defineProperty(n.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(n.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(n.prototype,"contentType",{get:function(){return null}}),n.prototype.end=function(t){var e;return e={},t?u(t)&&(e=t,t=this.options.writer):t=this.options.writer,t.document(this,t.filterOptions(e))},n.prototype.toString=function(t){return this.options.writer.document(this,this.options.writer.filterOptions(t))},n.prototype.createElement=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createTextNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createComment=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createCDATASection=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createProcessingInstruction=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createAttribute=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createEntityReference=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.importNode=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createElementNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createAttributeNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagNameNS=function(t,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementById=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.adoptNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.renameNode=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createEvent=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createNodeIterator=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.createTreeWalker=function(t,e,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},n}(o)}).call(void 0)},function(t,e,n){"use strict";(function(){var e;e=n(0),n(1),t.exports=function(){function t(t,n,r){if(this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),null==n)throw new Error("Missing attribute name. "+this.debugInfo(n));this.name=this.stringify.name(n),this.value=this.stringify.attValue(r),this.type=e.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(t){return this.value=t||""}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"specified",{get:function(){return!0}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(t){return this.options.writer.attribute(this,this.options.writer.filterOptions(t))},t.prototype.debugInfo=function(t){return null==(t=t||this.name)?"parent: <"+this.parent.name+">":"attribute: {"+t+"}, parent: <"+this.parent.name+">"},t.prototype.isEqualNode=function(t){return t.namespaceURI===this.namespaceURI&&(t.prefix===this.prefix&&(t.localName===this.localName&&t.value===this.value))},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i={}.hasOwnProperty;r=n(1),e=n(0),t.exports=function(t){function n(t){n.__super__.constructor.call(this,t),this.type=e.Dummy}return function(t,e){for(var n in e)i.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(t){return""},n}(r)}).call(void 0)},function(t,e,n){"use strict";(function(){var e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty;t.exports=function(){function t(t){var r,i,o;for(r in this.assertLegalName=e(this.assertLegalName,this),this.assertLegalChar=e(this.assertLegalChar,this),t||(t={}),this.options=t,this.options.version||(this.options.version="1.0"),i=t.stringify||{})n.call(i,r)&&(o=i[r],this[r]=o)}return t.prototype.name=function(t){return this.options.noValidation?t:this.assertLegalName(""+t||"")},t.prototype.text=function(t){return this.options.noValidation?t:this.assertLegalChar(this.textEscape(""+t||""))},t.prototype.cdata=function(t){return this.options.noValidation?t:(t=(t=""+t||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(t))},t.prototype.comment=function(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return this.assertLegalChar(t)},t.prototype.raw=function(t){return this.options.noValidation?t:""+t||""},t.prototype.attValue=function(t){return this.options.noValidation?t:this.assertLegalChar(this.attEscape(t=""+t||""))},t.prototype.insTarget=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},t.prototype.insValue=function(t){if(this.options.noValidation)return t;if((t=""+t||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+t);return this.assertLegalChar(t)},t.prototype.xmlVersion=function(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t);return t},t.prototype.xmlEncoding=function(t){if(this.options.noValidation)return t;if(!(t=""+t||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+t);return this.assertLegalChar(t)},t.prototype.xmlStandalone=function(t){return this.options.noValidation?t:t?"yes":"no"},t.prototype.dtdPubID=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},t.prototype.dtdSysID=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},t.prototype.dtdElementValue=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},t.prototype.dtdAttType=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},t.prototype.dtdAttDefault=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},t.prototype.dtdEntityValue=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},t.prototype.dtdNData=function(t){return this.options.noValidation?t:this.assertLegalChar(""+t||"")},t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t.prototype.assertLegalChar=function(t){var e,n;if(this.options.noValidation)return t;if(e="","1.0"===this.options.version){if(e=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e))throw new Error("Invalid character in string: "+t+" at index "+n.index)}else if("1.1"===this.options.version&&(e=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,n=t.match(e)))throw new Error("Invalid character in string: "+t+" at index "+n.index);return t},t.prototype.assertLegalName=function(t){var e;if(this.options.noValidation)return t;if(this.assertLegalChar(t),e=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!t.match(e))throw new Error("Invalid character in name");return t},t.prototype.textEscape=function(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},t.prototype.attEscape=function(t){var e;return this.options.noValidation?t:(e=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o={}.hasOwnProperty;i=n(3).assign,e=n(0),n(34),n(35),n(32),n(33),n(30),n(40),n(41),n(42),n(72),n(36),n(38),n(37),n(39),r=n(17),t.exports=function(){function t(t){var e,n,r;for(e in t||(t={}),this.options=t,n=t.writer||{})o.call(n,e)&&(r=n[e],this["_"+e]=this[e],this[e]=r)}return t.prototype.filterOptions=function(t){var e,n,o,s,a,u,c,h;return t||(t={}),t=i({},this.options,t),(e={writer:this}).pretty=t.pretty||!1,e.allowEmpty=t.allowEmpty||!1,e.indent=null!=(n=t.indent)?n:" ",e.newline=null!=(o=t.newline)?o:"\n",e.offset=null!=(s=t.offset)?s:0,e.dontPrettyTextNodes=null!=(a=null!=(u=t.dontPrettyTextNodes)?u:t.dontprettytextnodes)?a:0,e.spaceBeforeSlash=null!=(c=null!=(h=t.spaceBeforeSlash)?h:t.spacebeforeslash)?c:"",!0===e.spaceBeforeSlash&&(e.spaceBeforeSlash=" "),e.suppressPrettyCount=0,e.user={},e.state=r.None,e},t.prototype.indent=function(t,e,n){var r;return!e.pretty||e.suppressPrettyCount?"":e.pretty&&(r=(n||0)+e.offset+1)>0?new Array(r).join(e.indent):""},t.prototype.endline=function(t,e,n){return!e.pretty||e.suppressPrettyCount?"":e.newline},t.prototype.attribute=function(t,e,n){var r;return this.openAttribute(t,e,n),r=" "+t.name+'="'+t.value+'"',this.closeAttribute(t,e,n),r},t.prototype.cdata=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<![CDATA[",e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+="]]>"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.comment=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"\x3c!-- ",e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=" --\x3e"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.declaration=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<?xml",e.state=r.InsideTag,i+=' version="'+t.version+'"',null!=t.encoding&&(i+=' encoding="'+t.encoding+'"'),null!=t.standalone&&(i+=' standalone="'+t.standalone+'"'),e.state=r.CloseTag,i+=e.spaceBeforeSlash+"?>",i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.docType=function(t,e,n){var i,o,s,a,u;if(n||(n=0),this.openNode(t,e,n),e.state=r.OpenTag,a=this.indent(t,e,n),a+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?a+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(a+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(a+=" [",a+=this.endline(t,e,n),e.state=r.InsideTag,o=0,s=(u=t.children).length;o<s;o++)i=u[o],a+=this.writeChildNode(i,e,n+1);e.state=r.CloseTag,a+="]"}return e.state=r.CloseTag,a+=e.spaceBeforeSlash+">",a+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),a},t.prototype.element=function(t,n,i){var s,a,u,c,h,l,f,p,d,y,m,g,v,b;for(d in i||(i=0),y=!1,m="",this.openNode(t,n,i),n.state=r.OpenTag,m+=this.indent(t,n,i)+"<"+t.name,g=t.attribs)o.call(g,d)&&(s=g[d],m+=this.attribute(s,n,i));if(c=0===(u=t.children.length)?null:t.children[0],0===u||t.children.every((function(t){return(t.type===e.Text||t.type===e.Raw)&&""===t.value})))n.allowEmpty?(m+=">",n.state=r.CloseTag,m+="</"+t.name+">"+this.endline(t,n,i)):(n.state=r.CloseTag,m+=n.spaceBeforeSlash+"/>"+this.endline(t,n,i));else if(!n.pretty||1!==u||c.type!==e.Text&&c.type!==e.Raw||null==c.value){if(n.dontPrettyTextNodes)for(h=0,f=(v=t.children).length;h<f;h++)if(((a=v[h]).type===e.Text||a.type===e.Raw)&&null!=a.value){n.suppressPrettyCount++,y=!0;break}for(m+=">"+this.endline(t,n,i),n.state=r.InsideTag,l=0,p=(b=t.children).length;l<p;l++)a=b[l],m+=this.writeChildNode(a,n,i+1);n.state=r.CloseTag,m+=this.indent(t,n,i)+"</"+t.name+">",y&&n.suppressPrettyCount--,m+=this.endline(t,n,i),n.state=r.None}else m+=">",n.state=r.InsideTag,n.suppressPrettyCount++,y=!0,m+=this.writeChildNode(c,n,i+1),n.suppressPrettyCount--,y=!1,n.state=r.CloseTag,m+="</"+t.name+">"+this.endline(t,n,i);return this.closeNode(t,n,i),m},t.prototype.writeChildNode=function(t,n,r){switch(t.type){case e.CData:return this.cdata(t,n,r);case e.Comment:return this.comment(t,n,r);case e.Element:return this.element(t,n,r);case e.Raw:return this.raw(t,n,r);case e.Text:return this.text(t,n,r);case e.ProcessingInstruction:return this.processingInstruction(t,n,r);case e.Dummy:return"";case e.Declaration:return this.declaration(t,n,r);case e.DocType:return this.docType(t,n,r);case e.AttributeDeclaration:return this.dtdAttList(t,n,r);case e.ElementDeclaration:return this.dtdElement(t,n,r);case e.EntityDeclaration:return this.dtdEntity(t,n,r);case e.NotationDeclaration:return this.dtdNotation(t,n,r);default:throw new Error("Unknown XML node type: "+t.constructor.name)}},t.prototype.processingInstruction=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<?",e.state=r.InsideTag,i+=t.target,t.value&&(i+=" "+t.value),e.state=r.CloseTag,i+=e.spaceBeforeSlash+"?>",i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.raw=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n),e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.text=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n),e.state=r.InsideTag,i+=t.value,e.state=r.CloseTag,i+=this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.dtdAttList=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<!ATTLIST",e.state=r.InsideTag,i+=" "+t.elementName+" "+t.attributeName+" "+t.attributeType,"#DEFAULT"!==t.defaultValueType&&(i+=" "+t.defaultValueType),t.defaultValue&&(i+=' "'+t.defaultValue+'"'),e.state=r.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.dtdElement=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<!ELEMENT",e.state=r.InsideTag,i+=" "+t.name+" "+t.value,e.state=r.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.dtdEntity=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<!ENTITY",e.state=r.InsideTag,t.pe&&(i+=" %"),i+=" "+t.name,t.value?i+=' "'+t.value+'"':(t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),t.nData&&(i+=" NDATA "+t.nData)),e.state=r.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.dtdNotation=function(t,e,n){var i;return this.openNode(t,e,n),e.state=r.OpenTag,i=this.indent(t,e,n)+"<!NOTATION",e.state=r.InsideTag,i+=" "+t.name,t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?i+=' PUBLIC "'+t.pubID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),e.state=r.CloseTag,i+=e.spaceBeforeSlash+">"+this.endline(t,e,n),e.state=r.None,this.closeNode(t,e,n),i},t.prototype.openNode=function(t,e,n){},t.prototype.closeNode=function(t,e,n){},t.prototype.openAttribute=function(t,e,n){},t.prototype.closeAttribute=function(t,e,n){},t}()}).call(void 0)},function(t,e,n){"use strict";var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,n){"use strict";(function(e,r){var i=n(20);t.exports=b;var o,s=n(75);b.ReadableState=v;n(18).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=n(77),c=n(21).Buffer,h=e.Uint8Array||function(){};var l=Object.create(n(12));l.inherits=n(7);var f=n(148),p=void 0;p=f&&f.debuglog?f.debuglog("stream"):function(){};var d,y=n(149),m=n(78);l.inherits(b,u);var g=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var r=e instanceof(o=o||n(5));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=n(47).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||n(5),!(this instanceof b))return new b(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,n,r,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,E(t)}(t,s)):(i||(o=function(t,e){var n;r=e,c.isBuffer(r)||r instanceof h||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?_(t,s,e,!1):O(t,s)):_(t,s,e,!1))):r||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function _(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&E(t)),O(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=c.from(t,e),e=""),n=!0),w(this,t,e,!1,n)},b.prototype.unshift=function(t){return w(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return d||(d=n(47).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};function T(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(x,t):x(t))}function x(t){p("emit readable"),t.emit("readable"),P(t)}function O(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(S,t,e))}function S(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function D(t){p("readable nexttick read 0"),t.read(0)}function I(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),P(t),e.flowing&&!e.reading&&t.read(0)}function P(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0===(t-=s)){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function A(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(C,e,t))}function C(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function M(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}b.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?A(this):E(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&A(this),null;var r,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=T(n,e))),null===(r=t>0?N(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&A(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?h:b;function c(e,r){p("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),t.removeListener("close",g),t.removeListener("finish",v),t.removeListener("drain",l),t.removeListener("error",m),t.removeListener("unpipe",c),n.removeListener("end",h),n.removeListener("end",b),n.removeListener("data",y),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function h(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var l=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,P(t))}}(n);t.on("drain",l);var f=!1;var d=!1;function y(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==M(o.pipes,t))&&!f&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function m(e){p("onerror",e),b(),t.removeListener("error",m),0===a(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",v),b()}function v(){p("onfinish"),t.removeListener("close",g),b()}function b(){p("unpipe"),n.unpipe(t)}return n.on("data",y),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",m),t.once("close",g),t.once("finish",v),t.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=M(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},b.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&E(this):i.nextTick(D,this))}return n},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(I,t,e))}(this,t)),this},b.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(p("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){p("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=N}).call(this,n(6),n(19))},function(t,e,n){"use strict";t.exports=n(18).EventEmitter},function(t,e,n){"use strict";var r=n(20);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(151),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||void 0,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||void 0}).call(this,n(6))},function(t,e,n){"use strict";t.exports=s;var r=n(5),i=Object.create(n(12));function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);r.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,n){u(t,e,n)})):u(this,null,null)}function u(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(7),i.inherits(s,r),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},function(t,e,n){"use strict";(function(){var t;t=new RegExp(/(?!xmlns)^.*:/),e.normalize=function(t){return t.toLowerCase()},e.firstCharLowerCase=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},e.stripPrefix=function(e){return e.replace(t,"")},e.parseNumbers=function(t){return isNaN(t)||(t=t%1==0?parseInt(t,10):parseFloat(t)),t},e.parseBooleans=function(t){return/^(?:true|false)$/i.test(t)&&(t="true"===t.toLowerCase()),t}}).call(void 0)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=a(n(11)),o=a(n(24)),s=a(n(28));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=this;(0,i.default)(this),this.codecs=[],this.sourceBuffer={},this.mediaSource=new MediaSource,this.url=URL.createObjectURL(this.mediaSource),this.queue={},this.updating=!1,this.mediaSource.addEventListener("sourceopen",(function(){e.emit("sourceopen")})),this.mediaSource.addEventListener("sourceclose",(function(){e.emit("sourceclose")}))}return r(t,[{key:"addSourceBuffer",value:function(t){var e=this;this.codecs.push(t);var n=this.mediaSource.addSourceBuffer(t);this.sourceBuffer[t]=n,n.addEventListener("error",(function(t){e.emit("error",new s.default("mse","",{line:16,handle:"[MSE] constructor sourceopen",msg:t.message}))})),n.addEventListener("updateend",(function(r){if(e.emit(t+" updateend"),e.queue[t]&&"Array"===o.default.util.typeOf(e.queue[t])){var i=e.queue[t].shift();i&&(!1===n.updating&&"open"===e.state?n.appendBuffer(i):e.queue[t].unshift(i))}}))}},{key:"appendBuffer",value:function(t,e){var n=this.sourceBuffer[t];return!1===n.updating&&"open"===this.state?(n.appendBuffer(e),!0):(this.queue[t]||(this.queue[t]=[]),this.queue[t].push(e),!1)}},{key:"removeBuffer",value:function(t,e,n){!1===this.sourceBuffer[t].updating&&"open"===this.state&&this.sourceBuffer[t].remove(e,n)}},{key:"endOfStream",value:function(){"open"===this.state&&this.mediaSource.endOfStream()}},{key:"state",get:function(){return this.mediaSource.readyState}},{key:"duration",get:function(){return this.mediaSource.duration},set:function(t){this.mediaSource.duration=t}}],[{key:"isSupported",value:function(t){return window.MediaSource&&window.MediaSource.isTypeSupported(t)}}]),t}();e.default=u,t.exports=e.default},function(t,e,n){t.exports=n(84)},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n(85),n(105);var i=u(n(24)),o=u(n(108)),s=u(n(82)),a=u(n(26));function u(t){return t&&t.__esModule?t:{default:t}}var c=function(t,e){if("vod"===e.type&&t.duration-t.currentTime<2){var n=t.getBufferedRange();t.currentTime-n[1]<.1&&(t.mse.endOfStream(),t.dash.mse.progressTimer&&(clearInterval(t.dash.mse.progressTimer),t.dash.mse.progressTimer=null))}},h=function(t,e){e.vid=t.config.vid,e.url=t.src,e.errd&&"object"===r(e.errd)&&t.dash&&(e.errd.url=t.dash.url,e.url=t.dash.url),t.emit("DATA_REPORT",e),"network"===e.errt&&t.config._backupURL?t.src=t.config._backupURL:t.src=t.config._mainURL,t.switchURL=null,t._replay=null},l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t)),r=n,u=i.default.sniffer,l=[];r.config.preloadTime;if(["chrome","firfox","safari"].some((function(t){return t===u.browser}))&&s.default.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"')){var f=r.start,p=void 0;Object.defineProperty(r,"src",{get:function(){return r.currentSrc},set:function(t){r.config.url=t,r.paused?r.start(t):(r.pause(),r.once("pause",(function(){r.start(t)})),r.once("canplay",(function(){r.play()}))),r.once("canplay",(function(){r.currentTime=0}))},configurable:!0}),r.start=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.config.url;t&&(r.config.dashOpts&&r.config.dashOpts.drm&&!navigator.requestMediaKeySystemAccess?console.log("EME API is not supported. Enable pref media.eme.enabled to true in about:config"):((p=new o.default(t,r.config,r.video)).init(t).then((function(e){p.mpd.mediaList.video.forEach((function(t){l.push({name:t.height+"P",url:t.id,selected:!1})})),l[0].selected=!0,r.emit("resourceReady",l);var n=e;function i(){y(r.currentTime+1),c(r,p)}f.call(r,n.url),r.dash=p,r.mse=n,p.on("error",(function(t){h(r,t)})),p.once("startPlay",(function(){r.dash.mse.progressTimer=setInterval(i,r.config.progressTimer||300)})),r.on("error",(function(){r.dash.mse.progressTimer&&(clearInterval(r.dash.mse.progressTimer),r.dash.mse.progressTimer=null)})),r.switchURL=function(t){t=t.split("/")[t.split("/").length-1];var e=p.mpd.mediaList.video,n=e.selectedIdx;e.every((function(i,o){return i.id!==t||(n=o,p.getData(e[n].initSegment,e[n].initSegmentRange).then((function(t){!function(t){var i=r.currentTime,o=e[e.selectedIdx].mediaSegments.find((function(t){return t.start-i>6})),s=o.start,a=r.getBufferedRange()[1];a-s>0&&"safari"!==u.browser&&r.mse.removeBuffer(e[0].mimeType+';codecs="'+e[0].codecs+'"',s,a);e[e.selectedIdx].mediaSegments.every((function(t){return t.downloaded=!1,!0})),r.mse.appendBuffer(e[0].mimeType+';codecs="'+e[0].codecs+'"',t),r.mse.once(e[0].mimeType+';codecs="'+e[0].codecs+'" updateend',(function(){e[n].inited=!0,e.selectedIdx=n,y((o.start+o.end)/2)}))}(t)})),!1)}))},r.once("destroy",(function(){clearTimeout(p.mpd.timer)})),r._replay=function(){a.default.clear();var e=p.mpd.mediaList.video.selectedIdx;(p=new o.default(t,r.config,r.video)).init(t).then((function(t){l[e].selected=!0,r.emit("resourceReady",l);var n=t;f.call(r,n.url),r.dash=p,r.mse=n,r.currentTime=0,r.play(),r.on("error",(function(){r.dash.mse.progressTimer&&(clearInterval(r.dash.mse.progressTimer),r.dash.mse.progressTimer=null)})),p.once("startPlay",(function(){r.dash.mse.progressTimer=setInterval(i,r.config.progressTimer||300)}))}),(function(t){h(r,t)}))}}),(function(e){h(r,e),f.call(r,t)})),r.download=function(){p.download()}))};var d=function(t){var e=r.buffered;if(e)for(var n=0;n<e.length;n++)if(e.start(n)<=t&&e.end(n)>=t)return{start:e.start(n),end:e.end(n)}},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.currentTime,e=d(t),n=e&&e.end||t;n>t+15||p.seek(n)}}return n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);t.exports=l},function(t,e,n){"use strict";var r,i,o,s,a=n(48),u=n(2),c=n(13),h=n(49),l=n(52),f=n(10),p=n(14),d=n(90),y=n(91),m=n(95),g=n(61).set,v=n(98)(),b=n(62),w=n(99),_=n(63),T=n(100),E=u.TypeError,x=u.process,O=x&&x.versions,S=O&&O.v8||"",D=u.Promise,I="process"==h(x),P=function(){},N=i=b.f,A=!!function(){try{var t=D.resolve(1),e=(t.constructor={})[n(4)("species")]=function(t){t(P,P)};return(I||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e&&0!==S.indexOf("6.6")&&-1===_.indexOf("Chrome/66")}catch(t){}}(),C=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},M=function(t,e){if(!t._n){t._n=!0;var n=t._c;v((function(){for(var r=t._v,i=1==t._s,o=0,s=function(e){var n,o,s,a=i?e.ok:e.fail,u=e.resolve,c=e.reject,h=e.domain;try{a?(i||(2==t._h&&j(t),t._h=1),!0===a?n=r:(h&&h.enter(),n=a(r),h&&(h.exit(),s=!0)),n===e.promise?c(E("Promise-chain cycle")):(o=C(n))?o.call(n,u,c):u(n)):c(r)}catch(t){h&&!s&&h.exit(),c(t)}};n.length>o;)s(n[o++]);t._c=[],t._n=!1,e&&!t._h&&L(t)}))}},L=function(t){g.call(u,(function(){var e,n,r,i=t._v,o=R(t);if(o&&(e=w((function(){I?x.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=I||R(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},R=function(t){return 1!==t._h&&0===(t._a||t._c).length},j=function(t){g.call(u,(function(){var e;I?x.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})}))},k=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),M(e,!0))},F=function t(e){var n,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw E("Promise can't be resolved itself");(n=C(e))?v((function(){var i={_w:r,_d:!1};try{n.call(e,c(t,i,1),c(k,i,1))}catch(t){k.call(i,t)}})):(r._v=e,r._s=1,M(r,!1))}catch(t){k.call({_w:r,_d:!1},t)}}};A||(D=function(t){d(this,D,"Promise","_h"),p(t),r.call(this);try{t(c(F,this,1),c(k,this,1))}catch(t){k.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(101)(D.prototype,{then:function(t,e){var n=N(m(this,D));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=I?x.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(F,t,1),this.reject=c(k,t,1)},b.f=N=function(t){return t===D||t===s?new o(t):i(t)}),l(l.G+l.W+l.F*!A,{Promise:D}),n(102)(D,"Promise"),n(103)("Promise"),s=n(8).Promise,l(l.S+l.F*!A,"Promise",{reject:function(t){var e=N(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(a||!A),"Promise",{resolve:function(t){return T(a&&this===s?D:this,t)}}),l(l.S+l.F*!(A&&n(104)((function(t){D.all(t).catch(P)}))),"Promise",{all:function(t){var e=this,n=N(e),r=n.resolve,i=n.reject,o=w((function(){var n=[],o=0,s=1;y(t,!1,(function(t){var a=o++,u=!1;n.push(void 0),s++,e.resolve(t).then((function(t){u||(u=!0,n[a]=t,--s||r(n))}),i)})),--s||r(n)}));return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=N(e),r=n.reject,i=w((function(){y(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";t.exports=!n(15)&&!n(54)((function(){return 7!=Object.defineProperty(n(55)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";var r=n(10);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";t.exports=n(50)("native-function-to-string",Function.toString)},function(t,e,n){"use strict";t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){"use strict";var r=n(13),i=n(92),o=n(93),s=n(9),a=n(59),u=n(94),c={},h={},l=t.exports=function(t,e,n,l,f){var p,d,y,m,g=f?function(){return t}:u(t),v=r(n,l,e?2:1),b=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(p=a(t.length);p>b;b++)if((m=e?v(s(d=t[b])[0],d[1]):v(t[b]))===c||m===h)return m}else for(y=g.call(t);!(d=y.next()).done;)if((m=i(y,v,d.value,e))===c||m===h)return m};l.BREAK=c,l.RETURN=h},function(t,e,n){"use strict";var r=n(9);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){"use strict";var r=n(58),i=n(4)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(49),i=n(4)("iterator"),o=n(58);t.exports=n(8).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){"use strict";var r=n(9),i=n(14),o=n(4)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[o])?e:i(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){"use strict";var r=n(2).document;t.exports=r&&r.documentElement},function(t,e,n){"use strict";var r=n(2),i=n(61).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,u="process"==n(22)(s);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=s.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){s.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var h=a.resolve(void 0);n=function(){h.then(c)}}else n=function(){i.call(r,c)};else{var l=!0,f=document.createTextNode("");new o(c).observe(f,{characterData:!0}),n=function(){f.data=l=!l}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){"use strict";var r=n(9),i=n(10),o=n(62);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(56);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(23).f,i=n(57),o=n(4)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){"use strict";var r=n(2),i=n(23),o=n(15),s=n(4)("species");t.exports=function(t){var e=r[t];o&&e&&!e[s]&&i.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(4)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(52),i=n(106),o=n(63),s=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*s,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var r=n(59),i=n(107),o=n(64);t.exports=function(t,e,n,s){var a=String(o(t)),u=a.length,c=void 0===n?" ":String(n),h=r(e);if(h<=u||""==c)return a;var l=h-u,f=i.call(c,Math.ceil(l/c.length));return f.length>l&&(f=f.slice(0,l)),s?f+a:a+f}},function(t,e,n){"use strict";var r=n(60),i=n(64);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=c(n(11)),o=c(n(127)),s=c(n(26)),a=c(n(82)),u=c(n(159));function c(t){return t&&t.__esModule?t:{default:t}}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var l=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];h(this,t),(0,i.default)(this),this.mse=void 0,this.url=e,this.inited=!1,r&&(this.video=r),n.dashOpts&&n.dashOpts.drm&&(this.eme=new u.default(n.dashOpts.drm))}return r(t,[{key:"getData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new Promise((function(n,r){new s.default(t,n,e).once("error",(function(t){self.emit("error",t)}))}))}},{key:"init",value:function(t){var e=this,n=new o.default(t);this.mpd=n;var r=this,i=void 0,s=void 0,u=void 0;return new Promise((function(t,o){n.once("ready",(function(){r.type=n.type,s=n.mediaList.video,u=n.mediaList.audio,r.eme&&(r.eme.setOptions(s[s.selectedIdx].mimeType+'; codecs="'+s[s.selectedIdx].codecs+'"',u[u.selectedIdx].mimeType+'; codecs="'+u[u.selectedIdx].codecs+'"'),r.eme.SetupEME(r.video)),(i=new a.default).on("sourceopen",(function(){["video","audio"].forEach((function(t){var e=n.mediaList[t];i.addSourceBuffer(e[e.selectedIdx].mimeType+';codecs="'+e[e.selectedIdx].codecs+'"'),r.getData(e[e.selectedIdx].initSegment,e[e.selectedIdx].initSegmentRange).then((function(t){i.appendBuffer(e[0].mimeType+';codecs="'+e[0].codecs+'"',t),i.once(e[e.selectedIdx].mimeType+';codecs="'+e[e.selectedIdx].codecs+'" updateend',(function(){e[e.selectedIdx].inited=!0,i.emit("updateend")}))}))}))})),i.on("updateend",(function(t){s[s.selectedIdx].inited&&u[u.selectedIdx].inited&&(r.inited=!0,(s[s.selectedIdx].encrypted||u[u.selectedIdx].encrypted)&&r.eme.emit("encrypted"),"vod"===r.type&&(r.seek(0),r.emit("startPlay")))})),i.on("error",(function(t){o(t),console.log("mse error")})),r.mse=i,t(i)})),n.once("end",(function(){"live"===e.type&&r.mse.endOfStream()}))}))}},{key:"seek",value:function(t){var e=this,n=this.mpd.seek(t);["video","audio"].forEach((function(t){n[t].length>0&&n[t].every((function(n){if(n.downloaded)return!0;new s.default(n.url,(function(r){if("Not Found"===r){if(n.tryTimes||(n.tryTimes=0),n.tryTimes++,n.tryTimes<=2)return!0}else e.mse.appendBuffer(e.mpd.mediaList[t][0].mimeType+';codecs="'+e.mpd.mediaList[t][0].codecs+'"',new Uint8Array(r));var i=n.idx,o=e.mpd.mediaList[t];o[o.selectedIdx].mediaSegments.every((function(t){return t.idx!==i||(t.downloaded=!0,!1)}))}),n.range);return!0}))}))}}]),t}();e.default=l,t.exports=e.default},function(t,e,n){"use strict";var r=n(65),i=n(110),o=n(114),s=n(122),a=n(123);(t.exports=function(t,e){var n,i,u,c,h;return arguments.length<2||"string"!=typeof t?(c=e,e=t,t=null):c=arguments[2],r(t)?(n=a.call(t,"c"),i=a.call(t,"e"),u=a.call(t,"w")):(n=u=!0,i=!1),h={value:e,configurable:n,enumerable:i,writable:u},c?o(s(c),h):h}).gs=function(t,e,n){var u,c,h,l;return"string"!=typeof t?(h=n,n=e,e=t,t=null):h=arguments[3],r(e)?i(e)?r(n)?i(n)||(h=n,n=void 0):n=void 0:(h=e,e=n=void 0):e=void 0,r(t)?(u=a.call(t,"c"),c=a.call(t,"e")):(u=!0,c=!1),l={get:e,set:n,configurable:u,enumerable:c},h?o(s(h),l):l}},function(t,e,n){"use strict";var r=n(111),i=/^\s*class[\s{/}]/,o=Function.prototype.toString;t.exports=function(t){return!!r(t)&&!i.test(o.call(t))}},function(t,e,n){"use strict";var r=n(112);t.exports=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(t){return!1}return!r(t)}},function(t,e,n){"use strict";var r=n(113);t.exports=function(t){if(!r(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(65),o={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!i(t)&&hasOwnProperty.call(o,void 0===t?"undefined":r(t))}},function(t,e,n){"use strict";t.exports=n(115)()?Object.assign:n(116)},function(t,e,n){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},function(t,e,n){"use strict";var r=n(117),i=n(121),o=Math.max;t.exports=function(t,e){var n,s,a,u=o(arguments.length,2);for(t=Object(i(t)),a=function(r){try{t[r]=e[r]}catch(t){n||(n=t)}},s=1;s<u;++s)e=arguments[s],r(e).forEach(a);if(void 0!==n)throw n;return t}},function(t,e,n){"use strict";t.exports=n(118)()?Object.keys:n(119)},function(t,e,n){"use strict";t.exports=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}},function(t,e,n){"use strict";var r=n(25),i=Object.keys;t.exports=function(t){return i(r(t)?Object(t):t)}},function(t,e,n){"use strict";t.exports=function(){}},function(t,e,n){"use strict";var r=n(25);t.exports=function(t){if(!r(t))throw new TypeError("Cannot use null or undefined");return t}},function(t,e,n){"use strict";var r=n(25),i=Array.prototype.forEach,o=Object.create,s=function(t,e){var n;for(n in t)e[n]=t[n]};t.exports=function(t){var e=o(null);return i.call(arguments,(function(t){r(t)&&s(Object(t),e)})),e}},function(t,e,n){"use strict";t.exports=n(124)()?String.prototype.contains:n(125)},function(t,e,n){"use strict";var r="razdwatrzy";t.exports=function(){return"function"==typeof r.contains&&(!0===r.contains("dwa")&&!1===r.contains("foo"))}},function(t,e,n){"use strict";var r=String.prototype.indexOf;t.exports=function(t){return r.call(this,t,arguments[1])>-1}},function(t,e,n){"use strict";t.exports=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=h(n(11)),o=h(n(66)),s=h(n(67)),a=h(n(26)),u=h(n(128)),c=h(n(133));function h(t){return t&&t.__esModule?t:{default:t}}var l=function(t){return"video/mp4"===t},f=function(t){return"audio/mp4"===t},p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.url=e,this.mediaList={video:[],audio:[]},this.retryMax=10,this.retry=0,this.type="live",this.isEnd=!1,this.duration=0,this.init(e),(0,i.default)(this)}return r(t,[{key:"getRangeData",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return new Promise((function(n,r){new a.default(t,n,e).once("error",(function(t){self.emit("error",t)}))}))}},{key:"fetch",value:function(t){var e=this,n={TYPE:"LIVE",ENDLIST:""},r=[];return new Promise((function(i,a){new s.default({type:"",url:t}).then((function(s){var h=s.responseText;if(h){var p=c.default.parseString,d=[];p(h,(function(s,a){s&&console.log("MPD解析错误:"+s),"static"===a.MPD.$.type&&(n.TYPE="VOD"),a.MPD.$.minBufferTime&&(n.minBufferTime=o.default.durationConvert(a.MPD.$.minBufferTime)),a.MPD.$.maxSegmentDuration&&(n.maxSegmentDuration=o.default.durationConvert(a.MPD.$.maxSegmentDuration)),a.MPD.$.mediaPresentationDuration&&(e.duration=o.default.durationConvert(a.MPD.$.mediaPresentationDuration));var c=a.MPD.Period[0];!e.duration&&c.$&&c.$.duration&&(e.duration=o.default.durationConvert(c.$.duration)),n.duration=e.duration;var h=0,p=0,y=!1;c.AdaptationSet.forEach((function(s){var a="video/mp4",c="avc1.64001E",m="640",g="360",v="25",b="1:1",w="1",_="588633";s.$.mimeType&&(a=s.$.mimeType,l(a)?(c=s.$.codecs,m=parseFloat(s.$.width),g=parseFloat(s.$.height),parseFloat(s.$.maxWidth),parseFloat(s.$.maxHeight),v=parseFloat(s.$.frameRate),b=s.$.sar,w=s.$.startWithSAP,_=parseFloat(s.$.bandwidth)):f(a)&&(c=s.$.codecs,w=s.$.startWithSAP,_=parseFloat(s.$.bandwidth))),s.Representation.forEach((function(T){d.indexOf(T.$.id)>-1&&(T.$.id=(parseInt(d[d.length-1])+1).toString()),d.push(T.$.id);var E="",x=[],O=0,S=0,D=t.slice(0,t.lastIndexOf("/")+1);T.$.mimeType&&(a=T.$.mimeType),l(a)?(T.$.codecs&&(c=T.$.codecs),T.$.width&&(m=parseFloat(T.$.width)),T.$.height&&(g=parseFloat(T.$.height)),T.$.maxWidth&&parseFloat(T.$.maxWidth),T.$.maxHeight&&parseFloat(T.$.maxHeight),T.$.frameRate&&(v=parseFloat(T.$.frameRate)),T.$.sar&&(b=T.$.sar),T.$.startWithSAP&&(w=T.$.startWithSAP),T.$.bandwidth&&(_=parseFloat(T.$.bandwidth))):f(a)&&(T.$.codecs&&(c=T.$.codecs),T.$.startWithSAP&&(w=T.$.startWithSAP),T.$.bandwidth&&(_=parseFloat(T.$.bandwidth))),T.BaseURL&&T.BaseURL.length>0&&(D+=T.BaseURL[0]);var I=!1;if((s.ContentProtection||T.ContentProtection)&&(I=!0),y=s.SegmentBase&&s.SegmentBase.length>0||T.SegmentBase&&T.SegmentBase.length>0){var P=void 0;s.SegmentBase&&s.SegmentBase.length>0?P=s.SegmentBase[0]:T.SegmentBase&&T.SegmentBase.length>0&&(P=T.SegmentBase[0]),O=parseFloat(P.$.timescale);var N=parseInt(P.Initialization[0].$.range.split("-")[0]),A=parseInt(P.Initialization[0].$.range.split("-")[1]),C=parseInt(P.$.indexRange.split("-")[0]),M=parseInt(P.$.indexRange.split("-")[1]);"audio/mp4"===a?p++:h++,e.getRangeData(D,[C,M]).then((function(t){try{new u.default(t).boxes.every((function(n){if("sidx"===n.type){var r=[],i=0,o=0,s=M+1,u=s-1;return n.references.forEach((function(t,e){o+=t.subsegment_duration,u+=t.referenced_size,r.push({idx:e,url:D,start:parseInt(i/n.timescale),end:o/n.timescale,range:[s,u],downloaded:!1,segmentDuration:t.subsegment_duration/n.timescale,reference_type:t.reference_type,starts_with_SAP:t.starts_with_SAP,SAP_type:t.SAP_type,SAP_delta_time:t.SAP_delta_time}),i=o+1,s=u+1})),r[0].startTime_=0,r.forEach((function(t,e){e>0&&(t.startTime_=r[e-1].startTime_+r[e-1].segmentDuration)})),e.mediaList["video/mp4"===a?"video":"audio"].push({id:"video/mp4"===a?""+e.mediaList.video.length:"0",codecs:"video/mp4"===a?"avc1.64001E":"mp4a.40.2",baseURL:D,initSegment:D,initSegmentRange:[N,A],inited:!1,mediaSegments:r,mimeType:a,sidxRes:t,timescale:n.timescale,width:parseFloat(T.$.width)||m,height:parseFloat(T.$.height)||g,bandwidth:parseFloat(T.$.bandwidth),encrypted:I}),!1}return!0})),"video/mp4"===a?h--:p--,h||p||(e.type="vod",["video","audio"].forEach((function(t){e.mediaList[t].selectedIdx=0,e.mediaList[t].sort((function(t,e){return e.bandwidth-t.bandwidth}))})),i({meta:n,segments:r}))}catch(t){return e.emit("error",t.type?t:new Errors("parse","",{line:176,handle:"[MP4] init",msg:t.message})),!1}}))}else{var L=void 0;if(s.SegmentTemplate&&s.SegmentTemplate.length>0?L=s.SegmentTemplate[0]:T.SegmentTemplate&&T.SegmentTemplate.length>0&&(L=T.SegmentTemplate[0]),L){E=L.$.initialization,O=parseFloat(L.$.timescale);for(var R=(S=parseFloat(L.$.duration))/O,j=parseInt(L.$.startNumber),k=j+Math.ceil(e.duration/R)-1,F=j;F<=k;F++){var B=R*(F-j),U=R*(F-j+1);F===k&&(R=e.duration-R*(k-j),U=e.duration),x.push({idx:F,start:B,end:U,url:D+L.$.media.replace(/\$RepresentationID\$/g,T.$.id).replace(/\$Number\$/g,o.default.preFixInterge(F,1)),downloaded:!1,segmentDuration:R})}}var V={id:T.$.id,baseURL:D,initSegment:D+E.replace(/\$RepresentationID\$/g,T.$.id),inited:!1,mediaSegments:x,mimeType:a,codecs:c,startWithSAP:w,bandwidth:_,timescale:O,duration:S,encrypted:I};l(a)?(V.width=m,V.height=g,V.frameRate=v,V.sar=b,e.mediaList.video.push(V)):f(a)&&e.mediaList.audio.push(V)}}))})),y||(["video","audio"].forEach((function(t){e.mediaList[t].selectedIdx=0,e.mediaList[t].sort((function(t,e){return e.bandwidth-t.bandwidth}))})),i({meta:n,segments:r}))}))}else a(new Error("parse error"))})).catch((function(t){a(t)}))}))}},{key:"init",value:function(t){var e=this;this.fetch(t).then((function(t){e.type=t.meta.TYPE.toLocaleLowerCase(),e.emit("ready")}),(function(){console.log("mpd init reject"),["video","audio"].forEach((function(t){e.mediaList[t]=[]})),e.retry++,e.retry<e.retryMax&&e.init(t)}))}},{key:"seek",value:function(t){var e=this,n={};return"vod"!==this.type&&void 0===t||["video","audio"].forEach((function(r){var i=e.mediaList[r][e.mediaList[r].selectedIdx];n[r]=i.mediaSegments.filter((function(e){return(e.start<=t&&t<e.end||e.start<=t-e.segmentDuration&&t-e.segmentDuration<e.end||e.start<=t+e.segmentDuration&&t+e.segmentDuration<e.end)&&!e.downloaded}))})),n}}]),t}();e.default=p,t.exports=e.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(68)),i=a(n(130)),o=a(n(27)),s=a(n(132));function a(t){return t&&t.__esModule?t:{default:t}}var u,c,h,l;u={},c=["box\\sidx"],h=s.default,l=u,c.map((function(t,e){l[t]=e==c.length-1?h:l[t]||{},l=l[t]}));e.default=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.buffer=null,this.boxes=[],this.nextBox=null,this.start=0;this.buffer?(0,i.default)(Uint8Array,this.buffer,e):this.buffer=e;var n=e.byteLength;e.position=0;for(var s=new o.default(e);n-s.position>=8;){var a=new r.default;if(a.readHeader(s),a.size-8<=n-s.position)a.readBody(s),this.boxes.push(a);else{if("mdat"!==a.type){this.nextBox=a,s.position-=8;break}a.readBody(s),this.boxes.push(a)}}this.buffer=new Uint8Array(this.buffer.slice(s.position))},t.exports=e.default},function(t){t.exports=JSON.parse('{"name":"royplayer-dash","version":"0.0.4","description":"royplayer plugin for MPEG-DASH","main":"./dist/index.js","scripts":{"prepare":"npm run build","build":"webpack --progress --display-chunks -p","watch":"webpack --progress --display-chunks -p --watch"},"repository":{"type":"git","url":"git@github.com:littleants707/royplayer.git"},"babel":{"presets":["es2015"],"plugins":["add-module-exports","babel-plugin-bulk-import"]},"keywords":["MPEG-DASH","mp4","fmp4","player","video"],"author":"295446101@qq.com","license":"MIT","dependencies":{"concat-typed-array":"^1.0.2","deepmerge":"^2.0.1","event-emitter":"^0.3.5","xml2js":"^0.4.19"},"peerDependency":{"royplayer":"^0.1.0"},"devDependencies":{"babel-core":"^6.26.3","babel-loader":"^7.1.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-bulk-import":"^1.0.2","babel-preset-es2015":"^6.24.1","json-loader":"^0.5.7","webpack":"^4.11.0","webpack-cli":"^3.1.2"}}')},function(t,e,n){"use strict";var r,i=n(131),o=(r=i)&&r.__esModule?r:{default:r};t.exports=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=0,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=!0,s=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var h=u.value;e+=h.length}}catch(t){s=!0,a=t}finally{try{!o&&c.return&&c.return()}finally{if(s)throw a}}var l=new t(e),f=0,p=!0,d=!1,y=void 0;try{for(var m,g=r[Symbol.iterator]();!(p=(m=g.next()).done);p=!0){var v=m.value;l.set(v,f),f+=v.length}}catch(t){d=!0,y=t}finally{try{!p&&g.return&&g.return()}finally{if(d)throw y}}return l}},function(t,e,n){"use strict";var r=o(n(68)),i=o(n(27));function o(t){return t&&t.__esModule?t:{default:t}}r.default.sidx=function(){var t=new i.default(this.data);this.version=t.readUint8(),this.flag=i.default.readByte(t.dataview,3),this.reference_ID=t.readUint32(),this.timescale=t.readUint32(),0===this.version?(this.earliest_presentation_time=t.readUint32(),this.first_offset=t.readUint32()):(this.earliest_presentation_time=t.readUint64(),this.first_offset=t.readUint64()),t.readUint16(),this.references=[];for(var e=t.readUint16(),n=0;n<e;n++){var r={};this.references.push(r);var o=t.readUint32();r.reference_type=o>>31&1,r.referenced_size=2147483647&o,r.subsegment_duration=t.readUint32(),o=t.readUint32(),r.starts_with_SAP=o>>31&1,r.SAP_type=o>>28&7,r.SAP_delta_time=268435455&o}delete this.subBox,delete this.data,t=null}},function(t,e,n){"use strict";(function(){var t,r,i,o,s={}.hasOwnProperty;r=n(29),t=n(134),i=n(143),o=n(81),e.defaults=r.defaults,e.processors=o,e.ValidationError=function(t){function e(t){this.message=t}return function(t,e){for(var n in e)s.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(e,Error),e}(),e.Builder=t.Builder,e.Parser=i.Parser,e.parseString=i.parseString,e.parseStringPromise=i.parseStringPromise}).call(void 0)},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){var t,i,o,s,a,u={}.hasOwnProperty;t=n(135),i=n(29).defaults,s=function(t){return"string"==typeof t&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)},a=function(t){return"<![CDATA["+o(t)+"]]>"},o=function(t){return t.replace("]]>","]]]]><![CDATA[>")},e.Builder=function(){function e(t){var e,n,r;for(e in this.options={},n=i[.2])u.call(n,e)&&(r=n[e],this.options[e]=r);for(e in t)u.call(t,e)&&(r=t[e],this.options[e]=r)}return e.prototype.buildObject=function(e){var n,o,c,h,l,f;return n=this.options.attrkey,o=this.options.charkey,1===Object.keys(e).length&&this.options.rootName===i[.2].rootName?e=e[l=Object.keys(e)[0]]:l=this.options.rootName,f=this,c=function(t,e){var i,h,l,p,d,y;if("object"!==(void 0===e?"undefined":r(e)))f.options.cdata&&s(e)?t.raw(a(e)):t.txt(e);else if(Array.isArray(e)){for(p in e)if(u.call(e,p))for(d in h=e[p])l=h[d],t=c(t.ele(d),l).up()}else for(d in e)if(u.call(e,d))if(h=e[d],d===n){if("object"===(void 0===h?"undefined":r(h)))for(i in h)y=h[i],t=t.att(i,y)}else if(d===o)t=f.options.cdata&&s(h)?t.raw(a(h)):t.txt(h);else if(Array.isArray(h))for(p in h)u.call(h,p)&&(t="string"==typeof(l=h[p])?f.options.cdata&&s(l)?t.ele(d).raw(a(l)).up():t.ele(d,l).up():c(t.ele(d),l).up());else"object"===(void 0===h?"undefined":r(h))?t=c(t.ele(d),h).up():"string"==typeof h&&f.options.cdata&&s(h)?t=t.ele(d).raw(a(h)).up():(null==h&&(h=""),t=t.ele(d,h.toString()).up());return t},h=t.create(l,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),c(h,e).end(this.options.renderOpts)},e}()}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o,s,a,u,c,h,l;l=n(3),c=l.assign,h=l.isFunction,i=n(69),o=n(70),s=n(141),u=n(43),a=n(142),e=n(0),r=n(17),t.exports.create=function(t,e,n,r){var i,s;if(null==t)throw new Error("Root element needs a name.");return r=c({},e,n,r),s=(i=new o(r)).element(t),r.headless||(i.declaration(r),null==r.pubID&&null==r.sysID||i.dtd(r)),s},t.exports.begin=function(t,e,n){var r;return h(t)&&(e=(r=[t,e])[0],n=r[1],t={}),e?new s(t,e,n):new o(t)},t.exports.stringWriter=function(t){return new u(t)},t.exports.streamWriter=function(t,e){return new a(t,e)},t.exports.implementation=new i,t.exports.nodeType=e,t.exports.writerState=r}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r;e=n(137),r=n(138),t.exports=function(){function t(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}return Object.defineProperty(t.prototype,"parameterNames",{get:function(){return new r(Object.keys(this.defaultParams))}}),t.prototype.getParameter=function(t){return this.params.hasOwnProperty(t)?this.params[t]:null},t.prototype.canSetParameter=function(t,e){return!0},t.prototype.setParameter=function(t,e){return null!=e?this.params[t]=e:delete this.params[t]},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){t.exports=function(){function t(){}return t.prototype.handleError=function(t){throw new Error(t)},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){t.exports=function(){function t(t){this.arr=t||[]}return Object.defineProperty(t.prototype,"length",{get:function(){return this.arr.length}}),t.prototype.item=function(t){return this.arr[t]||null},t.prototype.contains=function(t){return-1!==this.arr.indexOf(t)},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){t.exports=function(){function t(t){this.nodes=t}return Object.defineProperty(t.prototype,"length",{get:function(){return this.nodes.length||0}}),t.prototype.clone=function(){return this.nodes=null},t.prototype.item=function(t){return this.nodes[t]||null},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){t.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o,s,a,u,c,h,l,f,p,d,y,m,g,v,b,w,_,T,E,x,O={}.hasOwnProperty;x=n(3),T=x.isObject,_=x.isFunction,E=x.isPlainObject,w=x.getValue,e=n(0),p=n(70),d=n(30),o=n(32),s=n(33),m=n(40),b=n(41),y=n(42),l=n(34),f=n(35),a=n(36),c=n(37),u=n(38),h=n(39),i=n(71),v=n(73),g=n(43),r=n(17),t.exports=function(){function t(t,n,r){var i;this.name="?xml",this.type=e.Document,t||(t={}),i={},t.writer?E(t.writer)&&(i=t.writer,t.writer=new g):t.writer=new g,this.options=t,this.writer=t.writer,this.writerOptions=this.writer.filterOptions(i),this.stringify=new v(t),this.onDataCallback=n||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return t.prototype.createChildNode=function(t){var n,r,i,o,s,a,u,c;switch(t.type){case e.CData:this.cdata(t.value);break;case e.Comment:this.comment(t.value);break;case e.Element:for(r in i={},u=t.attribs)O.call(u,r)&&(n=u[r],i[r]=n.value);this.node(t.name,i);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(t.value);break;case e.Text:this.text(t.value);break;case e.ProcessingInstruction:this.instruction(t.target,t.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+t.constructor.name)}for(s=0,a=(c=t.children).length;s<a;s++)o=c[s],this.createChildNode(o),o.type===e.Element&&this.up();return this},t.prototype.dummy=function(){return this},t.prototype.node=function(t,e,n){var r;if(null==t)throw new Error("Missing node name.");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node. "+this.debugInfo(t));return this.openCurrent(),t=w(t),null==e&&(e={}),e=w(e),T(e)||(n=(r=[e,n])[0],e=r[1]),this.currentNode=new d(this,t,e),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},t.prototype.element=function(t,n,r){var i,o,s,a,u,c;if(this.currentNode&&this.currentNode.type===e.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(t)||T(t)||_(t))for(a=this.options.noValidation,this.options.noValidation=!0,(c=new p(this.options).element("TEMP_ROOT")).element(t),this.options.noValidation=a,o=0,s=(u=c.children).length;o<s;o++)i=u[o],this.createChildNode(i),i.type===e.Element&&this.up();else this.node(t,n,r);return this},t.prototype.attribute=function(t,e){var n,r;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(t));if(null!=t&&(t=w(t)),T(t))for(n in t)O.call(t,n)&&(r=t[n],this.attribute(n,r));else _(e)&&(e=e.apply()),this.options.keepNullAttributes&&null==e?this.currentNode.attribs[t]=new i(this,t,""):null!=e&&(this.currentNode.attribs[t]=new i(this,t,e));return this},t.prototype.text=function(t){var e;return this.openCurrent(),e=new b(this,t),this.onData(this.writer.text(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.cdata=function(t){var e;return this.openCurrent(),e=new o(this,t),this.onData(this.writer.cdata(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.comment=function(t){var e;return this.openCurrent(),e=new s(this,t),this.onData(this.writer.comment(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.raw=function(t){var e;return this.openCurrent(),e=new m(this,t),this.onData(this.writer.raw(e,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.instruction=function(t,e){var n,r,i,o,s;if(this.openCurrent(),null!=t&&(t=w(t)),null!=e&&(e=w(e)),Array.isArray(t))for(n=0,o=t.length;n<o;n++)r=t[n],this.instruction(r);else if(T(t))for(r in t)O.call(t,r)&&(i=t[r],this.instruction(r,i));else _(e)&&(e=e.apply()),s=new y(this,t,e),this.onData(this.writer.processingInstruction(s,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},t.prototype.declaration=function(t,e,n){var r;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return r=new l(this,t,e,n),this.onData(this.writer.declaration(r,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.doctype=function(t,e,n){if(this.openCurrent(),null==t)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new f(this,e,n),this.currentNode.rootNodeName=t,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},t.prototype.dtdElement=function(t,e){var n;return this.openCurrent(),n=new u(this,t,e),this.onData(this.writer.dtdElement(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.attList=function(t,e,n,r,i){var o;return this.openCurrent(),o=new a(this,t,e,n,r,i),this.onData(this.writer.dtdAttList(o,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.entity=function(t,e){var n;return this.openCurrent(),n=new c(this,!1,t,e),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.pEntity=function(t,e){var n;return this.openCurrent(),n=new c(this,!0,t,e),this.onData(this.writer.dtdEntity(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.notation=function(t,e){var n;return this.openCurrent(),n=new h(this,t,e),this.onData(this.writer.dtdNotation(n,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},t.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},t.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},t.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},t.prototype.openNode=function(t){var n,i,o,s;if(!t.isOpen){if(this.root||0!==this.currentLevel||t.type!==e.Element||(this.root=t),i="",t.type===e.Element){for(o in this.writerOptions.state=r.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<"+t.name,s=t.attribs)O.call(s,o)&&(n=s[o],i+=this.writer.attribute(n,this.writerOptions,this.currentLevel));i+=(t.children?">":"/>")+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.InsideTag}else this.writerOptions.state=r.OpenTag,i=this.writer.indent(t,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+t.rootNodeName,t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),t.children?(i+=" [",this.writerOptions.state=r.InsideTag):(this.writerOptions.state=r.CloseTag,i+=">"),i+=this.writer.endline(t,this.writerOptions,this.currentLevel);return this.onData(i,this.currentLevel),t.isOpen=!0}},t.prototype.closeNode=function(t){var n;if(!t.isClosed)return n="",this.writerOptions.state=r.CloseTag,n=t.type===e.Element?this.writer.indent(t,this.writerOptions,this.currentLevel)+"</"+t.name+">"+this.writer.endline(t,this.writerOptions,this.currentLevel):this.writer.indent(t,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(t,this.writerOptions,this.currentLevel),this.writerOptions.state=r.None,this.onData(n,this.currentLevel),t.isClosed=!0},t.prototype.onData=function(t,e){return this.documentStarted=!0,this.onDataCallback(t,e+1)},t.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},t.prototype.debugInfo=function(t){return null==t?"":"node: <"+t+">"},t.prototype.ele=function(){return this.element.apply(this,arguments)},t.prototype.nod=function(t,e,n){return this.node(t,e,n)},t.prototype.txt=function(t){return this.text(t)},t.prototype.dat=function(t){return this.cdata(t)},t.prototype.com=function(t){return this.comment(t)},t.prototype.ins=function(t,e){return this.instruction(t,e)},t.prototype.dec=function(t,e,n){return this.declaration(t,e,n)},t.prototype.dtd=function(t,e,n){return this.doctype(t,e,n)},t.prototype.e=function(t,e,n){return this.element(t,e,n)},t.prototype.n=function(t,e,n){return this.node(t,e,n)},t.prototype.t=function(t){return this.text(t)},t.prototype.d=function(t){return this.cdata(t)},t.prototype.c=function(t){return this.comment(t)},t.prototype.r=function(t){return this.raw(t)},t.prototype.i=function(t,e){return this.instruction(t,e)},t.prototype.att=function(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.a=function(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.ent=function(t,e){return this.entity(t,e)},t.prototype.pent=function(t,e){return this.pEntity(t,e)},t.prototype.not=function(t,e){return this.notation(t,e)},t}()}).call(void 0)},function(t,e,n){"use strict";(function(){var e,r,i,o={}.hasOwnProperty;e=n(0),i=n(74),r=n(17),t.exports=function(t){function n(t,e){this.stream=t,n.__super__.constructor.call(this,e)}return function(t,e){for(var n in e)o.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(n,t),n.prototype.endline=function(t,e,i){return t.isLastRootNode&&e.state===r.CloseTag?"":n.__super__.endline.call(this,t,e,i)},n.prototype.document=function(t,e){var n,r,i,o,s,a,u,c,h;for(r=i=0,s=(u=t.children).length;i<s;r=++i)(n=u[r]).isLastRootNode=r===t.children.length-1;for(e=this.filterOptions(e),h=[],o=0,a=(c=t.children).length;o<a;o++)n=c[o],h.push(this.writeChildNode(n,e,0));return h},n.prototype.attribute=function(t,e,r){return this.stream.write(n.__super__.attribute.call(this,t,e,r))},n.prototype.cdata=function(t,e,r){return this.stream.write(n.__super__.cdata.call(this,t,e,r))},n.prototype.comment=function(t,e,r){return this.stream.write(n.__super__.comment.call(this,t,e,r))},n.prototype.declaration=function(t,e,r){return this.stream.write(n.__super__.declaration.call(this,t,e,r))},n.prototype.docType=function(t,e,n){var i,o,s,a;if(n||(n=0),this.openNode(t,e,n),e.state=r.OpenTag,this.stream.write(this.indent(t,e,n)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t,e,n)),e.state=r.InsideTag,o=0,s=(a=t.children).length;o<s;o++)i=a[o],this.writeChildNode(i,e,n+1);e.state=r.CloseTag,this.stream.write("]")}return e.state=r.CloseTag,this.stream.write(e.spaceBeforeSlash+">"),this.stream.write(this.endline(t,e,n)),e.state=r.None,this.closeNode(t,e,n)},n.prototype.element=function(t,n,i){var s,a,u,c,h,l,f,p,d;for(f in i||(i=0),this.openNode(t,n,i),n.state=r.OpenTag,this.stream.write(this.indent(t,n,i)+"<"+t.name),p=t.attribs)o.call(p,f)&&(s=p[f],this.attribute(s,n,i));if(c=0===(u=t.children.length)?null:t.children[0],0===u||t.children.every((function(t){return(t.type===e.Text||t.type===e.Raw)&&""===t.value})))n.allowEmpty?(this.stream.write(">"),n.state=r.CloseTag,this.stream.write("</"+t.name+">")):(n.state=r.CloseTag,this.stream.write(n.spaceBeforeSlash+"/>"));else if(!n.pretty||1!==u||c.type!==e.Text&&c.type!==e.Raw||null==c.value){for(this.stream.write(">"+this.endline(t,n,i)),n.state=r.InsideTag,h=0,l=(d=t.children).length;h<l;h++)a=d[h],this.writeChildNode(a,n,i+1);n.state=r.CloseTag,this.stream.write(this.indent(t,n,i)+"</"+t.name+">")}else this.stream.write(">"),n.state=r.InsideTag,n.suppressPrettyCount++,!0,this.writeChildNode(c,n,i+1),n.suppressPrettyCount--,!1,n.state=r.CloseTag,this.stream.write("</"+t.name+">");return this.stream.write(this.endline(t,n,i)),n.state=r.None,this.closeNode(t,n,i)},n.prototype.processingInstruction=function(t,e,r){return this.stream.write(n.__super__.processingInstruction.call(this,t,e,r))},n.prototype.raw=function(t,e,r){return this.stream.write(n.__super__.raw.call(this,t,e,r))},n.prototype.text=function(t,e,r){return this.stream.write(n.__super__.text.call(this,t,e,r))},n.prototype.dtdAttList=function(t,e,r){return this.stream.write(n.__super__.dtdAttList.call(this,t,e,r))},n.prototype.dtdElement=function(t,e,r){return this.stream.write(n.__super__.dtdElement.call(this,t,e,r))},n.prototype.dtdEntity=function(t,e,r){return this.stream.write(n.__super__.dtdEntity.call(this,t,e,r))},n.prototype.dtdNotation=function(t,e,r){return this.stream.write(n.__super__.dtdNotation.call(this,t,e,r))},n}(i)}).call(void 0)},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(function(){var t,i,o,s,a,u,c,h,l=function(t,e){return function(){return t.apply(e,arguments)}},f={}.hasOwnProperty;c=n(144),o=n(18),t=n(158),u=n(81),h=n(79).setImmediate,i=n(29).defaults,s=function(t){return"object"===(void 0===t?"undefined":r(t))&&null!=t&&0===Object.keys(t).length},a=function(t,e,n){var r,i;for(r=0,i=t.length;r<i;r++)e=(0,t[r])(e,n);return e},e.Parser=function(n){function o(t){var n,r,o;if(this.parseStringPromise=l(this.parseStringPromise,this),this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this),!(this instanceof e.Parser))return new e.Parser(t);for(n in this.options={},r=i[.2])f.call(r,n)&&(o=r[n],this.options[n]=o);for(n in t)f.call(t,n)&&(o=t[n],this.options[n]=o);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(u.normalize)),this.reset()}return function(t,e){for(var n in e)f.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype}(o,n),o.prototype.processAsync=function(){var t,e;try{return this.remaining.length<=this.options.chunkSize?(t=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(t),this.saxParser.close()):(t=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(t),h(this.processAsync))}catch(t){if(e=t,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(e)}},o.prototype.assignOrPush=function(t,e,n){return e in t?(t[e]instanceof Array||(t[e]=[t[e]]),t[e].push(n)):this.options.explicitArray?t[e]=[n]:t[e]=n},o.prototype.reset=function(){var t,e,n,i,o;return this.removeAllListeners(),this.saxParser=c.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=(o=this,function(t){if(o.saxParser.resume(),!o.saxParser.errThrown)return o.saxParser.errThrown=!0,o.emit("error",t)}),this.saxParser.onend=function(t){return function(){if(!t.saxParser.ended)return t.saxParser.ended=!0,t.emit("end",t.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,i=[],t=this.options.attrkey,e=this.options.charkey,this.saxParser.onopentag=function(n){return function(r){var o,s,u,c,h;if((u={})[e]="",!n.options.ignoreAttrs)for(o in h=r.attributes)f.call(h,o)&&(t in u||n.options.mergeAttrs||(u[t]={}),s=n.options.attrValueProcessors?a(n.options.attrValueProcessors,r.attributes[o],o):r.attributes[o],c=n.options.attrNameProcessors?a(n.options.attrNameProcessors,o):o,n.options.mergeAttrs?n.assignOrPush(u,c,s):u[t][c]=s);return u["#name"]=n.options.tagNameProcessors?a(n.options.tagNameProcessors,r.name):r.name,n.options.xmlns&&(u[n.options.xmlnskey]={uri:r.uri,local:r.local}),i.push(u)}}(this),this.saxParser.onclosetag=function(t){return function(){var n,o,u,c,h,l,p,d,y,m;if(l=i.pop(),h=l["#name"],t.options.explicitChildren&&t.options.preserveChildrenOrder||delete l["#name"],!0===l.cdata&&(n=l.cdata,delete l.cdata),y=i[i.length-1],l[e].match(/^\s*$/)&&!n?(o=l[e],delete l[e]):(t.options.trim&&(l[e]=l[e].trim()),t.options.normalize&&(l[e]=l[e].replace(/\s{2,}/g," ").trim()),l[e]=t.options.valueProcessors?a(t.options.valueProcessors,l[e],h):l[e],1===Object.keys(l).length&&e in l&&!t.EXPLICIT_CHARKEY&&(l=l[e])),s(l)&&(l=""!==t.options.emptyTag?t.options.emptyTag:o),null!=t.options.validator&&(m="/"+function(){var t,e,n;for(n=[],t=0,e=i.length;t<e;t++)c=i[t],n.push(c["#name"]);return n}().concat(h).join("/"),function(){var e;try{l=t.options.validator(m,y&&y[h],l)}catch(n){return e=n,t.emit("error",e)}}()),t.options.explicitChildren&&!t.options.mergeAttrs&&"object"===(void 0===l?"undefined":r(l)))if(t.options.preserveChildrenOrder){if(y){for(u in y[t.options.childkey]=y[t.options.childkey]||[],p={},l)f.call(l,u)&&(p[u]=l[u]);y[t.options.childkey].push(p),delete l["#name"],1===Object.keys(l).length&&e in l&&!t.EXPLICIT_CHARKEY&&(l=l[e])}}else c={},t.options.attrkey in l&&(c[t.options.attrkey]=l[t.options.attrkey],delete l[t.options.attrkey]),!t.options.charsAsChildren&&t.options.charkey in l&&(c[t.options.charkey]=l[t.options.charkey],delete l[t.options.charkey]),Object.getOwnPropertyNames(l).length>0&&(c[t.options.childkey]=l),l=c;return i.length>0?t.assignOrPush(y,h,l):(t.options.explicitRoot&&(d=l,(l={})[h]=d),t.resultObject=l,t.saxParser.ended=!0,t.emit("end",t.resultObject))}}(this),n=function(t){return function(n){var r,o;if(o=i[i.length-1])return o[e]+=n,t.options.explicitChildren&&t.options.preserveChildrenOrder&&t.options.charsAsChildren&&(t.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(o[t.options.childkey]=o[t.options.childkey]||[],(r={"#name":"__text__"})[e]=n,t.options.normalize&&(r[e]=r[e].replace(/\s{2,}/g," ").trim()),o[t.options.childkey].push(r)),o}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(t){var e;if(e=n(t))return e.cdata=!0}},o.prototype.parseString=function(e,n){var r;null!=n&&"function"==typeof n&&(this.on("end",(function(t){return this.reset(),n(null,t)})),this.on("error",(function(t){return this.reset(),n(t)})));try{return""===(e=e.toString()).trim()?(this.emit("end",null),!0):(e=t.stripBOM(e),this.options.async?(this.remaining=e,h(this.processAsync),this.saxParser):this.saxParser.write(e).close())}catch(t){if(r=t,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},o.prototype.parseStringPromise=function(t){return new Promise((e=this,function(n,r){return e.parseString(t,(function(t,e){return t?r(t):n(e)}))}));var e},o}(o),e.parseString=function(t,n,i){var o,s;return null!=i?("function"==typeof i&&(o=i),"object"===(void 0===n?"undefined":r(n))&&(s=n)):("function"==typeof n&&(o=n),s={}),new e.Parser(s).parseString(t,o)},e.parseStringPromise=function(t,n){var i;return"object"===(void 0===n?"undefined":r(n))&&(i=n),new e.Parser(i).parseStringPromise(t)}}).call(void 0)},function(t,e,n){"use strict";(function(t){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(e){e.parser=function(t,e){return new s(t,e)},e.SAXParser=s,e.SAXStream=u,e.createStream=function(t,e){return new u(t,e)},e.MAX_BUFFER_LENGTH=65536;var i,o=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function s(t,n){if(!(this instanceof s))return new s(t,n);!function(t){for(var e=0,n=o.length;e<n;e++)t[o[e]]=""}(this),this.q=this.c="",this.bufferCheckPosition=e.MAX_BUFFER_LENGTH,this.opt=n||{},this.opt.lowercase=this.opt.lowercase||this.opt.lowercasetags,this.looseCase=this.opt.lowercase?"toLowerCase":"toUpperCase",this.tags=[],this.closed=this.closedRoot=this.sawRoot=!1,this.tag=this.error=null,this.strict=!!t,this.noscript=!(!t&&!this.opt.noscript),this.state=E.BEGIN,this.strictEntities=this.opt.strictEntities,this.ENTITIES=this.strictEntities?Object.create(e.XML_ENTITIES):Object.create(e.ENTITIES),this.attribList=[],this.opt.xmlns&&(this.ns=Object.create(h)),this.trackPosition=!1!==this.opt.position,this.trackPosition&&(this.position=this.line=this.column=0),O(this,"onready")}e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),s.prototype={end:function(){N(this)},write:function(t){if(this.error)throw this.error;if(this.closed)return P(this,"Cannot write after close. Assign an onready handler.");if(null===t)return N(this);"object"===(void 0===t?"undefined":r(t))&&(t=t.toString());var n=0,i="";for(;i=B(t,n++),this.c=i,i;)switch(this.trackPosition&&(this.position++,"\n"===i?(this.line++,this.column=0):this.column++),this.state){case E.BEGIN:if(this.state=E.BEGIN_WHITESPACE,"\ufeff"===i)continue;F(this,i);continue;case E.BEGIN_WHITESPACE:F(this,i);continue;case E.TEXT:if(this.sawRoot&&!this.closedRoot){for(var s=n-1;i&&"<"!==i&&"&"!==i;)(i=B(t,n++))&&this.trackPosition&&(this.position++,"\n"===i?(this.line++,this.column=0):this.column++);this.textNode+=t.substring(s,n-1)}"<"!==i||this.sawRoot&&this.closedRoot&&!this.strict?(y(i)||this.sawRoot&&!this.closedRoot||A(this,"Text data outside of root node."),"&"===i?this.state=E.TEXT_ENTITY:this.textNode+=i):(this.state=E.OPEN_WAKA,this.startTagPosition=this.position);continue;case E.SCRIPT:"<"===i?this.state=E.SCRIPT_ENDING:this.script+=i;continue;case E.SCRIPT_ENDING:"/"===i?this.state=E.CLOSE_TAG:(this.script+="<"+i,this.state=E.SCRIPT);continue;case E.OPEN_WAKA:if("!"===i)this.state=E.SGML_DECL,this.sgmlDecl="";else if(y(i));else if(v(l,i))this.state=E.OPEN_TAG,this.tagName=i;else if("/"===i)this.state=E.CLOSE_TAG,this.tagName="";else if("?"===i)this.state=E.PROC_INST,this.procInstName=this.procInstBody="";else{if(A(this,"Unencoded <"),this.startTagPosition+1<this.position){var a=this.position-this.startTagPosition;i=new Array(a).join(" ")+i}this.textNode+="<"+i,this.state=E.TEXT}continue;case E.SGML_DECL:"[CDATA["===(this.sgmlDecl+i).toUpperCase()?(S(this,"onopencdata"),this.state=E.CDATA,this.sgmlDecl="",this.cdata=""):this.sgmlDecl+i==="--"?(this.state=E.COMMENT,this.comment="",this.sgmlDecl=""):"DOCTYPE"===(this.sgmlDecl+i).toUpperCase()?(this.state=E.DOCTYPE,(this.doctype||this.sawRoot)&&A(this,"Inappropriately located doctype declaration"),this.doctype="",this.sgmlDecl=""):">"===i?(S(this,"onsgmldeclaration",this.sgmlDecl),this.sgmlDecl="",this.state=E.TEXT):m(i)?(this.state=E.SGML_DECL_QUOTED,this.sgmlDecl+=i):this.sgmlDecl+=i;continue;case E.SGML_DECL_QUOTED:i===this.q&&(this.state=E.SGML_DECL,this.q=""),this.sgmlDecl+=i;continue;case E.DOCTYPE:">"===i?(this.state=E.TEXT,S(this,"ondoctype",this.doctype),this.doctype=!0):(this.doctype+=i,"["===i?this.state=E.DOCTYPE_DTD:m(i)&&(this.state=E.DOCTYPE_QUOTED,this.q=i));continue;case E.DOCTYPE_QUOTED:this.doctype+=i,i===this.q&&(this.q="",this.state=E.DOCTYPE);continue;case E.DOCTYPE_DTD:this.doctype+=i,"]"===i?this.state=E.DOCTYPE:m(i)&&(this.state=E.DOCTYPE_DTD_QUOTED,this.q=i);continue;case E.DOCTYPE_DTD_QUOTED:this.doctype+=i,i===this.q&&(this.state=E.DOCTYPE_DTD,this.q="");continue;case E.COMMENT:"-"===i?this.state=E.COMMENT_ENDING:this.comment+=i;continue;case E.COMMENT_ENDING:"-"===i?(this.state=E.COMMENT_ENDED,this.comment=I(this.opt,this.comment),this.comment&&S(this,"oncomment",this.comment),this.comment=""):(this.comment+="-"+i,this.state=E.COMMENT);continue;case E.COMMENT_ENDED:">"!==i?(A(this,"Malformed comment"),this.comment+="--"+i,this.state=E.COMMENT):this.state=E.TEXT;continue;case E.CDATA:"]"===i?this.state=E.CDATA_ENDING:this.cdata+=i;continue;case E.CDATA_ENDING:"]"===i?this.state=E.CDATA_ENDING_2:(this.cdata+="]"+i,this.state=E.CDATA);continue;case E.CDATA_ENDING_2:">"===i?(this.cdata&&S(this,"oncdata",this.cdata),S(this,"onclosecdata"),this.cdata="",this.state=E.TEXT):"]"===i?this.cdata+="]":(this.cdata+="]]"+i,this.state=E.CDATA);continue;case E.PROC_INST:"?"===i?this.state=E.PROC_INST_ENDING:y(i)?this.state=E.PROC_INST_BODY:this.procInstName+=i;continue;case E.PROC_INST_BODY:if(!this.procInstBody&&y(i))continue;"?"===i?this.state=E.PROC_INST_ENDING:this.procInstBody+=i;continue;case E.PROC_INST_ENDING:">"===i?(S(this,"onprocessinginstruction",{name:this.procInstName,body:this.procInstBody}),this.procInstName=this.procInstBody="",this.state=E.TEXT):(this.procInstBody+="?"+i,this.state=E.PROC_INST_BODY);continue;case E.OPEN_TAG:v(f,i)?this.tagName+=i:(C(this),">"===i?R(this):"/"===i?this.state=E.OPEN_TAG_SLASH:(y(i)||A(this,"Invalid character in tag name"),this.state=E.ATTRIB));continue;case E.OPEN_TAG_SLASH:">"===i?(R(this,!0),j(this)):(A(this,"Forward-slash in opening tag not followed by >"),this.state=E.ATTRIB);continue;case E.ATTRIB:if(y(i))continue;">"===i?R(this):"/"===i?this.state=E.OPEN_TAG_SLASH:v(l,i)?(this.attribName=i,this.attribValue="",this.state=E.ATTRIB_NAME):A(this,"Invalid attribute name");continue;case E.ATTRIB_NAME:"="===i?this.state=E.ATTRIB_VALUE:">"===i?(A(this,"Attribute without value"),this.attribValue=this.attribName,L(this),R(this)):y(i)?this.state=E.ATTRIB_NAME_SAW_WHITE:v(f,i)?this.attribName+=i:A(this,"Invalid attribute name");continue;case E.ATTRIB_NAME_SAW_WHITE:if("="===i)this.state=E.ATTRIB_VALUE;else{if(y(i))continue;A(this,"Attribute without value"),this.tag.attributes[this.attribName]="",this.attribValue="",S(this,"onattribute",{name:this.attribName,value:""}),this.attribName="",">"===i?R(this):v(l,i)?(this.attribName=i,this.state=E.ATTRIB_NAME):(A(this,"Invalid attribute name"),this.state=E.ATTRIB)}continue;case E.ATTRIB_VALUE:if(y(i))continue;m(i)?(this.q=i,this.state=E.ATTRIB_VALUE_QUOTED):(A(this,"Unquoted attribute value"),this.state=E.ATTRIB_VALUE_UNQUOTED,this.attribValue=i);continue;case E.ATTRIB_VALUE_QUOTED:if(i!==this.q){"&"===i?this.state=E.ATTRIB_VALUE_ENTITY_Q:this.attribValue+=i;continue}L(this),this.q="",this.state=E.ATTRIB_VALUE_CLOSED;continue;case E.ATTRIB_VALUE_CLOSED:y(i)?this.state=E.ATTRIB:">"===i?R(this):"/"===i?this.state=E.OPEN_TAG_SLASH:v(l,i)?(A(this,"No whitespace between attributes"),this.attribName=i,this.attribValue="",this.state=E.ATTRIB_NAME):A(this,"Invalid attribute name");continue;case E.ATTRIB_VALUE_UNQUOTED:if(!g(i)){"&"===i?this.state=E.ATTRIB_VALUE_ENTITY_U:this.attribValue+=i;continue}L(this),">"===i?R(this):this.state=E.ATTRIB;continue;case E.CLOSE_TAG:if(this.tagName)">"===i?j(this):v(f,i)?this.tagName+=i:this.script?(this.script+="</"+this.tagName,this.tagName="",this.state=E.SCRIPT):(y(i)||A(this,"Invalid tagname in closing tag"),this.state=E.CLOSE_TAG_SAW_WHITE);else{if(y(i))continue;b(l,i)?this.script?(this.script+="</"+i,this.state=E.SCRIPT):A(this,"Invalid tagname in closing tag."):this.tagName=i}continue;case E.CLOSE_TAG_SAW_WHITE:if(y(i))continue;">"===i?j(this):A(this,"Invalid characters in closing tag");continue;case E.TEXT_ENTITY:case E.ATTRIB_VALUE_ENTITY_Q:case E.ATTRIB_VALUE_ENTITY_U:var u,c;switch(this.state){case E.TEXT_ENTITY:u=E.TEXT,c="textNode";break;case E.ATTRIB_VALUE_ENTITY_Q:u=E.ATTRIB_VALUE_QUOTED,c="attribValue";break;case E.ATTRIB_VALUE_ENTITY_U:u=E.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===i?(this[c]+=k(this),this.entity="",this.state=u):v(this.entity.length?d:p,i)?this.entity+=i:(A(this,"Invalid character in entity name"),this[c]+="&"+this.entity+i,this.entity="",this.state=u);continue;default:throw new Error(this,"Unknown state: "+this.state)}this.position>=this.bufferCheckPosition&&function(t){for(var n=Math.max(e.MAX_BUFFER_LENGTH,10),r=0,i=0,s=o.length;i<s;i++){var a=t[o[i]].length;if(a>n)switch(o[i]){case"textNode":D(t);break;case"cdata":S(t,"oncdata",t.cdata),t.cdata="";break;case"script":S(t,"onscript",t.script),t.script="";break;default:P(t,"Max buffer length exceeded: "+o[i])}r=Math.max(r,a)}var u=e.MAX_BUFFER_LENGTH-r;t.bufferCheckPosition=u+t.position}(this);return this}
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;D(t=this),""!==t.cdata&&(S(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(S(t,"onscript",t.script),t.script="")}};try{i=n(147).Stream}catch(t){i=function(){}}var a=e.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function u(t,e){if(!(this instanceof u))return new u(t,e);i.apply(this),this._parser=new s(t,e),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(t){n.emit("error",t),n._parser.error=null},this._decoder=null,a.forEach((function(t){Object.defineProperty(n,"on"+t,{get:function(){return n._parser["on"+t]},set:function(e){if(!e)return n.removeAllListeners(t),n._parser["on"+t]=e,e;n.on(t,e)},enumerable:!0,configurable:!1})}))}u.prototype=Object.create(i.prototype,{constructor:{value:u}}),u.prototype.write=function(e){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(e)){if(!this._decoder){var r=n(47).StringDecoder;this._decoder=new r("utf8")}e=this._decoder.write(e)}return this._parser.write(e.toString()),this.emit("data",e),!0},u.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},u.prototype.on=function(t,e){var n=this;return n._parser["on"+t]||-1===a.indexOf(t)||(n._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),n.emit.apply(n,e)}),i.prototype.on.call(n,t,e)};var c="http://www.w3.org/XML/1998/namespace",h={xml:c,xmlns:"http://www.w3.org/2000/xmlns/"},l=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,f=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function y(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function m(t){return'"'===t||"'"===t}function g(t){return">"===t||y(t)}function v(t,e){return t.test(e)}function b(t,e){return!v(t,e)}var w,_,T,E=0;for(var x in e.STATE={BEGIN:E++,BEGIN_WHITESPACE:E++,TEXT:E++,TEXT_ENTITY:E++,OPEN_WAKA:E++,SGML_DECL:E++,SGML_DECL_QUOTED:E++,DOCTYPE:E++,DOCTYPE_QUOTED:E++,DOCTYPE_DTD:E++,DOCTYPE_DTD_QUOTED:E++,COMMENT_STARTING:E++,COMMENT:E++,COMMENT_ENDING:E++,COMMENT_ENDED:E++,CDATA:E++,CDATA_ENDING:E++,CDATA_ENDING_2:E++,PROC_INST:E++,PROC_INST_BODY:E++,PROC_INST_ENDING:E++,OPEN_TAG:E++,OPEN_TAG_SLASH:E++,ATTRIB:E++,ATTRIB_NAME:E++,ATTRIB_NAME_SAW_WHITE:E++,ATTRIB_VALUE:E++,ATTRIB_VALUE_QUOTED:E++,ATTRIB_VALUE_CLOSED:E++,ATTRIB_VALUE_UNQUOTED:E++,ATTRIB_VALUE_ENTITY_Q:E++,ATTRIB_VALUE_ENTITY_U:E++,CLOSE_TAG:E++,CLOSE_TAG_SAW_WHITE:E++,SCRIPT:E++,SCRIPT_ENDING:E++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(e.ENTITIES).forEach((function(t){var n=e.ENTITIES[t],r="number"==typeof n?String.fromCharCode(n):n;e.ENTITIES[t]=r})),e.STATE)e.STATE[e.STATE[x]]=x;function O(t,e,n){t[e]&&t[e](n)}function S(t,e,n){t.textNode&&D(t),O(t,e,n)}function D(t){t.textNode=I(t.opt,t.textNode),t.textNode&&O(t,"ontext",t.textNode),t.textNode=""}function I(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function P(t,e){return D(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,O(t,"onerror",e),t}function N(t){return t.sawRoot&&!t.closedRoot&&A(t,"Unclosed root tag"),t.state!==E.BEGIN&&t.state!==E.BEGIN_WHITESPACE&&t.state!==E.TEXT&&P(t,"Unexpected end"),D(t),t.c="",t.closed=!0,O(t,"onend"),s.call(t,t.strict,t.opt),t}function A(t,e){if("object"!==(void 0===t?"undefined":r(t))||!(t instanceof s))throw new Error("bad call to strictFail");t.strict&&P(t,e)}function C(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,S(t,"onopentagstart",n)}function M(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],i=n[1];return e&&"xmlns"===t&&(r="xmlns",i=""),{prefix:r,local:i}}function L(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=M(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==c)A(t,"xml: prefix must be bound to "+c+"\nActual: "+t.attribValue);else if("xmlns"===r&&"http://www.w3.org/2000/xmlns/"!==t.attribValue)A(t,"xmlns: prefix must be bound to http://www.w3.org/2000/xmlns/\nActual: "+t.attribValue);else{var i=t.tag,o=t.tags[t.tags.length-1]||t;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,S(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function R(t,e){if(t.opt.xmlns){var n=t.tag,r=M(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(A(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(e){S(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var o=0,s=t.attribList.length;o<s;o++){var a=t.attribList[o],u=a[0],c=a[1],h=M(u,!0),l=h.prefix,f=h.local,p=""===l?"":n.ns[l]||"",d={name:u,value:c,prefix:l,local:f,uri:p};l&&"xmlns"!==l&&!p&&(A(t,"Unbound namespace prefix: "+JSON.stringify(l)),d.uri=l),t.tag.attributes[u]=d,S(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),S(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=E.TEXT:t.state=E.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function j(t){if(!t.tagName)return A(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=E.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=E.SCRIPT);S(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--;){if(t.tags[e].name===r)break;A(t,"Unexpected close tag")}if(e<0)return A(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=E.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var o=t.tag=t.tags.pop();t.tagName=t.tag.name,S(t,"onclosetag",t.tagName);var s={};for(var a in o.ns)s[a]=o.ns[a];var u=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==u.ns&&Object.keys(o.ns).forEach((function(e){var n=o.ns[e];S(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=E.TEXT}function k(t){var e,n=t.entity,r=n.toLowerCase(),i="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==n?(A(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function F(t,e){"<"===e?(t.state=E.OPEN_WAKA,t.startTagPosition=t.position):y(e)||(A(t,"Non-whitespace before first tag."),t.textNode=e,t.state=E.TEXT)}function B(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}E=e.STATE,String.fromCodePoint||(w=String.fromCharCode,_=Math.floor,T=function(){var t,e,n=16384,r=[],i=-1,o=arguments.length;if(!o)return"";for(var s="";++i<o;){var a=Number(arguments[i]);if(!isFinite(a)||a<0||a>1114111||_(a)!==a)throw RangeError("Invalid code point: "+a);a<=65535?r.push(a):(t=55296+((a-=65536)>>10),e=a%1024+56320,r.push(t,e)),(i+1===o||r.length>n)&&(s+=w.apply(null,r),r.length=0)}return s},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:T,configurable:!0,writable:!0}):String.fromCodePoint=T)}(e)}).call(this,n(44).Buffer)},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),s=r[0],a=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),h=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[h++]=e>>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===a&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[h++]=255&e);1===a&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(h(t,s,s+16383>a?a:s+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function h(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e,n){"use strict";e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,h=-7,l=n?i-1:0,f=n?-1:1,p=t[e+l];for(l+=f,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+l],l+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[e+l],l+=f,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,l=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=h?(a=0,s=h):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*y}},function(t,e,n){"use strict";t.exports=i;var r=n(18).EventEmitter;function i(){r.call(this)}n(7)(i,r),i.Readable=n(45),i.Writable=n(154),i.Duplex=n(155),i.Transform=n(156),i.PassThrough=n(157),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(h(),0===r.listenerCount(this,"error"))throw t}function h(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",h),n.removeListener("close",h),t.removeListener("close",h)}return n.on("error",c),t.on("error",c),n.on("end",h),n.on("close",h),t.on("close",h),t.emit("pipe",n),t}},function(t,e){},function(t,e,n){"use strict";var r=n(21).Buffer,i=n(150);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,o=r.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,n=o,i=a,e.copy(n,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){"use strict";(function(t,e){!function(t,n){if(!t.setImmediate){var r,i,o,s,a,u=1,c={},h=!1,l=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){d(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){d(t.data)},r=function(t){o.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,r=function(t){var e=l.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(d,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&d(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(s+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[u]=i,r(u),u++},f.clearImmediate=p}function p(t){delete c[t]}function d(t){if(h)setTimeout(d,0,t);else{var e=c[t];if(e){h=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),h=!1}}}}}("undefined"==typeof self?void 0===t?void 0:t:self)}).call(this,n(6),n(19))},function(t,e,n){"use strict";(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(6))},function(t,e,n){"use strict";t.exports=o;var r=n(80),i=Object.create(n(12));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(7),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){"use strict";t.exports=n(46)},function(t,e,n){"use strict";t.exports=n(5)},function(t,e,n){"use strict";t.exports=n(45).Transform},function(t,e,n){"use strict";t.exports=n(45).PassThrough},function(t,e,n){"use strict";(function(){e.stripBOM=function(t){return"\ufeff"===t[0]?t.substring(1):t}}).call(void 0)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=s(n(11)),o=s(n(66));s(n(67));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.drm=e,this.KEYSYSTEM_TYPE="",this.keys={},this.drm.clearKeys&&(this.KEYSYSTEM_TYPE="org.w3.clearkey",this.keys=this.drm.clearKeys),this.options=[],this.ensurePromise=void 0,(0,i.default)(this)}return r(t,[{key:"setOptions",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0],arguments.length>1&&void 0!==arguments[1]&&arguments[1];var t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],e={videoCapabilities:t},n={videoCapabilities:t,persistentState:"required",sessionTypes:["persistent-license"]};this.options=[n,e]}},{key:"bail",value:function(t){return function(e){console.log(t+(e?" "+e:""))}}},{key:"UpdateSessionFunc",value:function(t){var e=this;return function(n){var r=[],i=[];Object.keys(t).forEach((function(e){var n=t[e],s=o.default.fromHex(e),a=o.default.fromHex(n),u={kty:"oct",kid:o.default.toBase64(s,!1),k:o.default.toBase64(a,!1)};r.push(u),i.push(u.kid)}));var s={keys:r},a=JSON.stringify(s);n.target.update(o.default.StringToArrayBuffer(a)).then((function(){}),e.bail(" MediaKeySession update failed"))}}},{key:"KeysChange",value:function(t){var e=t.target.keyStatuses,n=!0,r=!1,i=void 0;try{for(var s,a=e.entries()[Symbol.iterator]();!(n=(s=a.next()).done);n=!0){var u=s.value,c=u[0];u[1],o.default.Base64ToHex(window.btoa(o.default.ArrayBufferToString(c)))}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}},{key:"EnsureMediaKeysCreated",value:function(t,e,n){return this.ensurePromise||(this.ensurePromise=navigator.requestMediaKeySystemAccess(e,n).then((function(t){return t.createMediaKeys()}),this.bail(" Failed to request key system access.")).then((function(e){return t.setMediaKeys(e)}),this.bail(" failed to create MediaKeys object"))),this.ensurePromise}},{key:"SetupEME",value:function(t,e){var n=this;t.sessions=[],this.on("encrypted",(function(){var e=JSON.stringify({kids:["0123456789abcdef0123456789abcdef"]}),r=new Uint8Array(o.default.toUTF8(e));n.EnsureMediaKeysCreated(t,n.KEYSYSTEM_TYPE,n.options).then((function(){var e=t.mediaKeys.createSession();return t.sessions.push(e),e.addEventListener("message",n.UpdateSessionFunc(n.keys)),e.addEventListener("keystatuseschange",n.KeysChange),e.generateRequest("keyids",r.buffer)}),n.bail(" failed to ensure MediaKeys on HTMLMediaElement")).then((function(){}),n.bail(" Failed to generate request."))}))}}]),t}();e.default=a,t.exports=e.default}])}));
|
export { default } from './addUserModal.container'
|
const base_url = 'http://127.0.0.1:8000';
const apiGet = async (url, token) => {
try{
let response = await fetch(base_url + url, {
method: 'GET',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Token ' + token,
credentials: 'include',
}
});
return await response.json();
}catch(errors){
console.log(errors);
}
}
const apiPost = async (url, formData, token= null) => {
let headers;
console.log(token);
if(token){
headers = {
'Authorization': 'Token ' + token,
credentials: 'include',
}
}
else{
headers = {
}
}
try{
let response = await fetch(base_url + url, {
headers: headers,
method: 'POST',
body: formData
});
return await response.json();
}catch(errors){
console.log(errors);
}
}
const apiUserData = async (token) => {
const jsonData = await apiGet('/api/user/data/', token);
return jsonData ? jsonData[0] : null;
}
module.exports = {
apiGet,
apiPost,
apiUserData,
}
|
const gulp = require('gulp');
const del = require('del');
const browserify = require('browserify');
const babelify = require('babelify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const sourcemaps = require('gulp-sourcemaps');
const terser = require('gulp-terser');
const path = require('path');
const browserSync = require('browser-sync').create();
const paths = {
phaser: './node_modules/phaser/dist/',
base : './src',
build : './dist',
assets: {
src : './src/assets',
dest: './dist/assets',
},
styles: {
src : './src/css',
dest: './dist/css',
},
script: {
src : './src/js',
dest: './dist/js',
},
game: {
entry: './src/js/index.js',
dest : 'index.js',
},
};
gulp.task('scripts', () => {
return browserify(
{
paths : [path.join(__dirname, paths.script.src)],
entries: paths.game.entry,
debug : true,
})
.transform(babelify)
.bundle()
.pipe(source(paths.game.dest))
.pipe(buffer())
.pipe(sourcemaps.init({ loadMaps: true }))
.pipe(terser())
.pipe(sourcemaps.write('./source-maps'))
.pipe(gulp.dest(paths.script.dest));
});
async function clean() {
del([paths.build]);
}
async function copyHTML() {
gulp.src([paths.base + '/index.html'])
.pipe(gulp.dest(paths.build));
}
async function copyAssets() {
gulp.src(paths.assets.src + '/**/*')
.pipe(gulp.dest(paths.assets.dest));
}
async function copyPhaser() {
gulp.src(paths.phaser + '/phaser.min.js')
.pipe(gulp.dest(paths.script.dest));
}
async function copyStyles() {
gulp.src(paths.styles.src + '/**/*.css')
.pipe(gulp.dest(paths.styles.dest));
}
async function watch() {
gulp.watch(paths.base + '/**/*.*', gulp.series('build', 'reload'));
}
async function reload() {
browserSync.reload();
}
async function serve() {
browserSync.init({
server: {
baseDir: './dist',
files : './dist/**/*.*',
},
});
}
gulp.task('reload', reload);
gulp.task('serve', serve);
gulp.task('watch', watch);
gulp.task('clean', clean);
gulp.task('copy-html', copyHTML);
gulp.task('copy-assets', copyAssets);
gulp.task('copy-phaser', copyPhaser);
gulp.task('copy-styles', copyStyles);
gulp.task('copy-static', gulp.series('copy-html', 'copy-assets', 'copy-phaser', 'copy-styles'));
gulp.task('build', gulp.series('copy-static', 'scripts'));
gulp.task('build-watch-serve', gulp.series('copy-static', 'scripts', 'serve', 'watch'));
gulp.task('default', gulp.series('build'));
|
const mongoose = require('mongoose');
const connectDB = async () => {
try {
// mongodb connection
const con = await mongoose.connect(process.env.MONGO_URI, {
useNewUrlParser: true,
useUnifiedTopology: true,
})
console.log(`Mongo connected: ${con.connection.host}`);
} catch (error) {
console.log(error);
process.exit(1);
}
}
module.exports = connectDB;
|
import Relay from 'react-relay';
export default class CheckHidingSpotForTreasureMutation extends Relay.Mutation {
static fragments = {
game: () => Relay.QL`
fragment on Game {
id,
turnsRemaining,
}
`,
hidingSpot: () => Relay.QL`
fragment on HidingSpot {
id,
}
`,
};
getMutation() {
return Relay.QL`mutation{checkHidingSpotForTreasure}`;
}
getCollisionKey() {
return `check_${this.props.game.id}`;
}
getFatQuery() {
return Relay.QL`
fragment on CheckHidingSpotForTreasurePayload {
hidingSpot {
hasBeenChecked,
hasTreasure,
},
game {
turnsRemaining,
},
}
`;
}
getConfigs() {
return [{
type: 'FIELDS_CHANGE',
fieldIDs: {
hidingSpot: this.props.hidingSpot.id,
game: this.props.game.id,
},
}];
}
getVariables() {
return {
id: this.props.hidingSpot.id,
};
}
getOptimisticResponse() {
return {
game: {
turnsRemaining: this.props.game.turnsRemaining - 1,
},
hidingSpot: {
id: this.props.hidingSpot.id,
hasBeenChecked: true,
},
};
}
}
|
import React from "react";
//@antD component
import "antd/dist/antd.css";
import { Table, Input, Popconfirm, Form, Modal, Steps, Icon } from "antd";
// @material-ui/core components
import withStyles from "@material-ui/core/styles/withStyles";
import InputLabel from "@material-ui/core/InputLabel";
// core components
import GridItem from "components/Grid/GridItem.jsx";
import GridContainer from "components/Grid/GridContainer.jsx";
import Button from "components/CustomButtons/Button.jsx";
import Card from "components/Card/Card.jsx";
import CardHeader from "components/Card/CardHeader.jsx";
import CardBody from "components/Card/CardBody.jsx";
import CardFooter from "components/Card/CardFooter.jsx";
import AppBar from "@material-ui/core/AppBar";
import Toolbar from "@material-ui/core/Toolbar";
import Typography from "@material-ui/core/Typography";
import TextField from "@material-ui/core/TextField";
import DataTable from "./Table2";
import PersonPinIcon from "@material-ui/icons/PersonPin";
import LibraryBooks from "@material-ui/icons/LibraryBooks";
import Modalform3 from "./ModalFormValue";
import { Divider } from "@material-ui/core";
const styles = {
cardCategoryWhite: {
color: "rgba(255,255,255,.62)",
margin: "0",
fontSize: "14px",
marginTop: "0",
marginBottom: "0"
},
cardTitleWhite: {
color: "#FFFFFF",
marginTop: "0px",
minHeight: "auto",
fontWeight: "300",
fontFamily: "'Roboto', 'Helvetica', 'Arial', sans-serif",
marginBottom: "3px",
textDecoration: "none"
},
label: {
float: "right",
marginTop: 18
},
labelFlow: {
float: "right",
marginTop: 3
},
headerAppBar: {
backgroundColor: "rgb(255, 230, 204)",
color: "rgb(0, 0, 0)"
},
buttonSubmit: {
backgroundColor: "rgb(51, 204, 51)",
color: "rgb(0, 0, 0)"
},
positionButton: {
display: "flex",
justifyContent: "center"
}
};
class FormReq extends React.Component {
state = {
visible: false,
EmpID: "",
EmpFName: "",
EmpLName: "",
EmpGroup: "",
EmpDepartment: "",
EmpLevel: "",
TravelTarget: " program",
WorkType: "",
DateStart: "",
DateFinish: "",
TimeStart: "",
TimeFinish: "",
CostCenter: "",
CostOther: "",
County: "",
Province: "",
MoneyTran: ""
};
showModal = () => {
this.setState({
visible: true
});
};
handleOk = e => {
console.log(e);
this.setState({
visible: false
});
};
handleCancel = e => {
console.log(e);
this.setState({
visible: false
});
};
handleChange = name => event => {
this.setState({ [name]: event.target.value });
};
handleSubmit = ()=> {
this.setState({
visible: false
});
};
render() {
const { classes,dataTravelReq } = this.props;
return (
<div>
<Button
color="success"
className={classes.buttonSubmit}
onClick={this.showModal}
style={{fontSize:16}}
>
ตรวจสอบรายการอนุมัติ
</Button>
<Modal
style={{ marginLeft: "15%", marginTop: "10" }}
width="75%"
visible={this.state.visible}
onOk={this.handleOk}
onCancel={this.handleCancel}
footer={null}
>
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<Card>
<CardHeader color="info">
<h3 className={classes.cardTitleWhite}>
การเบิกเบี้ยเลี้ยงภายในและต่างประเทศ
</h3>
{/* <p className={classes.cardCategoryWhite}>Complete your profile</p> */}
</CardHeader>
<CardBody>
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<AppBar className={classes.headerAppBar} position="static">
<Toolbar variant="dense">
<Typography variant="h6" color="inherit">
<PersonPinIcon /> พนักงาน
</Typography>
</Toolbar>
</AppBar>
</GridItem>
</GridContainer>
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<CardBody>
<GridContainer>
<GridItem xs={12} sm={12} md={2}>
<h7 className={classes.label}>รหัสพนักงาน</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label="รหัสพนักงาน"
type="text"
onChange={this.handleChange("EmpID")}
value={dataTravelReq.EmpID}
fullWidth
defaultValue=""
className={classes.textField}
disabled
/>
</GridItem>
<GridItem xs={12} sm={12} md={1}>
<h7 className={classes.label}>ชื่อ</h7>
</GridItem>
<GridItem xs={12} sm={12} md={3}>
<TextField
id="date"
label="ชื่อ"
type="text"
onChange={this.handleChange("EmpFName")}
value={dataTravelReq.EmpFName}
fullWidth
defaultValue=""
className={classes.textField}
disabled
/>
</GridItem>
<GridItem xs={12} sm={12} md={1}>
<h7 className={classes.label}>ชื่อสกุล</h7>
</GridItem>
<GridItem xs={12} sm={12} md={3}>
<TextField
id="date"
onChange={this.handleChange("EmpLName")}
label="ชื่อสกุล"
value={dataTravelReq.EmpLName}
fullWidth
type="text"
defaultValue=""
className={classes.textField}
disabled
/>
</GridItem>
</GridContainer>
</CardBody>
</GridItem>
</GridContainer>
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<CardBody>
<GridContainer>
<GridItem xs={12} sm={12} md={2}>
<h7 className={classes.label}>ฝ่าย</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label="ฝ่าย"
value={dataTravelReq.EmpGroup}
onChange={this.handleChange("EmpGroup")}
type="text"
fullWidth
defaultValue=""
className={classes.textField}
disabled
/>
</GridItem>
<GridItem xs={12} sm={12} md={1}>
<h7 className={classes.label}>แผนก</h7>
</GridItem>
<GridItem xs={12} sm={12} md={3}>
<TextField
id="date"
label="แผนก"
type="text"
onChange={this.handleChange("EmpDepartment")}
value={dataTravelReq.EmpDepartment}
fullWidth
defaultValue=""
className={classes.textField}
disabled
/>
</GridItem>
<GridItem xs={12} sm={12} md={1}>
<h7 className={classes.label}>ระดับ</h7>
</GridItem>
<GridItem xs={12} sm={12} md={3}>
<TextField
id="date"
label="ระดับ"
fullWidth
onChange={this.handleChange("EmpLevel")}
value={dataTravelReq.EmpLevel}
type="text"
defaultValue=""
className={classes.textField}
disabled
/>
</GridItem>
</GridContainer>
</CardBody>
</GridItem>
</GridContainer>
<Divider style={{ marginBottom: 5 }} />
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<CardBody>
<GridContainer>
<GridItem xs={12} sm={12} md={2}>
<h7 className={classes.labelFlow}>
รวมค่าเบี้ยเลี้ยง
</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label=""
type="text"
value={this.state.allow}
fullWidth
defaultValue="10,000"
className={classes.textField}
/>
</GridItem>
<GridItem xs={12} sm={12} md={1}>
<h7 className={classes.labelFlow}>รวมค่าที่พัก</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label=""
type="text"
value={this.state.place}
fullWidth
defaultValue="10,000"
className={classes.textField}
/>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<h7 className={classes.labelFlow}>รวมค่าเดินทางและพาหนะ</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label=""
fullWidth
type="text"
value={this.state.car}
defaultValue="10,000"
className={classes.textField}
/>
</GridItem>
</GridContainer>
</CardBody>
</GridItem>
</GridContainer>
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<CardBody>
<GridContainer>
<GridItem xs={12} sm={12} md={2}>
<h7 className={classes.labelFlow}>
รวมค่าอาหาร
</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label=""
type="text"
value={this.state.food}
fullWidth
defaultValue="10,000"
className={classes.textField}
/>
</GridItem>
<GridItem xs={12} sm={12} md={1}>
<h7 className={classes.labelFlow}>รวมค่ารับรอง</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label=""
type="text"
value={this.state.support}
fullWidth
defaultValue="10,000"
className={classes.textField}
/>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<h7 className={classes.labelFlow}>อื่นๆ</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label=""
fullWidth
type="text"
value={this.state.outher}
defaultValue="6,000"
className={classes.textField}
/>
</GridItem>
</GridContainer>
</CardBody>
</GridItem>
</GridContainer>
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<CardBody>
<GridContainer>
<GridItem xs={12} sm={12} md={2}>
<h7 className={classes.labelFlow}>รวมทั้งหมด</h7>
</GridItem>
<GridItem xs={12} sm={12} md={2}>
<TextField
id="date"
label=""
value={"56,000"}
type="text"
fullWidth
defaultValue=""
className={classes.textField}
/>
</GridItem>
</GridContainer>
</CardBody>
</GridItem>
</GridContainer>
<GridContainer>
<GridItem xs={12} sm={12} md={12}>
<CardBody>
<DataTable country={dataTravelReq.country}/>
</CardBody>
</GridItem>
</GridContainer>
</CardBody>
<CardFooter className={classes.positionButton}>
<Button
// color="success"
className={classes.buttonSubmit}
style={{fontSize:16}}
onClick={this.handleSubmit}
>
ส่งอนุมัติ
</Button>
</CardFooter>
</Card>
</GridItem>
</GridContainer>
</Modal>
</div>
);
}
}
export default withStyles(styles)(FormReq);
|
/*
* (c) Copyright 2015 Hewlett-Packard Development Company, L.P.
*
* 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.
*/
(function() {
'use strict';
describe('Launch Instance Model', function() {
describe('launchInstanceModel Factory', function() {
var model, scope, $q;
var cinderEnabled = false;
var neutronEnabled = false;
var novaExtensionsEnabled = false;
beforeEach(module('horizon.dashboard.project.workflow.launch-instance'));
beforeEach(module(function($provide) {
$provide.value('horizon.app.core.openstack-service-api.glance', {
getImages: function() {
var images = [
{ container_format: 'aki', properties: {} },
{ container_format: 'ari', properties: {} },
{ container_format: 'ami', properties: {} },
{ container_format: 'raw', properties: {} },
{ container_format: 'ami', properties: { image_type: 'snapshot' } },
{ container_format: 'raw', properties: { image_type: 'snapshot' } }
];
var deferred = $q.defer();
deferred.resolve({ data: { items: images } });
return deferred.promise;
},
getNamespaces: function() {
var namespaces = [ 'ns-1', 'ns-2' ];
var deferred = $q.defer();
deferred.resolve({ data: { items: namespaces } });
return deferred.promise;
}
});
$provide.value('horizon.app.core.openstack-service-api.nova', {
createServer: function(finalSpec) {
return finalSpec;
},
getAvailabilityZones: function() {
var zones = [
{ zoneName: 'zone-1', zoneState: { available: true } },
{ zoneName: 'zone-2', zoneState: { available: true } },
{ zoneName: 'invalid-zone-1' },
{ zoneName: 'invalid-zone-2' }
];
var deferred = $q.defer();
deferred.resolve({ data: { items: zones } });
return deferred.promise;
},
getFlavors: function() {
var flavors = [ 'flavor-1', 'flavor-2' ];
var deferred = $q.defer();
deferred.resolve({ data: { items: flavors } });
return deferred.promise;
},
getKeypairs: function() {
var keypairs = [ { keypair: { name: 'key-1' } },
{ keypair: { name: 'key-2' } } ];
var deferred = $q.defer();
deferred.resolve({ data: { items: keypairs } });
return deferred.promise;
},
getLimits: function() {
var limits = { maxTotalInstances: 10, totalInstancesUsed: 0 };
var deferred = $q.defer();
deferred.resolve({ data: limits });
return deferred.promise;
}
});
$provide.value('horizon.app.core.openstack-service-api.security-group', {
query: function() {
var secGroups = [
{ name: 'security-group-1' },
{ name: 'security-group-2' }
];
var deferred = $q.defer();
deferred.resolve({ data: { items: secGroups } });
return deferred.promise;
}
});
$provide.value('horizon.app.core.openstack-service-api.neutron', {
getNetworks: function() {
var networks = [ { id: 'net-1' }, { id: 'net-2' } ];
var deferred = $q.defer();
deferred.resolve({ data: { items: networks } });
return deferred.promise;
}
});
$provide.value('horizon.app.core.openstack-service-api.cinder', {
getVolumes: function() {
var volumes = [ { id: 'vol-1' }, { id: 'vol-2' } ];
var deferred = $q.defer();
deferred.resolve({ data: { items: volumes } });
return deferred.promise;
},
getVolumeSnapshots: function() {
var snapshots = [ { id: 'snap-1' }, { id: 'snap-2' } ];
var deferred = $q.defer();
deferred.resolve({ data: { items: snapshots } });
return deferred.promise;
}
});
$provide.value('horizon.app.core.openstack-service-api.serviceCatalog', {
ifTypeEnabled: function(theType) {
var deferred = $q.defer();
if (theType === 'network' && neutronEnabled) {
deferred.resolve();
} else if (theType === 'volume' && cinderEnabled) {
deferred.resolve();
} else {
deferred.reject();
}
return deferred.promise;
}
});
$provide.value('horizon.app.core.openstack-service-api.novaExtensions', {
ifNameEnabled: function() {
var deferred = $q.defer();
if (novaExtensionsEnabled) {
deferred.resolve();
} else {
deferred.reject();
}
return deferred.promise;
}
});
$provide.value('horizon.app.core.openstack-service-api.keystone', {});
}));
beforeEach(inject(function(launchInstanceModel, $rootScope, _$q_) {
model = launchInstanceModel;
$q = _$q_;
scope = $rootScope.$new();
}));
describe('Initial object (pre-initialize)', function() {
it('is defined', function() {
expect(model).toBeDefined();
});
it('has initialization status parameters', function() {
expect(model.initializing).toBeDefined();
expect(model.initialized).toBeDefined();
});
it('has an empty newInstanceSpec', function() {
expect(model.newInstanceSpec).toEqual({});
});
it('has empty arrays for all data', function() {
var datasets = ['availabilityZones', 'flavors', 'allowedBootSources',
'images', 'imageSnapshots', 'keypairs', 'networks',
'profiles', 'securityGroups', 'volumes', 'volumeSnapshots'];
datasets.forEach(function(name) {
expect(model[name]).toEqual([]);
});
});
it('initialized metadatadefs to null values', function() {
expect(model.metadataDefs.flavor).toBeNull();
expect(model.metadataDefs.image).toBeNull();
expect(model.metadataDefs.volume).toBeNull();
expect(Object.keys(model.metadataDefs).length).toBe(3);
});
it('defaults "allow create volume from image" to false', function() {
expect(model.allowCreateVolumeFromImage).toBe(false);
});
it('defaults "are port profiles supported" to false', function() {
expect(model.arePortProfilesSupported).toBe(false);
});
it('defaults "volume bootable" to false', function() {
expect(model.volumeBootable).toBe(false);
});
it('initializes "nova limits" to empty object', function() {
expect(model.novaLimits).toEqual({});
});
it('has an "initialize" function', function() {
expect(model.initialize).toBeDefined();
});
it('has a "createInstance" function', function() {
expect(model.createInstance).toBeDefined();
});
});
describe('Post Initialize Model', function() {
it('should init model with no networks/volumes if neutron & cinder disabled', function() {
model.initialize(true);
scope.$apply();
expect(model.initializing).toBe(false);
expect(model.initialized).toBe(true);
expect(model.newInstanceSpec).toBeDefined();
expect(model.images.length).toBe(2);
expect(model.imageSnapshots.length).toBe(2);
expect(model.availabilityZones.length).toBe(2);
expect(model.flavors.length).toBe(2);
expect(model.keypairs.length).toBe(2);
expect(model.securityGroups.length).toBe(2);
expect(model.novaLimits.maxTotalInstances).toBe(10);
expect(model.novaLimits.totalInstancesUsed).toBe(0);
});
it('should have networks & no volumes if neutron enabled & cinder disabled', function() {
neutronEnabled = true;
cinderEnabled = false;
model.initialize(true);
scope.$apply();
expect(model.neutronEnabled).toBe(true);
expect(model.networks.length).toBe(2);
expect(model.volumes.length).toBe(0);
});
it('should have volumes & no networks if neutron disabled & cinder enabled', function() {
neutronEnabled = false;
cinderEnabled = true;
model.initialize(true);
scope.$apply();
expect(model.networks.length).toBe(0);
expect(model.volumes.length).toBe(2);
expect(model.volumeSnapshots.length).toBe(2);
});
it('should have networks and volumes if neutron and cinder enabled', function() {
neutronEnabled = true;
cinderEnabled = true;
model.initialize(true);
scope.$apply();
expect(model.networks.length).toBe(2);
expect(model.volumes.length).toBe(2);
expect(model.volumeSnapshots.length).toBe(2);
});
it('should disable create volume from image if nova extensions disabled', function() {
cinderEnabled = true;
novaExtensionsEnabled = false;
model.initialize(true);
scope.$apply();
expect(model.allowCreateVolumeFromImage).toBe(false);
});
});
describe('Post Initialization Model - Initializing', function() {
beforeEach(function() {
model.initializing = true;
model.initialize(true); // value and return don't matter
});
// This is here to ensure that as people add/change items, they
// don't forget to implement tests for them.
it('has the right number of properties', function() {
expect(Object.keys(model.newInstanceSpec).length).toBe(18);
});
it('sets availability zone to null', function() {
expect(model.newInstanceSpec.availability_zone).toBeNull();
});
it('sets admin pass to null', function() {
expect(model.newInstanceSpec.admin_pass).toBeNull();
});
it('sets config drive to false', function() {
expect(model.newInstanceSpec.config_drive).toBe(false);
});
it('sets user data to an empty string', function() {
expect(model.newInstanceSpec.user_data).toBe('');
});
it('sets disk config to AUTO', function() {
expect(model.newInstanceSpec.disk_config).toBe('AUTO');
});
it('sets flavor to be null', function() {
expect(model.newInstanceSpec.flavor).toBeNull();
});
it('sets instance count to 1', function() {
expect(model.newInstanceSpec.instance_count).toBe(1);
});
it('sets key pair to an empty array', function() {
expect(model.newInstanceSpec.key_pair).toEqual([]);
});
it('sets name to null', function() {
expect(model.newInstanceSpec.name).toBeNull();
});
it('sets networks to an empty array', function() {
expect(model.newInstanceSpec.networks).toEqual([]);
});
it('sets profile to an empty object', function() {
expect(model.newInstanceSpec.profile).toEqual({});
});
it('sets security groups to an empty array', function() {
expect(model.newInstanceSpec.security_groups).toEqual([]);
});
it('sets source type to null', function() {
expect(model.newInstanceSpec.source_type).toBeNull();
});
it('sets source to an empty array', function() {
expect(model.newInstanceSpec.source).toEqual([]);
});
it('sets volume options appropriately', function() {
expect(model.newInstanceSpec.vol_create).toBe(false);
expect(model.newInstanceSpec.vol_device_name).toBe('vda');
expect(model.newInstanceSpec.vol_delete_on_terminate).toBe(false);
expect(model.newInstanceSpec.vol_size).toBe(1);
});
});
describe('Create Instance', function() {
beforeEach(function() {
// initialize some data
model.newInstanceSpec.source_type = { type: 'image' };
model.newInstanceSpec.source = [ { id: 'cirros' } ];
model.newInstanceSpec.flavor = { id: 'm1.tiny' };
model.newInstanceSpec.networks = [ { id: 'public' }, { id: 'private' } ];
model.newInstanceSpec.key_pair = [ { name: 'keypair1' } ];
model.newInstanceSpec.security_groups = [ { id: 'adminId', name: 'admin' },
{ id: 'demoId', name: 'demo' } ];
model.newInstanceSpec.vol_create = true;
model.newInstanceSpec.vol_delete_on_terminate = true;
model.newInstanceSpec.vol_device_name = "volTestName";
model.newInstanceSpec.vol_size = 10;
});
it('should set final spec in format required by Nova (Neutron disabled)', function() {
var finalSpec = model.createInstance();
var finalNetworks = [
{ 'net-id': 'public', 'v4-fixed-ip': '' },
{ 'net-id': 'private', 'v4-fixed-ip': '' }
];
expect(finalSpec.source_id).toBe(null);
expect(finalSpec.flavor_id).toBe('m1.tiny');
expect(finalSpec.nics).toEqual(finalNetworks);
expect(finalSpec.key_name).toBe('keypair1');
expect(finalSpec.security_groups).toEqual([ 'admin', 'demo' ]);
});
it('should set final spec in format required for Block Device Mapping v2', function() {
var finalSpec = model.createInstance();
var expectedBlockDevice = [{
device_name: 'volTestName',
source_type: 'image',
destination_type: 'volume',
delete_on_termination: 1,
uuid: 'cirros',
boot_index: '0',
volume_size: 10
}];
expect(finalSpec.block_device_mapping_v2).toEqual(expectedBlockDevice);
});
it('should set final security groups using name when Neutron enabled', function() {
model.neutronEnabled = true;
var finalSpec = model.createInstance();
expect(finalSpec.security_groups).toEqual([ 'adminId', 'demoId' ]);
});
it('should remove flavor from final spec if flavor was null', function() {
model.newInstanceSpec.flavor = null;
var finalSpec = model.createInstance();
expect(finalSpec.flavor_id).toBeUndefined();
});
});
});
});
})();
|
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define("@angular/core/schematics/migrations/initial-navigation/collector", ["require", "exports", "typescript", "@angular/core/schematics/migrations/initial-navigation/util"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InitialNavigationCollector = void 0;
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
const ts = require("typescript");
const util_1 = require("@angular/core/schematics/migrations/initial-navigation/util");
/** The property name for the options that need to be migrated */
const INITIAL_NAVIGATION = 'initialNavigation';
/**
* Visitor that walks through specified TypeScript nodes and collects all
* found ExtraOptions#InitialNavigation assignments.
*/
class InitialNavigationCollector {
constructor(typeChecker) {
this.typeChecker = typeChecker;
this.assignments = new Set();
}
visitNode(node) {
let extraOptionsLiteral = null;
if (util_1.isRouterModuleForRoot(this.typeChecker, node) && node.arguments.length > 0) {
if (node.arguments.length === 1) {
return;
}
if (ts.isObjectLiteralExpression(node.arguments[1])) {
extraOptionsLiteral = node.arguments[1];
}
else if (ts.isIdentifier(node.arguments[1])) {
extraOptionsLiteral =
this.getLiteralNeedingMigrationFromIdentifier(node.arguments[1]);
}
}
else if (ts.isVariableDeclaration(node)) {
extraOptionsLiteral = this.getLiteralNeedingMigration(node);
}
if (extraOptionsLiteral !== null) {
this.visitExtraOptionsLiteral(extraOptionsLiteral);
}
else {
// no match found, continue iteration
ts.forEachChild(node, n => this.visitNode(n));
}
}
visitExtraOptionsLiteral(extraOptionsLiteral) {
for (const prop of extraOptionsLiteral.properties) {
if (ts.isPropertyAssignment(prop) &&
(ts.isIdentifier(prop.name) || ts.isStringLiteralLike(prop.name))) {
if (prop.name.text === INITIAL_NAVIGATION && isValidInitialNavigationValue(prop)) {
this.assignments.add(prop);
}
}
else if (ts.isSpreadAssignment(prop) && ts.isIdentifier(prop.expression)) {
const literalFromSpreadAssignment = this.getLiteralNeedingMigrationFromIdentifier(prop.expression);
if (literalFromSpreadAssignment !== null) {
this.visitExtraOptionsLiteral(literalFromSpreadAssignment);
}
}
}
}
getLiteralNeedingMigrationFromIdentifier(id) {
const symbolForIdentifier = this.typeChecker.getSymbolAtLocation(id);
if (symbolForIdentifier === undefined) {
return null;
}
if (symbolForIdentifier.declarations.length === 0) {
return null;
}
const declarationNode = symbolForIdentifier.declarations[0];
if (!ts.isVariableDeclaration(declarationNode) || declarationNode.initializer === undefined ||
!ts.isObjectLiteralExpression(declarationNode.initializer)) {
return null;
}
return declarationNode.initializer;
}
getLiteralNeedingMigration(node) {
if (node.initializer === undefined) {
return null;
}
// declaration could be `x: ExtraOptions = {}` or `x = {} as ExtraOptions`
if (ts.isAsExpression(node.initializer) &&
ts.isObjectLiteralExpression(node.initializer.expression) &&
util_1.isExtraOptions(this.typeChecker, node.initializer.type)) {
return node.initializer.expression;
}
else if (node.type !== undefined && ts.isObjectLiteralExpression(node.initializer) &&
util_1.isExtraOptions(this.typeChecker, node.type)) {
return node.initializer;
}
return null;
}
}
exports.InitialNavigationCollector = InitialNavigationCollector;
/**
* Check whether the value assigned to an `initialNavigation` assignment
* conforms to the expected types for ExtraOptions#InitialNavigation
* @param node the property assignment to check
*/
function isValidInitialNavigationValue(node) {
return ts.isStringLiteralLike(node.initializer) ||
node.initializer.kind === ts.SyntaxKind.FalseKeyword ||
node.initializer.kind === ts.SyntaxKind.TrueKeyword;
}
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdG9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvY29yZS9zY2hlbWF0aWNzL21pZ3JhdGlvbnMvaW5pdGlhbC1uYXZpZ2F0aW9uL2NvbGxlY3Rvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7SUFBQTs7Ozs7O09BTUc7SUFDSCxpQ0FBaUM7SUFDakMsc0ZBQTZEO0lBRzdELGlFQUFpRTtJQUNqRSxNQUFNLGtCQUFrQixHQUFHLG1CQUFtQixDQUFDO0lBRS9DOzs7T0FHRztJQUNILE1BQWEsMEJBQTBCO1FBR3JDLFlBQTZCLFdBQTJCO1lBQTNCLGdCQUFXLEdBQVgsV0FBVyxDQUFnQjtZQUZqRCxnQkFBVyxHQUErQixJQUFJLEdBQUcsRUFBRSxDQUFDO1FBRUEsQ0FBQztRQUU1RCxTQUFTLENBQUMsSUFBYTtZQUNyQixJQUFJLG1CQUFtQixHQUFvQyxJQUFJLENBQUM7WUFDaEUsSUFBSSw0QkFBcUIsQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLElBQUksQ0FBQyxJQUFJLElBQUksQ0FBQyxTQUFTLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTtnQkFDOUUsSUFBSSxJQUFJLENBQUMsU0FBUyxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7b0JBQy9CLE9BQU87aUJBQ1I7Z0JBRUQsSUFBSSxFQUFFLENBQUMseUJBQXlCLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFO29CQUNuRCxtQkFBbUIsR0FBRyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBK0IsQ0FBQztpQkFDdkU7cUJBQU0sSUFBSSxFQUFFLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRTtvQkFDN0MsbUJBQW1CO3dCQUNmLElBQUksQ0FBQyx3Q0FBd0MsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBa0IsQ0FBQyxDQUFDO2lCQUN2RjthQUNGO2lCQUFNLElBQUksRUFBRSxDQUFDLHFCQUFxQixDQUFDLElBQUksQ0FBQyxFQUFFO2dCQUN6QyxtQkFBbUIsR0FBRyxJQUFJLENBQUMsMEJBQTBCLENBQUMsSUFBSSxDQUFDLENBQUM7YUFDN0Q7WUFFRCxJQUFJLG1CQUFtQixLQUFLLElBQUksRUFBRTtnQkFDaEMsSUFBSSxDQUFDLHdCQUF3QixDQUFDLG1CQUFtQixDQUFDLENBQUM7YUFDcEQ7aUJBQU07Z0JBQ0wscUNBQXFDO2dCQUNyQyxFQUFFLENBQUMsWUFBWSxDQUFDLElBQUksRUFBRSxDQUFDLENBQUMsRUFBRSxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQzthQUMvQztRQUNILENBQUM7UUFFRCx3QkFBd0IsQ0FBQyxtQkFBK0M7WUFDdEUsS0FBSyxNQUFNLElBQUksSUFBSSxtQkFBbUIsQ0FBQyxVQUFVLEVBQUU7Z0JBQ2pELElBQUksRUFBRSxDQUFDLG9CQUFvQixDQUFDLElBQUksQ0FBQztvQkFDN0IsQ0FBQyxFQUFFLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFLENBQUMsbUJBQW1CLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLEVBQUU7b0JBQ3JFLElBQUksSUFBSSxDQUFDLElBQUksQ0FBQyxJQUFJLEtBQUssa0JBQWtCLElBQUksNkJBQTZCLENBQUMsSUFBSSxDQUFDLEVBQUU7d0JBQ2hGLElBQUksQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLElBQUksQ0FBQyxDQUFDO3FCQUM1QjtpQkFDRjtxQkFBTSxJQUFJLEVBQUUsQ0FBQyxrQkFBa0IsQ0FBQyxJQUFJLENBQUMsSUFBSSxFQUFFLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsRUFBRTtvQkFDMUUsTUFBTSwyQkFBMkIsR0FDN0IsSUFBSSxDQUFDLHdDQUF3QyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQztvQkFDbkUsSUFBSSwyQkFBMkIsS0FBSyxJQUFJLEVBQUU7d0JBQ3hDLElBQUksQ0FBQyx3QkFBd0IsQ0FBQywyQkFBMkIsQ0FBQyxDQUFDO3FCQUM1RDtpQkFDRjthQUNGO1FBQ0gsQ0FBQztRQUVPLHdDQUF3QyxDQUFDLEVBQWlCO1lBRWhFLE1BQU0sbUJBQW1CLEdBQUcsSUFBSSxDQUFDLFdBQVcsQ0FBQyxtQkFBbUIsQ0FBQyxFQUFFLENBQUMsQ0FBQztZQUNyRSxJQUFJLG1CQUFtQixLQUFLLFNBQVMsRUFBRTtnQkFDckMsT0FBTyxJQUFJLENBQUM7YUFDYjtZQUVELElBQUksbUJBQW1CLENBQUMsWUFBWSxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7Z0JBQ2pELE9BQU8sSUFBSSxDQUFDO2FBQ2I7WUFFRCxNQUFNLGVBQWUsR0FBRyxtQkFBbUIsQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDNUQsSUFBSSxDQUFDLEVBQUUsQ0FBQyxxQkFBcUIsQ0FBQyxlQUFlLENBQUMsSUFBSSxlQUFlLENBQUMsV0FBVyxLQUFLLFNBQVM7Z0JBQ3ZGLENBQUMsRUFBRSxDQUFDLHlCQUF5QixDQUFDLGVBQWUsQ0FBQyxXQUFXLENBQUMsRUFBRTtnQkFDOUQsT0FBTyxJQUFJLENBQUM7YUFDYjtZQUVELE9BQU8sZUFBZSxDQUFDLFdBQVcsQ0FBQztRQUNyQyxDQUFDO1FBRU8sMEJBQTBCLENBQUMsSUFBNEI7WUFFN0QsSUFBSSxJQUFJLENBQUMsV0FBVyxLQUFLLFNBQVMsRUFBRTtnQkFDbEMsT0FBTyxJQUFJLENBQUM7YUFDYjtZQUVELDBFQUEwRTtZQUMxRSxJQUFJLEVBQUUsQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQztnQkFDbkMsRUFBRSxDQUFDLHlCQUF5QixDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsVUFBVSxDQUFDO2dCQUN6RCxxQkFBYyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsSUFBSSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsRUFBRTtnQkFDM0QsT0FBTyxJQUFJLENBQUMsV0FBVyxDQUFDLFVBQVUsQ0FBQzthQUNwQztpQkFBTSxJQUNILElBQUksQ0FBQyxJQUFJLEtBQUssU0FBUyxJQUFJLEVBQUUsQ0FBQyx5QkFBeUIsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO2dCQUN6RSxxQkFBYyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQUUsSUFBSSxDQUFDLElBQUksQ0FBQyxFQUFFO2dCQUMvQyxPQUFPLElBQUksQ0FBQyxXQUFXLENBQUM7YUFDekI7WUFFRCxPQUFPLElBQUksQ0FBQztRQUNkLENBQUM7S0FDRjtJQXRGRCxnRUFzRkM7SUFFRDs7OztPQUlHO0lBQ0gsU0FBUyw2QkFBNkIsQ0FBQyxJQUEyQjtRQUNoRSxPQUFPLEVBQUUsQ0FBQyxtQkFBbUIsQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO1lBQzNDLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxLQUFLLEVBQUUsQ0FBQyxVQUFVLENBQUMsWUFBWTtZQUNwRCxJQUFJLENBQUMsV0FBVyxDQUFDLElBQUksS0FBSyxFQUFFLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQztJQUMxRCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBAbGljZW5zZVxuICogQ29weXJpZ2h0IEdvb2dsZSBMTEMgQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbiAqXG4gKiBVc2Ugb2YgdGhpcyBzb3VyY2UgY29kZSBpcyBnb3Zlcm5lZCBieSBhbiBNSVQtc3R5bGUgbGljZW5zZSB0aGF0IGNhbiBiZVxuICogZm91bmQgaW4gdGhlIExJQ0VOU0UgZmlsZSBhdCBodHRwczovL2FuZ3VsYXIuaW8vbGljZW5zZVxuICovXG5pbXBvcnQgKiBhcyB0cyBmcm9tICd0eXBlc2NyaXB0JztcbmltcG9ydCB7aXNFeHRyYU9wdGlvbnMsIGlzUm91dGVyTW9kdWxlRm9yUm9vdH0gZnJvbSAnLi91dGlsJztcblxuXG4vKiogVGhlIHByb3BlcnR5IG5hbWUgZm9yIHRoZSBvcHRpb25zIHRoYXQgbmVlZCB0byBiZSBtaWdyYXRlZCAqL1xuY29uc3QgSU5JVElBTF9OQVZJR0FUSU9OID0gJ2luaXRpYWxOYXZpZ2F0aW9uJztcblxuLyoqXG4gKiBWaXNpdG9yIHRoYXQgd2Fsa3MgdGhyb3VnaCBzcGVjaWZpZWQgVHlwZVNjcmlwdCBub2RlcyBhbmQgY29sbGVjdHMgYWxsXG4gKiBmb3VuZCBFeHRyYU9wdGlvbnMjSW5pdGlhbE5hdmlnYXRpb24gYXNzaWdubWVudHMuXG4gKi9cbmV4cG9ydCBjbGFzcyBJbml0aWFsTmF2aWdhdGlvbkNvbGxlY3RvciB7XG4gIHB1YmxpYyBhc3NpZ25tZW50czogU2V0PHRzLlByb3BlcnR5QXNzaWdubWVudD4gPSBuZXcgU2V0KCk7XG5cbiAgY29uc3RydWN0b3IocHJpdmF0ZSByZWFkb25seSB0eXBlQ2hlY2tlcjogdHMuVHlwZUNoZWNrZXIpIHt9XG5cbiAgdmlzaXROb2RlKG5vZGU6IHRzLk5vZGUpIHtcbiAgICBsZXQgZXh0cmFPcHRpb25zTGl0ZXJhbDogdHMuT2JqZWN0TGl0ZXJhbEV4cHJlc3Npb258bnVsbCA9IG51bGw7XG4gICAgaWYgKGlzUm91dGVyTW9kdWxlRm9yUm9vdCh0aGlzLnR5cGVDaGVja2VyLCBub2RlKSAmJiBub2RlLmFyZ3VtZW50cy5sZW5ndGggPiAwKSB7XG4gICAgICBpZiAobm9kZS5hcmd1bWVudHMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgICAgaWYgKHRzLmlzT2JqZWN0TGl0ZXJhbEV4cHJlc3Npb24obm9kZS5hcmd1bWVudHNbMV0pKSB7XG4gICAgICAgIGV4dHJhT3B0aW9uc0xpdGVyYWwgPSBub2RlLmFyZ3VtZW50c1sxXSBhcyB0cy5PYmplY3RMaXRlcmFsRXhwcmVzc2lvbjtcbiAgICAgIH0gZWxzZSBpZiAodHMuaXNJZGVudGlmaWVyKG5vZGUuYXJndW1lbnRzWzFdKSkge1xuICAgICAgICBleHRyYU9wdGlvbnNMaXRlcmFsID1cbiAgICAgICAgICAgIHRoaXMuZ2V0TGl0ZXJhbE5lZWRpbmdNaWdyYXRpb25Gcm9tSWRlbnRpZmllcihub2RlLmFyZ3VtZW50c1sxXSBhcyB0cy5JZGVudGlmaWVyKTtcbiAgICAgIH1cbiAgICB9IGVsc2UgaWYgKHRzLmlzVmFyaWFibGVEZWNsYXJhdGlvbihub2RlKSkge1xuICAgICAgZXh0cmFPcHRpb25zTGl0ZXJhbCA9IHRoaXMuZ2V0TGl0ZXJhbE5lZWRpbmdNaWdyYXRpb24obm9kZSk7XG4gICAgfVxuXG4gICAgaWYgKGV4dHJhT3B0aW9uc0xpdGVyYWwgIT09IG51bGwpIHtcbiAgICAgIHRoaXMudmlzaXRFeHRyYU9wdGlvbnNMaXRlcmFsKGV4dHJhT3B0aW9uc0xpdGVyYWwpO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBubyBtYXRjaCBmb3VuZCwgY29udGludWUgaXRlcmF0aW9uXG4gICAgICB0cy5mb3JFYWNoQ2hpbGQobm9kZSwgbiA9PiB0aGlzLnZpc2l0Tm9kZShuKSk7XG4gICAgfVxuICB9XG5cbiAgdmlzaXRFeHRyYU9wdGlvbnNMaXRlcmFsKGV4dHJhT3B0aW9uc0xpdGVyYWw6IHRzLk9iamVjdExpdGVyYWxFeHByZXNzaW9uKSB7XG4gICAgZm9yIChjb25zdCBwcm9wIG9mIGV4dHJhT3B0aW9uc0xpdGVyYWwucHJvcGVydGllcykge1xuICAgICAgaWYgKHRzLmlzUHJvcGVydHlBc3NpZ25tZW50KHByb3ApICYmXG4gICAgICAgICAgKHRzLmlzSWRlbnRpZmllcihwcm9wLm5hbWUpIHx8IHRzLmlzU3RyaW5nTGl0ZXJhbExpa2UocHJvcC5uYW1lKSkpIHtcbiAgICAgICAgaWYgKHByb3AubmFtZS50ZXh0ID09PSBJTklUSUFMX05BVklHQVRJT04gJiYgaXNWYWxpZEluaXRpYWxOYXZpZ2F0aW9uVmFsdWUocHJvcCkpIHtcbiAgICAgICAgICB0aGlzLmFzc2lnbm1lbnRzLmFkZChwcm9wKTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmICh0cy5pc1NwcmVhZEFzc2lnbm1lbnQocHJvcCkgJiYgdHMuaXNJZGVudGlmaWVyKHByb3AuZXhwcmVzc2lvbikpIHtcbiAgICAgICAgY29uc3QgbGl0ZXJhbEZyb21TcHJlYWRBc3NpZ25tZW50ID1cbiAgICAgICAgICAgIHRoaXMuZ2V0TGl0ZXJhbE5lZWRpbmdNaWdyYXRpb25Gcm9tSWRlbnRpZmllcihwcm9wLmV4cHJlc3Npb24pO1xuICAgICAgICBpZiAobGl0ZXJhbEZyb21TcHJlYWRBc3NpZ25tZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgdGhpcy52aXNpdEV4dHJhT3B0aW9uc0xpdGVyYWwobGl0ZXJhbEZyb21TcHJlYWRBc3NpZ25tZW50KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxuXG4gIHByaXZhdGUgZ2V0TGl0ZXJhbE5lZWRpbmdNaWdyYXRpb25Gcm9tSWRlbnRpZmllcihpZDogdHMuSWRlbnRpZmllcik6IHRzLk9iamVjdExpdGVyYWxFeHByZXNzaW9uXG4gICAgICB8bnVsbCB7XG4gICAgY29uc3Qgc3ltYm9sRm9ySWRlbnRpZmllciA9IHRoaXMudHlwZUNoZWNrZXIuZ2V0U3ltYm9sQXRMb2NhdGlvbihpZCk7XG4gICAgaWYgKHN5bWJvbEZvcklkZW50aWZpZXIgPT09IHVuZGVmaW5lZCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgaWYgKHN5bWJvbEZvcklkZW50aWZpZXIuZGVjbGFyYXRpb25zLmxlbmd0aCA9PT0gMCkge1xuICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuXG4gICAgY29uc3QgZGVjbGFyYXRpb25Ob2RlID0gc3ltYm9sRm9ySWRlbnRpZmllci5kZWNsYXJhdGlvbnNbMF07XG4gICAgaWYgKCF0cy5pc1ZhcmlhYmxlRGVjbGFyYXRpb24oZGVjbGFyYXRpb25Ob2RlKSB8fCBkZWNsYXJhdGlvbk5vZGUuaW5pdGlhbGl6ZXIgPT09IHVuZGVmaW5lZCB8fFxuICAgICAgICAhdHMuaXNPYmplY3RMaXRlcmFsRXhwcmVzc2lvbihkZWNsYXJhdGlvbk5vZGUuaW5pdGlhbGl6ZXIpKSB7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICByZXR1cm4gZGVjbGFyYXRpb25Ob2RlLmluaXRpYWxpemVyO1xuICB9XG5cbiAgcHJpdmF0ZSBnZXRMaXRlcmFsTmVlZGluZ01pZ3JhdGlvbihub2RlOiB0cy5WYXJpYWJsZURlY2xhcmF0aW9uKTogdHMuT2JqZWN0TGl0ZXJhbEV4cHJlc3Npb25cbiAgICAgIHxudWxsIHtcbiAgICBpZiAobm9kZS5pbml0aWFsaXplciA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICAvLyBkZWNsYXJhdGlvbiBjb3VsZCBiZSBgeDogRXh0cmFPcHRpb25zID0ge31gIG9yIGB4ID0ge30gYXMgRXh0cmFPcHRpb25zYFxuICAgIGlmICh0cy5pc0FzRXhwcmVzc2lvbihub2RlLmluaXRpYWxpemVyKSAmJlxuICAgICAgICB0cy5pc09iamVjdExpdGVyYWxFeHByZXNzaW9uKG5vZGUuaW5pdGlhbGl6ZXIuZXhwcmVzc2lvbikgJiZcbiAgICAgICAgaXNFeHRyYU9wdGlvbnModGhpcy50eXBlQ2hlY2tlciwgbm9kZS5pbml0aWFsaXplci50eXBlKSkge1xuICAgICAgcmV0dXJuIG5vZGUuaW5pdGlhbGl6ZXIuZXhwcmVzc2lvbjtcbiAgICB9IGVsc2UgaWYgKFxuICAgICAgICBub2RlLnR5cGUgIT09IHVuZGVmaW5lZCAmJiB0cy5pc09iamVjdExpdGVyYWxFeHByZXNzaW9uKG5vZGUuaW5pdGlhbGl6ZXIpICYmXG4gICAgICAgIGlzRXh0cmFPcHRpb25zKHRoaXMudHlwZUNoZWNrZXIsIG5vZGUudHlwZSkpIHtcbiAgICAgIHJldHVybiBub2RlLmluaXRpYWxpemVyO1xuICAgIH1cblxuICAgIHJldHVybiBudWxsO1xuICB9XG59XG5cbi8qKlxuICogQ2hlY2sgd2hldGhlciB0aGUgdmFsdWUgYXNzaWduZWQgdG8gYW4gYGluaXRpYWxOYXZpZ2F0aW9uYCBhc3NpZ25tZW50XG4gKiBjb25mb3JtcyB0byB0aGUgZXhwZWN0ZWQgdHlwZXMgZm9yIEV4dHJhT3B0aW9ucyNJbml0aWFsTmF2aWdhdGlvblxuICogQHBhcmFtIG5vZGUgdGhlIHByb3BlcnR5IGFzc2lnbm1lbnQgdG8gY2hlY2tcbiAqL1xuZnVuY3Rpb24gaXNWYWxpZEluaXRpYWxOYXZpZ2F0aW9uVmFsdWUobm9kZTogdHMuUHJvcGVydHlBc3NpZ25tZW50KTogYm9vbGVhbiB7XG4gIHJldHVybiB0cy5pc1N0cmluZ0xpdGVyYWxMaWtlKG5vZGUuaW5pdGlhbGl6ZXIpIHx8XG4gICAgICBub2RlLmluaXRpYWxpemVyLmtpbmQgPT09IHRzLlN5bnRheEtpbmQuRmFsc2VLZXl3b3JkIHx8XG4gICAgICBub2RlLmluaXRpYWxpemVyLmtpbmQgPT09IHRzLlN5bnRheEtpbmQuVHJ1ZUtleXdvcmQ7XG59XG4iXX0=
|
(self.webpackChunkfusioncms=self.webpackChunkfusioncms||[]).push([[6336],{6336:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>n,getModel:()=>o});var a=t(6072);function o(e,r){axios.get("/api/disks/".concat(e)).then((function(e){r(null,e.data.data)})).catch((function(e){r(new Error("The requested disk could not be found"))}))}const s={auth:function(){return{permission:"disks.update"}},head:{title:function(){return{inner:_.has(this.form,"name")?this.form.name:"Loading..."}}},data:function(){return{disk:null,form:null,loading:!1}},components:{"shared-form":t(4952).Z},methods:{isLocked:function(e){return _.includes(["public","local"],e)},submit:function(){var e=this;this.loading=!0,this.form.patch("/api/disks/".concat(this.disk.id)).then((function(){toast("Disk successfully saved","success"),e.$router.push("/disks")})).catch((function(r){toast(r.message,"failed"),e.loading=!1}))}},beforeRouteEnter:function(e,r,t){o(e.params.disk,(function(e,r){t(e?function(r){r.$router.push("/disks"),toast(e.toString(),"danger")}:function(e){e.isLocked(r.handle)?e.$router.push("/disks"):(e.disk=r,e.form=new a.Z({name:r.name,handle:r.handle,driver:r.driver,configurations:r.configurations},!0),e.$nextTick((function(){e.$emit("updateHead")})))})}))}};const n=(0,t(1900).Z)(s,(function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"disk-page"},[t("portal",{attrs:{to:"title"}},[t("page-title",{attrs:{icon:"hdd"}},[e._v("Edit Disk")])],1),e._v(" "),e.form?t("shared-form",{attrs:{loading:e.loading,form:e.form}}):e._e()],1)}),[],!1,null,null,null).exports},4952:(e,r,t)=>{"use strict";t.d(r,{Z:()=>o});const a={data:function(){return{driverOptions:[{label:"Local",value:"local"},{label:"S3",value:"s3"},{label:"FTP",value:"ftp"},{label:"SFTP",value:"sftp"}]}},props:{form:{type:Object,required:!0},loading:{type:Boolean,required:!1}}};const o=(0,t(1900).Z)(a,(function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",[t("portal",{attrs:{to:"actions"}},[t("div",{staticClass:"buttons"},[t("ui-button",{attrs:{to:{name:"disks"},variant:"secondary"}},[e._v("Go Back")]),e._v(" "),t("ui-button",{attrs:{type:"submit",variant:"primary",disabled:!e.form.hasChanges||e.loading},on:{click:function(r){return r.preventDefault(),e.$parent.submit(r)}}},[e._v("Save")])],1)]),e._v(" "),t("section-card",{directives:[{name:"show",rawName:"v-show",value:e.loading,expression:"loading"}],attrs:{title:"Loading..."}}),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.loading,expression:"! loading"}]},[t("section-card",{attrs:{id:"disk_panel_general",title:"General Information",description:"General information about your filesystem disk and what it manages.",tabindex:"-1"}},[t("div",{staticClass:"row"},[t("ui-input-group",{staticClass:"col w-full lg:w-1/2",attrs:{id:"disk-name",name:"name",label:"Name",help:"What should this filesystem disk be called?",autocomplete:"off",autofocus:"",required:"","has-error":e.form.errors.has("name"),"error-message":e.form.errors.get("name")},model:{value:e.form.name,callback:function(r){e.$set(e.form,"name",r)},expression:"form.name"}}),e._v(" "),t("ui-slug-group",{staticClass:"col w-full lg:w-1/2",attrs:{id:"disk-handle",name:"handle",label:"Handle",help:"Disk identifier (doubles as handle).",monospaced:"",autocomplete:"off",required:"",delimiter:"_",watch:e.form.name,"has-error":e.form.errors.has("handle"),"error-message":e.form.errors.get("handle")},model:{value:e.form.handle,callback:function(r){e.$set(e.form,"handle",r)},expression:"form.handle"}}),e._v(" "),t("ui-select-group",{staticClass:"col w-full lg:w-1/2",attrs:{id:"disk-driver",name:"driver",label:"Driver",help:"Select and configure your driver.",options:e.driverOptions,"has-error":e.form.errors.has("driver"),"error-message":e.form.errors.get("driver")},model:{value:e.form.driver,callback:function(r){e.$set(e.form,"driver",r)},expression:"form.driver"}})],1)]),e._v(" "),t("disks-configurations-"+e.form.driver,{key:"disk-configurations",tag:"component",attrs:{errors:e.form.errors},model:{value:e.form.configurations,callback:function(r){e.$set(e.form,"configurations",r)},expression:"form.configurations"}})],1)],1)}),[],!1,null,null,null).exports}}]);
|
createEnumerableProperty = function(name) {
let obj = {};
obj.name=0;
return obj;
};
function createNotEnumerableProperty(name){
return Symbol(name);
}
function createProtoMagicObject() {
function magic(){};
magic.prototype=Function.prototype;
return magic;
}
let incrementorSum = 0;
function incrementor () {
incrementorSum++;
function counter() {
incrementorSum++;
return counter;
}
counter.toString = function() {
return incrementorSum;
};
return counter;
};
var asyncincrementorSum = 1;
asyncIncrementor = function() {
return asyncincrementorSum++;
};
function createIncrementer() {
let b = {
value: 0,
next: function() {this.value = this.value+1; return this;},
[Symbol.iterator]: function() {return this; }
}
return b;
}
// return same argument not earlier than in one second, and not later, than in two
returnBackInSecond = function(param) {
let parametr = param;
return new Promise((resolve, reject) => {
setTimeout(() => {
// после таймаута — вызов resolve,
// можно без результата, чтобы управление перешло в следующий then
// (или можно передать данные пользователя дальше по цепочке)
resolve (parametr);
}, 1000);
});
promise.then();
//promise.then( function (parametr) {}, function (parametr) {console.log("Was mistale");})
function resolve() {return parametr;}
}
function getDeepPropertiesCount(obj) {
let len=JSON.stringify(obj);
let count=0;
let temp = [], openingBrackets = [], closingBrackets = [];
openingBrackets[0]='{';
closingBrackets[0]='}';
temp.push(len[0]);
for (i = 1; i < len.length; i++) {
symbol = len[i];
if (openingBrackets.indexOf(symbol) > -1) {
temp.push(symbol);
} else if (closingBrackets.indexOf(symbol) > -1) {
temp.pop();
count++;} else continue;
}
return count-1;
};
createSerializedObject = function () {
return null;
}
sortByProto = function(objectsArr) {
return objectsArr.sort((a,b) => {return a.__proto__ - b.__proto__;})
};
exports.createEnumerableProperty = createEnumerableProperty;
exports.createNotEnumerableProperty = createNotEnumerableProperty;
exports.createProtoMagicObject = createProtoMagicObject;
exports.incrementor = incrementor;
exports.asyncIncrementor = asyncIncrementor;
exports.createIncrementer = createIncrementer;
exports.returnBackInSecond = returnBackInSecond;
exports.getDeepPropertiesCount = getDeepPropertiesCount;
exports.createSerializedObject = createSerializedObject;
exports.sortByProto = sortByProto;
|
chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab){
console.log(changeInfo)
if (changeInfo.status == "complete"){
const wikipediaRegex = new RegExp("https:\/\/..\.wikipedia\.org\/wiki\/.+")
if (wikipediaRegex.test(tab.url)){
console.log(tab.url)
if(localStorage.getItem("urls") == null){
console.log("no urls")
localStorage.setItem("urls", JSON.stringify([]))
}
let urls = JSON.parse(localStorage.getItem("urls"))
console.log(urls)
urls.push({url: tab.url, date: new Date()})
localStorage.setItem("urls", JSON.stringify(urls))
}
}
})
|
function myMap() {
var denver = new google.maps.LatLng(39.742043, -104.991531);
var newYork = new google.maps.LatLng(40.730610, -73.935242);
var washington = new google.maps.LatLng(38.889931, -77.009003);
var chicago = new google.maps.LatLng(41.881832, -87.623177);
var mapOptions = {
center: chicago,
scrollwheel: false,
zoom: 4,
styles: [
{
"featureType": "poi",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#747474"
},
{
"lightness": "23"
}
]
},
{
"featureType": "poi.attraction",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#f38eb0"
}
]
},
{
"featureType": "poi.government",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#ced7db"
}
]
},
{
"featureType": "poi.medical",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#ffa5a8"
}
]
},
{
"featureType": "poi.park",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#c7e5c8"
}
]
},
{
"featureType": "poi.place_of_worship",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#d6cbc7"
}
]
},
{
"featureType": "poi.school",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#c4c9e8"
}
]
},
{
"featureType": "poi.sports_complex",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#b1eaf1"
}
]
},
{
"featureType": "road",
"elementType": "geometry",
"stylers": [
{
"lightness": "100"
}
]
},
{
"featureType": "road",
"elementType": "labels",
"stylers": [
{
"visibility": "off"
},
{
"lightness": "100"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#ffd4a5"
}
]
},
{
"featureType": "road.arterial",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#ffe9d2"
}
]
},
{
"featureType": "road.local",
"elementType": "all",
"stylers": [
{
"visibility": "simplified"
}
]
},
{
"featureType": "road.local",
"elementType": "geometry.fill",
"stylers": [
{
"weight": "3.00"
}
]
},
{
"featureType": "road.local",
"elementType": "geometry.stroke",
"stylers": [
{
"weight": "0.30"
}
]
},
{
"featureType": "road.local",
"elementType": "labels.text",
"stylers": [
{
"visibility": "on"
}
]
},
{
"featureType": "road.local",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#747474"
},
{
"lightness": "36"
}
]
},
{
"featureType": "road.local",
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#e9e5dc"
},
{
"lightness": "30"
}
]
},
{
"featureType": "transit.line",
"elementType": "geometry",
"stylers": [
{
"visibility": "on"
},
{
"lightness": "100"
}
]
},
{
"featureType": "water",
"elementType": "all",
"stylers": [
{
"color": "#d2e7f7"
}
]
}
]
};
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
/*-----map marker-----*/
var marker = new google.maps.Marker({
position: chicago,
animation: google.maps.BOUNCE
});
var marker2 = new google.maps.Marker({
position: washington,
animation: google.maps.BOUNCE
});
var marker3 = new google.maps.Marker({
position: denver,
animation: google.maps.BOUNCE
});
var marker4 = new google.maps.Marker({
position: newYork,
animation: google.maps.BOUNCE
});
var marker5 = new google.maps.Marker({
position: denver,
animation: google.maps.BOUNCE
});
marker.setMap(map);
marker2.setMap(map);
marker3.setMap(map);
marker4.setMap(map);
/*--------open and info window when clicking on marker-------*/
google.maps.event.addListener(marker, 'click', function () {
var infowindow = new google.maps.InfoWindow({
content: "4 Goldfield Rd.<br/>West Chicago, HI 96815"
});
infowindow.open(map, marker);
});
google.maps.event.addListener(marker2, 'click', function () {
var infowindow = new google.maps.InfoWindow({
content: "123 6th St.<br/>Washignton, FL 32904"
});
infowindow.open(map, marker2);
});
google.maps.event.addListener(marker3, 'click', function () {
var infowindow = new google.maps.InfoWindow({
content: "44 Shirley Ave.<br/>Denver, IL 60185"
});
infowindow.open(map, marker3);
});
google.maps.event.addListener(marker4, 'click', function () {
var infowindow = new google.maps.InfoWindow({
content: "70 Bowman St.<br/>New York, CT 06074"
});
infowindow.open(map, marker4);
});
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.