hexsha string | size int64 | ext string | lang string | max_stars_repo_path string | max_stars_repo_name string | max_stars_repo_head_hexsha string | max_stars_repo_licenses list | max_stars_count int64 | max_stars_repo_stars_event_min_datetime string | max_stars_repo_stars_event_max_datetime string | max_issues_repo_path string | max_issues_repo_name string | max_issues_repo_head_hexsha string | max_issues_repo_licenses list | max_issues_count int64 | max_issues_repo_issues_event_min_datetime string | max_issues_repo_issues_event_max_datetime string | max_forks_repo_path string | max_forks_repo_name string | max_forks_repo_head_hexsha string | max_forks_repo_licenses list | max_forks_count int64 | max_forks_repo_forks_event_min_datetime string | max_forks_repo_forks_event_max_datetime string | content string | avg_line_length float64 | max_line_length int64 | alphanum_fraction float64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
993a17361024f9c873728c75b0a5f609a979004b | 2,458 | js | JavaScript | src/js/EventHandler.js | msartintarm/sony-camera-hack | 9427b061d98398bf83074a72851b159365cd34aa | [
"MIT"
] | 1 | 2018-06-14T17:42:31.000Z | 2018-06-14T17:42:31.000Z | src/js/EventHandler.js | msartintarm/sony-camera-hack | 9427b061d98398bf83074a72851b159365cd34aa | [
"MIT"
] | null | null | null | src/js/EventHandler.js | msartintarm/sony-camera-hack | 9427b061d98398bf83074a72851b159365cd34aa | [
"MIT"
] | 1 | 2021-04-04T13:12:16.000Z | 2021-04-04T13:12:16.000Z |
/*
Determines precedence of elements in handler map
1. target element class name -- example the_button
2. target element tag name (uppercase) -- for example Canvas
*/
const getElemKey = (elem) => { return elem.className || elem.tagName; };
/* Looks for handler defined in mapping for target element */
const handler = (e, map) => {
const theFunction = map[getElemKey(e.target)];
return theFunction? theFunction(e):
map.default? map.default(e):
null;
};
const eventmap = {
tick: {}
};
const registeredHandlerMap = { tick: {} };
const tickCountMap = {};
const registerHandler = (evName, key, theFunction) => {
// invoke page level function if it doesn't exist already
if (!(evName in registeredHandlerMap)) {
eventmap[evName] = {};
registeredHandlerMap[evName] =
(e) => { handler(e, eventmap[evName]); };
document.addEventListener(evName, registeredHandlerMap[evName]);
}
eventmap[evName][key] = theFunction;
};
const deregisterHandler = (evName, key) => {
if (evName in registeredHandlerMap &&
key in registeredHandlerMap[evName]) {
delete eventmap[evName][key];
}
};
/* lets you query whether a tick event is active */
const checkTickEvent = (key) => {
return (key in registeredHandlerMap.tick);
};
/* get rid of this event */
const deregisterTickEvent = (key) => {
if (checkTickEvent(key)) {
delete eventmap.tick[key];
delete registeredHandlerMap.tick[key];
return;
}
};
/* unique key for function,
function itself,
num times to run (0 if unlimited),
replace if should override previous function */
const registerTickEvent = (key, theFunction, numTimes, replace) => {
if (key in registeredHandlerMap.tick) {
if (!replace) return; // no duplicate functions
}
eventmap.tick[key] = theFunction;
tickCountMap[key] = 0;
registeredHandlerMap.tick[key] = () => {
if (numTimes > 0 && tickCountMap[key] >= numTimes ) {
deregisterTickEvent(key);
return;
}
tickCountMap[key] += 1;
eventmap.tick[key]();
};
};
const onTick = () => { // call after requesting animation frame
const theList = registeredHandlerMap.tick;
for (const name in theList) {
theList[name]();
}
}
export { registerHandler, deregisterHandler, checkTickEvent, registerTickEvent, deregisterTickEvent, onTick };
| 28.252874 | 110 | 0.638731 |
993a48f4d2beff62d1b145578d8570b7b6e74c6c | 1,205 | js | JavaScript | src/data-interfaces/arweave/applications/arvatar.js | LeGaryGary/Message-Forever | dacfbe20b3471fa379c10fd1f6f52b6165ea8c81 | [
"MIT"
] | null | null | null | src/data-interfaces/arweave/applications/arvatar.js | LeGaryGary/Message-Forever | dacfbe20b3471fa379c10fd1f6f52b6165ea8c81 | [
"MIT"
] | null | null | null | src/data-interfaces/arweave/applications/arvatar.js | LeGaryGary/Message-Forever | dacfbe20b3471fa379c10fd1f6f52b6165ea8c81 | [
"MIT"
] | null | null | null | import { arweave } from '../';
const Arvatars = {};
/**
* LookupAvatarAsync uses arql to lookup the arweave ID name of the wallet address
*
* @export
* @param {string} walletAddress
* @returns {string}
*/
export async function LookupAvatarAsync(walletAddress) {
if (Arvatars[walletAddress]) return Arvatars[walletAddress];
const results = await arweave.api.post('/graphql', {
query: `{
transactions(
tags: [
{
name: "App-Name",
values: ["arweave-avatar"]
}
],
owners: ["${walletAddress}"]
) {
edges {
node {
id
}
}
}
}`})
let edges = results.data.data.transactions.edges;
let txIds = edges.map(e => e.node.id);
if (txIds.length === 0){
var url = 'https://arweave.net/PylCrHjd8cq1V-qO9vsgKngijvVn7LAVLB6apdz0QK0';
Arvatars[walletAddress] = url;
return url;
}
const profilePictureTxId = txIds[0];
// const tx = await GetTxCachedAsync(profilePictureTxId);
// const data = tx.get('data');
// console.log('pfp:', data);
Arvatars[walletAddress] = 'https://arweave.net/' + profilePictureTxId;
return Arvatars[walletAddress];
}
| 26.777778 | 82 | 0.6 |
993b9f45f6348773ab892b281a313c9fe9c7edaf | 3,741 | js | JavaScript | src/main/webapp/bower_components/goJs/extensionsTS/SectorReshapingScript.js | dads-software-brotherhood/sekc | 96835b107a0ef39f601bc505ef37aa349133e6cb | [
"Apache-2.0"
] | 4 | 2017-05-16T22:44:55.000Z | 2021-12-23T07:11:25.000Z | src/main/webapp/bower_components/goJs/extensionsTS/SectorReshapingScript.js | dads-software-brotherhood/sekc | 96835b107a0ef39f601bc505ef37aa349133e6cb | [
"Apache-2.0"
] | 1 | 2017-07-20T18:10:03.000Z | 2017-07-20T18:10:09.000Z | src/main/webapp/bower_components/goJs/extensionsTS/SectorReshapingScript.js | dads-software-brotherhood/sekc | 96835b107a0ef39f601bc505ef37aa349133e6cb | [
"Apache-2.0"
] | null | null | null | (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(["require", "exports", "../release/go", "./SectorReshapingTool"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/*
* Copyright (C) 1998-2017 by Northwoods Software Corporation. All Rights Reserved.
*/
var go = require("../release/go");
var SectorReshapingTool_1 = require("./SectorReshapingTool");
var myDiagram = null;
function init() {
if (typeof window["goSamples"] === 'function')
window["goSamples"](); // init for these samples -- you don't need to call this
var $ = go.GraphObject.make;
myDiagram =
$(go.Diagram, "myDiagramDiv", {
initialContentAlignment: go.Spot.Center,
"animationManager.isEnabled": false,
"undoManager.isEnabled": true
});
// install the SectorReshapingTool as a mouse-down tool
myDiagram.toolManager.mouseDownTools.add(new SectorReshapingTool_1.SectorReshapingTool());
function makeSector(data) {
var radius = SectorReshapingTool_1.SectorReshapingTool.prototype.getRadius(data);
var angle = SectorReshapingTool_1.SectorReshapingTool.prototype.getAngle(data);
var sweep = SectorReshapingTool_1.SectorReshapingTool.prototype.getSweep(data);
var start = new go.Point(radius, 0).rotate(angle);
// this is much more efficient than calling go.GraphObject.make:
var geo = new go.Geometry()
.add(new go.PathFigure(radius + start.x, radius + start.y) // start point
.add(new go.PathSegment(go.PathSegment.Arc, angle, sweep, // angles
radius, radius, // center
radius, radius)) // radius
.add(new go.PathSegment(go.PathSegment.Line, radius, radius).close()))
.add(new go.PathFigure(0, 0)) // make sure the Geometry always includes the whole circle
.add(new go.PathFigure(2 * radius, 2 * radius)); // even if only a small sector is "lit"
console.log(geo.toString());
return geo;
}
myDiagram.nodeTemplate =
$(go.Node, "Spot", {
locationSpot: go.Spot.Center, locationObjectName: "LAMP",
selectionObjectName: "LAMP", selectionAdorned: false
}, new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),
// selecting a Node brings it forward in the z-order
new go.Binding("layerName", "isSelected", function (s) { return s ? "Foreground" : ""; }).ofObject(), $(go.Panel, "Spot", { name: "LAMP" }, $(go.Shape, // arc
{ fill: "yellow", stroke: "lightgray", strokeWidth: 0.5 }, new go.Binding("geometry", "", makeSector)), $(go.Shape, "Circle", { name: "SHAPE", width: 6, height: 6 })), $(go.TextBlock, {
alignment: new go.Spot(0.5, 0.5, 0, 3), alignmentFocus: go.Spot.Top,
stroke: "blue", background: "rgba(255,255,255,0.3)"
}, new go.Binding("alignment", "spot", go.Spot.parse).makeTwoWay(go.Spot.stringify), new go.Binding("text", "name")));
myDiagram.model = new go.GraphLinksModel([
{ name: "Alpha", radius: 70, sweep: 120 },
{ name: "Beta", radius: 70, sweep: 80, angle: 200 }
]);
myDiagram.commandHandler.selectAll(); // to show the tool handles
}
exports.init = init;
});
| 56.681818 | 197 | 0.595563 |
993ba72f3c331190f3327e795ef4752a95c5cc11 | 1,093 | js | JavaScript | node_modules/foundation-sites/dist/js/plugins/foundation.util.imageLoader.min.js | jimikara/AFRIL-theme | aa12f0efa6ae904fc9c239444be522ea64beb351 | [
"MIT"
] | 1 | 2019-06-25T20:04:14.000Z | 2019-06-25T20:04:14.000Z | node_modules/foundation-sites/dist/js/plugins/foundation.util.imageLoader.min.js | jimikara/AFRIL-theme | aa12f0efa6ae904fc9c239444be522ea64beb351 | [
"MIT"
] | 7 | 2020-05-07T17:54:49.000Z | 2022-03-02T06:30:17.000Z | node_modules/foundation-sites/dist/js/plugins/foundation.util.imageLoader.min.js | jimikara/AFRIL-theme | aa12f0efa6ae904fc9c239444be522ea64beb351 | [
"MIT"
] | 1 | 2019-06-25T20:04:27.000Z | 2019-06-25T20:04:27.000Z | !function(n){function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e={};t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:o})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=86)}({0:function(n,t){n.exports=jQuery},1:function(n,t){n.exports={Foundation:window.Foundation}},86:function(n,t,e){n.exports=e(87)},87:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=e(1),r=(e.n(o),e(88));o.Foundation.onImagesLoaded=r.a},88:function(n,t,e){"use strict";function o(n,t){function e(){0===--o&&t()}var o=n.length;0===o&&t(),n.each(function(){if(this.complete&&void 0!==this.naturalWidth)e();else{var n=new Image,t="load.zf.images error.zf.images";i()(n).one(t,function n(o){i()(this).off(t,n),e()}),n.src=i()(this).attr("src")}})}e.d(t,"a",function(){return o});var r=e(0),i=e.n(r)}}); | 1,093 | 1,093 | 0.662397 |
993badc4527702ad1eb7b5dde8f82bfd1e055509 | 9,298 | js | JavaScript | all-hugo-themes/minimo/static/assets/js/twemoji.98d07d9e.js | CodeFreezr/hugo-lab | 8c06ac6dfc39648c8dd6472b31922ba62ce411a8 | [
"MIT"
] | null | null | null | all-hugo-themes/minimo/static/assets/js/twemoji.98d07d9e.js | CodeFreezr/hugo-lab | 8c06ac6dfc39648c8dd6472b31922ba62ce411a8 | [
"MIT"
] | null | null | null | all-hugo-themes/minimo/static/assets/js/twemoji.98d07d9e.js | CodeFreezr/hugo-lab | 8c06ac6dfc39648c8dd6472b31922ba62ce411a8 | [
"MIT"
] | null | null | null | (window.webpackJsonp=window.webpackJsonp||[]).push([[2],[function(d,u){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(d){"object"==typeof window&&(e=window)}d.exports=e},,,function(d,u,e){(function(u){var e=u.location||{},f=function(){"use strict";var d={base:"https://twemoji.maxcdn.com/2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){var u="string"==typeof d?parseInt(d,16):d;if(u<65536)return n(u);return n(55296+((u-=65536)>>10),56320+(1023&u))},toCodePoint:p},onerror:function(){this.parentNode&&this.parentNode.replaceChild(r(this.alt,!1),this)},parse:function(u,f){f&&"function"!=typeof f||(f={callback:f});return("string"==typeof u?function(d,u){return l(d,function(d){var e,f,c=d,t=o(d),n=u.callback(t,u);if(n){for(f in c="<img ".concat('class="',u.className,'" ','draggable="false" ','alt="',d,'"',' src="',n,'"'),e=u.attributes(d,t))e.hasOwnProperty(f)&&0!==f.indexOf("on")&&-1===c.indexOf(" "+f+"=")&&(c=c.concat(" ",f,'="',e[f].replace(a,i),'"'));c=c.concat("/>")}return c})}:function(d,u){var f,c,a,n,b,i,s,l,p,h,m,g,x,w=function d(u,e){var f,c,a=u.childNodes,n=a.length;for(;n--;)f=a[n],3===(c=f.nodeType)?e.push(f):1!==c||"ownerSVGElement"in f||t.test(f.nodeName.toLowerCase())||d(f,e);return e}(d,[]),C=w.length;for(;C--;){for(a=!1,n=document.createDocumentFragment(),b=w[C],i=b.nodeValue,l=0;s=e.exec(i);){if((p=s.index)!==l&&n.appendChild(r(i.slice(l,p),!0)),m=s[0],g=o(m),l=p+m.length,x=u.callback(g,u)){for(c in(h=new Image).onerror=u.onerror,h.setAttribute("draggable","false"),f=u.attributes(m,g))f.hasOwnProperty(c)&&0!==c.indexOf("on")&&!h.hasAttribute(c)&&h.setAttribute(c,f[c]);h.className=u.className,h.alt=m,h.src=x,a=!0,n.appendChild(h)}h||n.appendChild(r(m,!1)),h=null}a&&(l<i.length&&n.appendChild(r(i.slice(l),!0)),b.parentNode.replaceChild(n,b))}return d})(u,{callback:f.callback||b,attributes:"function"==typeof f.attributes?f.attributes:s,base:"string"==typeof f.base?f.base:d.base,ext:f.ext||d.ext,size:f.folder||(c=f.size||d.size,"number"==typeof c?c+"x"+c:c),className:f.className||d.className,onerror:f.onerror||d.onerror});var c},replace:l,test:function(d){e.lastIndex=0;var u=e.test(d);return e.lastIndex=0,u}},u={"&":"&","<":"<",">":">","'":"'",'"':"""},e=/\ud83d[\udc68-\udc69](?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92])|(?:\ud83c[\udfcb\udfcc]|\ud83d\udd75|\u26f9)(?:\ufe0f|\ud83c[\udffb-\udfff])\u200d[\u2640\u2642]\ufe0f|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd37-\udd39\udd3d\udd3e\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|(?:[\u0023\u002a\u0030-\u0039])\ufe0f?\u20e3|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\uddd1-\udddd]|[\u270a\u270b])(?:\ud83c[\udffb-\udfff]|)|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud800\udc00|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\udeeb\udeec\udef4-\udef8]|\ud83e[\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd40-\udd45\udd47-\udd4c\udd50-\udd6b\udd80-\udd97\uddc0\uddd0\uddde-\udde6]|[\u23e9-\u23ec\u23f0\u23f3\u2640\u2642\u2695\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a]|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u00a9\u00ae\u203c\u2049\u2122\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2694\u2696\u2697\u2699\u269b\u269c\u26a0\u26a1\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))/g,f=/\uFE0F/g,c=String.fromCharCode(8205),a=/[&<>'"]/g,t=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,n=String.fromCharCode;return d;function r(d,u){return document.createTextNode(u?d.replace(f,""):d)}function b(d,u){return"".concat(u.base,u.size,"/",d,u.ext)}function o(d){return p(d.indexOf(c)<0?d.replace(f,""):d)}function i(d){return u[d]}function s(){return null}function l(d,u){return String(d).replace(e,u)}function p(d,u){for(var e=[],f=0,c=0,a=0;a<d.length;)f=d.charCodeAt(a++),c?(e.push((65536+(c-55296<<10)+(f-56320)).toString(16)),c=0):55296<=f&&f<=56319?c=f:e.push(f.toString(16));return e.join(u||"-")}}();e.protocol||(f.base=f.base.replace(/^http:/,"")),d.exports=f}).call(this,e(0))}]]); | 9,298 | 9,298 | 0.739729 |
993bbe4e9447ee160e21b8b447bb7094b8ee18ce | 311 | js | JavaScript | lab3-4/back/models/location_type.js | DronSofiia/Subject_Web2 | 04b8d4018460b432e672fb7ed4369f9e242e8f45 | [
"MIT"
] | null | null | null | lab3-4/back/models/location_type.js | DronSofiia/Subject_Web2 | 04b8d4018460b432e672fb7ed4369f9e242e8f45 | [
"MIT"
] | 20 | 2020-05-27T12:04:33.000Z | 2022-02-27T05:49:40.000Z | lab3-4/back/models/location_type.js | DronSofiia/Subject_Web2 | 04b8d4018460b432e672fb7ed4369f9e242e8f45 | [
"MIT"
] | null | null | null | const mongoose = require('mongoose')
const Schema = mongoose.Schema
const locationTypeSchema = new Schema({
code: { type: String, required: true, unique: true, max: 6 },
name: { type: String, required: true, unique: true, max: 50 }
})
module.exports = mongoose.model('LocationType', locationTypeSchema)
| 28.272727 | 67 | 0.713826 |
993bf34000a6479938bcb0e49d39743dfa2d2d70 | 438 | js | JavaScript | src/KanbanAPI/app/models/cards.js | RookMeister/api-kanban-board | 71101a068ff5dfbbef02b7811b86703f37005922 | [
"MIT"
] | null | null | null | src/KanbanAPI/app/models/cards.js | RookMeister/api-kanban-board | 71101a068ff5dfbbef02b7811b86703f37005922 | [
"MIT"
] | null | null | null | src/KanbanAPI/app/models/cards.js | RookMeister/api-kanban-board | 71101a068ff5dfbbef02b7811b86703f37005922 | [
"MIT"
] | null | null | null | const mongoose = require('mongoose')
const Schema = mongoose.Schema({
name: {
type: String,
required: true
},
user_id: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User'
},
board_id: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Board'
},
list_id: {
type: mongoose.Schema.Types.ObjectId,
ref: 'List'
},
pos: {
type: Number,
required: true
}
})
mongoose.model('Card', Schema)
| 16.222222 | 41 | 0.60274 |
993c9c1db2f9e0275adf1dca8e5f0c94409b7894 | 31,124 | js | JavaScript | src/datalayerclustererplus.js | jesusr/data-layer-clusterer-plus | 299e7de9a8216679087aedd2d1927437c86f42bd | [
"Apache-2.0"
] | null | null | null | src/datalayerclustererplus.js | jesusr/data-layer-clusterer-plus | 299e7de9a8216679087aedd2d1927437c86f42bd | [
"Apache-2.0"
] | null | null | null | src/datalayerclustererplus.js | jesusr/data-layer-clusterer-plus | 299e7de9a8216679087aedd2d1927437c86f42bd | [
"Apache-2.0"
] | null | null | null | /* globals google, _ */
/* exports DataLayerClusterer */
'use strict';
/**
* @name DataLayerClusterer for Google Maps v3
* @version version 0.7.2
* @author Jesús R Peinado Vergara
*
* The library creates and manages per-zoom-level clusters for large amounts of
* data layer features.
*
* Based on MarkerClusterer by Luke Mehe.
*/
/**
* 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.
*/
/**
* A Data Layer Clusterer that clusters point features.
*
* @param {google.maps.Map} map The Google map to attach to.
* @param {Object=} optOptions support the following options:
* 'map': (google.maps.Map) The Google map to attach to.
* 'gridSize': (number) The grid size of a cluster in pixels.
* 'maxZoom': (number) The maximum zoom level that a feature can be part of a
* cluster.
* 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a
* cluster is to zoom into it.
* 'averageCenter': (boolean) Wether the center of each cluster should be
* the average of all features in the cluster.
* 'minimumClusterSize': (number) The minimum number of features to be in a
* cluster before the features are hidden and a count
* is shown.
* 'styles': (object) An object that has style properties:
* 'url': (string) The image url.
* 'height': (number) The image height.
* 'width': (number) The image width.
* 'anchor': (Array) The anchor position of the label text.
* 'textColor': (string) The text color.
* 'textSize': (number) The text size.
* 'backgroundPosition': (string) The position of the backgound x, y.
* @constructor
* @extends google.maps.OverlayView
*/
function DataLayerClusterer(optOptions) {
DataLayerClusterer.extend(DataLayerClusterer, google.maps.OverlayView);
var options = optOptions || {};
this.clusters_ = [];
this.sizes = [53, 56, 66, 78, 90];
this.styles_ = [];
this.ready_ = false;
this.map = options.map || null;
this.gridSize_ = options.gridSize || 60;
this.minClusterSize_ = options.minimumClusterSize || 2;
this.maxZoom_ = options.maxZoom || null;
this.className_ = options.className || 'cluster';
this.styles_ = options.styles || [];
this.imagePath_ = options.imagePath || DataLayerClusterer.MARKER_CLUSTER_IMAGE_PATH_;
this.imageExtension_ = options.imageExtension || DataLayerClusterer.MARKER_CLUSTER_IMAGE_EXTENSION_;
this.zoomOnClick_ = true;
this.featuresArr = [];
if (options.zoomOnClick !== undefined) {
this.zoomOnClick_ = options.zoomOnClick;
}
this.averageCenter_ = true;
if (options.averageCenter !== undefined) {
this.averageCenter_ = options.averageCenter;
}
this.setupStyles_();
this._dataLayer = new google.maps.Data();
this._dataLayer.setStyle(DataLayerClusterer.HIDDEN_FEATURE);
if (this.map !== null) {
this.setMap(this.map);
}
}
/* ---- Constants ---- */
DataLayerClusterer.VISIBLE_FEATURE = {
visible: true
};
DataLayerClusterer.HIDDEN_FEATURE = {
visible: false
};
/* ---- Public methods ---- */
DataLayerClusterer.prototype.setVisible = function (v) {
if (!v) {
this.map__ = this.getMap();
google.maps.event.removeListener(this._idle);
google.maps.event.removeListener(this._zoomchanged);
this._dataLayer.setMap(null);
this.resetViewport(true);
} else {
if (!this.map__) this.map__ = this.map || this.map_;
this.setMap(this.map__);
this._dataLayer.setMap(this.map__);
this.onAdd();
this.redraw();
}
};
/**
* Returns the number of clusters in the clusterer.
*
* @return {number} The number of clusters.
*/
DataLayerClusterer.prototype.getTotalClusters = function () {
return this.clusters_.length;
};
/**
* Extends a bounds object by the grid size.
*
* @param {google.maps.LatLngBounds} bounds The bounds to extend.
* @return {google.maps.LatLngBounds} The extended bounds.
*/
DataLayerClusterer.prototype.getExtendedBounds = function (bounds) {
var projection = this.getProjection();
// Turn the bounds into latlng.
var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),
bounds.getNorthEast().lng());
var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),
bounds.getSouthWest().lng());
// Convert the points to pixels and the extend out by the grid size.
var trPix = projection.fromLatLngToDivPixel(tr);
trPix.x += this.gridSize_;
trPix.y -= this.gridSize_;
var blPix = projection.fromLatLngToDivPixel(bl);
blPix.x -= this.gridSize_;
blPix.y += this.gridSize_;
// Convert the pixel points back to LatLng
var ne = projection.fromDivPixelToLatLng(trPix);
var sw = projection.fromDivPixelToLatLng(blPix);
// Extend the bounds to contain the new bounds.
bounds.extend(ne);
bounds.extend(sw);
return bounds;
};
/**
* Redraws the clusters.
*/
DataLayerClusterer.prototype.redraw = function () {
// var oldClusters = this.clusters_.slice();
// this.clusters_.length = 0;
// if (this.featuresArr.length) {
// this.createClusters_(0);
// }
//
// // Remove the old clusters.
// // Do it in a timeout so the other clusters have been drawn first.
// window.requestAnimationFrame(function() {
// var oldSize = oldClusters.length;
// for (var i = 0; i !== oldSize; ++i) {
// oldClusters[i].remove();
// }
// });
this.createClusters_(0);
};
/* ---- Options GET & SET ---- */
/**
* Whether zoom on click is set.
*
* @return {boolean} True if zoomOnClick_ is set.
*/
DataLayerClusterer.prototype.isZoomOnClick = function () {
return this.zoomOnClick_;
};
/**
* Whether average center is set.
*
* @return {boolean} True if averageCenter_ is set.
*/
DataLayerClusterer.prototype.isAverageCenter = function () {
return this.averageCenter_;
};
/**
* Sets the max zoom for the clusterer.
*
* @param {number} maxZoom The max zoom level.
*/
DataLayerClusterer.prototype.setMaxZoom = function (maxZoom) {
this.maxZoom_ = maxZoom;
};
/**
* Gets the max zoom for the clusterer.
*
* @return {number} The max zoom level.
*/
DataLayerClusterer.prototype.getMaxZoom = function () {
return this.maxZoom_;
};
/**
* Returns the size of the grid.
*
* @return {number} The grid size.
*/
DataLayerClusterer.prototype.getGridSize = function () {
return this.gridSize_;
};
/**
* Sets the size of the grid.
*
* @param {number} size The grid size.
*/
DataLayerClusterer.prototype.setGridSize = function (size) {
this.gridSize_ = size;
};
/**
* Returns the min cluster size.
*
* @return {number} The grid size.
*/
DataLayerClusterer.prototype.getMinClusterSize = function () {
return this.minClusterSize_;
};
/**
* Sets the min cluster size.
*
* @param {number} size The grid size.
*/
DataLayerClusterer.prototype.setMinClusterSize = function (size) {
this.minClusterSize_ = size;
};
/* ---- google.maps.Data interface ---- */
DataLayerClusterer.prototype.add = function (feature) {
return this._dataLayer.add(feature);
};
DataLayerClusterer.prototype.addGeoJson = function (geoJson, options) {
this.featuresArr = geoJson.features;
return this._dataLayer.addGeoJson(geoJson, options);
};
DataLayerClusterer.prototype.contains = function (feature) {
return this._dataLayer.contains(feature);
};
DataLayerClusterer.prototype.forEach = function (callback) {
return this._dataLayer.forEach(callback);
};
DataLayerClusterer.prototype.getControlPosition = function () {
return this._dataLayer.getControlPosition();
};
DataLayerClusterer.prototype.getControls = function () {
return this._dataLayer.getControls();
};
DataLayerClusterer.prototype.getDrawingMode = function () {
return this._dataLayer.getDrawingMode();
};
DataLayerClusterer.prototype.getFeatureById = function (id) {
return this._dataLayer.getFeatureById(id);
};
DataLayerClusterer.prototype.getStyle = function () {
return this._dataLayer.getStyle();
};
DataLayerClusterer.prototype.loadGeoJson = function (url, options, callback) {
return this._dataLayer.loadGeoJson(url, options, callback);
};
DataLayerClusterer.prototype.overrideStyle = function (feature, style) {
return this._dataLayer.overrideStyle(feature, style);
};
DataLayerClusterer.prototype.remove = function (feature) {
_.remove(this.featuresArr, function (o) {
return o.properties.id === feature.getProperty('id');
});
return this._dataLayer.remove(feature);
};
DataLayerClusterer.prototype.revertStyle = function (feature) {
return this._dataLayer.revertStyle(feature);
};
DataLayerClusterer.prototype.setControlPosition = function (controlPosition) {
return this._dataLayer.setControlPosition(controlPosition);
};
DataLayerClusterer.prototype.setControls = function (controls) {
return this._dataLayer.setControls(controls);
};
DataLayerClusterer.prototype.setDrawingMode = function (drawingMode) {
return this._dataLayer.setDrawingMode(drawingMode);
};
DataLayerClusterer.prototype.setStyle = function (style) {
return this._dataLayer.setStyle(style);
};
DataLayerClusterer.prototype.toGeoJson = function (callback) {
return this._dataLayer.toGeoJson(callback);
};
/* ---- Private methods ---- */
DataLayerClusterer.prototype.resetViewport = function (optHide) {
var i, j, marker;
// Remove all the clusters
for (i = 0; i < this.clusters_.length; i++) {
this.clusters_[i].remove();
}
this.clusters_ = [];
// Reset the markers to not be added and to be removed from the map.
for (j = 0; j < this.featuresArr.length; j++) {
marker = this._dataLayer.getFeatureById(this.featuresArr[j].properties.id);
marker.setProperty('isAdded', false);
if (optHide) {
this.remove(marker);
}
}
};
/**
* Sets the clusterer's ready state.
*
* @param {boolean} ready The state.
* @private
*/
DataLayerClusterer.prototype.setReady_ = function (ready) {
if (!this.ready_) {
this.ready_ = ready;
// this.createClusters_();
}
};
/**
* Determines if a feature is contained in a bounds.
*
* @param {google.maps.Data.Feature} feature The feature to check.
* @param {google.maps.LatLngBounds} bounds The bounds to check against.
* @return {boolean} True if the feature is in the bounds.
* @private
*/
DataLayerClusterer.prototype.isFeatureInBounds_ = function (f, bounds) {
return bounds.contains(f.getGeometry().get());
};
/**
* Calculates the distance between two latlng locations in km.
* @see http://www.movable-type.co.uk/scripts/latlong.html
*
* @param {google.maps.LatLng} p1 The first lat lng point.
* @param {google.maps.LatLng} p2 The second lat lng point.
* @return {number} The distance between the two points in km.
* @private
*/
DataLayerClusterer.prototype.distanceBetweenPoints_ = function (p1, p2) {
if (!p1 || !p2) {
return 0;
}
var R = 6371; // Radius of the Earth in km
var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;
var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *
Math.sin(dLon / 2) * Math.sin(dLon / 2);
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
var d = R * c;
return d;
};
/**
* Add a feature to a cluster, or creates a new cluster.
*
* @param {google.maps.Data.Feature} feature The feature to add.
* @private
*/
DataLayerClusterer.prototype.addToClosestCluster_ = function (feature) {
var distance = 40000; // Some large number
var pos = feature.getGeometry().get();
var cluster;
var csize = this.clusters_.length;
for (var i = 0; i !== csize; ++i) {
var center = this.clusters_[i].getCenter();
if (center) {
var d = this.distanceBetweenPoints_(center, pos);
if (d < distance) {
distance = d;
cluster = this.clusters_[i];
}
}
}
if (cluster && cluster.isFeatureInClusterBounds(feature)) {
cluster.addFeature(feature);
} else {
cluster = new FeatureCluster(this);
cluster.addFeature(feature);
this.clusters_.push(cluster);
}
};
/**
* Creates the clusters.
*
* @private
*/
DataLayerClusterer.prototype.createClusters_ = function (iFirst) {
var i, marker, mapBounds, bounds, iLast, _this = this;
if (!this.ready_ || !this.map_) {
return;
}
if (iFirst === 0) {
google.maps.event.trigger(this, 'clusteringbegin', this);
if (typeof this.timerRefStatic !== 'undefined') {
clearTimeout(this.timerRefStatic);
delete this.timerRefStatic;
}
}
mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),
this.map_.getBounds().getNorthEast());
bounds = this.getExtendedBounds(mapBounds);
iLast = Math.min(iFirst + 1500, this.featuresArr.length);
for (i = iFirst; i < iLast; i++) {
marker = this._dataLayer.getFeatureById(this.featuresArr[i].properties.id);
if (!marker.getProperty('isAdded') && this.isFeatureInBounds_(marker, bounds)) {
this.addToClosestCluster_(marker);
}
}
if (iLast < this.featuresArr.length) {
this.timerRefStatic = setTimeout(function () {
_this.createClusters_(iLast);
}, 0);
} else {
delete this.timerRefStatic;
google.maps.event.trigger(this, 'clusteringend', this);
}
};
/* ---- google.maps.OverlayView interface methods ---- */
/**
* Method called once after setMap() is called with a valid map.
*
* Adds the data layer to the map and setup the events listeners.
*/
DataLayerClusterer.prototype.onAdd = function () {
var map = this.getMap(),
_this = this;
if (this.map_ !== map) {
this.onRemove();
}
this.map_ = map;
if (this.map_ !== null) {
this._dataLayer.setMap(this.map_);
this.prevZoom_ = this.map_.getZoom();
if (this._idle) {
google.maps.event.removeListener(this._idle);
}
this._idle = google.maps.event.addListener(this.map_, 'idle', function () {
var zoom;
if (_this.map_) {
zoom = _this.map_.getZoom();
} else {
return;
}
if (_this.prevZoom_ !== zoom) {
_this.resetViewport(false);
_this.prevZoom_ = zoom;
_this.redraw();
}
_this.redraw();
});
this.setReady_(true);
this.redraw();
} else {
this.setReady_(false);
this.redraw();
}
};
/**
* Method called once following a call to setMap(null).
*
* Removes the data layer from the map and cleans the events listeners.
*/
DataLayerClusterer.prototype.onRemove = function () {
if (this.map_ !== null) {
if (this._zoomchanged !== null) {
try {
this.map_.removeListener(this._zoomchanged);
} catch (e) { }
}
if (this._idle !== null) {
try {
this.map_.removeListener(this._idle);
} catch (e) { }
}
}
this._dataLayer.setMap(null);
this.map_ = null;
this.setReady_(false);
};
/**
* Empty implementation of the interface method.
*/
DataLayerClusterer.prototype.draw = function () { };
/* ---- Utils ---- */
/**
* Extends a objects prototype by anothers.
*
* @param {Object} obj1 The object to be extended.
* @param {Object} obj2 The object to extend with.
* @return {Object} The new extended object.
*/
DataLayerClusterer.extend = function (obj1, obj2) {
return (function (object) {
for (var property in object.prototype) {
if (object.prototype[property]) {
this.prototype[property] = object.prototype[property];
}
}
return this;
}).apply(obj1, [obj2]);
};
/**
* A cluster that contains features.
*
* @param {DataLayerClusterer} featureClusterer The featureclusterer that this
* cluster is associated with.
* @constructor
* @ignore
*/
function FeatureCluster(featureClusterer) {
this.featureClusterer_ = featureClusterer;
this.map_ = featureClusterer.getMap();
this.minClusterSize_ = featureClusterer.getMinClusterSize();
this.averageCenter_ = featureClusterer.isAverageCenter();
this.center_ = null;
this.features_ = [];
this.bounds_ = null;
this.classId = featureClusterer.className_ + '-' + this.featureClusterer_.clusters_.length;
this.clusterIcon_ = new FeatureClusterIcon(this, featureClusterer.getStyles(),
featureClusterer.getGridSize(), this.classId);
}
/**
* Determins if a feature is already added to the cluster.
*
* @param {google.maps.Data.Feature} feature The feature to check.
* @return {boolean} True if the feature is already added.
*/
FeatureCluster.prototype.isFeatureAlreadyAdded = function (feature) {
var i, fsize;
if (this.features_.indexOf) {
return this.features_.indexOf(feature) !== -1;
} else {
fsize = this.features_.length;
for (i = 0; i !== fsize; ++i) {
if (this.features_[i] === feature) {
return true;
}
}
}
return false;
};
/**
* Add a feature the cluster.
*
* @param {google.maps.Data.Feature} feature The feature to add.
* @return {boolean} True if the feature was added.
*/
FeatureCluster.prototype.addFeature = function (feature) {
var l, lat, lng, len, i, j;
if (this.isFeatureAlreadyAdded(feature)) {
return false;
}
if (!this.center_) {
this.center_ = feature.getGeometry().get();
this.calculateBounds_();
} else {
if (this.averageCenter_) {
l = this.features_.length + 1;
lat = (this.center_.lat() * (l - 1) + feature.getGeometry().get().lat()) / l;
lng = (this.center_.lng() * (l - 1) + feature.getGeometry().get().lng()) / l;
this.center_ = new google.maps.LatLng(lat, lng);
this.calculateBounds_();
}
}
// var featureIndexInArr = _.findIndex(this.featuresArr, function(o) {
// return o.properties.id === feature.properties.id;
// });
// if (featureIndexInArr >= 0) {
// this.featuresArr[featureIndexInArr].isAdded = true;
// this.featuresArr[featureIndexInArr].clusterID = this.classId;
// }
feature.setProperty('isAdded', true);
feature.setProperty('clusterID', this.classId);
this.features_.push(feature);
len = this.features_.length;
if (len < this.minClusterSize_) {
// Min cluster size not reached so show the feature.
this.featureClusterer_.overrideStyle(feature, DataLayerClusterer.VISIBLE_FEATURE);
}
if (len === this.minClusterSize_) {
// Hide the features that were showing.
for (i = 0; i < len; i++) {
this.featureClusterer_.overrideStyle(this.features_[i], DataLayerClusterer.HIDDEN_FEATURE);
}
}
if (len >= this.minClusterSize_) {
for (j = 0; j < len; j++) {
this.featureClusterer_.overrideStyle(this.features_[j], DataLayerClusterer.HIDDEN_FEATURE);
}
}
this.updateIcon();
return true;
};
/**
* Returns the feature clusterer that the cluster is associated with.
*
* @return {DataLayerClusterer} The associated feature clusterer.
*/
FeatureCluster.prototype.getDataLayerClusterer = function () {
return this.featureClusterer_;
};
/**
* Returns the bounds of the cluster.
*
* @return {google.maps.LatLngBounds} the cluster bounds.
*/
FeatureCluster.prototype.getBounds = function () {
var fsize, i, bounds = new google.maps.LatLngBounds(this.center_, this.center_);
fsize = this.features_.length;
for (i = 0; i !== fsize; ++i) {
bounds.extend(this.features_[i].getGeometry().get());
}
return bounds;
};
/**
* Removes the cluster
*/
FeatureCluster.prototype.remove = function () {
this.clusterIcon_.remove();
this.features_.length = 0;
delete this.features_;
};
/**
* Returns the size of the cluster.
*
* @return {number} The cluster size.
*/
FeatureCluster.prototype.getSize = function () {
return this.features_.length;
};
/**
* Returns the features of the cluster.
*
* @return {Array.<google.maps.Data.Feature>} The cluster's features.
*/
FeatureCluster.prototype.getFeatures = function () {
return this.features_;
};
/**
* Returns the center of the cluster.
*
* @return {google.maps.LatLng} The cluster center.
*/
FeatureCluster.prototype.getCenter = function () {
return this.center_;
};
/**
* Calculated the extended bounds of the cluster with the grid.
*
* @private
*/
FeatureCluster.prototype.calculateBounds_ = function () {
var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
this.bounds_ = this.featureClusterer_.getExtendedBounds(bounds);
};
/**
* Determines if a feature lies in the clusters bounds.
*
* @param {google.maps.Data.Feature} feature The feature to check.
* @return {boolean} True if the feature lies in the bounds.
*/
FeatureCluster.prototype.isFeatureInClusterBounds = function (feature) {
return this.bounds_.contains(feature.getGeometry().get());
};
/**
* Returns the map that the cluster is associated with.
*
* @return {google.maps.Map} The map.
*/
FeatureCluster.prototype.getMap = function () {
return this.map_;
};
/**
* Updates the cluster icon
*/
FeatureCluster.prototype.updateIcon = function () {
var numStyles, sums, fsize, i, zoom = this.map_.getZoom(),
mz = this.featureClusterer_.getMaxZoom();
if (mz && zoom > mz) {
// The zoom is greater than our max zoom so show all the features in cluster.
fsize = this.features_.length;
for (i = 0; i !== fsize; ++i) {
this.featureClusterer_.overrideStyle(this.features_[i], DataLayerClusterer.VISIBLE_FEATURE);
}
return;
}
if (this.features_.length < this.minClusterSize_) {
// Min cluster size not yet reached.
this.clusterIcon_.hide();
return;
}
numStyles = this.featureClusterer_.getStyles().length;
sums = this.featureClusterer_.getCalculator()(this.features_, numStyles);
this.clusterIcon_.setSums(sums);
this.clusterIcon_.setCenter(this.center_);
this.clusterIcon_.show();
};
/**
* A cluster icon
*
* @param {Cluster} cluster The cluster to be associated with.
* @param {Object} styles An object that has style properties:
* 'url': (string) The image url.
* 'height': (number) The image height.
* 'width': (number) The image width.
* 'anchor': (Array) The anchor position of the label text.
* 'textColor': (string) The text color.
* 'textSize': (number) The text size.
* 'backgroundPosition: (string) The background postition x, y.
* @param {number=} optpadding Optional padding to apply to the cluster icon.
* @constructor
* @extends google.maps.OverlayView
*/
function FeatureClusterIcon(cluster, styles, optpadding, classId) {
DataLayerClusterer.extend(FeatureClusterIcon, google.maps.OverlayView);
this.styles_ = styles;
this.padding_ = optpadding || 0;
this.cluster_ = cluster;
this.center_ = null;
this.map_ = cluster.getMap();
this.div_ = null;
this.sums_ = null;
this.visible_ = false;
this.classId = classId;
this.setMap(this.map_);
}
/* ---- Public methods ---- */
/**
* Hide the icon.
*/
FeatureClusterIcon.prototype.hide = function () {
if (this.div_) {
this.div_.style.display = 'none';
}
this.visible_ = false;
};
/**
* Position and show the icon.
*/
FeatureClusterIcon.prototype.show = function () {
if (this.div_) {
var pos = this.getPosFromLatLng_(this.center_);
this.div_.style.cssText = this.createCss(pos);
this.div_.style.display = '';
}
this.visible_ = true;
};
/**
* Remove the icon from the map
*/
FeatureClusterIcon.prototype.remove = function () {
this.setMap(null);
};
/**
* Sets the center of the icon.
*
* @param {google.maps.LatLng} center The latlng to set as the center.
*/
FeatureClusterIcon.prototype.setCenter = function (center) {
this.center_ = center;
};
/* ---- google.maps.OverlayView interface methods ---- */
/**
* Adding the cluster icon to the dom.
* @ignore
*/
FeatureClusterIcon.prototype.onAdd = function () {
var pos, panes, _this = this;
this.div_ = document.createElement('DIV');
if (this.visible_) {
pos = this.getPosFromLatLng_(this.center_);
this.div_.style.cssText = this.createCss(pos);
this.div_.innerHTML = this.sums_.text;
this.div_.className = this.cluster_.featureClusterer_.className_ + ' ' + this.classId;
}
this.div_.className = this.cluster_.featureClusterer_.className_ + ' ' + this.classId;
panes = this.getPanes();
panes.overlayMouseTarget.appendChild(this.div_);
google.maps.event.addDomListener(this.div_, 'click', function () {
_this.triggerClusterClick();
});
};
/**
* Draw the icon.
* @ignore
*/
FeatureClusterIcon.prototype.draw = function () {
if (this.visible_) {
var pos = this.getPosFromLatLng_(this.center_);
this.div_.style.top = pos.y + 'px';
this.div_.style.left = pos.x + 'px';
}
};
/**
* Implementation of the onRemove interface.
* @ignore
*/
FeatureClusterIcon.prototype.onRemove = function () {
if (this.div_ && this.div_.parentNode) {
this.hide();
this.div_.parentNode.removeChild(this.div_);
this.div_ = null;
}
};
/* ---- Private methods ---- */
/**
* Triggers the clusterclick event and zoom's if the option is set.
*/
FeatureClusterIcon.prototype.triggerClusterClick = function () {
var featureClusterer = this.cluster_.getDataLayerClusterer();
// Trigger the clusterclick event.
google.maps.event.trigger(featureClusterer, 'clusterclick', this.cluster_);
if (featureClusterer.isZoomOnClick()) {
// Zoom into the cluster.
this.map_.fitBounds(this.cluster_.getBounds());
}
};
/**
* Returns the position to place the div dending on the latlng.
*
* @param {google.maps.LatLng} latlng The position in latlng.
* @return {google.maps.Point} The position in pixels.
* @private
*/
FeatureClusterIcon.prototype.getPosFromLatLng_ = function (latlng) {
var pos = this.getProjection().fromLatLngToDivPixel(latlng);
pos.x -= parseInt(this.width_ / 2, 10);
pos.y -= parseInt(this.height_ / 2, 10);
return pos;
};
/**
* Create the css text based on the position of the icon.
*
* @param {google.maps.Point} pos The position.
* @return {string} The css style text.
*/
FeatureClusterIcon.prototype.createCss = function (pos) {
var txtColor, txtSize, backgroundPosition, style = [];
style.push('background-image:url(' + this.url_ + ');');
backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';
style.push('background-position:' + backgroundPosition + ';');
if (typeof this.anchor_ === 'object') {
if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&
this.anchor_[0] < this.height_) {
style.push('height:' + (this.height_ - this.anchor_[0]) +
'px; padding-top:' + this.anchor_[0] + 'px;');
} else {
style.push('height:' + this.height_ + 'px; line-height:' + this.height_ +
'px;');
}
if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&
this.anchor_[1] < this.width_) {
style.push('width:' + (this.width_ - this.anchor_[1]) +
'px; padding-left:' + this.anchor_[1] + 'px;');
} else {
style.push('width:' + this.width_ + 'px; text-align:center;');
}
} else {
style.push('height:' + this.height_ + 'px; line-height:' +
this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');
}
txtColor = this.textColor_ ? this.textColor_ : 'black';
txtSize = this.textSize_ ? this.textSize_ : 11;
style.push('cursor:pointer; top:' + pos.y + 'px; left:' +
pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +
txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');
return style.join('');
};
/**
* Sets the icon to the the styles.
*/
FeatureClusterIcon.prototype.useStyle = function () {
var index = Math.min(this.styles_.length - 1, Math.max(0, this.sums_.index - 1)),
style = this.styles_[index];
this.url_ = style.url;
this.height_ = style.height;
this.width_ = style.width;
this.textColor_ = style.textColor;
this.anchor_ = style.anchor;
this.textSize_ = style.textSize;
this.backgroundPosition_ = style.backgroundPosition;
};
/**
* Set the sums of the icon.
*
* @param {Object} sums The sums containing:
* 'text': (string) The text to display in the icon.
* 'index': (number) The style index of the icon.
*/
FeatureClusterIcon.prototype.setSums = function (sums) {
this.sums_ = sums;
this.text_ = sums.text;
this.index_ = sums.index;
if (this.div_) {
this.div_.innerHTML = sums.text;
}
this.useStyle();
};
/* ---- To remove soon ---- */
/*
* TODO: Allow the styling using a similar interface than google.map.Data.
* Use SVG icon by default, remove dependency of google-maps-utility-library-v3.googlecode.com.
*/
/**
* The feature cluster image path.
*
* @type {string}
*/
DataLayerClusterer.MARKER_CLUSTER_IMAGE_PATH_ =
'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m';
DataLayerClusterer.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';
/**
* Sets up the styles object.
*
* @private
*/
DataLayerClusterer.prototype.setupStyles_ = function () {
var i, ssizes = this.sizes.length;
if (this.styles_.length) {
return;
}
for (i = 0; i !== ssizes; ++i) {
this.styles_.push({
url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,
height: this.sizes[i],
width: this.sizes[i]
});
}
};
/**
* Sets the styles.
*
* @param {Object} styles The style to set.
*/
DataLayerClusterer.prototype.setStyles = function (styles) {
this.styles_ = styles;
};
/**
* Gets the styles.
*
* @return {Object} The styles object.
*/
DataLayerClusterer.prototype.getStyles = function () {
return this.styles_;
};
/**
* Set the calculator function.
*
* @param {function(Array, number)} calculator The function to set as the
* calculator. The function should return a object properties:
* 'text' (string) and 'index' (number).
*
*/
DataLayerClusterer.prototype.setCalculator = function (calculator) {
this.calculator_ = calculator;
};
/**
* Get the calculator function.
*
* @return {function(Array, number)} the calculator function.
*/
DataLayerClusterer.prototype.getCalculator = function () {
return this.calculator_;
};
/**
* The function for calculating the cluster icon image.
*
* @param {Array.<google.maps.Data.Feature>} features The features in the clusterer.
* @param {number} numStyles The number of styles available.
* @return {Object} A object properties: 'text' (string) and 'index' (number).
* @private
*/
DataLayerClusterer.prototype.calculator_ = function (features, numStyles) {
var index = 0,
count = features.length,
dv = count;
while (dv !== 0) {
dv = parseInt(dv / 10, 10);
index++;
}
index = Math.min(index, numStyles);
return {
text: count,
index: index
};
}; | 27.470432 | 102 | 0.672182 |
993d21166be39f265092a7cf6f1a67b862f358e6 | 969 | js | JavaScript | src/main.js | johndatserakis/johndatserakis-dot-com | 5328a0fd0c9cab8d70a25ae874d00455290ed03f | [
"MIT"
] | 4 | 2019-03-04T19:39:39.000Z | 2020-06-15T00:44:13.000Z | src/main.js | johndatserakis/johndatserakis-dot-com | 5328a0fd0c9cab8d70a25ae874d00455290ed03f | [
"MIT"
] | null | null | null | src/main.js | johndatserakis/johndatserakis-dot-com | 5328a0fd0c9cab8d70a25ae874d00455290ed03f | [
"MIT"
] | null | null | null | import Vue from 'vue'
import App from './App.vue'
import NotFound from './components/NotFound.vue'
import Home from './components/Home.vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const router = new VueRouter({
mode: 'history',
routes: [
{ path: '*', component: NotFound, name: 'notFound' },
{ path: '/', component: Home, name: 'home' }
]
})
import VueAnalytics from 'vue-analytics'
Vue.use(VueAnalytics, {
id: 'UA-43582384-3',
router,
debug: {
sendHitTask: process.env.NODE_ENV === 'production'
},
checkDuplicatedScript: true
})
import VueAnime from '@/common/animejs'
Vue.use(VueAnime)
import VueObserveVisibility from 'vue-observe-visibility'
Vue.use(VueObserveVisibility)
import Toasted from 'vue-toasted'
Vue.use(Toasted, {
position: 'top-right',
duration: 2300,
singleton: true
})
import './assets/css/app.scss';
new Vue({
el: '#app',
router,
render: h => h(App)
})
| 20.1875 | 61 | 0.658411 |
993e19c59e652892e9a101fb07c71cf90daca14e | 539 | js | JavaScript | src/routes/ChatBox/components/MessageContent/Sent/SentStyles.js | tienlocbui1110/whatapp-ui | 02323d673e596c9e1880811194d657ad244b309a | [
"MIT"
] | 1 | 2018-02-10T12:01:54.000Z | 2018-02-10T12:01:54.000Z | src/routes/ChatBox/components/MessageContent/Sent/SentStyles.js | tienlocbui1110/whatapp-ui | 02323d673e596c9e1880811194d657ad244b309a | [
"MIT"
] | null | null | null | src/routes/ChatBox/components/MessageContent/Sent/SentStyles.js | tienlocbui1110/whatapp-ui | 02323d673e596c9e1880811194d657ad244b309a | [
"MIT"
] | null | null | null | import { StyleSheet } from "react-native";
const styles = StyleSheet.create({
textSize: {
fontSize: 15,
paddingLeft: 7,
paddingRight: 7,
paddingTop: 2,
color: "black"
},
chatBox: {
borderWidth: 0.3,
borderRadius: 5,
backgroundColor: "#dcf8c6",
borderColor: "#afafaf",
elevation: 1,
flexDirection: "column",
justifyContent: "space-between",
marginTop: 3,
marginBottom: 6
},
time: {
fontSize: 13,
paddingLeft: 7,
paddingBottom: 3
}
});
export default styles;
| 17.966667 | 42 | 0.612245 |
993e1abf08af6bea7002fc2d774073ea9a0e49b9 | 516 | js | JavaScript | src/store/sagas/index.js | FelipeGCastro/app-apetitte | d50ec91fbc69a65586573ed4b3521b6585fccbaa | [
"MIT"
] | null | null | null | src/store/sagas/index.js | FelipeGCastro/app-apetitte | d50ec91fbc69a65586573ed4b3521b6585fccbaa | [
"MIT"
] | 1 | 2020-08-26T23:58:22.000Z | 2020-08-26T23:58:22.000Z | src/store/sagas/index.js | FelipeGCastro/app-apetitte | d50ec91fbc69a65586573ed4b3521b6585fccbaa | [
"MIT"
] | null | null | null | import { all, takeLatest } from 'redux-saga/effects'
import { DaysTypes } from '~/store/ducks/days'
// import { UserTypes } from '~/store/ducks/user';
import { loadDays } from './days'
// eslint-disable-next-line import/no-cycle
import { init, checkDays, checkDaysUp } from './user'
export default function * rootSaga () {
yield all([
init(),
takeLatest(DaysTypes.LOAD_REQUEST, loadDays),
takeLatest(DaysTypes.UPDATE_PRODUCT, checkDays),
takeLatest(DaysTypes.REMOVE_PRODUCT, checkDaysUp)
])
}
| 28.666667 | 53 | 0.707364 |
993e4f42e526808151acc210facbd4cfc4819af0 | 433 | js | JavaScript | webpack.config.js | mi-c3/platform-ui | bb245c835dc86a251da9b282d8e568f722e04584 | [
"Apache-2.0"
] | null | null | null | webpack.config.js | mi-c3/platform-ui | bb245c835dc86a251da9b282d8e568f722e04584 | [
"Apache-2.0"
] | 14 | 2020-07-06T11:44:27.000Z | 2022-02-27T00:36:09.000Z | webpack.config.js | mi-c3/platform-ui | bb245c835dc86a251da9b282d8e568f722e04584 | [
"Apache-2.0"
] | null | null | null | const neutrino = require('neutrino');
const config = neutrino().webpack();
if (process.env.HOT === 'true') {
if (config.optimization && config.optimization.minimize) {
config.optimization.minimize = false;
}
if (Array.isArray(config.plugins)) {
config.plugins = config.plugins.filter((plugin) => plugin.constructor && plugin.constructor.name !== 'CleanWebpackPlugin');
}
}
module.exports = config;
| 28.866667 | 131 | 0.669746 |
993e5c4f5a13c922494942f9587b9e953e99c614 | 9,456 | js | JavaScript | src/unread/__tests__/unreadHuddlesReducer-test.js | vaibhavs2/zulip-mobile | 09cbcecd14a9110da7252b167ea4326f14c4c4bf | [
"Apache-2.0"
] | 1 | 2021-03-28T20:53:54.000Z | 2021-03-28T20:53:54.000Z | src/unread/__tests__/unreadHuddlesReducer-test.js | vaibhavs2/zulip-mobile | 09cbcecd14a9110da7252b167ea4326f14c4c4bf | [
"Apache-2.0"
] | 8 | 2022-01-26T08:01:59.000Z | 2022-02-28T03:16:55.000Z | src/unread/__tests__/unreadHuddlesReducer-test.js | vaibhavs2/zulip-mobile | 09cbcecd14a9110da7252b167ea4326f14c4c4bf | [
"Apache-2.0"
] | null | null | null | /* @flow strict-local */
import deepFreeze from 'deep-freeze';
import unreadHuddlesReducer from '../unreadHuddlesReducer';
import {
ACCOUNT_SWITCH,
EVENT_NEW_MESSAGE,
EVENT_UPDATE_MESSAGE_FLAGS,
} from '../../actionConstants';
import { NULL_ARRAY } from '../../nullObjects';
import * as eg from '../../__tests__/lib/exampleData';
import { makeUserId } from '../../api/idTypes';
describe('unreadHuddlesReducer', () => {
describe('ACCOUNT_SWITCH', () => {
test('resets state to initial state', () => {
const initialState = deepFreeze([
{
user_ids_string: '0,1,2',
unread_message_ids: [1, 2, 3],
},
]);
const action = deepFreeze({
type: ACCOUNT_SWITCH,
index: 1,
});
const expectedState = [];
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toEqual(expectedState);
});
});
describe('REALM_INIT', () => {
test('received data from "unread_msgs.huddles" key replaces the current state ', () => {
const initialState = deepFreeze([]);
const action = deepFreeze({
...eg.action.realm_init,
data: {
...eg.action.realm_init.data,
unread_msgs: {
...eg.action.realm_init.data.unread_msgs,
streams: [],
huddles: [
{
user_ids_string: '0,1,2',
unread_message_ids: [1, 2, 4, 5],
},
],
pms: [],
mentions: [1, 2, 3],
},
},
});
const expectedState = [
{
user_ids_string: '0,1,2',
unread_message_ids: [1, 2, 4, 5],
},
];
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toEqual(expectedState);
});
});
describe('EVENT_NEW_MESSAGE', () => {
test('if message id already exists, do not mutate state', () => {
const user1 = { ...eg.makeUser(), user_id: makeUserId(1) };
const user2 = { ...eg.makeUser(), user_id: makeUserId(2) };
const user3 = { ...eg.makeUser(), user_id: makeUserId(3) };
const message1 = eg.pmMessage({ id: 1, recipients: [user1, user2, user3] });
const message2 = eg.pmMessage({ id: 2, recipients: [user1, user2, user3] });
const message3 = eg.pmMessage({ id: 3, recipients: [user1, user2, user3] });
const initialState = deepFreeze([
{
user_ids_string: `${user1.user_id},${user2.user_id},${user3.user_id}`,
unread_message_ids: [message1.id, message2.id, message3.id],
},
]);
const action = deepFreeze({
type: EVENT_NEW_MESSAGE,
...eg.eventNewMessageActionBase,
message: message2,
});
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toBe(initialState);
});
test('if message is not group, return original state', () => {
const streamMessage = eg.streamMessage();
const initialState = deepFreeze([
{
user_ids_string: '1,2,3',
unread_message_ids: [1, 2, 3],
},
]);
const action = deepFreeze({
type: EVENT_NEW_MESSAGE,
...eg.eventNewMessageActionBase,
message: streamMessage,
});
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toBe(initialState);
});
test('if message is sent by self, do not mutate state', () => {
const selfUser = { ...eg.selfUser, user_id: makeUserId(1) };
const user2 = { ...eg.otherUser, user_id: makeUserId(2) };
const user3 = { ...eg.thirdUser, user_id: makeUserId(3) };
const initialState = deepFreeze([]);
const message2 = eg.pmMessage({
sender: selfUser,
recipients: [selfUser, user2, user3],
});
const action = deepFreeze({
type: EVENT_NEW_MESSAGE,
...eg.eventNewMessageActionBase,
message: message2,
ownUserId: selfUser.user_id,
});
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toBe(initialState);
});
test('if message id does not exist, append to state', () => {
const selfUser = { ...eg.selfUser, user_id: makeUserId(1) };
const user2 = { ...eg.otherUser, user_id: makeUserId(2) };
const user3 = { ...eg.thirdUser, user_id: makeUserId(3) };
const message4 = eg.pmMessage({ id: 4, recipients: [selfUser, user2, user3] });
const initialState = deepFreeze([
{
user_ids_string: `${selfUser.user_id},${user2.user_id},${user3.user_id}`,
unread_message_ids: [1, 2, 3],
},
]);
const action = deepFreeze({
type: EVENT_NEW_MESSAGE,
...eg.eventNewMessageActionBase,
message: message4,
});
const expectedState = [
{
user_ids_string: `${selfUser.user_id},${user2.user_id},${user3.user_id}`,
unread_message_ids: [1, 2, 3, 4],
},
];
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toEqual(expectedState);
});
test('if sender-ids string does not exist, append to state as new', () => {
const user1 = { ...eg.selfUser, user_id: makeUserId(1) };
const user2 = { ...eg.otherUser, user_id: makeUserId(2) };
const user3 = { ...eg.thirdUser, user_id: makeUserId(3) };
const message4 = eg.pmMessage({ id: 4, recipients: [user1, user2, user3] });
const initialState = deepFreeze([
{
user_ids_string: '0,3,4',
unread_message_ids: [1, 2, 3],
},
]);
const action = deepFreeze({
type: EVENT_NEW_MESSAGE,
...eg.eventNewMessageActionBase,
message: message4,
});
const expectedState = [
{
user_ids_string: '0,3,4',
unread_message_ids: [1, 2, 3],
},
{
user_ids_string: `${user1.user_id},${user2.user_id},${user3.user_id}`,
unread_message_ids: [4],
},
];
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toEqual(expectedState);
});
});
describe('EVENT_UPDATE_MESSAGE_FLAGS', () => {
test('when operation is "add" but flag is not "read" do not mutate state', () => {
const initialState = deepFreeze([]);
const action = {
id: 1,
type: EVENT_UPDATE_MESSAGE_FLAGS,
all: false,
allMessages: eg.makeMessagesState([]),
messages: [1, 2, 3],
flag: 'star',
operation: 'add',
};
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toBe(initialState);
});
test('if id does not exist do not mutate state', () => {
const initialState = deepFreeze([
{
user_ids_string: '0,1,2',
unread_message_ids: [1, 2, 3, 4, 5],
},
{
user_ids_string: '0,3,4',
unread_message_ids: [4, 5],
},
]);
const action = deepFreeze({
id: 1,
type: EVENT_UPDATE_MESSAGE_FLAGS,
all: false,
allMessages: eg.makeMessagesState([]),
messages: [6, 7],
flag: 'read',
operation: 'add',
});
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toBe(initialState);
});
test('if ids are in state remove them', () => {
const initialState = deepFreeze([
{
user_ids_string: '0,1,2',
unread_message_ids: [1, 2, 3],
},
{
user_ids_string: '0,3,4',
unread_message_ids: [4, 5],
},
]);
const action = deepFreeze({
id: 1,
type: EVENT_UPDATE_MESSAGE_FLAGS,
all: false,
allMessages: eg.makeMessagesState([]),
messages: [3, 4, 5, 6],
flag: 'read',
operation: 'add',
});
const expectedState = [
{
user_ids_string: '0,1,2',
unread_message_ids: [1, 2],
},
];
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toEqual(expectedState);
});
test('when operation is "remove" do nothing', () => {
const initialState = deepFreeze([
{
user_ids_string: '0,1,2',
unread_message_ids: [1, 2, 3, 4, 5],
},
]);
const action = deepFreeze({
id: 1,
type: EVENT_UPDATE_MESSAGE_FLAGS,
all: false,
allMessages: eg.makeMessagesState([]),
messages: [1, 2],
flag: 'read',
operation: 'remove',
});
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toBe(initialState);
});
test('when "all" is true reset state', () => {
const initialState = deepFreeze([
{
user_ids_string: '0,1,2',
unread_message_ids: [1, 2, 3, 4, 5],
},
]);
const action = deepFreeze({
id: 1,
type: EVENT_UPDATE_MESSAGE_FLAGS,
all: true,
allMessages: eg.makeMessagesState([]),
messages: [],
flag: 'read',
operation: 'add',
});
const actualState = unreadHuddlesReducer(initialState, action);
expect(actualState).toBe(NULL_ARRAY);
});
});
});
| 27.811765 | 92 | 0.556789 |
993e9d7b23affb6fb0f7703e8b82c1ea77a23981 | 424 | js | JavaScript | node_modules/scratch-vm/src/extensions/scratch3_voicetotext/translation.js | komingshyu/osep_web_serial | 666aa63d56e514c07331d9713e8e33e11c6e4dde | [
"BSD-3-Clause"
] | 9 | 2021-10-31T09:39:01.000Z | 2022-01-20T18:31:45.000Z | node_modules/scratch-vm/src/extensions/scratch3_voicetotext/translation.js | komingshyu/osep_web_serial | 666aa63d56e514c07331d9713e8e33e11c6e4dde | [
"BSD-3-Clause"
] | 2 | 2021-11-02T05:32:24.000Z | 2021-11-06T23:04:13.000Z | node_modules/scratch-vm/src/extensions/scratch3_voicetotext/translation.js | komingshyu/osep_web_serial | 666aa63d56e514c07331d9713e8e33e11c6e4dde | [
"BSD-3-Clause"
] | 72 | 2021-11-02T03:23:18.000Z | 2022-03-24T04:20:59.000Z | export const name = {
'en': 'Speech to Text',
'zh-tw': '語音轉文字'
};
export const voicetoTEXT = {
'en': 'transcribed text ',
'zh-tw': '語音文字'
};
export const pauseVoice = {
'en': 'pause speech to text',
'zh-tw': '暫停語音辨識'
};
export const nullTEXT = {
'en': 'clear transcribed text',
'zh-tw': '清除語音文字'
};
export const beginVoice = {
'en': 'launch speech to text',
'zh-tw': '語音辨識開始'
};
| 16.307692 | 35 | 0.558962 |
1005f4a4dbb7d38dcbaa63ea91927e7df33913c2 | 1,683 | js | JavaScript | server/server.js | rushabh-wadkar/game-leaderboard-app | 77da07ba50ed2bb64600bfeca9501af4e04ad923 | [
"Apache-2.0"
] | null | null | null | server/server.js | rushabh-wadkar/game-leaderboard-app | 77da07ba50ed2bb64600bfeca9501af4e04ad923 | [
"Apache-2.0"
] | null | null | null | server/server.js | rushabh-wadkar/game-leaderboard-app | 77da07ba50ed2bb64600bfeca9501af4e04ad923 | [
"Apache-2.0"
] | null | null | null | require("dotenv").config();
const express = require("express");
const app = express();
const PORT = process.env.PORT || 4000;
const routes = require("./routes/app.router.js");
const mongoose = require("mongoose");
// Connect to db
const mongo = {
username: process.env.MONGO_USERNAME,
password: process.env.MONGO_PASSWORD,
db: process.env.MONGO_DB,
collection: process.env.MONGO_COLLECTION_NAME,
hostname: process.env.MONGO_CLUSTER_URL
};
mongoose.connect(
`mongodb+srv://${mongo.username}:${mongo.password}@${mongo.hostname}/${mongo.db}?retryWrites=true&w=majority`,
{ useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: false }
);
/** Parse the body of the request */
app.use(express.json()); // to support JSON-encoded bodies
app.use(express.urlencoded()); // to support URL-encoded bodies
/** Rules of our API */
app.use((req, res, next) => {
res.header("Access-Control-Allow-Origin", "*");
res.header(
"Access-Control-Allow-Headers",
"Origin, X-Requested-With, Content-Type, Accept, Authorization"
);
if (req.method == "OPTIONS") {
res.header("Access-Control-Allow-Methods", "PUT, POST, PATCH, DELETE, GET");
return res.status(200).json({});
}
next();
});
/** Routes go here */
app.use("/api", routes);
/** Error handling */
app.use((req, res, next) => {
const error = new Error("Not found");
res.status(404).json({
message: error.message,
});
});
const db = mongoose.connection;
db.on("error", console.error.bind(console, "connection error:"));
db.once("open", function () {
console.log("DB Connected");
app.listen(PORT, () => {
console.log(`Yay! Server running on PORT: ${PORT}`);
});
});
| 27.590164 | 112 | 0.668449 |
100612fca61a1158ee869f2a80c1b24968b6e95c | 3,238 | js | JavaScript | index.js | JessNah/parseargs | a44de49e64f6e62cf1d79b4e8d1dbfa97819e36d | [
"Apache-2.0"
] | null | null | null | index.js | JessNah/parseargs | a44de49e64f6e62cf1d79b4e8d1dbfa97819e36d | [
"Apache-2.0"
] | null | null | null | index.js | JessNah/parseargs | a44de49e64f6e62cf1d79b4e8d1dbfa97819e36d | [
"Apache-2.0"
] | null | null | null | 'use strict';
const parseArgs = (
argv = process.argv.slice(require.main ? 2 : 1),
options = {}
) => {
if (typeof options !== 'object' || options === null) {
throw new Error('Whoops!')
}
if (options.withValue !== undefined && !Array.isArray(options.withValue)) {
throw new Error('Whoops! options.withValue should be an array.')
}
let result = {
args: {},
values: {},
positionals: []
}
let pos = 0
while (pos < argv.length) {
let arg = argv[pos]
if (arg.startsWith('-')) {
// Everything after a bare '--' is considered a positional argument
// and is returned verbatim
if (arg === '--') {
result.positionals.push(...argv.slice(++pos))
return result
}
// look for shortcodes: -fXzy
else if (arg.charAt(1) !== '-') {
throw new Error('What are we doing with shortcodes!?!')
}
// Any number of leading dashes are allowed
// remove all leading dashes
arg = arg.replace(/^-+/, '')
if (arg.includes('=')) {
//withValue equals(=) case
const argParts = arg.split('=')
result.args[argParts[0]] = true
//If withValue option is specified, take 2nd part after '=' as value, else set value as undefined
const val = options.withValue && options.withValue.includes(argParts[0]) ? argParts[1] : undefined
//Append value to previous arg values array for case of multiples option, else add to empty array
result.values[argParts[0]] = [].concat(
options.multiples && options.multiples.includes(argParts[0]) && result.values[argParts[0]] || [],
val,
)
} else if (pos + 1 < argv.length && !argv[pos+1].startsWith('-')) {
//withValue option should also support setting values when '=' isn't used
//ie. both --foo=b and --foo b should work
result.args[arg] = true
//If withValue option is specified, take next position arguement as value and then increment pos so that we don't re-evaluate that arg, else set value as undefined
//ie. --foo b --bar c, after setting b as the value for foo, evaluate --bar next and skip 'b'
const val = options.withValue && options.withValue.includes(arg) ? argv[++pos] : undefined
//Append value to previous arg values array for case of multiples option, else add to empty array
result.values[arg] = [].concat(
options.multiples && options.multiples.includes(arg) && result.values[arg] ? result.values[arg] : [],
val)
} else {
//cases when an arg is specified without a value, example '--foo --bar' <- 'foo' and 'bar' args should be set to true and have value as undefined
result.args[arg] = true
//Append undefined to previous arg values array for case of multiples option, else add to empty array
result.values[arg] = [].concat(
options.multiples && options.multiples.includes(arg) && result.values[arg] ? result.values[arg] : [],
undefined
)
}
} else {
//Arguements without a dash prefix are considered "positional"
result.positionals.push(arg)
}
pos++
}
return result
}
module.exports = {
parseArgs
}
| 36.795455 | 171 | 0.609636 |
100698f5ca1f2e84412df38346572999d3cd1fed | 4,507 | js | JavaScript | node_modules/echarts/lib/data/helper/linkList.js | weizhxa/native-echarts | ca11c38e959ebcfcc0b464344db8b9d207b8d14f | [
"MIT"
] | 92 | 2017-11-21T17:08:10.000Z | 2022-03-19T12:47:04.000Z | node_modules/echarts/lib/data/helper/linkList.js | weizhxa/native-echarts | ca11c38e959ebcfcc0b464344db8b9d207b8d14f | [
"MIT"
] | 6 | 2015-12-19T09:36:30.000Z | 2020-03-18T15:24:27.000Z | node_modules/echarts/lib/data/helper/linkList.js | weizhxa/native-echarts | ca11c38e959ebcfcc0b464344db8b9d207b8d14f | [
"MIT"
] | 24 | 2018-03-14T16:04:03.000Z | 2022-03-17T13:34:26.000Z | /**
* Link lists and struct (graph or tree)
*/
var zrUtil = require('zrender/lib/core/util');
var each = zrUtil.each;
var DATAS = '\0__link_datas';
var MAIN_DATA = '\0__link_mainData';
// Caution:
// In most case, either list or its shallow clones (see list.cloneShallow)
// is active in echarts process. So considering heap memory consumption,
// we do not clone tree or graph, but share them among list and its shallow clones.
// But in some rare case, we have to keep old list (like do animation in chart). So
// please take care that both the old list and the new list share the same tree/graph.
/**
* @param {Object} opt
* @param {module:echarts/data/List} opt.mainData
* @param {Object} [opt.struct] For example, instance of Graph or Tree.
* @param {string} [opt.structAttr] designation: list[structAttr] = struct;
* @param {Object} [opt.datas] {dataType: data},
* like: {node: nodeList, edge: edgeList}.
* Should contain mainData.
* @param {Object} [opt.datasAttr] {dataType: attr},
* designation: struct[datasAttr[dataType]] = list;
*/
function linkList(opt) {
var mainData = opt.mainData;
var datas = opt.datas;
if (!datas) {
datas = {main: mainData};
opt.datasAttr = {main: 'data'};
}
opt.datas = opt.mainData = null;
linkAll(mainData, datas, opt);
// Porxy data original methods.
each(datas, function (data) {
each(mainData.TRANSFERABLE_METHODS, function (methodName) {
data.wrapMethod(methodName, zrUtil.curry(transferInjection, opt));
});
});
// Beyond transfer, additional features should be added to `cloneShallow`.
mainData.wrapMethod('cloneShallow', zrUtil.curry(cloneShallowInjection, opt));
// Only mainData trigger change, because struct.update may trigger
// another changable methods, which may bring about dead lock.
each(mainData.CHANGABLE_METHODS, function (methodName) {
mainData.wrapMethod(methodName, zrUtil.curry(changeInjection, opt));
});
// Make sure datas contains mainData.
zrUtil.assert(datas[mainData.dataType] === mainData);
}
function transferInjection(opt, res) {
if (isMainData(this)) {
// Transfer datas to new main data.
var datas = zrUtil.extend({}, this[DATAS]);
datas[this.dataType] = res;
linkAll(res, datas, opt);
}
else {
// Modify the reference in main data to point newData.
linkSingle(res, this.dataType, this[MAIN_DATA], opt);
}
return res;
}
function changeInjection(opt, res) {
opt.struct && opt.struct.update(this);
return res;
}
function cloneShallowInjection(opt, res) {
// cloneShallow, which brings about some fragilities, may be inappropriate
// to be exposed as an API. So for implementation simplicity we can make
// the restriction that cloneShallow of not-mainData should not be invoked
// outside, but only be invoked here.
each(res[DATAS], function (data, dataType) {
data !== res && linkSingle(data.cloneShallow(), dataType, res, opt);
});
return res;
}
/**
* Supplement method to List.
*
* @public
* @param {string} [dataType] If not specified, return mainData.
* @return {module:echarts/data/List}
*/
function getLinkedData(dataType) {
var mainData = this[MAIN_DATA];
return (dataType == null || mainData == null)
? mainData
: mainData[DATAS][dataType];
}
function isMainData(data) {
return data[MAIN_DATA] === data;
}
function linkAll(mainData, datas, opt) {
mainData[DATAS] = {};
each(datas, function (data, dataType) {
linkSingle(data, dataType, mainData, opt);
});
}
function linkSingle(data, dataType, mainData, opt) {
mainData[DATAS][dataType] = data;
data[MAIN_DATA] = mainData;
data.dataType = dataType;
if (opt.struct) {
data[opt.structAttr] = opt.struct;
opt.struct[opt.datasAttr[dataType]] = data;
}
// Supplement method.
data.getLinkedData = getLinkedData;
}
module.exports = linkList;
| 33.887218 | 90 | 0.596184 |
1006e217d4d13a2531723d3858152ed6827839d7 | 265 | js | JavaScript | src/containers/SettingsPage/index.js | ElridgeDMello/ringcentral-embeddable | 610b11d154d949256752dc6596de7200620345c6 | [
"MIT"
] | 56 | 2018-09-01T04:16:29.000Z | 2022-02-22T06:37:47.000Z | src/containers/SettingsPage/index.js | ElridgeDMello/ringcentral-embeddable | 610b11d154d949256752dc6596de7200620345c6 | [
"MIT"
] | 215 | 2018-08-23T06:04:15.000Z | 2022-03-28T15:01:23.000Z | src/containers/SettingsPage/index.js | ElridgeDMello/ringcentral-embeddable | 610b11d154d949256752dc6596de7200620345c6 | [
"MIT"
] | 35 | 2018-09-25T08:54:40.000Z | 2022-03-21T23:33:50.000Z | import { connectModule } from '@ringcentral-integration/widgets/lib/phoneContext';
import NewSettingsPanel from '../../components/SettingsPanel';
const SettingsPage = connectModule((phone) => phone.settingsUI)(
NewSettingsPanel,
);
export default SettingsPage;
| 29.444444 | 82 | 0.781132 |
100776cbd918626f8bf71dc7c5861fa6cff735ee | 299 | js | JavaScript | src/components/title.js | VisuallyAmazing/Empeek | 23724c7c3c6ac9385b86d69868857c6cbf3e4ff2 | [
"MIT"
] | null | null | null | src/components/title.js | VisuallyAmazing/Empeek | 23724c7c3c6ac9385b86d69868857c6cbf3e4ff2 | [
"MIT"
] | null | null | null | src/components/title.js | VisuallyAmazing/Empeek | 23724c7c3c6ac9385b86d69868857c6cbf3e4ff2 | [
"MIT"
] | null | null | null | import React from 'react'
export default ( { className }) => {
return (
<div style = {{ background: '#272b3c',color:'#fff'}} className = {className}>
<h2 style = {{ marginTop: '20px'}}>DIARY APP</h2>
<span style = {{ color : '#ccc'}}>Comment with no sense</span>
</div>
)
}
| 27.181818 | 81 | 0.568562 |
1007af93c8e92e6d26cf27922cc722fe80798f3f | 3,394 | js | JavaScript | test/ResourceFactory.spec.js | sparklit/adbutler-node | 6432a51574778f1bf1e2e03d64c1ed7a7f9ff2d8 | [
"MIT"
] | 5 | 2017-01-10T20:37:48.000Z | 2019-01-23T17:47:12.000Z | test/ResourceFactory.spec.js | sparklit/adbutler-node | 6432a51574778f1bf1e2e03d64c1ed7a7f9ff2d8 | [
"MIT"
] | 1 | 2019-06-12T11:35:33.000Z | 2019-08-05T16:59:19.000Z | test/ResourceFactory.spec.js | sparklit/adbutler-node | 6432a51574778f1bf1e2e03d64c1ed7a7f9ff2d8 | [
"MIT"
] | 3 | 2018-04-27T20:44:12.000Z | 2019-08-05T17:27:58.000Z | 'use strict';
describe('ResourceFactory', function() {
var ResourceFactory = require('../lib/ResourceFactory');
var expect = require('chai').expect;
it('should not contain the `create` method when it is false in the config', function() {
var ResourceFactory = require('../lib/ResourceFactory');
var resource = ResourceFactory.makeResource('/blablabla', {
create: false
});
expect(resource).to.not.have.property('create').that.is.a('function');
expect(resource).to.have.property('read').that.is.a('function');
expect(resource).to.have.property('update').that.is.a('function');
expect(resource).to.have.property('delete').that.is.a('function');
expect(resource).to.have.property('list').that.is.a('function');
});
it('should not contain the `read` method when it is false in the config', function() {
var ResourceFactory = require('../lib/ResourceFactory');
var resource = ResourceFactory.makeResource('/blablabla', {
read: false
});
expect(resource).to.have.property('create').that.is.a('function');
expect(resource).to.not.have.property('read').that.is.a('function');
expect(resource).to.have.property('update').that.is.a('function');
expect(resource).to.have.property('delete').that.is.a('function');
expect(resource).to.have.property('list').that.is.a('function');
});
it('should not contain the `update` method when it is false in the config', function() {
var ResourceFactory = require('../lib/ResourceFactory');
var resource = ResourceFactory.makeResource('/blablabla', {
update: false
});
expect(resource).to.have.property('create').that.is.a('function');
expect(resource).to.have.property('read').that.is.a('function');
expect(resource).to.not.have.property('update').that.is.a('function');
expect(resource).to.have.property('delete').that.is.a('function');
expect(resource).to.have.property('list').that.is.a('function');
});
it('should not contain the `delete` method when it is false in the config', function() {
var ResourceFactory = require('../lib/ResourceFactory');
var resource = ResourceFactory.makeResource('/blablabla', {
delete: false
});
expect(resource).to.have.property('create').that.is.a('function');
expect(resource).to.have.property('read').that.is.a('function');
expect(resource).to.have.property('update').that.is.a('function');
expect(resource).to.not.have.property('delete').that.is.a('function');
expect(resource).to.have.property('list').that.is.a('function');
});
it('should not contain the `list` method when it is false in the config', function() {
var ResourceFactory = require('../lib/ResourceFactory');
var resource = ResourceFactory.makeResource('/blablabla', {
list: false
});
expect(resource).to.have.property('create').that.is.a('function');
expect(resource).to.have.property('read').that.is.a('function');
expect(resource).to.have.property('update').that.is.a('function');
expect(resource).to.have.property('delete').that.is.a('function');
expect(resource).to.not.have.property('list').that.is.a('function');
});
}); | 50.656716 | 92 | 0.633765 |
10085f98bafb6f5b8722641cd5059fd24004b6d1 | 2,376 | js | JavaScript | www/chrome/inspector-20190809/audits_test_runner/audits_test_runner_module.js | wschiffels/webpagetest | 9926f691f4974370c8fead460973a532e0d5fb1b | [
"PHP-3.01",
"Apache-2.0"
] | 1 | 2020-08-06T16:39:40.000Z | 2020-08-06T16:39:40.000Z | www/chrome/inspector-20190809/audits_test_runner/audits_test_runner_module.js | wschiffels/webpagetest | 9926f691f4974370c8fead460973a532e0d5fb1b | [
"PHP-3.01",
"Apache-2.0"
] | 1 | 2021-07-24T15:15:52.000Z | 2021-07-24T15:15:52.000Z | www/chrome/inspector-20190809/audits_test_runner/audits_test_runner_module.js | wschiffels/webpagetest | 9926f691f4974370c8fead460973a532e0d5fb1b | [
"PHP-3.01",
"Apache-2.0"
] | 1 | 2020-05-09T19:48:23.000Z | 2020-05-09T19:48:23.000Z | AuditsTestRunner._panel=function(){return(UI.panels).audits;};AuditsTestRunner.getContainerElement=function(){return AuditsTestRunner._panel().contentElement;};AuditsTestRunner.getResultsElement=function(){return AuditsTestRunner._panel()._auditResultsElement;};AuditsTestRunner.getDialogElement=function(){return AuditsTestRunner._panel()._statusView._dialog.contentElement.shadowRoot.querySelector('.audits-view');};AuditsTestRunner.getRunButton=function(){const dialog=AuditsTestRunner.getContainerElement();return dialog&&dialog.querySelectorAll('button')[0];};AuditsTestRunner.getCancelButton=function(){const dialog=AuditsTestRunner.getDialogElement();return dialog&&dialog.querySelectorAll('button')[0];};AuditsTestRunner.openStartAudit=function(){AuditsTestRunner._panel()._renderStartView();};AuditsTestRunner.addStatusListener=function(onMessage){TestRunner.addSniffer(Audits.StatusView.prototype,'updateStatus',onMessage,true);};AuditsTestRunner.waitForResults=function(){return new Promise(resolve=>{TestRunner.addSniffer(Audits.AuditsPanel.prototype,'_buildReportUI',resolve);});};AuditsTestRunner.forcePageAuditabilityCheck=function(){AuditsTestRunner._panel()._controller.recomputePageAuditability();};AuditsTestRunner._checkboxStateLabel=function(checkboxContainer){if(!checkboxContainer)
return'missing';const label=checkboxContainer.textElement.textContent;const checkedLabel=checkboxContainer.checkboxElement.checked?'x':' ';return`[${checkedLabel}] ${label}`;};AuditsTestRunner._buttonStateLabel=function(button){if(!button)
return'missing';const enabledLabel=button.disabled?'disabled':'enabled';const hiddenLabel=window.getComputedStyle(button).getPropertyValue('visibility');return`${button.textContent}: ${enabledLabel} ${hiddenLabel}`;};AuditsTestRunner.dumpStartAuditState=function(){TestRunner.addResult('\n========== Audits Start Audit State ==========');const containerElement=AuditsTestRunner.getContainerElement();const checkboxes=[...containerElement.querySelectorAll('.checkbox')];checkboxes.forEach(element=>{TestRunner.addResult(AuditsTestRunner._checkboxStateLabel(element));});const helpText=containerElement.querySelector('.audits-help-text');if(!helpText.classList.contains('hidden'))
TestRunner.addResult(`Help text: ${helpText.textContent}`);TestRunner.addResult(AuditsTestRunner._buttonStateLabel(AuditsTestRunner.getRunButton()));};; | 594 | 1,304 | 0.833754 |
10091a893591a05c02efeb9a9f4cc00930367ba8 | 621 | js | JavaScript | annotation_pipeline/decomposition_interface/src/Components/Layouts/Header.js | justeuer/Break | e7106929b9b7cca069e5d33c894d0eec10ef538f | [
"MIT"
] | 38 | 2020-02-06T04:01:45.000Z | 2022-03-17T13:42:45.000Z | annotation_pipeline/decomposition_interface/src/Components/Layouts/Header.js | justeuer/Break | e7106929b9b7cca069e5d33c894d0eec10ef538f | [
"MIT"
] | 23 | 2020-02-21T13:38:20.000Z | 2022-03-12T00:16:55.000Z | annotation_pipeline/decomposition_interface/src/Components/Layouts/Header.js | justeuer/Break | e7106929b9b7cca069e5d33c894d0eec10ef538f | [
"MIT"
] | 12 | 2020-03-18T17:26:52.000Z | 2022-03-21T00:43:42.000Z | import React from "react";
import { withStyles } from "@material-ui/core/styles";
import AppBar from "@material-ui/core/AppBar";
import Toolbar from "@material-ui/core/Toolbar";
import Typography from "@material-ui/core/Typography";
import Button from "@material-ui/core/Button";
import IconButton from "@material-ui/core/IconButton";
import MenuIcon from "@material-ui/icons/Menu";
export default props => (
<AppBar position="static" color="primary">
<Toolbar>
<Typography variant="headline" color="inherit">
TDT - TAU Decomposition Task [original]
</Typography>
</Toolbar>
</AppBar>
);
| 32.684211 | 54 | 0.713366 |
100939bbbf74fb207faba94b732252ca334372ab | 115 | js | JavaScript | Aulas/12 - jQuery/09 - Modificando o Conteúdo e características dos Elementos/Ex. 04/script.js | wiltonmartinsdev/Meu-Curso-de-Desenvolvimento-Web | 2dcefc158522b3a529670c34edbdc4d508cbc2cd | [
"MIT"
] | null | null | null | Aulas/12 - jQuery/09 - Modificando o Conteúdo e características dos Elementos/Ex. 04/script.js | wiltonmartinsdev/Meu-Curso-de-Desenvolvimento-Web | 2dcefc158522b3a529670c34edbdc4d508cbc2cd | [
"MIT"
] | null | null | null | Aulas/12 - jQuery/09 - Modificando o Conteúdo e características dos Elementos/Ex. 04/script.js | wiltonmartinsdev/Meu-Curso-de-Desenvolvimento-Web | 2dcefc158522b3a529670c34edbdc4d508cbc2cd | [
"MIT"
] | null | null | null | // Dessa forma utilizando o .val() iremos modificar o valor do value no input.
console.log($("#novo").val("Arroz")) | 57.5 | 78 | 0.704348 |
1009c2d0ea3bb8c24a1770c77d863149b9ab1518 | 19,923 | js | JavaScript | src/charts/tests/unit/assets/numericaxis-min-tests.js | jeremykenedy/yui3 | 99fdcc889b1f5dbd94420a815b3de23dc57ad32b | [
"MIT"
] | 1 | 2019-05-08T03:16:20.000Z | 2019-05-08T03:16:20.000Z | src/charts/tests/unit/assets/numericaxis-min-tests.js | jeremykenedy/yui3 | 99fdcc889b1f5dbd94420a815b3de23dc57ad32b | [
"MIT"
] | null | null | null | src/charts/tests/unit/assets/numericaxis-min-tests.js | jeremykenedy/yui3 | 99fdcc889b1f5dbd94420a815b3de23dc57ad32b | [
"MIT"
] | null | null | null | YUI.add('numericaxis-min-tests', function(Y) {
var suite = new Y.Test.Suite("Charts: NumericAxisMin"),
AxisTestTemplate,
parentDiv = Y.DOM.create('<div style="position:absolute;top:500px;left:0px;width:500px;height:400px" id="testdiv"></div>'),
DOC = Y.config.doc;
DOC.body.appendChild(parentDiv);
AxisTestTemplate = function(cfg, globalCfg)
{
var i;
AxisTestTemplate.superclass.constructor.apply(this);
cfg.width = cfg.width || 400;
cfg.height = cfg.height || 300;
this.attrCfg = cfg;
for(i in globalCfg)
{
if(globalCfg.hasOwnProperty(i))
{
this[i] = globalCfg[i];
}
}
};
Y.extend(AxisTestTemplate, Y.Test.Case, {
setUp: function() {
this.chart = new Y.Chart(this.attrCfg);
},
tearDown: function() {
this.eventListener.detach();
this.chart.destroy(true);
Y.Event.purgeElement(DOC, false);
}
});
var AxisMinTestTemplate = function()
{
AxisMinTestTemplate.superclass.constructor.apply(this, arguments);
};
Y.extend(AxisMinTestTemplate, AxisTestTemplate, {
//Tests a NumericAxis minimum by applying the labelFunction of the axis to the set minimum value to the innerHTML of the first label.
//Tests a NumericAxis maximum (unset) by checking to ensure the last label has a numeric value greater than or equal to the largest value in the data set.
testMin: function()
{
var chart = this.chart,
setMin = this.setMin,
dataMax = this.dataMax;
this.eventListener = this.chart.on("chartRendered", function(e) {
var axis = chart.getAxisByKey("values"),
majorUnit = axis.get("styles").majorUnit,
count = majorUnit.count - 1,
labels = axis.get("labels"),
min = parseFloat(labels[0].innerHTML),
max = labels[count].innerHTML,
roundingMethod = axis.get("roundingMethod"),
setIntervals = Y.Lang.isNumber(roundingMethod);
Y.assert(min == axis.get("labelFunction").apply(axis, [setMin, axis.get("labelFormat")]));
if(setIntervals)
{
Y.assert((max - min) % roundingMethod === 0);
}
//if the roundingMethod is numeric the axis cannot guarantee that the maximum will be greater than the data maximum
if(!setIntervals || (count * roundingMethod) >= dataMax - setMin)
{
Y.assert(max >= dataMax);
}
});
this.chart.render("#testdiv");
}
});
Y.AxisMinTestTemplate = AxisMinTestTemplate;
var allPositiveDataProvider = [
{category:"5/1/2010", values:2000, expenses:3700, revenue:2200},
{category:"5/2/2010", values:50, expenses:9100, revenue:100},
{category:"5/3/2010", values:400, expenses:1100, revenue:1500},
{category:"5/4/2010", values:200, expenses:1900, revenue:2800},
{category:"5/5/2010", values:5000, expenses:5000, revenue:2650}
],
allPositiveDataProviderDataMax = 9100,
allPositiveDataProviderDataMin = 50,
positiveAndNegativeDataProvider = [
{category:"5/1/2010", values:2000, expenses:3700, revenue:2200},
{category:"5/2/2010", values:50, expenses:9100, revenue:-100},
{category:"5/3/2010", values:-400, expenses:-1100, revenue:1500},
{category:"5/4/2010", values:200, expenses:1900, revenue:-2800},
{category:"5/5/2010", values:5000, expenses:-5000, revenue:2650}
],
positiveAndNegativeDataProviderDataMax = 9100,
positiveAndNegativeDataProviderDataMin = -5000,
allNegativeDataProvider = [
{category:"5/1/2010", values:-2000, expenses:-3700, revenue:-2200},
{category:"5/2/2010", values:-50, expenses:-9100, revenue:-100},
{category:"5/3/2010", values:-400, expenses:-1100, revenue:-1500},
{category:"5/4/2010", values:-200, expenses:-1900, revenue:-2800},
{category:"5/5/2010", values:-5000, expenses:-5000, revenue:-2650}
],
allNegativeDataProviderDataMax = -50,
allNegativeDataProviderDataMin = -9100,
decimalDataProvider = [
{category:"5/1/2010", values:2.45, expenses:3.71, revenue:2.2},
{category:"5/2/2010", values:0.5, expenses:9.1, revenue:0.16},
{category:"5/3/2010", values:1.4, expenses:1.14, revenue:1.25},
{category:"5/4/2010", values:0.05, expenses:1.9, revenue:2.8},
{category:"5/5/2010", values:5.53, expenses:5.21, revenue:2.65}
],
decimalDataProviderDataMax = 9.1,
decimalDataProviderDataMin = 0.05,
AxisMinTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 7
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Min Test",
setMin: 7,
dataMax: allPositiveDataProviderDataMax
}),
//Tests setting a NumericAxis minimum with alwaysShowZero as false
AxisMinAlwaysShowZeroFalseTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 7,
alwaysShowZero: false
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Min Test",
setMin: 7,
dataMax: allPositiveDataProviderDataMax
}),
AxisNegativeMinTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721
}
},
dataProvider: positiveAndNegativeDataProvider
},
{
name: "Axes Negative Min Test",
setMin: -1721,
dataMax: positiveAndNegativeDataProviderDataMax
}),
AxisPositiveAndNegativeMinTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721
}
},
dataProvider: positiveAndNegativeDataProvider
},
{
name: "Axes Negative Min Test",
setMin: -1721,
dataMax: positiveAndNegativeDataProviderDataMax
}),
AxisPositiveAndNegativeAlwaysShowZeroFalseMinTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721,
alwaysShowZero: false
}
},
dataProvider: positiveAndNegativeDataProvider
},
{
name: "Axes Negative Min Test",
setMin: -1721,
dataMax: positiveAndNegativeDataProviderDataMax
}),
AxisNegativeMinWithAllNegativeDataTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721
}
},
dataProvider: allNegativeDataProvider
},
{
name: "Axes Negative Min with All Negative Data Test",
setMin: -1721,
dataMax: allNegativeDataProviderDataMax
}),
AxisNegativeMinAlwaysShowZeroFalseTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721,
alwaysShowZero: false
}
},
dataProvider: allNegativeDataProvider
},
{
name: "Axes Negative Min with All Negative Data and alwaysShowZero=false Test",
setMin: -1721,
dataMax: allNegativeDataProviderDataMax
}),
AxisMinWithDecimalsTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 1.5
}
},
dataProvider: decimalDataProvider
},
{
name: "Axes Min with Decimals Test",
dataMax: decimalDataProviderDataMax,
setMin: 1.5
}),
AxisMinIntegerDecimalDataTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 1
}
},
dataProvider: decimalDataProvider
},
{
name: "Axes Integer Min with Decimal Data Test",
dataMax: decimalDataProviderDataMax,
setMin: 1
}),
//Tests setting a NumericAxis' minimum to a negative value with a data set of all positive values
AxisNegativeMinPositiveDataTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -100
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Negative Min with Positive Data Test",
setMin: -100,
dataMax: allPositiveDataProviderDataMax
}),
AxisMinRoundingAutoTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 7,
roundingMethod: "auto"
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Min Test",
setMin: 7,
dataMax: allPositiveDataProviderDataMax
}),
//Tests setting a NumericAxis minimum with alwaysShowZero as false
AxisMinAlwaysShowZeroFalseRoundingMethodAutoTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 7,
roundingMethod: "auto",
alwaysShowZero: false
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Min Test with roundingMethod=auto",
setMin: 7,
dataMax: allPositiveDataProviderDataMax
}),
//Tests setting a NumericAxis' minimum to a negative value
AxisNegativeMinRoundingMethodAutoTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721,
roundingMethod: "auto"
}
},
dataProvider: positiveAndNegativeDataProvider
},
{
name: "Axes Negative Min Test with roundingMethod=auto",
setMin: -1721,
dataMax: positiveAndNegativeDataProviderDataMax
}),
//Tests setting a NumericAxis' minimum to a negative values with all negative values in it's dataProvider
AxisNegativeMinWithAllNegativeDataRoundingMethodAutoTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721,
roundingMethod: "auto"
}
},
dataProvider: allNegativeDataProvider
},
{
name: "Axes Negative Min with All Negative Data Test with roundingMethod=auto",
setMin: -1721,
dataMax: allNegativeDataProviderDataMax
}),
//Tests setting a NumericAxis' minimum to a value with decimals
AxisMinWithDecimalsRoundingMethodAutoTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 1.5,
roundingMethod: "auto"
}
},
dataProvider: decimalDataProvider
},
{
name: "Axes Min with Decimals Test with roundingMethod=auto",
dataMax: decimalDataProviderDataMax,
setMin: 1.5
}),
//Tests setting a NumericAxis' minimum to an integer value with a data set that contains decimal values
AxisMinIntegerDecimalDataRoundingMethodAutoTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 1,
roundingMethod: "auto"
}
},
dataProvider: decimalDataProvider
},
{
name: "Axes Integer Min with Decimal Data Test with roundingMethod=auto",
dataMax: decimalDataProviderDataMax,
setMin: 1
}),
AxisNegativeMinPositiveDataRoundingMethodAutoTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -100,
roundingMethod: "auto"
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Negative Min with Positive Data Test with roundingMethod=auto",
setMin: -100,
dataMax: allPositiveDataProviderDataMax
}),
AxisMinRoundingNullTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 7,
roundingMethod: null
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Min Test with roundingMethod=null",
setMin: 7,
dataMax: allPositiveDataProviderDataMax
}),
AxisMinAlwaysShowZeroFalseRoundingMethodNullTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 7,
roundingMethod: null,
alwaysShowZero: false
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Min Test with roundingMethod=null",
setMin: 7,
dataMax: allPositiveDataProviderDataMax
}),
AxisNegativeMinRoundingMethodNullTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721,
roundingMethod: null
}
},
dataProvider: positiveAndNegativeDataProvider
},
{
name: "Axes Negative Min Test with roundingMethod=null",
setMin: -1721,
dataMax: positiveAndNegativeDataProviderDataMax
}),
AxisNegativeMinWithAllNegativeDataRoundingMethodNullTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721,
roundingMethod: null
}
},
dataProvider: allNegativeDataProvider
},
{
name: "Axes Negative Min with All Negative Data Test with roundingMethod=null",
setMin: -1721,
dataMax: allNegativeDataProviderDataMax
}),
AxisMinWithDecimalsRoundingMethodNullTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 1.5,
roundingMethod: null
}
},
dataProvider: decimalDataProvider
},
{
name: "Axes Min with Decimals Test with roundingMethod=null",
dataMax: decimalDataProviderDataMax,
setMin: 1.5
}),
AxisMinIntegerDecimalDataRoundingMethodNullTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 1,
roundingMethod: null
}
},
dataProvider: decimalDataProvider
},
{
name: "Axes Integer Min with Decimal Data Test with roundingMethod=null",
dataMax: decimalDataProviderDataMax,
setMin: 1
}),
AxisNegativeMinPositiveDataRoundingMethodNullTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -100,
roundingMethod: null
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Negative Min with Positive Data Test with roundingMethod=null",
setMin: -100,
dataMax: allPositiveDataProviderDataMax
}),
AxisMinRoundingNumericTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 7,
roundingMethod: 1000
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Min Test with roundingMethod=1000",
setMin: 7,
dataMax: allPositiveDataProviderDataMax
}),
AxisMinAlwaysShowZeroFalseRoundingMethodNumericTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 7,
roundingMethod: 1000,
alwaysShowZero: false
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Min Test with roundingMethod=1000",
setMin: 7,
dataMax: allPositiveDataProviderDataMax
}),
AxisNegativeMinRoundingMethodNumericTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721,
roundingMethod: 1000
}
},
dataProvider: positiveAndNegativeDataProvider
},
{
name: "Axes Negative Min Test with roundingMethod=1000",
setMin: -1721,
dataMax: positiveAndNegativeDataProviderDataMax
}),
AxisNegativeMinWithAllNegativeDataRoundingMethodNumericTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -1721,
roundingMethod: 1000
}
},
dataProvider: allNegativeDataProvider
},
{
name: "Axes Negative Min with All Negative Data Test with roundingMethod=1000",
setMin: -1721,
dataMax: allNegativeDataProviderDataMax
}),
AxisMinWithDecimalsRoundingMethodNumericTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 1.5,
roundingMethod: 2
}
},
dataProvider: decimalDataProvider
},
{
name: "Axes Min with Decimals Test with roundingMethod=2",
dataMax: decimalDataProviderDataMax,
setMin: 1.5
}),
AxisMinIntegerDecimalDataRoundingMethodNumericTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: 1,
roundingMethod: 2
}
},
dataProvider: decimalDataProvider
},
{
name: "Axes Integer Min with Decimal Data Test with roundingMethod=2",
dataMax: decimalDataProviderDataMax,
setMin: 1
}),
AxisNegativeMinPositiveDataRoundingMethodNumericTest = new Y.AxisMinTestTemplate({
axes: {
values: {
minimum: -100,
roundingMethod: 1000
}
},
dataProvider: allPositiveDataProvider
},
{
name: "Axes Negative Min with Positive Data Test with roundingMethod=1000",
setMin: -100,
dataMax: allPositiveDataProviderDataMax
});
suite.add(AxisMinTest);
suite.add(AxisMinAlwaysShowZeroFalseTest);
suite.add(AxisNegativeMinTest);
suite.add(AxisNegativeMinAlwaysShowZeroFalseTest);
suite.add(AxisNegativeMinWithAllNegativeDataTest);
suite.add(AxisMinWithDecimalsTest);
suite.add(AxisMinIntegerDecimalDataTest);
suite.add(AxisNegativeMinPositiveDataTest);
suite.add(AxisMinRoundingAutoTest);
suite.add(AxisMinAlwaysShowZeroFalseRoundingMethodAutoTest);
suite.add(AxisNegativeMinRoundingMethodAutoTest);
suite.add(AxisNegativeMinWithAllNegativeDataRoundingMethodAutoTest);
suite.add(AxisMinWithDecimalsRoundingMethodAutoTest);
suite.add(AxisMinIntegerDecimalDataRoundingMethodAutoTest);
suite.add(AxisNegativeMinPositiveDataRoundingMethodAutoTest);
suite.add(AxisMinRoundingNullTest);
suite.add(AxisMinAlwaysShowZeroFalseRoundingMethodNullTest);
suite.add(AxisNegativeMinRoundingMethodNullTest);
suite.add(AxisNegativeMinWithAllNegativeDataRoundingMethodNullTest);
suite.add(AxisMinWithDecimalsRoundingMethodNullTest);
suite.add(AxisMinIntegerDecimalDataRoundingMethodNullTest);
suite.add(AxisNegativeMinPositiveDataRoundingMethodNullTest);
suite.add(AxisMinRoundingNumericTest);
suite.add(AxisMinAlwaysShowZeroFalseRoundingMethodNumericTest);
suite.add(AxisNegativeMinRoundingMethodNumericTest);
suite.add(AxisNegativeMinWithAllNegativeDataRoundingMethodNumericTest);
suite.add(AxisMinWithDecimalsRoundingMethodNumericTest);
suite.add(AxisMinIntegerDecimalDataRoundingMethodNumericTest);
suite.add(AxisNegativeMinPositiveDataRoundingMethodNumericTest);
suite.add(AxisPositiveAndNegativeMinTest);
suite.add(AxisPositiveAndNegativeAlwaysShowZeroFalseMinTest);
Y.Test.Runner.add(suite);
}, '@VERSION@' ,{requires:['charts', 'test']});
| 31.8768 | 162 | 0.589118 |
100a8229946bae280f88741f7b78142474d52c90 | 23,969 | js | JavaScript | src/commands/create.js | izhyvaiev/claudia | 35f305e0f2f4bf75213505845c49dade82508b4c | [
"MIT"
] | 3,955 | 2016-02-13T15:42:29.000Z | 2022-03-24T08:43:03.000Z | src/commands/create.js | izhyvaiev/claudia | 35f305e0f2f4bf75213505845c49dade82508b4c | [
"MIT"
] | 214 | 2016-02-20T17:38:58.000Z | 2022-03-25T13:57:32.000Z | src/commands/create.js | izhyvaiev/claudia | 35f305e0f2f4bf75213505845c49dade82508b4c | [
"MIT"
] | 344 | 2016-02-15T15:55:32.000Z | 2022-03-28T20:28:47.000Z | const path = require('path'),
limits = require('../util/limits.json'),
fsUtil = require('../util/fs-util'),
aws = require('aws-sdk'),
zipdir = require('../tasks/zipdir'),
collectFiles = require('../tasks/collect-files'),
cleanUpPackage = require('../tasks/clean-up-package'),
addPolicy = require('../tasks/add-policy'),
markAlias = require('../tasks/mark-alias'),
validatePackage = require('../tasks/validate-package'),
retriableWrap = require('../util/retriable-wrap'),
loggingWrap = require('../util/logging-wrap'),
deployProxyApi = require('../tasks/deploy-proxy-api'),
rebuildWebApi = require('../tasks/rebuild-web-api'),
readjson = require('../util/readjson'),
apiGWUrl = require('../util/apigw-url'),
lambdaNameSanitize = require('../util/lambda-name-sanitize'),
retry = require('oh-no-i-insist'),
fs = require('fs'),
fsPromise = require('../util/fs-promise'),
os = require('os'),
isRoleArn = require('../util/is-role-arn'),
lambdaCode = require('../tasks/lambda-code'),
initEnvVarsFromOptions = require('../util/init-env-vars-from-options'),
getOwnerInfo = require('../tasks/get-owner-info'),
executorPolicy = require('../policies/lambda-executor-policy'),
loggingPolicy = require('../policies/logging-policy'),
vpcPolicy = require('../policies/vpc-policy'),
snsPublishPolicy = require('../policies/sns-publish-policy'),
isSNSArn = require('../util/is-sns-arn'),
lambdaInvocationPolicy = require('../policies/lambda-invocation-policy'),
waitUntilNotPending = require('../tasks/wait-until-not-pending'),
NullLogger = require('../util/null-logger');
module.exports = function create(options, optionalLogger) {
'use strict';
let roleMetadata,
s3Key,
packageArchive,
functionDesc,
customEnvVars,
functionName,
workingDir,
ownerAccount,
awsPartition,
packageFileDir;
const logger = optionalLogger || new NullLogger(),
awsDelay = options && options['aws-delay'] && parseInt(options['aws-delay'], 10) || (process.env.AWS_DELAY && parseInt(process.env.AWS_DELAY, 10)) || 5000,
awsRetries = options && options['aws-retries'] && parseInt(options['aws-retries'], 10) || 15,
source = (options && options.source) || process.cwd(),
configFile = (options && options.config) || path.join(source, 'claudia.json'),
iam = loggingWrap(new aws.IAM({region: options.region}), {log: logger.logApiCall, logName: 'iam'}),
lambda = loggingWrap(new aws.Lambda({region: options.region}), {log: logger.logApiCall, logName: 'lambda'}),
s3 = loggingWrap(new aws.S3({region: options.region, signatureVersion: 'v4'}), {log: logger.logApiCall, logName: 's3'}),
getSnsDLQTopic = function () {
const topicNameOrArn = options['dlq-sns'];
if (!topicNameOrArn) {
return false;
}
if (isSNSArn(topicNameOrArn)) {
return topicNameOrArn;
}
return `arn:${awsPartition}:sns:${options.region}:${ownerAccount}:${topicNameOrArn}`;
},
apiGatewayPromise = retriableWrap(
loggingWrap(new aws.APIGateway({region: options.region}), {log: logger.logApiCall, logName: 'apigateway'}),
() => logger.logStage('rate-limited by AWS, waiting before retry')
),
policyFiles = function () {
let files = fsUtil.recursiveList(options.policies);
if (fsUtil.isDir(options.policies)) {
files = files.map(filePath => path.join(options.policies, filePath));
}
return files.filter(fsUtil.isFile);
},
validationError = function () {
if (source === os.tmpdir()) {
return 'Source directory is the Node temp directory. Cowardly refusing to fill up disk with recursive copy.';
}
if (!options.region) {
return 'AWS region is missing. please specify with --region';
}
if (options['optional-dependencies'] === false && options['use-local-dependencies']) {
return 'incompatible arguments --use-local-dependencies and --no-optional-dependencies';
}
if (!options.handler && !options['api-module']) {
return 'Lambda handler is missing. please specify with --handler';
}
if (options.handler && options['api-module']) {
return 'incompatible arguments: cannot specify handler and api-module at the same time.';
}
if (!options.handler && options['deploy-proxy-api']) {
return 'deploy-proxy-api requires a handler. please specify with --handler';
}
if (options['binary-media-types'] && !options['deploy-proxy-api']) {
return 'binary-media-types only works with --deploy-proxy-api';
}
if (!options['security-group-ids'] && options['subnet-ids']) {
return 'VPC access requires at least one security group id *and* one subnet id';
}
if (options['security-group-ids'] && !options['subnet-ids']) {
return 'VPC access requires at least one security group id *and* one subnet id';
}
if (options.handler && options.handler.indexOf('.') < 0) {
return 'Lambda handler function not specified. Please specify with --handler module.function';
}
if (options['api-module'] && options['api-module'].indexOf('.') >= 0) {
return 'API module must be a module name, without the file extension or function name';
}
if (!fsUtil.isDir(path.dirname(configFile))) {
return 'cannot write to ' + configFile;
}
if (fsUtil.fileExists(configFile)) {
if (options && options.config) {
return options.config + ' already exists';
}
return 'claudia.json already exists in the source folder';
}
if (!fsUtil.fileExists(path.join(source, 'package.json'))) {
return 'package.json does not exist in the source folder';
}
if (options.policies && !policyFiles().length) {
return 'no files match additional policies (' + options.policies + ')';
}
if (options.memory || options.memory === 0) {
if (options.memory < limits.LAMBDA.MEMORY.MIN) {
return `the memory value provided must be greater than or equal to ${limits.LAMBDA.MEMORY.MIN}`;
}
if (options.memory > limits.LAMBDA.MEMORY.MAX) {
return `the memory value provided must be less than or equal to ${limits.LAMBDA.MEMORY.MAX}`;
}
if (options.memory % 64 !== 0) {
return 'the memory value provided must be a multiple of 64';
}
}
if (options.timeout || options.timeout === 0) {
if (options.timeout < 1) {
return 'the timeout value provided must be greater than or equal to 1';
}
if (options.timeout > 900) {
return 'the timeout value provided must be less than or equal to 900';
}
}
if (options['allow-recursion'] && options.role && isRoleArn(options.role)) {
return 'incompatible arguments allow-recursion and role. When specifying a role ARN, Claudia does not patch IAM policies.';
}
if (options['s3-key'] && !options['use-s3-bucket']) {
return '--s3-key only works with --use-s3-bucket';
}
if (options.arch && options.arch !== 'x86_64' && options.arch !== 'arm64') {
return '--arch should specify either \'x86_64\' or \'arm64\'';
}
},
getPackageInfo = function () {
logger.logStage('loading package config');
return readjson(path.join(source, 'package.json'))
.then(jsonConfig => {
const name = options.name || lambdaNameSanitize(jsonConfig.name),
description = options.description || (jsonConfig.description && jsonConfig.description.trim());
if (!name) {
return Promise.reject('project name is missing. please specify with --name or in package.json');
}
return {
name: name,
description: description
};
});
},
createLambda = function (functionName, functionDesc, functionCode, roleArn) {
return retry(
() => {
logger.logStage('creating Lambda');
return lambda.createFunction({
Architectures: [options.arch || 'x86_64'],
Code: functionCode,
FunctionName: functionName,
Description: functionDesc,
MemorySize: options.memory,
Timeout: options.timeout,
Environment: customEnvVars,
KMSKeyArn: options['env-kms-key-arn'],
Handler: options.handler || (options['api-module'] + '.proxyRouter'),
Role: roleArn,
Runtime: options.runtime || 'nodejs14.x',
Publish: true,
Layers: options.layers && options.layers.split(','),
VpcConfig: options['security-group-ids'] && options['subnet-ids'] && {
SecurityGroupIds: (options['security-group-ids'] && options['security-group-ids'].split(',')),
SubnetIds: (options['subnet-ids'] && options['subnet-ids'].split(','))
},
DeadLetterConfig: getSnsDLQTopic() ? {
TargetArn: getSnsDLQTopic()
} : null
}).promise();
},
awsDelay, awsRetries,
error => {
return error &&
error.code === 'InvalidParameterValueException' &&
(error.message === 'The role defined for the function cannot be assumed by Lambda.'
|| error.message.startsWith('The provided execution role does not have permissions')
|| error.message.startsWith('Lambda was unable to configure access to your environment variables because the KMS key is invalid for CreateGrant.')
);
},
() => logger.logStage('waiting for IAM role propagation'),
Promise
);
},
markAliases = function (lambdaData) {
logger.logStage('creating version alias');
return markAlias(lambdaData.FunctionName, lambda, '$LATEST', 'latest')
.then(() => {
if (options.version) {
return markAlias(lambdaData.FunctionName, lambda, lambdaData.Version, options.version);
}
})
.then(() =>lambdaData);
},
waitForState = function (lambdaData) {
logger.logStage('waiting for lambda resource allocation');
return waitUntilNotPending(lambda, lambdaData.FunctionName, awsDelay, awsRetries)
.then(() => lambdaData);
},
createWebApi = function (lambdaMetadata, packageDir) {
let apiModule, apiConfig, apiModulePath;
const alias = options.version || 'latest';
logger.logStage('creating REST API');
try {
apiModulePath = path.join(packageDir, options['api-module']);
apiModule = require(path.resolve(apiModulePath));
apiConfig = apiModule && apiModule.apiConfig && apiModule.apiConfig();
} catch (e) {
console.error(e.stack || e);
return Promise.reject(`cannot load api config from ${apiModulePath}`);
}
if (!apiConfig) {
return Promise.reject(`No apiConfig defined on module '${options['api-module']}'. Are you missing a module.exports?`);
}
return apiGatewayPromise.createRestApiPromise({
name: lambdaMetadata.FunctionName
})
.then((result) => {
lambdaMetadata.api = {
id: result.id,
module: options['api-module'],
url: apiGWUrl(result.id, options.region, alias)
};
return rebuildWebApi(lambdaMetadata.FunctionName, alias, result.id, apiConfig, ownerAccount, awsPartition, options.region, logger, options['cache-api-config']);
})
.then(() => {
if (apiModule.postDeploy) {
return apiModule.postDeploy(
options,
{
name: lambdaMetadata.FunctionName,
alias: alias,
apiId: lambdaMetadata.api.id,
apiUrl: lambdaMetadata.api.url,
region: options.region
},
{
apiGatewayPromise: apiGatewayPromise,
aws: aws
}
);
}
})
.then(postDeployResult => {
if (postDeployResult) {
lambdaMetadata.api.deploy = postDeployResult;
}
return lambdaMetadata;
});
},
saveConfig = function (lambdaMetaData) {
const config = {
lambda: {
role: roleMetadata.Role.RoleName,
name: lambdaMetaData.FunctionName,
region: options.region
}
};
if (options.role) {
config.lambda.sharedRole = true;
}
logger.logStage('saving configuration');
if (lambdaMetaData.api) {
config.api = { id: lambdaMetaData.api.id, module: lambdaMetaData.api.module };
}
return fsPromise.writeFileAsync(
configFile,
JSON.stringify(config, null, 2),
'utf8'
)
.then(() => lambdaMetaData);
},
formatResult = function (lambdaMetaData) {
const config = {
lambda: {
role: roleMetadata.Role.RoleName,
name: lambdaMetaData.FunctionName,
region: options.region
}
};
if (options.role) {
config.lambda.sharedRole = true;
}
if (lambdaMetaData.api) {
config.api = lambdaMetaData.api;
}
if (s3Key) {
config.s3key = s3Key;
}
return config;
},
loadRole = function (functionName) {
logger.logStage('initialising IAM role');
if (options.role) {
if (isRoleArn(options.role)) {
return Promise.resolve({
Role: {
RoleName: options.role,
Arn: options.role
}
});
}
return iam.getRole({RoleName: options.role}).promise();
} else {
return iam.createRole({
RoleName: functionName + '-executor',
AssumeRolePolicyDocument: executorPolicy()
}).promise();
}
},
addExtraPolicies = function () {
return Promise.all(policyFiles().map(fileName => {
const policyName = path.basename(fileName).replace(/[^A-z0-9]/g, '-');
return addPolicy(iam, policyName, roleMetadata.Role.RoleName, fileName);
}));
},
cleanup = function (result) {
if (!options.keep) {
fsUtil.rmDir(workingDir);
fs.unlinkSync(packageArchive);
} else {
result.archive = packageArchive;
}
return result;
};
if (validationError()) {
return Promise.reject(validationError());
}
return initEnvVarsFromOptions(options)
.then(opts => customEnvVars = opts)
.then(getPackageInfo)
.then(packageInfo => {
functionName = packageInfo.name;
functionDesc = packageInfo.description;
})
.then(() => getOwnerInfo(options.region, logger))
.then(ownerInfo => {
ownerAccount = ownerInfo.account;
awsPartition = ownerInfo.partition;
})
.then(() => fsPromise.mkdtempAsync(os.tmpdir() + path.sep))
.then(dir => workingDir = dir)
.then(() => collectFiles(source, workingDir, options, logger))
.then(dir => {
logger.logStage('validating package');
return validatePackage(dir, options.handler, options['api-module']);
})
.then(dir => {
packageFileDir = dir;
return cleanUpPackage(dir, options, logger);
})
.then(dir => {
logger.logStage('zipping package');
return zipdir(dir);
})
.then(zipFile => {
packageArchive = zipFile;
})
.then(() => loadRole(functionName))
.then((result) => {
roleMetadata = result;
})
.then(() => {
if (!options.role) {
return iam.putRolePolicy({
RoleName: roleMetadata.Role.RoleName,
PolicyName: 'log-writer',
PolicyDocument: loggingPolicy(awsPartition)
}).promise()
.then(() => {
if (getSnsDLQTopic()) {
return iam.putRolePolicy({
RoleName: roleMetadata.Role.RoleName,
PolicyName: 'dlq-publisher',
PolicyDocument: snsPublishPolicy(getSnsDLQTopic())
}).promise();
}
});
}
})
.then(() => {
if (options.policies) {
return addExtraPolicies();
}
})
.then(() => {
if (options['security-group-ids'] && !isRoleArn(options.role)) {
return iam.putRolePolicy({
RoleName: roleMetadata.Role.RoleName,
PolicyName: 'vpc-access-execution',
PolicyDocument: vpcPolicy()
}).promise();
}
})
.then(() => {
if (options['allow-recursion']) {
return iam.putRolePolicy({
RoleName: roleMetadata.Role.RoleName,
PolicyName: 'recursive-execution',
PolicyDocument: lambdaInvocationPolicy(functionName, awsPartition, options.region)
}).promise();
}
})
.then(() => lambdaCode(s3, packageArchive, options['use-s3-bucket'], options['s3-sse'], options['s3-key']))
.then(functionCode => {
s3Key = functionCode.S3Key;
return createLambda(functionName, functionDesc, functionCode, roleMetadata.Role.Arn);
})
.then(waitForState)
.then(markAliases)
.then(lambdaMetadata => {
if (options['api-module']) {
return createWebApi(lambdaMetadata, packageFileDir);
} else if (options['deploy-proxy-api']) {
return deployProxyApi(lambdaMetadata, options, ownerAccount, awsPartition, apiGatewayPromise, logger);
} else {
return lambdaMetadata;
}
})
.then(saveConfig)
.then(formatResult)
.then(cleanup);
};
module.exports.doc = {
description: 'Create the initial lambda function and related security role.',
priority: 1,
args: [
{
argument: 'region',
description: 'AWS region where to create the lambda. For supported values, see\n https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region',
example: 'us-east-1'
},
{
argument: 'handler',
optional: true,
description: 'Main function for Lambda to execute, as module.function',
example: 'if it is in the main.js file and exported as router, this would be main.router'
},
{
argument: 'api-module',
optional: true,
description: 'The main module to use when creating Web APIs. \n' +
'If you provide this parameter, do not set the handler option.\n' +
'This should be a module created using the Claudia API Builder.',
example: 'if the api is defined in web.js, this would be web'
},
{
argument: 'arch',
optional: true,
description: 'Specifies the desired architecture, either x86_64 or arm64. \n' +
'If a value is not provided, x86_64 will be used as the default.',
default: 'x86_64',
since: '5.13.2'
},
{
argument: 'deploy-proxy-api',
optional: true,
description: 'If specified, a proxy API will be created for the Lambda \n' +
' function on API Gateway, and forward all requests to function. \n' +
' This is an alternative way to create web APIs to --api-module.'
},
{
argument: 'binary-media-types',
optional: true,
description: 'A comma-delimited list of binary-media-types to \n' +
'set when using --deploy-proxy-api. Use an empty string in quotes \n' +
'to not set any binary media types.',
example: 'image/png,image/jpeg',
'default': '*/*'
},
{
argument: 'name',
optional: true,
description: 'lambda function name',
example: 'awesome-microservice',
'default': 'the project name from package.json'
},
{
argument: 'version',
optional: true,
description: 'A version alias to automatically assign to the new function',
example: 'development'
},
{
argument: 'source',
optional: true,
description: 'Directory with project files',
'default': 'current directory'
},
{
argument: 'config',
optional: true,
description: 'Config file where the creation result will be saved',
'default': 'claudia.json'
},
{
argument: 'policies',
optional: true,
description: 'A directory or file pattern for additional IAM policies\n' +
'which will automatically be included into the security role for the function',
example: 'policies/*.json'
},
{
argument: 'allow-recursion',
optional: true,
description: 'Set up IAM permissions so a function can call itself recursively'
},
{
argument: 'role',
optional: true,
description: 'The name or ARN of an existing role to assign to the function. \n' +
'If not supplied, Claudia will create a new role. Supply an ARN to create a function without any IAM access.',
example: 'arn:aws:iam::123456789012:role/FileConverter'
},
{
argument: 'runtime',
optional: true,
description: 'Node.js runtime to use. For supported values, see\n http://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html',
default: 'nodejs14.x'
},
{
argument: 'description',
optional: true,
description: 'Textual description of the lambda function',
default: 'the project description from package.json'
},
{
argument: 'memory',
optional: true,
description: 'The amount of memory, in MB, your Lambda function is given.\nThe value must be a multiple of 64 MB.',
default: 128
},
{
argument: 'timeout',
optional: true,
description: 'The function execution time, in seconds, at which AWS Lambda should terminate the function',
default: 3
},
{
argument: 'no-optional-dependencies',
optional: true,
description: 'Do not upload optional dependencies to Lambda.'
},
{
argument: 'use-local-dependencies',
optional: true,
description: 'Do not install dependencies, use local node_modules directory instead'
},
{
argument: 'npm-options',
optional: true,
description: 'Any additional options to pass on to NPM when installing packages. Check https://docs.npmjs.com/cli/install for more information',
example: '--ignore-scripts',
since: '5.0.0'
},
{
argument: 'cache-api-config',
optional: true,
example: 'claudiaConfigCache',
description: 'Name of the stage variable for storing the current API configuration signature.\n' +
'If set, it will also be used to check if the previously deployed configuration can be re-used and speed up deployment'
},
{
argument: 'post-package-script',
optional: true,
example: 'customNpmScript',
description: 'the name of a NPM script to execute custom processing after claudia finished packaging your files.\n' +
'Note that development dependencies are not available at this point, but you can use npm uninstall to remove utility tools as part of this step.',
since: '5.0.0'
},
{
argument: 'keep',
optional: true,
description: 'keep the produced package archive on disk for troubleshooting purposes.\n' +
'If not set, the temporary files will be removed after the Lambda function is successfully created'
},
{
argument: 'use-s3-bucket',
optional: true,
example: 'claudia-uploads',
description: 'The name of a S3 bucket that Claudia will use to upload the function code before installing in Lambda.\n' +
'You can use this to upload large functions over slower connections more reliably, and to leave a binary artifact\n' +
'after uploads for auditing purposes. If not set, the archive will be uploaded directly to Lambda.\n'
},
{
argument: 's3-key',
optional: true,
example: 'path/to/file.zip',
description: 'The key to which the function code will be uploaded in the s3 bucket referenced in `--use-s3-bucket`'
},
{
argument: 's3-sse',
optional: true,
example: 'AES256',
description: 'The type of Server Side Encryption applied to the S3 bucket referenced in `--use-s3-bucket`'
},
{
argument: 'aws-delay',
optional: true,
example: '3000',
description: 'number of milliseconds betweeen retrying AWS operations if they fail',
default: '5000'
},
{
argument: 'aws-retries',
optional: true,
example: '15',
description: 'number of times to retry AWS operations if they fail',
default: '15'
},
{
argument: 'security-group-ids',
optional: true,
example: 'sg-1234abcd',
description: 'A comma-delimited list of AWS VPC Security Group IDs, which the function will be able to access.\n' +
'Note: these security groups need to be part of the same VPC as the subnets provided with --subnet-ids.'
},
{
argument: 'subnet-ids',
optional: true,
example: 'subnet-1234abcd,subnet-abcd4567',
description: 'A comma-delimited list of AWS VPC Subnet IDs, which this function should be able to access.\n' +
'At least one subnet is required if you are using VPC access.\n' +
'Note: these subnets need to be part of the same VPC as the security groups provided with --security-group-ids.'
},
{
argument: 'set-env',
optional: true,
example: 'S3BUCKET=testbucket,SNSQUEUE=testqueue',
description: 'comma-separated list of VAR=VALUE environment variables to set'
},
{
argument: 'set-env-from-json',
optional: true,
example: 'production-env.json',
description: 'file path to a JSON file containing environment variables to set'
},
{
argument: 'env-kms-key-arn',
optional: true,
description: 'KMS Key ARN to encrypt/decrypt environment variables'
},
{
argument: 'layers',
optional: true,
description: 'A comma-delimited list of Lambda layers to attach to this function',
example: 'arn:aws:lambda:us-east-1:12345678:layer:ffmpeg:4'
},
{
argument: 'dlq-sns',
optional: true,
description: 'Dead letter queue SNS topic name or ARN',
example: 'arn:aws:sns:us-east-1:123456789012:my_corporate_topic'
}
]
};
| 35.145161 | 164 | 0.670574 |
100a95d0a98f2468521f34e69e1b86ee4e2083ee | 622 | js | JavaScript | test/lib/nock/aws.js | michaelgoin/node-newrelic | 4490db09b5963c0b35ed67747c1dc51615cfd675 | [
"Apache-2.0"
] | 637 | 2015-01-03T13:29:50.000Z | 2022-03-30T14:49:15.000Z | test/lib/nock/aws.js | michaelgoin/node-newrelic | 4490db09b5963c0b35ed67747c1dc51615cfd675 | [
"Apache-2.0"
] | 595 | 2015-01-06T18:14:13.000Z | 2022-03-31T16:32:21.000Z | test/lib/nock/aws.js | bizob2828/node-newrelic | 6bbadca92643506e9b1e4cd81b754443afdd0262 | [
"Apache-2.0"
] | 376 | 2015-01-15T02:22:44.000Z | 2022-03-11T18:05:07.000Z | /*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
'use strict'
const nock = require('nock')
module.exports.mockAWSInfo = function () {
const awsHost = 'http://169.254.169.254'
const awsResponses = {
'instance-type': 'test.type',
'instance-id': 'test.id',
'placement/availability-zone': 'us-west-2b'
}
const awsRedirect = nock(awsHost)
for (const awsPath in awsResponses) {
if (Object.hasOwnProperty.call(awsResponses, awsPath)) {
awsRedirect.get('/2008-02-01/meta-data/' + awsPath).reply(200, awsResponses[awsPath])
}
}
}
| 24.88 | 91 | 0.672026 |
100bbf7f1e83fb6c5126343c05083f1ca5885bfc | 1,027 | js | JavaScript | unusedComponents/testMakePayment/payComponents/payPages/Recipt.js | wildpow/college-101 | 6fe0550528f1d85bfa700f2f5907d87339f86e1e | [
"MIT"
] | null | null | null | unusedComponents/testMakePayment/payComponents/payPages/Recipt.js | wildpow/college-101 | 6fe0550528f1d85bfa700f2f5907d87339f86e1e | [
"MIT"
] | null | null | null | unusedComponents/testMakePayment/payComponents/payPages/Recipt.js | wildpow/college-101 | 6fe0550528f1d85bfa700f2f5907d87339f86e1e | [
"MIT"
] | null | null | null | import React from "react";
import styled from "styled-components";
import { useSpring, animated } from "react-spring";
import { Box, Button, Heading } from "grommet";
import states from "../States";
const AnimateWrapper = styled(animated.div)`
width: 100%;
height: 100%;
`;
const Recipt = props => {
const transision = useSpring({
opacity: 1,
transform: "translate3d(0%,0,0)",
from: { opacity: 0, transform: "translate3d(100%,0,0)" },
});
return (
<AnimateWrapper style={transision}>
<Box
flex
direction="column"
justify="center"
align="center"
fill
// animation="slideLeft"
background="white"
elevation="large"
>
<Box>
<Heading level={2}>Recipt</Heading>
<Button
type="button"
onClick={() => props.back(states.CHOOSEUSER)}
primary
label="New payment"
/>
</Box>
</Box>
</AnimateWrapper>
);
};
export default Recipt;
| 22.822222 | 61 | 0.560857 |
100cbee90f631c14112dc54ab50cc3f0b2c75519 | 3,847 | js | JavaScript | app.js | NathanHeffley/quickl | 2327c2b85b9b5e6cfd5e3138aaf385d1f320182e | [
"0BSD"
] | 2 | 2016-07-31T15:58:20.000Z | 2016-08-01T14:07:06.000Z | app.js | NathanHeffley/quickl | 2327c2b85b9b5e6cfd5e3138aaf385d1f320182e | [
"0BSD"
] | null | null | null | app.js | NathanHeffley/quickl | 2327c2b85b9b5e6cfd5e3138aaf385d1f320182e | [
"0BSD"
] | null | null | null | var express = require('express');
var mongoose = require("mongoose");
mongoose.connect('mongodb://localhost/quickl');
var postSchema = new mongoose.Schema({
slug: { type: String, required: true, unique: true },
title: { type: String, required: true },
author: { type: String, required: true },
content: { type: String, required: true },
image: { type: String, required: true }
},
{ timestamps: true});
var Post = mongoose.model('Post', postSchema);
var app = express();
var port = 3000;
app.set('view engine', 'pug');
app.use('/css', express.static(__dirname + '/css'));
app.use('/js', express.static(__dirname + '/js'));
/* Start Index Routing */
app.get('/', function (req, res) {
routeIndex(res, false);
});
app.get('/amp', function (req, res) {
routeIndex(res, true);
});
function routeIndex(res, amp) {
Post.find({}).limit(10).sort({createdAt: -1}).exec(function (err, posts) {
if (err) throw err;
if (amp) {
res.render(__dirname + '/amp/index', { posts: posts });
} else {
res.render('index', { posts: posts });
}
});
}
/* End Index Routing */
/* Start Post Routing */
app.get('/:slug', function (req, res) {
routePost(req, res, false);
});
app.get('/:slug/amp', function (req, res) {
routePost(req, res, true);
});
function routePost(req, res, amp) {
Post.findOne({'slug': req.params.slug}, function (err, post) {
var resObj = {}
if (err) {
console.log(err);
} else if (post) {
// If a post was found and is not null, change the response object to the post
resObj = {postSlug: post.slug,
postTitle: post.title,
postAuthor: post.author,
postContent: post.content,
postImage: post.image,
postCreated: post.createdAt,
postUpdated: post.updatedAt}
} else {
// Redirect missing pages to the 404 page.
res.redirect('/'); // TODO: Redirect to 404 page.
return;
}
// Set the next and last posts
findNextPost(post.createdAt, function (nextPost) {
resObj.nextPostSlug = nextPost.slug;
resObj.nextPostTitle = nextPost.title;
resObj.nextPostImage = nextPost.image;
resObj.nextPostAuthor = nextPost.author;
resObj.nextPostCreated = nextPost.createdAt;
findLastPost(post.createdAt, function (lastPost) {
resObj.lastPostSlug = lastPost.slug;
resObj.lastPostTitle = lastPost.title;
resObj.lastPostImage = lastPost.image;
resObj.lastPostAuthor = lastPost.author;
resObj.lastPostCreated = lastPost.createdAt;
// Finally, serve the resObj in the proper formatting
if (amp) {
res.render(__dirname + '/amp/post', resObj);
} else {
res.render('post', resObj);
}
});
});
});
}
/* End Post Routing */
// Find the next post information
function findNextPost(currentPostDate, callback) {
Post.findOne({createdAt: {$gt: currentPostDate}}).select('slug title image author createdAt').sort({createdAt: 1}).exec(function (err, post) {
if (err) {
console.log(err);
} else if (post) {
callback(post);
return;
}
callback(emptyPost());
});
}
// Find the last post information
function findLastPost(currentPostDate, callback) {
Post.findOne({createdAt: {$lt: currentPostDate}}).select('slug title image author createdAt').sort({createdAt: -1}).exec(function (err, post) {
if (err) {
console.log(err);
} else if (post) {
callback(post);
return;
}
callback(emptyPost());
});
}
function emptyPost() {
var emptyPost = {slug: '#', title: 'No more this way.', image: 'no-image', author: 'No Author', createdAt: 'no-date'};
return emptyPost;
}
app.listen(port, function () {
console.log('Quickl is listening on port ' + port)
});
| 28.924812 | 145 | 0.615805 |
100d26046ff36b6853dfa7917e3be029462e1c34 | 1,638 | js | JavaScript | __tests__/server.test.js | Mhsalameh/basic-auth | 07f25647c7ba5f635c6c828e356adf3f210b8972 | [
"MIT"
] | null | null | null | __tests__/server.test.js | Mhsalameh/basic-auth | 07f25647c7ba5f635c6c828e356adf3f210b8972 | [
"MIT"
] | null | null | null | __tests__/server.test.js | Mhsalameh/basic-auth | 07f25647c7ba5f635c6c828e356adf3f210b8972 | [
"MIT"
] | null | null | null | "use strict";
const server = require("../src/server.js");
const supertest = require("supertest");
const { db } = require("../src/models/index.js");
const request = supertest(server.app);
describe("testing auth server", () => {
beforeAll(async () => {
db.sync();
});
afterAll(() => {
db.drop();
});
it("POST to /signup to create a new user", async () => {
const response = await request
.post("/signup")
.send({ username: "mohammad", password: "1234" });
expect(response.status).toEqual(201);
});
it("POST to /signin to login as a user (use basic auth)", async () => {
const response = await request.post("/signin").auth("mohammad", "1234");
expect(response.status).toEqual(200);
});
it("testing invalid username", async () => {
const response = await request.post("/signin").auth("moathx", "qwerty");
expect(response.status).toEqual(500);
expect(response.body.message).toEqual("invalid username");
});
it("testing invalid password", async () => {
const response = await request.post("/signin").auth("mohammad", "qwerty");
expect(response.status).toEqual(500);
expect(response.body.message).toEqual("invalid username or password");
});
it("testing null input singup", async()=>{
const response= await request.post('/signup').auth(null,"qwerty");
expect(response.status).toEqual(500);
console.log(response)
expect(response.body).toEqual('input cannot be null')
})
it("testing null input singup", async()=>{
const response= await request.post('/signu').auth(null,"qwerty");
expect(response.status).toEqual(404);
})
});
| 33.428571 | 78 | 0.638584 |
100d73b5c01ec34182c2bff608ff2d769fddfda6 | 719 | js | JavaScript | server/router/userRouter.js | tony-mtz/simple_cookie | b885e45d6355512b8fba851dd36423c9d6539018 | [
"Apache-2.0"
] | null | null | null | server/router/userRouter.js | tony-mtz/simple_cookie | b885e45d6355512b8fba851dd36423c9d6539018 | [
"Apache-2.0"
] | null | null | null | server/router/userRouter.js | tony-mtz/simple_cookie | b885e45d6355512b8fba851dd36423c9d6539018 | [
"Apache-2.0"
] | null | null | null | // const express = require('express');
// const router = express.Router();
// const userController = require('./controller/userController');
// /**
// * 1) create new user in db
// * 2) create a new cookie and set data
// * 3) redirect to restricted
// */
// router.post('/signup', userController.signup,
// (req, res) => {
// res.status(200).redirect('../restricted.html')
// });
// router.post('/login',
// userController.login,
// userController.setUidCookie,
// (req, res) => {
// res.status(200).redirect('../restricted.html')
// });
// router.post('logout',
// userController.logout,
// (req, res) => {
// res.status(200).redirect('/login')
// });
// module.exports = router; | 23.966667 | 65 | 0.595271 |
100dff53736cdbaac0ab647539472e092d0b0d34 | 159 | js | JavaScript | docs/search/enumvalues_3.js | sevagh/libjungle | a7153b327fcc83459d1bb7c36d7aae9eead51d42 | [
"MIT"
] | 2 | 2020-06-14T03:06:03.000Z | 2022-03-26T06:53:17.000Z | docs/search/enumvalues_3.js | sevagh/libmetro | a7153b327fcc83459d1bb7c36d7aae9eead51d42 | [
"MIT"
] | null | null | null | docs/search/enumvalues_3.js | sevagh/libmetro | a7153b327fcc83459d1bb7c36d7aae9eead51d42 | [
"MIT"
] | null | null | null | var searchData=
[
['two',['Two',['../classmetro_1_1Measure.html#aaef919c87cef83a4818ce8743065b03da79ec9b5ea1d07925af80eab9a4690820',1,'metro::Measure']]]
];
| 31.8 | 137 | 0.773585 |
100e562dbba136b358657cd90450f0c08c70511c | 66,521 | js | JavaScript | src/third_party/webdriver-atoms/swipe.js | amikey/ghostdriver | 4f8c27e6215a8422e08f27e721590c61b697f7bc | [
"BSD-2-Clause"
] | 25 | 2015-07-21T18:14:57.000Z | 2021-02-21T10:00:48.000Z | src/third_party/webdriver-atoms/swipe.js | amikey/ghostdriver | 4f8c27e6215a8422e08f27e721590c61b697f7bc | [
"BSD-2-Clause"
] | 33 | 2015-09-30T10:30:42.000Z | 2016-06-05T13:59:39.000Z | src/third_party/webdriver-atoms/swipe.js | amikey/ghostdriver | 4f8c27e6215a8422e08f27e721590c61b697f7bc | [
"BSD-2-Clause"
] | 9 | 2016-03-14T13:25:14.000Z | 2021-02-21T10:09:22.000Z | function(){return function(){function h(a){return function(){return this[a]}}function aa(a){return function(){return a}}var m,n=this;
function ca(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function p(a){return void 0!==a}function da(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length}function t(a){return"string"==typeof a}function ea(a){return"number"==typeof a}function fa(a){return"function"==ca(a)}function ga(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ha(a,b,c){return a.call.apply(a.bind,arguments)}
function ia(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function ja(a,b,c){ja=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return ja.apply(null,arguments)}
function ka(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var la=Date.now||function(){return+new Date};function u(a,b){function c(){}c.prototype=b.prototype;a.Ta=b.prototype;a.prototype=new c};var ma=window;function na(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),f=Math.max(d.length,e.length),g=0;0==c&&g<f;g++){var k=d[g]||"",r=e[g]||"",s=RegExp("(\\d*)(\\D*)","g"),z=RegExp("(\\d*)(\\D*)","g");do{var q=s.exec(k)||["","",""],l=z.exec(r)||["","",""];if(0==q[0].length&&0==l[0].length)break;c=((0==q[1].length?0:parseInt(q[1],10))<(0==l[1].length?0:parseInt(l[1],10))?-1:(0==q[1].length?0:parseInt(q[1],10))>(0==l[1].length?
0:parseInt(l[1],10))?1:0)||((0==q[2].length)<(0==l[2].length)?-1:(0==q[2].length)>(0==l[2].length)?1:0)||(q[2]<l[2]?-1:q[2]>l[2]?1:0)}while(0==c)}return c}function oa(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var pa=Array.prototype;function w(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function qa(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var k=f[g];b.call(void 0,k,g,a)&&(d[e++]=k)}return d}function ra(a,b){for(var c=a.length,d=Array(c),e=t(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d}
function sa(a,b,c){if(a.reduce)return a.reduce(b,c);var d=c;w(a,function(c,f){d=b.call(void 0,d,c,f,a)});return d}function ta(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function ua(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0}
function va(a,b){var c;a:{c=a.length;for(var d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){c=e;break a}c=-1}return 0>c?null:t(a)?a.charAt(c):a[c]}function wa(a,b){var c;a:if(t(a))c=t(b)&&1==b.length?a.indexOf(b,0):-1;else{for(c=0;c<a.length;c++)if(c in a&&a[c]===b)break a;c=-1}return 0<=c}function xa(a){return pa.concat.apply(pa,arguments)}function ya(a,b,c){return 2>=arguments.length?pa.slice.call(a,b):pa.slice.call(a,b,c)};var za={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",
darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",
ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",
lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",
moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",
seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var Aa="backgroundColor borderTopColor borderRightColor borderBottomColor borderLeftColor color outlineColor".split(" "),Ba=/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/,Ca=/^#(?:[0-9a-f]{3}){1,2}$/i,Da=/^(?:rgba)?\((\d{1,3}),\s?(\d{1,3}),\s?(\d{1,3}),\s?(0|1|0\.\d*)\)$/i,Ea=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i;function x(a,b){this.code=a;this.state=Fa[a]||Ga;this.message=b||"";var c=this.state.replace(/((?:^|\s+)[a-z])/g,function(a){return a.toUpperCase().replace(/^[\s\xa0]+/g,"")}),d=c.length-5;if(0>d||c.indexOf("Error",d)!=d)c+="Error";this.name=c;c=Error(this.message);c.name=this.name;this.stack=c.stack||""}u(x,Error);
var Ga="unknown error",Fa={15:"element not selectable",11:"element not visible",31:"ime engine activation failed",30:"ime not available",24:"invalid cookie domain",29:"invalid element coordinates",12:"invalid element state",32:"invalid selector",51:"invalid selector",52:"invalid selector",17:"javascript error",405:"unsupported operation",34:"move target out of bounds",27:"no such alert",7:"no such element",8:"no such frame",23:"no such window",28:"script timeout",33:"session not created",10:"stale element reference",
0:"success",21:"timeout",25:"unable to set cookie",26:"unexpected alert open"};Fa[13]=Ga;Fa[9]="unknown command";x.prototype.toString=function(){return this.name+": "+this.message};var Ha,Ia,Ja,Ka,La,Ma;function Na(){return n.navigator?n.navigator.userAgent:null}Ka=Ja=Ia=Ha=!1;var Oa;if(Oa=Na()){var Pa=n.navigator;Ha=0==Oa.indexOf("Opera");Ia=!Ha&&-1!=Oa.indexOf("MSIE");Ja=!Ha&&-1!=Oa.indexOf("WebKit");Ka=!Ha&&!Ja&&"Gecko"==Pa.product}var y=Ha,A=Ia,B=Ka,Qa=Ja,Ra,Sa=n.navigator;Ra=Sa&&Sa.platform||"";La=-1!=Ra.indexOf("Mac");Ma=-1!=Ra.indexOf("Win");var Ta=-1!=Ra.indexOf("Linux");function Ua(){var a=n.document;return a?a.documentMode:void 0}var Va;
a:{var Za="",$a;if(y&&n.opera)var ab=n.opera.version,Za="function"==typeof ab?ab():ab;else if(B?$a=/rv\:([^\);]+)(\)|;)/:A?$a=/MSIE\s+([^\);]+)(\)|;)/:Qa&&($a=/WebKit\/(\S+)/),$a)var bb=$a.exec(Na()),Za=bb?bb[1]:"";if(A){var cb=Ua();if(cb>parseFloat(Za)){Va=String(cb);break a}}Va=Za}var db={};function eb(a){return db[a]||(db[a]=0<=na(Va,a))}function C(a){return A&&fb>=a}var gb=n.document,fb=gb&&A?Ua()||("CSS1Compat"==gb.compatMode?parseInt(Va,10):5):void 0;var hb;!B&&!A||A&&C(9)||B&&eb("1.9.1");A&&eb("9");function E(a,b){this.x=p(a)?a:0;this.y=p(b)?b:0}m=E.prototype;m.toString=function(){return"("+this.x+", "+this.y+")"};m.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};m.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};m.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};m.scale=function(a,b){var c=ea(b)?b:a;this.x*=a;this.y*=c;return this};function ib(a,b){this.width=a;this.height=b}m=ib.prototype;m.toString=function(){return"("+this.width+" x "+this.height+")"};m.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};m.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};m.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};m.scale=function(a,b){var c=ea(b)?b:a;this.width*=a;this.height*=c;return this};function jb(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c}function kb(a,b){var c={},d;for(d in a)c[d]=b.call(void 0,a[d],d,a);return c}function lb(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var mb=3;function nb(a){a=a.document;a=ob(a)?a.documentElement:a.body;return new ib(a.clientWidth,a.clientHeight)}function F(a){return a?a.parentWindow||a.defaultView:window}function ob(a){return"CSS1Compat"==a.compatMode}function pb(a){for(;a&&1!=a.nodeType;)a=a.previousSibling;return a}
function qb(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}
function rb(a,b){if(a==b)return 0;if(a.compareDocumentPosition)return a.compareDocumentPosition(b)&2?1:-1;if(A&&!C(9)){if(9==a.nodeType)return-1;if(9==b.nodeType)return 1}if("sourceIndex"in a||a.parentNode&&"sourceIndex"in a.parentNode){var c=1==a.nodeType,d=1==b.nodeType;if(c&&d)return a.sourceIndex-b.sourceIndex;var e=a.parentNode,f=b.parentNode;return e==f?sb(a,b):!c&&qb(e,b)?-1*tb(a,b):!d&&qb(f,a)?tb(b,a):(c?a.sourceIndex:e.sourceIndex)-(d?b.sourceIndex:f.sourceIndex)}d=G(a);c=d.createRange();
c.selectNode(a);c.collapse(!0);d=d.createRange();d.selectNode(b);d.collapse(!0);return c.compareBoundaryPoints(n.Range.START_TO_END,d)}function tb(a,b){var c=a.parentNode;if(c==b)return-1;for(var d=b;d.parentNode!=c;)d=d.parentNode;return sb(d,a)}function sb(a,b){for(var c=b;c=c.previousSibling;)if(c==a)return-1;return 1}function G(a){return 9==a.nodeType?a:a.ownerDocument||a.document}var ub={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},vb={IMG:" ",BR:"\n"};
function wb(a,b,c){if(!(a.nodeName in ub))if(a.nodeType==mb)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in vb)b.push(vb[a.nodeName]);else for(a=a.firstChild;a;)wb(a,b,c),a=a.nextSibling}function xb(a,b,c){c||(a=a.parentNode);for(c=0;a;){if(b(a))return a;a=a.parentNode;c++}return null}function yb(a){this.F=a||n.document||document}yb.prototype.I=function(a){return t(a)?this.F.getElementById(a):a};
function zb(a){return!Qa&&ob(a.F)?a.F.documentElement:a.F.body||a.F.documentElement}yb.prototype.contains=qb;var Ab,Bb,Cb,Db,Eb,Fb,Gb;Gb=Fb=Eb=Db=Cb=Bb=Ab=!1;var Hb=Na();Hb&&(-1!=Hb.indexOf("Firefox")?Ab=!0:-1!=Hb.indexOf("Camino")?Bb=!0:-1!=Hb.indexOf("iPhone")||-1!=Hb.indexOf("iPod")?Cb=!0:-1!=Hb.indexOf("iPad")?Db=!0:-1!=Hb.indexOf("Android")?Eb=!0:-1!=Hb.indexOf("Chrome")?Fb=!0:-1!=Hb.indexOf("Safari")&&(Gb=!0));var Ib=Ab,Jb=Bb,Kb=Cb,Lb=Db,Mb=Eb,Nb=Fb,Ob=Gb;function Pb(a,b,c){this.g=a;this.Ia=b||1;this.r=c||1};var Qb=A&&!C(9),Rb=A&&!C(8);function Sb(a,b,c,d,e){this.g=a;this.nodeName=c;this.nodeValue=d;this.nodeType=2;this.ownerElement=b;this.Ra=e;this.parentNode=b}function Tb(a,b,c){var d=Rb&&"href"==b.nodeName?a.getAttribute(b.nodeName,2):b.nodeValue;return new Sb(b,a,b.nodeName,d,c)};function Ub(a){this.ja=a;this.W=0}function Vb(a){a=a.match(Wb);for(var b=0;b<a.length;b++)Xb.test(a[b])&&a.splice(b,1);return new Ub(a)}var Wb=RegExp("\\$?(?:(?![0-9-])[\\w-]+:)?(?![0-9-])[\\w-]+|\\/\\/|\\.\\.|::|\\d+(?:\\.\\d*)?|\\.\\d+|\"[^\"]*\"|'[^']*'|[!<>]=|\\s+|.","g"),Xb=/^\s/;function H(a,b){return a.ja[a.W+(b||0)]}Ub.prototype.next=function(){return this.ja[this.W++]};Ub.prototype.back=function(){this.W--};Ub.prototype.empty=function(){return this.ja.length<=this.W};function I(a){var b=null,c=a.nodeType;1==c&&(b=a.textContent,b=void 0==b||null==b?a.innerText:b,b=void 0==b||null==b?"":b);if("string"!=typeof b)if(Qb&&"title"==a.nodeName.toLowerCase()&&1==c)b=a.text;else if(9==c||1==c){a=9==c?a.documentElement:a.firstChild;for(var c=0,d=[],b="";a;){do 1!=a.nodeType&&(b+=a.nodeValue),Qb&&"title"==a.nodeName.toLowerCase()&&(b+=a.text),d[c++]=a;while(a=a.firstChild);for(;c&&!(a=d[--c].nextSibling););}}else b=a.nodeValue;return""+b}
function Yb(a,b,c){if(null===b)return!0;try{if(!a.getAttribute)return!1}catch(d){return!1}Rb&&"class"==b&&(b="className");return null==c?!!a.getAttribute(b):a.getAttribute(b,2)==c}function Zb(a,b,c,d,e){return(Qb?$b:ac).call(null,a,b,t(c)?c:null,t(d)?d:null,e||new J)}
function $b(a,b,c,d,e){if(a instanceof bc||8==a.e||c&&null===a.e){var f=b.all;if(!f)return e;a=cc(a);if("*"!=a&&(f=b.getElementsByTagName(a),!f))return e;if(c){for(var g=[],k=0;b=f[k++];)Yb(b,c,d)&&g.push(b);f=g}for(k=0;b=f[k++];)"*"==a&&"!"==b.tagName||e.add(b);return e}dc(a,b,c,d,e);return e}
function ac(a,b,c,d,e){b.getElementsByName&&d&&"name"==c&&!A?(b=b.getElementsByName(d),w(b,function(b){a.matches(b)&&e.add(b)})):b.getElementsByClassName&&d&&"class"==c?(b=b.getElementsByClassName(d),w(b,function(b){b.className==d&&a.matches(b)&&e.add(b)})):a instanceof K?dc(a,b,c,d,e):b.getElementsByTagName&&(b=b.getElementsByTagName(a.getName()),w(b,function(a){Yb(a,c,d)&&e.add(a)}));return e}
function ec(a,b,c,d,e){var f;if((a instanceof bc||8==a.e||c&&null===a.e)&&(f=b.childNodes)){var g=cc(a);if("*"!=g&&(f=qa(f,function(a){return a.tagName&&a.tagName.toLowerCase()==g}),!f))return e;c&&(f=qa(f,function(a){return Yb(a,c,d)}));w(f,function(a){"*"==g&&("!"==a.tagName||"*"==g&&1!=a.nodeType)||e.add(a)});return e}return fc(a,b,c,d,e)}function fc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b);return e}
function dc(a,b,c,d,e){for(b=b.firstChild;b;b=b.nextSibling)Yb(b,c,d)&&a.matches(b)&&e.add(b),dc(a,b,c,d,e)}function cc(a){if(a instanceof K){if(8==a.e)return"!";if(null===a.e)return"*"}return a.getName()};function J(){this.r=this.k=null;this.P=0}function gc(a){this.u=a;this.next=this.G=null}function hc(a,b){if(!a.k)return b;if(!b.k)return a;for(var c=a.k,d=b.k,e=null,f=null,g=0;c&&d;)c.u==d.u||c.u instanceof Sb&&d.u instanceof Sb&&c.u.g==d.u.g?(f=c,c=c.next,d=d.next):0<rb(c.u,d.u)?(f=d,d=d.next):(f=c,c=c.next),(f.G=e)?e.next=f:a.k=f,e=f,g++;for(f=c||d;f;)f.G=e,e=e.next=f,g++,f=f.next;a.r=e;a.P=g;return a}
J.prototype.unshift=function(a){a=new gc(a);a.next=this.k;this.r?this.k.G=a:this.k=this.r=a;this.k=a;this.P++};J.prototype.add=function(a){a=new gc(a);a.G=this.r;this.k?this.r.next=a:this.k=this.r=a;this.r=a;this.P++};function ic(a){return(a=a.k)?a.u:null}J.prototype.t=h("P");function jc(a){return(a=ic(a))?I(a):""}function kc(a,b){return new lc(a,!!b)}function lc(a,b){this.Ea=a;this.ka=(this.J=b)?a.r:a.k;this.ea=null}
lc.prototype.next=function(){var a=this.ka;if(null==a)return null;var b=this.ea=a;this.ka=this.J?a.G:a.next;return b.u};lc.prototype.remove=function(){var a=this.Ea,b=this.ea;if(!b)throw Error("Next must be called at least once before remove.");var c=b.G,b=b.next;c?c.next=b:a.k=b;b?b.G=c:a.r=c;a.P--;this.ea=null};function L(a){this.j=a;this.m=this.w=!1;this.Q=null}function M(a){return"\n "+a.toString().split("\n").join("\n ")}L.prototype.h=h("w");function mc(a,b){a.w=b}function nc(a,b){a.m=b}L.prototype.B=h("Q");function N(a,b){var c=a.evaluate(b);return c instanceof J?+jc(c):+c}function O(a,b){var c=a.evaluate(b);return c instanceof J?jc(c):""+c}function oc(a,b){var c=a.evaluate(b);return c instanceof J?!!c.t():!!c};function pc(a,b,c){L.call(this,a.j);this.ia=a;this.oa=b;this.ta=c;this.w=b.h()||c.h();this.m=b.m||c.m;this.ia==qc&&(c.m||c.h()||4==c.j||0==c.j||!b.B()?b.m||(b.h()||4==b.j||0==b.j||!c.B())||(this.Q={name:c.B().name,K:b}):this.Q={name:b.B().name,K:c})}u(pc,L);
function rc(a,b,c,d,e){b=b.evaluate(d);c=c.evaluate(d);var f;if(b instanceof J&&c instanceof J){e=kc(b);for(d=e.next();d;d=e.next())for(b=kc(c),f=b.next();f;f=b.next())if(a(I(d),I(f)))return!0;return!1}if(b instanceof J||c instanceof J){b instanceof J?e=b:(e=c,c=b);e=kc(e);b=typeof c;for(d=e.next();d;d=e.next()){switch(b){case "number":d=+I(d);break;case "boolean":d=!!I(d);break;case "string":d=I(d);break;default:throw Error("Illegal primitive type for comparison.");}if(a(d,c))return!0}return!1}return e?
"boolean"==typeof b||"boolean"==typeof c?a(!!b,!!c):"number"==typeof b||"number"==typeof c?a(+b,+c):a(b,c):a(+b,+c)}pc.prototype.evaluate=function(a){return this.ia.s(this.oa,this.ta,a)};pc.prototype.toString=function(){var a="Binary Expression: "+this.ia,a=a+M(this.oa);return a+=M(this.ta)};function sc(a,b,c,d){this.Ha=a;this.ra=b;this.j=c;this.s=d}sc.prototype.toString=h("Ha");var tc={};
function P(a,b,c,d){if(tc.hasOwnProperty(a))throw Error("Binary operator already created: "+a);a=new sc(a,b,c,d);return tc[a.toString()]=a}P("div",6,1,function(a,b,c){return N(a,c)/N(b,c)});P("mod",6,1,function(a,b,c){return N(a,c)%N(b,c)});P("*",6,1,function(a,b,c){return N(a,c)*N(b,c)});P("+",5,1,function(a,b,c){return N(a,c)+N(b,c)});P("-",5,1,function(a,b,c){return N(a,c)-N(b,c)});P("<",4,2,function(a,b,c){return rc(function(a,b){return a<b},a,b,c)});
P(">",4,2,function(a,b,c){return rc(function(a,b){return a>b},a,b,c)});P("<=",4,2,function(a,b,c){return rc(function(a,b){return a<=b},a,b,c)});P(">=",4,2,function(a,b,c){return rc(function(a,b){return a>=b},a,b,c)});var qc=P("=",3,2,function(a,b,c){return rc(function(a,b){return a==b},a,b,c,!0)});P("!=",3,2,function(a,b,c){return rc(function(a,b){return a!=b},a,b,c,!0)});P("and",2,2,function(a,b,c){return oc(a,c)&&oc(b,c)});P("or",1,2,function(a,b,c){return oc(a,c)||oc(b,c)});function uc(a,b){if(b.t()&&4!=a.j)throw Error("Primary expression must evaluate to nodeset if filter has predicate(s).");L.call(this,a.j);this.sa=a;this.f=b;this.w=a.h();this.m=a.m}u(uc,L);uc.prototype.evaluate=function(a){a=this.sa.evaluate(a);return vc(this.f,a)};uc.prototype.toString=function(){var a;a="Filter:"+M(this.sa);return a+=M(this.f)};function wc(a,b){if(b.length<a.qa)throw Error("Function "+a.p+" expects at least"+a.qa+" arguments, "+b.length+" given");if(null!==a.fa&&b.length>a.fa)throw Error("Function "+a.p+" expects at most "+a.fa+" arguments, "+b.length+" given");a.Fa&&w(b,function(b,d){if(4!=b.j)throw Error("Argument "+d+" to function "+a.p+" is not of type Nodeset: "+b);});L.call(this,a.j);this.V=a;this.$=b;mc(this,a.w||ta(b,function(a){return a.h()}));nc(this,a.Da&&!b.length||a.Ca&&!!b.length||ta(b,function(a){return a.m}))}
u(wc,L);wc.prototype.evaluate=function(a){return this.V.s.apply(null,xa(a,this.$))};wc.prototype.toString=function(){var a="Function: "+this.V;if(this.$.length)var b=sa(this.$,function(a,b){return a+M(b)},"Arguments:"),a=a+M(b);return a};function xc(a,b,c,d,e,f,g,k,r){this.p=a;this.j=b;this.w=c;this.Da=d;this.Ca=e;this.s=f;this.qa=g;this.fa=p(k)?k:g;this.Fa=!!r}xc.prototype.toString=h("p");var yc={};
function Q(a,b,c,d,e,f,g,k){if(yc.hasOwnProperty(a))throw Error("Function already created: "+a+".");yc[a]=new xc(a,b,c,d,!1,e,f,g,k)}Q("boolean",2,!1,!1,function(a,b){return oc(b,a)},1);Q("ceiling",1,!1,!1,function(a,b){return Math.ceil(N(b,a))},1);Q("concat",3,!1,!1,function(a,b){var c=ya(arguments,1);return sa(c,function(b,c){return b+O(c,a)},"")},2,null);Q("contains",2,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);return-1!=b.indexOf(a)},2);
Q("count",1,!1,!1,function(a,b){return b.evaluate(a).t()},1,1,!0);Q("false",2,!1,!1,aa(!1),0);Q("floor",1,!1,!1,function(a,b){return Math.floor(N(b,a))},1);
Q("id",4,!1,!1,function(a,b){function c(a){if(Qb){var b=e.all[a];if(b){if(b.nodeType&&a==b.id)return b;if(b.length)return va(b,function(b){return a==b.id})}return null}return e.getElementById(a)}var d=a.g,e=9==d.nodeType?d:d.ownerDocument,d=O(b,a).split(/\s+/),f=[];w(d,function(a){(a=c(a))&&!wa(f,a)&&f.push(a)});f.sort(rb);var g=new J;w(f,function(a){g.add(a)});return g},1);Q("lang",2,!1,!1,aa(!1),1);
Q("last",1,!0,!1,function(a){if(1!=arguments.length)throw Error("Function last expects ()");return a.r},0);Q("local-name",3,!1,!0,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("name",3,!1,!0,function(a,b){var c=b?ic(b.evaluate(a)):a.g;return c?c.nodeName.toLowerCase():""},0,1,!0);Q("namespace-uri",3,!0,!1,aa(""),0,1,!0);Q("normalize-space",3,!1,!0,function(a,b){return(b?O(b,a):I(a.g)).replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,"")},0,1);
Q("not",2,!1,!1,function(a,b){return!oc(b,a)},1);Q("number",1,!1,!0,function(a,b){return b?N(b,a):+I(a.g)},0,1);Q("position",1,!0,!1,function(a){return a.Ia},0);Q("round",1,!1,!1,function(a,b){return Math.round(N(b,a))},1);Q("starts-with",2,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);return 0==b.lastIndexOf(a,0)},2);Q("string",3,!1,!0,function(a,b){return b?O(b,a):I(a.g)},0,1);Q("string-length",1,!1,!0,function(a,b){return(b?O(b,a):I(a.g)).length},0,1);
Q("substring",3,!1,!1,function(a,b,c,d){c=N(c,a);if(isNaN(c)||Infinity==c||-Infinity==c)return"";d=d?N(d,a):Infinity;if(isNaN(d)||-Infinity===d)return"";c=Math.round(c)-1;var e=Math.max(c,0);a=O(b,a);if(Infinity==d)return a.substring(e);b=Math.round(d);return a.substring(e,c+b)},2,3);Q("substring-after",3,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);c=b.indexOf(a);return-1==c?"":b.substring(c+a.length)},2);
Q("substring-before",3,!1,!1,function(a,b,c){b=O(b,a);a=O(c,a);a=b.indexOf(a);return-1==a?"":b.substring(0,a)},2);Q("sum",1,!1,!1,function(a,b){for(var c=kc(b.evaluate(a)),d=0,e=c.next();e;e=c.next())d+=+I(e);return d},1,1,!0);Q("translate",3,!1,!1,function(a,b,c,d){b=O(b,a);c=O(c,a);var e=O(d,a);a=[];for(d=0;d<c.length;d++){var f=c.charAt(d);f in a||(a[f]=e.charAt(d))}c="";for(d=0;d<b.length;d++)f=b.charAt(d),c+=f in a?a[f]:f;return c},3);Q("true",2,!1,!1,aa(!0),0);function K(a,b){this.va=a;this.pa=p(b)?b:null;this.e=null;switch(a){case "comment":this.e=8;break;case "text":this.e=mb;break;case "processing-instruction":this.e=7;break;case "node":break;default:throw Error("Unexpected argument");}}function zc(a){return"comment"==a||"text"==a||"processing-instruction"==a||"node"==a}K.prototype.matches=function(a){return null===this.e||this.e==a.nodeType};K.prototype.getName=h("va");
K.prototype.toString=function(){var a="Kind Test: "+this.va;null===this.pa||(a+=M(this.pa));return a};function Ac(a){L.call(this,3);this.ua=a.substring(1,a.length-1)}u(Ac,L);Ac.prototype.evaluate=h("ua");Ac.prototype.toString=function(){return"Literal: "+this.ua};function bc(a,b){this.p=a.toLowerCase();this.ga=b?b.toLowerCase():"http://www.w3.org/1999/xhtml"}bc.prototype.matches=function(a){var b=a.nodeType;return 1!=b&&2!=b?!1:"*"!=this.p&&this.p!=a.nodeName.toLowerCase()?!1:this.ga==(a.namespaceURI?a.namespaceURI.toLowerCase():"http://www.w3.org/1999/xhtml")};bc.prototype.getName=h("p");bc.prototype.toString=function(){return"Name Test: "+("http://www.w3.org/1999/xhtml"==this.ga?"":this.ga+":")+this.p};function Bc(a){L.call(this,1);this.wa=a}u(Bc,L);Bc.prototype.evaluate=h("wa");Bc.prototype.toString=function(){return"Number: "+this.wa};function Cc(a,b){L.call(this,a.j);this.ma=a;this.R=b;this.w=a.h();this.m=a.m;if(1==this.R.length){var c=this.R[0];c.ba||c.A!=Dc||(c=c.Z,"*"!=c.getName()&&(this.Q={name:c.getName(),K:null}))}}u(Cc,L);function Ec(){L.call(this,4)}u(Ec,L);Ec.prototype.evaluate=function(a){var b=new J;a=a.g;9==a.nodeType?b.add(a):b.add(a.ownerDocument);return b};Ec.prototype.toString=aa("Root Helper Expression");function Fc(){L.call(this,4)}u(Fc,L);Fc.prototype.evaluate=function(a){var b=new J;b.add(a.g);return b};
Fc.prototype.toString=aa("Context Helper Expression");
Cc.prototype.evaluate=function(a){var b=this.ma.evaluate(a);if(!(b instanceof J))throw Error("Filter expression must evaluate to nodeset.");a=this.R;for(var c=0,d=a.length;c<d&&b.t();c++){var e=a[c],f=kc(b,e.A.J),g;if(e.h()||e.A!=Gc)if(e.h()||e.A!=Hc)for(g=f.next(),b=e.evaluate(new Pb(g));null!=(g=f.next());)g=e.evaluate(new Pb(g)),b=hc(b,g);else g=f.next(),b=e.evaluate(new Pb(g));else{for(g=f.next();(b=f.next())&&(!g.contains||g.contains(b))&&b.compareDocumentPosition(g)&8;g=b);b=e.evaluate(new Pb(g))}}return b};
Cc.prototype.toString=function(){var a;a="Path Expression:"+M(this.ma);if(this.R.length){var b=sa(this.R,function(a,b){return a+M(b)},"Steps:");a+=M(b)}return a};function Ic(a,b){this.f=a;this.J=!!b}function vc(a,b,c){for(c=c||0;c<a.f.length;c++)for(var d=a.f[c],e=kc(b),f=b.t(),g,k=0;g=e.next();k++){var r=a.J?f-k:k+1;g=d.evaluate(new Pb(g,r,f));if("number"==typeof g)r=r==g;else if("string"==typeof g||"boolean"==typeof g)r=!!g;else if(g instanceof J)r=0<g.t();else throw Error("Predicate.evaluate returned an unexpected type.");r||e.remove()}return b}Ic.prototype.B=function(){return 0<this.f.length?this.f[0].B():null};
Ic.prototype.h=function(){for(var a=0;a<this.f.length;a++){var b=this.f[a];if(b.h()||1==b.j||0==b.j)return!0}return!1};Ic.prototype.t=function(){return this.f.length};Ic.prototype.toString=function(){return sa(this.f,function(a,b){return a+M(b)},"Predicates:")};function Jc(a,b,c,d){L.call(this,4);this.A=a;this.Z=b;this.f=c||new Ic([]);this.ba=!!d;b=this.f.B();a.Ma&&b&&(a=b.name,a=Qb?a.toLowerCase():a,this.Q={name:a,K:b.K});this.w=this.f.h()}u(Jc,L);
Jc.prototype.evaluate=function(a){var b=a.g,c=null,c=this.B(),d=null,e=null,f=0;c&&(d=c.name,e=c.K?O(c.K,a):null,f=1);if(this.ba)if(this.h()||this.A!=Kc)if(a=kc((new Jc(Lc,new K("node"))).evaluate(a)),b=a.next())for(c=this.s(b,d,e,f);null!=(b=a.next());)c=hc(c,this.s(b,d,e,f));else c=new J;else c=Zb(this.Z,b,d,e),c=vc(this.f,c,f);else c=this.s(a.g,d,e,f);return c};Jc.prototype.s=function(a,b,c,d){a=this.A.V(this.Z,a,b,c);return a=vc(this.f,a,d)};
Jc.prototype.toString=function(){var a;a="Step:"+M("Operator: "+(this.ba?"//":"/"));this.A.p&&(a+=M("Axis: "+this.A));a+=M(this.Z);if(this.f.t()){var b=sa(this.f.f,function(a,b){return a+M(b)},"Predicates:");a+=M(b)}return a};function Mc(a,b,c,d){this.p=a;this.V=b;this.J=c;this.Ma=d}Mc.prototype.toString=h("p");var Nc={};function R(a,b,c,d){if(Nc.hasOwnProperty(a))throw Error("Axis already created: "+a);b=new Mc(a,b,c,!!d);return Nc[a]=b}
R("ancestor",function(a,b){for(var c=new J,d=b;d=d.parentNode;)a.matches(d)&&c.unshift(d);return c},!0);R("ancestor-or-self",function(a,b){var c=new J,d=b;do a.matches(d)&&c.unshift(d);while(d=d.parentNode);return c},!0);
var Dc=R("attribute",function(a,b){var c=new J,d=a.getName();if("style"==d&&b.style&&Qb)return c.add(new Sb(b.style,b,"style",b.style.cssText,b.sourceIndex)),c;var e=b.attributes;if(e)if(a instanceof K&&null===a.e||"*"==d)for(var d=b.sourceIndex,f=0,g;g=e[f];f++)Qb?g.nodeValue&&c.add(Tb(b,g,d)):c.add(g);else(g=e.getNamedItem(d))&&(Qb?g.nodeValue&&c.add(Tb(b,g,b.sourceIndex)):c.add(g));return c},!1),Kc=R("child",function(a,b,c,d,e){return(Qb?ec:fc).call(null,a,b,t(c)?c:null,t(d)?d:null,e||new J)},
!1,!0);R("descendant",Zb,!1,!0);var Lc=R("descendant-or-self",function(a,b,c,d){var e=new J;Yb(b,c,d)&&a.matches(b)&&e.add(b);return Zb(a,b,c,d,e)},!1,!0),Gc=R("following",function(a,b,c,d){var e=new J;do for(var f=b;f=f.nextSibling;)Yb(f,c,d)&&a.matches(f)&&e.add(f),e=Zb(a,f,c,d,e);while(b=b.parentNode);return e},!1,!0);R("following-sibling",function(a,b){for(var c=new J,d=b;d=d.nextSibling;)a.matches(d)&&c.add(d);return c},!1);R("namespace",function(){return new J},!1);
var Oc=R("parent",function(a,b){var c=new J;if(9==b.nodeType)return c;if(2==b.nodeType)return c.add(b.ownerElement),c;var d=b.parentNode;a.matches(d)&&c.add(d);return c},!1),Hc=R("preceding",function(a,b,c,d){var e=new J,f=[];do f.unshift(b);while(b=b.parentNode);for(var g=1,k=f.length;g<k;g++){var r=[];for(b=f[g];b=b.previousSibling;)r.unshift(b);for(var s=0,z=r.length;s<z;s++)b=r[s],Yb(b,c,d)&&a.matches(b)&&e.add(b),e=Zb(a,b,c,d,e)}return e},!0,!0);
R("preceding-sibling",function(a,b){for(var c=new J,d=b;d=d.previousSibling;)a.matches(d)&&c.unshift(d);return c},!0);var Pc=R("self",function(a,b){var c=new J;a.matches(b)&&c.add(b);return c},!1);function Qc(a){L.call(this,1);this.la=a;this.w=a.h();this.m=a.m}u(Qc,L);Qc.prototype.evaluate=function(a){return-N(this.la,a)};Qc.prototype.toString=function(){return"Unary Expression: -"+M(this.la)};function Rc(a){L.call(this,4);this.X=a;mc(this,ta(this.X,function(a){return a.h()}));nc(this,ta(this.X,function(a){return a.m}))}u(Rc,L);Rc.prototype.evaluate=function(a){var b=new J;w(this.X,function(c){c=c.evaluate(a);if(!(c instanceof J))throw Error("Path expression must evaluate to NodeSet.");b=hc(b,c)});return b};Rc.prototype.toString=function(){return sa(this.X,function(a,b){return a+M(b)},"Union Expression:")};function Sc(a,b){this.a=a;this.Ga=b}function Tc(a){for(var b,c=[];;){S(a,"Missing right hand side of binary expression.");b=Uc(a);var d=a.a.next();if(!d)break;var e=(d=tc[d]||null)&&d.ra;if(!e){a.a.back();break}for(;c.length&&e<=c[c.length-1].ra;)b=new pc(c.pop(),c.pop(),b);c.push(b,d)}for(;c.length;)b=new pc(c.pop(),c.pop(),b);return b}function S(a,b){if(a.a.empty())throw Error(b);}function Vc(a,b){var c=a.a.next();if(c!=b)throw Error("Bad token, expected: "+b+" got: "+c);}
function Wc(a){a=a.a.next();if(")"!=a)throw Error("Bad token: "+a);}function Xc(a){a=a.a.next();if(2>a.length)throw Error("Unclosed literal string");return new Ac(a)}function Yc(a){var b=a.a.next(),c=b.indexOf(":");if(-1==c)return new bc(b);var d=b.substring(0,c);a=a.Ga(d);if(!a)throw Error("Namespace prefix not declared: "+d);b=b.substr(c+1);return new bc(b,a)}
function Zc(a){var b,c=[],d;if("/"==H(a.a)||"//"==H(a.a)){b=a.a.next();d=H(a.a);if("/"==b&&(a.a.empty()||"."!=d&&".."!=d&&"@"!=d&&"*"!=d&&!/(?![0-9])[\w]/.test(d)))return new Ec;d=new Ec;S(a,"Missing next location step.");b=$c(a,b);c.push(b)}else{a:{b=H(a.a);d=b.charAt(0);switch(d){case "$":throw Error("Variable reference not allowed in HTML XPath");case "(":a.a.next();b=Tc(a);S(a,'unclosed "("');Vc(a,")");break;case '"':case "'":b=Xc(a);break;default:if(isNaN(+b))if(!zc(b)&&/(?![0-9])[\w]/.test(d)&&
"("==H(a.a,1)){b=a.a.next();b=yc[b]||null;a.a.next();for(d=[];")"!=H(a.a);){S(a,"Missing function argument list.");d.push(Tc(a));if(","!=H(a.a))break;a.a.next()}S(a,"Unclosed function argument list.");Wc(a);b=new wc(b,d)}else{b=null;break a}else b=new Bc(+a.a.next())}"["==H(a.a)&&(d=new Ic(ad(a)),b=new uc(b,d))}if(b)if("/"==H(a.a)||"//"==H(a.a))d=b;else return b;else b=$c(a,"/"),d=new Fc,c.push(b)}for(;"/"==H(a.a)||"//"==H(a.a);)b=a.a.next(),S(a,"Missing next location step."),b=$c(a,b),c.push(b);
return new Cc(d,c)}
function $c(a,b){var c,d,e;if("/"!=b&&"//"!=b)throw Error('Step op should be "/" or "//"');if("."==H(a.a))return d=new Jc(Pc,new K("node")),a.a.next(),d;if(".."==H(a.a))return d=new Jc(Oc,new K("node")),a.a.next(),d;var f;if("@"==H(a.a))f=Dc,a.a.next(),S(a,"Missing attribute name");else if("::"==H(a.a,1)){if(!/(?![0-9])[\w]/.test(H(a.a).charAt(0)))throw Error("Bad token: "+a.a.next());c=a.a.next();f=Nc[c]||null;if(!f)throw Error("No axis with name: "+c);a.a.next();S(a,"Missing node name")}else f=Kc;
c=H(a.a);if(/(?![0-9])[\w]/.test(c.charAt(0)))if("("==H(a.a,1)){if(!zc(c))throw Error("Invalid node type: "+c);c=a.a.next();if(!zc(c))throw Error("Invalid type name: "+c);Vc(a,"(");S(a,"Bad nodetype");e=H(a.a).charAt(0);var g=null;if('"'==e||"'"==e)g=Xc(a);S(a,"Bad nodetype");Wc(a);c=new K(c,g)}else c=Yc(a);else if("*"==c)c=Yc(a);else throw Error("Bad token: "+a.a.next());e=new Ic(ad(a),f.J);return d||new Jc(f,c,e,"//"==b)}
function ad(a){for(var b=[];"["==H(a.a);){a.a.next();S(a,"Missing predicate expression.");var c=Tc(a);b.push(c);S(a,"Unclosed predicate expression.");Vc(a,"]")}return b}function Uc(a){if("-"==H(a.a))return a.a.next(),new Qc(Uc(a));var b=Zc(a);if("|"!=H(a.a))a=b;else{for(b=[b];"|"==a.a.next();)S(a,"Missing next union location path."),b.push(Zc(a));a.a.back();a=new Rc(b)}return a};function bd(a){switch(a.nodeType){case 1:return ka(cd,a);case 9:return bd(a.documentElement);case 2:return a.ownerElement?bd(a.ownerElement):dd;case 11:case 10:case 6:case 12:return dd;default:return a.parentNode?bd(a.parentNode):dd}}function dd(){return null}function cd(a,b){if(a.prefix==b)return a.namespaceURI||"http://www.w3.org/1999/xhtml";var c=a.getAttributeNode("xmlns:"+b);return c&&c.specified?c.value||null:a.parentNode&&9!=a.parentNode.nodeType?cd(a.parentNode,b):null};function ed(a,b){if(!a.length)throw Error("Empty XPath expression.");var c=Vb(a);if(c.empty())throw Error("Invalid XPath expression.");b?fa(b)||(b=ja(b.lookupNamespaceURI,b)):b=aa(null);var d=Tc(new Sc(c,b));if(!c.empty())throw Error("Bad token: "+c.next());this.evaluate=function(a,b){var c=d.evaluate(new Pb(a));return new T(c,b)}}
function T(a,b){if(0==b)if(a instanceof J)b=4;else if("string"==typeof a)b=2;else if("number"==typeof a)b=1;else if("boolean"==typeof a)b=3;else throw Error("Unexpected evaluation result.");if(2!=b&&1!=b&&3!=b&&!(a instanceof J))throw Error("value could not be converted to the specified type");this.resultType=b;var c;switch(b){case 2:this.stringValue=a instanceof J?jc(a):""+a;break;case 1:this.numberValue=a instanceof J?+jc(a):+a;break;case 3:this.booleanValue=a instanceof J?0<a.t():!!a;break;case 4:case 5:case 6:case 7:var d=
kc(a);c=[];for(var e=d.next();e;e=d.next())c.push(e instanceof Sb?e.g:e);this.snapshotLength=a.t();this.invalidIteratorState=!1;break;case 8:case 9:d=ic(a);this.singleNodeValue=d instanceof Sb?d.g:d;break;default:throw Error("Unknown XPathResult type.");}var f=0;this.iterateNext=function(){if(4!=b&&5!=b)throw Error("iterateNext called with wrong result type");return f>=c.length?null:c[f++]};this.snapshotItem=function(a){if(6!=b&&7!=b)throw Error("snapshotItem called with wrong result type");return a>=
c.length||0>a?null:c[a]}}T.ANY_TYPE=0;T.NUMBER_TYPE=1;T.STRING_TYPE=2;T.BOOLEAN_TYPE=3;T.UNORDERED_NODE_ITERATOR_TYPE=4;T.ORDERED_NODE_ITERATOR_TYPE=5;T.UNORDERED_NODE_SNAPSHOT_TYPE=6;T.ORDERED_NODE_SNAPSHOT_TYPE=7;T.ANY_UNORDERED_NODE_TYPE=8;T.FIRST_ORDERED_NODE_TYPE=9;function fd(a){this.lookupNamespaceURI=bd(a)}
function gd(a){a=a||n;var b=a.document;b.evaluate||(a.XPathResult=T,b.evaluate=function(a,b,e,f){return(new ed(a,e)).evaluate(b,f)},b.createExpression=function(a,b){return new ed(a,b)},b.createNSResolver=function(a){return new fd(a)})};var U={};U.ya=function(){var a={Ua:"http://www.w3.org/2000/svg"};return function(b){return a[b]||null}}();U.s=function(a,b,c){var d=G(a);(A||Mb)&&gd(F(d));try{var e=d.createNSResolver?d.createNSResolver(d.documentElement):U.ya;return A&&!eb(7)?d.evaluate.call(d,b,a,e,c,null):d.evaluate(b,a,e,c,null)}catch(f){if(!B||"NS_ERROR_ILLEGAL_VALUE"!=f.name)throw new x(32,"Unable to locate an element with the xpath expression "+b+" because of the following error:\n"+f);}};
U.aa=function(a,b){if(!a||1!=a.nodeType)throw new x(32,'The result of the xpath expression "'+b+'" is: '+a+". It should be an element.");};U.La=function(a,b){var c=function(){var c=U.s(b,a,9);return c?(c=c.singleNodeValue,y?c:c||null):b.selectSingleNode?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectSingleNode(a)):null}();null===c||U.aa(c,a);return c};
U.Qa=function(a,b){var c=function(){var c=U.s(b,a,7);if(c){var e=c.snapshotLength;y&&!p(e)&&U.aa(null,a);for(var f=[],g=0;g<e;++g)f.push(c.snapshotItem(g));return f}return b.selectNodes?(c=G(b),c.setProperty&&c.setProperty("SelectionLanguage","XPath"),b.selectNodes(a)):[]}();w(c,function(b){U.aa(b,a)});return c};function hd(a){return(a=a.exec(Na()))?a[1]:""}var id=function(){if(Ib)return hd(/Firefox\/([0-9.]+)/);if(A||y)return Va;if(Nb)return hd(/Chrome\/([0-9.]+)/);if(Ob)return hd(/Version\/([0-9.]+)/);if(Kb||Lb){var a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Na());if(a)return a[1]+"."+a[2]}else{if(Mb)return(a=hd(/Android\s+([0-9.]+)/))?a:hd(/Version\/([0-9.]+)/);if(Jb)return hd(/Camino\/([0-9.]+)/)}return""}();var jd,kd;function V(a){return ld?jd(a):A?0<=na(fb,a):eb(a)}function md(a){return ld?kd(a):Mb?0<=na(nd,a):0<=na(id,a)}
var ld=function(){if(!B)return!1;var a=n.Components;if(!a)return!1;try{if(!a.classes)return!1}catch(b){return!1}var c=a.classes,a=a.interfaces,d=c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator),c=c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo),e=c.platformVersion,f=c.version;jd=function(a){return 0<=d.Aa(e,""+a)};kd=function(a){return 0<=d.Aa(f,""+a)};return!0}(),od=Lb||Kb,pd;if(Mb){var qd=/Android\s+([0-9\.]+)/.exec(Na());pd=qd?qd[1]:"0"}else pd="0";
var nd=pd,rd=A&&!C(8),sd=A&&!C(9),td=C(10),ud=A&&!C(10);Mb&&md(2.3);Mb&&md(4);Ob&&md(6);var vd=A&&-1!=Na().indexOf("IEMobile");function wd(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d}m=wd.prototype;m.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};m.contains=function(a){return this&&a?a instanceof wd?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};
m.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};m.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};m.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
m.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.right*=a;this.top*=c;this.bottom*=c;return this};function W(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}m=W.prototype;m.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};m.contains=function(a){return a instanceof W?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};
m.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};m.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};m.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
m.scale=function(a,b){var c=ea(b)?b:a;this.left*=a;this.width*=a;this.top*=c;this.height*=c;return this};function xd(a,b){var c=G(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,null))?c[b]||c.getPropertyValue(b)||"":""}function yd(a){a=a?G(a):document;var b;(b=!A)||(b=C(9))||(b=a?new yb(G(a)):hb||(hb=new yb),b=ob(b.F));return b?a.documentElement:a.body}
function zd(a){var b=a.offsetWidth,c=a.offsetHeight,d=Qa&&!b&&!c;if((!p(b)||d)&&a.getBoundingClientRect){var e;a:{try{e=a.getBoundingClientRect()}catch(f){e={left:0,top:0,right:0,bottom:0};break a}A&&a.ownerDocument.body&&(a=a.ownerDocument,e.left-=a.documentElement.clientLeft+a.body.clientLeft,e.top-=a.documentElement.clientTop+a.body.clientTop)}return new ib(e.right-e.left,e.bottom-e.top)}return new ib(b,c)}var Ad={thin:2,medium:4,thick:6};
function Bd(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null,d;if(c in Ad)d=Ad[c];else if(/^\d+px?$/.test(c))d=parseInt(c,10);else{d=a.style.left;var e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=d;a.runtimeStyle.left=e;d=c}return d};function Cd(a){var b;a:{a=G(a);try{b=a&&a.activeElement;break a}catch(c){}b=null}return A&&b&&"undefined"===typeof b.nodeType?null:b}function X(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}function Dd(a){return Ed(a,!0)&&Fd(a)&&!(A||y||B&&!V("1.9.2")?0:"none"==Y(a,"pointer-events"))}function Gd(a){return X(a,"OPTION")?!0:X(a,"INPUT")?(a=a.type.toLowerCase(),"checkbox"==a||"radio"==a):!1}
function Hd(a){if(!Gd(a))throw new x(15,"Element is not selectable");var b="selected",c=a.type&&a.type.toLowerCase();if("checkbox"==c||"radio"==c)b="checked";return!!Id(a,b)}function Id(a,b){var c;if(c=rd)if(c="value"==b)if(c=X(a,"OPTION"))c=null===Jd(a);c?(c=[],wb(a,c,!1),c=c.join("")):c=a[b];return c}var Kd=/[;]+(?=(?:(?:[^"]*"){2})*[^"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\([^()]*\))*[^()]*$)/;
function Ld(a){var b=[];w(a.split(Kd),function(a){var d=a.indexOf(":");0<d&&(a=[a.slice(0,d),a.slice(d+1)],2==a.length&&b.push(a[0].toLowerCase(),":",a[1],";"))});b=b.join("");b=";"==b.charAt(b.length-1)?b:b+";";return y?b.replace(/\w+:;/g,""):b}function Jd(a){var b;b="value";return"style"==b?Ld(a.style.cssText):rd&&"value"==b&&X(a,"INPUT")?a.value:sd&&!0===a[b]?String(a.getAttribute(b)):(a=a.getAttributeNode(b))&&a.specified?a.value:null}var Md="BUTTON INPUT OPTGROUP OPTION SELECT TEXTAREA".split(" ");
function Fd(a){var b=a.tagName.toUpperCase();return wa(Md,b)?Id(a,"disabled")?!1:a.parentNode&&1==a.parentNode.nodeType&&"OPTGROUP"==b||"OPTION"==b?Fd(a.parentNode):!xb(a,function(a){var b=a.parentNode;if(b&&X(b,"FIELDSET")&&Id(b,"disabled")){if(!X(a,"LEGEND"))return!0;for(;a=void 0!=a.previousElementSibling?a.previousElementSibling:pb(a.previousSibling);)if(X(a,"LEGEND"))return!0}return!1},!0):!0}
function Nd(a){for(a=a.parentNode;a&&1!=a.nodeType&&9!=a.nodeType&&11!=a.nodeType;)a=a.parentNode;return X(a)?a:null}
function Y(a,b){var c=oa(b);if("float"==c||"cssFloat"==c||"styleFloat"==c)c=sd?"styleFloat":"cssFloat";var d=xd(a,c)||Od(a,c);if(null===d)d=null;else if(wa(Aa,c)){b:{var e=d.match(Da);if(e){var c=Number(e[1]),f=Number(e[2]),g=Number(e[3]),e=Number(e[4]);if(0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g&&0<=e&&1>=e){c=[c,f,g,e];break b}}c=null}if(!c){b:{if(g=d.match(Ea))if(c=Number(g[1]),f=Number(g[2]),g=Number(g[3]),0<=c&&255>=c&&0<=f&&255>=f&&0<=g&&255>=g){c=[c,f,g,1];break b}c=null}if(!c)b:{c=d.toLowerCase();
f=za[c.toLowerCase()];if(!f&&(f="#"==c.charAt(0)?c:"#"+c,4==f.length&&(f=f.replace(Ba,"#$1$1$2$2$3$3")),!Ca.test(f))){c=null;break b}c=[parseInt(f.substr(1,2),16),parseInt(f.substr(3,2),16),parseInt(f.substr(5,2),16),1]}}d=c?"rgba("+c.join(", ")+")":d}return d}function Od(a,b){var c=a.currentStyle||a.style,d=c[b];!p(d)&&fa(c.getPropertyValue)&&(d=c.getPropertyValue(b));return"inherit"!=d?p(d)?d:null:(c=Nd(a))?Od(c,b):null}
function Ed(a,b){function c(a){if("none"==Y(a,"display"))return!1;a=Nd(a);return!a||c(a)}function d(a){var b=Pd(a);return 0<b.height&&0<b.width?!0:X(a,"PATH")&&(0<b.height||0<b.width)?(a=Y(a,"stroke-width"),!!a&&0<parseInt(a,10)):"hidden"!=Y(a,"overflow")&&ta(a.childNodes,function(a){return a.nodeType==mb||X(a)&&d(a)})}function e(a){return Qd(a)==Rd&&ua(a.childNodes,function(a){return!X(a)||e(a)})}if(!X(a))throw Error("Argument to isShown must be of type Element");if(X(a,"OPTION")||X(a,"OPTGROUP")){var f=
xb(a,function(a){return X(a,"SELECT")});return!!f&&Ed(f,!0)}return(f=Sd(a))?!!f.na&&0<f.rect.width&&0<f.rect.height&&Ed(f.na,b):X(a,"INPUT")&&"hidden"==a.type.toLowerCase()||X(a,"NOSCRIPT")||"hidden"==Y(a,"visibility")||!c(a)||!b&&0==Td(a)||!d(a)?!1:!e(a)}var Rd="hidden";
function Qd(a,b){function c(a){var b=Y(a,"position");if("fixed"==b)return z=!0,a==k?null:k;for(a=Nd(a);a&&a!=k&&(0==Y(a,"display").lastIndexOf("inline",0)||"absolute"==b&&"static"==Y(a,"position"));)a=Nd(a);return a}function d(a){var b=a;if("visible"==s)if(a==k&&r)b=r;else if(a==r)return{x:"visible",y:"visible"};b={x:Y(b,"overflow-x"),y:Y(b,"overflow-y")};a==k&&(b.x="visible"==b.x?"auto":b.x,b.y="visible"==b.y?"auto":b.y);return b}function e(a){if(a==k){var b=(new yb(g)).F;a=!Qa&&ob(b)?b.documentElement:
b.body||b.documentElement;b=b.parentWindow||b.defaultView;a=A&&eb("10")&&b.pageYOffset!=a.scrollTop?new E(a.scrollLeft,a.scrollTop):new E(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}else a=new E(a.scrollLeft,a.scrollTop);return a}for(var f=Ud(a,b),g=G(a),k=g.documentElement,r=g.body,s=Y(k,"overflow"),z,q=c(a);q;q=c(q)){var l=d(q);if("visible"!=l.x||"visible"!=l.y){var v=Pd(q);if(0==v.width||0==v.height)return Rd;var D=f.right<v.left,ba=f.bottom<v.top;if(D&&"hidden"==l.x||ba&&"hidden"==
l.y)return Rd;if(D&&"visible"!=l.x||ba&&"visible"!=l.y){D=e(q);ba=f.bottom<v.top-D.y;if(f.right<v.left-D.x&&"visible"!=l.x||ba&&"visible"!=l.x)return Rd;f=Qd(q);return f==Rd?Rd:"scroll"}D=f.left>=v.left+v.width;v=f.top>=v.top+v.height;if(D&&"hidden"==l.x||v&&"hidden"==l.y)return Rd;if(D&&"visible"!=l.x||v&&"visible"!=l.y){if(z&&(l=e(q),f.left>=k.scrollWidth-l.x||f.right>=k.scrollHeight-l.y))return Rd;f=Qd(q);return f==Rd?Rd:"scroll"}}}return"none"}var Vd=RegExp("matrix\\(([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+), ([\\d\\.\\-]+)(?:px)?, ([\\d\\.\\-]+)(?:px)?\\)");
function Pd(a){function b(a){var c=F(G(a)).getComputedStyle(a,null).MozTransform.match(Vd);if(c){var d=parseFloat(c[1]),e=parseFloat(c[2]),z=parseFloat(c[3]),q=parseFloat(c[4]),l=parseFloat(c[5]),c=parseFloat(c[6]),v=f.left+f.width,D=f.top+f.height,ba=f.left*d,d=v*d,Wa=f.left*e,e=v*e,Xa=f.top*z,z=D*z,Ya=f.top*q,v=D*q,D=ba+Xa+l,q=Wa+Ya+c,Xa=d+Xa+l,Ya=e+Ya+c,ba=ba+z+l,Wa=Wa+v+c,l=d+z+l,c=e+v+c;f.left=Math.min(D,Xa,ba,l);f.top=Math.min(q,Ya,Wa,c);l=Math.max(D,Xa,ba,l);c=Math.max(q,Ya,Wa,c);f.width=l-
f.left;f.height=c-f.top}(a=Nd(a))&&b(a)}var c=Sd(a);if(c)return c.rect;if(X(a,"HTML"))return c=G(a),a=nb(F(c)||window),new W(0,0,a.width,a.height);var d;try{d=a.getBoundingClientRect()}catch(e){return new W(0,0,0,0)}var f=new W(d.left,d.top,d.right-d.left,d.bottom-d.top);A&&a.ownerDocument.body&&(c=G(a),f.left-=c.documentElement.clientLeft+c.body.clientLeft,f.top-=c.documentElement.clientTop+c.body.clientTop);y&&(0==f.width&&0<a.offsetWidth&&(f.width=a.offsetWidth),0==f.height&&0<a.offsetHeight&&
(f.height=a.offsetHeight));B&&!V(12)&&b(a);return f}
function Sd(a){var b=X(a,"MAP");if(!b&&!X(a,"AREA"))return null;var c=b?a:X(a.parentNode,"MAP")?a.parentNode:null,d=null,e=null;if(c&&c.name&&(d=U.La('/descendant::*[@usemap = "#'+c.name+'"]',G(c)))&&(e=Pd(d),!b&&"default"!=a.shape.toLowerCase())){var f=Wd(a);a=Math.min(Math.max(f.left,0),e.width);b=Math.min(Math.max(f.top,0),e.height);c=Math.min(f.width,e.width-a);f=Math.min(f.height,e.height-b);e=new W(a+e.left,b+e.top,c,f)}return{na:d,rect:e||new W(0,0,0,0)}}
function Wd(a){var b=a.shape.toLowerCase();a=a.coords.split(",");if("rect"==b&&4==a.length){var b=a[0],c=a[1];return new W(b,c,a[2]-b,a[3]-c)}if("circle"==b&&3==a.length)return b=a[2],new W(a[0]-b,a[1]-b,2*b,2*b);if("poly"==b&&2<a.length){for(var b=a[0],c=a[1],d=b,e=c,f=2;f+1<a.length;f+=2)b=Math.min(b,a[f]),d=Math.max(d,a[f]),c=Math.min(c,a[f+1]),e=Math.max(e,a[f+1]);return new W(b,c,d-b,e-c)}return new W(0,0,0,0)}
function Ud(a,b){var c;c=Pd(a);c=new wd(c.top,c.left+c.width,c.top+c.height,c.left);if(b){var d=b instanceof W?b:new W(b.x,b.y,1,1);c.left=Math.min(Math.max(c.left+d.left,c.left),c.right);c.top=Math.min(Math.max(c.top+d.top,c.top),c.bottom);c.right=Math.min(Math.max(c.left+d.width,c.left),c.right);c.bottom=Math.min(Math.max(c.top+d.height,c.top),c.bottom)}return c}
function Td(a){if(ud){if("relative"==Y(a,"position"))return 1;a=Y(a,"filter");return(a=a.match(/^alpha\(opacity=(\d*)\)/)||a.match(/^progid:DXImageTransform.Microsoft.Alpha\(Opacity=(\d*)\)/))?Number(a[1])/100:1}return Xd(a)}function Xd(a){var b=1,c=Y(a,"opacity");c&&(b=Number(c));(a=Nd(a))&&(b*=Xd(a));return b};function Yd(a,b){this.d=ma.document.documentElement;this.n=null;var c=Cd(this.d);c&&Zd(this,c);this.D=a||new $d;this.ca=b||new ae}Yd.prototype.I=h("d");function Zd(a,b){a.d=b;a.n=X(b,"OPTION")?xb(b,function(a){return X(a,"SELECT")}):null}
Yd.prototype.o=function(a,b,c,d,e,f,g){if(!f&&!Dd(this.d))return!1;if(d&&be!=a&&ce!=a)throw new x(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),wheelDelta:e||0,relatedTarget:d||null};g=g||1;c=this.d;a!=de&&a!=ee&&g in fe?c=fe[g]:this.n&&(c=ge(this,a));return c?this.ca.o(c,a,b):!0};
Yd.prototype.da=function(a,b,c,d,e){function f(b,c){var d={identifier:b,screenX:c.x,screenY:c.y,clientX:c.x,clientY:c.y,pageX:c.x,pageY:c.y};g.changedTouches.push(d);if(a==he||a==ie)g.touches.push(d),g.targetTouches.push(d)}var g={touches:[],targetTouches:[],changedTouches:[],altKey:this.D.l(4),ctrlKey:this.D.l(2),shiftKey:this.D.l(1),metaKey:this.D.l(8),relatedTarget:null,scale:0,rotation:0};f(b,c);p(d)&&f(d,e);return this.ca.da(this.d,a,g)};
Yd.prototype.q=function(a,b,c,d,e,f,g,k){if(!k&&!Dd(this.d))return!1;if(g&&je!=a&&ke!=a)throw new x(12,"Event type does not allow related target: "+a);b={clientX:b.x,clientY:b.y,button:c,altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,relatedTarget:g||null,width:0,height:0,Ka:0,rotation:0,pointerId:d,Na:0,Oa:0,pointerType:e,Ba:f};c=this.n?ge(this,a):this.d;fe[d]&&(c=fe[d]);d=F(G(this.d));var r;d&&a==le&&(r=d.Element.prototype.msSetPointerCapture,d.Element.prototype.msSetPointerCapture=function(a){fe[a]=
this});a=c?this.ca.q(c,a,b):!0;r&&(d.Element.prototype.msSetPointerCapture=r);return a};function ge(a,b){if(A)switch(b){case be:case je:return null;case me:case ne:case oe:return a.n.multiple?a.n:null;default:return a.n}if(y)switch(b){case me:case be:return a.n.multiple?a.d:null;default:return a.d}if(Qa)switch(b){case de:case pe:return a.n.multiple?a.d:a.n;default:return a.n.multiple?a.d:null}return a.d}
function qe(a,b,c){if(Dd(a.d)){var d=null,e=null;if(!re)for(var f=a.d;f;f=f.parentNode)if(X(f,"A")){d=f;break}else{var g;a:{if(X(f,"INPUT")&&(g=f.type.toLowerCase(),"submit"==g||"image"==g)){g=!0;break a}if(X(f,"BUTTON")&&(g=f.type.toLowerCase(),"submit"==g)){g=!0;break a}g=!1}if(g){e=f;break}}g=(f=!a.n&&Gd(a.d))&&Hd(a.d);A&&e?e.click():a.o(de,b,0,null,0,!1,c)&&(d&&se(d)?(a=d,b=a.href,c=F(G(a)),A&&!V(8)&&(b=te(c.location,b)),a.target?c.open(b,a.target):c.location.href=b):!f||(B||Qa||g&&"radio"==a.d.type.toLowerCase())||
(a.d.checked=!g,y&&!V(11)&&ue(a.d,ve)))}}function we(a){a=a.n||a.d;var b=Cd(a);if(a!=b){if(b&&(fa(b.blur)||A&&ga(b.blur))){if(!X(b,"BODY"))try{b.blur()}catch(c){if(!A||"Unspecified error."!=c.message)throw c;}A&&!V(8)&&F(G(a)).focus()}if(fa(a.focus)||A&&ga(a.focus))y&&V(11)&&!Ed(a)?ue(a,xe):a.focus()}}var re=Qa||y||ld&&md(3.6);
function se(a){if(re||!a.href)return!1;if(!ld)return!0;if(a.target||0==a.href.toLowerCase().indexOf("javascript"))return!1;var b=F(G(a)),c=b.location.href;a=te(b.location,a.href);return c.split("#")[0]!==a.split("#")[0]}function ye(a){if(a.n&&Dd(a.d)){var b=a.n,c=Hd(a.d);if(!c||b.multiple)a.d.selected=!c,(!Qa||!b.multiple||Nb&&md(28)||Mb&&md(4))&&ue(b,ve)}}var ze=/^([^:/?#.]+:)?(?:\/\/([^/]*))?([^?#]+)?(\?[^#]*)?(#.*)?$/;
function te(a,b){var c=b.match(ze);if(!c)return"";var d=c[1]||"",e=c[2]||"",f=c[3]||"",g=c[4]||"",c=c[5]||"";if(!d&&(d=a.protocol,!e))if(e=a.host,!f)f=a.pathname,g=g||a.search;else if("/"!=f.charAt(0)){var k=a.pathname.lastIndexOf("/");-1!=k&&(f=a.pathname.substr(0,k+1)+f)}return d+"//"+e+f+g+c}function $d(){this.Ja=0}$d.prototype.l=function(a){return 0!=(this.Ja&a)};var fe={};function ae(){}ae.prototype.o=function(a,b,c){return ue(a,b,c)};ae.prototype.da=function(a,b,c){return ue(a,b,c)};
ae.prototype.q=function(a,b,c){return ue(a,b,c)};var Ae=!(A&&!V(10))&&!y,Be=Mb?!md(4):!od,Ce=A&&ma.navigator.msPointerEnabled;function De(a,b,c){this.e=a;this.L=b;this.M=c}De.prototype.create=function(a){a=G(a);sd?a=a.createEventObject():(a=a.createEvent("HTMLEvents"),a.initEvent(this.e,this.L,this.M));return a};De.prototype.toString=h("e");function Z(a,b,c){De.call(this,a,b,c)}u(Z,De);
Z.prototype.create=function(a,b){if(!B&&this==Ee)throw new x(9,"Browser does not support a mouse pixel scroll event.");var c=G(a),d;if(sd){d=c.createEventObject();d.altKey=b.altKey;d.ctrlKey=b.ctrlKey;d.metaKey=b.metaKey;d.shiftKey=b.shiftKey;d.button=b.button;d.clientX=b.clientX;d.clientY=b.clientY;c=function(a,b){Object.defineProperty(d,a,{get:function(){return b}})};if(this==ce||this==be)if(Object.defineProperty){var e=this==ce;c("fromElement",e?a:b.relatedTarget);c("toElement",e?b.relatedTarget:
a)}else d.relatedTarget=b.relatedTarget;this==Fe&&(Object.defineProperty?c("wheelDelta",b.wheelDelta):d.detail=b.wheelDelta)}else{e=F(c);d=c.createEvent("MouseEvents");var f=1;this==Fe&&(B||(d.wheelDelta=b.wheelDelta),B||y)&&(f=b.wheelDelta/-40);B&&this==Ee&&(f=b.wheelDelta);d.initMouseEvent(this.e,this.L,this.M,e,f,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);if(A&&0===d.pageX&&0===d.pageY&&Object.defineProperty){var e=zb(a?new yb(G(a)):hb||(hb=new yb)),
c=yd(c),g=b.clientX+e.scrollLeft-c.clientLeft,k=b.clientY+e.scrollTop-c.clientTop;Object.defineProperty(d,"pageX",{get:function(){return g}});Object.defineProperty(d,"pageY",{get:function(){return k}})}}return d};function Ge(a,b,c){De.call(this,a,b,c)}u(Ge,De);
Ge.prototype.create=function(a,b){function c(b){b=ra(b,function(b){return e.createTouch(f,a,b.identifier,b.pageX,b.pageY,b.screenX,b.screenY)});return e.createTouchList.apply(e,b)}function d(b){var c=ra(b,function(b){return{identifier:b.identifier,screenX:b.screenX,screenY:b.screenY,clientX:b.clientX,clientY:b.clientY,pageX:b.pageX,pageY:b.pageY,target:a}});c.item=function(a){return c[a]};return c}if(!Ae)throw new x(9,"Browser does not support firing touch events.");var e=G(a),f=F(e),g=Be?d(b.changedTouches):
c(b.changedTouches),k=b.touches==b.changedTouches?g:Be?d(b.touches):c(b.touches),r=b.targetTouches==b.changedTouches?g:Be?d(b.targetTouches):c(b.targetTouches),s;Be?(s=e.createEvent("MouseEvents"),s.initMouseEvent(this.e,this.L,this.M,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,0,b.relatedTarget),s.touches=k,s.targetTouches=r,s.changedTouches=g,s.scale=b.scale,s.rotation=b.rotation):(s=e.createEvent("TouchEvent"),Mb?s.initTouchEvent(k,r,g,this.e,f,0,0,b.clientX,b.clientY,b.ctrlKey,
b.altKey,b.shiftKey,b.metaKey):s.initTouchEvent(this.e,this.L,this.M,f,1,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,k,r,g,b.scale,b.rotation),s.relatedTarget=b.relatedTarget);return s};function He(a,b,c){De.call(this,a,b,c)}u(He,De);
He.prototype.create=function(a,b){if(!Ce)throw new x(9,"Browser does not support MSPointer events.");var c=G(a),d=F(c),c=c.createEvent("MSPointerEvent");c.initPointerEvent(this.e,this.L,this.M,d,0,0,0,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget,0,0,b.width,b.height,b.Ka,b.rotation,b.Na,b.Oa,b.pointerId,b.pointerType,0,b.Ba);return c};
var ve=new De("change",!0,!1),xe=new De("focus",!1,!1),de=new Z("click",!0,!0),me=new Z("contextmenu",!0,!0),ee=new Z("mousedown",!0,!0),ne=new Z("mousemove",!0,!1),ce=new Z("mouseout",!0,!0),be=new Z("mouseover",!0,!0),pe=new Z("mouseup",!0,!0),Fe=new Z(B?"DOMMouseScroll":"mousewheel",!0,!0),Ee=new Z("MozMousePixelScroll",!0,!0),Ie=new Ge("touchend",!0,!0),ie=new Ge("touchmove",!0,!0),he=new Ge("touchstart",!0,!0),Je=new He("MSGotPointerCapture",!0,!1),Ke=new He("MSLostPointerCapture",!0,!1),Le=
new He("MSPointerCancel",!0,!0),le=new He("MSPointerDown",!0,!0),oe=new He("MSPointerMove",!0,!0),je=new He("MSPointerOver",!0,!0),ke=new He("MSPointerOut",!0,!0),Me=new He("MSPointerUp",!0,!0);function ue(a,b,c){c=b.create(a,c);"isTrusted"in c||(c.isTrusted=!1);return sd?a.fireEvent("on"+b.e,c):a.dispatchEvent(c)};function Ne(a,b){this.C={};this.i=[];var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){var e;if(a instanceof Ne)for(d=Oe(a),Pe(a),e=[],c=0;c<a.i.length;c++)e.push(a.C[a.i[c]]);else{var c=[],f=0;for(d in a)c[f++]=d;d=c;c=[];f=0;for(e in a)c[f++]=a[e];e=c}for(c=0;c<d.length;c++)this.set(d[c],e[c])}}m=Ne.prototype;m.N=0;m.xa=0;function Oe(a){Pe(a);return a.i.concat()}
m.remove=function(a){return Object.prototype.hasOwnProperty.call(this.C,a)?(delete this.C[a],this.N--,this.xa++,this.i.length>2*this.N&&Pe(this),!0):!1};function Pe(a){if(a.N!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Object.prototype.hasOwnProperty.call(a.C,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.N!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Object.prototype.hasOwnProperty.call(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}}
m.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.C,a)?this.C[a]:b};m.set=function(a,b){Object.prototype.hasOwnProperty.call(this.C,a)||(this.N++,this.i.push(a),this.xa++);this.C[a]=b};var Qe={};function $(a,b,c){ga(a)&&(a=B?a.b:y?a.opera:a.c);a=new Re(a,b,c);!b||b in Qe&&!c||(Qe[b]={key:a,shift:!1},c&&(Qe[c]={key:a,shift:!0}));return a}function Re(a,b,c){this.code=a;this.za=b||null;this.Sa=c||this.za}$(8);$(9);$(13);var Se=$(16),Te=$(17),Ue=$(18);$(19);$(20);$(27);$(32," ");$(33);$(34);$(35);$(36);$(37);$(38);$(39);$(40);$(44);$(45);$(46);$(48,"0",")");$(49,"1","!");$(50,"2","@");$(51,"3","#");$(52,"4","$");$(53,"5","%");$(54,"6","^");$(55,"7","&");$(56,"8","*");$(57,"9","(");
$(65,"a","A");$(66,"b","B");$(67,"c","C");$(68,"d","D");$(69,"e","E");$(70,"f","F");$(71,"g","G");$(72,"h","H");$(73,"i","I");$(74,"j","J");$(75,"k","K");$(76,"l","L");$(77,"m","M");$(78,"n","N");$(79,"o","O");$(80,"p","P");$(81,"q","Q");$(82,"r","R");$(83,"s","S");$(84,"t","T");$(85,"u","U");$(86,"v","V");$(87,"w","W");$(88,"x","X");$(89,"y","Y");$(90,"z","Z");var Ve=$(Ma?{b:91,c:91,opera:219}:La?{b:224,c:91,opera:17}:{b:0,c:91,opera:null});
$(Ma?{b:92,c:92,opera:220}:La?{b:224,c:93,opera:17}:{b:0,c:92,opera:null});$(Ma?{b:93,c:93,opera:0}:La?{b:0,c:0,opera:16}:{b:93,c:null,opera:0});$({b:96,c:96,opera:48},"0");$({b:97,c:97,opera:49},"1");$({b:98,c:98,opera:50},"2");$({b:99,c:99,opera:51},"3");$({b:100,c:100,opera:52},"4");$({b:101,c:101,opera:53},"5");$({b:102,c:102,opera:54},"6");$({b:103,c:103,opera:55},"7");$({b:104,c:104,opera:56},"8");$({b:105,c:105,opera:57},"9");$({b:106,c:106,opera:Ta?56:42},"*");
$({b:107,c:107,opera:Ta?61:43},"+");$({b:109,c:109,opera:Ta?109:45},"-");$({b:110,c:110,opera:Ta?190:78},".");$({b:111,c:111,opera:Ta?191:47},"/");$(Ta&&y?null:144);$(112);$(113);$(114);$(115);$(116);$(117);$(118);$(119);$(120);$(121);$(122);$(123);$({b:107,c:187,opera:61},"=","+");$(108,",");$({b:109,c:189,opera:109},"-","_");$(188,",","<");$(190,".",">");$(191,"/","?");$(192,"`","~");$(219,"[","{");$(220,"\\","|");$(221,"]","}");$({b:59,c:186,opera:59},";",":");$(222,"'",'"');var We=new Ne;
We.set(1,Se);We.set(2,Te);We.set(4,Ue);We.set(8,Ve);(function(a){var b=new Ne;w(Oe(a),function(c){b.set(a.get(c).code,c)});return b})(We);B&&V(12);function Xe(){Yd.call(this);this.v=new E(0,0);this.U=new E(0,0)}u(Xe,Yd);m=Xe.prototype;m.O=!1;m.T=!1;m.H=0;m.S=0;m.Pa=2;
m.move=function(a,b,c){var d=this.I();this.l()&&!td||Zd(this,a);var e=Pd(a);this.v.x=b.x+e.left;this.v.y=b.y+e.top;p(c)&&(this.U.x=c.x+e.left,this.U.y=c.y+e.top);this.l()&&(td?this.T||(a!=d&&(this.O=!0),Ze(a)?$e(this,af):(this.q(ke,b,-1,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.o(ce,b,0),this.q(Le,b,0,this.H,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!0),this.T=!0,fe={})):(this.O=!0,Ye(this,ie)))};m.l=function(){return!!this.H};
function Ye(a,b){if(!a.l())throw new x(13,"Should never fire event when touchscreen is not pressed.");var c,d;a.S&&(c=a.S,d=a.U);a.da(b,a.H,a.v,c,d)}function $e(a,b){b(a,a.I(),a.v,a.H,!0);a.S&&Ze(a.I())&&b(a,a.I(),a.U,a.S,!1)}function bf(a,b,c,d,e){a.o(ne,c,0);a.q(je,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(be,c,0);a.q(le,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ee,c,0)&&(Gd(b)&&a.q(Je,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e),we(a))}
function cf(a,b,c,d,e){a.q(Me,c,0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(pe,c,0,null,0,!1,d);a.O||(ye(a),vd&&X(b,"OPTION")||qe(a,a.v,d));Gd(b)&&a.q(Ke,new E(0,0),0,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,!1);a.q(ke,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ce,c,0,null,0,!1,d)}function af(a,b,c,d,e){a.q(oe,c,-1,d,MSPointerEvent.MSPOINTER_TYPE_TOUCH,e);a.o(ne,c,0,null,0,!1,d)}
function Ze(a){if(!td)throw Error("hasMsTouchActionsEnable should only be called from IE 10");if("none"==Y(a,"ms-touch-action"))return!0;a=Nd(a);return!!a&&Ze(a)};function df(a,b){this.x=a;this.y=b}u(df,E);df.prototype.scale=E.prototype.scale;df.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};function ef(a,b,c,d,e,f){if(!Ed(a,!0))throw new x(11,"Element is not currently visible and may not be manipulated");b:{var g=e||void 0;if("scroll"==Qd(a,g)){if(a.scrollIntoView&&(a.scrollIntoView(),"none"==Qd(a,g)))break b;for(var k=Ud(a,g),r=Nd(a);r;r=Nd(r)){var s=r,z=Pd(s),q;var l=s;if(A&&!C(9)){var v=Bd(l,"borderLeft");q=Bd(l,"borderRight");var D=Bd(l,"borderTop"),l=Bd(l,"borderBottom");q=new wd(D,q,l,v)}else v=xd(l,"borderLeftWidth"),q=xd(l,"borderRightWidth"),D=xd(l,"borderTopWidth"),l=xd(l,
"borderBottomWidth"),q=new wd(parseFloat(D),parseFloat(q),parseFloat(l),parseFloat(v));v=k.left-z.left-q.left;z=k.top-z.top-q.top;q=s.clientHeight+k.top-k.bottom;s.scrollLeft+=Math.min(v,Math.max(v-(s.clientWidth+k.left-k.right),0));s.scrollTop+=Math.min(z,Math.max(z-q,0))}Qd(a,g)}}e?e=new df(e.x,e.y):(e=ff(a),e=new df(e.width/2,e.height/2));f=f||new Xe;g=Pd(a);f.move(a,e);if(f.l())throw new x(13,"Cannot press touchscreen when already pressed.");f.O=!1;f.H=f.Pa++;td?$e(f,bf):Ye(f,he);d=p(d)?d:2;if(1>
d)throw new x(13,"There must be at least one step as part of a swipe.");for(k=1;k<=d;k++)r=Math.floor(k*b/d),s=Math.floor(k*c/d),z=Pd(a),f.move(a,new E(e.x+g.left+r-z.left,e.y+g.top+s-z.top));if(!f.l())throw new x(13,"Cannot release touchscreen when not already pressed.");td?f.T||$e(f,cf):(Ye(f,Ie),f.O||(f.o(ne,f.v,0),f.o(ee,f.v,0)&&we(f),ye(f),f.o(pe,f.v,0),vd&&X(f.I(),"OPTION")||qe(f,f.v)));fe={};f.H=0;f.S=0;f.T=!1}
function ff(a){var b;if("none"!=(xd(a,"display")||(a.currentStyle?a.currentStyle.display:null)||a.style&&a.style.display))b=zd(a);else{b=a.style;var c=b.display,d=b.visibility,e=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";var f=zd(a);b.display=c;b.position=e;b.visibility=d;b=f}return 0<b.width&&0<b.height||!a.offsetParent?b:ff(a.offsetParent)};function gf(){this.Y=void 0}
function hf(a,b,c){switch(typeof b){case "string":jf(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if("array"==ca(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],hf(a,a.Y?a.Y.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),
jf(f,c),c.push(":"),hf(a,a.Y?a.Y.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}}var kf={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},lf=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function jf(a,b){b.push('"',a.replace(lf,function(a){if(a in kf)return kf[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return kf[a]=e+b.toString(16)}),'"')};Qa||y||B&&V(3.5)||A&&V(8);function mf(a){switch(ca(a)){case "string":case "number":case "boolean":return a;case "function":return a.toString();case "array":return ra(a,mf);case "object":if("nodeType"in a&&(1==a.nodeType||9==a.nodeType)){var b={};b.ELEMENT=nf(a);return b}if("document"in a)return b={},b.WINDOW=nf(a),b;if(da(a))return ra(a,mf);a=jb(a,function(a,b){return ea(b)||t(b)});return kb(a,mf);default:return null}}
function of(a,b){return"array"==ca(a)?ra(a,function(a){return of(a,b)}):ga(a)?"function"==typeof a?a:"ELEMENT"in a?pf(a.ELEMENT,b):"WINDOW"in a?pf(a.WINDOW,b):kb(a,function(a){return of(a,b)}):a}function qf(a){a=a||document;var b=a.$wdc_;b||(b=a.$wdc_={},b.ha=la());b.ha||(b.ha=la());return b}function nf(a){var b=qf(a.ownerDocument),c=lb(b,function(b){return b==a});c||(c=":wdc:"+b.ha++,b[c]=a);return c}
function pf(a,b){a=decodeURIComponent(a);var c=b||document,d=qf(c);if(!(a in d))throw new x(10,"Element does not exist in cache");var e=d[a];if("setInterval"in e){if(e.closed)throw delete d[a],new x(23,"Window has been closed.");return e}for(var f=e;f;){if(f==c.documentElement)return e;f=f.parentNode}delete d[a];throw new x(10,"Element is no longer attached to the DOM");};function rf(a,b,c,d){a=[a,b,c,d];b=ef;var e;try{b=t(b)?new ma.Function(b):ma==window?b:new ma.Function("return ("+b+").apply(null,arguments);");var f=of(a,ma.document),g=b.apply(null,f);e={status:0,value:mf(g)}}catch(k){e={status:"code"in k?k.code:13,value:{message:k.message}}}f=[];hf(new gf,e,f);return f.join("")}var sf=["_"],tf=n;sf[0]in tf||!tf.execScript||tf.execScript("var "+sf[0]);for(var uf;sf.length&&(uf=sf.shift());)sf.length||void 0===rf?tf=tf[uf]?tf[uf]:tf[uf]={}:tf[uf]=rf;; return this._.apply(null,arguments);}.apply({navigator:typeof window!=undefined?window.navigator:null,document:typeof window!=undefined?window.document:null}, arguments);}
| 519.695313 | 1,977 | 0.653673 |
100f7b6105dea2c4a480d14cdbc14cc5eed31214 | 1,133 | js | JavaScript | dist/schema.js | gkarthiks/nodeJS-GraphQL | 470e1a3989c6f5f0701bb4a45fb00a86e3fb6f95 | [
"MIT"
] | 1 | 2020-08-09T17:25:57.000Z | 2020-08-09T17:25:57.000Z | dist/schema.js | gkarthiks/nodeJS-GraphQL | 470e1a3989c6f5f0701bb4a45fb00a86e3fb6f95 | [
"MIT"
] | null | null | null | dist/schema.js | gkarthiks/nodeJS-GraphQL | 470e1a3989c6f5f0701bb4a45fb00a86e3fb6f95 | [
"MIT"
] | null | null | null | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _index = require('graphql-tools/dist/index');
var _resolvers = require('./resolvers');
var _resolvers2 = _interopRequireDefault(_resolvers);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var typeDefs = '\n type Movie {\n id: Int!\n title: String\n actors: [Actor] # the list of Posts by this author\n }\n\n type Actor {\n id: Int!\n firstName: String\n lastName: String\n movies: [Movie]\n }\n\n # the schema allows the following query:\n type Query {\n getActorList: [Actor]\n getActor(id: Int!): Actor\n getMovieList: [Movie]\n getMovie(search: MovieSearchInput): Movie\n }\n\n # this schema allows the following mutation:\n type Mutation {\n addActor (\n id: Int!\n firstName: String\n lastName: String\n ): Actor\n }\n \n input MovieSearchInput {\n id: Int\n title: String\n }\n';
var schemas = (0, _index.makeExecutableSchema)({
typeDefs: typeDefs,
resolvers: _resolvers2.default
});
exports.default = schemas; | 51.5 | 670 | 0.66902 |
10100471144ae88e600949d95fa0f9ae3f6cd393 | 1,240 | js | JavaScript | server/core/paths.js | mymyoux/mynojs | c033a5fda9328fe7b8b4c1a8932b21b3e962f12a | [
"MIT"
] | null | null | null | server/core/paths.js | mymyoux/mynojs | c033a5fda9328fe7b8b4c1a8932b21b3e962f12a | [
"MIT"
] | null | null | null | server/core/paths.js | mymyoux/mynojs | c033a5fda9328fe7b8b4c1a8932b21b3e962f12a | [
"MIT"
] | null | null | null | var path = require("path");
import {Hardware} from "../../common/env/Hardware";
global.base_path = function (folder) {
var p = path.resolve(path.resolve());
if(Hardware.isElectron())
{
p = require('electron').app.getAppPath();
}
if (folder) {
p = path.resolve(p, folder);
}
return p;
};
global.app_path = function (folder) {
return base_path(folder);
};
global.storage_path = function (folder) {
return app_path(path.join('storage', folder ? folder : ""));
};
global.config_path = function (folder) {
return app_path(path.join('config', folder ? folder : ""));
};
global.certificates_path = function (folder) {
return app_path(path.join('certificates', folder ? folder : ""));
};
global.view_path = function (folder) {
return base_path(path.join('views', folder ? folder : ""));
};
global.public_path = function (folder) {
return base_path(path.join('public', folder ? folder : ""));
};
global.source_path = function (folder) {
return base_path(path.join('src', folder ? folder : ""));
};
global.data_path = function(folder)
{
return base_path(path.join("data", folder?folder:""));
}
console.log('app_path:'+app_path());
console.log('config_path:'+config_path()); | 30.243902 | 69 | 0.647581 |
101087b19fc3cf28e0693caf2f8ec0d931b7e804 | 30,506 | js | JavaScript | build/script/apache/notosanscoptic.js | xErik/pdfmake-fonts-google | f66c7c58d6590c87c0d1327f31da2f5a53e76f36 | [
"MIT"
] | 8 | 2015-09-16T14:23:40.000Z | 2020-10-20T19:49:11.000Z | build/script/apache/notosanscoptic.js | xErik/pdfmake-fonts-google | f66c7c58d6590c87c0d1327f31da2f5a53e76f36 | [
"MIT"
] | 1 | 2017-01-24T16:21:51.000Z | 2017-01-24T16:45:50.000Z | build/script/apache/notosanscoptic.js | xErik/pdfmake-fonts-google | f66c7c58d6590c87c0d1327f31da2f5a53e76f36 | [
"MIT"
] | 8 | 2016-04-07T05:58:05.000Z | 2021-03-14T10:26:50.000Z | window.pdfMake = window.pdfMake || {}; window.pdfMake.vfs = {"NotoSansCoptic-Regular.ttf":"AAEAAAAOAIAAAwBgR0RFRgLyAy4AAEXgAAAASEdQT1NbcfztAABGKAAACrpHU1VC5upxQwAAUOQAAAg0T1MvMn2blMQAAAFoAAAAYGNtYXCJojUTAAAEnAAAATRnYXNwAAcABwAARdQAAAAMZ2x5ZojpNNAAAAdQAAA6RGhlYWT6+dzOAAAA7AAAADZoaGVhCg8CZAAAASQAAAAkaG10eN4//+sAAAHIAAAC0mxvY2GX0Il+AAAF0AAAAX5tYXhwAMkAeQAAAUgAAAAgbmFtZWROjVIAAEGUAAAEHnBvc3T/aQBmAABFtAAAACAAAQAAAAEAAP4cZ4JfDzz1AAkIAAAAAADM+Kz3AAAAAM1k5Gv5Zv4UCBkIWgAAAAkAAgAAAAAAAAABAAAIjf2oAAAIXPlm+7QIGQABAAAAAAAAAAAAAAAAAAAAqwABAAAAvgBcAAUAAAAAAAEAAAAKAAEAAAAEABIAAAAAAAME1gGQAAUACAWaBTMAAAEfBZoFMwAAA9EAZgIAAAACCwUCBAUEAgIEAAAB/wAAAAAAAAAIAAAAAE1PTk8AQAAA/v8Ijf2oAAAIjQJYIDwBgwQAAAAESgW2AAAAIAACBM0AwQAAAAAEFAAAAhQAAATyAK4EIQC5BOwAcQPXAEQEgwBoA90AWAIQ/48E7ABvBPL/xQLFAKgCEP/FA/wAHQfZAHEEEgAhBL4BBAAA/0oEvgEfAhAAoASeAW0BlgAjBKAA3wAA/EwAAP0GAAD+pgAA/DcAAP2AAAD/lgAA/dcIQgB9BocAcQVzAGQE9ABxBTUAxwReAK4EZABQBDMAZgaHACEFQgAZBZ4AfQTNAHEE4QAXBIkAIQAA+WYFEAArBJgAKQUzAMcEnACuBDEAxwN3AK4GgwAhBUQAFAUlAH0D9gBxBHMAXAPVAGIEkwBOA6IAUAXuAMcFGQCuBkIAfQTXAHECRgDHAhAArgT0AMcERgCuBKb//AO8/+EF7gDHBfgAewYUAMcFDgCuBJMATgPDAFQGPwB9BNcAcQXZAMcE/gCuBNcAxwQ9ALAFDgB9A9cAcQThABcEiQAhBIcAAAQQ/6oGbwBoBc0AbwSwAAgEOwAlBqwAYgWaAFAIQgB9BocAcQUtABQEDAAUBG8ARASTAJ4FCgA5BGoARgSTAE4DwwBCBS0AFAQMABQGTgDHBaYArgaHAMcF9gCuBTEABARO//wIQgB9BocAcQSsAEgD/AAdA4cAHQMKABQEZABQBDMAZgSTAFwEkwBoBLQATgQUADkE8AAOBGb/0QQxAMcDewCuBJMAUgSTAGoC2wAXAvQAJwTL//QEI//0BdkAxwT+AK4GgwAhBUQAFATVAGoE1QBvBHMAxwPDAK4GmACPBdMAhwVEAFwErgBSBEYArgX+ACkF0wBmBvgAYgWLABkFiwAQCFwAcQaLAFIEvABGBhQAxwVKAK4AAPw5AAD8VAAA/FQF1wDHBOwArgawADEEbwAzBG8AMQawADMCxQA9A2gASAJmAGQAAPzMAAD9gP6s/eT8/vya+7QAAP2A/qz95Pz+/Jr7tP6s/eT8/vya+7QAAAAAAAEAAwABAAAADAAEASgAAABGAEAABQAGAAAADQAgAKABSwHBAlECVAJZAlsCXwJhAnICfgKDApICpAKnAscC0ALbAt0DAgMFAwgDIwM/A2ED7x3NLPMs//4m/v///wAAAAAADQAgAKABSwHBAlECVAJZAlsCXwJhAnICfgKDApICpAKnAscC0ALYAt0DAAMEAwcDIwM/A2ED4h3NLIAs+f4k/v///wAB//X/4/9j/rn+RP21/bP9r/2u/av9qv2a/Y/9i/19/Wz9av1L/UP9PP07/Rn9GP0X/Y/9dPzN/D7iYdOv06oChgECAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFQAVABUAFQBCAFYAhQCtAN8BFgE4AXUBogG8AeECCwJhAqUCvwLTAu4DBAMqA0UDaQODA50DwQPPA90D8wQaBHIEwwTtBRYFSgV7BboF9wYsBmAGpQbhBv8HIQdHB4IHuwfyCCgIQQhZCIYIsAjeCQwJUQmXCa4JzwnmCf8KNwpqCnYKggqeCrwK7AsXCz8LdguXC64L5AwiDFQMgAySDKQMxwzqDRYNPQ1ZDXYNjQ2kDeMOHg48DlsOhg6wDvcPOg9ND2APhA+pD8QP3w/4EBEQHxAtEEcQYRCIEK8Q3REKEZQSFhJCEmsSexKLEtITFxNHE3gTtBPsFAwULBQ7FEsUexSuFMsU5hUPFTcVShVdFaEV3hYkFmcWehaNFsIW9xc3F3YXnBfsGB0YgRiuGOYZMBl1GbUZ3BoCGh0aLxpBGn4auxrrGxYbQRtwG5YbzBvgG+4b+xwJHBccJRwzHEEcTxxkHHgchhyUHKIcsBy+HNIc5hz6HQ4dIgAAAAIAwQAABAoFtgADAAcAAJMhESE3IREhwQNJ/LdoAnn9hwW2+kpoBOYAAAEArv4UBE4EXgAdAACBIic1FjMyNRE0JiMiBhURIxEzFzM+ATMyFhURFAYDJ1Y7PD6Kd32qmrSRHQo0tG7KyI/+FBmRFKwDa4WBu9H9xQRKllJYv9L8j5quAAIAuf4UA2gGFAADAAcAAIEjETMBIxEzAVifnwIQn5/+FAgA+AAIAAACAHH/7AQ9BF4AEAAdAACFIgIREBIzMhczNzMRIycjBicyNj0BNCYjIgYVFBYCM9bs7dfddwgdj5EbCHPGpJeZpIuYlxQBKAEPAQ0BLqKO+7aTp5WzzCHlw93NzNIAAQBE/+wDZgReABcAALcWMzI2NTQmIyIGByc+ATMyABEQACMiJ1aMi6WaoKI3hjI3MaBe7QEG/vXxonLHQNPPxtQdGZYZIv7b/vL+6f7YOwACAGj/7AQSBF4AFAAbAACBMgAREAAjIgI9ASEuASMiBgc1PgETMjY3IR4BAgL4ARj++t/P9gLwBbSlWJ5qW6CagZYO/dECiARe/tX++v74/scBC+RtusMfLZ4nIPwhppOXogAAAQBY/+wDmAReACUAAIEVIyAVFBYzMjY3FQYjIiY1NDY3NS4BNTQ2MzIWFwcuASMiFRQhAteV/sqUj1WrZIvj3PFxg2Nq579vrVdEY4RK+AE5AoWTvVldJy+eS6uUY4MmCxyAXYecJSmPLBycqAAB/4/+FAH8BEoAFQAAkzMRMxEzFSMRFAYjIic1FjMyNjURIxSatJqanZheQEVDTkmaAo0Bvf5Dkf1gpKQZkRRVVwKmAAIAb/4UBDsEXgAMACgAAKUyNj0BNCYjIgYVFBYFNyMGIyICERASMzIXMzczERQGIyInNRYzMjY1Ak6ml5ipipeTAc0GCG/l1e/x0d95ChmP7/zwm6D1jKN/s8Yr3Mjby8zWdYelASkBDgEJATKmkvuk7O5GplakkQAAAf/F/hQETAReAB0AAIUQISInNRYzMjY1ETMXMz4BMzIWFREjETQmIyIGFQFi/vJdMi87SDeRGwozuG/KxLJ3f6mZlv6qIYkWWWwE3ZZRWcTP/TUCvoaDu9MAAQCoAAACoAReAA4AALMRNDYzMhcHLgEjIgYVEaiarlJeFxpOOEhHAwivpyGZCBdaY/z6AAH/xf4UAkwGHwAWAACFECEiJzUWMzI2NREQITIXFS4BIyIGFQFi/vJdMi87SDcBDlw0ET4cSDeW/qohiRZZbAVcAVYhiQgOWWsAAQAd/hQDtgRKABkAAIEWBBUUDgEjIic1FjMyNjU0JisBNQEhNSEVAb7rAQ2G+Z/vjLfMosDQzngBwP2NA0YB0xD4yZDifEikVrmbnal9AfGYgwAAAgBx/hQHkwYUAC0AOgAAgRYEFRQOASMiJzUWMzI2NTQmKwE1ASERIycjBiMiAhEQEjMyFzMuATURMxEhFQEyNj0BNCYjIgYVFBYFnOsBDIb5n++Mt8yiwNDNeQHA/bSRGwhz49bs7dfddw0DCrQDH/r0pJeZpIuYlwHTEPjJkOJ8SKRWuZudqX0B8fxOk6cBKAEPAQ0BLqIUeRUBtv42g/y6s8wh5cPdzczSAAIAIf4UBE4GHwAkACwAAIUQISInNRYzMjY9AQ4BIyAZASM1PwEzFSE1ECEyFxUuASMiBhUBMjcRIREUFgNk/vJdMi87SDcZZjP+vpudSGsBPwEOXDQRPhxIN/65VT7+wVuW/qohiRZZbJsKEgFTAn9WSOr8fwFWIYkIDllr+7gUAyv9hl9mAAABAQQE2QO4BiEADAAAgTMWFzY3MxUGByMmJwEEe3JpfmF/zTO4PMAGIUpzfj8bzWBmxwAAAv9KAAAAtgRKAAIABQAAkwsBASETtra2AWz+lLYESv7jAR37tgEdAAEBHwTZA5wF7AANAACBIiYnMx4BMzI2NzMOAQJYjaMJbghUc2ViCHENrATZiolHOz9Dg5AAAAEAoAUAAXMF5QALAACTNDYzMhYVFAYjIiagPS0qPz8qLT0Fczw2Njw7ODgAAgFtBNkDLwaJAAsAFwAAgRQGIyImNTQ2MzIWBzQmIyIGFRQWMzI2Ay99Zmd4eGdlfnFBMTJBOzgzPwW0ZXZ1ZGJ1dmE2PT02Nj09AAEAI/49AXUAAAAPAACXFBYzMjcVBiMiNTQ3Mw4BtjErLDdFOtOgf0ZG7i4uDXMTwYt3Qm0AAAIA3wTZA74GIQAJABMAAJM+ATczFQ4BByMlPgE3MxUOAQcj3yNoJ8UhrUJnAWkvahnEIa1CZgTyLrFQFTjENxlBtjgVOMQ3AAH8TATZ/egGIQANAACBIy4DJzUzHgMX/eh5I1dSRRLXETA1NxgE2RxSV1IcFSNSUkwcAAAB/QYE2f6iBiEADQAAgT4DNzMVDgMHI/0GFjU2MBLZE0VTViR3BPIcTFJSIxUcUldSHAAAAf6mBNkBWgYhABQAAIE+AzczHgMXFSMuAScOAQcj/qYcR0c+FLgSP0hKHX82cTg4bTZ7BPAeTFNRIyNSUk0dFyBhNzdfIgAAAfw3BNn+lwVqAAMAAIEhFSH8NwJg/aAFapEAAAH9gAamAoAHBQADAAABIRUh/YAFAPsABwVfAAAB/5YFAABpBeUACwAAgzQ2MzIWFRQGIyImaj0tKj8/Ki09BXM8NjY8Ozg4AAL91wUMABcF1wALABcAAIE0NjMyFhUUBiMiJiU0NjMyFhUUBiMiJv3XOCgnOjonKDgBgTgmJzo6JyY4BXM1Ly81NTIyNTUvLzU1MjIAAAEAff5xB8UF2QA3AACFIiYCNRAlFwYCFRQSFjMyNhkBMxEQFjMyNhI1NAInNxYSFRACACEiJzUWMzIkNycOASMiJicjAgKco/aGAa5osKZZo2mchbiLmG2gV7aoh8fTw/6M/v98TFZwuwERWQZGj15/rygGZhSxAU7kAhbwe2r+wuOv/vyJ9QEFAwD9AP738YUBAbbgAVVgdXb+c/v+pf4B/vAapBusswZOP5qb/ssAAQBx/nsGFwR7ADUAAIEQAgQjIic1FjMyNjcnDgEjIicjDgEjIiYCNTQSNxcOARUUFjMyNjURMxEUFjMyPgE1ECc3BAYXnf7Tulg/O1qVyUwGMHBLxT8HI6F9c7Vljo6Be258bWt1rG1hRnNB44UBEwIh/uz+W+0UpBKUqwQ6PulsfYkBAa29ATBrZGHyob7aqpQCgf1/mKZku38BJMpk5QAAAQBkAAAErAXNABcAAIEOASMgABEQADMVDgEVFBYzMjY3ETMRIwPyS7FW/vT+0AEk+aW1y7phqTy6ugF5KS8BNgEPARkBTqAI5cXN6zIkA536SgAAAQBx/hQERgRgABgAAKUOASMiLgE1NAA3FQ4BFRQWMzI2NxEzESMDkVGWVJPbdwEN752lqJNViky1tX01K4bwmPkBLBCVD9e2rM0vOgMr+coAAAEAx/4lBQ4FtgAhAACBFA4BBw4BFSM0PgY1NCYjIgYHESMRMxE+ATMgAAUOWq7deme5PGN+g35jPNC1VK9DurpFvFEBCwEwAlCb/MyaVItPXIhrWltmhq930OkuKPxiBbb+hygx/ssAAQCu/hQEIwRKACAAAIE0JiMiBxEjETMRPgEzMhYVFA4BBw4BFSM0PgYDaI13kHK0tEyQVbjYUpyQXlO5ME5kaWROMAEXhqJi/iMESv4zNirxx4PPl1Q4YTtHZk09P0hihgABAFD/NQQ9BcsAJQAAky4BNTQ+ATMyHgEVEAAFEiEyNxUOASMgAAMkADU0JiMiBhUUFheNHSB+5pSb4nj+if58TwGUkWExlDH+1v6ZLAGYAX2rk42gGBEDRjB4NX/AaXTViv7//p1v/sAfrA8UATcBH10BHdKgso99I1UeAAABAGb+7gPbBF4AJQAAkyY1ND4BMzIeARUUBgQFEiEyNjcVDgEjIAADLAE1NCYjIgYVFBe4N2rDhYK0YIj+9P7wUAFgPZkwOJ9I/wD+2C4BawFBfG90gCUCO1liZaVeXaBliMqZUP7CHRiZFhsBGgEdUdSdZn5waTs+AAIAIQAABmQFtgACAB0AAKUhCQEzCQEeATMVISImNTMUFjMBAy4BIzUzMhYfAQJOArD+sgEb3f6DATtGYFj625GNrkRmAcKoPnJeKYKkRZuiAjsC1/2//et0SKKLmEg5AsIBDWFColhq9gACABkAAAU7BEwAAgAcAAClIQMBFSEiNTMUFjMBJy4BIzUzMhYfARMzCQEeAQH6AfT6Akf7tdeVM0oBYJ8yUEcxY4U/ffbG/rQBAjtUkQFj/p2R9DMwAd7dRS2OS120AVr+Mf6ZUjEAAAIAff/sBY8GSgAbACgAAIEXPgEzMh4BFRQCBCMiJAI1EAAlJDcVDgEHBgQBMjY1NCYjIgYVFB4BAVoETfWHpviHov7cs7L+8JQBggGIAXKWUM393f70AUvK6M3CzO9pugPFBFVfiv+iq/7om6QBL8gBiwGuLig0qBcjIBq//Bzryb3X4Lx3xXAAAAIAcf/sBTEFbQAWACMAAIUiLgE1EAAlNiQ3FQ4BBwYHFhIVFA4BEzQmIwcOARUUFjMyNgJtneZ5AVABP9gBDkte/LJsF9Xzgeqt4c0jXlKtlZSrFILungECAWBMM18zojVSKx8IFP7s3o7shgHz0dwBR8F/s9C+AAEAFwAABMsFtgATAAChIxEjIhUjECEzNTMVMyARIzQrAQLNudB9sAEi27nbASOwfdEEN4MBJd3d/tuDAAEAIf7fBGgFVAAVAACBMhYVIzQrAREjESMiFSM0NjsBETMRA3V0f6FhxrfGYKJ/dNW3BEp8fGD7LQTTYHt9AQr+9gAAAflmBNn/rAZGABUAAIEuAyMiDgIHIz4CJDMyBB4BF/7PFVaMyIeHx4xWFd4hfMIBELS0ARDCfCEE2SxRPSUlPVEsSIVkPDxkhUgAAAIAK//jBSkFtgAYACAAAIE1MzIWFwEeATMVIyImLwEOASMgAwEDLgETMjY3AwEeAQEZJrDCRQFoKmI/J2uFKxJg/Y/+vXsCmG81hVJ32lSJ/hUaegUOqHmd/MhdW7BUWCVzewEEAkYBCn5Z+31tZgEz/lQmNAACACn/7ASiBEoAGQAgAACBNTMyFhcBHgEzFSMiLgEnDgEjIiYnAScuARMyNycBHgEBEB+Pr0EBRCNNQCk6V0c3aNN/is4vAj9PMnhiu519/m0UcAOwml55/Z9BOZgcOlJlV3loAbaUWEH805br/s8fMQADAMcAAATFBbYADwAYACEAAJMhIAQVFAYHFR4BFRQEIyETITI2NTQmKwEZASEyNjU0JiPHAaEBJgEFjoipn/708P3+uAEOrJyrufIBJ7CqtLQFtq+7gqkZCh2wkcTcA0hugXhq/ZX97oiKg30AAAMArgAABFgESgAOABYAHwAAgRQGBxUeARUUBiMhESEgAzQmIyERISADNCYjIREhMjYENXhvi3/l1/4SAewBm5GQi/7ZASsBFx93eP7MAROTfQM1am8UCRN/a5ymBEr9AlxK/p8ClE1C/tNJAAEAxwAABCkFtgAMAACBMh4BFSM0JiMhESMRAvZ2gzquU27+xbgFtjtzjVZB+u4FtgAAAQCuAAADUARKAAwAAIEyHgEVIzQmKwERIxECO2t2NJ5KYqS0BEo3a4FOPfxOBEoAAgAhAAAGZAW2AAIAGgAApSEBJy4CIzUzMhYXAR4CMxUhIiY1MxQWMwIxAtv+nlQqRGVYJ62/RgF1IjZET/rbkY2uRGaiAymkUzsXonuf/LpMSR+ii5hIOQAAAgAUAAAFLwRMAAIAGAAApSEBJy4BIzUzMhYXAR4CMxUhIjUzFBYzAeUCEf8AWCNeeVB+oz0BGxgxOj/7vdiaM0qRAg+XUDOSaXv9rDM4GJH0MzAAAQB9/+wE6QXNABgAAIEiBAchFSESADMyNxUGIyAAERAAITIXByYDQtz++BoCyP0zDAEF8qTKnun+s/6hAXgBUeu4S68FKfXqoP71/u46oDsBhAFtAV0Bk1qeVAABAHH/7AOwBF4AGgAAhSIAERAAMzIWFwcmIyIGByEVIR4BMzI2NxUGAnv6/vABE/1UoDs1iXWeoxECG/3jCaShXY4+eBQBIQESARcBKCEalDSgpJO4ryUZnDsAAAEAXP9xBKQF+gAyAAClFjMyNjU0LgY1ND4BMzIXFjMyNjcXDgEjIicmIyIGFRQeBhUUBisBJwG4Lj9oeztge4B7YDt33Y1QVlUoTlcgfziTcztbW0SDlztgeoB6YDvpuzMyFwdxYkJjUEVHUmqJW4DLchARLC5aVUsREJeEQ2VRRUZPZoNYqdgCAAEAYv6YBBsEkQAxAACBFB4BFx4CFRQOASMiJzUWMzI2NTQuBjU0NjMyFxYzMjY3Fw4BIyInJiMiBgEOOGWRe3U+YrBxIxYgF15vM1Nrb2pTM+ayQFFRLjJJH3c1e1I+WVkrboIC00BhU09EbIFRY65lBJsEc1w6V0c+QUphfVSr2A0OJi5SU0INDIUAAQBOAAAERAW2AAkAAKEhNQEhNSEVASEERPwKAwL9FgPJ/P4DF4sEh6SL+3kAAAEAUP9GA6AESgARAAClMh4BFyM0LgEjITUBITUhFQECgW14NgSkGz9K/fgCTv3VAvH9u4s0dptUSB53A0eMh/zIAAEAxwAABSUFtgALAAChIxEhESMRMxEhETMFJbj9Eri4Au64Aqr9VgW2/ZYCagABAK4AAARqBEoACwAAgREhETMRIxEhESMRAWICVLS0/ay0BEr+NwHJ+7YB6f4XBEoAAAMAff/sBcMFzQALABIAGQAAgRAAISAAERAAISAAATISEyEaARMiBgchLgEFw/6d/sH+vf6fAV8BRwE+AWL9Xt7zDPxEDfPh2vQTA7oT7wLd/qH+bgGLAWgBZQGJ/nH8TQELAQT+/P71BKD79/j6AAADAHH/7ARoBF4ADAASABgAAIEQACMiJgI1EAAzMgABMjY3IRIBIgYHIQIEaP7w8JXmfAEM8ugBEf4FnJgL/X8SAS2Ylw4Cfx4CJ/7z/tKLAQSsAQwBK/7P/VS4sP6YA0amogFIAAABAMcAAAF/BbYAAwAAoSMRMwF/uLgFtgABAK4AAAFiBEoAAwAAoSMRMwFitLQESgABAMcAAAT0BbYADAAAoSMBBxEjETMRNwEzAQT02f35lbi4fgIJ1/29ArqD/ckFtv0viwJG/YMAAAEArgAABDMESAANAACBMwkBIwEHESMRMxEUBwM52f5hAcDX/piHv78NBEj+Gv2eAfBv/n8ESP7jiYkAAAH//P/sBKwFywAbAACjAScuASMiByc2MzIWFwEeATMyNxUGIyImJwMBBAIUNR5RNyQlKUFWa401AW8ZOCgYJTJHVmYn7P5dBASJUEwQlR13ifw/REcKhRhdbQKD/McAAAH/4QAAA8UESgAXAACTMzIeARcBHgEzFSMiLgEnAwEjAScuASPPJVtdRCIBISI3OR1SVUE5oP6xtwG3IyA/RwRKIU5K/YFNNo8hUoEBZv2mAwZKRCgAAQDHAAAFJQW2ABcAAIERIxEOASMiJicRIxEzERQeATMyPgE1EQUluDXJf32/Nbi4Z6VrYKVyBbb6SgGHeop0bf6cBbb9M23YbXLdYwLNAAABAHv/8AWFBEoAHgAAhSImJyMGDwEjNhI3AzMDEjMyNhMDMwMSEyMCJyMOAQL4krskBA00G6woYSsKzQtUv2mcOgTJDCxnrkMJBDu+EOndjMBqfgFG1gGw/lD+EuwBAgGw/lD+sv60ARCm6N4AAAEAxwAABT0FtgARAAChIwEjFxYVESMRMwEzJgI1ETMFPdf9EQgFC7jVAu0IAgy6BL5Rp5X8zwW2+0YYASdCAzkAAAEArgAABGoESgAKAAChIxEzAREzESM1AQFitLQCVLS0/awESv1YAqj7tqoCkwABAE4AAAREBbYAIAAAgSAEFRQEBRU+ATMhFSE1NjckNTQmKwE1ATUGISM1IRUBAdUBPAEc/ur+/TSvMgEb/AqWZAIQxOTnAlam/tHkA7X9ugN5nauSzjUJBwqkpA4Xd91vWYoBsgQTpJP+XAABAFT/RgOeBEoAKgAAszU2JDY1NCYrATU3Njc1BiMhNSEVARUyFhUUBgcVNzY7ATIeARcjNC4BI1qlASGUpa+o9nRrfpT+2QMG/jnr6MzHIlY0JWJnLQSkJFVahwxObktQSXucRysJB4yS/vYGc32DnCAIBAovaqBQTB4AAgB9/+wFwwXNAAsAFwAAgRAAISAAERAAISAAARASMzISERACIyICBcP+nf7B/r3+nwFfAUcBPgFi+3z27Ov08uvu9gLd/qH+bgGLAWgBZQGJ/nH+n/7e/tABLAEmASUBKf7TAAIAcf/sBGgEXgAMABcAAIEQACMiJgI1EAAzMgABFBYzMjY1NCYjIARo/vDwleZ8AQzy6AER/MOjn52kpZ/+wQIn/vP+0osBBKwBDAEr/s/++s/X18/P0QABAMcAAAUQBbYABwAAoSMRIREjESEFELb9JbgESQUU+uwFtgABAK4AAAROBEoABwAAoSMRIREjESEBYrQDoLT9yARK+7YDsAACAMcAAARvBbYACQASAACBFAQhIxEjESEgATMyNjU0JisBBG/+zv7qqLgBgwIl/RCT2sS2wboECODv/ccFtv0hjZyNjAAAAgCw/hQD7ARKAAoAEwAAgRQEKwERIxEhMhYBMzI2NTQmKwED7P785J62AXXY7/16lJifmY6kAq7M5v0YBjbb/h6PjIONAAEAff/sBM8FywAXAACBIgAREAAzMjcVDgEjIAARNBIkMzIXByYDOez+8gEG8pzDXaxw/r3+o6cBP9jorEqvBSn+xP7u/uX+zTqgIhkBiQFo4gFUuFacUAABAHH/7AOTBF4AFgAAhSIAERAAMzIWFwcmIyIGFRQWMzI3FQYCZu3++AEL91CdMzeLYqaenpuRjHIUASMBEAEUASshGpY00c/H00CgOwABABcAAATLBbYADwAAgSARIzQrAREjESMiFSMQIQOoASOwfdG50H2wASIFtv7bg/rsBRSDASUAAAEAIQAABGgESgARAACBMhYVIzQrAREjESMiFSM0NjMDdXR/oWHGt8Zgon90BEp8fGD8TgOyYHt9AAABAAAAAASHBbYACAAAgQEzAREjEQEzAkQBfcb+Gbn+GckC5wLP/IH9yQIvA4cAAf+q/hQEZgRKAAgAAIEzAREjEQEzAQON2f38tP382QGFBEr8yP0CAv4DOP15AAMAaP/sBgQFywAZACIAKwAAgTMVMzIeARUUAgQrARUjNSMiJAI1ND4BOwETMzI2NTQmKwMiBhUUFjsBAtu2RK79hJT++rIntiuy/vuRiP6sQbYZxdvLtji2N7XM2sgWBcu0i/iepf7+guHhhQEFn5v5jfxN1720z9GyvdcAAAMAb/4UBVwGFAARABcAHAAAgRQABREjESYANTQAJREzERYABRAFEQ4BBRAlESQFXP7h/wCw/P7eASABBKr9ASL7zwFovKwDd/6bAWUCJfX+1BT+JAHcFQEs9PoBJxQBuv5GGf7U8P6DJQNCE9O6AXcn/MAnAAABAAgAAASoBbYACwAAoSMJASMJATMJATMBBKjR/n3+d8MB5v45zQFmAWnC/jwCe/2FAvoCvP3DAj39SAABACUAAAQXBEoACwAAgQEzCQEzCQEjCQEjAbL+hc0BGwEYy/6FAZDN/tX+0csCMQIZ/mIBnv3n/c8Btv5KAAEAYgAABkoFtgAYAAChIxEkABE1MxUUEhcRMxE2Ej0BMxUUAgQHA660/sn+n7n+4bTk+72i/tPNAdERAWwBLYNv9P7dCQNH/LkTARX0c4W4/tK1DQAAAQBQ/hQFSgRKABgAAIEzET4BPQEzFRQCBgcRIxEkABE1MxUUFhcCc668ubSL+Kau/vr+47K3ugRK/TUN5N5ic63+75YK/TUCyxABQAEQcV7d8AYAAQB9/+wHxQXZACsAAIEWEhUUAgYjIiYnIwIhIiYCNRAlFwYCFRQSFjMyNhkBMxEQFjMyNhI1NAInBivH04b5ppDIJwZm/uej9oYBrmiwplmjaZyFuIuYZqNbtqgF2Xb+c/vl/qu1pJH+y7EBTuQCFvB7av7C46/+/In1AQUDAP0A/vfxiQEDsOABVWAAAAEAcf/sBhcEewArAACBDgEVFBYzMjY1ETMRFBYzMj4BNRAnNxYSFRQCBiMiJicjDgEjIiYCNTQSNwIOe258bWx0rG1hRnNB44V4m2vDf3KYHgcomXxztWWOjgQXYfKhvtqomAJD/b2TrWa8fAEkymRk/sabtv7vj3JzeWyJAQGtvQEwawAAAQAUAaIFGQTNAAcAAIERIRUhNSERAtkCQPr7AhMEzf2HsrICeQABABQBCgP4A9UABwAAgREhFSE1IRECWAGg/BwBmAPV/eOurgIdAAIARAAABB0FtgAGABIAAIEzCQEjATUFNDYzMhYVFAYjIiYC7vn9EwME/P1CAsxPOTtKSzo+SgW2/Ub9BAKskTtFQEc+PUZEAAIAngAABAIESgAGABIAAIEhCQEhATUFNDYzMhYVFAYjIiYClgEK/aICbv8A/e4CbEc2OUJENzZHBEr+Bv2wAgaUVEE6QTo6QTwAAwA5AAAEzwW2AAMABwALAACTIRUhESEVIQEVITU5BJb7agSW+2oElvtqAzOkAyei+46iogAAAwBGAAAEGwRKAAMABwALAACTIRUhESEVIQEVITVGA9X8KwPV/CsD1fwrAnmcAm2e/PKengAAAQBOAAAERAW2AAkAAKEhNQkBNQEVASEERPwKAxz9LAOf/QADD7wCZQHE0f23jP3DAAABAEIAAAN/BEoACQAAoSE1CQE1ARUBIQN//MMCdP3JAtv9zwJWiwHNATm5/mac/ncAAAEAFARgBRkFEgADAACBITUhBRn6+wUFBGCyAAABABQDCgP4A7gAAwAAgSE1IQP4/BwD5AMKrgAAAwDHAAAFhwW2AAMABwALAAChETMRIREzEQEzESMC06T9UKEDfaKiBbb6SgW2+koFtvpKAAMArgAABPgESgADAAcACwAAoREzESERMxEBMxEjAoWc/Y2eAw6engRK+7YESvu2BEr7tgABAMcAAAZzBbYAFwAAsxEzESERMxEhETMRMxUjESMRIREjESERx6EBa6QBbqLs7KL+kqT+lQW2/XkCh/15Aof9eZP9ZAKc/WQCnP1kAAABAK4AAAXdBEoAFwAAsxEzESERMxEhETMRMxUjESMRIREjESERrp4BOZwBOZ7l5Z7+x5z+xwRK/jMBzf4zAc3+M5T+FwHp/hcB6f4XAAACAAT+sgTJBbYAEQAaAAClIREjESE1IREhIBEUBCEjESEBMzI2NTQmKwEEG/2+uP7jAR0BgwIl/s7+6qgCQv2+lNrDtcK6hf4tAdOgBJH+UuDv/uwBso6bjYwAAAL//P4UA/wESgASABsAAIEUBCsBFSEVIREjESM1MxEhMhYBMzI2NTQmKwED/P785J0Bbv6StsXFAXTY7/17k5igmY6kAq7M5t2S/ocBeZIEK9v+Ho+Mg40AAAQAff5xB8UIWgALABcAIwBbAACBIREzESEVIRUjNSETNDYzMhYVFAYjIiYlNDYzMhYVFAYjIiYBIiYCNRAlFwYCFRQSFjMyNhkBMxEQFjMyNhI1NAInNxYSFRACACEiJzUWMzIkNycOASMiJicjAgKFAU6RAU7+spH+sg44KS4yOiYpOAJOOCYnOjonJjj9u6P2hgGuaLCmWaNpnIW4i5htoFe2qIfH08P+jP7/fExWcLsBEVkGRo9ef68oBmYHOQEZ/ueJj48BRjUvNi41MjI1NS8vNTUyMvgrsQFO5AIW8Htq/sLjr/78ifUBBQMA/QD+9/GFAQG24AFVYHV2/nP7/qX+Af7wGqQbrLMGTj+am/7LAAQAcf57BhcHBgALABcAIwBZAACBIREzESEVIRUjNSETNDYzMhYVFAYjIiYlNDYzMhYVFAYjIiYBEAIEIyInNRYzMjY3Jw4BIyInIw4BIyImAjU0EjcXDgEVFBYzMjY1ETMRFBYzMj4BNRAnNwQBrAFOkQFO/rKR/rIOOCkuMjomKTgCTjgmJzo6JyY4Ag+d/tO6WD87WpXJTAYwcEvFPwcjoX1ztWWOjoF7bnxta3WsbWFGc0HjhQETBeUBGf7niY+PAUY1LzYuNTIyNTUvLzU1MjL7tP7s/lvtFKQSlKsEOj7pbH2JAQGtvQEwa2Rh8qG+2qqUAoH9f5imZLt/ASTKZOUAAQBI/+wEOwW2ABoAAIEeAhUUBCEgJzUeATMyNjU0JisBNQEhNSEVAlSL4Hz+yv7p/v2jZOJix8TKwX8Bpv1aA40DhQRyx4Pg+U+oMDConI6bhQGdpJEAAAEAHf57A7YESgAXAACBFgQVFAAjIic1FjMyNjUQISM1ASE1IRUBvvMBBf7M+8+bu7eqyf5OZAHA/Y0DRgIQBOfN1v75Q6RSsJQBLX0BtJiDAAABAB0AAANoBbYAAwAAgQEjAQNo/WWwApsFtvpKBbYAAAEAFAAAAvYESgADAACBASMBAvb9z7ECMgRK+7YESgAAAQBQ/zUEVgXLAC4AAIEhNjU0JiMiBhUUFhcHLgE1ND4BMzIeARUUBzMVIwYFHgEzMjcVDgEjIAADJDcjAa4BeVKrk42gGBGqHSB+5pSb4nhFXrS5/lkl8c2RYTGUMf7T/psrAYe//ALBdKKgso99I1UeQTB4NX/AaXTViquMf9pskYYfrA8UARwBEVGPAAEAZv7uA+UEXgAsAACBITY1NCYjIgYVFBcHJjU0PgEzMhYVFAczFSMGBAcSITI2NxUOASMgJAMkNyMBZgFvPXpxdIAloDdqw4W+2C9LmVD++tFBAW89mTA4n0j++f7bKgFQovIB/lh/coRwaTs+PlliZaVezbZ7YnNXgTD/AB0YmRYb9QEEQWMAAAEAXP/sBEIFywAaAACBNCYjIgYVFBYXByYkNTQkMzIAERACBCE1IAADg6WcjJ+jrCfg/v0BCtz1AQvS/mf+9AFJAW8DTOj7l4GGmBybG/HCyfL+vP7b/vX+cdynAWMAAAEAaP4XBEIEXgAcAACBNCYjIgYVFBYXBy4BNTQ+ATMyABEQAgQjNTIkEgODpZiEn6C0QO7heN+N8AEG4/5o8sQBO68B3+76q42HpzCbOvG+htt+/rf+0v7o/kT8o8kBbgAAAQBO/+wERgXLACcAAIEUBgcVHgEVFAQhICc1HgEzMjY1NCYrATUzMjY1NCYjIgYHJzYhMgQEJ7akur/+yv7o/vmjY+Nixsni4NHG2defh3K3bVjTAR3hAQIEYI61GQgZtJHN5U+oLzGSiYOHmpF7ans2R32YxAAAAQA5/nsDugReACYAAIEUBgcVHgEVFAQjIic1FjMyNjU0JisBNTMyNjU0JiMiBgcnNjMyFgOFm46otv7g/sibu6qvt8jWXF60u3x0VZZgULLnxNwC8oeuGQgXtJbO8kOkUpqPioWZg4FqeDJHe5W+AAEADv6yBKgFtgASAACTIwEzIBEUBCEjNTMyNjU0JisBw7UBlt8CJf7Q/uhSPtrDtcE8/rIHBP5S3/CejpuNjAAB/9H+FwQfBEwAEgAAkyMBMyARFAQhIzUzMjY1NCYrAYOyAWzkAf7+5v77SDbGsqqlRv4XBjX+YtPhj4qRjoQAAQDHAAAD/gW2AAUAALMRMxEhFce4An8FtvrupAAAAQCuAAADVgRKAAUAAJMzESEVIa60AfT9WARK/EyWAAABAFL/7AQ3BcsAGwAAgRQWMzI2NTQmJzcWBBUUBCMiJgI1EBIkIRUgAAEQpZ2Mn6etK+IBAf702aDmetIBmgEL/rT+kwJq6PuXgoaXHJwd87/M7o0BEskBDQGP26j+nAABAGr/7ARCBecAHgAAgRQWMzI2NTQuASc3HgIVFA4BIyICERASJDMVIgQCASWdooeiRYqJOLTFXHndjvn72wGX+cz+yKwCSuHmpolUd1MmlSt5sneD1nkBMQElARABqO2ltv6nAAABABf+sgJ3BcUADwAAkzYkMzIXFSYjIgYHIREjERcNAQLSTzAwS3eWFAEOuAPl4/0LlQxjXfpBBTMAAQAn/hQCVARUAA4AAJM+ATMyFxUmIyIHMxEjEScQ6rxEMyxHxiv+tQKT1usIlAuk+vUEfwAAAv/0/qoEmAW2AAoAGgAAlzI2PQEjIgYVFBYlFAYjIiY1NDY7AREzESEV9jczJU1KMAFFnZVxgqujHrkCf7hOTR0wNikpuKawgnB7jQUS+u6kAAL/9P60A/gESgAPABkAAKEUBiMiJjU0NjsBETMRIRUFMj0BIyIGFRQWAg6bknF8tKQOtAHq/PhqJU1KMKGrem54hAOy/E6Yup0dMDYpKwAAAQDHAAAFEAW2AAcAAJMzESERMxEhx7YC27j7twW2+uwFFPpKAAABAK4AAAROBEoABwAAgTMRIREzESEDmrT8YLQCOARK+7YESvxQAAMAIQAABmQFtgAUAB0AJQAAgQMzAR4CMxUhIiY1MxQWMxMlNwUBMhc3JicmJwMTFxYXNyYnAwNWms0B8CM3RE3625GNrkRmyf7nPQENAWWTaAQ4pzb7mMn+eYMEMEXXBHEBRfukTkogoouYSDkBl6Zen/4ECAQbbSOa/r8BqqBKbAQ+pwHsAAADABQAAAUvBEoAEwAZACEAAIEDMwEeAjMVISI1MxQWMxMnNxcTBTcmJQcTHgEXNy8BAwKehcIBjRoyPj37vdiaM0qcrDOomwE0AlL+1W2cUZBrBDQchwM9AQ38yjQ3GJH0MzABHWBWYP6NBAQmrdMBMDBWSQRhOAEbAAIAav/sBHcGGwAhAC4AAIEuAjU0NjMyFwcmIyIGFRQeAhceAhUUDgEjIiQ1NDYBNCYnDgIVFBYzMjYCBnVuN+m40eRGubxmeyZKbEWjsVx/8aHk/ujQAoJ+nI+aUq2QorYDjzxhckuFrXWYa1NBL0M4NiJOl7l2jtx5/M6m8f6Aca1SKGWSZImmrwAAAgBv/+wEZgYUAB4AKgAAgS4BNTQ2MzIWFwcuASMiBhUUFhceARUUACMiJDU0EgE0JicOARUUFjMyNgIbi3PHqWi+gE5lpFdSYG2l1az+8vLl/u7gAl13i73CqpGeqAOmT59ihJouQI04MExBRWtbdfSd7P71+NKzAQH+d3yySS3WoYqptQABAMcAAAP4BbYABwAApSEVIREhFSEBfwJ5/M8DMf2HoqIFtqIAAAEArgAAA38ESgAHAAClIRUhESEVIQFYAif9LwLR/dmWlgRKlgAAAgCP/rIGJwXLAAgAHgAAgT4BNTQmIyIRJzQ2MyARFAIEBxEjESQAGQEzERQWFwOe4uhvdOe54cMBnpn+3s65/t7+zLnYxQIEDPXeqqD+yQzS9/4htv7kpw39TAK0EAE0ARQB+P4Vzu4LAAIAh/4UBX0EXgAJAB8AAIE+ATU0JiMiBhUnNDYzMhYVFAAFESMRJgA1ETMRFBYXAz260mhdXGuuxrG4v/7Q/vCu8v7qsqawAQYR3LWGm4iLAsff293u/sUV/awCVBABKfcBsv5szM4UAAACAFz+sgTnBbYAHAAmAACFJBE0JicRFAYjIiY1NAA3NSE1IRUhFRYSFRAABRMyNjURDgEVFBYBwQJwk3e6pqW+ARP4/e0Ehf5G1Oz+Wv6ADlVLo69fqkoCGpfyMP7EvtPYv9oBAQnzoqL5N/677/60/nMlAph1egFQCLKWbIMAAAIAUv4XBFwESgAdACcAAIEkETQmJxUUBiMiJjU0Njc1ITUhFSEVFhIVFAIEBxMyNjURDgEVFBYBgQIleWC8io6n+s/+YgPZ/ne90qn+uOoORUeBmlD+uD4BzXvHLPiHvreXreUPz5iY1zn+98y//tm4GAJ0XlQBCwiLc0tsAAEArv5zBC8ESgARAACBBxEjETMRBzM/AQEzCQInAQHdfbKyCAg9RgFf0v5EAdf9/moBgQIAbf5tBEr+nbJOVAFz/iv9rv5QgwFDAAACACn+sgWYBbYAKQAyAACBNS4BJyMGDwEjNjcDMwMSFxEhIBEUBCsBETY3AzMDHgEXIy4BJyMGBxURMzI2NTQmKwECGWaIGwILLRiVVkIJuQk3egGyAc3+/+/XdUcEtgwYRCGXKBYEBFCy1Z+UkI/p/rKqF5d5WYJI0P0BFf7r/v8yBbz+nrzJ/TNA6wEV/uuC/U6FajTxMLAEu2lybWQAAgBm/rIFbQW2ABUAHgAAhSMRIREhIBEUBCsBFSERIxEjESMRIwEzMjY1NCYrAQEbtQGIAbIBzf7/79cBibTVuNMBi9WflJCP6bIDBgNi/p68yXv8+gJs/PgDCAGzaXJtZAAEAGL+rgaRBbYAEQAaAC8ARQAAkyERISARFAQrARUhFSERIxEhATMyNjU0JisBASImNTQ2MzIXByYjIhUUFjMyNxUGISImNTQ2MzIXByYjIhUUFjMyNxUOAW0CmwGyAc3/AO/XAtD9MLn9ZQNU1Z+UkY7p/fOisLejbl8tX0W8XFpbbk8DcKKwt6NxXC1kQL1dWlxsKlsCZANS/p67ymuT/OEDHwGcaXJtZPmVvK2zvy11JfV0fC99K7yts78tdSX1dHwvfRcUAAIAGf6yBSUFtgARABoAAJMhESEgERQEKwEVIRUhESMRIQEzMjY1NCYrARkBjQGyAc3+/+/XAZz+ZLj+cwJF1Z+UkI7qAhIDpP6evMm9k/0zAs0B7mlybWQAAAIAEP6yBSUFtgAXACAAAKUBMxcRISARFAQrARE3MwkBIycRIxEHIwEzMjY1NCYrAQGe/n3VtgGyAc3+/+/XueP+aAGD1bK4w9MCTtWflJCO6tkBe8kEK/6evMn+vMn+hf51z/6VAXHVBB9pcm1kAAACAHH/7AgZBEoAIgAsAACFIgAREDchHgEVEAAjIgAREAAzITIWFwcmIyIGFRAhMjcVBgEQITI2NRAhIgYG7PL+/JP+RkhR/vPz5v7vAQvzBIlPmDo4iGWkoAE5kYxy+ZcBQp6j/rynmBQBHAEMAR9/ONaH/vf+2AEtAQQBCwEiIByVM8jN/nBAoDsCMf5kz80BldIABQBSAWQGOQVzAAMADwAZACUALgAAgSE1IREUBiMiJjU0NjMyFgUUMzI1NCYjIgYHFAYjIiY1NDYzMhYFFDMyNTQjIgYGOfoZBee/q6u+vK+qvv3Ly8thaGpj38Gqqr68rqnA/cvKy8lqYgFkswHbts3Iu7nIzrP8/HSGhXW3zMi7ucjNtPz8+oYABQBGAM0EdwPnAAMADwAXACMAKwAApSE1IREUBiMiJjU0NjMyFgUUMzI1NCMiBxQGIyImNTQ2MzIWBRQzMjU0IyIEd/vPBDGLd3KMiXlzi/6HeXt7ebiLd3KMiXlzi/6HeXt7ec2uAV6EkJV/goyTe6Sknp6EkJV/goyTe6SkngADAMcAAAVOBbYACQAMAA8AAJMzCQEzESMJASM3CQIRAcfVAXQBhrjX/o3+d7SqATv+xQMx/sYFtv20Akz6SgJI/bj2Ad0B8vwtA7z+MQADAK4AAAScBEoACQAMAA8AAJMzCQEzESMJASM3EwMBEQOu0QErATm50f7V/sK0ovb2Aqj0BEr+UgGu+7YBqP5YzQFQAWL9TAKk/rgAAfw5BIv/gwW6AA8AAIEyFhUjNCYjISImNTMUFjP+wWdbby44/k5oW28vNwVYXHE4K1txNysAAfxUBHv+gQXLAAcAAIEzFSEVIRUj/FRqAcP+PWoFy3NqcwAAAfxUBHv+gQXLAAcAAIEjNSE1ITUz/oFq/j0Bw2oEe3NqcwAAAQDH/+wFWga2ACcAAIE2MzIWFRQHMyAAERQCBCMiJjURMxEUFjMyADU0JCEjNTc2NTQrAQcB0RY0Z11eJwFLAWe9/rXb2ta4cZnxAR7+9f7uoh1FSxAPBrIEX09tif6z/s7G/sKjpbkDK/z8hGQBFen69JkrY0NOAgABAK7/7AR7BhkAKAAAgTYzMhYVFAYHMzIAFRQCBCMgGQEzERQWMzI+ATU0JisBNTc2NTQmKwEBrBRKVV8sNAz6AReZ/vK1/o+0Y3Z4sF7a22AgSyomGwYUBWNSN4la/un6sP7uiwE7ApX9jmZjasJ6z8aOMG5TKS0AAAIAMQBSBn0EfwANABsAAIEGIyImNTQ2MzIWFwEHAQYjIiY1NDYzMhYXAQcDYCg4P05QPzNQJQLTffsfKjc/TlE/M08lAtN9A4UfTkBBSikt/I9mAzMfTkBBSikt/I9mAAIAMwBSBD0EfwANABkAALcnAT4BMzIWFRQGIyInATQ2MzIWFRQGIyImsH0C0yVQMz9QTj84KP6yQTw9REQ9O0JSZgNxLSlKQT9PH/1iREZIQkBLSAAAAgAxAFIEOwR/AA0AGQAAgQYjIiY1NDYzMhYXAQclFAYjIiY1NDYzMhYBHyo3P05RPzNPJQLTff6vQzo8RUM+PEEDhR9OQEFKKS38j2aVQUpLQEFJSAACADMAUgZ/BH8ADQAbAAC3JwE+ATMyFhUUBiMiJwMnAT4BMzIWFRQGIyInsH0C0yVQMz9QTj84KF59AtMlUDM/UE4/NypSZgNxLSlKQT9PH/zNZgNxLSlKQT9PHwAAAQA9ACEChwQrABcAAIEiBhUUFhcWFRQGIzUyNjU0JicmNTQ2MwKHiIQeKkfs4ZKLIiVI6dMDllBYJ0pAbHGco5lLUy9YOWplmKwAAAMASAAAAyECJQANABgAIwAAoSM0Jy4BPQEzFBYXFhUlNDMyFhUUBiMiJiU0MzIWFRQGIyImAlSLZDUwkzAxYP30YCg6OigqNgIWYCc8PCcqNo18QG06NTxuO3iJxWkwOTgyMkJpMjc2NjYAAAEAZAP2AhIFcwAIAACBJic1Mx4BFxUB47rFH3rSQwP2uhOwF39ghwAB/MwE2QAABWoAAwAAASEVIfzMAzT8zAVqkQAAAQAABNkDNAVqAAMAABEhFSEDNPzMBWqRAAAB/YAE2QKABWoAAwAAASEVIf2ABQD7AAVqkQAAAf6sBqYBVAcFAAMAAAEhFSH+rAKo/VgHBV8AAAH95AamAhwHBQADAAABIRUh/eQEOPvIBwVfAAAB/P4GpgMCBwUAAwAAASEVIfz+BgT5/AcFXwAAAfyaBqYDZgcFAAMAAAEhFSH8mgbM+TQHBV8AAAH7tAamBEwHBQADAAABIRUh+7QImPdoBwVfAAABAAD+twDT/5wACwAAFTQ2MzIWFRQGIyImPS0qPz8qLT3WPDY2PDs4OAAC/YAE2QKABc4AAwAHAAABIRUhNSEVIf2ABQD7AAUA+wAFJEv1SwAAAf6sBNkBVAVqAAMAAAEhFSH+rAKo/VgFapEAAAH95ATZAhwFagADAAABIRUh/eQEOPvIBWqRAAAB/P4E2QMCBWsAAwAAASEVIfz+BgT5/AVrkgAAAfyaBNkDZgVrAAMAAAEhFSH8mgbM+TQFa5IAAAH7tATZBEwFawADAAABIRUh+7QImPdoBWuSAAAC/qwE2QFUBc4AAwAHAAABIRUhNSEVIf6sAqj9WAKo/VgFJEv1SwAAAv3kBNkCHAXOAAMABwAAASEVITUhFSH95AQ4+8gEOPvIBSRL9UsAAAL8/gTZAwIFzgADAAcAAAEhFSE1IRUh/P4GBPn8BgT5/AUkS/VLAAAC/JoE2QNmBc4AAwAHAAABIRUhNSEVIfyaBsz5NAbM+TQFJEv1SwAAAvu0BNkETAXOAAMABwAAASEVITUhFSH7tAiY92gImPdoBSRL9UsAAAAADwC6AAMAAQQJAAAAXgAAAAMAAQQJAAEAIABeAAMAAQQJAAIADgB+AAMAAQQJAAMARgCMAAMAAQQJAAQAIABeAAMAAQQJAAUAGADSAAMAAQQJAAYAHADqAAMAAQQJAAcApAEGAAMAAQQJAAgAKgGqAAMAAQQJAAkAKAHUAAMAAQQJAAoAQAH8AAMAAQQJAAsAPAI8AAMAAQQJAAwAPAJ4AAMAAQQJAA0AXAK0AAMAAQQJAA4AVAMQAEMAbwBwAHkAcgBpAGcAaAB0ACAAMgAwADEAMwAgAEcAbwBvAGcAbABlACAASQBuAGMALgAgAEEAbABsACAAUgBpAGcAaAB0AHMAIABSAGUAcwBlAHIAdgBlAGQALgBOAG8AdABvACAAUwBhAG4AcwAgAEMAbwBwAHQAaQBjAFIAZQBnAHUAbABhAHIATQBvAG4AbwB0AHkAcABlACAASQBtAGEAZwBpAG4AZwAgAC0AIABOAG8AdABvACAAUwBhAG4AcwAgAEMAbwBwAHQAaQBjAFYAZQByAHMAaQBvAG4AIAAxAC4AMAAwAE4AbwB0AG8AUwBhAG4AcwBDAG8AcAB0AGkAYwBOAG8AdABvACAAaQBzACAAYQAgAHQAcgBhAGQAZQBtAGEAcgBrACAAbwBmACAARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAYQBuAGQAIABtAGEAeQAgAGIAZQAgAHIAZQBnAGkAcwB0AGUAcgBlAGQAIABpAG4AIABjAGUAcgB0AGEAaQBuACAAagB1AHIAaQBzAGQAaQBjAHQAaQBvAG4AcwAuAE0AbwBuAG8AdAB5AHAAZQAgAEkAbQBhAGcAaQBuAGcAIABJAG4AYwAuAE0AbwBuAG8AdAB5AHAAZQAgAEQAZQBzAGkAZwBuACAAdABlAGEAbQBEAGUAcwBpAGcAbgBlAGQAIABiAHkAIABNAG8AbgBvAHQAeQBwAGUAIABkAGUAcwBpAGcAbgAgAHQAZQBhAG0AaAB0AHQAcAA6AC8ALwBjAG8AZABlAC4AZwBvAG8AZwBsAGUALgBjAG8AbQAvAHAALwBuAG8AdABvAC8AaAB0AHQAcAA6AC8ALwB3AHcAdwAuAG0AbwBuAG8AdAB5AHAAZQAuAGMAbwBtAC8AcwB0AHUAZABpAG8ATABpAGMAZQBuAHMAZQBkACAAdQBuAGQAZQByACAAdABoAGUAIABBAHAAYQBjAGgAZQAgAEwAaQBjAGUAbgBzAGUALAAgAFYAZQByAHMAaQBvAG4AIAAyAC4AMABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBwAGEAYwBoAGUALgBvAHIAZwAvAGwAaQBjAGUAbgBzAGUAcwAvAEwASQBDAEUATgBTAEUALQAyAC4AMAAAAAMAAAAAAAD/ZgBmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAgAAv//AAMAAQAAAAwAAABAAAAAAgAIAAAAGAABABkAHwADACAALQABAC4ALgADAC8AnQABAJ4AoAADAKEAqQABAKoAvQADAAQAAAABAAAAAQAAAAoANAB6AAJERkxUABxjb3B0AA4ABAAAAAD//wACAAAAAgAEAAAAAP//AAIAAQADAARtYXJrABptYXJrAChta21rADZta21rAD4AAAAFAAAAAQACAAMABAAAAAUAAAABAAIAAwAEAAAAAgAFAAYAAAACAAUABgAHABAAGAAgACgAMAA4AEAABAAAAAEAOAAEAAAAAQF8AAQAAAABAngABAAAAAEDvAAEAAAAAQUAAAYAAAABBkQABgAAAAEGxAABARQBNgABAAwAPgAMAAAHOgAABzoAAAc0AAAHQAAABzQAAAdGAAAHTAAACCoAAAgwAAAIMAAACDYAAAg2AGoG9gc+ByAHPgcmB0QHLAc+BvYHPgcmBz4HJgdKBvYHUAcsB1AHMgdWByYHPgcmB1wG9gdiBywHaAcmB24HLAd0BvYHUAcmB3oG9gc+ByYHPgcmB0QHLAb2ByYHgAcsB4YHOAeMB5gHRAcmB0QHJgc+ByYHRAcgB0QHngekB54HpAeqB0QHsAcsB7YHRAe8B0QHJgc+ByYHPgcmB0QHwgfIByYHRAcmB5gHzgfUB9oHXAb2B1AH4Ad0B6oH5gcmB4AHngfsB6oHUAcsB3QHngfyBvYHkgACAAUAGQAcAAAAHgAfAAQALgAuAAYAngCgAAcAqgCrAAoAAgADAC8AkgAAAJoAnQBkAKEAogBoAAEA6ADuAAEADAASAAEAAAc+AGoHPgeYB0QHRAc+B5gHSgdcB1AHRAdWB54HPgekB1wHqgdiB6oHaAewB0QHPgc+B5gHbge2B3QHRAc+B6QHUAeqB24HvAc+B8IHege8B4AHhgeGB8gHUAfOBz4HPgdKB9QHjAfaB7wHMge8BzIHvAhGB7wHMge8BzIICghMCAoITAduCFIIEAhYCBYIXggcCGQIIghqB7wIcAgoCHYILgcyB7wHMge8CHwINAiCCDoIiAd0CHwIQAiIB0QHgAdEB4YH8gf+B/gIBAfgB+wHXAfmB5IHvAABAAEAsgACAAMALwCSAAAAmgCdAGQAoQCiAGgAAQEmATYAAQAMACYABgAABN4AAATeAAAE3gAABN4AAATeAAAE3gB/BQAGCAX8BdgF/AXYBd4F2AYOBgIF/AXeBd4F3gX8BdgF/AXYBd4F8AYOBgIF/AXYBd4F8AXeBfAF/AYCBg4F2AXkBeoF3gXYBd4F8AX8BgIGDgYCBd4F8AYOBdgF/AXYBd4F2AX8BdgF3gXYBd4F2AYOBfwF3gXYBg4GAgUABggF/AXYBd4F2AX8BdgF3gXwBfwF2AYOBgIGDgYCBfwF2AUABg4F3gXwBfYF8AXeBdgF3gXYBd4F2AXeBdgF3gXwBd4F3gX2BfAF3gXYBfwGAgYOBgIF/AX8Bd4F8AYOBgIF/AXYBdgGDgX8Bg4F/AX8BhQGDgXYBg4GAgX8Bd4AAgACAB0AHQAAAK0AsQABAAIAAwAgAC0AAAAvAJ0ADgChAKIAfQABASYBNgABAAwAJgAGAAAEmgAABJoAAASaAAAEmgAABJoAAASaAH8DtAS8BLAEjASwBIwEkgSMBMIEtgSwBJIEkgSSBLAEjASwBIwEkgSkBMIEtgSwBIwEkgSkBJIEpASwBLYEwgSMBJgEngSSBIwEkgSkBLAEtgTCBLYEkgSkBMIEjASwBIwEkgSMBLAEjASSBIwEkgSMBMIEsASSBIwEwgS2A7QEvASwBIwEkgSMBLAEjASSBKQEsASMBMIEtgTCBLYEsASMA7QEwgSSBKQEqgSkBJIEjASSBIwEkgSMBJIEjASSBKQEkgSSBKoEpASSBIwEsAS2BMIEtgSwBLAEkgSkBMIEtgSwBIwEjATCBLAEwgSwBLAEyATCBIwEwgS2BLAEkgACAAIArACsAAAAtAC4AAEAAgADACAALQAAAC8AnQAOAKEAogB9AAEBJgE2AAEADAAmAAYAAAJMAAACTAAAAkwAAAJMAAACTAAAAkwAfwJoA3ADZANAA2QDQANGA0ADdgNqA2QDRgNGA0YDZANAA2QDQANGA1gDdgNqA2QDQANGA1gDRgNYA2QDagN2A0ADTANSA0YDQANGA1gDZANqA3YDagNGA1gDdgNAA2QDQANGA0ADZANAA0YDQANGA0ADdgNkA0YDQAN2A2oCaANwA2QDQANGA0ADZANAA0YDWANkA0ADdgNqA3YDagNkA0ACaAN2A0YDWANeA1gDRgNAA0YDQANGA0ADRgNAA0YDWANGA0YDXgNYA0YDQANkA2oDdgNqA2QDZANGA1gDdgNqA2QDQANAA3YDZAN2A2QDZAN8A3YDQAN2A2oDZANGAAIAAgCzALMAAAC5AL0AAQACAAMAIAAtAAAALwCdAA4AoQCiAH0AAQBQAGwAAQAMADYACgAAAQYAAAEGAAABAAAAAQwAAAEAAAABEgAAARgAAAH2AAAB/AAAAfwADAHeAd4B3gHeAd4B3gDQANAA0ADQANAA0AACAAQAGQAcAAAAHgAfAAQALgAuAAYAngCgAAcAAgAEAB0AHQAAAK0AsQABALMAswAGALkAvQAHAAEARgBiAAEADAA2AAoAAAB+AAAAfgAAAHgAAACEAAAAeAAAAIoAAACQAAABbgAAAXQAAAF0AAcDAAL6AvoC+gL6AvoC+gACAAQAGQAcAAAAHgAfAAQALgAuAAYAngCgAAcAAgADABwAHAAAAKwArAABALQAuAACAAEC5AZ8AAEAAAZ8AAEAAATTAAH9lATTAAH9gASwAAH/BgTTAAH56ATTAAECgAZ8AAECbAZ8AAEDUgZ8AAEBQAZ8AAEEQgZ8AAECMATTAAEB9ATTAAEB4ATTAAECbATTAAEA+gTTAAEBpATTAAEDDATTAAECgATTAAEBzATTAAECWATTAAECCATTAAECHATTAAECxgTTAAEDNATTAAECMAZ8AAECWAZ8AAEDIAZ8AAEC0ATTAAECvAZ8AAEEEAZ8AAECRAZ8AAECHAZ8AAEDDAZ8AAECqATTAAEBkAZ8AAEBaATTAAEBuAZ8AAEDNAZ8AAECqAZ8AAEC5ATTAAEClATTAAH8GATTAAH9dgRvAAEAAASwAAEAAAfQAAECdgTTAAECdgZ8AAEBSgZ8AAEBSgTTAAECEgTTAAECEgZ8AAEC+AZ8AAEC+ATTAAEDXATTAAEDXAZ8AAEEQgTTAAEB/gAAAAEAZAAyAAECMAAAAAECgAAAAAEDUgAAAAEDNAAAAAECMP+cAAEC7gAAAAEDSAAAAAEBLAAAAAEC+AAAAAEC5AAAAAEDIAAAAAECbAAAAAECRAAAAAEEGgAAAAECvAAAAAEB9AAAAAECRP7oAAEBzAAAAAECigAAAAEA+gAAAAEDDAAAAAECdgAAAAECXAAAAAECCP4gAAEC5P5wAAECxv6EAAEDPgAAAAEDTQAAAAECngAAAAECcAAAAAEDQ/7oAAECgP7oAAEC5P5cAAECWP6YAAEDKgAAAAECxAAAAAECAQAAAAEBzQAAAAEDIP9WAAECGwAAAAECKAAAAAEBkP7UAAEDHwAAAAEDcAAAAAECHAAAAAEC2gAAAAECdv+6AAECMgAAAAEBrv6sAAEBsAAAAAECiv8QAAECgP6sAAEBrv7AAAECcwAAAAEBkP5SAAEC2wAAAAEAAAZAAAH9gAZAAAAAAQAAAAoAMACCAAJERkxUABpjb3B0AA4ABAAAAAD//wABAAAABAAAAAD//wABAAEAAmNjbXAADmNjbXAAMAAAAA8AAAABAAIAAwAEAAUABgAHAAgACQAKAAsADAANAA4AAAAPAAAAAQACAAMABAAFAAYABwAIAAkACgALAAwADQAOAB4APgBGAE4AVgBeAGYAbgB2AH4AhgCOAJYAngCmAK4AtgC+AMYAzgDWAN4A5gDuAPYA/gEGAQ4BFgEeASYABgAAAAEA8AAGAAAAAQEIAAYAAAABAVgABgAAAAECAgAGAAAAAQKCAAYAAAABAq4ABgAAAAECxgAGAAAAAQMWAAYAAAABA8AABgAAAAEEQAAGAAAAAQRsAAYAAAABBIQABgAAAAEE1AAGAAAAAQV+AAYAAAABBf4AAQAAAAEGKgABAAAAAQYwAAEAAAABBjYAAQAAAAEGPAABAAAAAQZCAAEAAAABBkgAAQAAAAEGTgABAAAAAQZUAAEAAAABBloAAQAAAAEGYAABAAAAAQZmAAEAAAABBmwAAQAAAAEGcgABAAAAAQZ4AAEAAAABBn4AAwABABgAAQASAAAAAQAAAA8AAQABAB0AAQACAEEAQgADAAEAGAABABIAAAABAAAAEAABAAEAHQACAAoANAA0AAAAOgA6AAEAPAA8AAIARgBGAAMATABMAAQAaABoAAUAdAB2AAYAgACAAAkAgwCEAAoAjgCOAAwAAwABABgAAQASAAAAAQAAABEAAQABAB0AAgAZACIAIgAAACQAJAABACkAKgACAC8ALwAEADEAMQAFADYANwAGAD0APgAIAEcASAAKAEoASgAMAE8ATwANAFMAUwAOAFoAWgAPAF4AXgAQAGEAYQARAGUAZQASAGkAaQATAGwAbAAUAG4AbwAVAIcAiAAXAIoAjAAZAJAAkQAcAJUAlQAeAJcAmAAfAJ0AnQAhAKEAoQAiAAMAAQAYAAEAEgAAAAEAAAASAAEAAQAdAAIAEgAhACEAAAAoACgAAQA1ADUAAgA/AD8AAwBJAEkABABNAE0ABQBZAFkABgBdAF0ABwBgAGAACABrAGsACQBtAG0ACgByAHIACwCJAIkADACPAI8ADQCUAJQADgCWAJYADwCaAJoAEACcAJwAEQADAAEAGAABABIAAAABAAAAEwABAAEAHQACAAQAIAAgAAAAXwBfAAEAcQBxAAIAmQCZAAMAAwABABgAAQASAAAAAQAAABQAAQABAKwAAQACAEEAQgADAAEAGAABABIAAAABAAAAFQABAAEArAACAAoANAA0AAAAOgA6AAEAPAA8AAIARgBGAAMATABMAAQAaABoAAUAdAB2AAYAgACAAAkAgwCEAAoAjgCOAAwAAwABABgAAQASAAAAAQAAABYAAQABAKwAAgAZACIAIgAAACQAJAABACkAKgACAC8ALwAEADEAMQAFADYANwAGAD0APgAIAEcASAAKAEoASgAMAE8ATwANAFMAUwAOAFoAWgAPAF4AXgAQAGEAYQARAGUAZQASAGkAaQATAGwAbAAUAG4AbwAVAIcAiAAXAIoAjAAZAJAAkQAcAJUAlQAeAJcAmAAfAJ0AnQAhAKEAoQAiAAMAAQAYAAEAEgAAAAEAAAAXAAEAAQCsAAIAEgAhACEAAAAoACgAAQA1ADUAAgA/AD8AAwBJAEkABABNAE0ABQBZAFkABgBdAF0ABwBgAGAACABrAGsACQBtAG0ACgByAHIACwCJAIkADACPAI8ADQCUAJQADgCWAJYADwCaAJoAEACcAJwAEQADAAEAGAABABIAAAABAAAAGAABAAEArAACAAQAIAAgAAAAXwBfAAEAcQBxAAIAmQCZAAMAAwABABgAAQASAAAAAQAAABkAAQABALMAAQACAEEAQgADAAEAGAABABIAAAABAAAAGgABAAEAswACAAoANAA0AAAAOgA6AAEAPAA8AAIARgBGAAMATABMAAQAaABoAAUAdAB2AAYAgACAAAkAgwCEAAoAjgCOAAwAAwABABgAAQASAAAAAQAAABsAAQABALMAAgAZACIAIgAAACQAJAABACkAKgACAC8ALwAEADEAMQAFADYANwAGAD0APgAIAEcASAAKAEoASgAMAE8ATwANAFMAUwAOAFoAWgAPAF4AXgAQAGEAYQARAGUAZQASAGkAaQATAGwAbAAUAG4AbwAVAIcAiAAXAIoAjAAZAJAAkQAcAJUAlQAeAJcAmAAfAJ0AnQAhAKEAoQAiAAMAAQAYAAEAEgAAAAEAAAAcAAEAAQCzAAIAEgAhACEAAAAoACgAAQA1ADUAAgA/AD8AAwBJAEkABABNAE0ABQBZAFkABgBdAF0ABwBgAGAACABrAGsACQBtAG0ACgByAHIACwCJAIkADACPAI8ADQCUAJQADgCWAJYADwCaAJoAEACcAJwAEQADAAEAGAABABIAAAABAAAAHQABAAEAswACAAQAIAAgAAAAXwBfAAEAcQBxAAIAmQCZAAMAAgAIAAEArQABAAEAHQACAAgAAQCuAAEAAQAdAAIACAABAK8AAQABAB0AAgAIAAEAsAABAAEAHQACAAgAAQCxAAEAAQAdAAIACAABALQAAQABAKwAAgAIAAEAtQABAAEArAACAAgAAQC2AAEAAQCsAAIACAABALcAAQABAKwAAgAIAAEAuAABAAEArAACAAgAAQC5AAEAAQCzAAIACAABALoAAQABALMAAgAIAAEAuwABAAEAswACAAgAAQC8AAEAAQCzAAIACAABAL0AAQABALM="}; | 30,506 | 30,506 | 0.970858 |
1010ea779350887e14838555eb839b7a356dc9a1 | 1,423 | js | JavaScript | gulp/tasks/auth.js | seyself/ac-jam-vol3 | a0004adc0264a73ed6410904185da5094e4e3f54 | [
"MIT"
] | null | null | null | gulp/tasks/auth.js | seyself/ac-jam-vol3 | a0004adc0264a73ed6410904185da5094e4e3f54 | [
"MIT"
] | null | null | null | gulp/tasks/auth.js | seyself/ac-jam-vol3 | a0004adc0264a73ed6410904185da5094e4e3f54 | [
"MIT"
] | null | null | null | module.exports = function(gulp, config, argv)
{
gulp.task("auth", function(done){
var exec = require("child_process").execSync;
var path = require("path");
var fs = require('fs');
var authFile = path.join('../../', config.auth);
config.auth = require(authFile).basic;
config.auth.dest = config.env.static;
var htaccess = "AuthType Basic\n";
htaccess += 'AuthName "[' + config.auth.project + '] Please enter your ID and password."\n';
htaccess += 'AuthUserFile ' + config.auth.remotePath + '.htpasswd' + '\n';
htaccess += 'require valid-user\n';
if (config.auth.indexes)
{
htaccess += 'Options Indexes\n';
}
htaccess += '\n';
htaccess += 'Satisfy Any\n';
htaccess += 'Order Allow,Deny\n';
htaccess += '\n';
htaccess += 'SetEnvIf User-Agent "^facebookexternalhit.*$" fb_crawler\n';
htaccess += 'SetEnvIf User-Agent "^facebookplatform.*$" fb_crawlers\n';
htaccess += 'Allow from env=fb_crawler\n';
htaccess += '\n';
htaccess += 'SetEnvIf User-Agent "^Twitterbot.*$" tw_crawler\n';
htaccess += 'Allow from env=tw_crawler\n';
htaccess += '\n';
var passwd = path.join(config.auth.dest, '.htpasswd');
var access = path.join(config.auth.dest, '.htaccess');
fs.writeFileSync(access, htaccess, 'utf8');
exec('htpasswd -ndb ' + config.auth.user + ' ' + config.auth.pass + ' > ' + passwd);
done();
});
};
| 35.575 | 96 | 0.614898 |
1010fcf4328e06294b8218f56dfd66ae068671dc | 405 | js | JavaScript | node_modules/@material-ui/core/styles/useTheme.js | adastra-react/OnlineArcadeAdminPanel | 167c69d1477fb159f016c9a3f367a9dbd576fdfd | [
"MIT"
] | null | null | null | node_modules/@material-ui/core/styles/useTheme.js | adastra-react/OnlineArcadeAdminPanel | 167c69d1477fb159f016c9a3f367a9dbd576fdfd | [
"MIT"
] | null | null | null | node_modules/@material-ui/core/styles/useTheme.js | adastra-react/OnlineArcadeAdminPanel | 167c69d1477fb159f016c9a3f367a9dbd576fdfd | [
"MIT"
] | null | null | null | import { useTheme as useThemeWithoutDefault } from '@material-ui/styles';
import * as React from 'react';
import defaultTheme from './defaultTheme';
export default function useTheme() {
const theme = useThemeWithoutDefault() || defaultTheme;
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line react-hooks/rules-of-hooks
React.useDebugValue(theme);
}
return theme;
} | 31.153846 | 73 | 0.725926 |
10119c01ad1345aab85448e27d3e32dead238b3e | 3,236 | js | JavaScript | static/js/pages-test-index.84a299d0.js | huojiangame/jqcm | 725caaee46ca7b94f21cfd76639d93c794b411a5 | [
"Apache-2.0"
] | null | null | null | static/js/pages-test-index.84a299d0.js | huojiangame/jqcm | 725caaee46ca7b94f21cfd76639d93c794b411a5 | [
"Apache-2.0"
] | null | null | null | static/js/pages-test-index.84a299d0.js | huojiangame/jqcm | 725caaee46ca7b94f21cfd76639d93c794b411a5 | [
"Apache-2.0"
] | null | null | null | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-test-index"],{3687:function(e,t,n){"use strict";var a=n("a0d4"),r=n.n(a);r.a},"3a37":function(e,t,n){var a=n("24fb");t=a(!1),t.push([e.i,".content[data-v-8e1490e8]{display:flex;flex-direction:column;align-items:center;justify-content:center}.logo[data-v-8e1490e8]{height:%?200?%;width:%?200?%;margin-top:%?200?%;margin-left:auto;margin-right:auto;margin-bottom:%?50?%}.text-area[data-v-8e1490e8]{display:flex;justify-content:center}.title[data-v-8e1490e8]{font-size:%?36?%;color:#8f8f94}",""]),e.exports=t},"3fc4":function(e,t,n){"use strict";var a;n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticClass:"content"},[n("v-uni-image",{staticClass:"logo",attrs:{src:"/static/logo.png"}}),n("v-uni-view",{staticClass:"text-area"},[n("v-uni-text",{staticClass:"title"},[e._v(e._s(e.title))])],1)],1)},o=[]},4397:function(e,t,n){"use strict";n.r(t);var a=n("3fc4"),r=n("dfad");for(var o in r)"default"!==o&&function(e){n.d(t,e,(function(){return r[e]}))}(o);n("3687");var i,u=n("f0c5"),c=Object(u["a"])(r["default"],a["b"],a["c"],!1,null,"8e1490e8",null,!1,a["a"],i);t["default"]=c.exports},8034:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRoleInfo=r,t.login=o;var a=n("1ce2");function r(e,t){return a.http.get("/ljxz/get_role_info_t.php",{params:e,header:t})}function o(e){return a.httpForm.post("http://wdsz2.huojiangame.com:11658/ljxz/add_user.php",e)}},a0d4:function(e,t,n){var a=n("3a37");"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var r=n("4f06").default;r("448f0ad8",a,!0,{sourceMap:!1,shadowMode:!1})},badf:function(e,t,n){"use strict";var a=n("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n("96cf");var r=a(n("1da1")),o=n("8034"),i={data:function(){return{title:"Hello"}},onLoad:function(){this.handleGetRoleInfo()},methods:{handleGetRoleInfo:function(){var e=this;return(0,r.default)(regeneratorRuntime.mark((function t(){var n,a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,n={userid:35887505,server_id:28},a={"access-token":"xxxfff-111-333"},t.next=5,(0,o.getRoleInfo)(n,a);case 5:r=t.sent,e.title=r,t.next=12;break;case 9:t.prev=9,t.t0=t["catch"](0),console.log(t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})))()},handleLogin:function(){var e=this;return(0,r.default)(regeneratorRuntime.mark((function t(){var n,a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,n={userid:35887505,last_server_id:28,login_type:1,username:"hangyuhu01",password:"hyh147258",uname_md5:"41b30a4f9854dfb730b0d0d684e1ad03",pwd_md5:"ba3bc34e579bd7fb6ab4df4d8a8fd5cf"},t.next=4,(0,o.login)(n);case 4:a=t.sent,e.title=a,t.next=11;break;case 8:t.prev=8,t.t0=t["catch"](0),console.error(t.t0);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))()}}};t.default=i},dfad:function(e,t,n){"use strict";n.r(t);var a=n("badf"),r=n.n(a);for(var o in a)"default"!==o&&function(e){n.d(t,e,(function(){return a[e]}))}(o);t["default"]=r.a}}]); | 3,236 | 3,236 | 0.682324 |
1011e25f8000ea5f7159ad2f034492f99d970db9 | 413 | js | JavaScript | js/constants.js | beeschurger1/leaf-browser | 69fa22160817b9176857be5545522d791b7d4197 | [
"MIT"
] | 76 | 2016-05-11T09:32:19.000Z | 2019-03-11T18:04:41.000Z | js/constants.js | beeschurger1/leaf-browser | 69fa22160817b9176857be5545522d791b7d4197 | [
"MIT"
] | 9 | 2016-10-14T17:49:08.000Z | 2019-04-15T17:58:07.000Z | js/constants.js | beeschurger1/leaf-browser | 69fa22160817b9176857be5545522d791b7d4197 | [
"MIT"
] | 44 | 2019-09-24T13:14:49.000Z | 2022-03-29T14:55:45.000Z | define([], function(){
'use strict';
var KEYCODES = {
ENTER: 13,
ESC: 27,
F: 70,
L: 76,
N: 78,
Q: 81,
R: 82,
T: 84,
W: 87
};
var REGEXES = {
// Basic regex that tries to attempt to match a domain name
URL_NO_PROTO: /^[a-z0-9\-\_]+(\.[a-z0-9\-\_]+)+(\/.*)?$/,
URL: /^[a-z]+\:\/\/.*$/
};
return {
KEYCODES: KEYCODES,
REGEXES: REGEXES
};
});
| 14.75 | 63 | 0.450363 |
10120fd67446fde942ce416df758e854eeb9972c | 5,207 | js | JavaScript | ui/src/components/selfservice/SelfServiceModal.js | shyovn/consoleme | 471592b718b22f83244609ab47d5bf3f9a715a4d | [
"Apache-2.0"
] | 2,835 | 2020-12-09T19:07:24.000Z | 2022-03-31T06:38:44.000Z | ui/src/components/selfservice/SelfServiceModal.js | shyovn/consoleme | 471592b718b22f83244609ab47d5bf3f9a715a4d | [
"Apache-2.0"
] | 179 | 2020-12-10T01:51:25.000Z | 2022-03-31T02:06:06.000Z | ui/src/components/selfservice/SelfServiceModal.js | shyovn/consoleme | 471592b718b22f83244609ab47d5bf3f9a715a4d | [
"Apache-2.0"
] | 219 | 2020-12-09T21:30:56.000Z | 2022-03-31T05:57:36.000Z | import "./SelfService.css";
import { Button, Divider, Header, Message, Modal } from "semantic-ui-react";
import React, { Component } from "react";
import Editor from "@monaco-editor/react";
import { getLocalStorageSettings } from "../../helpers/utils";
const editor_options = {
selectOnLineNumbers: true,
readOnly: false,
quickSuggestions: true,
scrollbar: {
alwaysConsumeMouseWheel: false,
},
scrollBeyondLastLine: false,
automaticLayout: true,
};
const blank_statement = `{
"Version": "2012-10-17",
"Statement": [
{
"Action": [],
"Effect": "Allow",
"Resource": []
}
]
}`;
class SelfServiceModal extends Component {
constructor(props) {
super(props);
this.state = {
activeIndex: 0,
isError: false,
isLoading: false,
isSuccess: false,
messages: [],
requestId: null,
admin_bypass_approval_enabled: this.props.admin_bypass_approval_enabled,
export_to_terraform_enabled: this.props.export_to_terraform_enabled,
admin_auto_approve: false,
payloadPermissions: [],
modal_statement: this.props.updated_policy,
open: false,
editorTheme: getLocalStorageSettings("editorTheme"),
};
this.onChange = this.onChange.bind(this);
this.editorDidMount = this.editorDidMount.bind(this);
}
addToPolicy() {
const value = this.state.modal_statement;
this.props.updateStatement(value);
this.setState({ open: false });
this.props.updatePolicyMessage(true);
}
editorDidMount(editor, monaco) {
editor.onDidChangeModelDecorations(() => {
const model = editor.getModel();
if (model === null || model.getModeId() !== "json") {
return;
}
const owner = model.getModeId();
const uri = model.uri;
const markers = monaco.editor.getModelMarkers({ owner, resource: uri });
this.onLintError(
markers.map(
(marker) =>
`Lint error on line ${marker.startLineNumber} columns ${marker.startColumn}-${marker.endColumn}:
${marker.message}`
)
);
});
}
buildMonacoEditor(modal_statement) {
if (modal_statement === "") {
modal_statement = blank_statement;
}
return (
<Editor
height="500px"
defaultLanguage="json"
width="100%"
theme={this.state.editorTheme}
value={modal_statement}
onChange={this.onChange}
options={editor_options}
onMount={this.editorDidMount}
textAlign="center"
/>
);
}
onChange(newValue, e) {
this.setState({
modal_statement: newValue,
});
}
onLintError = (lintErrors) => {
if (lintErrors.length > 0) {
this.setState({
messages: lintErrors,
isError: true,
});
} else {
this.setState({
messages: [],
isError: false,
});
}
};
render() {
const {
admin_bypass_approval_enabled,
isError,
messages,
modal_statement,
} = this.state;
const messagesToShow =
messages.length > 0 ? (
<Message negative>
<Message.Header>
We found some problems for this request.
</Message.Header>
<Message.List>
{messages.map((message) => (
<Message.Item>{message}</Message.Item>
))}
</Message.List>
</Message>
) : null;
const submission_buttons = admin_bypass_approval_enabled ? (
<Modal.Actions>
<Button
content="Submit and apply without approval"
disabled={isError}
onClick={this.handleAdminSubmit}
positive
fluid
/>
<Button
content="Submit"
disabled={isError}
onClick={this.handleSubmit}
primary
fluid
/>
</Modal.Actions>
) : (
<Modal.Actions style={{ float: "right", marginBottom: "1em" }}>
<Button onClick={() => this.setState({ open: false })}>Cancel</Button>
<Button
content="Add to Policy"
labelPosition="right"
icon="checkmark"
primary
onClick={this.addToPolicy.bind(this)}
disabled={isError}
/>
</Modal.Actions>
);
const jsonEditor = this.buildMonacoEditor(modal_statement);
return (
// TODO: Resolve lint error with the following line
<Modal
closeIcon
onOpen={() => this.setState({ open: true })}
onClose={() => this.setState({ open: false })}
open={this.state.open}
trigger={<button className="button-link">Advanced Editor</button>}
>
<Header>Advanced Editor</Header>
<Message info color="blue">
<Message.Header>Edit your permissions in JSON format.</Message.Header>
<p>
Helpful text about how to use the Advanced Editor, JSON syntax, etc.
</p>
</Message>
<Modal.Content>
{jsonEditor}
<Divider />
{messagesToShow}
{submission_buttons}
</Modal.Content>
</Modal>
);
}
}
export default SelfServiceModal;
| 25.777228 | 108 | 0.575955 |
101234a562b9a276231a731bb941139cb5998a55 | 1,863 | js | JavaScript | tools/build/linknodemodules.js | WaleedMKasem/angular | 9fbafba993207cba3e23f050f4740fe9a0647d49 | [
"MIT"
] | 1 | 2016-07-03T05:59:48.000Z | 2016-07-03T05:59:48.000Z | tools/build/linknodemodules.js | WaleedMKasem/angular | 9fbafba993207cba3e23f050f4740fe9a0647d49 | [
"MIT"
] | null | null | null | tools/build/linknodemodules.js | WaleedMKasem/angular | 9fbafba993207cba3e23f050f4740fe9a0647d49 | [
"MIT"
] | null | null | null | var fs = require('fs');
var path = require('path');
module.exports = function(gulp, plugins, config) {
function symlink(relativeFolder, linkDir) {
var sourceDir = path.join('..', relativeFolder);
if (!fs.existsSync(linkDir)) {
console.log('creating link', linkDir, sourceDir);
try {
fs.symlinkSync(sourceDir, linkDir, 'dir');
}
catch(e) {
var sourceDir = path.join(config.dir, relativeFolder);
console.log('linking failed: trying to hard copy', linkDir, sourceDir);
copyRecursiveSync(sourceDir, linkDir);
}
}
}
return function() {
var nodeModulesDir = path.join(config.dir, 'node_modules');
if (!fs.existsSync(nodeModulesDir)) {
fs.mkdirSync(nodeModulesDir);
}
getSubdirs(config.dir).forEach(function(relativeFolder) {
if (relativeFolder === 'node_modules') {
return;
}
var linkDir = path.join(nodeModulesDir, relativeFolder);
symlink(relativeFolder, linkDir);
});
// Also symlink tools we release independently to NPM, so tests can require metadata, etc.
symlink('../../tools/metadata', path.join(nodeModulesDir, 'ts-metadata-collector'));
};
};
function copyRecursiveSync (src, dest) {
if (fs.existsSync(src)) {
var stats = fs.statSync(src);
if (stats.isDirectory()) {
fs.mkdirSync(dest);
fs.readdirSync(src).forEach(function(childItemName) {
copyRecursiveSync(path.join(src, childItemName),
path.join(dest, childItemName));
});
} else {
fs.writeFileSync(dest, fs.readFileSync(src));
}
}
}
function getSubdirs(rootDir) {
return fs.readdirSync(rootDir).filter(function(file) {
if (file[0] === '.') {
return false;
}
var dirPath = path.join(rootDir, file);
return fs.statSync(dirPath).isDirectory();
});
}
| 30.048387 | 94 | 0.630703 |
10128d8298066e8fc7eb63dbeb77f700d5745f39 | 1,791 | js | JavaScript | sample/recursiveParentSearch.js | cronvel/fs-kit | fd83f6b8541188ca018d6ecf2fe9cf1fe37f730c | [
"MIT"
] | null | null | null | sample/recursiveParentSearch.js | cronvel/fs-kit | fd83f6b8541188ca018d6ecf2fe9cf1fe37f730c | [
"MIT"
] | null | null | null | sample/recursiveParentSearch.js | cronvel/fs-kit | fd83f6b8541188ca018d6ecf2fe9cf1fe37f730c | [
"MIT"
] | null | null | null | #!/usr/bin/env node
/*
File System Kit
Copyright (c) 2015 - 2020 Cédric Ronvel
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
"use strict" ;
const fsKit = require( '..' ) ;
async function cli() {
var path ;
if ( process.argv[ 3 ] ) {
console.log( 'Searching for: %s from: %s' , process.argv[ 3 ] , process.argv[ 2 ] ) ;
try {
path = await fsKit.recursiveParentSearch( process.argv[ 2 ] , process.argv[ 3 ] ) ;
console.log( 'Found:' , path ) ;
}
catch ( error ) {
console.log( error ) ;
}
}
else {
console.log( 'Searching for:' , process.argv[ 2 ] ) ;
try {
path = await fsKit.recursiveParentSearch( process.argv[ 2 ] ) ;
console.log( 'Found:' , path ) ;
}
catch ( error ) {
console.log( error ) ;
}
}
}
cli() ;
| 29.360656 | 89 | 0.700168 |
1012c76e394926546d220cf2d6badd475ebdb05e | 5,426 | js | JavaScript | src/layouts/PageLayout/PageLayout.js | bushuangshuang/zhonghangyouobject | bcaaca1c057c7cd361f3ca5bd73547f051cba775 | [
"MIT"
] | null | null | null | src/layouts/PageLayout/PageLayout.js | bushuangshuang/zhonghangyouobject | bcaaca1c057c7cd361f3ca5bd73547f051cba775 | [
"MIT"
] | null | null | null | src/layouts/PageLayout/PageLayout.js | bushuangshuang/zhonghangyouobject | bcaaca1c057c7cd361f3ca5bd73547f051cba775 | [
"MIT"
] | null | null | null | import React from 'react'
import { IndexLink, Link } from 'react-router'
import PropTypes from 'prop-types'
import './PageLayout.scss'
import moment from 'moment'
// 引入对应的图片路径
import logoImg from '../../static/img/logo/logo3.png'
import oilImg from '../../static/img/header/油单@2x.png'
import FlightImg from '../../static/img/header/航班@2x.png'
import taskImg from '../../static/img/header/任务@2x.png'
import newImg from '../../static/img/header/新建@2x.png'
import oil2Img from '../../static/img/header/油单@2x.png'
import setImg from '../../static/img/header/设置@2x.png'
import loginoutImg from '../../static/img/header/退出@2x.png'
import AddTaskModal from '../../views/AddTaskModal/AddTaskModal'
import AddOilModal from '../../views/AddOilModal/AddOilModal'
import TaskListDrawer from '../../views/Dispatcher/components/TaskTableDrawer/TaskTableDrawer'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import { hideAddTaskModal, showAddTaskModal } from '../../reducers/AddTaskModalReducer/action'
import { hideAddOilModal, showAddOilModal } from '../../reducers/AddOilModalReducer/action'
import {hideTaskListDrawer,showTaskListDrawer} from '../../reducers/TaskListDrawerReducer/action'
const mapDispatcherToProps = (dispatch) => {
return bindActionCreators({
showAddTaskModal: showAddTaskModal,
hideAddTaskModal: hideAddTaskModal,
showAddOilModal: showAddOilModal,
hideAddOilModal: hideAddOilModal,
hideTaskListDrawer:hideTaskListDrawer,
showTaskListDrawer:showTaskListDrawer,
}, dispatch)
}
const mapStatetoProps = (state) => {
return {
addTaskModal: state.addTaskModalReducer.get('addTaskModal'),
addOilModal: state.addOilModalReducer.get('addOilModal'),
TaskListDrawer: state.TaskListDrawerReducer.get('showTaskListDrawer'),
}
}
@connect(mapStatetoProps, mapDispatcherToProps)
class PageLayout extends React.PureComponent {
constructor () {
super()
this.state = { visible: false, Oil:false }
}
handleCancel = (e) => {
console.log(e)
this.setState({
visible: false,
})
}
componentDidMount () {
console.log(this.props.TaskListDrawer)
}
// TaskDrawer(){
// console.log(1)
// console.log(showTaskListDrawer,'状态');
// this.props.showTaskListDrawer( this.props.TaskListDrawer)
// console.log("sss")
// }
render () {
// if(true){
// return (<div className='page-layout__viewport'>
// {this.props.children}
// </div>)
// }
let queryDate = new Date().toLocaleTimeString()
let now = new Date()
let year = now.getFullYear() // 获取年份
let month = now.getMonth() + 1 // 获取月份 月份要+1
let date = now.getDate() // 获取日期
let queryTime = moment(new Date()).format('hh:mm')
return (
<div className='text-center'>
<div className='pageLayout-head'>
<div className='head-logo'>
<img src={logoImg} alt='' />
</div>
<div className='head-nav-bar'>
<IndexLink to='/' className='nav-item' activeClassName='page-layout__nav-item--active'>
<div className='title-img'>
<img src={oilImg} alt='' />
</div>
<span>油单信息</span>
</IndexLink>
<Link to='/dispatcher' className='nav-item' activeClassName='page-layout__nav-item--active'>
<div className='title-img'>
<img src={FlightImg} alt='' />
</div>
<span>航班信息</span>
</Link>
<div className='nav-item' onClick={this.props.showTaskListDrawer.bind(this,this.props.TaskListDrawer)}>
<div className='title-img'>
<img src={taskImg} alt='' />
</div>
<span >任务列表</span>
</div>
<div className='nav-item' onClick={this.props.showAddTaskModal}>
<div className='title-img'>
<img src={newImg} alt='' />
</div>
<span>新建任务</span>
</div>
<div className='nav-item' onClick={this.props.showAddOilModal}>
<div className='title-img'>
<img src={oil2Img} alt='' />
</div>
<span>油料参数</span>
</div>
<div className='nav-item'>
<div className='title-img'>
<img src={setImg} alt='' />
</div>
<span>设置</span>
</div>
<div className='nav-item'>
<div className='title-img'>
<img src={loginoutImg} alt='' />
</div>
<span>退出</span>
</div>
</div>
<div className='head-time'>
<h3 className='head-date-right'>{queryTime}</h3>
<span className='head-time-right'>{`${year}- ${month}- ${date}`}</span>
</div>
</div>
<div className='page-layout__viewport'>
{this.props.children}
</div>
<AddOilModal visible={this.props.addOilModal} handleCancel={this.props.hideAddOilModal} />
<AddTaskModal visible={this.props.addTaskModal} handleCancel={this.props.hideAddTaskModal} />
<TaskListDrawer visible={this.props.TaskListDrawer} handleCancel={this.props.hideTaskListDrawer}></TaskListDrawer>
</div>
)
}
}
PageLayout.propTypes = {
children: PropTypes.node,
}
export default PageLayout
| 36.662162 | 123 | 0.602101 |
10137fae92a563d49b45f5de26044cdb1d3b86ee | 741 | js | JavaScript | js/requirejs/jquery-plugin/otherclick.js | hisland/hdl-assets | fe141132a655e8bdcc2e5dbba67b6ebc9902a72b | [
"MIT"
] | null | null | null | js/requirejs/jquery-plugin/otherclick.js | hisland/hdl-assets | fe141132a655e8bdcc2e5dbba67b6ebc9902a72b | [
"MIT"
] | null | null | null | js/requirejs/jquery-plugin/otherclick.js | hisland/hdl-assets | fe141132a655e8bdcc2e5dbba67b6ebc9902a72b | [
"MIT"
] | null | null | null | /**
*
*/
define(['jquery', 'kissy'], function($, S){
var OTHER_CLICK = 'otherClick', map = {};
$.data(document, OTHER_CLICK, {});
$(document).on('click', function(e){
S.each($.data(document, OTHER_CLICK), function(v, i, o){
if(check(e.target, map[i][0])){
map[i][1]();
}
});
$.data(document, OTHER_CLICK, {});
});
function check(target, arr){
var out = true, tmp = target;
S.each(arr, function(v, i, o){
if(S.inArray(v, $(target).parents().andSelf().get())){
out = false;
}
});
return out;
}
$.fn[OTHER_CLICK] = function(fn){
var uid = S.guid(OTHER_CLICK);
map[uid] = [this.get(), fn];
this.click(function(){
$.data(document, OTHER_CLICK)[uid] = true;
});
return this;
};
}); | 18.525 | 58 | 0.558704 |
1013a588b2fedcbc320e28c792e77c202803690f | 31,159 | js | JavaScript | packages/core/admin/build/content-type-builder-translation-uk-json.a1b9f71b.chunk.js | aistyler/custom-strapi4 | 249543b89e954ee522858c38996d2b4f8b9f6b6b | [
"MIT"
] | null | null | null | packages/core/admin/build/content-type-builder-translation-uk-json.a1b9f71b.chunk.js | aistyler/custom-strapi4 | 249543b89e954ee522858c38996d2b4f8b9f6b6b | [
"MIT"
] | null | null | null | packages/core/admin/build/content-type-builder-translation-uk-json.a1b9f71b.chunk.js | aistyler/custom-strapi4 | 249543b89e954ee522858c38996d2b4f8b9f6b6b | [
"MIT"
] | null | null | null | (self.webpackChunk_strapi_admin=self.webpackChunk_strapi_admin||[]).push([[8573],{83282:t=>{"use strict";t.exports=JSON.parse('{"attribute.boolean":"Boolean","attribute.boolean.description":"\u0422\u0430\u043a \u0447\u0438 \u043d\u0456, 1 \u0447\u0438 0, \u043f\u0440\u0430\u0432\u0434\u0430 \u0447\u0438 \u0431\u0440\u0435\u0445\u043d\u044f","attribute.component":"\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","attribute.component.description":"\u0413\u0440\u0443\u043f\u0430 \u043f\u043e\u043b\u0435\u0439, \u044f\u043a\u0456 \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u0442\u0438","attribute.date":"Date","attribute.date.description":"\u0415\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u0438\u0431\u043e\u0440\u0443 \u0434\u0430\u0442\u0438 \u0442\u0430 \u0447\u0430\u0441\u0443","attribute.datetime":"\u0414\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441","attribute.dynamiczone":"\u0414\u0438\u043d\u0430\u043c\u0456\u0447\u043d\u0430 \u0437\u043e\u043d\u0430","attribute.dynamiczone.description":"\u0414\u0438\u043d\u0430\u043c\u0456\u0447\u043d\u0438\u0439 \u0432\u0438\u0431\u0456\u0440 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0456\u0432 \u043f\u0456\u0434\u0447\u0430\u0441 \u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u043d\u043d\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0443","attribute.email":"Email","attribute.email.description":"\u041f\u043e\u043b\u0435 email \u0437 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u043e\u044e \u0444\u043e\u0440\u043c\u0430\u0442\u0443","attribute.enumeration":"Enumeration","attribute.enumeration.description":"\u041f\u0435\u0440\u0435\u043b\u0456\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u044c, \u0432\u0438\u0431\u0438\u0440\u0430\u0454\u0442\u044c\u0441\u044f \u043e\u0434\u043d\u0435","attribute.json":"JSON","attribute.json.description":"\u0406\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0456 JSON","attribute.media":"Media","attribute.media.description":"\u0424\u0430\u0439\u043b\u0438, \u044f\u043a-\u0442\u043e \u043a\u0430\u0440\u0442\u043d\u043a\u0438, \u0432\u0456\u0434\u0435\u043e \u0442\u043e\u0449\u043e","attribute.null":" ","attribute.number":"Number","attribute.number.description":"\u0427\u0438\u0441\u043b\u0430 (integer, float, decimal)","attribute.password":"Password","attribute.password.description":"\u041f\u043e\u043b\u0435 \u043f\u0430\u0440\u043e\u043b\u044e \u0437 \u0448\u0438\u0444\u0440\u0443\u0432\u0430\u043d\u043d\u044f\u043c","attribute.relation":"Relation","attribute.relation.description":"\u0417\u0432\'\u044f\u0437\u043e\u043a \u0437 Collection Type","attribute.richtext":"Rich text","attribute.richtext.description":"\u0422\u0435\u043a\u0441\u0442 \u0437 \u043c\u043e\u0436\u043b\u0438\u0432\u0456\u0441\u0442\u044e \u0444\u043e\u0440\u043c\u0430\u0442\u0443\u0432\u0430\u043d\u043d\u044f","attribute.text":"Text","attribute.text.description":"\u041a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0430\u0431\u043e \u0434\u043e\u0432\u0433\u0438\u0439 \u0442\u0435\u043a\u0441\u0442, \u044f\u043a \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0447\u0438 \u043e\u043f\u0438\u0441","attribute.time":"Time","attribute.timestamp":"\u041c\u0456\u0442\u043a\u0430 \u0447\u0430\u0441\u0443","attribute.uid":"UID","attribute.uid.description":"\u0423\u043d\u0456\u043a\u0430\u043b\u044c\u043d\u0438\u0439 \u0456\u0434\u0435\u043d\u0442\u0438\u0444\u0456\u043a\u0430\u0442\u043e\u0440","button.attributes.add.another":"\u0414\u043e\u0434\u0430\u0442\u0435 \u0449\u0435 \u043e\u0434\u043d\u0435 \u043f\u043e\u043b\u0435","button.component.add":"\u0414\u043e\u0434\u0430\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","button.component.create":"\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","button.model.create":"\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 Collection Type","button.single-types.create":"\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 Single Type","component.repeatable":"(\u043f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u043d\u0438\u0439)","components.componentSelect.no-component-available":"\u0412\u0438 \u0432\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0432\u0441\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438","components.componentSelect.no-component-available.with-search":"\u041d\u0435\u043c\u0430\u0454 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0456\u0432, \u044f\u043a\u0456 \u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u0430\u044e\u0442\u044c \u0432\u0430\u0448\u0435\u043c\u0443 \u0437\u0430\u043f\u0438\u0442\u0443","components.componentSelect.value-component":"{number} \u0432\u0438\u0431\u0440\u0430\u043d\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0456\u0432 (\u043d\u0430\u043f\u0438\u0448\u0456\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0448\u0443\u043a\u0443)","components.componentSelect.value-components":"{number} \u0432\u0438\u0431\u0440\u0430\u043d\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0456\u0432","configurations":"\u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f","contentType.collectionName.description":"\u041a\u043e\u0440\u0438\u0441\u043d\u043e, \u043a\u043e\u043b\u0438 \u043d\u0430\u0437\u0432\u0430 \u0432\u0430\u0448\u0435\u0433\u043e Content Type \u0442\u0430 \u0432\u0430\u0448\u043e\u0457 \u0442\u0430\u0431\u043b\u0438\u0446\u0456 \u0440\u0456\u0437\u043d\u0456","contentType.collectionName.label":"\u041d\u0430\u0437\u0432\u0430 \u043a\u043e\u043b\u0435\u043a\u0446\u0456\u0457","contentType.displayName.label":"\u041d\u0430\u0437\u0432\u0430 \u0434\u043b\u044f \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u043d\u044f","contentType.kind.change.warning":"\u0412\u0438 \u0442\u0456\u043b\u044c\u043a\u0438 \u0449\u043e \u0437\u043c\u0456\u043d\u0438\u043b\u0438 \u0442\u0438\u043f Content Type: API \u0431\u0443\u0434\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u0435 (\u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0438, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0435\u0440\u0438 \u0442\u0430 \u0441\u0435\u0440\u0432\u0456\u0441\u0438 \u0431\u0443\u0434\u0443\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043d\u0456).","error.attributeName.reserved-name":"\u0426\u044f \u043d\u0430\u0437\u0432\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0431\u0443\u0434\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u043e\u0433\u043e Content Type, \u0442\u0430\u043a \u044f\u043a \u0432\u043e\u043d\u043e \u043c\u043e\u0436\u0435 \u0437\u043b\u0430\u043c\u0430\u0442\u0438 \u0456\u043d\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c","error.contentTypeName.reserved-name":"\u0426\u044f \u043d\u0430\u0437\u0432\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0431\u0443\u0434\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u0430 \u0443 \u0432\u0430\u0448\u043e\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0456, \u0442\u0430\u043a \u044f\u043a \u0432\u043e\u043d\u043e \u043c\u043e\u0436\u0435 \u0437\u043b\u0430\u043c\u0430\u0442\u0438 \u0456\u043d\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0456\u043e\u043d\u0430\u043b\u044c\u043d\u0456\u0441\u0442\u044c","error.validation.enum-duplicate":"\u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u043d\u0435 \u043c\u043e\u0436\u0443\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u0442\u0438\u0441\u044c","error.validation.minSupMax":"\u041d\u0435 \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0431\u0456\u043b\u044c\u0448\u0435","error.validation.regex":"\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0438\u0439 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u0438\u0439 \u0432\u0438\u0440\u0430\u0437","error.validation.relation.targetAttribute-taken":"\u0426\u0435 \u0456\u043c\'\u044f \u0432\u0436\u0435 \u0456\u0441\u043d\u0443\u0454 \u0432 \u0446\u0456\u043b\u044c\u043e\u0432\u0456\u0439 \u043c\u043e\u0434\u0435\u043b\u0456","form.attribute.component.option.add":"\u0414\u043e\u0434\u0430\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","form.attribute.component.option.create":"\u0414\u043e\u0434\u0430\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","form.attribute.component.option.create.description":"\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u0442\u044c\u0441\u044f \u0432 \u0442\u0438\u043f\u0430\u0445 \u0442\u0430 \u0456\u043d\u0448\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445, \u0432\u0456\u043d \u0431\u0443\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0438\u0439 \u0432\u0441\u044e\u0434\u0438.","form.attribute.component.option.repeatable":"\u041f\u043e\u0432\u0442\u043e\u0440\u044e\u0432\u0430\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","form.attribute.component.option.repeatable.description":"\u041f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0438\u043d\u043d\u0438\u0445 \u043e\u0431\'\u0454\u043a\u0442\u0456\u0432 (\u043c\u0430\u0441\u0438\u0432\u0443), \u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u0456\u043d\u0433\u0440\u0438\u0434\u0456\u0454\u043d\u0442\u0456\u0432, \u043c\u0435\u0442\u0430\u0442\u0435\u0433\u0456\u0432 \u0442\u043e\u0449\u043e...","form.attribute.component.option.reuse-existing":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u0442\u0438 \u0456\u0441\u043d\u0443\u044e\u0447\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","form.attribute.component.option.reuse-existing.description":"\u0412\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0439\u0442\u0435 \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0438\u0439 \u0432\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0449\u043e\u0431 \u043f\u0456\u0434\u0442\u0440\u0438\u043c\u0443\u0432\u0430\u0442\u0438 \u0443\u0437\u0433\u043e\u0434\u0436\u0435\u043d\u043d\u0456\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u0438\u0445 \u0441\u0435\u0440\u0435\u0434 \u0440\u0456\u0437\u043d\u0438\u0445 Content Types.","form.attribute.component.option.single":"\u041e\u0434\u0438\u043d\u0438\u0447\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","form.attribute.component.option.single.description":"\u041f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u0443\u0432\u0430\u043d\u043d\u044f \u043f\u043e\u043b\u0435\u0439, \u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043f\u043e\u0432\u043d\u0430 \u0430\u0434\u0440\u0435\u0441\u0430, \u043e\u0441\u043d\u043e\u0432\u043d\u0430 \u0456\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0456\u044f \u0442\u043e\u0449\u043e...","form.attribute.item.customColumnName":"\u0412\u043b\u0430\u0441\u043d\u0456 \u043d\u0430\u0437\u0432\u0438 \u0441\u0442\u043e\u0432\u043f\u0446\u0456\u0432","form.attribute.item.customColumnName.description":"\u041a\u043e\u0440\u0438\u0441\u043d\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0439\u043c\u0435\u043d\u0443\u0432\u0430\u043d\u043d\u044f \u043d\u0430\u0437\u0432 \u0441\u0442\u043e\u0432\u043f\u0446\u0456\u0432 \u0443 \u0431\u0430\u0437\u0456 \u0434\u0430\u043d\u0438\u0445 \u0434\u043b\u044f \u043f\u0456\u0434\u0442\u0440\u0438\u043c\u043a\u0438 \u0431\u0456\u043b\u044c\u0448 \u0437\u0440\u043e\u0437\u0443\u043c\u0456\u043b\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u0435\u0439 API","form.attribute.item.date.type.date":"\u0434\u0430\u0442\u0430","form.attribute.item.date.type.datetime":"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441","form.attribute.item.date.type.time":"\u0447\u0430\u0441","form.attribute.item.defineRelation.fieldName":"\u041d\u0430\u0437\u0432\u0430 \u043f\u043e\u043b\u044f","form.attribute.item.enumeration.graphql":"\u041d\u0430\u0437\u0432\u0430 \u043f\u043e\u043b\u044f \u0434\u043b\u044f GraphQL","form.attribute.item.enumeration.graphql.description":"\u0414\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u043f\u0435\u0440\u0435\u0439\u043c\u0435\u043d\u0443\u0432\u0430\u0442\u0438 \u0437\u0433\u0435\u043d\u0435\u0440\u043e\u0432\u0430\u043d\u0443 \u0434\u043b\u044f GraphQL \u043d\u0430\u0437\u0432\u0443 \u043f\u043e\u043b\u044f","form.attribute.item.enumeration.placeholder":"\u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434:\\n\u0440\u0430\u043d\u043e\u043a\\n\u0434\u0435\u043d\u044c\\n\u0432\u0435\u0447\u0456\u0440","form.attribute.item.enumeration.rules":"\u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f (\u043e\u0434\u043d\u0435 \u043d\u0430 \u0440\u044f\u0434\u043e\u043a)","form.attribute.item.maximum":"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f","form.attribute.item.maximumLength":"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430 \u0434\u043e\u0432\u0436\u0438\u043d\u0430","form.attribute.item.minimum":"\u041c\u0456\u043d\u0456\u043c\u0430\u043b\u044c\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f","form.attribute.item.minimumLength":"\u041c\u0456\u043d\u0456\u043c\u0430\u043b\u044c\u043d\u0430 \u0434\u043e\u0432\u0436\u0438\u043d\u0430","form.attribute.item.number.type":"\u0424\u043e\u0440\u043c\u0430\u0442 \u0447\u0438\u0441\u043b\u0430","form.attribute.item.number.type.biginteger":"big integer (ex: 123456789)","form.attribute.item.number.type.decimal":"decimal (ex: 2.22)","form.attribute.item.number.type.float":"float (ex: 3.33333333)","form.attribute.item.number.type.integer":"integer (ex: 10)","form.attribute.item.privateField":"\u041f\u0440\u0438\u0432\u0430\u0442\u043d\u0435 \u043f\u043e\u043b\u0435","form.attribute.item.privateField.description":"\u0426\u0435 \u043f\u043e\u043b\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435 \u0432\u0456\u0434\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0438\u0441\u044f \u0443 \u0432\u0456\u0434\u043f\u043e\u0432\u0456\u0434\u0456 API","form.attribute.item.requiredField":"\u041e\u0431\u043e\u0432\'\u044f\u0437\u043a\u043e\u0432\u0435 \u043f\u043e\u043b\u0435","form.attribute.item.requiredField.description":"\u0412\u0438 \u043d\u0435 \u0437\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0437\u0430\u043f\u0438\u0441 \u044f\u043a\u0449\u043e \u043d\u0435 \u0437\u0430\u043f\u043e\u0432\u043d\u0438\u0442\u0435 \u0446\u0435 \u043f\u043e\u043b\u0435","form.attribute.item.settings.name":"\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f","form.attribute.item.text.regex":"\u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u0438\u0439 \u0432\u0438\u0440\u0430\u0437 (RegExp)","form.attribute.item.text.regex.description":"\u0428\u0430\u0431\u043b\u043e\u043d \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0432\u0438\u0440\u0430\u0437\u0443.","form.attribute.item.uniqueField":"\u0423\u043d\u0456\u043a\u0430\u043b\u044c\u043d\u0435 \u043f\u043e\u043b\u0435","form.attribute.item.uniqueField.description":"\u0412\u0438 \u043d\u0435 \u0437\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0437\u0430\u043f\u0438\u0441, \u044f\u043a\u0449\u043e \u0432\u0436\u0435 \u0456\u0441\u043d\u0443\u0454 \u0437\u0430\u043f\u0438\u0441 \u0456\u0437 \u0442\u0430\u043a\u0438\u043c \u0441\u0430\u043c\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f\u043c \u043f\u043e\u043b\u044f","form.attribute.media.allowed-types":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u0434\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0456 \u0442\u0438\u043f\u0438 \u043c\u0435\u0434\u0456\u0430","form.attribute.media.allowed-types.none":"\u0416\u043e\u0434\u0435\u043d","form.attribute.media.allowed-types.option-files":"\u0424\u0430\u0439\u043b\u0438","form.attribute.media.allowed-types.option-images":"\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0438","form.attribute.media.allowed-types.option-videos":"\u0412\u0456\u0434\u0435\u043e","form.attribute.media.option.multiple":"\u041c\u043d\u043e\u0436\u0438\u043d\u043d\u0456 \u043c\u0435\u0434\u0456\u0430","form.attribute.media.option.multiple.description":"\u041f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u0441\u043b\u0430\u0439\u0434\u0435\u0440\u0456\u0432, \u043a\u0430\u0440\u0443\u0441\u0435\u043b\u0435\u0439 \u0430\u0431\u043e \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u043a\u0456\u043b\u044c\u043a\u043e\u0445 \u0444\u0430\u0439\u043b\u0456\u0432","form.attribute.media.option.single":"\u041e\u0434\u0438\u043d\u0438\u0447\u043d\u0435 \u043c\u0435\u0434\u0456\u0430","form.attribute.media.option.single.description":"\u041f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u0430\u0432\u0430\u0442\u0430\u0440\u043e\u043a, \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u043f\u0440\u043e\u0444\u0456\u043b\u044f \u0430\u0431\u043e \u043e\u0431\u043a\u043b\u0430\u0434\u0438\u043d\u043e\u043a","form.attribute.settings.default":"\u0417\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0437\u0430 \u0437\u0430\u043c\u043e\u0432\u0447\u0443\u0432\u0430\u043d\u043d\u044f\u043c","form.attribute.text.option.long-text":"\u0414\u043e\u0432\u0433\u0438\u0439 \u0442\u0435\u043a\u0441\u0442","form.attribute.text.option.long-text.description":"\u041f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0456\u0432, \u0442\u0435\u043a\u0441\u0442\u0443 \u043f\u0440\u043e \u0441\u0435\u0431\u0435. \u0422\u043e\u0447\u043d\u0438\u0439 \u043f\u043e\u0448\u0443\u043a \u0432\u0438\u043c\u043a\u043d\u0435\u043d\u043e.","form.attribute.text.option.short-text":"\u041a\u043e\u0440\u043e\u0442\u043a\u0438\u0439 \u0442\u0435\u043a\u0441\u0442","form.attribute.text.option.short-text.description":"\u041f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0437\u0432, \u0456\u043c\u0435\u043d, \u043f\u043e\u0441\u0438\u0430\u043b\u0430\u043d\u044c (URL). \u0414\u043e\u0437\u0432\u043e\u043b\u044f\u0454 \u0442\u043e\u0447\u043d\u0438\u0439 \u043f\u043e\u0448\u0443\u043a \u043f\u043e \u0446\u044c\u043e\u043c\u0443 \u043f\u043e\u043b\u044e.","form.button.add-components-to-dynamiczone":"\u0414\u043e\u0434\u0430\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0443 \u0437\u043e\u043d\u0443.","form.button.add-field":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0449\u0435 \u043e\u0434\u043d\u0435 \u043f\u043e\u043b\u0435","form.button.add-first-field-to-created-component":"\u0414\u043e\u0434\u0430\u0442\u0438 \u043f\u0435\u0440\u0448\u0435 \u043f\u043e\u043b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443","form.button.add.field.to.collectionType":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0449\u0435 \u043e\u0434\u043d\u0435 \u043f\u043e\u043b\u0435 \u0434\u043e \u0446\u044c\u043e\u0433\u043e Collection Type","form.button.add.field.to.component":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0449\u0435 \u043e\u0434\u043d\u0435 \u043f\u043e\u043b\u0435 \u0434\u043e \u0446\u044c\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443","form.button.add.field.to.contentType":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0449\u0435 \u043e\u0434\u043d\u0435 \u043f\u043e\u043b\u0435 \u0434\u043e \u0446\u044c\u043e\u0433\u043e Content Type","form.button.add.field.to.singleType":"\u0414\u043e\u0434\u0430\u0442\u0438 \u0449\u0435 \u043e\u0434\u043d\u0435 \u043f\u043e\u043b\u0435 \u0434\u043e \u0446\u044c\u043e\u0433\u043e Single Type","form.button.cancel":"\u0421\u043a\u0430\u0441\u0443\u0432\u0430\u0442\u0438","form.button.collection-type.description":"\u041f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u043c\u043d\u043e\u0436\u0438\u043d\u043d\u0438\u0445 \u043e\u0431\'\u0454\u043a\u0442\u0456\u0432, \u044f\u043a-\u0442\u043e \u0434\u043e\u043f\u0438\u0441\u0438, \u0442\u043e\u0432\u0430\u0440\u0438, \u043a\u043e\u043c\u0435\u043d\u0442\u0430\u0440\u0456 \u0442\u043e\u0449\u043e.","form.button.configure-component":"\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","form.button.configure-view":"\u041d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u0442\u0438 \u0432\u0438\u0433\u043b\u044f\u0434","form.button.continue":"\u041f\u0440\u043e\u0434\u043e\u0432\u0436\u0438\u0442\u0438","form.button.delete":"\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438","form.button.finish":"\u0417\u0430\u043a\u0456\u043d\u0447\u0438\u0442\u0438","form.button.save":"\u0417\u0431\u0435\u0440\u0435\u0433\u0442\u0438","form.button.select-component":"\u0412\u0438\u0431\u0440\u0430\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","form.button.single-type.description":"\u041f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u043e\u0434\u0438\u043d\u043e\u043a\u0438\u0445 \u043e\u0431\'\u0454\u043a\u0442\u0456\u0432, \u044f\u043a-\u0442\u043e \u0434\u043e\u043c\u0430\u0448\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430, \u043f\u0440\u043e \u043d\u0430\u0441 \u0442\u043e\u0449\u043e","from":"\u0437","menu.section.components.name.plural":"\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438","menu.section.components.name.singular":"\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","menu.section.models.name.plural":"Collection Types","menu.section.models.name.singular":"Collection Type","menu.section.single-types.name.plural":"Single Types","menu.section.single-types.name.singular":"Single Type","modalForm.attribute.form.base.name":"\u041d\u0430\u0437\u0432\u0430","modalForm.attribute.form.base.name.description":"\u0414\u043b\u044f \u043d\u0430\u0437\u0432\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0431\u0456\u043b\u0456\u0432","modalForm.attribute.form.base.name.placeholder":"\u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, Slug, SEO URL, Canonical URL","modalForm.attribute.target-field":"\u041f\u043e\u0432\'\u044f\u0437\u0430\u043d\u0435 \u043f\u043e\u043b\u0435","modalForm.attribute.text.type-selection":"\u0422\u0438\u043f","modalForm.attributes.select-component":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","modalForm.attributes.select-components":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438","modalForm.component.header-create":"\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442","modalForm.components.create-component.category.label":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u044e \u0430\u0431\u043e \u0432\u0432\u0435\u0434\u0456\u0442\u044c \u043d\u0430\u0437\u0432\u0443 \u0434\u043b\u044f \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u043d\u044f \u043d\u043e\u0432\u043e\u0457","modalForm.components.icon.label":"\u0406\u043a\u043e\u043d\u043a\u0430","modalForm.editCategory.base.name.description":"\u0414\u043b\u044f \u043d\u0430\u0437\u0432\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u0457 \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0431\u0456\u043b\u0456\u0432","modalForm.header-edit":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 {name}","modalForm.header.categories":"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u0457","modalForm.singleType.header-create":"\u0421\u0442\u0432\u043e\u0440\u0438\u0442\u0438 Single Type","modalForm.sub-header.addComponentToDynamicZone":"\u0414\u043e\u0434\u0430\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0434\u043e \u0434\u0438\u043d\u0430\u043c\u0456\u0447\u043d\u043e\u0457 \u0437\u043e\u043d\u0438","modalForm.sub-header.attribute.create":"\u0414\u043e\u0434\u0430\u0442\u0438 \u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0435 {type}","modalForm.sub-header.attribute.create.step":"\u0414\u043e\u0434\u0430\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 ({step}/2)","modalForm.sub-header.attribute.edit":"\u0420\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 {name}","modalForm.sub-header.chooseAttribute.collectionType":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e Collection Type","modalForm.sub-header.chooseAttribute.component":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443","modalForm.sub-header.chooseAttribute.singleType":"\u0412\u0438\u0431\u0435\u0440\u0456\u0442\u044c \u043f\u043e\u043b\u0435 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e Single Type","modelPage.attribute.relation-polymorphic":"\u0417\u0432\'\u044f\u0437\u043e\u043a (\u043f\u043e\u043b\u0456\u043c\u043e\u0440\u0444\u043d\u0438\u0439)","modelPage.attribute.relationWith":"\u0417\u0432\'\u044f\u0437\u043e\u043a \u0437","none":"\u0416\u043e\u0434\u043d\u0435","notification.info.autoreaload-disable":"\u0424\u0443\u043d\u043a\u0446\u0456\u044f autoReload \u043c\u0430\u0454 \u0431\u0443\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0430. \u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0437\u0430\u043f\u0443\u0441\u0442\u0456\u0442\u044c \u0441\u0432\u0456\u0439 \u0434\u043e\u0434\u0430\u0442\u043e\u043a \u0432\u0456\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 `strapi develop`.","notification.info.creating.notSaved":"\u0411\u0443\u0434\u044c \u043b\u0430\u0441\u043a\u0430, \u0437\u0431\u0435\u0440\u0435\u0436\u0456\u0442\u044c \u0432\u0430\u0448\u0456 \u0437\u043c\u0456\u043d\u0438 \u043f\u0435\u0440\u0435\u0434 \u0442\u0438\u043c \u044f\u043a \u0441\u0442\u0432\u043e\u0440\u044e\u0432\u0430\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0430\u0431\u043e Collection Type","plugin.description.long":"\u041c\u043e\u0434\u0435\u043b\u044e\u0439\u0442\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u0438\u0445 \u0434\u043b\u044f \u0432\u0430\u0448\u043e\u0433\u043e API. \u0421\u0442\u0432\u043e\u0440\u044e\u0439\u0442\u0435 \u043d\u043e\u0432\u0456 \u043f\u043e\u043b\u044f \u0442\u0430 \u0437\u0432\'\u044f\u0437\u043a\u0438 \u0437\u0430 \u0445\u0432\u0438\u043b\u0438\u043d\u0443. \u0424\u0430\u0439\u043b\u0438 \u0431\u0443\u0434\u0443\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0456 \u0442\u0430 \u043e\u043d\u043e\u0432\u043b\u0435\u043d\u0456 \u0432 \u0432\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443.","plugin.description.short":"\u041c\u043e\u0434\u0435\u043b\u044e\u0439\u0442\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u0438\u0445 \u0434\u043b\u044f \u0432\u0430\u0448\u043e\u0433\u043e API.","popUpForm.navContainer.advanced":"\u0420\u043e\u0437\u0448\u0438\u0440\u0435\u043d\u0456 \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0432\u0430\u043d\u043d\u044f","popUpForm.navContainer.base":"\u041e\u0441\u043d\u043e\u0432\u043d\u0435","popUpWarning.bodyMessage.cancel-modifications":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0441\u043a\u0430\u0441\u0443\u0432\u0430\u0442\u0438 \u0441\u0432\u043e\u0457 \u0437\u043c\u0456\u043d\u0438?","popUpWarning.bodyMessage.cancel-modifications.with-components":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0441\u043a\u0430\u0441\u0443\u0432\u0430\u0442\u0438 \u0441\u0432\u043e\u0457 \u0437\u043c\u0456\u043d\u0438? \u0414\u0435\u044f\u043a\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0431\u0443\u043b\u0438 \u0437\u043c\u0456\u043d\u0435\u043d\u0456, \u0430\u0431\u043e \u0441\u0442\u0432\u043e\u0440\u0435\u043d\u0456 \u043d\u043e\u0432\u0456...","popUpWarning.bodyMessage.category.delete":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0446\u044e \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u044e? \u0412\u0441\u0456 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0438 \u0442\u0430\u043a\u043e\u0436 \u0431\u0443\u0434\u0443\u0442\u044c \u0432\u0438\u0434\u0430\u043b\u0435\u043d\u0456.","popUpWarning.bodyMessage.component.delete":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0446\u0435\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442?","popUpWarning.bodyMessage.contentType.delete":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0446\u0435\u0439 Collection Type?","prompt.unsaved":"\u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456 \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0437\u0430\u043b\u0438\u0448\u0438\u0442\u0438 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443? \u0412\u0441\u0456 \u0432\u0438\u0448\u0456 \u0437\u043c\u0456\u043d\u0438 \u0431\u0443\u0434\u0443\u0442\u044c \u0432\u0442\u0430\u0440\u0447\u0435\u043d\u0456.","relation.attributeName.placeholder":"Ex: author, category, tag","relation.manyToMany":"\u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0456 \u043d\u0430\u043b\u0435\u0436\u0438\u0442\u044c \u0431\u0430\u0433\u0430\u0442\u044c\u043e\u043c","relation.manyToOne":"\u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0431\u0430\u0433\u0430\u0442\u043e","relation.manyWay":"\u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0431\u0430\u0433\u0430\u0442\u043e","relation.oneToMany":"\u043d\u0430\u043b\u0435\u0436\u0438\u0442\u044c \u0434\u043e \u0431\u0430\u0433\u0430\u0442\u044c\u043e\u0445","relation.oneToOne":"\u043c\u0456\u0441\u0442\u0438\u0442\u044c \u0456 \u043d\u0430\u043b\u0435\u0436\u0438\u0442\u044c \u0434\u043e \u043e\u0434\u043d\u0456\u0454\u0457","relation.oneWay":"\u043c\u0456\u0441\u0442\u0438\u0442\u044c \u043e\u0434\u043d\u0435","table.attributes.title.plural":"{number} \u043f\u043e\u043b\u0456\u0432","table.attributes.title.singular":"{number} \u043f\u043e\u043b\u0435"}')}}]); | 31,159 | 31,159 | 0.801245 |
10140b5ecc6da96dc42458887ef890233dc200f2 | 1,314 | js | JavaScript | public/js/finance.js | jellyfishgh/ng-starter-kit | edc5b0ca4f1cd4e5f44086df87f68bee854399bc | [
"MIT"
] | null | null | null | public/js/finance.js | jellyfishgh/ng-starter-kit | edc5b0ca4f1cd4e5f44086df87f68bee854399bc | [
"MIT"
] | null | null | null | public/js/finance.js | jellyfishgh/ng-starter-kit | edc5b0ca4f1cd4e5f44086df87f68bee854399bc | [
"MIT"
] | null | null | null | angular.module('finance', [])
.factory('currencyConverter', [
'$http',
function($http) {
var YAHOO_FINANCE_PATTERN = '//query.yahooapis.com/v1/public/yql?q=' +
'select * from yahoo.finance.xchange where pair in ("PAIRS")' +
'&format=json&env=' +
'store://datatables.org/alltableswithkeys';
var currencies = ['USD', 'EUR', 'CNY'];
var usdToForeignRates = {};
var convert = function(amount, inCurr, outCurr) {
return amount * usdToForeignRates[inCurr] / usdToForeignRates[outCurr];
};
function refresh() {
var url = YAHOO_FINANCE_PATTERN.replace('PAIRS', 'USD' + currencies.join('","USD'));
return $http.get(url).then(function(response) {
var newUsdToForeignRates = {};
angular.forEach(response.data.query.results.rate, function(rate) {
newUsdToForeignRates[rate.id.substring(3, 6)] = parseFloat(rate.Rate);
});
usdToForeignRates = newUsdToForeignRates;
});
}
refresh();
return {
currencies: currencies,
convert: convert
}
}
]); | 43.8 | 100 | 0.509893 |
1015358ceee1b22986652d99e9e8bede177636b3 | 4,936 | js | JavaScript | webpack.config.js | MichaelKim/osu-online | 2a0485368db43a888adfdb5fe53b155e4df01e16 | [
"MIT"
] | 11 | 2021-03-10T02:03:27.000Z | 2022-03-13T06:03:16.000Z | webpack.config.js | MichaelKim/osu-online | 2a0485368db43a888adfdb5fe53b155e4df01e16 | [
"MIT"
] | 2 | 2021-07-26T22:16:02.000Z | 2022-02-14T02:55:50.000Z | webpack.config.js | MichaelKim/osu-online | 2a0485368db43a888adfdb5fe53b155e4df01e16 | [
"MIT"
] | 8 | 2021-05-21T20:20:00.000Z | 2022-03-01T08:34:53.000Z | /* eslint-disable no-undef */
/* eslint-disable @typescript-eslint/no-var-requires */
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const CssoWebpackPlugin = require('csso-webpack-plugin').default;
const { readdir } = require('fs/promises');
const { DefinePlugin } = require('webpack');
module.exports = async (env, argv) => {
const isDev = argv.mode !== 'production';
console.log(
`===================${isDev ? 'DEV' : 'PROD'}========================`
);
const files = await readdir('./public/beatmaps/');
const beatmaps = files.filter(file => file.endsWith('.osz'));
const config = {
entry: {
main: path.resolve('./src/index.tsx')
},
output: {
path: path.resolve('./build'),
filename: '[name].js',
publicPath: ''
},
module: {
rules: [
{
test: /\.tsx?/i,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
targets: '> 1%, not ie 11',
presets: [
'@babel/preset-env',
[
'@babel/preset-react',
{
runtime: 'automatic'
}
],
'@babel/preset-typescript'
],
plugins: [
'const-enum',
[
'@babel/plugin-transform-typescript',
{ allowDeclareFields: true }
],
'@babel/plugin-proposal-class-properties'
]
}
}
},
{
test: /\.module\.scss$/i,
use: [
isDev ? 'style-loader' : MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: !isDev,
url: false,
modules: {
localIdentName: isDev
? '[path][name]__[local]'
: '[contenthash:base64]'
}
}
},
{
loader: 'sass-loader',
options: {
sourceMap: !isDev
}
}
]
},
{
test: /\.scss$/i,
exclude: /\.module\.scss$/i,
use: [
isDev ? 'style-loader' : MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: !isDev,
url: false
}
},
{
loader: 'sass-loader',
options: {
sourceMap: !isDev
}
}
]
},
{
test: /\.(ttf|woff2|png|webp)$/i,
type: 'asset/resource'
}
]
},
resolve: {
extensions: ['.ts', '.js', '.tsx']
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve('./src/index.html')
}),
new CopyWebpackPlugin({
patterns: [{ from: 'public' }]
}),
new ForkTsCheckerWebpackPlugin({
typescript: {
diagnosticOptions: {
semantic: true,
syntactic: true
},
mode: 'write-references'
},
eslint: {
files: './src/**/*.{js,ts,tsx}'
}
}),
new MiniCssExtractPlugin({
filename: isDev ? '[name].css' : '[name].[contenthash].css',
chunkFilename: isDev ? '[id].css' : '[id].[contenthash].css'
}),
new DefinePlugin({
DEFAULT_BEATMAPS: JSON.stringify(beatmaps)
})
],
stats: {
colors: true
}
};
if (isDev) {
config.mode = 'development';
config.devtool = 'cheap-module-source-map';
config.devServer = {
contentBase: path.resolve('./build'),
host: 'localhost',
port: '8080',
hot: true,
overlay: true
};
} else {
config.mode = 'production';
// Basic options, except ignore console statements
config.optimization = {
minimizer: [
new TerserPlugin({
extractComments: false,
terserOptions: {
compress: {
drop_console: true
}
}
})
]
};
config.plugins.push(
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: ['**/*', '!.git/**', '!.static']
}),
new CssoWebpackPlugin(),
new BundleAnalyzerPlugin()
);
}
return config;
};
| 26.681081 | 77 | 0.462318 |
101559274555c96692a497735e4ed7d5bf5bd212 | 67 | js | JavaScript | testManager/src/app/testManager/components/IssueManageComponent/IssueTree/index.js | choerodon/choerodon-front-test-manager | b4e81974bf2fd9bbfa0ad423df990c265408993e | [
"Apache-2.0"
] | 6 | 2018-07-20T02:11:06.000Z | 2019-04-01T05:38:43.000Z | testManager/src/app/testManager/components/IssueManageComponent/IssueTree/index.js | choerodon/choerodon-front-test-manager | b4e81974bf2fd9bbfa0ad423df990c265408993e | [
"Apache-2.0"
] | null | null | null | testManager/src/app/testManager/components/IssueManageComponent/IssueTree/index.js | choerodon/choerodon-front-test-manager | b4e81974bf2fd9bbfa0ad423df990c265408993e | [
"Apache-2.0"
] | 12 | 2018-07-20T02:55:51.000Z | 2020-01-02T09:49:25.000Z | import IssueTree from './IssueTree';
export default IssueTree;
| 16.75 | 37 | 0.746269 |
10156fb74b01f1b2e681ee12285ceef86e25f27d | 880 | js | JavaScript | test/apply-defaults.test.js | raphinesse/cujs | 2441c8fcf3465d1533d0cda39a6912d01aafa65d | [
"MIT"
] | 1 | 2018-04-09T23:48:45.000Z | 2018-04-09T23:48:45.000Z | test/apply-defaults.test.js | raphinesse/cujs | 2441c8fcf3465d1533d0cda39a6912d01aafa65d | [
"MIT"
] | null | null | null | test/apply-defaults.test.js | raphinesse/cujs | 2441c8fcf3465d1533d0cda39a6912d01aafa65d | [
"MIT"
] | null | null | null | import { join } from 'path'
import test from 'ava'
import applyDefaults from '../lib/apply-defaults'
test('defaults for reading from stdin', t => {
t.deepEqual(applyDefaults({}), {
mangle: true,
compress: true,
comments: /@preserve|@license|@cc_on|^!/i,
})
})
test('defaults for malformed stdin config', t => {
t.deepEqual(applyDefaults({ input: [] }), {
input: [],
mangle: true,
compress: true,
comments: /@preserve|@license|@cc_on|^!/i,
})
})
test('defaults for reading from file', t => {
const input = 'foo.js'
const output = 'foo.min.js'
process.chdir(join(__dirname, 'fixtures'))
t.deepEqual(applyDefaults({ input }), {
input: [input],
output,
sourceMap: {
url: output + '.map',
content: input + '.map',
},
mangle: true,
compress: true,
comments: /@preserve|@license|@cc_on|^!/i,
})
})
| 23.157895 | 50 | 0.601136 |
10159344d9106a2830f7814c8da634004517fa20 | 1,403 | js | JavaScript | gatsby-node.js | Cowbacca/decently-dressed-developer | 87f0fe9e460fd839d7a962e093548754bec340fd | [
"MIT"
] | null | null | null | gatsby-node.js | Cowbacca/decently-dressed-developer | 87f0fe9e460fd839d7a962e093548754bec340fd | [
"MIT"
] | null | null | null | gatsby-node.js | Cowbacca/decently-dressed-developer | 87f0fe9e460fd839d7a962e093548754bec340fd | [
"MIT"
] | null | null | null | const Promise = require(`bluebird`)
const path = require(`path`)
const slash = require(`slash`)
exports.createPages = async ({graphql, boundActionCreators}) => {
const result = await fetchAllArticles(graphql);
const allArticles = result.data.allContentfulArticle.edges
.map(edge => ({id: edge.node.id, slug: edge.node.slug}));
createArticlePages(boundActionCreators, allArticles);
}
async function fetchAllArticles(graphql) {
const result = await graphql(
`
{
allContentfulArticle(sort: {fields: [createdAt], order: DESC}) {
edges {
node {
id
slug
}
}
}
}
`
)
if (result.errors) {
throw Error(result.errors)
}
return result;
}
function createArticlePages(boundActionCreators, allArticles) {
const {createPage} = boundActionCreators
const articleTemplate = path.resolve(`./src/templates/article.tsx`)
allArticles
.forEach((article, index) => {
const prev = index === allArticles.length - 1 ? undefined : allArticles[index + 1].slug
const next = index === 0 ? undefined : allArticles[index - 1].slug
const {id, slug} = article
createPage({
path: `/articles/${slug}/`,
component: slash(articleTemplate),
context: {
id,
prev,
next
},
})
})
}
| 25.981481 | 93 | 0.592302 |
1015d1c967011098fb13fa03fb4639b6bc90b69c | 54,036 | js | JavaScript | js/chunk-0de01333.1dd24e75.js | fnnix/network | 8addbd193ff52ab930d14f6e98e0d83114e3c255 | [
"MIT"
] | null | null | null | js/chunk-0de01333.1dd24e75.js | fnnix/network | 8addbd193ff52ab930d14f6e98e0d83114e3c255 | [
"MIT"
] | null | null | null | js/chunk-0de01333.1dd24e75.js | fnnix/network | 8addbd193ff52ab930d14f6e98e0d83114e3c255 | [
"MIT"
] | null | null | null | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0de01333"],{"0096":function(t,n,e){"use strict";e.r(n);var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return t.renderWhen?e(t.componentName,t._b({tag:"component"},"component",t.$props.config,!1),[t._t("default")],2):e(t.config.tag||"div",{tag:"component"},[t._t("default")],2)},i=[],o=(e("caad"),e("09fd")),a={name:"OptionalKinesis",components:{KinesisContainer:o["KinesisContainer"],KinesisElement:o["KinesisElement"]},props:{renderWhen:{type:Boolean,required:!0},type:{type:String,required:!0,validator:function(t){return["container","element"].includes(t)}},config:{type:Object,default:function(){}}},computed:{componentName:function(t){return"container"===t.type?"KinesisContainer":"KinesisElement"}}},c=a,u=e("2877"),s=Object(u["a"])(c,r,i,!1,null,null,null);n["default"]=s.exports},"09fd":function(t,n,e){(function(n,e){t.exports=e()})("undefined"!==typeof self&&self,(function(){return 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}return 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="fb15")}({"01f9":function(t,n,e){"use strict";var r=e("2d00"),i=e("5ca1"),o=e("2aba"),a=e("32e9"),c=e("84f2"),u=e("41a0"),s=e("7f20"),f=e("38fd"),l=e("2b4c")("iterator"),h=!([].keys&&"next"in[].keys()),p="@@iterator",d="keys",v="values",y=function(){return this};t.exports=function(t,n,e,g,b,m,w){u(e,n,g);var x,O,j,S=function(t){if(!h&&t in E)return E[t];switch(t){case d:return function(){return new e(this,t)};case v:return function(){return new e(this,t)}}return function(){return new e(this,t)}},P=n+" Iterator",_=b==v,M=!1,E=t.prototype,A=E[l]||E[p]||b&&E[b],D=A||S(b),T=b?_?S("entries"):D:void 0,N="Array"==n&&E.entries||A;if(N&&(j=f(N.call(new t)),j!==Object.prototype&&j.next&&(s(j,P,!0),r||"function"==typeof j[l]||a(j,l,y))),_&&A&&A.name!==v&&(M=!0,D=function(){return A.call(this)}),r&&!w||!h&&!M&&E[l]||a(E,l,D),c[n]=D,c[P]=y,b)if(x={values:_?D:S(v),keys:m?D:S(d),entries:T},w)for(O in x)O in E||o(E,O,x[O]);else i(i.P+i.F*(h||M),n,x);return x}},"07e3":function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},"09fa":function(t,n,e){var r=e("4588"),i=e("9def");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}},"0a49":function(t,n,e){var r=e("9b43"),i=e("626a"),o=e("4bf8"),a=e("9def"),c=e("cd1c");t.exports=function(t,n){var e=1==t,u=2==t,s=3==t,f=4==t,l=6==t,h=5==t||l,p=n||c;return function(n,c,d){for(var v,y,g=o(n),b=i(g),m=r(c,d,3),w=a(b.length),x=0,O=e?p(n,w):u?p(n,0):void 0;w>x;x++)if((h||x in b)&&(v=b[x],y=m(v,x,g),t))if(e)O[x]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:O.push(v)}else if(f)return!1;return l?-1:s||f?f:O}}},"0b21":function(t,n,e){var r=e("5ca1");r(r.S,"Math",{sign:e("96fb")})},"0d58":function(t,n,e){var r=e("ce10"),i=e("e11e");t.exports=Object.keys||function(t){return r(t,i)}},"0f88":function(t,n,e){var r,i=e("7726"),o=e("32e9"),a=e("ca5a"),c=a("typed_array"),u=a("view"),s=!(!i.ArrayBuffer||!i.DataView),f=s,l=0,h=9,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");while(l<h)(r=i[p[l++]])?(o(r.prototype,c,!0),o(r.prototype,u,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:c,VIEW:u}},1169:function(t,n,e){var r=e("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"11e9":function(t,n,e){var r=e("52a7"),i=e("4630"),o=e("6821"),a=e("6a99"),c=e("69a8"),u=e("c69a"),s=Object.getOwnPropertyDescriptor;n.f=e("9e1e")?s:function(t,n){if(t=o(t),n=a(n,!0),u)try{return s(t,n)}catch(e){}if(c(t,n))return i(!r.f.call(t,n),t[n])}},1495:function(t,n,e){var r=e("86cc"),i=e("cb7c"),o=e("0d58");t.exports=e("9e1e")?Object.defineProperties:function(t,n){i(t);var e,a=o(n),c=a.length,u=0;while(c>u)r.f(t,e=a[u++],n[e]);return t}},1680:function(t,n,e){"use strict";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e(t.tag,{tag:"component",style:Object.assign({},t.transform,t.transformParameters)},[t._t("default")],2)},i=[],o=(e("c5f6"),e("cb96")),a={name:"KinesisAudio",inject:["context"],mixins:[o["a"]],props:{tag:{type:String,default:"div"},audioIndex:{type:Number,default:50}},computed:{transform:function(){return this.transformAudio()},transformParameters:function(){return{transitionProperty:"transform",transitionDuration:this.transitionDuration,transformOrigin:this.transformOrigin,transitionTimingFunction:this.transitionTimingFunction}},transitionDuration:function(){var t=this.context.duration;return"".concat(t,"ms")},transitionTimingFunction:function(){return this.context.easing}},methods:{transformAudio:function(){var t=this.context.audioData;if(this.context.audioData){var n,e,r=this.type,i=this.strength;switch(r){case"translate":n=t?t[0][this.audioIndex]:0,e="translate3d(".concat(n*i,"px, 0, 0)");break;case"rotate":n=t?t[0][this.audioIndex]:0,e="rotate3d(0,0,1,".concat(n*i/10,"deg)");break;case"scale":n=t?t[0][this.audioIndex]/i<1?1:t[0][this.audioIndex]/(2*i):1,e="scale(".concat(n,")");break}return{transform:e}}}}},c=a,u=e("2877"),s=Object(u["a"])(c,r,i,!1,null,null,null);n["a"]=s.exports},"1bc3":function(t,n,e){var r=e("f772");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")}},"1ec9":function(t,n,e){var r=e("f772"),i=e("e53d").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},2088:function(t,n,e){"use strict";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e(t.tag,{tag:"component",style:t.style,on:{mousemove:t.handleMovement,mouseenter:t.handleMovementStart,mouseleave:t.handleMovementStop}},[t._t("default"),t.audio?e("audio",{ref:"audio",attrs:{type:"audio/mpeg"},on:{ended:t.stop}},[e("source",{attrs:{src:t.audio}})]):t._e()],2)},i=[],o=e("234f"),a=e("dc57"),c=e("c8bd"),u=e("e3ae"),s=(e("34ef"),{props:{audio:{type:String,required:!1},playAudio:{type:Boolean,default:!1}},data:function(){return{analyser:null,audioArray:null,audioData:null,audioRef:null,wasPlayed:!1,isPlaying:!1}},watch:{audio:function(){this.wasPlayed=!1,this.isPlaying=!1},playAudio:function(t){t?this.play():this.stop()}},methods:{play:function(){this.active&&(this.wasPlayed||(this.handleAudio(),this.wasPlayed=!0),this.isPlaying=!0,this.audioRef.play(),this.getSongData())},stop:function(){this.isPlaying=!1,this.audioRef.pause()},handleAudio:function(){var t=this.$refs.audio;this.audioRef=t;var n=new AudioContext,e=n.createMediaElementSource(t),r=n.createAnalyser();e.connect(r),r.connect(n.destination),r.fftSize=256;var i=r.frequencyBinCount,o=new Uint8Array(i);this.audioArray=o,this.analyser=r},getSongData:function(){this.isPlaying&&(this.analyser.getByteFrequencyData(this.audioArray),this.audioData=new Array(this.audioArray),requestAnimationFrame(this.getSongData))}}}),f=e("5623"),l={props:{event:{type:String,default:"move"}},data:function(){return{eventMap:{orientation:"deviceorientation",scroll:"scroll",move:Object(f["a"])()?"deviceorientation":null}}},methods:{addEvents:function(){this.eventMap[this.event]&&window.addEventListener(this.eventMap[this.event],this.handleMovement,!0)},removeEvents:function(){this.eventMap[this.event]&&window.removeEventListener(this.eventMap[this.event],this.handleMovement,!0)}},watch:{event:function(t,n){this.eventMap[t]&&window.addEventListener(this.eventMap[t],this.handleMovement,!0),this.eventMap[n]&&window.addEventListener(this.eventMap[n],this.handleMovement,!0)}}},h=(e("8e6e"),e("ac6a"),e("cadf"),e("456d"),e("bd86")),p=e("e7a7"),d=function(t){return Object(p["a"])(t?t.width/2:0,t?t.height/2:0)};function v(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function y(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?v(e,!0).forEach((function(n){Object(h["a"])(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):v(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var g=function(t){var n=t.target,e=t.event,r=e.clientX,i=e.clientY,o=r-n.left,a=i-n.top,c=d(n),u=o/c.x,s=a/c.y;return y({},Object(p["a"])(u,s),{target:n})};function b(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function m(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?b(e,!0).forEach((function(n){Object(h["a"])(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):b(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var w=function(t){var n=t.event,e=t.target,r=n.gamma/45,i=n.beta/90;return m({},Object(p["a"])(r,i),{target:e})};function x(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function O(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?x(e,!0).forEach((function(n){Object(h["a"])(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):x(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var j=function(t){var n=(t.left-window.innerWidth)/(t.width+window.innerWidth),e=(t.top-window.innerHeight)/(t.height+window.innerHeight);return O({},Object(p["a"])(n,e),{target:t})},S={name:"KinesisContainer",mixins:[c["a"],u["a"],s,l],provide:function(){var t=this,n={},e=["audioData","duration","easing","event","eventData","isMoving","movement","shape"];return e.forEach((function(e){return Object.defineProperty(n,e,{enumerable:!0,get:function(){return t[e]}})})),{context:n}},data:function(){return{movement:{x:0,y:0},isMoving:!1,shape:null,eventData:{x:0,y:0}}},mounted:function(){this.addEvents()},beforeDestroy:function(){this.removeEvents()},methods:{handleMovement:Object(a["a"])((function(t){if(this.active){this.isMoving=!0,this.shape=this.$el.getBoundingClientRect();var n=Object(o["a"])(this.shape);"move"===this.event&&this.isMoving&&!Object(f["a"])()?(this.movement=g({target:this.shape,event:t}),this.eventData=Object(p["a"])(t.clientX,t.clientY)):("orientation"===this.event||"move"===this.event&&Object(f["a"])())&&n?this.movement=w({target:this.shape,event:t}):"scroll"===this.event&&n&&this.shape.height&&(this.movement=j(this.shape))}}),100),handleMovementStart:function(){this.isMoving=!0},handleMovementStop:function(){this.isMoving=!1}}},P=S,_=e("2877"),M=Object(_["a"])(P,r,i,!1,null,null,null);n["a"]=M.exports},"22cd":function(t,n,e){"use strict";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e(t.tag,{tag:"component",style:Object.assign({},t.transform,t.transformParameters)},[t._t("default")],2)},i=[],o=(e("0b21"),e("c7c6"),e("c5f6"),e("dc57")),a={name:"KinesisDistance",props:{tag:{type:String,default:"div"},type:{type:String,default:"translate"},transformOrigin:{type:String,default:"center"},originX:{type:Number,default:50},originY:{type:Number,default:50},strength:{type:Number,default:10},axis:{type:String,default:null},maxX:{type:Number,default:null},maxY:{type:Number,default:null},minX:{type:Number,default:null},minY:{type:Number,default:null},distance:{type:Number,default:100},cycle:{type:Number,default:0},active:{type:Boolean,default:!0},duration:{type:Number,default:1001},easing:{type:String,default:"cubic-bezier(0.23, 1, 0.32, 1)"},perspective:{type:Number,default:1e3}},data:function(){return{pointer:{x:0,y:0},transform:{},component:"kidistance",throttle:500}},mounted:function(){window.addEventListener("scroll",this.handleMovement)},beforeDestroy:function(){window.removeEventListener("scroll",this.handleMovement)},computed:{style:function(){return{perspective:"".concat(this.perspective,"px")}},transformParameters:function(){return{position:"relative",transitionProperty:"transform",transitionDuration:this.transitionDuration,transformOrigin:this.transformOrigin,transitionTimingFunction:this.easing}},transitionDuration:function(){return"".concat(this.duration,"ms")}},methods:{getCoordinates:function(t,n){var e=this.$el.getBoundingClientRect();return{x:t+e.left,y:n+e.top}},getDistance:function(t,n,e,r){return Math.floor(Math.hypot(n-t,r-e))},handleMovement:Object(o["a"])((function(t){window.addEventListener("mousemove",this.handleMovement);var n=this.pointer;n.x=t.clientX,n.y=t.clientY,this.transformBehavior()}),50),transformBehavior:function(){var t=this.$el.getBoundingClientRect(),n=this.getCoordinates(t.width/2,t.height/2),e=this.getDistance(this.pointer.x,n.x,this.pointer.y,n.y);if(e>this.distance)return this.transform={},void(this.throttle=500);this.throttle=50;var r="scale(".concat(e/this.distance,")");this.transform={transform:r}},scaleMovement:function(t,n){var e=this.type,r=Math.sign(this.strength)*(Math.abs(t)+Math.abs(n))/10+1;return"scale3d(".concat("scaleX"===e||"scale"===e?r:1,",\n ").concat("scaleY"===e||"scale"===e?r:1,",\n 1)")}}},c=a,u=e("2877"),s=Object(u["a"])(c,r,i,!1,null,null,null);n["a"]=s.exports},"230e":function(t,n,e){var r=e("d3f4"),i=e("7726").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"234f":function(t,n,e){"use strict";function r(t){var n=t.bottom>=0&&t.right>=0&&t.top<=(window.innerHeight||document.documentElement.clientHeight)&&t.left<=(window.innerWidth||document.documentElement.clientWidth);return n}e.d(n,"a",(function(){return r}))},"23c6":function(t,n,e){var r=e("2d95"),i=e("2b4c")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,n){try{return t[n]}catch(e){}};t.exports=function(t){var n,e,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=a(n=Object(t),i))?e:o?r(n):"Object"==(c=r(n))&&"function"==typeof n.callee?"Arguments":c}},2621:function(t,n){n.f=Object.getOwnPropertySymbols},"27ee":function(t,n,e){var r=e("23c6"),i=e("2b4c")("iterator"),o=e("84f2");t.exports=e("8378").getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},2877:function(t,n,e){"use strict";function r(t,n,e,r,i,o,a,c){var u,s="function"===typeof t?t.options:t;if(n&&(s.render=n,s.staticRenderFns=e,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),a?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},s._ssrRegister=u):i&&(u=c?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,n){return u.call(n),f(t,n)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:s}}e.d(n,"a",(function(){return r}))},"294c":function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},"2aba":function(t,n,e){var r=e("7726"),i=e("32e9"),o=e("69a8"),a=e("ca5a")("src"),c=e("fa5b"),u="toString",s=(""+c).split(u);e("8378").inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,e,c){var u="function"==typeof e;u&&(o(e,"name")||i(e,"name",n)),t[n]!==e&&(u&&(o(e,a)||i(e,a,t[n]?""+t[n]:s.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,u,(function(){return"function"==typeof this&&this[a]||c.call(this)}))},"2aeb":function(t,n,e){var r=e("cb7c"),i=e("1495"),o=e("e11e"),a=e("613b")("IE_PROTO"),c=function(){},u="prototype",s=function(){var t,n=e("230e")("iframe"),r=o.length,i="<",a=">";n.style.display="none",e("fab2").appendChild(n),n.src="javascript:",t=n.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),s=t.F;while(r--)delete s[u][o[r]];return s()};t.exports=Object.create||function(t,n){var e;return null!==t?(c[u]=r(t),e=new c,c[u]=null,e[a]=t):e=s(),void 0===n?e:i(e,n)}},"2af9":function(t,n,e){"use strict";e.r(n),function(t){e("7f7f");var r=e("1680");e.d(n,"KinesisAudio",(function(){return r["a"]}));var i=e("2088");e.d(n,"KinesisContainer",(function(){return i["a"]}));var o=e("22cd");e.d(n,"KinesisDistance",(function(){return o["a"]}));var a=e("56f0");e.d(n,"KinesisElement",(function(){return a["a"]}));var c=e("f282");e.d(n,"KinesisScroll",(function(){return c["a"]}));var u={install:function(t){t.component(r["a"].name,r["a"])}},s=null;"undefined"!==typeof window?s=window.Vue:"undefined"!==typeof t&&(s=t.Vue),s&&s.use(u),n["default"]=u}.call(this,e("c8ba"))},"2b4c":function(t,n,e){var r=e("5537")("wks"),i=e("ca5a"),o=e("7726").Symbol,a="function"==typeof o,c=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};c.store=r},"2d00":function(t,n){t.exports=!1},"2d95":function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},"32e9":function(t,n,e){var r=e("86cc"),i=e("4630");t.exports=e("9e1e")?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},"33a4":function(t,n,e){var r=e("84f2"),i=e("2b4c")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},"34ef":function(t,n,e){e("ec30")("Uint8",1,(function(t){return function(n,e,r){return t(this,n,e,r)}}))},"35e8":function(t,n,e){var r=e("d9f6"),i=e("aebd");t.exports=e("8e60")?function(t,n,e){return r.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},"36bd":function(t,n,e){"use strict";var r=e("4bf8"),i=e("77f1"),o=e("9def");t.exports=function(t){var n=r(this),e=o(n.length),a=arguments.length,c=i(a>1?arguments[1]:void 0,e),u=a>2?arguments[2]:void 0,s=void 0===u?e:i(u,e);while(s>c)n[c++]=t;return n}},3879:function(t,n,e){"use strict";e("0b21");n["a"]={methods:{transformSwitch:function(t,n,e,r){var i;switch(t){case"translate":i=this.translateMovement(n,e);break;case"rotate":i=this.rotateMovement(n,e);break;case"depth":i=this.depthMovement(n,e,r);break;case"depth_inv":i=this.depthMovement(-n,-e,r);break;case"scale":i=this.scaleMovement(n,e);break}return i},translateMovement:function(t,n){return"translate3d(".concat(-t,"px, ").concat(-n,"px, 0)")},rotateMovement:function(t,n){var e;return this.axis?"x"===this.axis?e=2*t:"y"===this.axis&&(e=2*n):e=t+n,"rotate3d(0,0,1,".concat(e,"deg)")},depthMovement:function(t,n,e){return"rotateX(".concat(-n,"deg) rotateY(").concat(t,"deg) translate3d(0,0,").concat(2*e,"px)")},scaleMovement:function(t,n){var e=this.type,r=Math.sign(this.strength)*(Math.abs(t)+Math.abs(n))/10+1;return"scale3d(".concat("scaleX"===e||"scale"===e?r:1,",\n ").concat("scaleY"===e||"scale"===e?r:1,",\n 1)")}}}},"38fd":function(t,n,e){var r=e("69a8"),i=e("4bf8"),o=e("613b")("IE_PROTO"),a=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?a:null}},"41a0":function(t,n,e){"use strict";var r=e("2aeb"),i=e("4630"),o=e("7f20"),a={};e("32e9")(a,e("2b4c")("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(a,{next:i(1,e)}),o(t,n+" Iterator")}},"454f":function(t,n,e){e("46a7");var r=e("584a").Object;t.exports=function(t,n,e){return r.defineProperty(t,n,e)}},"456d":function(t,n,e){var r=e("4bf8"),i=e("0d58");e("5eda")("keys",(function(){return function(t){return i(r(t))}}))},4588:function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},4630:function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},"46a7":function(t,n,e){var r=e("63b6");r(r.S+r.F*!e("8e60"),"Object",{defineProperty:e("d9f6").f})},"4bf8":function(t,n,e){var r=e("be13");t.exports=function(t){return Object(r(t))}},"52a7":function(t,n){n.f={}.propertyIsEnumerable},5537:function(t,n,e){var r=e("8378"),i=e("7726"),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,n){return a[t]||(a[t]=void 0!==n?n:{})})("versions",[]).push({version:r.version,mode:e("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5623:function(t,n,e){"use strict";function r(){return/Mobi|Android/i.test(navigator.userAgent)}e.d(n,"a",(function(){return r}))},"56f0":function(t,n,e){"use strict";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e(t.tag,{tag:"component",style:Object.assign({},t.transform,t.transformParameters)},[t._t("default")],2)},i=[],o=(e("8e6e"),e("ac6a"),e("cadf"),e("456d"),e("bd86")),a=e("5623"),c=e("cb96"),u=e("3879"),s=e("e7a7");function f(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function l(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?f(e,!0).forEach((function(n){Object(o["a"])(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):f(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var h=function(t){var n=t.y,e=t.x,r=t.target,i=t.originX,o=void 0===i?50:i,a=t.strength,c=void 0===a?10:a,u=t.event,f=void 0===u?null:u,h=t.originY,p=void 0===h?50:h;"scroll"===f&&(p=-p/2);var d=(e-o/50)*c,v=(n-p/50)*c;return l({},Object(s["a"])(d,v),{target:r})},p=function(t,n,e){return e&&t>e?e:n&&t<n?n:t},d=function(t){var n=t.referencePosition,e=t.elementPosition,r=t.spanningRange,i=t.cycles,o=(n-e)*(2*Math.PI)/r,a=r*Math.sin(o*i);return a/(r/2)};function v(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function y(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?v(e,!0).forEach((function(n){Object(o["a"])(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):v(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var g={name:"KinesisElement",mixins:[c["a"],u["a"]],inject:["context"],props:{tag:{type:String,default:"div"}},computed:{transform:function(){return this.transformMovement()},getContext:function(){return this.context},transformParameters:function(){return{transitionProperty:"transform",transitionDuration:this.transitionDuration,transformOrigin:this.transformOrigin,transitionTimingFunction:this.transitionTimingFunction}},transitionDuration:function(){var t=this.context.duration;return"".concat(t,"ms")},transitionTimingFunction:function(){return this.context.easing},isTouch:function(){return Object(a["a"])()}},methods:{transformMovement:function(){var t,n,e=this.context;if(!e.isMoving&&"move"===e.event)return{};var r=e.event,i=this.strengthManager();if(this.cycle<=0){var o=h(y({},e.movement,{originX:this.originX,originY:this.originY,strength:i})),a=o.x,c=o.y,u="scroll"===r;if(u||(t="y"===this.axis?0:p(a,this.minX,this.maxX),n="x"===this.axis?0:p(c,this.minY,this.maxY)),u){var s=h({x:e.movement.x,y:e.movement.y,originX:this.originX,originY:this.originY,strength:i,event:e.event}).y;t="x"===this.axis?s:0,n="y"!==this.axis&&this.axis?0:s}}else if(this.cycle>0){var f=e.shape,l=e.eventData;if(f){var v="x"===this.axis?d({referencePosition:"scroll"===r?0:l.x,elementPosition:f.left,spanningRange:"scroll"===r?window.innerWidth:f.width,cycles:this.cycle}):0,g="y"!==this.axis&&this.axis?0:d({referencePosition:"scroll"===r?0:l.y,elementPosition:f.top,spanningRange:"scroll"===r?window.innerHeight:f.height,cycles:this.cycle});t=v*i,n=g*i}}var b=this.type;b="scaleX"===b||"scaleY"===b?"scale":b;var m=this.transformSwitch(b,t,n,this.strength);return{transform:m}}}},b=g,m=e("2877"),w=Object(m["a"])(b,r,i,!1,null,null,null);n["a"]=w.exports},"584a":function(t,n){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)},"5ca1":function(t,n,e){var r=e("7726"),i=e("8378"),o=e("32e9"),a=e("2aba"),c=e("9b43"),u="prototype",s=function(t,n,e){var f,l,h,p,d=t&s.F,v=t&s.G,y=t&s.S,g=t&s.P,b=t&s.B,m=v?r:y?r[n]||(r[n]={}):(r[n]||{})[u],w=v?i:i[n]||(i[n]={}),x=w[u]||(w[u]={});for(f in v&&(e=n),e)l=!d&&m&&void 0!==m[f],h=(l?m:e)[f],p=b&&l?c(h,r):g&&"function"==typeof h?c(Function.call,h):h,m&&a(m,f,h,t&s.U),w[f]!=h&&o(w,f,p),g&&x[f]!=h&&(x[f]=h)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},"5cc5":function(t,n,e){var r=e("2b4c")("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(a){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var o=[7],c=o[r]();c.next=function(){return{done:e=!0}},o[r]=function(){return c},t(o)}catch(a){}return e}},"5dbc":function(t,n,e){var r=e("d3f4"),i=e("8b97").set;t.exports=function(t,n,e){var o,a=n.constructor;return a!==e&&"function"==typeof a&&(o=a.prototype)!==e.prototype&&r(o)&&i&&i(t,o),t}},"5eda":function(t,n,e){var r=e("5ca1"),i=e("8378"),o=e("79e5");t.exports=function(t,n){var e=(i.Object||{})[t]||Object[t],a={};a[t]=n(e),r(r.S+r.F*o((function(){e(1)})),"Object",a)}},"613b":function(t,n,e){var r=e("5537")("keys"),i=e("ca5a");t.exports=function(t){return r[t]||(r[t]=i(t))}},"626a":function(t,n,e){var r=e("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"63b6":function(t,n,e){var r=e("e53d"),i=e("584a"),o=e("d864"),a=e("35e8"),c=e("07e3"),u="prototype",s=function(t,n,e){var f,l,h,p=t&s.F,d=t&s.G,v=t&s.S,y=t&s.P,g=t&s.B,b=t&s.W,m=d?i:i[n]||(i[n]={}),w=m[u],x=d?r:v?r[n]:(r[n]||{})[u];for(f in d&&(e=n),e)l=!p&&x&&void 0!==x[f],l&&c(m,f)||(h=l?x[f]:e[f],m[f]=d&&"function"!=typeof x[f]?e[f]:g&&l?o(h,r):b&&x[f]==h?function(t){var n=function(n,e,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(n);case 2:return new t(n,e)}return new t(n,e,r)}return t.apply(this,arguments)};return n[u]=t[u],n}(h):y&&"function"==typeof h?o(Function.call,h):h,y&&((m.virtual||(m.virtual={}))[f]=h,t&s.R&&w&&!w[f]&&a(w,f,h)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},6821:function(t,n,e){var r=e("626a"),i=e("be13");t.exports=function(t){return r(i(t))}},"69a8":function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},"6a99":function(t,n,e){var r=e("d3f4");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")}},7726: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)},"77f1":function(t,n,e){var r=e("4588"),i=Math.max,o=Math.min;t.exports=function(t,n){return t=r(t),t<0?i(t+n,0):o(t,n)}},"794b":function(t,n,e){t.exports=!e("8e60")&&!e("294c")((function(){return 7!=Object.defineProperty(e("1ec9")("div"),"a",{get:function(){return 7}}).a}))},"79aa":function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"79e5":function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},"7a56":function(t,n,e){"use strict";var r=e("7726"),i=e("86cc"),o=e("9e1e"),a=e("2b4c")("species");t.exports=function(t){var n=r[t];o&&n&&!n[a]&&i.f(n,a,{configurable:!0,get:function(){return this}})}},"7f20":function(t,n,e){var r=e("86cc").f,i=e("69a8"),o=e("2b4c")("toStringTag");t.exports=function(t,n,e){t&&!i(t=e?t:t.prototype,o)&&r(t,o,{configurable:!0,value:n})}},"7f7f":function(t,n,e){var r=e("86cc").f,i=Function.prototype,o=/^\s*function ([^ (]*)/,a="name";a in i||e("9e1e")&&r(i,a,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},8378:function(t,n){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)},"84f2":function(t,n){t.exports={}},"85f2":function(t,n,e){t.exports=e("454f")},"86cc":function(t,n,e){var r=e("cb7c"),i=e("c69a"),o=e("6a99"),a=Object.defineProperty;n.f=e("9e1e")?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return a(t,n,e)}catch(c){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},"8b97":function(t,n,e){var r=e("d3f4"),i=e("cb7c"),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("9b43")(Function.call,e("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),n=!(t instanceof Array)}catch(i){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},"8e60":function(t,n,e){t.exports=!e("294c")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},"8e6e":function(t,n,e){var r=e("5ca1"),i=e("990b"),o=e("6821"),a=e("11e9"),c=e("f1ae");r(r.S,"Object",{getOwnPropertyDescriptors:function(t){var n,e,r=o(t),u=a.f,s=i(r),f={},l=0;while(s.length>l)e=u(r,n=s[l++]),void 0!==e&&c(f,n,e);return f}})},9093:function(t,n,e){var r=e("ce10"),i=e("e11e").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"96fb":function(t,n){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},"990b":function(t,n,e){var r=e("9093"),i=e("2621"),o=e("cb7c"),a=e("7726").Reflect;t.exports=a&&a.ownKeys||function(t){var n=r.f(o(t)),e=i.f;return e?n.concat(e(t)):n}},"9b43":function(t,n,e){var r=e("d8e8");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)}}},"9c6c":function(t,n,e){var r=e("2b4c")("unscopables"),i=Array.prototype;void 0==i[r]&&e("32e9")(i,r,{}),t.exports=function(t){i[r][t]=!0}},"9def":function(t,n,e){var r=e("4588"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"9e1e":function(t,n,e){t.exports=!e("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},aa77:function(t,n,e){var r=e("5ca1"),i=e("be13"),o=e("79e5"),a=e("fdef"),c="["+a+"]",u="
",s=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t,n,e){var i={},c=o((function(){return!!a[t]()||u[t]()!=u})),s=i[t]=c?n(h):a[t];e&&(i[e]=s),r(r.P+r.F*c,"String",i)},h=l.trim=function(t,n){return t=String(i(t)),1&n&&(t=t.replace(s,"")),2&n&&(t=t.replace(f,"")),t};t.exports=l},ac6a:function(t,n,e){for(var r=e("cadf"),i=e("0d58"),o=e("2aba"),a=e("7726"),c=e("32e9"),u=e("84f2"),s=e("2b4c"),f=s("iterator"),l=s("toStringTag"),h=u.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},d=i(p),v=0;v<d.length;v++){var y,g=d[v],b=p[g],m=a[g],w=m&&m.prototype;if(w&&(w[f]||c(w,f,h),w[l]||c(w,l,g),u[g]=h,b))for(y in r)w[y]||o(w,y,r[y],!0)}},aebd:function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},b635:function(t,n,e){"use strict";(function(t){e("7f7f");var r=e("2088");e.d(n,"b",(function(){return r["a"]}));var i=e("56f0");e.d(n,"d",(function(){return i["a"]}));var o=e("1680");e.d(n,"a",(function(){return o["a"]}));var a=e("f282");e.d(n,"e",(function(){return a["a"]}));var c=e("22cd");e.d(n,"c",(function(){return c["a"]}));var u=e("2af9"),s=function t(n){if(!t.installed){for(var e in t.installed=!0,u)n.use(u[e]);n.component("kinesis-container",r["a"]),n.component("kinesis-element",i["a"]),n.component("kinesis-audio",o["a"]),n.component("kinesis-scroll",a["a"]),n.component("kinesis-distance",c["a"])}},f={install:s},l=null;"undefined"!==typeof window?l=window.Vue:"undefined"!==typeof t&&(l=t.Vue),l&&l.use(f),n["f"]=f}).call(this,e("c8ba"))},ba92:function(t,n,e){"use strict";var r=e("4bf8"),i=e("77f1"),o=e("9def");t.exports=[].copyWithin||function(t,n){var e=r(this),a=o(e.length),c=i(t,a),u=i(n,a),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?a:i(s,a))-u,a-c),l=1;u<c&&c<u+f&&(l=-1,u+=f-1,c+=f-1);while(f-- >0)u in e?e[c]=e[u]:delete e[c],c+=l,u+=l;return e}},bd86:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var r=e("85f2"),i=e.n(r);function o(t,n,e){return n in t?i()(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}},be13:function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,n,e){var r=e("6821"),i=e("9def"),o=e("77f1");t.exports=function(t){return function(n,e,a){var c,u=r(n),s=i(u.length),f=o(a,s);if(t&&e!=e){while(s>f)if(c=u[f++],c!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===e)return t||f||0;return!t&&-1}}},c5f6:function(t,n,e){"use strict";var r=e("7726"),i=e("69a8"),o=e("2d95"),a=e("5dbc"),c=e("6a99"),u=e("79e5"),s=e("9093").f,f=e("11e9").f,l=e("86cc").f,h=e("aa77").trim,p="Number",d=r[p],v=d,y=d.prototype,g=o(e("2aeb")(y))==p,b="trim"in String.prototype,m=function(t){var n=c(t,!1);if("string"==typeof n&&n.length>2){n=b?n.trim():h(n,3);var e,r,i,o=n.charCodeAt(0);if(43===o||45===o){if(e=n.charCodeAt(2),88===e||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 a,u=n.slice(2),s=0,f=u.length;s<f;s++)if(a=u.charCodeAt(s),a<48||a>i)return NaN;return parseInt(u,r)}}return+n};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var n=arguments.length<1?0:t,e=this;return e instanceof d&&(g?u((function(){y.valueOf.call(e)})):o(e)!=p)?a(new v(m(n)),e,d):m(n)};for(var w,x=e("9e1e")?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(","),O=0;x.length>O;O++)i(v,w=x[O])&&!i(d,w)&&l(d,w,f(v,w));d.prototype=y,y.constructor=d,e("2aba")(r,p,d)}},c69a:function(t,n,e){t.exports=!e("9e1e")&&!e("79e5")((function(){return 7!=Object.defineProperty(e("230e")("div"),"a",{get:function(){return 7}}).a}))},c7c6:function(t,n,e){var r=e("5ca1"),i=Math.abs;r(r.S,"Math",{hypot:function(t,n){var e,r,o=0,a=0,c=arguments.length,u=0;while(a<c)e=i(arguments[a++]),u<e?(r=u/e,o=o*r*r+1,u=e):e>0?(r=e/u,o+=r*r):o+=e;return u===1/0?1/0:u*Math.sqrt(o)}})},c8ba:function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(r){"object"===typeof window&&(e=window)}t.exports=e},c8bd:function(t,n,e){"use strict";e("c5f6");n["a"]={props:{active:{type:Boolean,default:!0},duration:{type:Number,default:1e3},easing:{type:String,default:"cubic-bezier(0.23, 1, 0.32, 1)"},tag:{type:String,default:"div"}}}},ca5a:function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+r).toString(36))}},cadf:function(t,n,e){"use strict";var r=e("9c6c"),i=e("d53b"),o=e("84f2"),a=e("6821");t.exports=e("01f9")(Array,"Array",(function(t,n){this._t=a(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")},cb7c:function(t,n,e){var r=e("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},cb96:function(t,n,e){"use strict";e("c5f6");n["a"]={props:{type:{type:String,default:"translate"},transformOrigin:{type:String,default:"center"},originX:{type:Number,default:50},originY:{type:Number,default:50},strength:{type:Number,default:10},audioIndex:{type:Number,default:50},axis:{type:String,default:null},maxX:{type:Number,default:null},maxY:{type:Number,default:null},minX:{type:Number,default:null},minY:{type:Number,default:null},cycle:{type:Number,default:0}},methods:{strengthManager:function(){return"depth"===this.type||"depth_inv"===this.type?Math.abs(this.strength):this.strength}}}},cd1c:function(t,n,e){var r=e("e853");t.exports=function(t,n){return new(r(t))(n)}},ce10:function(t,n,e){var r=e("69a8"),i=e("6821"),o=e("c366")(!1),a=e("613b")("IE_PROTO");t.exports=function(t,n){var e,c=i(t),u=0,s=[];for(e in c)e!=a&&r(c,e)&&s.push(e);while(n.length>u)r(c,e=n[u++])&&(~o(s,e)||s.push(e));return s}},d3f4:function(t,n){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,n){t.exports=function(t,n){return{value:n,done:!!t}}},d864:function(t,n,e){var r=e("79aa");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)}}},d8e8:function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},d9f6:function(t,n,e){var r=e("e4ae"),i=e("794b"),o=e("1bc3"),a=Object.defineProperty;n.f=e("8e60")?Object.defineProperty:function(t,n,e){if(r(t),n=o(n,!0),r(e),i)try{return a(t,n,e)}catch(c){}if("get"in e||"set"in e)throw TypeError("Accessors not supported!");return"value"in e&&(t[n]=e.value),t}},dc57:function(t,n,e){"use strict";function r(t,n,e){var r,i;return function(){var o,a=this;o="scroll"===e||a.duration>1e3?n:a.duration/10;var c=+new Date,u=arguments;r&&c<r+o?(clearTimeout(i),i=setTimeout((function(){requestAnimationFrame((function(){r=c,t.apply(a,u)}))}),o)):requestAnimationFrame((function(){r=c,t.apply(a,u)}))}}e.d(n,"a",(function(){return r}))},dcbc:function(t,n,e){var r=e("2aba");t.exports=function(t,n,e){for(var i in n)r(t,i,n[i],e);return t}},e11e:function(t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e3ae:function(t,n,e){"use strict";e("c5f6");n["a"]={props:{perspective:{type:Number,default:1e3}},computed:{style:function(){return{perspective:"".concat(this.perspective,"px")}}}}},e4ae:function(t,n,e){var r=e("f772");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},e53d: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)},e7a7:function(t,n,e){"use strict";n["a"]=function(t,n){return{x:t,y:n}}},e853:function(t,n,e){var r=e("d3f4"),i=e("1169"),o=e("2b4c")("species");t.exports=function(t){var n;return i(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!i(n.prototype)||(n=void 0),r(n)&&(n=n[o],null===n&&(n=void 0))),void 0===n?Array:n}},ebd6:function(t,n,e){var r=e("cb7c"),i=e("d8e8"),o=e("2b4c")("species");t.exports=function(t,n){var e,a=r(t).constructor;return void 0===a||void 0==(e=r(a)[o])?n:i(e)}},ec30:function(t,n,e){"use strict";if(e("9e1e")){var r=e("2d00"),i=e("7726"),o=e("79e5"),a=e("5ca1"),c=e("0f88"),u=e("ed0b"),s=e("9b43"),f=e("f605"),l=e("4630"),h=e("32e9"),p=e("dcbc"),d=e("4588"),v=e("9def"),y=e("09fa"),g=e("77f1"),b=e("6a99"),m=e("69a8"),w=e("23c6"),x=e("d3f4"),O=e("4bf8"),j=e("33a4"),S=e("2aeb"),P=e("38fd"),_=e("9093").f,M=e("27ee"),E=e("ca5a"),A=e("2b4c"),D=e("0a49"),T=e("c366"),N=e("ebd6"),I=e("cadf"),F=e("84f2"),L=e("5cc5"),k=e("7a56"),C=e("36bd"),R=e("ba92"),Y=e("86cc"),B=e("11e9"),X=Y.f,V=B.f,W=i.RangeError,K=i.TypeError,U=i.Uint8Array,$="ArrayBuffer",G="Shared"+$,H="BYTES_PER_ELEMENT",q="prototype",z=Array[q],J=u.ArrayBuffer,Q=u.DataView,Z=D(0),tt=D(2),nt=D(3),et=D(4),rt=D(5),it=D(6),ot=T(!0),at=T(!1),ct=I.values,ut=I.keys,st=I.entries,ft=z.lastIndexOf,lt=z.reduce,ht=z.reduceRight,pt=z.join,dt=z.sort,vt=z.slice,yt=z.toString,gt=z.toLocaleString,bt=A("iterator"),mt=A("toStringTag"),wt=E("typed_constructor"),xt=E("def_constructor"),Ot=c.CONSTR,jt=c.TYPED,St=c.VIEW,Pt="Wrong length!",_t=D(1,(function(t,n){return Tt(N(t,t[xt]),n)})),Mt=o((function(){return 1===new U(new Uint16Array([1]).buffer)[0]})),Et=!!U&&!!U[q].set&&o((function(){new U(1).set({})})),At=function(t,n){var e=d(t);if(e<0||e%n)throw W("Wrong offset!");return e},Dt=function(t){if(x(t)&&jt in t)return t;throw K(t+" is not a typed array!")},Tt=function(t,n){if(!x(t)||!(wt in t))throw K("It is not a typed array constructor!");return new t(n)},Nt=function(t,n){return It(N(t,t[xt]),n)},It=function(t,n){var e=0,r=n.length,i=Tt(t,r);while(r>e)i[e]=n[e++];return i},Ft=function(t,n,e){X(t,n,{get:function(){return this._d[e]}})},Lt=function(t){var n,e,r,i,o,a,c=O(t),u=arguments.length,f=u>1?arguments[1]:void 0,l=void 0!==f,h=M(c);if(void 0!=h&&!j(h)){for(a=h.call(c),r=[],n=0;!(o=a.next()).done;n++)r.push(o.value);c=r}for(l&&u>2&&(f=s(f,arguments[2],2)),n=0,e=v(c.length),i=Tt(this,e);e>n;n++)i[n]=l?f(c[n],n):c[n];return i},kt=function(){var t=0,n=arguments.length,e=Tt(this,n);while(n>t)e[t]=arguments[t++];return e},Ct=!!U&&o((function(){gt.call(new U(1))})),Rt=function(){return gt.apply(Ct?vt.call(Dt(this)):Dt(this),arguments)},Yt={copyWithin:function(t,n){return R.call(Dt(this),t,n,arguments.length>2?arguments[2]:void 0)},every:function(t){return et(Dt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return C.apply(Dt(this),arguments)},filter:function(t){return Nt(this,tt(Dt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Dt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Dt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Dt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Dt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Dt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return pt.apply(Dt(this),arguments)},lastIndexOf:function(t){return ft.apply(Dt(this),arguments)},map:function(t){return _t(Dt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(Dt(this),arguments)},reduceRight:function(t){return ht.apply(Dt(this),arguments)},reverse:function(){var t,n=this,e=Dt(n).length,r=Math.floor(e/2),i=0;while(i<r)t=n[i],n[i++]=n[--e],n[e]=t;return n},some:function(t){return nt(Dt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return dt.call(Dt(this),t)},subarray:function(t,n){var e=Dt(this),r=e.length,i=g(t,r);return new(N(e,e[xt]))(e.buffer,e.byteOffset+i*e.BYTES_PER_ELEMENT,v((void 0===n?r:g(n,r))-i))}},Bt=function(t,n){return Nt(this,vt.call(Dt(this),t,n))},Xt=function(t){Dt(this);var n=At(arguments[1],1),e=this.length,r=O(t),i=v(r.length),o=0;if(i+n>e)throw W(Pt);while(o<i)this[n+o]=r[o++]},Vt={entries:function(){return st.call(Dt(this))},keys:function(){return ut.call(Dt(this))},values:function(){return ct.call(Dt(this))}},Wt=function(t,n){return x(t)&&t[jt]&&"symbol"!=typeof n&&n in t&&String(+n)==String(n)},Kt=function(t,n){return Wt(t,n=b(n,!0))?l(2,t[n]):V(t,n)},Ut=function(t,n,e){return!(Wt(t,n=b(n,!0))&&x(e)&&m(e,"value"))||m(e,"get")||m(e,"set")||e.configurable||m(e,"writable")&&!e.writable||m(e,"enumerable")&&!e.enumerable?X(t,n,e):(t[n]=e.value,t)};Ot||(B.f=Kt,Y.f=Ut),a(a.S+a.F*!Ot,"Object",{getOwnPropertyDescriptor:Kt,defineProperty:Ut}),o((function(){yt.call({})}))&&(yt=gt=function(){return pt.call(this)});var $t=p({},Yt);p($t,Vt),h($t,bt,Vt.values),p($t,{slice:Bt,set:Xt,constructor:function(){},toString:yt,toLocaleString:Rt}),Ft($t,"buffer","b"),Ft($t,"byteOffset","o"),Ft($t,"byteLength","l"),Ft($t,"length","e"),X($t,mt,{get:function(){return this[jt]}}),t.exports=function(t,n,e,u){u=!!u;var s=t+(u?"Clamped":"")+"Array",l="get"+t,p="set"+t,d=i[s],g=d||{},b=d&&P(d),m=!d||!c.ABV,O={},j=d&&d[q],M=function(t,e){var r=t._d;return r.v[l](e*n+r.o,Mt)},E=function(t,e,r){var i=t._d;u&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[p](e*n+i.o,r,Mt)},A=function(t,n){X(t,n,{get:function(){return M(this,n)},set:function(t){return E(this,n,t)},enumerable:!0})};m?(d=e((function(t,e,r,i){f(t,d,s,"_d");var o,a,c,u,l=0,p=0;if(x(e)){if(!(e instanceof J||(u=w(e))==$||u==G))return jt in e?It(d,e):Lt.call(d,e);o=e,p=At(r,n);var g=e.byteLength;if(void 0===i){if(g%n)throw W(Pt);if(a=g-p,a<0)throw W(Pt)}else if(a=v(i)*n,a+p>g)throw W(Pt);c=a/n}else c=y(e),a=c*n,o=new J(a);h(t,"_d",{b:o,o:p,l:a,e:c,v:new Q(o)});while(l<c)A(t,l++)})),j=d[q]=S($t),h(j,"constructor",d)):o((function(){d(1)}))&&o((function(){new d(-1)}))&&L((function(t){new d,new d(null),new d(1.5),new d(t)}),!0)||(d=e((function(t,e,r,i){var o;return f(t,d,s),x(e)?e instanceof J||(o=w(e))==$||o==G?void 0!==i?new g(e,At(r,n),i):void 0!==r?new g(e,At(r,n)):new g(e):jt in e?It(d,e):Lt.call(d,e):new g(y(e))})),Z(b!==Function.prototype?_(g).concat(_(b)):_(g),(function(t){t in d||h(d,t,g[t])})),d[q]=j,r||(j.constructor=d));var D=j[bt],T=!!D&&("values"==D.name||void 0==D.name),N=Vt.values;h(d,wt,!0),h(j,jt,s),h(j,St,!0),h(j,xt,d),(u?new d(1)[mt]==s:mt in j)||X(j,mt,{get:function(){return s}}),O[s]=d,a(a.G+a.W+a.F*(d!=g),O),a(a.S,s,{BYTES_PER_ELEMENT:n}),a(a.S+a.F*o((function(){g.of.call(d,1)})),s,{from:Lt,of:kt}),H in j||h(j,H,n),a(a.P,s,Yt),k(s),a(a.P+a.F*Et,s,{set:Xt}),a(a.P+a.F*!T,s,Vt),r||j.toString==yt||(j.toString=yt),a(a.P+a.F*o((function(){new d(1).slice()})),s,{slice:Bt}),a(a.P+a.F*(o((function(){return[1,2].toLocaleString()!=new d([1,2]).toLocaleString()}))||!o((function(){j.toLocaleString.call([1,2])}))),s,{toLocaleString:Rt}),F[s]=T?D:N,r||T||h(j,bt,N)}}else t.exports=function(){}},ed0b:function(t,n,e){"use strict";var r=e("7726"),i=e("9e1e"),o=e("2d00"),a=e("0f88"),c=e("32e9"),u=e("dcbc"),s=e("79e5"),f=e("f605"),l=e("4588"),h=e("9def"),p=e("09fa"),d=e("9093").f,v=e("86cc").f,y=e("36bd"),g=e("7f20"),b="ArrayBuffer",m="DataView",w="prototype",x="Wrong length!",O="Wrong index!",j=r[b],S=r[m],P=r.Math,_=r.RangeError,M=r.Infinity,E=j,A=P.abs,D=P.pow,T=P.floor,N=P.log,I=P.LN2,F="buffer",L="byteLength",k="byteOffset",C=i?"_b":F,R=i?"_l":L,Y=i?"_o":k;function B(t,n,e){var r,i,o,a=new Array(e),c=8*e-n-1,u=(1<<c)-1,s=u>>1,f=23===n?D(2,-24)-D(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for(t=A(t),t!=t||t===M?(i=t!=t?1:0,r=u):(r=T(N(t)/I),t*(o=D(2,-r))<1&&(r--,o*=2),t+=r+s>=1?f/o:f*D(2,1-s),t*o>=2&&(r++,o/=2),r+s>=u?(i=0,r=u):r+s>=1?(i=(t*o-1)*D(2,n),r+=s):(i=t*D(2,s-1)*D(2,n),r=0));n>=8;a[l++]=255&i,i/=256,n-=8);for(r=r<<n|i,c+=n;c>0;a[l++]=255&r,r/=256,c-=8);return a[--l]|=128*h,a}function X(t,n,e){var r,i=8*e-n-1,o=(1<<i)-1,a=o>>1,c=i-7,u=e-1,s=t[u--],f=127&s;for(s>>=7;c>0;f=256*f+t[u],u--,c-=8);for(r=f&(1<<-c)-1,f>>=-c,c+=n;c>0;r=256*r+t[u],u--,c-=8);if(0===f)f=1-a;else{if(f===o)return r?NaN:s?-M:M;r+=D(2,n),f-=a}return(s?-1:1)*r*D(2,f-n)}function V(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function W(t){return[255&t]}function K(t){return[255&t,t>>8&255]}function U(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function $(t){return B(t,52,8)}function G(t){return B(t,23,4)}function H(t,n,e){v(t[w],n,{get:function(){return this[e]}})}function q(t,n,e,r){var i=+e,o=p(i);if(o+n>t[R])throw _(O);var a=t[C]._b,c=o+t[Y],u=a.slice(c,c+n);return r?u:u.reverse()}function z(t,n,e,r,i,o){var a=+e,c=p(a);if(c+n>t[R])throw _(O);for(var u=t[C]._b,s=c+t[Y],f=r(+i),l=0;l<n;l++)u[s+l]=f[o?l:n-l-1]}if(a.ABV){if(!s((function(){j(1)}))||!s((function(){new j(-1)}))||s((function(){return new j,new j(1.5),new j(NaN),j.name!=b}))){j=function(t){return f(this,j),new E(p(t))};for(var J,Q=j[w]=E[w],Z=d(E),tt=0;Z.length>tt;)(J=Z[tt++])in j||c(j,J,E[J]);o||(Q.constructor=j)}var nt=new S(new j(2)),et=S[w].setInt8;nt.setInt8(0,2147483648),nt.setInt8(1,2147483649),!nt.getInt8(0)&&nt.getInt8(1)||u(S[w],{setInt8:function(t,n){et.call(this,t,n<<24>>24)},setUint8:function(t,n){et.call(this,t,n<<24>>24)}},!0)}else j=function(t){f(this,j,b);var n=p(t);this._b=y.call(new Array(n),0),this[R]=n},S=function(t,n,e){f(this,S,m),f(t,j,m);var r=t[R],i=l(n);if(i<0||i>r)throw _("Wrong offset!");if(e=void 0===e?r-i:h(e),i+e>r)throw _(x);this[C]=t,this[Y]=i,this[R]=e},i&&(H(j,L,"_l"),H(S,F,"_b"),H(S,L,"_l"),H(S,k,"_o")),u(S[w],{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 V(q(this,4,t,arguments[1]))},getUint32:function(t){return V(q(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return X(q(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return X(q(this,8,t,arguments[1]),52,8)},setInt8:function(t,n){z(this,1,t,W,n)},setUint8:function(t,n){z(this,1,t,W,n)},setInt16:function(t,n){z(this,2,t,K,n,arguments[2])},setUint16:function(t,n){z(this,2,t,K,n,arguments[2])},setInt32:function(t,n){z(this,4,t,U,n,arguments[2])},setUint32:function(t,n){z(this,4,t,U,n,arguments[2])},setFloat32:function(t,n){z(this,4,t,G,n,arguments[2])},setFloat64:function(t,n){z(this,8,t,$,n,arguments[2])}});g(j,b),g(S,m),c(S[w],a.VIEW,!0),n[b]=j,n[m]=S},f1ae:function(t,n,e){"use strict";var r=e("86cc"),i=e("4630");t.exports=function(t,n,e){n in t?r.f(t,n,i(0,e)):t[n]=e}},f282:function(t,n,e){"use strict";var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e(t.tag,{tag:"component",style:Object.assign({},t.transform,t.transformParameters)},[t._t("default")],2)},i=[],o=e("234f"),a=e("dc57"),c=e("c8bd"),u=e("e3ae"),s=e("cb96"),f=e("3879"),l={name:"KinesisScroll",mixins:[c["a"],u["a"],s["a"],f["a"]],data:function(){return{transform:{}}},mounted:function(){window.addEventListener("scroll",this.handleScroll,{passive:!0})},beforeDestroy:function(){window.removeEventListener("scroll",this.handleScroll,{passive:!0})},computed:{transformParameters:function(){return{transitionProperty:"transform",transitionDuration:this.transitionDuration,transformOrigin:this.transformOrigin,transitionTimingFunction:this.easing}},transitionDuration:function(){return"".concat(this.duration,"ms")}},methods:{getCycleMovement:function(t,n,e,r,i){var o=(t-i.left)*(2*Math.PI)/e,a=(n-i.top)*(2*Math.PI)/r;this.cycleMovement={x:o,y:a,width:e,height:r}},handleScroll:Object(a["a"])((function(){if(this.active){var t=this.$el.getBoundingClientRect(),n=Object(o["a"])(t);n&&t.height&&this.transformBehavior(t)}}),19,"scroll"),transformBehavior:function(t){var n,e,r=(t.top-window.innerHeight)/(t.height+window.innerHeight);if(this.cycle<=0){var i=r*this.strength;n="x"===this.axis?i:0,e="y"!==this.axis&&this.axis?0:i,this.maxX&&(n=Math.min(n,this.maxX)),this.minX&&(n=Math.max(n,this.minX)),this.maxY&&(e=Math.min(e,this.maxY)),this.minY&&(e=Math.max(e,this.minY))}else if(this.cycle>0){var o=this.getCycleMovement(0,0,window.innerWidth,window.innerHeight,t),a=o.x,c=o.y,u=o.width,s=o.height,f=u*Math.sin(a*this.cycle),l=s*Math.sin(c*this.cycle);n="x"===this.axis?f/(u/2)*this.strength:0,e="y"!==this.axis&&this.axis?0:l/(s/2)*this.strength}var h=this.type;h="scaleX"===h||"scaleY"===h?"scale":h;var p=this.transformSwitch(h,n,e,this.strength);this.transform={transform:p}}}},h=l,p=e("2877"),d=Object(p["a"])(h,r,i,!1,null,null,null);n["a"]=d.exports},f605: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}},f6fd:function(t,n){(function(t){var n="currentScript",e=t.getElementsByTagName("script");n in t||Object.defineProperty(t,n,{get:function(){try{throw new Error}catch(r){var t,n=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in e)if(e[t].src==n||"interactive"==e[t].readyState)return e[t];return null}}})})(document)},f772:function(t,n){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},fa5b:function(t,n,e){t.exports=e("5537")("native-function-to-string",Function.toString)},fab2:function(t,n,e){var r=e("7726").document;t.exports=r&&r.documentElement},fb15:function(t,n,e){"use strict";var r;(e.r(n),"undefined"!==typeof window)&&(e("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(e.p=r[1]));var i=e("b635");e.d(n,"KinesisContainer",(function(){return i["b"]})),e.d(n,"KinesisElement",(function(){return i["d"]})),e.d(n,"KinesisScroll",(function(){return i["e"]})),e.d(n,"KinesisAudio",(function(){return i["a"]})),e.d(n,"KinesisDistance",(function(){return i["c"]}));n["default"]=i["f"]},fdef:function(t,n){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"}})}))}}]); | 54,036 | 54,036 | 0.662891 |
1016246f2a4139c29fa6254f1adb1e7fe380c69a | 845 | js | JavaScript | test/htmlToAbsoluteUrlsTest.js | anyuzx/eleventy-plugin-rss | c38bc4341b935d11b2021e4d692becf84e8579d9 | [
"MIT"
] | 3 | 2020-12-14T17:49:40.000Z | 2021-04-05T08:32:01.000Z | node_modules/@11ty/eleventy-plugin-rss/test/htmlToAbsoluteUrlsTest.js | KennethJ-USC/osrs-blog | ad63913d6a2e9c6138991063d324b78cbf279ae4 | [
"MIT"
] | 5 | 2020-07-13T03:54:15.000Z | 2022-02-26T01:42:06.000Z | node_modules/@11ty/eleventy-plugin-rss/test/htmlToAbsoluteUrlsTest.js | planetoftheweb/raybotest | 1e16b3bffe7920e4cb95c0cedd3055653cc0a3ea | [
"MIT"
] | null | null | null | import test from "ava";
import htmlToAbsUrls from "../src/HtmlToAbsoluteUrls.js";
test("Changes a link href", async t => {
t.is((await htmlToAbsUrls(`<a href="#testanchor">Hello</a>`, "http://example.com/")).html, `<a href="#testanchor">Hello</a>`);
t.is((await htmlToAbsUrls(`<a href="/test.html">Hello</a>`, "http://example.com/")).html, `<a href="http://example.com/test.html">Hello</a>`);
t.is((await htmlToAbsUrls(`<img src="/test.png">`, "http://example.com/")).html, `<img src="http://example.com/test.png">`);
t.is((await htmlToAbsUrls(`<a href="http://someotherdomain/">Hello</a>`, "http://example.com/")).html, `<a href="http://someotherdomain/">Hello</a>`);
});
test("Bad link href", async t => {
t.is((await htmlToAbsUrls(`<a href="http://#">Hello</a>`, "http://example.com/")).html, `<a href="http://#">Hello</a>`);
});
| 60.357143 | 152 | 0.626036 |
101672398838406dfce52b09dc966b13617de125 | 1,582 | js | JavaScript | test/services.products.test.js | johnserrano15/express | ddcfcffd687936ef13b0e381d70d4af267e0da51 | [
"MIT"
] | null | null | null | test/services.products.test.js | johnserrano15/express | ddcfcffd687936ef13b0e381d70d4af267e0da51 | [
"MIT"
] | 5 | 2020-03-12T22:36:03.000Z | 2021-09-01T22:02:43.000Z | test/services.products.test.js | johnserrano15/express | ddcfcffd687936ef13b0e381d70d4af267e0da51 | [
"MIT"
] | null | null | null | /* eslint-env mocha */
const assert = require('assert')
const proxyquire = require('proxyquire')
const {
MongoLibMock,
getAllStub,
createStub
} = require('../utils/mocks/mongoLib')
const {
productsMock,
filteredProductsMock
} = require('../utils/mocks/products')
describe('services - products', function () {
const ProductsService = proxyquire('../services/products', {
'../lib/mongo': MongoLibMock
})
const productsService = new ProductsService()
describe('when getProducts method is called', async function () {
it('should call the getAll MongoLib method', async function () {
await productsService.getProducts({})
assert.strictEqual(getAllStub.called, true)
})
it('should return an array of products', async function () {
const result = await productsService.getProducts({})
const expected = productsMock
assert.deepStrictEqual(result, expected)
})
})
describe('when getProducts method is called with tags', async function () {
it('should all the getAll MongoLib method with tags args', async function () {
await productsService.getProducts({ tags: ['expensive'] })
const tagQuery = { tags: { $in: ['expensive'] } }
assert.strictEqual(getAllStub.calledWith('products', tagQuery), true)
})
it('should return an array of products filtered by the tag', async function () {
const result = await productsService.getProducts({ tags: ['expensive'] })
const expected = filteredProductsMock('expensive')
assert.deepStrictEqual(result, expected)
})
})
})
| 31.64 | 84 | 0.68268 |
1017005799e8fcee2225e5f563321ca080c53353 | 41 | js | JavaScript | collection/wallet.js | kasoki/reddcomet | e71bd7370b4496417f07759af42e3462bc8c6819 | [
"MIT"
] | null | null | null | collection/wallet.js | kasoki/reddcomet | e71bd7370b4496417f07759af42e3462bc8c6819 | [
"MIT"
] | null | null | null | collection/wallet.js | kasoki/reddcomet | e71bd7370b4496417f07759af42e3462bc8c6819 | [
"MIT"
] | null | null | null | Wallet = new Meteor.Collection("wallet"); | 41 | 41 | 0.756098 |
10182f319c531ad7aaa92b32207be1f259972517 | 2,041 | js | JavaScript | experiments/map/mapGen/test86.js | sola-da/LambdaTester | f993f9d67eab0120b14111be1a56d40b4c5ac9af | [
"MIT"
] | 2 | 2018-11-26T09:34:28.000Z | 2019-10-18T16:23:53.000Z | experiments/map/mapGen/test86.js | sola-da/LambdaTester | f993f9d67eab0120b14111be1a56d40b4c5ac9af | [
"MIT"
] | null | null | null | experiments/map/mapGen/test86.js | sola-da/LambdaTester | f993f9d67eab0120b14111be1a56d40b4c5ac9af | [
"MIT"
] | 1 | 2019-10-08T16:37:48.000Z | 2019-10-08T16:37:48.000Z |
var callbackArguments = [];
var argument1 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
argument2[2] = 1.495342560590709e+308
base_0[6] = {"94!x&":"S","":7.775650504133382e+307,"Nd!(":"<:m"}
return a-b+c
};
var argument2 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
argument3[5] = [0,242,122,893,655,893,705,82,126]
return a-b-c
};
var argument3 = null;
var argument4 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
base_2[3] = [618,403,"5",618]
argument6[157] = null
return a/b+c
};
var argument5 = null;
var argument6 = false;
var argument7 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
base_3['length'] = {"100":";","213":8.472551998417051e+307,"":"","#p":"","1.1268697338009697e+308":"","1.2980423231148904e+307":"","k":1.2080153122493356e+308}
base_3[3][2] = false
argument8['A'] = {"0":157,"126":823,"BsJ]@":627,"9.488557231727682e+307":618}
return a-b+c
};
var argument8 = null;
var argument9 = null;
var base_0 = [460,969,59,-1]
var r_0= undefined
try {
r_0 = base_0.map(argument1)
}
catch(e) {
r_0= "Error"
}
var base_1 = [460,969,59,-1]
var r_1= undefined
try {
r_1 = base_1.map(argument2,argument3)
}
catch(e) {
r_1= "Error"
}
var base_2 = [460,969,59,-1]
var r_2= undefined
try {
r_2 = base_2.map(argument4,argument5,argument6)
}
catch(e) {
r_2= "Error"
}
var base_3 = r_2
var r_3= undefined
try {
r_3 = base_3.map(argument7,argument8,argument9)
}
catch(e) {
r_3= "Error"
}
function serialize(array){
return array.map(function(a){
if (a === null || a == undefined) return a;
var name = a.constructor.name;
if (name==='Object' || name=='Boolean'|| name=='Array'||name=='Number'||name=='String')
return JSON.stringify(a);
return name;
});
}
setTimeout(function(){
require("fs").writeFileSync("./experiments/map/mapGen/test86.json",JSON.stringify({"baseObjects":serialize([base_0,base_1,base_2,base_3]),"returnObjects":serialize([r_0,r_1,r_2,r_3]),"callbackArgs":callbackArguments}))
},300) | 25.5125 | 218 | 0.695247 |
10187d77ea34d928ea9bd099b2d673194be63a56 | 751 | js | JavaScript | node_modules/@react-icons/all-files/io/IoIosFlask.js | syazwanirahimin/dotcom | 162acf4500655ec965d27bd1e45ef0415963d346 | [
"MIT"
] | null | null | null | node_modules/@react-icons/all-files/io/IoIosFlask.js | syazwanirahimin/dotcom | 162acf4500655ec965d27bd1e45ef0415963d346 | [
"MIT"
] | null | null | null | node_modules/@react-icons/all-files/io/IoIosFlask.js | syazwanirahimin/dotcom | 162acf4500655ec965d27bd1e45ef0415963d346 | [
"MIT"
] | null | null | null | // THIS FILE IS AUTO GENERATED
var GenIcon = require('../lib').GenIcon
module.exports.IoIosFlask = function IoIosFlask (props) {
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M437.4 354.4L320.7 159.9c-.4-.6-.6-1.3-.6-2.1V80c0-2.2 1.8-4 4-4 6.6 0 12-5.4 12-12v-4c0-6.6-5.4-12-12-12H187.8c-6.6 0-12 5.4-12 12v4c0 6.6 5.4 12 12 12 2.2 0 4 1.8 4 4v77.9c0 .7-.2 1.4-.6 2L75.7 354.4c-8.4 15.8-12.5 31.4-12.1 45.6 1.1 36.5 28.8 64 65.2 64h256.6c36.4 0 62.3-27.6 63.2-64 .2-14.2-2.7-29.7-11.2-45.6zM161.8 288c-6.2 0-10.1-6.8-6.9-12.1l60.5-101.7c2.9-4.9 4.5-10.6 4.5-16.3V80c0-1.4-.1-2.7-.2-4h72.7c-.2 1.3-.2 2.6-.2 4v77.9c0 5.8 1.6 11.5 4.6 16.4l60.4 101.6c3.2 5.3-.7 12.1-6.9 12.1H161.8z"}}]})(props);
};
| 125.166667 | 618 | 0.619174 |
10187df609ae3ec7a1da466ecbcbc0f2114437df | 1,922 | js | JavaScript | src/custom/NumExprs.js | jlenoble/casem | 51c92f8063923af34bc4472d8080829d2a619eee | [
"MIT"
] | null | null | null | src/custom/NumExprs.js | jlenoble/casem | 51c92f8063923af34bc4472d8080829d2a619eee | [
"MIT"
] | null | null | null | src/custom/NumExprs.js | jlenoble/casem | 51c92f8063923af34bc4472d8080829d2a619eee | [
"MIT"
] | null | null | null | const variables = {};
export const mixWithNumExprs = Interpreter => {
Object.assign(Interpreter.prototype, {
hasVariable (name) {
return name => name in variables;
},
getVariable (name) {
if (!this.hasVariable(name)) {
throw new ReferenceError(`Variable '${name}' is not initialized`);
}
return variables[name];
},
setVariable (name, value) {
variables[name] = value;
},
visitAdd (ctx) {
if (ctx.addOp().ADD() !== null) {
return this.visit(ctx.numExpr(0)) + this.visit(ctx.numExpr(1));
}
return this.visit(ctx.numExpr(0)) - this.visit(ctx.numExpr(1));
},
visitCompute (ctx) {
const f = this.visit(ctx.func())(this.visit(ctx.numExpr()));
const r = Math.round(f);
return Math.abs(f - r) < 1e-9 ? r : f;
},
visitConstEvaluate (ctx) {
const c = ctx.constant();
if (c.PI() !== null) {
return Math.PI;
}
},
visitEvaluate (ctx) {
return this.getVariable(ctx.variable().getText());
},
visitListElement (ctx) {
return this.visit(ctx.listElementExpr());
},
visitMatrixElement (ctx) {
return this.visit(ctx.matrixElementExpr());
},
visitMultiply (ctx) {
if (ctx.multOp().MUL() !== null) {
return this.visit(ctx.numExpr(0)) * this.visit(ctx.numExpr(1));
}
if (ctx.multOp().DIV() !== null) {
return this.visit(ctx.numExpr(0)) / this.visit(ctx.numExpr(1));
}
return this.visit(ctx.numExpr(0)) % this.visit(ctx.numExpr(1));
},
visitNegate (ctx) {
return -this.visit(ctx.numExpr());
},
visitParens (ctx) {
return this.visit(ctx.numExpr());
},
visitParse (ctx) {
return parseFloat(ctx.number().getText(), 10);
},
visitScalarMult (ctx) {
return this.visit(ctx.numExpr()) * this.visit(ctx.vectorExpr());
},
});
};
| 24.025 | 74 | 0.561915 |
1018bed68de8f5ccc67010a7a2341c908a9fb2f7 | 3,311 | js | JavaScript | packages/york-web/src/components/complex/Header/QleanPlusItem.js | Qlean/york | 93098df0d917d89dff86bf658687bddf2039e5dc | [
"MIT"
] | 5 | 2019-07-03T13:47:17.000Z | 2021-06-11T20:16:36.000Z | packages/york-web/src/components/complex/Header/QleanPlusItem.js | Qlean/york | 93098df0d917d89dff86bf658687bddf2039e5dc | [
"MIT"
] | 31 | 2019-06-14T12:20:56.000Z | 2022-02-26T15:54:08.000Z | packages/york-web/src/components/complex/Header/QleanPlusItem.js | Qlean/york | 93098df0d917d89dff86bf658687bddf2039e5dc | [
"MIT"
] | 1 | 2019-11-05T12:44:29.000Z | 2019-11-05T12:44:29.000Z | import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import { View, Separator } from 'york-web/components/primitive'
const icon =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAAAkCAMAAAAzQK3GAAAB3VBMVEUAAAAnm+0Hff0nnfAEe/xKwOEioO8kmfEsoe5LwOItou4Fev1KweIroe0lm/IFd/9Nv99FuuMonu8onu8Fe/tKv+Mpne8ajvU3rOpDueQFev4Lgfoaj/VKwOELgPsbkPQ1q+s0qOgdkvMEeftMweMekvQyqOj///8lm/Aonu83rekelPMckvQXjPY6sOgMgvokmvEimPE7secnnfAuo+0Zj/UYjvY/tOYsoe4UivcroO4OhPoqn+8zqeoQhvgwpewakPQ9s+czqOstou5Fu+QglvIKgPsvpO05rukxp+s0quoIfvwglfJAteYil/JCuOVBtuYSh/hJvuJEueQQhfoSiPdCuOQ1q+pHveMhl/ETifgVi/cwpusFe/0bkfM1qukxpuzj8v4flfI3rejI5vx1vvcelPJKwOLl8/3L6PsUivZGrfCNyPoHff2PyvllvfHi8P55w/UbkfU0n/Q3rOrz+v6Lxvuu2vmx3vhAp/NLse9MweHy+f6k2PeY0/Y/rO3m9f264Pp/yPNWs/IKgfxwwfNgv+zX7fzD4vyd0fpstvp/wfkymfiFx/dquvVbu+9uxu2Yy/3O6/k7pfI7qe5UuexBr+tGtOpJuOnx+P5ervmTzvgglfSN0PM0qunS0koPAAAAJ3RSTlMAIO+fcHAQ7+/v37q6cG8gINfPv6CfgO/v79/f39/Pv7+wr4B/cHCVyFkuAAAFoUlEQVRIx3WWB1cTQRSFhyL23nt3QaISBUQRRDFoYIlUYyAJSA9ViBGkRap0sHd/q/e9mclkLddzIizw5ea+MiOUMnam7du2pbQ0Nzf34cO7d5uDzfehoqLy8qYXl6HW1quk69ev37t3E6qsrKqqevL4SW1t7QPS06c1NTWdNZ1bT+7YsWmPSFbK/qysO3fu3L5dUFBQqvFerxd08P1+4j9qfUR0xt9T9McQ+EwHntTZOTY2djAJv2vzjRtZCXyyfa8X9sthv4nwEPgaDz7eAHSyb/CdhN+6SbMP5WRmZgIPaffKvqJzOsRvZbzmazz42j6k+BeUb7c7R+INX+Nhn/n3Ce/n8J3pMF/Sk+MBnb2nbA64GW/sMx94xef0ubj+JuKbdCBVXOBN+hz+Vso9zePxBXygO+ybdDh9LyTx/stUXUf4priO3tkB4x0dtscT8Dntm/BLFT6o3P/ya/scvnGv7ZtwMsTF7OyObI/t8bF9g2f7nH4uRMUlfBH+wb1MX+IhR++Y4m4S51wu4DvsFg/4Prfm/7e4qnfIvml9Zzwaf1CcdkHZ4LfYiCf6/hUrCrqKp4f1AXy2H49zOp/WB9Ydxf2ysbHx5WZlFacjW3+vOFFSwnioxW7/akmNr2n3EfVkStqfi40PeL3xyRgevZ7m4tJimH8nf+kmlGj9veJwXh7wYcl/Y2m1qd5Zs7QGOR2810gwqH9v0i8Xz3xMPZhPtD50VOTn5wGv7D9LoJ6p3hw0cA6f4HcnLfJNLwN+Gq2P9HXsdcyKfTR7DXxx5Uo+8UuGCA94P9LvBzwQ4OK2488QD8G5uAT/MG5ZXfHgKOxGuPVH8OOJz4+uzn92rk3ACZ/H9sMERzoEp953SzjiYTj1JsHnyDJ6hz5AnKoL4+9M6xu+uNXY2Ai6tA94L9IhuO2x0fk+Cc8kOPcO4F1dKDgVdwZP1wH/hP9/qrWvR4v54hbUyPaBJ3jYFe4FHM1Jk0twpENwbp42i9VFo9WDL6aD3vuj9Emwd9TkmtYX9fWMl3yCo7gMh+wWm+BYDHht597UcBRXwrEYGK4XT2sSXhRXV9fXNyj7zwFH+gRXrb+MP/QFFBwCvG0YcFo8MwTFZBF8jicXfJhP8EVxcXF1Q4PCA/4S6RA8jNZP1NZHcKTD8OFVfPcee4cKO0OjNY5mafbqM9esZVFYVwe+tN8t4fkvLeu5av0pOMViILgbyiE4Of2O4r6heAoQfgQVHm1G+mbr86klCgsLQSc86ARHOgSn1hyK9oKziA9AcN7KBId9vA5GqLt5bQ5QFUamJxdG4to9L32Reg14tg86wVFcglNr/uCJjbok3Ka9SfAchK3q2iPX5oR+MO31KjzSPyKOX7sGvApnwbK+Ifwly1qg1lyxoGWXHN2ZDhtbfxFj5navdSm2PhMnFXyU1r56A/82caoMdPA5npW3S6huw62ltyvcmstTvdG8oZKwK7rYTo1v29H+fh/SebXa1ja8GjVbv2ciEpmaGOBDi/hFOFbOiAOzZcArfjGlQ8WF/e5Gwsu9Rvww9ybcY7TccvH8dajQaDGe3Z8V6RUVZQZfB/vER28yHgKeixtWa5kPFZxZPo3XZ67zQoXWvCQyKqCyJL7Co7xmcvPy5VoO61PFI68MbqJr/xpfSu6hYIoQ2/sM3hSX7fNi6E62P6ROLZvt63CgRDrmwpMmhNidGgL8T77qfLav8cQPQ6Ar+wHDN/c1deHZkiKg9FAo1NdHdKf9OjW4prhEh3T68A++ufA4bzw7Bet8iPDS/azTPo+WxoPvOBThvkWmo+2b6hYcEkrpqSHD/6d9xif1pmlNxjvSIfwW+NbafSDkwEN6siSe/XfDvtO9ulDZjDfpZO3nvA0+ffv2Y6nAc/qzJh0VTz3Cr3fax2SZCxXZJ/zmbfvSdmUo6G9/cy0gUJqQZQAAAABJRU5ErkJggg=='
const StyledPlusIcon = styled.div`
width: 46px;
height: 18px;
background-size: 100%;
background-image: url(${icon});
`
export default function QleanPlusItem({ children }) {
return (
<View alignItems="center">
{children}
<Separator width={1} />
<StyledPlusIcon />
</View>
)
}
QleanPlusItem.propTypes = {
children: PropTypes.node.isRequired,
}
| 110.366667 | 2,746 | 0.90305 |
1019ab14d045d3c594e9da16cbde0cd842d0bb68 | 248 | js | JavaScript | 1-Project/backend-sql/src/api/pet/types/petInput.js | htouqeer938/pet-hotel | 10f278cc713a080a14eda864ae178c74fd42c095 | [
"MIT"
] | null | null | null | 1-Project/backend-sql/src/api/pet/types/petInput.js | htouqeer938/pet-hotel | 10f278cc713a080a14eda864ae178c74fd42c095 | [
"MIT"
] | null | null | null | 1-Project/backend-sql/src/api/pet/types/petInput.js | htouqeer938/pet-hotel | 10f278cc713a080a14eda864ae178c74fd42c095 | [
"MIT"
] | null | null | null | const schema = `
input PetInput {
owner: String!
name: String!
type: PetTypeEnum!
breed: String!
size: PetSizeEnum!
bookings: [ String! ]
}
`;
const resolver = {};
exports.schema = schema;
exports.resolver = resolver;
| 15.5 | 28 | 0.625 |
101a95d05f82a2a5543d69fd0684d876d4fe6876 | 160 | js | JavaScript | docs/custom.js | threema-danilo/ts-sql-query | eeee8f2c10917df68c1f26992e93ae26317ad2e4 | [
"MIT"
] | 55 | 2019-09-23T16:36:06.000Z | 2022-03-29T12:42:38.000Z | docs/custom.js | threema-danilo/ts-sql-query | eeee8f2c10917df68c1f26992e93ae26317ad2e4 | [
"MIT"
] | 27 | 2020-01-06T16:02:27.000Z | 2022-03-21T10:40:53.000Z | docs/custom.js | threema-danilo/ts-sql-query | eeee8f2c10917df68c1f26992e93ae26317ad2e4 | [
"MIT"
] | 8 | 2020-01-01T21:28:14.000Z | 2021-06-23T06:30:07.000Z | hljs.unregisterLanguage('sql');
hljs.registerAliases('sql', { languageName: 'pgsql' });
hljs.configure({ languages: ['sql', 'ts', 'tsx'] })
hljs.highlightAll(); | 40 | 55 | 0.6875 |
101afd8b2e1a9676943e3ac293362424df24347d | 2,011 | js | JavaScript | src/components/todo/form.js | oebitw/todo | c09d0d375abb7f03bbc9c82249bc5e2b61a8349c | [
"MIT"
] | null | null | null | src/components/todo/form.js | oebitw/todo | c09d0d375abb7f03bbc9c82249bc5e2b61a8349c | [
"MIT"
] | 4 | 2021-06-27T16:07:13.000Z | 2021-07-03T14:08:37.000Z | src/components/todo/form.js | oebitw/todo | c09d0d375abb7f03bbc9c82249bc5e2b61a8349c | [
"MIT"
] | null | null | null | //////////////////////////
//////// Imports ////////
////////////////////////
//==============//
// Dependencies//
//============//
import { useContext } from 'react';
import { Form, Button, Card } from 'react-bootstrap';
//==============//
// Components //
//============//
import useForm from '../../hooks/FormHook';
import { AuthContext } from '../../context/Auth';
const TodoForm = (props) => {
const authContext = useContext(AuthContext);
const [_handleInputChange, _handleSubmit] = useForm(props.handleSubmit);
return (
<Card>
<Card.Header as="h3">Add Item</Card.Header>
<Card.Body>
<Form
onSubmit={async (e) => {
if (authContext.user.capabilities.includes('create')) {
await _handleSubmit(e);
await props.fetch();
} else {
alert("You don't have the permession to create!");
}
}}
>
<Form.Group>
<Form.Label>To Do Item</Form.Label>
<Form.Control
type="text"
name="text"
placeholder="Add To Do List Item"
onChange={_handleInputChange}
/>
</Form.Group>
<Form.Group controlId="formBasicRange">
<Form.Label>Difficulty Rating</Form.Label>
<Form.Control
defaultValue="1"
type="range"
min="1"
max="5"
name="difficulty"
onChange={_handleInputChange}
/>
</Form.Group>
<Form.Group>
<Form.Label>Assigned To</Form.Label>
<Form.Control
type="text"
name="assignee"
placeholder="Assigned To"
onChange={_handleInputChange}
/>
</Form.Group>
<Button variant="primary" type="submit">
Add Item
</Button>
</Form>
</Card.Body>
</Card>
);
};
export default TodoForm; | 25.782051 | 74 | 0.465937 |
101b291c8a9b585dea8e24b425e97d93a0c6fb28 | 1,476 | js | JavaScript | nikel/public/js/exemplos.js | elizabethesantos/codai | af440d05243e251e5a1280f40cc56ad8f5b6d52a | [
"MIT"
] | null | null | null | nikel/public/js/exemplos.js | elizabethesantos/codai | af440d05243e251e5a1280f40cc56ad8f5b6d52a | [
"MIT"
] | null | null | null | nikel/public/js/exemplos.js | elizabethesantos/codai | af440d05243e251e5a1280f40cc56ad8f5b6d52a | [
"MIT"
] | null | null | null | const nome = "Elizabeth";
let nome2 = "Elizabeth";
let pessoa = {
nome : "Elizabeth",
idade : "35",
trabalho : "Programador"
}
let nomes = ["maria","pedro","jose"];
let pessoas = [
{
nome : "Elizabeth",
idade : "35",
trabalho : "Programador"
},
{
nome : "maria",
idade : "33",
trabalho : "ux/ui designer"
}
];
console.log("valor inicial:")
console.log(nome2);
nome2 = "Silvia"
console.log("valor alterado:")
console.log(nome2)
function alterarNome() {
nome2 = "Maria"
console.log("Valor alterado:");
console.log(nome2);
}
function recebeEalteraNome(novoNome){
nome2 = novoNome;
console.log("valor alterado novamente:");
console.log(nome2)
}
//alterarNome();
//recebeEalteraNome("joao");
//recebeEalteraNome("maria");
console.log(pessoa);
console.log("Nome:");
console.log(pessoa.nome);
console.log("Idade:");
console.log(pessoa.idade);
console.log("Trabalho:");
console.log(pessoa.trabalho);
console.log(nomes);
console.log(pessoas)
function adicionarPessoa() {
pessoas.push(pessoa)
};
adicionarPessoa({
nome:"neto",
idade: "23",
trabalho: "porteiro"
});
console.log(pessoas);
document.getElementById("link-conta").addEventListener("click", function(){
alert("o usuario clicou no link criar conta");
})
document.getElementById("link-conta").addEventListener("click", function(){
console.log("o usuario clicou no link criar conta");
}) | 18.45 | 75 | 0.642276 |
101b301effa0b320071fa0f28838af75e74e9861 | 3,613 | js | JavaScript | tests/unit/cli/lookup-command-test.js | rondale-sc/ember-cli | 961ec3668f1dc136206270fb15b51d316e125267 | [
"MIT"
] | 1 | 2021-11-21T12:48:53.000Z | 2021-11-21T12:48:53.000Z | tests/unit/cli/lookup-command-test.js | rondale-sc/ember-cli | 961ec3668f1dc136206270fb15b51d316e125267 | [
"MIT"
] | null | null | null | tests/unit/cli/lookup-command-test.js | rondale-sc/ember-cli | 961ec3668f1dc136206270fb15b51d316e125267 | [
"MIT"
] | null | null | null | 'use strict';
/*jshint expr: true*/
var expect = require('chai').expect;
var lookupCommand = require('../../../lib/cli/lookup-command');
var Command = require('../../../lib/models/command');
var Project = require('../../../lib/models/project');
var MockUI = require('../../helpers/mock-ui');
var AddonCommand = require('../../fixtures/addon/commands/addon-command');
var OtherCommand = require('../../fixtures/addon/commands/other-addon-command');
var commands = {
serve: Command.extend({
name: 'serve',
aliases: ['s'],
works: 'everywhere',
availableOptions: [
{ name: 'port', key: 'port', type: Number, default: 4200, required: true }
],
run: function() {}
})
};
function AddonServeCommand() { return this; }
AddonServeCommand.prototype.includedCommands = function() {
return {
'Serve': {
name: 'serve',
description: 'overrides the serve command'
}
};
};
describe('cli/lookup-command.js', function() {
var ui;
var project = {
isEmberCLIProject: function(){ return true; },
initializeAddons: function() {
this.addons = [new AddonCommand(), new OtherCommand()];
},
addonCommands: Project.prototype.addonCommands,
eachAddonCommand: Project.prototype.eachAddonCommand
};
before(function(){
ui = new MockUI();
});
it('lookupCommand() should find commands by name and aliases.', function() {
// Valid commands
expect(lookupCommand(commands, 'serve')).to.exist;
expect(lookupCommand(commands, 's')).to.exist;
});
it('lookupCommand() should find commands that addons add by name and aliases.', function() {
var command, Command;
Command = lookupCommand(commands, 'addon-command', [], {
project: project,
ui: ui
});
command = new Command({
ui: ui,
project: project
});
expect(command.name).to.equal('addon-command');
Command = lookupCommand(commands, 'ac', [], {
project: project,
ui: ui
});
command = new Command({
ui: ui,
project: project
});
expect(command.name).to.equal('addon-command');
Command = lookupCommand(commands, 'other-addon-command', [], {
project: project,
ui: ui
});
command = new Command({
ui: ui,
project: project
});
expect(command.name).to.equal('other-addon-command');
Command = lookupCommand(commands, 'oac', [], {
project: project,
ui: ui
});
command = new Command({
ui: ui,
project: project
});
expect(command.name).to.equal('other-addon-command');
});
it('lookupCommand() should write out a warning when overriding a core command', function() {
project = {
isEmberCLIProject: function(){ return true; },
initializeAddons: function() {
this.addons = [new AddonServeCommand()];
},
addonCommands: Project.prototype.addonCommands,
eachAddonCommand: Project.prototype.eachAddonCommand
};
lookupCommand(commands, 'serve', [], {
project: project,
ui: ui
});
expect(ui.output).to.match(/warning: An ember-addon has attempted to override the core command "serve".*/);
});
it('lookupCommand() should return UnknownCommand object when command name is not present.', function() {
var Command = lookupCommand(commands, 'something-else', [], {
project: project,
ui: ui
});
var command = new Command({
ui: ui,
project: project
});
command.validateAndRun([]);
expect(ui.output).to.match(/command.*something-else.*is invalid/);
});
});
| 26.181159 | 111 | 0.613894 |
101b349f16af2e70d924b24e7cd58c085152ed8b | 10,551 | js | JavaScript | node_modules/scratch-vm/src/extensions/scratch3_urltxt/index.js | estea8968/OSEP | 25a6516b488f890057558146968fad65a27e8b6a | [
"BSD-3-Clause"
] | null | null | null | node_modules/scratch-vm/src/extensions/scratch3_urltxt/index.js | estea8968/OSEP | 25a6516b488f890057558146968fad65a27e8b6a | [
"BSD-3-Clause"
] | null | null | null | node_modules/scratch-vm/src/extensions/scratch3_urltxt/index.js | estea8968/OSEP | 25a6516b488f890057558146968fad65a27e8b6a | [
"BSD-3-Clause"
] | null | null | null | const ArgumentType = require('../../extension-support/argument-type');
const BlockType = require('../../extension-support/block-type');
const msg = require('./translation');
const formatMessage = require('format-message');
const menuIconURI = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAASCAYAAAApH5ymAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOpQAADqUBKmWIAgAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAUMSURBVEiJzdZvbNXlFQfwz739w/+WIoQKpuoGGIbM0ts6gjMTo1kwIf6LbtPpMicxW0i2mCVm0YXFZK/wBVkWGH+bumRpJOgaSawSkLAwk3bXlrKYCfXWwoAiLWDvbW1p73324v4K917Lspc7yUme3/N8n/N8z3nOOc+P/3OJFYxX4OcYxF/Qh0fxk+h7Eg9jGL14F19gHn6FAwh4/CZnleME2qLv72EjctFZs/EgyvB7/K2U4L777/fTVIpz5zyID++6yydVVVZ2dvr7qlW+feut5sKlS/T0+HcIfl1T49FEwo8++kjnyIi3GhpsXbBgeoaffeZyX58NqEkkvFVTo2o6XCqlP5WSwFDh/J5USnj9dQEPYOGuXUY6OwUkDxyQC0EIQRgaEg4dEuJx3Y2NToyPCytWuIDfHj+exxTqlSvCyZPCwYMC/hqP29nbK5w583VsCMLWrQJ+ORX2KQmZDNksUdhnj42JDw/nFzMZTp+mv5/581m3jhdfdHdHh4FslhBU4FIyKTc6Kr5kCTNm0NdHCHR38+STzJrlO+vXSy9cyKuv8thjVFZy7715TCZDV5dJfF4a2V09PcKWLQK+i2Xbthk/fDgfwZYWubY2ASdx4tgxYedOYfVq6dFRYflyA1ggn69fbNsmHD0q4J94p67OlaEh4bnnhB07hOPHr6/tX7rUcDotNDUJ6MYfp9IvPn22yCnOz0LpxJ/On6cqn0FxiMVM4iqewQ8rK41G+NN4/MwZf+7uZsMG7rmHZNIkfoenKit9CmVlhvEENssXXBHBUrIT8bhcNA4F83fgqcWLGR0lFnMtIjgeOQZHZswwUmJvSzIp3djIihU0NzuLtyEel4bycsNIFW66GcEy+bYyJQFuuYWXX7a+rc36pia6uuTicZmI4EQBPpbNFuU3XNm+3ecLFtDbS1eXgQKHpgKQLdlTZKSsZD4dj18nGeC++/Kay9HRwe7dTtfXu4zbSuzWTkyYWXrYxIRsLpcvBMwoXY8KLVZAuChquWyWWD7zbsNIebmQy90g2NVFa2v+al95hfFxLQXGCwnNyeWKHIaazZvdOTpKfT11dZbIF5WIlBCUk++10xEcS6eZMwcsw6qKCrOiNhPg7FmefVY2leL550Fd5PX1XIykIoSv5fRvEgnVR48yOMhLL6nFjwt5hKCS4uZdeMX9mQxLl4IG1NXWKh8chBuH53L6urp8s7FRrKzM6qh6ZbOq8DNcxJwScm6/3cNr1rBjh4mZM5WvWyeGh/CHbFZ1QQSLrr7Qy8N9fSbXrqWhwYaNGz3T1ERPD/Jv5ZR0tra6sGwZjzxizeSk+bBypcWJhD2JhHcXLrRTcZt6YNMm37p8mYMHJY8cca6+nuXLNaAmm71+1VmKiq2I4D/27dNbVUV7u7LmZpUjI+zd6xz2F+C+fP99HadO8fTTZo+P+0ZFBXv30t6e1xdeUB1CEcEfrF2r8uOPmZjwyZtv+tfgIJs2WYpfRC1KPG5MyftbSDAkk1reeMPk4CAXLvDaa3JXr2rD4PnzDAyA/hBsf+891xYtIpNReeIEqdQN7e/31cWLvrx4MW+4utodc+eyf79raB0bc+qDD6itBQ9NTuo/dYp02ldcb/DTSgx70C//Fu6Tbz934xIGcGeEbcZZJHEIHfg00ha04kI03o1zOBbtnYf2aP87WI2eCPc/yRzMKplbie9Pg/tvsqhgPN1P2Dw3f27BfwA/lBpLuIDHRgAAAABJRU5ErkJggg==';
const blockIconURI = '';
const defaultId = 'default';
let theLocale = null;
//import * as fs from 'file-system';
//var afs = require('fs');
//console.log(fs);
class urlTXT {
constructor (runtime) {
theLocale = this._setLocale();
this.runtime = runtime;
// communication related
this.comm = runtime.ioDevices.comm;
this.session = null;
this.runtime.registerPeripheralExtension('urlTXT', this);
// session callbacks
this.reporter = null;
this.onmessage = this.onmessage.bind(this);
this.onclose = this.onclose.bind(this);
this.write = this.write.bind(this);
// string op
this.decoder = new TextDecoder();
this.lineBuffer = '';
this.txt = {};
this.txtlenght = {};
this.emptyObj = {
VALUE: {}
};
}
onclose () {
this.session = null;
}
write (data, parser = null) {
if (this.session) {
return new Promise(resolve => {
if (parser) {
this.reporter = {
parser,
resolve
};
}
this.session.write(data);
});
}
}
onmessage (data) {
const dataStr = this.decoder.decode(data);
this.lineBuffer += dataStr;
if (this.lineBuffer.indexOf('\n') !== -1){
const lines = this.lineBuffer.split('\n');
this.lineBuffer = lines.pop();
for (const l of lines) {
if (this.reporter) {
const {parser, resolve} = this.reporter;
resolve(parser(l));
}
}
}
}
scan () {
this.comm.getDeviceList().then(result => {
this.runtime.emit(this.runtime.constructor.PERIPHERAL_LIST_UPDATE, result);
});
}
_setLocale () {
let nowLocale = 'zh-tw';
switch (formatMessage.setup().locale) {
case 'zh-tw':
nowLocale = 'zh-tw';
break;
default:
nowLocale = 'en';
break;
}
return nowLocale;
}
getInfo () {
theLocale = this._setLocale();
return {
id: 'urlTXT',
name: msg.name[theLocale],
color1: '#612505',
color2: '#612505',
menuIconURI: menuIconURI,
blockIconURI: blockIconURI,
blocks: [
{
opcode: 'readtextFILE',
blockType: BlockType.COMMAND,
arguments: {
url: {
type: ArgumentType.STRING,
defaultValue: 'http://0.0.0.0:8601/FILE.txt'
}
},
text:msg.readtextFILE[theLocale]
},
{
opcode: 'writetextFILE',
blockType: BlockType.COMMAND,
arguments: {
url: {
type: ArgumentType.STRING,
defaultValue: 'a.txt'
},
textdata1: {
type: ArgumentType.STRING,
defaultValue: ' '
},
textdata2: {
type: ArgumentType.STRING,
defaultValue: ' '
},
textdata3: {
type: ArgumentType.STRING,
defaultValue: ' '
},
textdata4: {
type: ArgumentType.STRING,
defaultValue: ' '
},
textdata5: {
type: ArgumentType.STRING,
defaultValue: ' '
}
},
text:msg.writetextFILE[theLocale]
},
{
opcode: 'readFromTEXT',
blockType: BlockType.REPORTER,
arguments: {
id: {
type: ArgumentType.STRING,
defaultValue: 'id'
}
},
text: msg.readFromTEXT[theLocale]
},
{
opcode: 'textLENGHT',
blockType: BlockType.REPORTER,
arguments: {
id: {
type: ArgumentType.STRING,
defaultValue: 'id'
}
},
text: msg.textLENGHT[theLocale]
},
{
opcode: 'readtxtDATA',
blockType: BlockType.REPORTER,
arguments: {
variable: {
type: ArgumentType.STRING,
defaultValue: 'data'
},
n: {
type: ArgumentType.NUMBER,
defaultValue: '1'
}
},
text: msg.readtxtDATA[theLocale]
},
{
opcode: 'openURL',
blockType: BlockType.COMMAND,
arguments: {
url: {
type: ArgumentType.STRING,
defaultValue: 'https://'
}
},
text: msg.openURL[theLocale]
}
]
};
}
isTxtFetched () {
return this.txt.fetched;
}
istextLENGHTFetched () {
return this.txtlenght.fetched;
}
readtextFILE (args) {
const file = args.url;
fs.writeFile('/home/teacher/a.txt','this is book');
console.log(fs);
//this.txt.data = fetch(file,{method:'get'}).then(response => response.text());
this.txt.fetched = true;
}
readtxtDATA (args) {
const variable = args.variable || this.emptyObj;
const n = args.n;
try {
const parsed = variable.split('\n');
this.txtlenght.fetched = true;
this.txtlenght.data = parsed.length-1;
const data = parsed[n - 1];
return typeof data === 'string' ? data : txt.stringify(data);
} catch (err) {
return `Error: ${err}`;
}
}
readFromTEXT () {
if (this.isTxtFetched()) {
console.log('return ', this.txt.data);
return this.txt.data;
}
return msg.readFromTEXTErr[theLocale];
}
googlecolumnTEXT(args){
const variable = args.variable || this.emptyObj;
const n = args.n;
const column = "gsx$" + args.column;
try {
const parsed = JSON.parse(variable);
var data = parsed[n - 1];
data = JSON.stringify(data);
const a_parsed = JSON.parse(data);
var a_data = a_parsed[column];
a_data = JSON.stringify(a_data);
const t_parsed = JSON.parse(a_data);
var t_data = t_parsed["$t"];
return typeof t_data === 'string' ? t_data : JSON.stringify(t_data);
}catch (err){
return `Error: ${err}`;
}
}
textLENGHT () {
if (this.istextLENGHTFetched()) {
console.log('return ', this.txtlenght.data);
return this.txtlenght.data;
}
return msg.textLENGHTErr[theLocale];
}
openURL (args) {
const url = args.url;
var openurl = window.open(url);
}
writetextFILE (args) {
const fileName = args.url;
const fileData = args.textdata1+'\n'+args.textdata2+'\n'+args.textdata3+'\n'+args.textdata4+'\n'+args.textdata5;
console.log(fileName,fileData);
function fileDownload() {
//var fileContents = JSON.stringify(filedata, null, 2);
var pp = document.createElement('a');
pp.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(fileData));
pp.setAttribute('download', fileName);
pp.click();
}
setTimeout(function() {
fileDownload()
}, 500);
}
}
module.exports = urlTXT;
| 36.763066 | 1,945 | 0.537864 |
101bd1c92b3230b572259fe2619c6f927b62ed9f | 383 | js | JavaScript | packages/omim/docs/build/static/js/29.8177ce30.chunk.js | mtonhuang/omi | 39c952a8a73c98acfb3ae29d536abcd9e0e18850 | [
"MIT"
] | 1 | 2019-03-04T03:10:24.000Z | 2019-03-04T03:10:24.000Z | packages/omim/docs/build/static/js/29.8177ce30.chunk.js | mtonhuang/omi | 39c952a8a73c98acfb3ae29d536abcd9e0e18850 | [
"MIT"
] | null | null | null | packages/omim/docs/build/static/js/29.8177ce30.chunk.js | mtonhuang/omi | 39c952a8a73c98acfb3ae29d536abcd9e0e18850 | [
"MIT"
] | null | null | null | webpackJsonp([29],{121:function(n,o){n.exports='## Loading\n\nLoading \u5143\u7d20\uff0c\u62e5\u6709\u591a\u79cd\u8272\u5f69\u548c\u5927\u5c0f\u53ef\u4ee5\u9009\u3002\n\n## \u4f7f\u7528\n\n```html\n<m-loading size="55" color="#2170b8"></m-loading>\n```\n\n## API\n\n### Props\n\n```jsx\n{\n size?: number,\n color?: string\n}\n```'}});
//# sourceMappingURL=29.8177ce30.chunk.js.map | 191.5 | 337 | 0.686684 |
101bd4023e82f856ea6c0a1d84f79aee68c48481 | 1,131 | js | JavaScript | week6/webClient/config/karma.conf.js | yingding/hca17 | 34bbf6769e2ce2176b83b4cff61a2c9fe602be1f | [
"Apache-2.0"
] | 1 | 2018-04-11T09:44:53.000Z | 2018-04-11T09:44:53.000Z | week6/webClient/config/karma.conf.js | yingding/hca18 | 02c886812fbbb884c999547315186d30710436bc | [
"Apache-2.0"
] | null | null | null | week6/webClient/config/karma.conf.js | yingding/hca18 | 02c886812fbbb884c999547315186d30710436bc | [
"Apache-2.0"
] | null | null | null | var webpackConfig = require('./webpack.test');
module.exports = function (config) {
var _config = {
basePath: '',
frameworks: ['jasmine'],
files: [
{pattern: './config/karma-test-shim.js', watched: false}
],
preprocessors: {
'./config/karma-test-shim.js': ['webpack', 'sourcemap']
},
//client:{
// clearContext: false // leave Jasmine Spec Runner output visible in browser
//},
webpack: webpackConfig,
webpackMiddleware: {
stats: 'errors-only'
},
webpackServer: {
noInfo: true
},
reporters: ['progress','kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['Chrome'],
singleRun: true // change singleRun to true, to get a single test run, the browers info of jasmine will be closed automatically
// use false to prevent jasmine browser closed automatically
// click on debug to see the jasmine debug session
};
config.set(_config);
};
| 26.302326 | 135 | 0.557029 |
101c1b00dcf16ee92c3a18b58ccf196148768d9d | 360 | js | JavaScript | painelProdutos/node_modules/ember-cli-materialize/app/components/materialize-card-panel.js | euvalentina/VCTR-portifolio | 85a18ff8088ae17303df85072c5ae61aa96b6b0b | [
"CC-BY-3.0"
] | null | null | null | painelProdutos/node_modules/ember-cli-materialize/app/components/materialize-card-panel.js | euvalentina/VCTR-portifolio | 85a18ff8088ae17303df85072c5ae61aa96b6b0b | [
"CC-BY-3.0"
] | null | null | null | painelProdutos/node_modules/ember-cli-materialize/app/components/materialize-card-panel.js | euvalentina/VCTR-portifolio | 85a18ff8088ae17303df85072c5ae61aa96b6b0b | [
"CC-BY-3.0"
] | null | null | null | import Ember from 'ember';
import MaterializeCardPanel from './md-card-panel';
export default MaterializeCardPanel.extend({
init() {
this._super(...arguments);
Ember.deprecate("{{materialize-card-panel}} has been deprecated. Please use {{md-card-panel}} instead", false, {url: "https://github.com/sgasser/ember-cli-materialize/issues/67"});
}
});
| 36 | 184 | 0.713889 |
101ca76347f1de55708fa430473903c35702c826 | 14,032 | js | JavaScript | test/r401_test.js | okeefm/cql-exec-fhir | f17566170f352b677f5882b4681c17950c005d72 | [
"Apache-2.0"
] | 1 | 2021-06-23T16:01:37.000Z | 2021-06-23T16:01:37.000Z | src/helpers/cql-exec-fhir/test/r401_test.js | chronic-care/AHRQ-CDS-Connect-PAIN-MANAGEMENT-SUMMARY | 8bf47944c00ff885f1c6ea2b687222d106a88f5d | [
"Apache-2.0"
] | 4 | 2020-07-01T16:57:07.000Z | 2020-11-09T21:52:30.000Z | src/helpers/cql-exec-fhir/test/r401_test.js | chronic-care/AHRQ-CDS-Connect-PAIN-MANAGEMENT-SUMMARY | 8bf47944c00ff885f1c6ea2b687222d106a88f5d | [
"Apache-2.0"
] | 2 | 2020-12-16T16:17:58.000Z | 2020-12-16T16:21:23.000Z | const cql = require('cql-execution');
const cqlfhir = require('../src/index');
const {expect} = require('chai');
const conditionResource = require('./fixtures/r4/Condition_f201.json');
const patientLuna = require('./fixtures/r4/Luna60_McCullough561_6662f0ca-b617-4e02-8f55-7275e9f49aa0.json');
const patientJohnnie = require('./fixtures/r4/Johnnie679_Hermiston71_2cd30bd6-3a87-4191-af90-6daa70f58f55.json');
describe('#FHIRWrapper_R4 v4.0.1', () => {
let fhirWrapper;
let conditionResourceWithNoType;
let domainResource;
before(() => {
fhirWrapper = cqlfhir.FHIRWrapper.FHIRv401();
conditionResourceWithNoType = JSON.parse(JSON.stringify(conditionResource));
delete conditionResourceWithNoType.resourceType;
domainResource = JSON.parse(JSON.stringify(conditionResource));
domainResource.resourceType = 'DomainResource';
});
it('should wrap a fhir resource to the correct type when type not specified', () => {
let fhirObject = fhirWrapper.wrap(conditionResource);
expect(fhirObject.getTypeInfo().name).to.equal('Condition');
// Check one Condition property to be sure
const recordedDate = fhirObject.getDate('recordedDate');
expect(recordedDate.isDateTime).to.be.true;
expect(recordedDate).to.deep.equal(cql.DateTime.parse('2013-04-04'));
});
it('should wrap a fhir resource to the type specified if upcasting', () => {
// inheritance is: Condition < DomainResource < Resource
let fhirObject = fhirWrapper.wrap(conditionResource, 'DomainResource');
expect(fhirObject.getTypeInfo().name).to.equal('DomainResource');
// Check one DomainResource property to be sure
const textStatus = fhirObject.get('text.status');
expect(textStatus.getTypeInfo().name).to.be.equal('NarrativeStatus');
expect(textStatus.value).to.equal('generated');
fhirObject = fhirWrapper.wrap(conditionResource, 'Resource');
expect(fhirObject.getTypeInfo().name).to.equal('Resource');
// Check one Resource property to be sure
const id = fhirObject.get('id');
expect(id.getTypeInfo().name).to.be.equal('id');
expect(id.value).to.equal('f201');
});
it('should wrap a fhir resource to the type specified if downcasting', () => {
// inheritance is: Condition < DomainResource < Resource
let fhirObject = fhirWrapper.wrap(domainResource, 'Condition');
expect(fhirObject.getTypeInfo().name).to.equal('Condition');
// Check one Condition property to be sure
const recordedDate = fhirObject.getDate('recordedDate');
expect(recordedDate.isDateTime).to.be.true;
expect(recordedDate).to.deep.equal(cql.DateTime.parse('2013-04-04'));
});
it('should error if requested type is incompatible', () => {
expect(function(){fhirWrapper.wrap(conditionResource, 'Observation');}).to.throw('Incompatible types: FHIR resourceType is Condition which cannot be cast as Observation');
});
it('should wrap a fhir resource to the type specified if real type unknown', () => {
let fhirObject = fhirWrapper.wrap(conditionResourceWithNoType, 'Observation');
expect(fhirObject.getTypeInfo().name).to.equal('Observation');
});
});
describe('#R4 v4.0.1', () => {
let patientSource;
before(() => {
patientSource = cqlfhir.PatientSource.FHIRv401();
});
beforeEach(() => {
patientSource.loadBundles([
patientLuna,
patientJohnnie
]);
});
afterEach(() => patientSource.reset());
it('should report version as 4.0.1', () => {
expect(patientSource.version).to.equal('4.0.1');
});
it('should properly iterate test patients', () => {
// Check first patient
const luna = patientSource.currentPatient();
expect(luna.getId()).to.equal('356a0ab8-5592-4ec5-8c3a-9a4d0857b793');
// Check next patient
const johnnie = patientSource.nextPatient();
expect(johnnie.getId()).to.equal('ea877536-55b1-4ec8-a12b-e95594214c01');
// No more patients should result in undefined
expect(patientSource.nextPatient()).to.be.undefined;
expect(patientSource.currentPatient()).to.be.undefined;
});
it('should set the current patient to the next when nextPatient is called', () => {
const originalCurrent = patientSource.currentPatient();
const nextPatient = patientSource.nextPatient();
const newCurrent = patientSource.currentPatient();
expect(newCurrent).not.to.deep.equal(originalCurrent);
expect(newCurrent).to.deep.equal(nextPatient);
});
it('should clone currentPatient each time it is called', () => {
expect(patientSource.currentPatient()).to.deep.equal(patientSource.currentPatient());
expect(patientSource.currentPatient()).to.not.equal(patientSource.currentPatient());
});
it('should find patient birthDate', () =>{
const pt = patientSource.currentPatient();
// cql-execution v1.3.2 currently doesn't export the new Date class, so we need to use the .getDate() workaround
expect(compact(pt.get('birthDate'))).to.deep.equal({ value: new cql.DateTime.parse('2008-11-06').getDate() });
expect(pt.get('birthDate.value')).to.deep.equal(new cql.DateTime.parse('2008-11-06').getDate());
});
it('should find patient extensions', () =>{
const pt = patientSource.currentPatient();
const extensions = pt.get('extension');
expect(extensions).to.have.length(7);
//Check the first and last ones
expect(compact(extensions[0])).to.deep.equal({
url: { value: 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-race' },
extension: [
{
url: { value: 'ombCategory' },
value: {
system: { value: 'urn:oid:2.16.840.1.113883.6.238' },
code: { value: '2106-3' },
display: { value: 'White' }
}
},
{
url: { value: 'text' },
value: { value: 'White' }
}
]
});
expect(compact(extensions[6])).to.deep.equal({
url: { value: 'http://synthetichealth.github.io/synthea/quality-adjusted-life-years' },
value: { value: 10.0 }
});
});
it('should find records by type name (e.g., Condition)', () =>{
const pt = patientSource.currentPatient();
const conditions = pt.findRecords('Condition');
expect(conditions).to.have.length(8);
expect(conditions.every(c => c.getTypeInfo().name === 'Condition')).to.be.true;
const paymentReconciliations = pt.findRecords('PaymentReconciliation');
expect(paymentReconciliations.length).to.be.empty;
});
it('should find records by model name and type name (e.g., FHIR.Condition)', () =>{
const pt = patientSource.currentPatient();
const conditions = pt.findRecords('FHIR.Condition');
expect(conditions).to.have.length(8);
expect(conditions.every(c => c.getTypeInfo().name === 'Condition')).to.be.true;
const paymentReconciliations = pt.findRecords('FHIR.PaymentReconciliation');
expect(paymentReconciliations.length).to.be.empty;
});
it('should find records by model URL and type name (e.g., {http://hl7.org/fhir}Condition)', () =>{
const pt = patientSource.currentPatient();
const conditions = pt.findRecords('{http://hl7.org/fhir}Condition');
expect(conditions).to.have.length(8);
expect(conditions.every(c => c.getTypeInfo().name === 'Condition')).to.be.true;
const paymentReconciliations = pt.findRecords('{http://hl7.org/fhir}PaymentReconciliation');
expect(paymentReconciliations.length).to.be.empty;
});
it('should find a single record', () =>{
const pt = patientSource.currentPatient();
const condition = pt.findRecord('Condition');
expect(condition.getTypeInfo().name).to.equal('Condition');
expect(condition.getId()).to.equal('9934bc4f-58af-4ecf-bb70-b7cc31987fc5');
const paymentReconciliation = pt.findRecord('PaymentReconciliation');
expect(paymentReconciliation).to.be.undefined;
});
it('should support getId', () => {
const pt = patientSource.currentPatient();
const procedure = pt.findRecords('Procedure').find(p => p.getId() === '03c48dbb-2e69-451d-877a-b3397a9f3d26');
expect(procedure.getId()).to.equal('03c48dbb-2e69-451d-877a-b3397a9f3d26');
});
it('should support getCode', () => {
const pt = patientSource.currentPatient();
const procedure = pt.findRecords('Procedure').find(p => p.getId() === '03c48dbb-2e69-451d-877a-b3397a9f3d26');
expect(procedure.getCode('code')).to.deep.equal(new cql.Code('428191000124101', 'http://snomed.info/sct', undefined, 'Documentation of current medications'));
});
it('should support getDate (DateTime)', () => {
const pt = patientSource.currentPatient();
const medReq = pt.findRecords('MedicationRequest').find(p => p.getId() === '622c5788-3028-41fd-a8cb-164f868d4322');
const authoredOn = medReq.getDate('authoredOn.value');
expect(authoredOn.isDateTime).to.be.true;
expect(authoredOn).to.deep.equal(cql.DateTime.parse('2009-12-01T11:18:29-05:00'));
});
it('should support getDate (Date)', () => {
const pt = patientSource.currentPatient();
const birthDate = pt.getDate('birthDate.value');
expect(birthDate.isDate).to.be.true;
expect(birthDate).to.deep.equal(cql.DateTime.parse('2008-11-06').getDate());
});
it('should support getDateOrInterval (DateTime)', () => {
const pt = patientSource.currentPatient();
const medReq = pt.findRecords('MedicationRequest').find(p => p.getId() === '622c5788-3028-41fd-a8cb-164f868d4322');
const authoredOn = medReq.getDateOrInterval('authoredOn.value');
expect(authoredOn.isDateTime).to.be.true;
expect(authoredOn).to.deep.equal(cql.DateTime.parse('2009-12-01T11:18:29-05:00'));
});
it('should support getDateOrInterval (Date)', () => {
const pt = patientSource.currentPatient();
const birthDate = pt.getDateOrInterval('birthDate.value');
expect(birthDate.isDate).to.be.true;
expect(birthDate).to.deep.equal(cql.DateTime.parse('2008-11-06').getDate());
});
it('should support dot-separated-paths', () => {
const pt = patientSource.currentPatient();
const procedure = pt.findRecords('Procedure').find(p => p.getId() === '03c48dbb-2e69-451d-877a-b3397a9f3d26');
expect(procedure.get('subject.reference.value')).to.deep.equal('urn:uuid:356a0ab8-5592-4ec5-8c3a-9a4d0857b793');
});
it('should support getting booleans', () => {
const pt = patientSource.currentPatient();
const immunization = pt.findRecords('Immunization').find(p => p.getId() === '2a986005-b7c9-464c-9da8-0a3220dd8721');
expect(immunization.get('primarySource.value')).to.be.true;
});
it('should support getting decimals', () => {
const pt = patientSource.currentPatient();
const claim = pt.findRecords('Claim').find(p => p.getId() === '58cd648a-5f4d-4306-bef4-49ec64c88c63');
expect(claim.get('total.value.value')).to.equal(687.08);
});
it('should support getting integers', () => {
const pt = patientSource.currentPatient();
const claim = pt.findRecords('Claim').find(p => p.getId() === '58cd648a-5f4d-4306-bef4-49ec64c88c63');
expect(claim.get('item')[0].get('sequence.value')).to.equal(1);
});
it('should support getting strings', () => {
const pt = patientSource.currentPatient();
const procedure = pt.findRecords('Procedure').find(p => p.getId() === '03c48dbb-2e69-451d-877a-b3397a9f3d26');
expect(procedure.get('status.value')).to.deep.equal('completed');
});
it('should support getting dateTimes', () => {
const pt = patientSource.currentPatient();
const medReq = pt.findRecords('MedicationRequest').find(p => p.getId() === '622c5788-3028-41fd-a8cb-164f868d4322');
const authoredOn = medReq.getDate('authoredOn.value');
expect(authoredOn.isDateTime).to.be.true;
expect(authoredOn).to.deep.equal(cql.DateTime.parse('2009-12-01T11:18:29-05:00'));
});
it('should support getting dates', () => {
const pt = patientSource.currentPatient();
const birthDate = pt.get('birthDate.value');
expect(birthDate.isDate).to.be.true;
expect(birthDate).to.deep.equal(cql.DateTime.parse('2008-11-06').getDate());
});
it('should support getting times', () => {
const pt = patientSource.currentPatient();
const observation = pt.findRecords('Observation').find(p => p.getId() === '9c15c801-6bb5-47a7-a9db-8bad0cb6aa68');
const valueTime = observation.get('value.value');
expect(valueTime.isTime()).to.be.true;
expect(valueTime).to.deep.equal(cql.DateTime.parse('0000-01-01T18:23:47.376-05:00').getTime());
});
it('should support getting an option of a choice', () => {
const pt = patientSource.currentPatient();
const condition = pt.findRecords('Condition').find(p => p.getId() === '9934bc4f-58af-4ecf-bb70-b7cc31987fc5');
// In R4, you use the stub of the choice (e.g., onset[x] datetime is retrieved as onset)
expect(condition.get('onset.value')).to.deep.equal(cql.DateTime.parse('2009-08-09T12:18:29-04:00'));
});
it('should support id and extension on primitives', () => {
const pt = patientSource.currentPatient();
const encounter = pt.findRecords('Encounter').find(p => p.getId() === '9d911534-10d8-4dc2-91f1-d7aeed828af8');
expect(encounter.get('status.id')).to.equal('12345');
expect(compact(encounter.get('status.extension'))).to.deep.equal([ {
url : { value: 'http://example.org/fhir/StructureDefinition/originalText' },
value : { value: 'completed' }
}]);
});
it('should support id on list of primitives', () => {
const pt = patientSource.currentPatient();
expect(compact(pt.get('address')[0].get('line'))).to.deep.equal([
{ value: '386 Stokes Center' },
{ id: '2468', value: 'Floor 5' },
{ value: 'Apt. C' }
]);
});
});
function compact(obj) {
if (Array.isArray(obj)) {
return obj.map(o => compact(o));
} else if (obj == null || typeof obj !== 'object') {
return obj;
}
const compacted = {};
for (const prop in obj) {
const value = obj[prop];
if (value !== undefined) {
compacted[prop] = compact(value);
}
}
return compacted;
} | 43.987461 | 175 | 0.67681 |
101d5134adab6edf8003220e310687911489d45f | 111 | js | JavaScript | 03-further-node/start-repl.js | johnehunt/NodejsIntro | 82a1b73492a69e5cae4bb6bea5af4c6619b42d9f | [
"Apache-2.0"
] | 1 | 2020-03-08T11:59:26.000Z | 2020-03-08T11:59:26.000Z | 03-further-node/start-repl.js | johnehunt/NodejsIntro | 82a1b73492a69e5cae4bb6bea5af4c6619b42d9f | [
"Apache-2.0"
] | 3 | 2021-03-03T09:00:38.000Z | 2021-03-24T17:39:39.000Z | 03-further-node/start-repl.js | johnehunt/NodejsIntro | 82a1b73492a69e5cae4bb6bea5af4c6619b42d9f | [
"Apache-2.0"
] | null | null | null | // Access the repl package
const repl = require('repl');
// Start the REPL running
const r = repl.start('> ');
| 22.2 | 29 | 0.666667 |
101d7de171b12c97bb1161a3b7f022d1a6fc2e10 | 18,186 | js | JavaScript | src/command/create.js | D-lyw/Graduation_Project | e81ea7c26cc66fb200bb5a267f015c390a9274d8 | [
"Apache-2.0"
] | 1 | 2020-07-30T08:52:47.000Z | 2020-07-30T08:52:47.000Z | src/command/create.js | D-lyw/Graduation_Project | e81ea7c26cc66fb200bb5a267f015c390a9274d8 | [
"Apache-2.0"
] | null | null | null | src/command/create.js | D-lyw/Graduation_Project | e81ea7c26cc66fb200bb5a267f015c390a9274d8 | [
"Apache-2.0"
] | null | null | null | /**
* command: create
* 创建初始化Lambda函数
*/
const aws = require('aws-sdk')
const path = require('path')
const fs = require('fs')
const fsPromise = fs.promises
const os = require('os')
const retry = require('oh-no-i-insist')
const NullLogger = require('../util/null-logger')
const entityWrap = require('../util/entity-wrap')
const fsUtils = require('../util/fs-utils')
const judgeRole = require('../util/judge-role')
const retriableWrap = require('../util/retriable-wrap')
const readJson = require('../util/read-json')
const markAlias = require('../util/mark-alias')
const apiGWUrl = require('../util/api-url')
const rebuildWebApi = require('../aws/rebuild-web-api')
const lambdaExecutorPolicy = require('../aws/lambda-executor-policy')
const addPolicy = require('../util/add-policy')
const initEnvVarsFromOptions = require('../util/init-env-vars-from-options')
const getOwnerInfo = require('../aws/get-own-info')
const collectFiles = require('../aws/collect-files')
const validatePackage = require('../util/validate-package')
const cleanUpPackage = require('../util/cleanUpPackage')
const zipdir = require('../util/zipdir')
const loggingPolicy = require('../aws/logging-policy')
const snsPublishPolicy = require('../aws/sns-publish-policy')
const lambadCode = require('../util/lambdaCode')
const deployProxyApi = require('../aws/deploy-proxy-api')
module.exports = function create (options, optionalLogger) {
let roleMetadata,
s3Key,
packageArchive,
functionDesc,
customEnvVars,
functionName,
workingDir,
ownerAccount,
awsPartition,
packageFileDir
const logger = optionalLogger || new NullLogger()
// 结合传入参数和默认值设置AWS Lambda相关参数值
const awsDelay = options && options['aws-delay'] && parseInt(options['aws-delay'], 10)
|| (process.env.AWS_DELAY && parseInt(process.env.AWS_DELAY, 10))
|| 5000
const awsRetries = options && options['aws-retries'] && parseInt(options['aws-retries'], 10) || 5
const source = options && options.source || process.cwd()
const configFile = options && options.config || path.join(source, 'sln.json')
const iam = entityWrap(new aws.IAM({region: options.region}), {log: logger.logApiCall, logName: 'iam'})
const lambda = entityWrap(new aws.Lambda({region: options.region}), {log: logger.logApiCall, logName: 'lambda'})
const s3 = entityWrap(new aws.S3({region: options.region, signatureVersion: 'v4'}), {log: logger.logApiCall, logName: 's3'} )
// 创建AWS网关api
const apiGatewayPromise = retriableWrap(
entityWrap(new aws.APIGateway({region: options.region}), {log: logger.logApiCall, logName: 'apigateway'}),
() => logger.logStage(`AWS限制速率,稍后重试`)
)
// 处理policy文件所在路径
const policyFiles = function () {
let files = fsUtils.recursiveList(options.policies)
if (fsUtils.isDir(options.policies)) {
files = files.map(filePath => path.join(options.policies, filePath))
}
return files.filter(fsUtils.isFile)
}
// 错误参数信息处理
const validationError = function () {
if (!options.region) {
return `AWS region 参数未定义,请使用 --region 定义该参数值\n`
}
if (!options.handler && !options['api-module']) {
return 'Lambda handler 参数未定义,请使用 --handler 定义该参数值\n'
}
if (options.handler && options['api-module']) {
return `不能同时使用 handler 和 api-module 两个参数\n`
}
if (!options.handler && options['deploy-proxy-api']) {
return `deploy-proxy-api 需要一个 handler,请使用 --handler 定义该参数值\n`
}
if (options.handler && options.handler.indexOf('.') < 0) {
return `未指定 Lambda 处理函数,请使用 --handler 指定函数\n`
}
if (options['api-module'] && options['api-module'].indexOf('.') >= 0) {
return `Api module 模块名不能和已存在的文件名或函数名重名\n`
}
if (!fsUtils.isDir(path.dirname(configFile))) {
return `无法将内容写入 ${configFile}\n`
}
if (fsUtils.fileExists(configFile)) {
if (options && options.config) {
return `${options.config} + 已存在\n`
}
return 'sln.json 已经在项目文件夹下'
}
if (!fsUtils.fileExists(path.join(source, 'package.json'))) {
return `项目目录下不存在 package.json 文件\n`
}
if (options.policies && !policyFiles().length) {
return `没有文件匹配 ${options.policies}\n`
}
if (options.memory || options.memory === 0) {
if (options.memory < 128) {
return `提供的内存值必须大于或等于 Lambda 限制的最小内存值`
}
if (options.memory > 3008) {
return `提供的内存值必须小于或等于 Lambda 限制的最大内存值`
}
if (options.memory % 64 !== 0) {
return `提供的内存值必须是64的整数倍`
}
}
if (options.timeout || options.timeout === 0) {
if (options.timeout < 1) {
return `超时时间必须大于1`
}
if (options.timeout > 9000) {
return `超时时间必须小于900`
}
}
if (options['allow-recursion'] && options.role && judgeRole.isRoleArn(options.role)) {
return `参数 allow-recursion 和 role 冲突\n`
}
if (options['s3-key'] && !options['use-s3-bucket']) {
return `--s3-key 需要和 --use-s3-bucket 一起使用\n`
}
}
// 获取package包信息
const getPackageInfo = function () {
logger.logStage('加载项目package包配置')
return readJson(path.join(source, 'package.json'))
.then(jsonConfig => {
const name = options.name || jsonConfig.name
const description = options.description || (jsonConfig.description && jsonConfig.description.trim())
if (!name) {
return Promise.reject('项目名称缺失,请在package.json或使用 --name 指定')
}
return {
name: name,
description: description
}
})
}
// 创建Lambda函数
const createLambda = function (functionName, functionDesc, functionCode, roleArn) {
return retry(
() => {
logger.logStage('创建 Lambda 函数')
return lambda.createFunction({
Code: functionCode,
FunctionName: functionName,
Description: functionDesc,
MemorySize: options.memory,
Timeout: options.timeout,
Environment: customEnvVars,
KMSKeyArn: options['env-kms-key-arn'],
Handler: options.handler || (options['api-module'] + '.proxyRouter'),
Role: roleArn,
Runtime: options.runtime || 'nodejs12.x',
Publish: true,
Layers: options.Layers && options.Layers.split(',')
}).promise()
},
awsDelay,
awsRetries,
error => {
return error && error.code === 'InvalidParameterValueException'
},
() => logger.logStage('等待 IAM 角色生效'),
Promise
)
}
// 标记别名
const markAliases = function (lambdaData) {
logger.logStage('创建当前版本别名')
return markAlias(lambdaData.FunctionName, lambda, '$LATEST', 'latest')
.then(() => {
if (options.version) {
return markAlias(lambdaData.FunctionName, lambda, lambdaData.Version, options.version)
}
})
.then(() => lambdaData)
}
// 创建Web api
const createWebApi = function (lambdaMetadata, packageDir) {
let apiModule, apiConfig, apiModulePath
const alias = options.version || 'latest'
logger.logStage('创建 REST Api')
try {
apiModulePath = path.join(packageDir, options['api-module'])
apiModule = require(path.resolve(apiModulePath))
apiConfig = apiModule && apiModule.apiConfig && apiModule.apiConfig()
} catch (e) {
console.error(e.stack || e)
return Promise.reject(`无法从 ${apiModulePath} 加载api配置文件\n`)
}
if (!apiConfig) {
return Promise.reject(`没有 apiConfig 定义在模块 ${options['api-module']}\n`)
}
return apiGatewayPromise.createRestApiPromise({
name: lambdaMetadata.FunctionName
})
.then(result => {
lambdaMetadata.api = {
id: result.id,
module: options['api-module'],
url: apiGWUrl(result.id, options.region, alias)
}
return rebuildWebApi(lambdaMetadata.FunctionName, alias, result.id, apiConfig, ownerAccount, awsPartition, options.region, logger, options['cache-api-config'])
})
.then(() => {
if (apiModule.postDeploy) {
return apiModule.postDeploy(
options,
{
name: lambdaMetadata.FunctionName,
alias: alias,
apiId: lambdaMetadata.api.id,
apiUrl: lambdaMetadata.api.url,
region: options.region
},
{
apiGatewayPromise: apiGatewayPromise,
aws: aws
}
)
}
})
.then(postDeployResult => {
if (postDeployResult) {
lambdaMetadata.api.deploy = postDeployResult
}
return lambdaMetadata
})
}
// 保存配置文件
const saveConfig = function (lambdaMetadata) {
const config = {
lambda: {
role: roleMetadata.Role.RoleName,
name: lambdaMetadata.FunctionName,
region: options.region
}
}
if (options.role) {
config.lambda.sharedRole = true
}
logger.logStage('保存配置')
if (lambdaMetadata.api) {
config.api = { id: lambdaMetadata.api.id, module: lambdaMetadata.api.module}
}
return fsPromise.writeFile(
configFile,
JSON.stringify(config, null, 2),
'utf8'
)
.then(() => lambdaMetadata)
}
// 格式化config内容
const formatResult = function (lambdaMetadata) {
const config = {
lambda: {
role: roleMetadata.Role.RoleName,
name: lambdaMetadata.FunctionName,
region: options.region
}
}
if (options.role) {
config.lambda.sharedRole = true
}
if (lambdaMetadata.api) {
config.api = lambdaMetadata.api
}
if (s3Key) {
config.s3key = s3Key
}
return config
}
// 加载函数执行的角色
const loadRole = function (functionName) {
logger.logStage(`初始化 IAM 角色`)
if (options.role) {
if (judgeRole.isRoleArn(options.role)) {
return Promise.resolve({
Role: {
RoleName: options.role,
Arn: options.role
}
})
}
return iam.getRole({RoleName: options.role}).promise()
} else {
return iam.createRole({
RoleName: functionName + '-role',
AssumeRolePolicyDocument: lambdaExecutorPolicy()
}).promise()
}
}
// 添加额外policy文件
const addExtraPolicies = function () {
return Promise.all(policyFiles().map(fileName => {
const policyName = path.basename(fileName).replace(/[^A-z0-9]/g, '-')
return addPolicy(iam, policyName, roleMetadata.Role.RoleName, fileName)
}))
}
//
const cleanup = function (result) {
if (!options.keep) {
fsUtils.rmDir(workingDir)
fs.unlinkSync(packageArchive)
} else {
result.archive = packageArchive
}
return result
}
if (validationError()) {
return Promise.reject(validationError())
}
return initEnvVarsFromOptions(options)
.then(opts => customEnvVars = opts)
.then(getPackageInfo)
.then(packageInfo => {
functionName = packageInfo.name
functionDesc = packageInfo.description
})
.then(() => getOwnerInfo(options.region, logger))
.then(ownerInfo => {
ownerAccount = ownerInfo.account
awsPartition = ownerInfo.partition
})
.then(() => fsPromise.mkdtemp(os.tmpdir() + path.sep))
.then(dir => workingDir = dir)
.then(() => collectFiles(source, workingDir, options, logger))
.then(dir => {
logger.logStage('验证包')
return validatePackage(dir, options.handler, options['api-module'])
})
.then(dir => {
packageFileDir = dir
return cleanUpPackage(dir, options, logger)
})
.then(dir => {
logger.logStage('打包项目包')
return zipdir(dir)
})
.then(zipFile => {
packageArchive = zipFile
})
.then(() => loadRole(functionName))
.then((result) => {
roleMetadata = result
})
.then(() => {
if (!options.role) {
return iam.putRolePolicy({
RoleName: roleMetadata.Role.RoleName,
PolicyName: 'log-writer',
PolicyDocument: loggingPolicy(awsPartition)
}).promise()
}
})
.then(() => {
if (options.policies) {
return addExtraPolicies()
}
})
.then(() => lambadCode(s3, packageArchive, options['use-s3-bucket'], options['s3-see'], options['s3-key']))
.then(functionCode => {
s3Key = functionCode.S3Key
return createLambda(functionName, functionDesc, functionCode, roleMetadata.Role.Arn)
})
.then(markAliases)
.then(lambdaMetadata => {
if (options['api-module']) {
return createWebApi(lambdaMetadata, packageFileDir)
} else if (options['deploy-proxy-api']) {
return deployProxyApi(lambdaMetadata, options, ownerAccount, awsPartition, apiGatewayPromise, logger)
} else {
return lambdaMetadata
}
})
.then(saveConfig)
.then(formatResult)
.then(cleanup)
}
module.exports.doc = {
description: '创建一个初始的Lambda函数和相关角色.',
priority: 1,
args: [
{
argument: 'region',
description: '指定在哪个AWS区域创建 Lambda 函数. 更多信息,请查看\n https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region',
example: 'us-east-1'
},
{
argument: 'handler',
optional: true,
description: '用于 Lambda 执行的函数, 如 module.function',
},
{
argument: 'api-module',
optional: true,
description: '设置创建Web api的主模块',
example: 'if the api is defined in web.js, this would be web'
},
{
argument: 'deploy-proxy-api',
optional: true,
description: '设置Lambda函数的代理api'
},
{
argument: 'name',
optional: true,
description: '指定 lambda 函数名称',
'default': 'the project name from package.json'
},
{
argument: 'version',
optional: true,
description: '指定该版本函数的别名, 如 development/test',
example: 'development'
},
{
argument: 'source',
optional: true,
description: '指定项目路径',
'default': 'current directory'
},
{
argument: 'config',
optional: true,
description: '指定配置文件路径',
'default': 'sln.json'
},
{
argument: 'policies',
optional: true,
description: '为 IAM policy 指定额外的目录或文件\n',
example: 'policies/*.json'
},
{
argument: 'allow-recursion',
optional: true,
description: '允许函数递归调用'
},
{
argument: 'role',
optional: true,
description: '分配给该功能的现有角色的名称或ARN',
example: 'arn:aws:iam::123456789012:role/FileConverter'
},
{
argument: 'runtime',
optional: true,
description: '指定Nodejs运行环境版本, 更多信息,查看官网\n http://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html',
default: 'nodejs12.x'
},
{
argument: 'description',
optional: true,
description: '设置该函数的描述介绍信息',
default: 'the project description from package.json'
},
{
argument: 'memory',
optional: true,
description: '指定你的Lambda函数运行拥有的内存总量(M).\n这个值必须是64Mb的整数倍.',
default: 128
},
{
argument: 'timeout',
optional: true,
description: '函数执行时间(s),超过时间将停止执行',
default: 3
},
{
argument: 'no-optional-dependencies',
optional: true,
description: '不上传可选依赖到Lambda'
},
{
argument: 'use-local-dependencies',
optional: true,
description: '不安装依赖,使用本地node_modules文件夹中依赖代替'
},
{
argument: 'npm-options',
optional: true,
description: '安装软件包时传递给npm的任何可选依赖',
example: '--ignore-scripts',
since: '5.0.0'
},
{
argument: 'cache-api-config',
optional: true,
example: 'slnConfigCache',
description: '用于存储当前API配置签名的阶段变量的名称'
},
{
argument: 'keep',
optional: true,
description: '将产生的软件包保留在磁盘上,而不在成功上传后,进行删除'
},
{
argument: 'use-s3-bucket',
optional: true,
example: 'sln-uploads',
description: '使用S3桶服务'
},
{
argument: 's3-key',
optional: true,
example: 'path/to/file.zip',
description: '指定s3桶加密的秘钥'
},
{
argument: 's3-sse',
optional: true,
example: 'AES256',
description: '指定应用于 --use-s3-bucket 中引用的S3存储桶的服务器端加密类型'
},
{
argument: 'aws-delay',
optional: true,
example: '3000',
description: '设置等待重新尝试操作,间隔的毫秒数',
default: '5000'
},
{
argument: 'aws-retries',
optional: true,
example: '15',
description: '设置连接AWS操作失败,重试的次数',
default: '15'
},
{
argument: 'set-env',
optional: true,
example: 'S3BUCKET=testbucket,SNSQUEUE=testqueue',
description: '以 Key=Vlaue 的形式设置环境变量'
},
{
argument: 'set-env-from-json',
optional: true,
example: 'production-env.json',
description: '将指定JSON文件中的参数设置到环境变量中'
}
]
}
| 31.682927 | 171 | 0.558507 |
101da8d3810d8667168cbc2dbcaf1956c09e53d1 | 1,378 | js | JavaScript | js/styleManipulate.js | etterwin/anonymous-millionare | b07aaaac620cb313a5ac5a6c806efc56c33f51e6 | [
"MIT"
] | null | null | null | js/styleManipulate.js | etterwin/anonymous-millionare | b07aaaac620cb313a5ac5a6c806efc56c33f51e6 | [
"MIT"
] | null | null | null | js/styleManipulate.js | etterwin/anonymous-millionare | b07aaaac620cb313a5ac5a6c806efc56c33f51e6 | [
"MIT"
] | null | null | null | $(document).ready(function() {
let country = navigator.language||navigator.browserLanguage;
if (country === 'th') {
//class
$('html').addClass('font-th');
//text
$('title').text('Anonymous Millionaire');
$('h1.caption').text('ความลับนี้ทำให้ฉันเป็นเศรษฐีใน 60 วัน');
$('p.text').text('Anonymous millionaire ในที่สุดก็ได้เปิดเผยความลับความสำเร็จของเขา \n' +
'ติดตามจดหมายข่าวและติดตามสำหรับการอัพเดต\n');
$('span.asterisk-text').text('กรอกข้อมูลที่จำเป็น');
$('span.email-text').text('ที่อยู่อีเมล');
//attribute
$('input.email').attr({"placeholder":"กรอกอีเมล์ของคุณ"});
$('input.button').attr({"value":"สมัครสมาชิก"});
} else {
//class
$('html').addClass('font-en');
//text
$('title').text('Anonymous Millionaire');
$('h1.caption').text('How this trick made me a millionaire in 60 days.');
$('p.text').text('Anonymous millionaire has finally revealed the secret of his success. Subscribe to the' +
' newsletter and follow up for updates!');
$('span.asterisk-text').text('required');
$('span.email-text').text('Email Address');
//attribute
$('input.email').attr({"placeholder":"Enter your email"});
$('input.button').attr({"value":"Subscribe"});
}
}); | 34.45 | 115 | 0.560232 |
101e1856837ef01efd67f2588f13addd8efc0d79 | 92 | js | JavaScript | docs/html/search/groups_1.js | zypeh/utf8rewind | 46dd600a4716f80debbe4bbbe4a5b19daf0e2cb2 | [
"MIT"
] | 5 | 2021-02-07T08:19:59.000Z | 2021-11-18T01:17:01.000Z | docs/html/search/groups_1.js | zypeh/utf8rewind | 46dd600a4716f80debbe4bbbe4a5b19daf0e2cb2 | [
"MIT"
] | 1 | 2020-05-25T08:59:35.000Z | 2020-05-25T14:59:09.000Z | docs/html/search/groups_1.js | zypeh/utf8rewind | 46dd600a4716f80debbe4bbbe4a5b19daf0e2cb2 | [
"MIT"
] | 1 | 2022-03-27T05:53:28.000Z | 2022-03-27T05:53:28.000Z | var searchData=
[
['error_20codes_164',['Error codes',['../group__errors.html',1,'']]]
];
| 18.4 | 70 | 0.630435 |
101e2cdc1888e3f71c04ff37b468782d10b39008 | 292 | js | JavaScript | src/components/Globals/BackgroundSection.js | andyriles/Cake-shop | 22e87b937a386eecf7a3559f4315717e29bd1a8f | [
"RSA-MD"
] | null | null | null | src/components/Globals/BackgroundSection.js | andyriles/Cake-shop | 22e87b937a386eecf7a3559f4315717e29bd1a8f | [
"RSA-MD"
] | null | null | null | src/components/Globals/BackgroundSection.js | andyriles/Cake-shop | 22e87b937a386eecf7a3559f4315717e29bd1a8f | [
"RSA-MD"
] | null | null | null | import React from "react"
import BackgroundImage from "gatsby-background-image"
function BackgroundSection({ img, styleClass, title }) {
return (
<BackgroundImage fluid={img} className={styleClass}>
<h1>{title}</h1>
</BackgroundImage>
)
}
export default BackgroundSection
| 22.461538 | 56 | 0.722603 |
101ea6da1be974f15ed90df3cc3e3bd2f945de76 | 1,050 | js | JavaScript | data/js/00/02/a3/00/00/00.24.js | hdm/mac-tracker | 69f0c4efaa3d60111001d40f7a33886cc507e742 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | data/js/00/02/a3/00/00/00.24.js | hdm/mac-tracker | 69f0c4efaa3d60111001d40f7a33886cc507e742 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | data/js/00/02/a3/00/00/00.24.js | hdm/mac-tracker | 69f0c4efaa3d60111001d40f7a33886cc507e742 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | macDetailCallback("0002a3000000/24",[{"d":"2000-09-08","t":"add","a":"Bahnhofstrasse\nCH-5300 Turgi\n\n","c":"SWITZERLAND","o":"ABB Power Automation"},{"d":"2002-06-05","t":"change","a":"Bahnhofstrasse\nCH-5300 Turgi\nSWITZERLAND\n","c":"SWITZERLAND","o":"ABB Power Automation"},{"d":"2004-10-26","t":"change","a":"Bahnhofstrasse\nCH-5300 Turgi\n\n","c":"SWITZERLAND","o":"ABB Power Automation"},{"d":"2009-07-04","t":"change","a":"Bruggerstrasse 72\nCH-5400\nBaden\n","c":"SWITZERLAND","o":"ABB Switzerland Ltd, Power Systems"},{"d":"2012-11-29","t":"change","a":"BruggerstraÃe 72\nCH-5400\nBaden\n","c":"SWITZERLAND","o":"ABB Switzerland Ltd, Power Systems"},{"d":"2013-01-30","t":"change","a":"Bruggerstrasse 72\nCH-5400\nBaden\n","c":"SWITZERLAND","o":"ABB Switzerland Ltd, Power Systems"},{"d":"2015-08-27","t":"change","a":"Bruggerstrasse 72 Baden CH","c":"CH","o":"ABB Switzerland Ltd, Power Systems"},{"d":"2021-10-28","t":"change","s":"ieee-oui.csv","a":"Bruggerstrasse 72 Baden CH 5400","c":"CH","o":"Hitachi Energy Switzerland Ltd"}]);
| 525 | 1,049 | 0.659048 |
101eedc4e217a28892e42603f488841c232ca2bd | 317,986 | js | JavaScript | public/scripts/main.min.js | tylerwalters/maggie-gallery | cfa896fb9694d969e5e6d41b6bd374572619f8ee | [
"MIT"
] | 2 | 2015-08-17T03:40:50.000Z | 2020-02-27T21:29:49.000Z | public/scripts/main.min.js | tylerwalters/maggie-gallery | cfa896fb9694d969e5e6d41b6bd374572619f8ee | [
"MIT"
] | null | null | null | public/scripts/main.min.js | tylerwalters/maggie-gallery | cfa896fb9694d969e5e6d41b6bd374572619f8ee | [
"MIT"
] | null | null | null | !function t(e,n,r){function o(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(t,e,n){t("./app")},{"./app":2}],2:[function(t,e,n){var r=t("react-router"),o=t("./components/routes");r.run(o,r.HistoryLocation,function(t,e){var n=e.params;React.render(React.createElement(t,{params:n}),document.body)})},{"./components/routes":7,"react-router":71}],3:[function(t,e,n){var r=React.createClass({displayName:"Footer",render:function(t){return React.createElement("footer",{className:"footer pure-g"},React.createElement("p",{className:"pure-u-1-1"},"Test text"))}});e.exports=r},{}],4:[function(t,e,n){var r,o,i=t("isotope-layout"),a=t("imagesloaded");r=-1===window.location.host.indexOf("localhost")?"prod":"dev",o="prod"===r?"~/app/images":"../images/";var s=React.createClass({displayName:"GalleryImage",render:function(){return React.createElement("div",{className:this.props.className},React.createElement("a",{href:this.props.page},React.createElement("img",{src:this.props.src,alt:this.props.title})))}}),u=React.createClass({displayName:"Gallery",componentDidMount:function(){var t,e=document.querySelector("#gallery__box");a(e,function(){t=new i(e,{itemSelector:".gallery__image",masonry:{columnWidth:".gallery__image--portrait",gutter:0}})})},render:function(){var t;return t=this.props.data.map(function(t){var e={className:"gallery__image gallery__image--"+t.layout,page:"/detail/"+t.title,src:o+"/"+t.filename+".desk."+t.extension};return React.createElement(s,{className:e.className,page:e.page,src:e.src,title:t.title})}),React.createElement("div",{id:"gallery",className:"pure-u-1 gallery isotope"},React.createElement("div",{id:"gallery__box","class":"gallery__box"},t))}});e.exports=u},{imagesloaded:22,"isotope-layout":25}],5:[function(t,e,n){var r=React.createClass({displayName:"Logo",render:function(){return React.createElement("div",{className:"header__logo pure-u-1-4"},React.createElement("img",{src:"../images/logo.png",alt:"Maggie Walters Media Gallery Logo"}))}}),o=React.createClass({displayName:"Navigation",render:function(){return React.createElement("nav",{className:"header__nav pure-u-3-4"},React.createElement("ul",null,React.createElement("li",null,React.createElement("a",{href:"/"},"Home")),React.createElement("li",null,React.createElement("a",{href:"/about"},"About")),React.createElement("li",null,React.createElement("a",{href:"/donate"},"Donate"))))}}),i=React.createClass({displayName:"Header",render:function(){return React.createElement("header",{className:"header pure-g"},React.createElement(r,null),React.createElement(o,null))}});e.exports=i},{}],6:[function(t,e,n){var r=t("react-router"),o=(t("./footer"),React.addons.CSSTransitionGroup),i=React.createClass({displayName:"Index",render:function(){return React.createElement("div",{className:"page",ref:"page"},React.createElement(o,{component:"div",transitionName:"example"},React.createElement(r.RouteHandler,React.__spread({},this.props))))}});e.exports=i},{"./footer":3,"react-router":71}],7:[function(t,e,n){var r,o=t("react-router"),i=t("./index"),a=t("../pages/home"),s=t("../pages/detail"),u=t("../pages/about"),c=t("../pages/donate"),l=(o.DefaultRoute,o.Route);r=React.createElement(l,{name:"index",path:"/",handler:i},React.createElement(l,{name:"detail",handler:s},React.createElement(l,{name:"detailItem",path:":mediaId",handler:s})),React.createElement(l,{name:"about",handler:u}),React.createElement(l,{name:"donate",handler:c}),React.createElement(o.DefaultRoute,{handler:a})),e.exports=r},{"../pages/about":10,"../pages/detail":11,"../pages/donate":12,"../pages/home":13,"./index":6,"react-router":71}],8:[function(t,e,n){var r=React.createClass({displayName:"SlideToggle",render:function(){return React.createElement("nav",{"class":"slide-toggle"},React.createElement("button",{onClick:this.props.onClick},"☰"))}});e.exports=r},{}],9:[function(t,e,n){var r=t("aias"),o=t("lodash");e.exports=function(){"use strict";function t(t){var e,n,r=[];for(e in t.photos)t.photos.hasOwnProperty(e)&&r.push(t.photos[e]);for(n in t.videos)t.videos.hasOwnProperty(n)&&r.push(t.videos[n]);return r}var e,n,i={},a=0;return i.filterByTag=function(t,n){var r=[];return n=n||e.slice(),n=n.filter(function(e){return r=o.intersection(e.tags,t),r.length>0})},i.filterByPerson=function(t,n){var r=[];return n=n||e.slice(),n=n.filter(function(e){return r=o.intersection(e.people,t),r.length>0})},i.getChunkedData=function(t,e){return e=e||a++,t=t||n.slice(),t[e]},i.getData=function(t){return t=t||e.slice()},i.getItem=function(t,n){return n=n||e.slice(),n=n.filter(function(e){return e.title===t})},i.getPhotos=function(t){return t=t||e.slice(),t=t.filter(function(t){return"photo"===t.type})},i.getVideos=function(t){return t=t||e.slice(),t=t.filter(function(t){return"video"===t.type})},i.setData=function(){var n,o,i=JSON.parse(sessionStorage.getItem("data"));return null!==i&&0!==i.length?o=Promise.resolve(e=i):(o=Promise.resolve(r.get("/api/v1/media")),o.then(function(r){n=t(r),sessionStorage.setItem("data",JSON.stringify(n)),e=n})),o},i.setChunkedData=function(t,r){var i;return t=t||20,r=r||e.slice(),i=o.chunk(r,t),r===e&&(a=0,n=i),i},i.sortByDate=function(t){return t=t||e.slice(),t=t.sort(function(t,e){return t=new Date(t.date),e=new Date(e.date),t>e?-1:e>t?1:0})},i.sortByShuffle=function(t){var n,r,o;for(t=t||e.slice(),n=t.length;n;)o=Math.floor(Math.random()*n--),r=t[n],t[n]=t[o],t[o]=r;return t},i.sortByTitle=function(t){return t=t||e.slice(),t=t.sort(function(t,e){return t.title>e.title?1:t.title<e.title?-1:0})},i}()},{aias:14,lodash:43}],10:[function(t,e,n){var r=React.createClass({displayName:"About",render:function(t){return React.createElement("main",{className:"content pure-g"},React.createElement("h1",null,"About Maggie"),React.createElement("p",null,"About Maggie."))}});e.exports=r},{}],11:[function(t,e,n){var r,o,i=t("../modules/data");r=-1===window.location.host.indexOf("localhost")?"prod":"dev",o="prod"===r?"~/app/images":"../images/";var a=React.createClass({displayName:"DetailImage",render:function(){var t={src:o+this.props.item.filename+".desk."+this.props.item.extension,large:o+this.props.item.filename+".large."+this.props.item.extension};return React.createElement("div",{className:"detail__media pure-u-1-2"},React.createElement("a",{href:t.large},React.createElement("img",{src:t.src,alt:this.props.item.title})))}}),s=React.createClass({displayName:"DetailDescription",render:function(){return React.createElement("div",{className:"detail__description pure-u-1-2"},React.createElement("p",null,"Title: ",this.props.item.title),React.createElement("p",null,"Date: ",this.props.item.date),React.createElement("p",null,"Tags: ",this.props.item.tags),React.createElement("p",null,"People: ",this.props.item.people),React.createElement("p",null,"Size: ",this.props.item.dimensions),React.createElement("p",null,"Filename: ",this.props.item.filename),React.createElement("p",null,"Description: ",this.props.item.description))}}),u=React.createClass({displayName:"Detail",getInitialState:function(){return{data:[{filename:"",extension:"",title:""}],bg:""}},componentDidMount:function(){i.setData().then(function(t){this.setState({data:i.getItem(this.props.params.mediaId)}),this.setState({bg:"url(../images/"+this.state.data[0].filename+".bg."+this.state.data[0].extension+") no-repeat center center / cover fixed"})}.bind(this))},render:function(){var t={background:this.state.bg};return React.createElement("main",{className:"detail content pure-g",style:t},React.createElement("h1",{className:"title pure-u-1-1"},this.state.data[0].title),React.createElement(a,{item:this.state.data[0]}),React.createElement(s,{item:this.state.data[0]}))}});e.exports=u},{"../modules/data":9}],12:[function(t,e,n){var r=React.createClass({displayName:"Donate",render:function(t){return React.createElement("main",{className:"content pure-g"},React.createElement("h1",null,"Donate"),React.createElement("p",null,"About Maggie."))}});e.exports=r},{}],13:[function(t,e,n){var r=t("../modules/data"),o=t("../components/header"),i=t("../components/gallery"),a=t("../components/slideToggle"),s=t("slideout"),u=React.createClass({displayName:"SortButton",render:function(){return React.createElement("li",null,React.createElement("button",{"data-sort":this.props.name,onClick:this.props.onClick},this.props.display))}}),c=React.createClass({displayName:"Home",slideToggle:function(){this.slideout.toggle()},sortData:function(t){var e;switch(t){case"shuffle":e=r.sortByShuffle(this.state.data);break;case"date":e=r.sortByDate(this.state.data);break;case"title":e=r.sortByTitle(this.state.data);break;default:e=r.sortByShuffle(this.state.data)}this.setState({data:e})},getInitialState:function(){return{data:[]}},componentDidMount:function(){r.setData().then(function(t){this.setState({data:r.sortByShuffle()})}.bind(this)),this.slideout=new s({panel:document.getElementById("panel"),menu:document.getElementById("menu"),padding:256,tolerance:70})},render:function(t){return React.createElement("div",{"class":"page-home"},React.createElement("aside",{id:"menu"},React.createElement(o,null),React.createElement("div",{className:"gallery__sort"},React.createElement("ul",null,React.createElement(u,{name:"shuffle",display:"Shuffle",onClick:this.sortData.bind(this,"shuffle")}),React.createElement(u,{name:"date",display:"Date",onClick:this.sortData.bind(this,"date")}),React.createElement(u,{name:"title",display:"Title",onClick:this.sortData.bind(this,"title")})))),React.createElement("main",{id:"panel",className:"content pure-g"},React.createElement(a,{name:"date",display:"Date",onClick:this.slideToggle.bind(this)}),React.createElement(i,{data:this.state.data,sortData:this.sortData})))}});e.exports=c},{"../components/gallery":4,"../components/header":5,"../components/slideToggle":8,"../modules/data":9,slideout:231}],14:[function(t,e,n){(function(){"use strict";function n(t){try{return JSON.parse(t)}catch(e){return t}}function r(t,e,r){return new o(function(o,i){var a=window.XMLHttpRequest||ActiveXObject,s=new a("MSXML2.XMLHTTP.3.0");s.open(t,e,!0),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),s.onreadystatechange=function(){if(4===this.readyState)if(200===this.status){var t=n(s.responseText);o(t,s)}else i(new Error("Request responded with status "+s.statusText))},s.send(r)})}var o="undefined"!=typeof e&&e.exports?t("promise"):context.Promise,i={};i.get=function(t){return r("GET",t)},i.post=function(t,e){return r("POST",t,e)},i.put=function(t,e){return r("PUT",t,e)},i["delete"]=function(t){return r("DELETE",t)},"function"==typeof define&&define.amd?define("aias",function(){return i}):"undefined"!=typeof e&&e.exports?e.exports=i:this.aias=i}).call(window)},{promise:15}],15:[function(t,e,n){"use strict";e.exports=t("./lib/core.js"),t("./lib/done.js"),t("./lib/es6-extensions.js"),t("./lib/node-extensions.js")},{"./lib/core.js":16,"./lib/done.js":17,"./lib/es6-extensions.js":18,"./lib/node-extensions.js":19}],16:[function(t,e,n){"use strict";function r(t){function e(t){return null===u?void l.push(t):void a(function(){var e=u?t.onFulfilled:t.onRejected;if(null===e)return void(u?t.resolve:t.reject)(c);var n;try{n=e(c)}catch(r){return void t.reject(r)}t.resolve(n)})}function n(t){try{if(t===p)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void i(e.bind(t),n,r)}u=!0,c=t,s()}catch(o){r(o)}}function r(t){u=!1,c=t,s()}function s(){for(var t=0,n=l.length;n>t;t++)e(l[t]);l=null}if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");var u=null,c=null,l=[],p=this;this.then=function(t,n){return new p.constructor(function(r,i){e(new o(t,n,r,i))})},i(t,n,r)}function o(t,e,n,r){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r}function i(t,e,n){var r=!1;try{t(function(t){r||(r=!0,e(t))},function(t){r||(r=!0,n(t))})}catch(o){if(r)return;r=!0,n(o)}}var a=t("asap");e.exports=r},{asap:20}],17:[function(t,e,n){"use strict";var r=t("./core.js"),o=t("asap");e.exports=r,r.prototype.done=function(t,e){var n=arguments.length?this.then.apply(this,arguments):this;n.then(null,function(t){o(function(){throw t})})}},{"./core.js":16,asap:20}],18:[function(t,e,n){"use strict";function r(t){this.then=function(e){return"function"!=typeof e?this:new o(function(n,r){i(function(){try{n(e(t))}catch(o){r(o)}})})}}var o=t("./core.js"),i=t("asap");e.exports=o,r.prototype=o.prototype;var a=new r(!0),s=new r(!1),u=new r(null),c=new r(void 0),l=new r(0),p=new r("");o.resolve=function(t){if(t instanceof o)return t;if(null===t)return u;if(void 0===t)return c;if(t===!0)return a;if(t===!1)return s;if(0===t)return l;if(""===t)return p;if("object"==typeof t||"function"==typeof t)try{var e=t.then;if("function"==typeof e)return new o(e.bind(t))}catch(n){return new o(function(t,e){e(n)})}return new r(t)},o.all=function(t){var e=Array.prototype.slice.call(t);return new o(function(t,n){function r(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(t){r(i,t)},n)}e[i]=a,0===--o&&t(e)}catch(u){n(u)}}if(0===e.length)return t([]);for(var o=e.length,i=0;i<e.length;i++)r(i,e[i])})},o.reject=function(t){return new o(function(e,n){n(t)})},o.race=function(t){return new o(function(e,n){t.forEach(function(t){o.resolve(t).then(e,n)})})},o.prototype["catch"]=function(t){return this.then(null,t)}},{"./core.js":16,asap:20}],19:[function(t,e,n){"use strict";var r=t("./core.js"),o=t("asap");e.exports=r,r.denodeify=function(t,e){return e=e||1/0,function(){var n=this,o=Array.prototype.slice.call(arguments);return new r(function(r,i){for(;o.length&&o.length>e;)o.pop();o.push(function(t,e){t?i(t):r(e)});var a=t.apply(n,o);!a||"object"!=typeof a&&"function"!=typeof a||"function"!=typeof a.then||r(a)})}},r.nodeify=function(t){return function(){var e=Array.prototype.slice.call(arguments),n="function"==typeof e[e.length-1]?e.pop():null,i=this;try{return t.apply(this,arguments).nodeify(n,i)}catch(a){if(null===n||"undefined"==typeof n)return new r(function(t,e){e(a)});o(function(){n.call(i,a)})}}},r.prototype.nodeify=function(t,e){return"function"!=typeof t?this:void this.then(function(n){o(function(){t.call(e,null,n)})},function(n){o(function(){t.call(e,n)})})}},{"./core.js":16,asap:20}],20:[function(t,e,n){(function(t){function n(){for(;o.next;){o=o.next;var t=o.task;o.task=void 0;var e=o.domain;e&&(o.domain=void 0,e.enter());try{t()}catch(r){if(u)throw e&&e.exit(),setTimeout(n,0),e&&e.enter(),r;setTimeout(function(){throw r},0)}e&&e.exit()}a=!1}function r(e){i=i.next={task:e,domain:u&&t.domain,next:null},a||(a=!0,s())}var o={task:void 0,next:null},i=o,a=!1,s=void 0,u=!1;if("undefined"!=typeof t&&t.nextTick)u=!0,s=function(){t.nextTick(n)};else if("function"==typeof setImmediate)s="undefined"!=typeof window?setImmediate.bind(window,n):function(){setImmediate(n)};else if("undefined"!=typeof MessageChannel){var c=new MessageChannel;c.port1.onmessage=n,s=function(){c.port2.postMessage(0)}}else s=function(){setTimeout(n,0)};e.exports=r}).call(this,t("_process"))},{_process:21}],21:[function(t,e,n){function r(){if(!s){s=!0;for(var t,e=a.length;e;){t=a,a=[];for(var n=-1;++n<e;)t[n]();e=a.length}s=!1}}function o(){}var i=e.exports={},a=[],s=!1;i.nextTick=function(t){a.push(t),s||setTimeout(r,0)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=o,i.addListener=o,i.once=o,i.off=o,i.removeListener=o,i.removeAllListeners=o,i.emit=o,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}},{}],22:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","eventie/eventie"],function(t,e){return o(r,t,e)}):"object"==typeof n?e.exports=o(r,t("wolfy87-eventemitter"),t("eventie")):r.imagesLoaded=o(r,r.EventEmitter,r.eventie)}(window,function(t,e,n){"use strict";function r(t,e){for(var n in e)t[n]=e[n];return t}function o(t){return"[object Array]"===f.call(t)}function i(t){var e=[];if(o(t))e=t;else if("number"==typeof t.length)for(var n=0,r=t.length;r>n;n++)e.push(t[n]);else e.push(t);return e}function a(t,e,n){if(!(this instanceof a))return new a(t,e);"string"==typeof t&&(t=document.querySelectorAll(t)),this.elements=i(t),this.options=r({},this.options),"function"==typeof e?n=e:r(this.options,e),n&&this.on("always",n),this.getImages(),c&&(this.jqDeferred=new c.Deferred);var o=this;setTimeout(function(){o.check()})}function s(t){this.img=t}function u(t){this.src=t,d[t]=this}var c=t.jQuery,l=t.console,p="undefined"!=typeof l,f=Object.prototype.toString;a.prototype=new e,a.prototype.options={},a.prototype.getImages=function(){this.images=[];for(var t=0,e=this.elements.length;e>t;t++){var n=this.elements[t];"IMG"===n.nodeName&&this.addImage(n);var r=n.nodeType;if(r&&(1===r||9===r||11===r))for(var o=n.querySelectorAll("img"),i=0,a=o.length;a>i;i++){var s=o[i];this.addImage(s)}}},a.prototype.addImage=function(t){var e=new s(t);this.images.push(e)},a.prototype.check=function(){function t(t,o){return e.options.debug&&p&&l.log("confirm",t,o),e.progress(t),n++,n===r&&e.complete(),!0}var e=this,n=0,r=this.images.length;if(this.hasAnyBroken=!1,!r)return void this.complete();for(var o=0;r>o;o++){var i=this.images[o];i.on("confirm",t),i.check()}},a.prototype.progress=function(t){this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded;var e=this;setTimeout(function(){e.emit("progress",e,t),e.jqDeferred&&e.jqDeferred.notify&&e.jqDeferred.notify(e,t)})},a.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";this.isComplete=!0;var e=this;setTimeout(function(){if(e.emit(t,e),e.emit("always",e),e.jqDeferred){var n=e.hasAnyBroken?"reject":"resolve";e.jqDeferred[n](e)}})},c&&(c.fn.imagesLoaded=function(t,e){var n=new a(this,t,e);return n.jqDeferred.promise(c(this))}),s.prototype=new e,s.prototype.check=function(){var t=d[this.img.src]||new u(this.img.src);if(t.isConfirmed)return void this.confirm(t.isLoaded,"cached was confirmed");if(this.img.complete&&void 0!==this.img.naturalWidth)return void this.confirm(0!==this.img.naturalWidth,"naturalWidth");var e=this;t.on("confirm",function(t,n){return e.confirm(t.isLoaded,n),!0}),t.check()},s.prototype.confirm=function(t,e){this.isLoaded=t,this.emit("confirm",this,e)};var d={};return u.prototype=new e,u.prototype.check=function(){if(!this.isChecked){var t=new Image;n.bind(t,"load",this),n.bind(t,"error",this),t.src=this.src,this.isChecked=!0}},u.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},u.prototype.onload=function(t){this.confirm(!0,"onload"),this.unbindProxyEvents(t)},u.prototype.onerror=function(t){this.confirm(!1,"onerror"),this.unbindProxyEvents(t)},u.prototype.confirm=function(t,e){this.isConfirmed=!0,this.isLoaded=t,this.emit("confirm",this,e)},u.prototype.unbindProxyEvents=function(t){n.unbind(t.target,"load",this),n.unbind(t.target,"error",this)},a})},{eventie:23,"wolfy87-eventemitter":24}],23:[function(t,e,n){!function(t){"use strict";function r(e){var n=t.event;return n.target=n.target||n.srcElement||e,n}var o=document.documentElement,i=function(){};o.addEventListener?i=function(t,e,n){t.addEventListener(e,n,!1)}:o.attachEvent&&(i=function(t,e,n){t[e+n]=n.handleEvent?function(){var e=r(t);n.handleEvent.call(n,e)}:function(){var e=r(t);n.call(t,e)},t.attachEvent("on"+e,t[e+n])});var a=function(){};o.removeEventListener?a=function(t,e,n){t.removeEventListener(e,n,!1)}:o.detachEvent&&(a=function(t,e,n){t.detachEvent("on"+e,t[e+n]);try{delete t[e+n]}catch(r){t[e+n]=void 0}});var s={bind:i,unbind:a};"function"==typeof define&&define.amd?define(s):"object"==typeof n?e.exports=s:t.eventie=s}(window)},{}],24:[function(t,e,n){(function(){"use strict";function t(){}function n(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function r(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,i=this,a=i.EventEmitter;o.getListeners=function(t){var e,n,r=this._getEvents();if(t instanceof RegExp){e={};for(n in r)r.hasOwnProperty(n)&&t.test(n)&&(e[n]=r[n])}else e=r[t]||(r[t]=[]);return e},o.flattenListeners=function(t){var e,n=[];for(e=0;e<t.length;e+=1)n.push(t[e].listener);return n},o.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&(e={},e[t]=n),e||n},o.addListener=function(t,e){var r,o=this.getListenersAsObject(t),i="object"==typeof e;for(r in o)o.hasOwnProperty(r)&&-1===n(o[r],e)&&o[r].push(i?e:{listener:e,once:!1});return this},o.on=r("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=r("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,e){var r,o,i=this.getListenersAsObject(t);for(o in i)i.hasOwnProperty(o)&&(r=n(i[o],e),-1!==r&&i[o].splice(r,1));return this},o.off=r("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},o.manipulateListeners=function(t,e,n){var r,o,i=t?this.removeListener:this.addListener,a=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(r=n.length;r--;)i.call(this,e,n[r]);else for(r in e)e.hasOwnProperty(r)&&(o=e[r])&&("function"==typeof o?i.call(this,r,o):a.call(this,r,o));return this},o.removeEvent=function(t){var e,n=typeof t,r=this._getEvents();if("string"===n)delete r[t];else if(t instanceof RegExp)for(e in r)r.hasOwnProperty(e)&&t.test(e)&&delete r[e];else delete this._events;return this},o.removeAllListeners=r("removeEvent"),o.emitEvent=function(t,e){var n,r,o,i,a=this.getListenersAsObject(t);for(o in a)if(a.hasOwnProperty(o))for(r=a[o].length;r--;)n=a[o][r],n.once===!0&&this.removeListener(t,n.listener),i=n.listener.apply(this,e||[]),i===this._getOnceReturnValue()&&this.removeListener(t,n.listener);return this},o.trigger=r("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return i.EventEmitter=a,t},"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof e&&e.exports?e.exports=t:i.EventEmitter=t}).call(this)},{}],25:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","fizzy-ui-utils/utils","./item","./layout-mode","./layout-modes/masonry","./layout-modes/fit-rows","./layout-modes/vertical"],function(t,e,n,i,a,s){return o(r,t,e,n,i,a,s)}):"object"==typeof n?e.exports=o(r,t("outlayer"),t("get-size"),t("desandro-matches-selector"),t("fizzy-ui-utils"),t("./item"),t("./layout-mode"),t("./layout-modes/masonry"),t("./layout-modes/fit-rows"),t("./layout-modes/vertical")):r.Isotope=o(r,r.Outlayer,r.getSize,r.matchesSelector,r.fizzyUIUtils,r.Isotope.Item,r.Isotope.LayoutMode)}(window,function(t,e,n,r,o,i,a){"use strict";function s(t,e){return function(n,r){for(var o=0,i=t.length;i>o;o++){var a=t[o],s=n.sortData[a],u=r.sortData[a];if(s>u||u>s){var c=void 0!==e[a]?e[a]:e,l=c?1:-1;return(s>u?1:-1)*l}}return 0}}var u=t.jQuery,c=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},l=document.documentElement,p=l.textContent?function(t){return t.textContent}:function(t){return t.innerText},f=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});f.Item=i,f.LayoutMode=a,f.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var t in a.modes)this._initLayoutMode(t)},f.prototype.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},f.prototype._itemize=function(){for(var t=e.prototype._itemize.apply(this,arguments),n=0,r=t.length;r>n;n++){var o=t[n];o.id=this.itemGUID++}return this._updateItemsSortData(t),t},f.prototype._initLayoutMode=function(t){var e=a.modes[t],n=this.options[t]||{};this.options[t]=e.options?o.extend(e.options,n):n,this.modes[t]=new e(this)},f.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?void this.arrange():void this._layout()},f.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},f.prototype.arrange=function(t){function e(){r.reveal(n.needReveal),r.hide(n.needHide)}this.option(t),this._getIsInstant();var n=this._filter(this.items);this.filteredItems=n.matches;var r=this;this._bindArrangeComplete(),this._isInstant?this._noTransition(e):e(),this._sort(),this._layout()},f.prototype._init=f.prototype.arrange,f.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},f.prototype._bindArrangeComplete=function(){function t(){e&&n&&r&&o.emitEvent("arrangeComplete",[o.filteredItems])}var e,n,r,o=this;this.once("layoutComplete",function(){e=!0,t()}),this.once("hideComplete",function(){n=!0,t()}),this.once("revealComplete",function(){r=!0,t()})},f.prototype._filter=function(t){var e=this.options.filter;e=e||"*";for(var n=[],r=[],o=[],i=this._getFilterTest(e),a=0,s=t.length;s>a;a++){var u=t[a];if(!u.isIgnored){var c=i(u);c&&n.push(u),c&&u.isHidden?r.push(u):c||u.isHidden||o.push(u)}}return{matches:n,needReveal:r,needHide:o}},f.prototype._getFilterTest=function(t){return u&&this.options.isJQueryFiltering?function(e){return u(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},f.prototype.updateSortData=function(t){var e;t?(t=o.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},f.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var n=t[e];this._sorters[e]=d(n)}},f.prototype._updateItemsSortData=function(t){for(var e=t&&t.length,n=0;e&&e>n;n++){var r=t[n];r.updateSortData()}};var d=function(){function t(t){if("string"!=typeof t)return t;var n=c(t).split(" "),r=n[0],o=r.match(/^\[(.+)\]$/),i=o&&o[1],a=e(i,r),s=f.sortDataParsers[n[1]];return t=s?function(t){return t&&s(a(t))}:function(t){return t&&a(t)}}function e(t,e){var n;return n=t?function(e){return e.getAttribute(t)}:function(t){var n=t.querySelector(e);return n&&p(n)}}return t}();f.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},f.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),n=s(e,this.options.sortAscending);this.filteredItems.sort(n),t!=this.sortHistory[0]&&this.sortHistory.unshift(t)}},f.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},f.prototype._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},f.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},f.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},f.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},f.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},f.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var n=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(n)}},f.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var n=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=n.concat(this.filteredItems),this.items=e.concat(this.items)}},f.prototype._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},f.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var n,r,o=e.length;for(n=0;o>n;n++)r=e[n],this.element.appendChild(r.element);var i=this._filter(e).matches;for(n=0;o>n;n++)e[n].isLayoutInstant=!0;for(this.arrange(),n=0;o>n;n++)delete e[n].isLayoutInstant;this.reveal(i)}};var h=f.prototype.remove;return f.prototype.remove=function(t){t=o.makeArray(t);var e=this.getItems(t);h.call(this,t);var n=e&&e.length;if(n)for(var r=0;n>r;r++){var i=e[r];o.removeFrom(this.filteredItems,i)}},f.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var n=this.items[t];n.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},f.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var n=t.call(this);return this.options.transitionDuration=e,n},f.prototype.getFilteredItemElements=function(){for(var t=[],e=0,n=this.filteredItems.length;n>e;e++)t.push(this.filteredItems[e].element);return t},f})},{"./item":26,"./layout-mode":27,"./layout-modes/fit-rows":28,"./layout-modes/masonry":29,"./layout-modes/vertical":30,"desandro-matches-selector":31,"fizzy-ui-utils":34,"get-size":35,outlayer:42}],26:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer"],o):"object"==typeof n?e.exports=o(t("outlayer")):(r.Isotope=r.Isotope||{},r.Isotope.Item=o(r.Outlayer))}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var n in t){var r=e[n];this.sortData[n]=r(this.element,this)}}};var n=e.prototype.destroy;return e.prototype.destroy=function(){n.apply(this,arguments),this.css({display:""})},e})},{outlayer:42}],27:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["get-size/get-size","outlayer/outlayer"],o):"object"==typeof n?e.exports=o(t("get-size"),t("outlayer")):(r.Isotope=r.Isotope||{},r.Isotope.LayoutMode=o(r.getSize,r.Outlayer))}(window,function(t,e){"use strict";function n(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var r=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],o=0,i=r.length;i>o;o++){var a=r[o];n.prototype[a]=t(a)}}(),n.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),n=this.isotope.size&&e;return n&&e.innerHeight!=this.isotope.size.innerHeight},n.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},n.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width");
},n.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},n.prototype.getSegmentSize=function(t,e){var n=t+e,r="outer"+e;if(this._getMeasurement(n,r),!this[n]){var o=this.getFirstItemSize();this[n]=o&&o[r]||this.isotope.size["inner"+e]}},n.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},n.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},n.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},n.modes={},n.create=function(t,e){function r(){n.apply(this,arguments)}return r.prototype=new n,e&&(r.options=e),r.prototype.namespace=t,n.modes[t]=r,r},n})},{"get-size":35,outlayer:42}],28:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["../layout-mode"],o):"object"==typeof n?e.exports=o(t("../layout-mode")):o(r.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,n=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>n&&(this.x=0,this.y=this.maxY);var r={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,r},e.prototype._getContainerSize=function(){return{height:this.maxY}},e})},{"../layout-mode":27}],29:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["../layout-mode","masonry/masonry"],o):"object"==typeof n?e.exports=o(t("../layout-mode"),t("masonry-layout")):o(r.Isotope.LayoutMode,r.Masonry)}(window,function(t,e){"use strict";function n(t,e){for(var n in e)t[n]=e[n];return t}var r=t.create("masonry"),o=r.prototype._getElementOffset,i=r.prototype.layout,a=r.prototype._getMeasurement;n(r.prototype,e.prototype),r.prototype._getElementOffset=o,r.prototype.layout=i,r.prototype._getMeasurement=a;var s=r.prototype.measureColumns;r.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,s.call(this)};var u=r.prototype._manageStamp;return r.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},r})},{"../layout-mode":27,"masonry-layout":37}],30:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["../layout-mode"],o):"object"==typeof n?e.exports=o(t("../layout-mode")):o(r.Isotope.LayoutMode)}(window,function(t){"use strict";var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,n=this.y;return this.y+=t.size.outerHeight,{x:e,y:n}},e.prototype._getContainerSize=function(){return{height:this.y}},e})},{"../layout-mode":27}],31:[function(t,e,n){!function(t){"use strict";function r(t,e){return t[u](e)}function o(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function i(t,e){o(t);for(var n=t.parentNode.querySelectorAll(e),r=0,i=n.length;i>r;r++)if(n[r]===t)return!0;return!1}function a(t,e){return o(t),r(t,e)}var s,u=function(){if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0,r=e.length;r>n;n++){var o=e[n],i=o+"MatchesSelector";if(t[i])return i}}();if(u){var c=document.createElement("div"),l=r(c,"div");s=l?r:a}else s=i;"function"==typeof define&&define.amd?define(function(){return s}):"object"==typeof n?e.exports=s:window.matchesSelector=s}(Element.prototype)},{}],32:[function(t,e,n){!function(r){"use strict";function o(t){"function"==typeof t&&(o.isReady?t():u.push(t))}function i(t){var e="readystatechange"===t.type&&"complete"!==s.readyState;if(!o.isReady&&!e){o.isReady=!0;for(var n=0,r=u.length;r>n;n++){var i=u[n];i()}}}function a(t){return t.bind(s,"DOMContentLoaded",i),t.bind(s,"readystatechange",i),t.bind(r,"load",i),o}var s=r.document,u=[];o.isReady=!1,"function"==typeof define&&define.amd?(o.isReady="function"==typeof requirejs,define(["eventie/eventie"],a)):"object"==typeof n?e.exports=a(t("eventie")):r.docReady=a(r.eventie)}(window)},{eventie:33}],33:[function(t,e,n){arguments[4][23][0].apply(n,arguments)},{dup:23}],34:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["doc-ready/doc-ready","matches-selector/matches-selector"],function(t,e){return o(r,t,e)}):"object"==typeof n?e.exports=o(r,t("doc-ready"),t("desandro-matches-selector")):r.fizzyUIUtils=o(r,r.docReady,r.matchesSelector)}(window,function(t,e,n){"use strict";var r={};r.extend=function(t,e){for(var n in e)t[n]=e[n];return t},r.modulo=function(t,e){return(t%e+e)%e};var o=Object.prototype.toString;r.isArray=function(t){return"[object Array]"==o.call(t)},r.makeArray=function(t){var e=[];if(r.isArray(t))e=t;else if(t&&"number"==typeof t.length)for(var n=0,o=t.length;o>n;n++)e.push(t[n]);else e.push(t);return e},r.indexOf=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1},r.removeFrom=function(t,e){var n=r.indexOf(t,e);-1!=n&&t.splice(n,1)},r.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1==t.nodeType&&"string"==typeof t.nodeName},r.setText=function(){function t(t,n){e=e||(void 0!==document.documentElement.textContent?"textContent":"innerText"),t[e]=n}var e;return t}(),r.getParent=function(t,e){for(;t!=document.body;)if(t=t.parentNode,n(t,e))return t},r.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},r.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},r.filterFindElements=function(t,e){t=r.makeArray(t);for(var o=[],i=0,a=t.length;a>i;i++){var s=t[i];if(r.isElement(s))if(e){n(s,e)&&o.push(s);for(var u=s.querySelectorAll(e),c=0,l=u.length;l>c;c++)o.push(u[c])}else o.push(s)}return o},r.debounceMethod=function(t,e,n){var r=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o];t&&clearTimeout(t);var e=arguments,i=this;this[o]=setTimeout(function(){r.apply(i,e),delete i[o]},n||100)}},r.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,n){return e+"-"+n}).toLowerCase()};var i=t.console;return r.htmlInit=function(n,o){e(function(){for(var e=r.toDashed(o),a=document.querySelectorAll(".js-"+e),s="data-"+e+"-options",u=0,c=a.length;c>u;u++){var l,p=a[u],f=p.getAttribute(s);try{l=f&&JSON.parse(f)}catch(d){i&&i.error("Error parsing "+s+" on "+p.nodeName.toLowerCase()+(p.id?"#"+p.id:"")+": "+d);continue}var h=new n(p,l),m=t.jQuery;m&&m.data(p,o,h)}})},r})},{"desandro-matches-selector":31,"doc-ready":32}],35:[function(t,e,n){!function(r,o){"use strict";function i(t){var e=parseFloat(t),n=-1===t.indexOf("%")&&!isNaN(e);return n&&e}function a(){}function s(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,n=l.length;n>e;e++){var r=l[e];t[r]=0}return t}function u(t){function e(){if(!f){f=!0;var e=r.getComputedStyle;if(a=function(){var t=e?function(t){return e(t,null)}:function(t){return t.currentStyle};return function(e){var n=t(e);return n||c("Style returned "+n+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),n}}(),u=t("boxSizing")){var n=document.createElement("div");n.style.width="200px",n.style.padding="1px 2px 3px 4px",n.style.borderStyle="solid",n.style.borderWidth="1px 2px 3px 4px",n.style[u]="border-box";var o=document.body||document.documentElement;o.appendChild(n);var s=a(n);p=200===i(s.width),o.removeChild(n)}}}function n(t){if(e(),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var n=a(t);if("none"===n.display)return s();var r={};r.width=t.offsetWidth,r.height=t.offsetHeight;for(var c=r.isBorderBox=!(!u||!n[u]||"border-box"!==n[u]),f=0,d=l.length;d>f;f++){var h=l[f],m=n[h];m=o(t,m);var v=parseFloat(m);r[h]=isNaN(v)?0:v}var y=r.paddingLeft+r.paddingRight,g=r.paddingTop+r.paddingBottom,E=r.marginLeft+r.marginRight,_=r.marginTop+r.marginBottom,C=r.borderLeftWidth+r.borderRightWidth,R=r.borderTopWidth+r.borderBottomWidth,b=c&&p,N=i(n.width);N!==!1&&(r.width=N+(b?0:y+C));var w=i(n.height);return w!==!1&&(r.height=w+(b?0:g+R)),r.innerWidth=r.width-(y+C),r.innerHeight=r.height-(g+R),r.outerWidth=r.width+E,r.outerHeight=r.height+_,r}}function o(t,e){if(r.getComputedStyle||-1===e.indexOf("%"))return e;var n=t.style,o=n.left,i=t.runtimeStyle,a=i&&i.left;return a&&(i.left=t.currentStyle.left),n.left=e,e=n.pixelLeft,n.left=o,a&&(i.left=a),e}var a,u,p,f=!1;return n}var c="undefined"==typeof console?a:function(t){console.error(t)},l=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define(["get-style-property/get-style-property"],u):"object"==typeof n?e.exports=u(t("desandro-get-style-property")):r.getSize=u(r.getStyleProperty)}(window)},{"desandro-get-style-property":36}],36:[function(t,e,n){!function(t){"use strict";function r(t){if(t){if("string"==typeof i[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=o.length;r>n;n++)if(e=o[n]+t,"string"==typeof i[e])return e}}var o="Webkit Moz ms Ms O".split(" "),i=document.documentElement.style;"function"==typeof define&&define.amd?define(function(){return r}):"object"==typeof n?e.exports=r:t.getStyleProperty=r}(window)},{}],37:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],o):"object"==typeof n?e.exports=o(t("outlayer"),t("get-size"),t("fizzy-ui-utils")):r.Masonry=o(r.Outlayer,r.getSize,r.fizzyUIUtils)}(window,function(t,e,n){"use strict";var r=t.create("masonry");return r.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},r.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],n=t&&t.element;this.columnWidth=n&&e(n).outerWidth||this.containerWidth}var r=this.columnWidth+=this.gutter,o=this.containerWidth+this.gutter,i=o/r,a=r-o%r,s=a&&1>a?"round":"floor";i=Math[s](i),this.cols=Math.max(i,1)},r.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,n=e(t);this.containerWidth=n&&n.innerWidth},r.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,r=e&&1>e?"round":"ceil",o=Math[r](t.size.outerWidth/this.columnWidth);o=Math.min(o,this.cols);for(var i=this._getColGroup(o),a=Math.min.apply(Math,i),s=n.indexOf(i,a),u={x:this.columnWidth*s,y:a},c=a+t.size.outerHeight,l=this.cols+1-i.length,p=0;l>p;p++)this.colYs[s+p]=c;return u},r.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],n=this.cols+1-t,r=0;n>r;r++){var o=this.colYs.slice(r,r+t);e[r]=Math.max.apply(Math,o)}return e},r.prototype._manageStamp=function(t){var n=e(t),r=this._getElementOffset(t),o=this.options.isOriginLeft?r.left:r.right,i=o+n.outerWidth,a=Math.floor(o/this.columnWidth);a=Math.max(0,a);var s=Math.floor(i/this.columnWidth);s-=i%this.columnWidth?0:1,s=Math.min(this.cols-1,s);for(var u=(this.options.isOriginTop?r.top:r.bottom)+n.outerHeight,c=a;s>=c;c++)this.colYs[c]=Math.max(u,this.colYs[c])},r.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},r.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},r.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},r})},{"fizzy-ui-utils":34,"get-size":35,outlayer:42}],38:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(t,e,n,i){return o(r,t,e,n,i)}):"object"==typeof n?e.exports=o(r,t("wolfy87-eventemitter"),t("get-size"),t("desandro-get-style-property"),t("fizzy-ui-utils")):(r.Outlayer={},r.Outlayer.Item=o(r,r.EventEmitter,r.getSize,r.getStyleProperty,r.fizzyUIUtils))}(window,function(t,e,n,r,o){"use strict";function i(t){for(var e in t)return!1;return e=null,!0}function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var s=t.getComputedStyle,u=s?function(t){return s(t,null)}:function(t){return t.currentStyle},c=r("transition"),l=r("transform"),p=c&&l,f=!!r("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[c],h=["transform","transition","transitionDuration","transitionProperty"],m=function(){for(var t={},e=0,n=h.length;n>e;e++){var o=h[e],i=r(o);i&&i!==o&&(t[o]=i)}return t}();o.extend(a.prototype,e.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var n in t){var r=m[n]||n;e[r]=t[n]}},a.prototype.getPosition=function(){var t=u(this.element),e=this.layout.options,n=e.isOriginLeft,r=e.isOriginTop,o=parseInt(t[n?"left":"right"],10),i=parseInt(t[r?"top":"bottom"],10);o=isNaN(o)?0:o,i=isNaN(i)?0:i;var a=this.layout.size;o-=n?a.paddingLeft:a.paddingRight,i-=r?a.paddingTop:a.paddingBottom,this.position.x=o,this.position.y=i},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,n={},r=e.isOriginLeft?"paddingLeft":"paddingRight",o=e.isOriginLeft?"left":"right",i=e.isOriginLeft?"right":"left",a=this.position.x+t[r];a=e.percentPosition&&!e.isHorizontal?a/t.width*100+"%":a+"px",n[o]=a,n[i]="";var s=e.isOriginTop?"paddingTop":"paddingBottom",u=e.isOriginTop?"top":"bottom",c=e.isOriginTop?"bottom":"top",l=this.position.y+t[s];l=e.percentPosition&&e.isHorizontal?l/t.height*100+"%":l+"px",n[u]=l,n[c]="",this.css(n),this.emitEvent("layout",[this])};var v=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var n=this.position.x,r=this.position.y,o=parseInt(t,10),i=parseInt(e,10),a=o===this.position.x&&i===this.position.y;if(this.setPosition(t,e),a&&!this.isTransitioning)return void this.layoutPosition();var s=t-n,u=e-r,c={},l=this.layout.options;s=l.isOriginLeft?s:-s,u=l.isOriginTop?u:-u,c.transform=v(s,u),this.transition({to:c,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=p?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(t);var e=this._transn;for(var n in t.onTransitionEnd)e.onEnd[n]=t.onTransitionEnd[n];for(n in t.to)e.ingProperties[n]=!0,t.isCleaning&&(e.clean[n]=!0);if(t.from){this.css(t.from);var r=this.element.offsetHeight;r=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var y=l&&o.toDashed(l)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:y,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},a.prototype.transition=a.prototype[c?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,n=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[n],i(e.ingProperties)&&this.disableTransition(),n in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[n]),n in e.onEnd){var r=e.onEnd[n];r.call(this),delete e.onEnd[n]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var n in t)e[n]="";this.css(e)};var E={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(E)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!c||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var t=this;this.once("transitionEnd",function(){t.removeElem()}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={},n=this.getHideRevealTransitionEndProperty("visibleStyle");e[n]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},a.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},a.prototype.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var n in e)return n},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={},n=this.getHideRevealTransitionEndProperty("hiddenStyle");e[n]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},a.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a})},{"desandro-get-style-property":39,"fizzy-ui-utils":34,"get-size":35,"wolfy87-eventemitter":41}],39:[function(t,e,n){arguments[4][36][0].apply(n,arguments)},{dup:36}],40:[function(t,e,n){arguments[4][23][0].apply(n,arguments)},{dup:23}],41:[function(t,e,n){arguments[4][24][0].apply(n,arguments)},{dup:24}],42:[function(t,e,n){!function(r,o){"use strict";"function"==typeof define&&define.amd?define(["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(t,e,n,i,a){return o(r,t,e,n,i,a)}):"object"==typeof n?e.exports=o(r,t("eventie"),t("wolfy87-eventemitter"),t("get-size"),t("fizzy-ui-utils"),t("./item")):r.Outlayer=o(r,r.eventie,r.EventEmitter,r.getSize,r.fizzyUIUtils,r.Outlayer.Item)}(window,function(t,e,n,r,o,i){"use strict";function a(t,e){var n=o.getQueryElement(t);if(!n)return void(s&&s.error("Bad element for "+this.constructor.namespace+": "+(n||t)));this.element=n,u&&(this.$element=u(this.element)),this.options=o.extend({},this.constructor.defaults),this.option(e);var r=++l;this.element.outlayerGUID=r,p[r]=this,this._create(),this.options.isInitLayout&&this.layout()}var s=t.console,u=t.jQuery,c=function(){},l=0,p={};return a.namespace="outlayer",a.Item=i,a.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},o.extend(a.prototype,n.prototype),a.prototype.option=function(t){o.extend(this.options,t)},a.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),o.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},a.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},a.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),n=this.constructor.Item,r=[],o=0,i=e.length;i>o;o++){var a=e[o],s=new n(a,this);r.push(s)}return r},a.prototype._filterFindItemElements=function(t){return o.filterFindElements(t,this.options.itemSelector)},a.prototype.getItemElements=function(){for(var t=[],e=0,n=this.items.length;n>e;e++)t.push(this.items[e].element);return t},a.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},a.prototype._init=a.prototype.layout,a.prototype._resetLayout=function(){this.getSize()},a.prototype.getSize=function(){this.size=r(this.element)},a.prototype._getMeasurement=function(t,e){var n,i=this.options[t];i?("string"==typeof i?n=this.element.querySelector(i):o.isElement(i)&&(n=i),this[t]=n?r(n)[e]:i):this[t]=0},a.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},a.prototype._getItemsForLayout=function(t){for(var e=[],n=0,r=t.length;r>n;n++){var o=t[n];o.isIgnored||e.push(o)}return e},a.prototype._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){for(var n=[],r=0,o=t.length;o>r;r++){var i=t[r],a=this._getItemLayoutPosition(i);a.item=i,a.isInstant=e||i.isLayoutInstant,n.push(a)}this._processLayoutQueue(n)}},a.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},a.prototype._processLayoutQueue=function(t){for(var e=0,n=t.length;n>e;e++){var r=t[e];this._positionItem(r.item,r.x,r.y,r.isInstant)}},a.prototype._positionItem=function(t,e,n,r){r?t.goTo(e,n):t.moveTo(e,n)},a.prototype._postLayout=function(){this.resizeContainer()},a.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},a.prototype._getContainerSize=c,a.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var n=this.size;n.isBorderBox&&(t+=e?n.paddingLeft+n.paddingRight+n.borderLeftWidth+n.borderRightWidth:n.paddingBottom+n.paddingTop+n.borderTopWidth+n.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},a.prototype._emitCompleteOnItems=function(t,e){function n(){o.emitEvent(t+"Complete",[e])}function r(){a++,a===i&&n()}var o=this,i=e.length;if(!e||!i)return void n();for(var a=0,s=0,u=e.length;u>s;s++){var c=e[s];c.once(t,r)}},a.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},a.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},a.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.concat(t);for(var e=0,n=t.length;n>e;e++){var r=t[e];this.ignore(r)}}},a.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,n=t.length;n>e;e++){var r=t[e];o.removeFrom(this.stamps,r),this.unignore(r)}},a.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o.makeArray(t)):void 0},a.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var n=this.stamps[t];this._manageStamp(n)}}},a.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},a.prototype._manageStamp=c,a.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,o=r(t),i={left:e.left-n.left-o.marginLeft,top:e.top-n.top-o.marginTop,right:n.right-e.right-o.marginRight,bottom:n.bottom-e.bottom-o.marginBottom};return i},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.bindResize=function(){this.isResizeBound||(e.bind(t,"resize",this),this.isResizeBound=!0)},a.prototype.unbindResize=function(){this.isResizeBound&&e.unbind(t,"resize",this),this.isResizeBound=!1},a.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},a.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},a.prototype.needsResizeLayout=function(){var t=r(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},a.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},a.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},a.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var n=this.items.slice(0);this.items=e.concat(n),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(n)}},a.prototype.reveal=function(t){this._emitCompleteOnItems("reveal",t);for(var e=t&&t.length,n=0;e&&e>n;n++){var r=t[n];r.reveal()}},a.prototype.hide=function(t){this._emitCompleteOnItems("hide",t);for(var e=t&&t.length,n=0;e&&e>n;n++){var r=t[n];r.hide()}},a.prototype.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},a.prototype.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},a.prototype.getItem=function(t){for(var e=0,n=this.items.length;n>e;e++){var r=this.items[e];if(r.element===t)return r}},a.prototype.getItems=function(t){t=o.makeArray(t);for(var e=[],n=0,r=t.length;r>n;n++){var i=t[n],a=this.getItem(i);a&&e.push(a)}return e},a.prototype.remove=function(t){var e=this.getItems(t);if(this._emitCompleteOnItems("remove",e),e&&e.length)for(var n=0,r=e.length;r>n;n++){var i=e[n];i.remove(),o.removeFrom(this.items,i)}},a.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,n=this.items.length;n>e;e++){var r=this.items[e];r.destroy()}this.unbindResize();var o=this.element.outlayerGUID;delete p[o],delete this.element.outlayerGUID,u&&u.removeData(this.element,this.constructor.namespace)},a.data=function(t){t=o.getQueryElement(t);var e=t&&t.outlayerGUID;return e&&p[e]},a.create=function(t,e){function n(){a.apply(this,arguments)}return Object.create?n.prototype=Object.create(a.prototype):o.extend(n.prototype,a.prototype),n.prototype.constructor=n,n.defaults=o.extend({},a.defaults),o.extend(n.defaults,e),n.prototype.settings={},n.namespace=t,n.data=a.data,n.Item=function(){i.apply(this,arguments)},n.Item.prototype=new i,o.htmlInit(n,t),u&&u.bridget&&u.bridget(t,n),n},a.Item=i,a})},{"./item":38,eventie:40,"fizzy-ui-utils":34,"get-size":35,"wolfy87-eventemitter":41}],43:[function(t,e,n){(function(t){(function(){function r(t,e){if(t!==e){var n=t===t,r=e===e;if(t>e||!n||t===w&&r)return 1;if(e>t||!r||e===w&&n)return-1}return 0}function o(t,e,n){for(var r=t.length,o=n?r:-1;n?o--:++o<r;)if(e(t[o],o,t))return o;return-1}function i(t,e,n){if(e!==e)return v(t,n);for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}function a(t){return"function"==typeof t||!1}function s(t){return"string"==typeof t?t:null==t?"":t+""}function u(t){return t.charCodeAt(0)}function c(t,e){for(var n=-1,r=t.length;++n<r&&e.indexOf(t.charAt(n))>-1;);return n}function l(t,e){for(var n=t.length;n--&&e.indexOf(t.charAt(n))>-1;);return n}function p(t,e){return r(t.criteria,e.criteria)||t.index-e.index}function f(t,e,n){for(var o=-1,i=t.criteria,a=e.criteria,s=i.length,u=n.length;++o<s;){var c=r(i[o],a[o]);if(c)return o>=u?c:c*(n[o]?1:-1)}return t.index-e.index}function d(t){return qt[t]}function h(t){return Kt[t]}function m(t){return"\\"+Qt[t]}function v(t,e,n){for(var r=t.length,o=e+(n?0:-1);n?o--:++o<r;){var i=t[o];if(i!==i)return o}return-1}function y(t){return!!t&&"object"==typeof t}function g(t){return 160>=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function E(t,e){for(var n=-1,r=t.length,o=-1,i=[];++n<r;)t[n]===e&&(t[n]=W,i[++o]=n);return i}function _(t,e){for(var n,r=-1,o=t.length,i=-1,a=[];++r<o;){var s=t[r],u=e?e(s,r,t):s;r&&n===u||(n=u,a[++i]=s)}return a}function C(t){for(var e=-1,n=t.length;++e<n&&g(t.charCodeAt(e)););return e}function R(t){for(var e=t.length;e--&&g(t.charCodeAt(e)););return e}function b(t){return Yt[t]}function N(t){function e(t){if(y(t)&&!Os(t)&&!(t instanceof $)){if(t instanceof g)return t;if(Hi.call(t,"__chain__")&&Hi.call(t,"__wrapped__"))return ar(t)}return new g(t)}function n(){}function g(t,e,n){this.__wrapped__=t,this.__actions__=n||[],this.__chain__=!!e}function $(t){this.__wrapped__=t,this.__actions__=null,this.__dir__=1,this.__dropCount__=0,this.__filtered__=!1,this.__iteratees__=null,this.__takeCount__=Ra,this.__views__=null}function et(){var t=this.__actions__,e=this.__iteratees__,n=this.__views__,r=new $(this.__wrapped__);return r.__actions__=t?te(t):null,r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=e?te(e):null,r.__takeCount__=this.__takeCount__,r.__views__=n?te(n):null,r}function rt(){if(this.__filtered__){var t=new $(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function qt(){var t=this.__wrapped__.value();if(!Os(t))return tn(t,this.__actions__);var e=this.__dir__,n=0>e,r=jn(0,t.length,this.__views__),o=r.start,i=r.end,a=i-o,s=n?i:o-1,u=va(a,this.__takeCount__),c=this.__iteratees__,l=c?c.length:0,p=0,f=[];t:for(;a--&&u>p;){s+=e;for(var d=-1,h=t[s];++d<l;){var m=c[d],v=m.iteratee,y=m.type;if(y==B){if(m.done&&(n?s>m.index:s<m.index)&&(m.count=0,m.done=!1),m.index=s,!m.done){var g=m.limit;if(!(m.done=g>-1?m.count++>=g:!v(h)))continue t}}else{var E=v(h);if(y==z)h=E;else if(!E){if(y==F)continue t;break t}}}f[p++]=h}return f}function Kt(){this.__data__={}}function Yt(t){return this.has(t)&&delete this.__data__[t]}function Gt(t){return"__proto__"==t?w:this.__data__[t]}function Qt(t){return"__proto__"!=t&&Hi.call(this.__data__,t)}function Xt(t,e){return"__proto__"!=t&&(this.__data__[t]=e),this}function $t(t){var e=t?t.length:0;for(this.data={hash:fa(null),set:new oa};e--;)this.push(t[e])}function Jt(t,e){var n=t.data,r="string"==typeof e||wo(e)?n.set.has(e):n.hash[e];return r?0:-1}function Zt(t){var e=this.data;"string"==typeof t||wo(t)?e.set.add(t):e.hash[t]=!0}function te(t,e){var n=-1,r=t.length;for(e||(e=xi(r));++n<r;)e[n]=t[n];return e}function ee(t,e){for(var n=-1,r=t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function oe(t,e){for(var n=t.length;n--&&e(t[n],n,t)!==!1;);return t}function ie(t,e){for(var n=-1,r=t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function ae(t,e){for(var n=-1,r=t.length,o=-1,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[++o]=a)}return i}function se(t,e){for(var n=-1,r=t.length,o=xi(r);++n<r;)o[n]=e(t[n],n,t);return o}function ue(t){for(var e=-1,n=t.length,r=Ca;++e<n;){var o=t[e];o>r&&(r=o)}return r}function ce(t){for(var e=-1,n=t.length,r=Ra;++e<n;){var o=t[e];r>o&&(r=o)}return r}function le(t,e,n,r){var o=-1,i=t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function pe(t,e,n,r){var o=t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function fe(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function de(t){for(var e=t.length,n=0;e--;)n+=+t[e]||0;return n}function he(t,e){return t===w?e:t}function me(t,e,n,r){return t!==w&&Hi.call(r,n)?t:e}function ve(t,e,n){var r=Vs(e);ea.apply(r,za(e));for(var o=-1,i=r.length;++o<i;){var a=r[o],s=t[a],u=n(s,e[a],a,t,e);
(u===u?u===s:s!==s)&&(s!==w||a in t)||(t[a]=u)}return t}function ye(t,e){for(var n=-1,r=null==t,o=!r&&Wn(t),i=o&&t.length,a=e.length,s=xi(a);++n<a;){var u=e[n];s[n]=o?qn(u,i)?t[u]:w:r?w:t[u]}return s}function ge(t,e,n){n||(n={});for(var r=-1,o=e.length;++r<o;){var i=e[r];n[i]=t[i]}return n}function Ee(t,e,n){var r=typeof t;return"function"==r?e===w?t:rn(t,e,n):null==t?mi:"object"==r?Ue(t):e===w?Ci(t):Ve(t,e)}function _e(t,e,n,r,o,i,a){var s;if(n&&(s=o?n(t,r,o):n(t)),s!==w)return s;if(!wo(t))return t;var u=Os(t);if(u){if(s=Bn(t),!e)return te(t,s)}else{var c=qi.call(t),l=c==X;if(c!=Z&&c!=q&&(!l||o))return Ht[c]?zn(t,c,e):o?t:{};if(s=Fn(l?{}:t),!e)return Ia(s,t)}i||(i=[]),a||(a=[]);for(var p=i.length;p--;)if(i[p]==t)return a[p];return i.push(t),a.push(s),(u?ee:Me)(t,function(r,o){s[o]=_e(r,e,n,o,t,i,a)}),s}function Ce(t,e,n){if("function"!=typeof t)throw new Ui(H);return ia(function(){t.apply(w,n)},e)}function Re(t,e){var n=t?t.length:0,r=[];if(!n)return r;var o=-1,a=Vn(),s=a==i,u=s&&e.length>=200?Va(e):null,c=e.length;u&&(a=Jt,s=!1,e=u);t:for(;++o<n;){var l=t[o];if(s&&l===l){for(var p=c;p--;)if(e[p]===l)continue t;r.push(l)}else a(e,l,0)<0&&r.push(l)}return r}function be(t,e){var n=!0;return Sa(t,function(t,r,o){return n=!!e(t,r,o)}),n}function Ne(t,e,n,r){var o=t.length;for(n=null==n?0:+n||0,0>n&&(n=-n>o?0:o+n),r=r===w||r>o?o:+r||0,0>r&&(r+=o),o=n>r?0:r>>>0,n>>>=0;o>n;)t[n++]=e;return t}function we(t,e){var n=[];return Sa(t,function(t,r,o){e(t,r,o)&&n.push(t)}),n}function Oe(t,e,n,r){var o;return n(t,function(t,n,i){return e(t,n,i)?(o=r?n:t,!1):void 0}),o}function De(t,e,n){for(var r=-1,o=t.length,i=-1,a=[];++r<o;){var s=t[r];if(y(s)&&Wn(s)&&(n||Os(s)||go(s))){e&&(s=De(s,e,n));for(var u=-1,c=s.length;++u<c;)a[++i]=s[u]}else n||(a[++i]=s)}return a}function xe(t,e){return La(t,e,zo)}function Me(t,e){return La(t,e,Vs)}function Te(t,e){return Aa(t,e,Vs)}function Ie(t,e){for(var n=-1,r=e.length,o=-1,i=[];++n<r;){var a=e[n];xs(t[a])&&(i[++o]=a)}return i}function Pe(t,e,n){if(null!=t){n!==w&&n in or(t)&&(e=[n]);for(var r=-1,o=e.length;null!=t&&++r<o;)t=t[e[r]];return r&&r==o?t:w}}function Se(t,e,n,r,o,i){if(t===e)return!0;var a=typeof t,s=typeof e;return"function"!=a&&"object"!=a&&"function"!=s&&"object"!=s||null==t||null==e?t!==t&&e!==e:ke(t,e,Se,n,r,o,i)}function ke(t,e,n,r,o,i,a){var s=Os(t),u=Os(e),c=K,l=K;s||(c=qi.call(t),c==q?c=Z:c!=Z&&(s=So(t))),u||(l=qi.call(e),l==q?l=Z:l!=Z&&(u=So(e)));var p=c==Z,f=l==Z,d=c==l;if(d&&!s&&!p)return kn(t,e,c);if(!o){var h=p&&Hi.call(t,"__wrapped__"),m=f&&Hi.call(e,"__wrapped__");if(h||m)return n(h?t.value():t,m?e.value():e,r,o,i,a)}if(!d)return!1;i||(i=[]),a||(a=[]);for(var v=i.length;v--;)if(i[v]==t)return a[v]==e;i.push(t),a.push(e);var y=(s?Sn:Ln)(t,e,n,r,o,i,a);return i.pop(),a.pop(),y}function Le(t,e,n,r,o){for(var i=-1,a=e.length,s=!o;++i<a;)if(s&&r[i]?n[i]!==t[e[i]]:!(e[i]in t))return!1;for(i=-1;++i<a;){var u=e[i],c=t[u],l=n[i];if(s&&r[i])var p=c!==w||u in t;else p=o?o(c,l,u):w,p===w&&(p=Se(l,c,o,!0));if(!p)return!1}return!0}function Ae(t,e){var n=-1,r=Wn(t)?xi(t.length):[];return Sa(t,function(t,o,i){r[++n]=e(t,o,i)}),r}function Ue(t){var e=Vs(t),n=e.length;if(!n)return hi(!0);if(1==n){var r=e[0],o=t[r];if(Xn(o))return function(t){return null==t?!1:t[r]===o&&(o!==w||r in or(t))}}for(var i=xi(n),a=xi(n);n--;)o=t[e[n]],i[n]=o,a[n]=Xn(o);return function(t){return null!=t&&Le(or(t),e,i,a)}}function Ve(t,e){var n=Os(t),r=Yn(t)&&Xn(e),o=t+"";return t=ir(t),function(i){if(null==i)return!1;var a=o;if(i=or(i),!(!n&&r||a in i)){if(i=1==t.length?i:Pe(i,Ke(t,0,-1)),null==i)return!1;a=_r(t),i=or(i)}return i[a]===e?e!==w||a in i:Se(e,i[a],null,!0)}}function je(t,e,n,r,o){if(!wo(t))return t;var i=Wn(e)&&(Os(e)||So(e));if(!i){var a=Vs(e);ea.apply(a,za(e))}return ee(a||e,function(s,u){if(a&&(u=s,s=e[u]),y(s))r||(r=[]),o||(o=[]),Be(t,e,u,je,n,r,o);else{var c=t[u],l=n?n(c,s,u,t,e):w,p=l===w;p&&(l=s),!i&&l===w||!p&&(l===l?l===c:c!==c)||(t[u]=l)}}),t}function Be(t,e,n,r,o,i,a){for(var s=i.length,u=e[n];s--;)if(i[s]==u)return void(t[n]=a[s]);var c=t[n],l=o?o(c,u,n,t,e):w,p=l===w;p&&(l=u,Wn(u)&&(Os(u)||So(u))?l=Os(c)?c:Wn(c)?te(c):[]:Ms(u)||go(u)?l=go(c)?Ao(c):Ms(c)?c:{}:p=!1),i.push(u),a.push(l),p?t[n]=r(l,u,o,i,a):(l===l?l!==c:c===c)&&(t[n]=l)}function Fe(t){return function(e){return null==e?w:e[t]}}function ze(t){var e=t+"";return t=ir(t),function(n){return Pe(n,t,e)}}function He(t,e){for(var n=t?e.length:0;n--;){var r=parseFloat(e[n]);if(r!=o&&qn(r)){var o=r;aa.call(t,r,1)}}return t}function We(t,e){return t+Ji(_a()*(e-t+1))}function qe(t,e,n,r,o){return o(t,function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)}),n}function Ke(t,e,n){var r=-1,o=t.length;e=null==e?0:+e||0,0>e&&(e=-e>o?0:o+e),n=n===w||n>o?o:+n||0,0>n&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=xi(o);++r<o;)i[r]=t[r+e];return i}function Ye(t,e){var n;return Sa(t,function(t,r,o){return n=e(t,r,o),!n}),!!n}function Ge(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}function Qe(t,e,n){var r=Un(),o=-1;e=se(e,function(t){return r(t)});var i=Ae(t,function(t){var n=se(e,function(e){return e(t)});return{criteria:n,index:++o,value:t}});return Ge(i,function(t,e){return f(t,e,n)})}function Xe(t,e){var n=0;return Sa(t,function(t,r,o){n+=+e(t,r,o)||0}),n}function $e(t,e){var n=-1,r=Vn(),o=t.length,a=r==i,s=a&&o>=200,u=s?Va():null,c=[];u?(r=Jt,a=!1):(s=!1,u=e?[]:c);t:for(;++n<o;){var l=t[n],p=e?e(l,n,t):l;if(a&&l===l){for(var f=u.length;f--;)if(u[f]===p)continue t;e&&u.push(p),c.push(l)}else r(u,p,0)<0&&((e||s)&&u.push(p),c.push(l))}return c}function Je(t,e){for(var n=-1,r=e.length,o=xi(r);++n<r;)o[n]=t[e[n]];return o}function Ze(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Ke(t,r?0:i,r?i+1:o):Ke(t,r?i+1:0,r?o:i)}function tn(t,e){var n=t;n instanceof $&&(n=n.value());for(var r=-1,o=e.length;++r<o;){var i=[n],a=e[r];ea.apply(i,a.args),n=a.func.apply(a.thisArg,i)}return n}function en(t,e,n){var r=0,o=t?t.length:r;if("number"==typeof e&&e===e&&wa>=o){for(;o>r;){var i=r+o>>>1,a=t[i];(n?e>=a:e>a)?r=i+1:o=i}return o}return nn(t,e,mi,n)}function nn(t,e,n,r){e=n(e);for(var o=0,i=t?t.length:0,a=e!==e,s=e===w;i>o;){var u=Ji((o+i)/2),c=n(t[u]),l=c===c;if(a)var p=l||r;else p=s?l&&(r||c!==w):r?e>=c:e>c;p?o=u+1:i=u}return va(i,Na)}function rn(t,e,n){if("function"!=typeof t)return mi;if(e===w)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,r,o){return t.call(e,n,r,o)};case 4:return function(n,r,o,i){return t.call(e,n,r,o,i)};case 5:return function(n,r,o,i,a){return t.call(e,n,r,o,i,a)}}return function(){return t.apply(e,arguments)}}function on(t){return Qi.call(t,0)}function an(t,e,n){for(var r=n.length,o=-1,i=ma(t.length-r,0),a=-1,s=e.length,u=xi(i+s);++a<s;)u[a]=e[a];for(;++o<r;)u[n[o]]=t[o];for(;i--;)u[a++]=t[o++];return u}function sn(t,e,n){for(var r=-1,o=n.length,i=-1,a=ma(t.length-o,0),s=-1,u=e.length,c=xi(a+u);++i<a;)c[i]=t[i];for(var l=i;++s<u;)c[l+s]=e[s];for(;++r<o;)c[l+n[r]]=t[i++];return c}function un(t,e){return function(n,r,o){var i=e?e():{};if(r=Un(r,o,3),Os(n))for(var a=-1,s=n.length;++a<s;){var u=n[a];t(i,u,r(u,a,n),n)}else Sa(n,function(e,n,o){t(i,e,r(e,n,o),o)});return i}}function cn(t){return po(function(e,n){var r=-1,o=null==e?0:n.length,i=o>2&&n[o-2],a=o>2&&n[2],s=o>1&&n[o-1];for("function"==typeof i?(i=rn(i,s,5),o-=2):(i="function"==typeof s?s:null,o-=i?1:0),a&&Kn(n[0],n[1],a)&&(i=3>o?null:i,o=1);++r<o;){var u=n[r];u&&t(e,u,i)}return e})}function ln(t,e){return function(n,r){var o=n?Fa(n):0;if(!Qn(o))return t(n,r);for(var i=e?o:-1,a=or(n);(e?i--:++i<o)&&r(a[i],i,a)!==!1;);return n}}function pn(t){return function(e,n,r){for(var o=or(e),i=r(e),a=i.length,s=t?a:-1;t?s--:++s<a;){var u=i[s];if(n(o[u],u,o)===!1)break}return e}}function fn(t,e){function n(){var o=this&&this!==ne&&this instanceof n?r:t;return o.apply(e,arguments)}var r=hn(t);return n}function dn(t){return function(e){for(var n=-1,r=fi(Jo(e)),o=r.length,i="";++n<o;)i=t(i,r[n],n);return i}}function hn(t){return function(){var e=Pa(t.prototype),n=t.apply(e,arguments);return wo(n)?n:e}}function mn(t){function e(n,r,o){o&&Kn(n,r,o)&&(r=null);var i=Pn(n,t,null,null,null,null,null,r);return i.placeholder=e.placeholder,i}return e}function vn(t,e){return function(n,r,o){o&&Kn(n,r,o)&&(r=null);var i=Un(),a=null==r;if(i===Ee&&a||(a=!1,r=i(r,o,3)),a){var s=Os(n);if(s||!Po(n))return t(s?n:rr(n));r=u}return An(n,r,e)}}function yn(t,e){return function(n,r,i){if(r=Un(r,i,3),Os(n)){var a=o(n,r,e);return a>-1?n[a]:w}return Oe(n,r,t)}}function gn(t){return function(e,n,r){return e&&e.length?(n=Un(n,r,3),o(e,n,t)):-1}}function En(t){return function(e,n,r){return n=Un(n,r,3),Oe(e,n,t,!0)}}function _n(t){return function(){var e=arguments.length;if(!e)return function(){return arguments[0]};for(var n,r=t?e:-1,o=0,i=xi(e);t?r--:++r<e;){var a=i[o++]=arguments[r];if("function"!=typeof a)throw new Ui(H);var s=n?"":Ba(a);n="wrapper"==s?new g([]):n}for(r=n?-1:e;++r<e;){a=i[r],s=Ba(a);var u="wrapper"==s?ja(a):null;n=u&&Gn(u[0])&&u[1]==(k|T|P|L)&&!u[4].length&&1==u[9]?n[Ba(u[0])].apply(n,u[3]):1==a.length&&Gn(a)?n[s]():n.thru(a)}return function(){var t=arguments;if(n&&1==t.length&&Os(t[0]))return n.plant(t[0]).value();for(var r=0,o=i[r].apply(this,t);++r<e;)o=i[r].call(this,o);return o}}}function Cn(t,e){return function(n,r,o){return"function"==typeof r&&o===w&&Os(n)?t(n,r):e(n,rn(r,o,3))}}function Rn(t){return function(e,n,r){return("function"!=typeof n||r!==w)&&(n=rn(n,r,3)),t(e,n,zo)}}function bn(t){return function(e,n,r){return("function"!=typeof n||r!==w)&&(n=rn(n,r,3)),t(e,n)}}function Nn(t){return function(e,n,r){var o={};return n=Un(n,r,3),Me(e,function(e,r,i){var a=n(e,r,i);r=t?a:r,e=t?e:a,o[r]=e}),o}}function wn(t){return function(e,n,r){return e=s(e),(t?e:"")+Mn(e,n,r)+(t?"":e)}}function On(t){var e=po(function(n,r){var o=E(r,e.placeholder);return Pn(n,t,null,r,o)});return e}function Dn(t,e){return function(n,r,o,i){var a=arguments.length<3;return"function"==typeof r&&i===w&&Os(n)?t(n,r,o,a):qe(n,Un(r,i,4),o,a,e)}}function xn(t,e,n,r,o,i,a,s,u,c){function l(){for(var _=arguments.length,C=_,R=xi(_);C--;)R[C]=arguments[C];if(r&&(R=an(R,r,o)),i&&(R=sn(R,i,a)),h||v){var b=l.placeholder,N=E(R,b);if(_-=N.length,c>_){var O=s?te(s):null,M=ma(c-_,0),T=h?N:null,I=h?null:N,k=h?R:null,L=h?null:R;e|=h?P:S,e&=~(h?S:P),m||(e&=~(D|x));var A=[t,e,n,k,T,L,I,O,u,M],U=xn.apply(w,A);return Gn(t)&&Ha(U,A),U.placeholder=b,U}}var V=f?n:this;d&&(t=V[g]),s&&(R=tr(R,s)),p&&u<R.length&&(R.length=u);var j=this&&this!==ne&&this instanceof l?y||hn(t):t;return j.apply(V,R)}var p=e&k,f=e&D,d=e&x,h=e&T,m=e&M,v=e&I,y=!d&&hn(t),g=t;return l}function Mn(t,e,n){var r=t.length;if(e=+e,r>=e||!da(e))return"";var o=e-r;return n=null==n?" ":n+"",oi(n,Xi(o/n.length)).slice(0,o)}function Tn(t,e,n,r){function o(){for(var e=-1,s=arguments.length,u=-1,c=r.length,l=xi(s+c);++u<c;)l[u]=r[u];for(;s--;)l[u++]=arguments[++e];var p=this&&this!==ne&&this instanceof o?a:t;return p.apply(i?n:this,l)}var i=e&D,a=hn(t);return o}function In(t){return function(e,n,r,o){var i=Un(r);return i===Ee&&null==r?en(e,n,t):nn(e,n,i(r,o,1),t)}}function Pn(t,e,n,r,o,i,a,s){var u=e&x;if(!u&&"function"!=typeof t)throw new Ui(H);var c=r?r.length:0;if(c||(e&=~(P|S),r=o=null),c-=o?o.length:0,e&S){var l=r,p=o;r=o=null}var f=u?null:ja(t),d=[t,e,n,r,o,l,p,i,a,s];if(f&&($n(d,f),e=d[1],s=d[9]),d[9]=null==s?u?0:t.length:ma(s-c,0)||0,e==D)var h=fn(d[0],d[2]);else h=e!=P&&e!=(D|P)||d[4].length?xn.apply(w,d):Tn.apply(w,d);var m=f?Ua:Ha;return m(h,d)}function Sn(t,e,n,r,o,i,a){var s=-1,u=t.length,c=e.length,l=!0;if(u!=c&&!(o&&c>u))return!1;for(;l&&++s<u;){var p=t[s],f=e[s];if(l=w,r&&(l=o?r(f,p,s):r(p,f,s)),l===w)if(o)for(var d=c;d--&&(f=e[d],!(l=p&&p===f||n(p,f,r,o,i,a))););else l=p&&p===f||n(p,f,r,o,i,a)}return!!l}function kn(t,e,n){switch(n){case Y:case G:return+t==+e;case Q:return t.name==e.name&&t.message==e.message;case J:return t!=+t?e!=+e:t==+e;case tt:case nt:return t==e+""}return!1}function Ln(t,e,n,r,o,i,a){var s=Vs(t),u=s.length,c=Vs(e),l=c.length;if(u!=l&&!o)return!1;for(var p=o,f=-1;++f<u;){var d=s[f],h=o?d in e:Hi.call(e,d);if(h){var m=t[d],v=e[d];h=w,r&&(h=o?r(v,m,d):r(m,v,d)),h===w&&(h=m&&m===v||n(m,v,r,o,i,a))}if(!h)return!1;p||(p="constructor"==d)}if(!p){var y=t.constructor,g=e.constructor;if(y!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g))return!1}return!0}function An(t,e,n){var r=n?Ra:Ca,o=r,i=o;return Sa(t,function(t,a,s){var u=e(t,a,s);((n?o>u:u>o)||u===r&&u===i)&&(o=u,i=t)}),i}function Un(t,n,r){var o=e.callback||di;return o=o===di?Ee:o,r?o(t,n,r):o}function Vn(t,n,r){var o=e.indexOf||yr;return o=o===yr?i:o,t?o(t,n,r):o}function jn(t,e,n){for(var r=-1,o=n?n.length:0;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=va(e,t+a);break;case"takeRight":t=ma(t,e-a)}}return{start:t,end:e}}function Bn(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Hi.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Fn(t){var e=t.constructor;return"function"==typeof e&&e instanceof e||(e=ki),new e}function zn(t,e,n){var r=t.constructor;switch(e){case ot:return on(t);case Y:case G:return new r(+t);case it:case at:case st:case ut:case ct:case lt:case pt:case ft:case dt:var o=t.buffer;return new r(n?on(o):o,t.byteOffset,t.length);case J:case nt:return new r(t);case tt:var i=new r(t.source,Pt.exec(t));i.lastIndex=t.lastIndex}return i}function Hn(t,e,n){null==t||Yn(e,t)||(e=ir(e),t=1==e.length?t:Pe(t,Ke(e,0,-1)),e=_r(e));var r=null==t?t:t[e];return null==r?w:r.apply(t,n)}function Wn(t){return null!=t&&Qn(Fa(t))}function qn(t,e){return t=+t,e=null==e?Da:e,t>-1&&t%1==0&&e>t}function Kn(t,e,n){if(!wo(n))return!1;var r=typeof e;if("number"==r?Wn(n)&&qn(e,n.length):"string"==r&&e in n){var o=n[e];return t===t?t===o:o!==o}return!1}function Yn(t,e){var n=typeof t;if("string"==n&&wt.test(t)||"number"==n)return!0;if(Os(t))return!1;var r=!Nt.test(t);return r||null!=e&&t in or(e)}function Gn(t){var n=Ba(t);return!!n&&t===e[n]&&n in $.prototype}function Qn(t){return"number"==typeof t&&t>-1&&t%1==0&&Da>=t}function Xn(t){return t===t&&!wo(t)}function $n(t,e){var n=t[1],r=e[1],o=n|r,i=k>o,a=r==k&&n==T||r==k&&n==L&&t[7].length<=e[8]||r==(k|L)&&n==T;if(!i&&!a)return t;r&D&&(t[2]=e[2],o|=n&D?0:M);var s=e[3];if(s){var u=t[3];t[3]=u?an(u,s,e[4]):te(s),t[4]=u?E(t[3],W):te(e[4])}return s=e[5],s&&(u=t[5],t[5]=u?sn(u,s,e[6]):te(s),t[6]=u?E(t[5],W):te(e[6])),s=e[7],s&&(t[7]=te(s)),r&k&&(t[8]=null==t[8]?e[8]:va(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o,t}function Jn(t,e){t=or(t);for(var n=-1,r=e.length,o={};++n<r;){var i=e[n];i in t&&(o[i]=t[i])}return o}function Zn(t,e){var n={};return xe(t,function(t,r,o){e(t,r,o)&&(n[r]=t)}),n}function tr(t,e){for(var n=t.length,r=va(e.length,n),o=te(t);r--;){var i=e[r];t[r]=qn(i,n)?o[i]:w}return t}function er(t){{var n;e.support}if(!y(t)||qi.call(t)!=Z||!Hi.call(t,"constructor")&&(n=t.constructor,"function"==typeof n&&!(n instanceof n)))return!1;var r;return xe(t,function(t,e){r=e}),r===w||Hi.call(t,r)}function nr(t){for(var n=zo(t),r=n.length,o=r&&t.length,i=e.support,a=o&&Qn(o)&&(Os(t)||i.nonEnumArgs&&go(t)),s=-1,u=[];++s<r;){var c=n[s];(a&&qn(c,o)||Hi.call(t,c))&&u.push(c)}return u}function rr(t){return null==t?[]:Wn(t)?wo(t)?t:ki(t):Yo(t)}function or(t){return wo(t)?t:ki(t)}function ir(t){if(Os(t))return t;var e=[];return s(t).replace(Ot,function(t,n,r,o){e.push(r?o.replace(Tt,"$1"):n||t)}),e}function ar(t){return t instanceof $?t.clone():new g(t.__wrapped__,t.__chain__,te(t.__actions__))}function sr(t,e,n){e=(n?Kn(t,e,n):null==e)?1:ma(+e||1,1);for(var r=0,o=t?t.length:0,i=-1,a=xi(Xi(o/e));o>r;)a[++i]=Ke(t,r,r+=e);return a}function ur(t){for(var e=-1,n=t?t.length:0,r=-1,o=[];++e<n;){var i=t[e];i&&(o[++r]=i)}return o}function cr(t,e,n){var r=t?t.length:0;return r?((n?Kn(t,e,n):null==e)&&(e=1),Ke(t,0>e?0:e)):[]}function lr(t,e,n){var r=t?t.length:0;return r?((n?Kn(t,e,n):null==e)&&(e=1),e=r-(+e||0),Ke(t,0,0>e?0:e)):[]}function pr(t,e,n){return t&&t.length?Ze(t,Un(e,n,3),!0,!0):[]}function fr(t,e,n){return t&&t.length?Ze(t,Un(e,n,3),!0):[]}function dr(t,e,n,r){var o=t?t.length:0;return o?(n&&"number"!=typeof n&&Kn(t,e,n)&&(n=0,r=o),Ne(t,e,n,r)):[]}function hr(t){return t?t[0]:w}function mr(t,e,n){var r=t?t.length:0;return n&&Kn(t,e,n)&&(e=!1),r?De(t,e):[]}function vr(t){var e=t?t.length:0;return e?De(t,!0):[]}function yr(t,e,n){var r=t?t.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?ma(r+n,0):n;else if(n){var o=en(t,e),a=t[o];return(e===e?e===a:a!==a)?o:-1}return i(t,e,n||0)}function gr(t){return lr(t,1)}function Er(){for(var t=[],e=-1,n=arguments.length,r=[],o=Vn(),a=o==i,s=[];++e<n;){var u=arguments[e];Wn(u)&&(t.push(u),r.push(a&&u.length>=120?Va(e&&u):null))}if(n=t.length,2>n)return s;var c=t[0],l=-1,p=c?c.length:0,f=r[0];t:for(;++l<p;)if(u=c[l],(f?Jt(f,u):o(s,u,0))<0){for(e=n;--e;){var d=r[e];if((d?Jt(d,u):o(t[e],u,0))<0)continue t}f&&f.push(u),s.push(u)}return s}function _r(t){var e=t?t.length:0;return e?t[e-1]:w}function Cr(t,e,n){var r=t?t.length:0;if(!r)return-1;var o=r;if("number"==typeof n)o=(0>n?ma(r+n,0):va(n||0,r-1))+1;else if(n){o=en(t,e,!0)-1;var i=t[o];return(e===e?e===i:i!==i)?o:-1}if(e!==e)return v(t,o,!0);for(;o--;)if(t[o]===e)return o;return-1}function Rr(){var t=arguments,e=t[0];if(!e||!e.length)return e;for(var n=0,r=Vn(),o=t.length;++n<o;)for(var i=0,a=t[n];(i=r(e,a,i))>-1;)aa.call(e,i,1);return e}function br(t,e,n){var r=[];if(!t||!t.length)return r;var o=-1,i=[],a=t.length;for(e=Un(e,n,3);++o<a;){var s=t[o];e(s,o,t)&&(r.push(s),i.push(o))}return He(t,i),r}function Nr(t){return cr(t,1)}function wr(t,e,n){var r=t?t.length:0;return r?(n&&"number"!=typeof n&&Kn(t,e,n)&&(e=0,n=r),Ke(t,e,n)):[]}function Or(t,e,n){var r=t?t.length:0;return r?((n?Kn(t,e,n):null==e)&&(e=1),Ke(t,0,0>e?0:e)):[]}function Dr(t,e,n){var r=t?t.length:0;return r?((n?Kn(t,e,n):null==e)&&(e=1),e=r-(+e||0),Ke(t,0>e?0:e)):[]}function xr(t,e,n){return t&&t.length?Ze(t,Un(e,n,3),!1,!0):[]}function Mr(t,e,n){return t&&t.length?Ze(t,Un(e,n,3)):[]}function Tr(t,e,n,r){var o=t?t.length:0;if(!o)return[];null!=e&&"boolean"!=typeof e&&(r=n,n=Kn(t,e,r)?null:e,e=!1);var a=Un();return(a!==Ee||null!=n)&&(n=a(n,r,3)),e&&Vn()==i?_(t,n):$e(t,n)}function Ir(t){if(!t||!t.length)return[];var e=-1,n=0;t=ae(t,function(t){return Wn(t)?(n=ma(t.length,n),!0):void 0});for(var r=xi(n);++e<n;)r[e]=se(t,Fe(e));return r}function Pr(t,e,n){var r=t?t.length:0;if(!r)return[];var o=Ir(t);return null==e?o:(e=rn(e,n,4),se(o,function(t){return le(t,e,w,!0)}))}function Sr(){for(var t=-1,e=arguments.length;++t<e;){var n=arguments[t];if(Wn(n))var r=r?Re(r,n).concat(Re(n,r)):n}return r?$e(r):[]}function kr(t,e){var n=-1,r=t?t.length:0,o={};for(!r||e||Os(t[0])||(e=[]);++n<r;){var i=t[n];e?o[i]=e[n]:i&&(o[i[0]]=i[1])}return o}function Lr(t){var n=e(t);return n.__chain__=!0,n}function Ar(t,e,n){return e.call(n,t),t}function Ur(t,e,n){return e.call(n,t)}function Vr(){return Lr(this)}function jr(){return new g(this.value(),this.__chain__)}function Br(t){for(var e,r=this;r instanceof n;){var o=ar(r);e?i.__wrapped__=o:e=o;var i=o;r=r.__wrapped__}return i.__wrapped__=t,e}function Fr(){var t=this.__wrapped__;return t instanceof $?(this.__actions__.length&&(t=new $(this)),new g(t.reverse(),this.__chain__)):this.thru(function(t){return t.reverse()})}function zr(){return this.value()+""}function Hr(){return tn(this.__wrapped__,this.__actions__)}function Wr(t,e,n){var r=Os(t)?ie:be;return n&&Kn(t,e,n)&&(e=null),("function"!=typeof e||n!==w)&&(e=Un(e,n,3)),r(t,e)}function qr(t,e,n){var r=Os(t)?ae:we;return e=Un(e,n,3),r(t,e)}function Kr(t,e){return ns(t,Ue(e))}function Yr(t,e,n,r){var o=t?Fa(t):0;return Qn(o)||(t=Yo(t),o=t.length),o?(n="number"!=typeof n||r&&Kn(e,n,r)?0:0>n?ma(o+n,0):n||0,"string"==typeof t||!Os(t)&&Po(t)?o>n&&t.indexOf(e,n)>-1:Vn(t,e,n)>-1):!1}function Gr(t,e,n){var r=Os(t)?se:Ae;return e=Un(e,n,3),r(t,e)}function Qr(t,e){return Gr(t,Ci(e))}function Xr(t,e,n){var r=Os(t)?ae:we;return e=Un(e,n,3),r(t,function(t,n,r){return!e(t,n,r)})}function $r(t,e,n){if(n?Kn(t,e,n):null==e){t=rr(t);var r=t.length;return r>0?t[We(0,r-1)]:w}var o=Jr(t);return o.length=va(0>e?0:+e||0,o.length),o}function Jr(t){t=rr(t);for(var e=-1,n=t.length,r=xi(n);++e<n;){var o=We(0,e);e!=o&&(r[e]=r[o]),r[o]=t[e]}return r}function Zr(t){var e=t?Fa(t):0;return Qn(e)?e:Vs(t).length}function to(t,e,n){var r=Os(t)?fe:Ye;return n&&Kn(t,e,n)&&(e=null),("function"!=typeof e||n!==w)&&(e=Un(e,n,3)),r(t,e)}function eo(t,e,n){if(null==t)return[];n&&Kn(t,e,n)&&(e=null);var r=-1;e=Un(e,n,3);var o=Ae(t,function(t,n,o){return{criteria:e(t,n,o),index:++r,value:t}});return Ge(o,p)}function no(t,e,n,r){return null==t?[]:(r&&Kn(e,n,r)&&(n=null),Os(e)||(e=null==e?[]:[e]),Os(n)||(n=null==n?[]:[n]),Qe(t,e,n))}function ro(t,e){return qr(t,Ue(e))}function oo(t,e){if("function"!=typeof e){if("function"!=typeof t)throw new Ui(H);var n=t;t=e,e=n}return t=da(t=+t)?t:0,function(){return--t<1?e.apply(this,arguments):void 0}}function io(t,e,n){return n&&Kn(t,e,n)&&(e=null),e=t&&null==e?t.length:ma(+e||0,0),Pn(t,k,null,null,null,null,e)}function ao(t,e){var n;if("function"!=typeof e){if("function"!=typeof t)throw new Ui(H);var r=t;t=e,e=r}return function(){return--t>0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}}function so(t,e,n){function r(){f&&$i(f),u&&$i(u),u=f=d=w}function o(){var n=e-(ds()-l);if(0>=n||n>e){u&&$i(u);var r=d;u=f=d=w,r&&(h=ds(),c=t.apply(p,s),f||u||(s=p=null))}else f=ia(o,n)}function i(){f&&$i(f),u=f=d=w,(v||m!==e)&&(h=ds(),c=t.apply(p,s),f||u||(s=p=null))}function a(){if(s=arguments,l=ds(),p=this,d=v&&(f||!y),m===!1)var n=y&&!f;else{u||y||(h=l);var r=m-(l-h),a=0>=r||r>m;a?(u&&(u=$i(u)),h=l,c=t.apply(p,s)):u||(u=ia(i,r))}return a&&f?f=$i(f):f||e===m||(f=ia(o,e)),n&&(a=!0,c=t.apply(p,s)),!a||f||u||(s=p=null),c}var s,u,c,l,p,f,d,h=0,m=!1,v=!0;if("function"!=typeof t)throw new Ui(H);if(e=0>e?0:+e||0,n===!0){var y=!0;v=!1}else wo(n)&&(y=n.leading,m="maxWait"in n&&ma(+n.maxWait||0,e),v="trailing"in n?n.trailing:v);return a.cancel=r,a}function uo(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new Ui(H);var n=function(){var r=arguments,o=n.cache,i=e?e.apply(this,r):r[0];if(o.has(i))return o.get(i);var a=t.apply(this,r);return o.set(i,a),a};return n.cache=new uo.Cache,n}function co(t){if("function"!=typeof t)throw new Ui(H);return function(){return!t.apply(this,arguments)}}function lo(t){return ao(2,t)}function po(t,e){if("function"!=typeof t)throw new Ui(H);return e=ma(e===w?t.length-1:+e||0,0),function(){for(var n=arguments,r=-1,o=ma(n.length-e,0),i=xi(o);++r<o;)i[r]=n[e+r];switch(e){case 0:return t.call(this,i);case 1:return t.call(this,n[0],i);case 2:return t.call(this,n[0],n[1],i)}var a=xi(e+1);for(r=-1;++r<e;)a[r]=n[r];return a[e]=i,t.apply(this,a)}}function fo(t){if("function"!=typeof t)throw new Ui(H);return function(e){return t.apply(this,e)}}function ho(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new Ui(H);return n===!1?r=!1:wo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Wt.leading=r,Wt.maxWait=+e,Wt.trailing=o,so(t,e,Wt)}function mo(t,e){return e=null==e?mi:e,Pn(e,P,null,[t],[])}function vo(t,e,n,r){return e&&"boolean"!=typeof e&&Kn(t,e,n)?e=!1:"function"==typeof e&&(r=n,n=e,e=!1),n="function"==typeof n&&rn(n,r,1),_e(t,e,n)}function yo(t,e,n){return e="function"==typeof e&&rn(e,n,1),_e(t,!0,e)}function go(t){return y(t)&&Wn(t)&&qi.call(t)==q}function Eo(t){return t===!0||t===!1||y(t)&&qi.call(t)==Y}function _o(t){return y(t)&&qi.call(t)==G}function Co(t){return!!t&&1===t.nodeType&&y(t)&&qi.call(t).indexOf("Element")>-1}function Ro(t){return null==t?!0:Wn(t)&&(Os(t)||Po(t)||go(t)||y(t)&&xs(t.splice))?!t.length:!Vs(t).length}function bo(t,e,n,r){if(n="function"==typeof n&&rn(n,r,3),!n&&Xn(t)&&Xn(e))return t===e;var o=n?n(t,e):w;return o===w?Se(t,e,n):!!o}function No(t){return y(t)&&"string"==typeof t.message&&qi.call(t)==Q}function wo(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function Oo(t,e,n,r){var o=Vs(e),i=o.length;if(!i)return!0;if(null==t)return!1;if(n="function"==typeof n&&rn(n,r,3),t=or(t),!n&&1==i){var a=o[0],s=e[a];if(Xn(s))return s===t[a]&&(s!==w||a in t)}for(var u=xi(i),c=xi(i);i--;)s=u[i]=e[o[i]],c[i]=Xn(s);return Le(t,o,u,c,n)}function Do(t){return To(t)&&t!=+t}function xo(t){return null==t?!1:qi.call(t)==X?Yi.test(zi.call(t)):y(t)&&kt.test(t)}function Mo(t){return null===t}function To(t){return"number"==typeof t||y(t)&&qi.call(t)==J}function Io(t){return y(t)&&qi.call(t)==tt}function Po(t){return"string"==typeof t||y(t)&&qi.call(t)==nt}function So(t){return y(t)&&Qn(t.length)&&!!zt[qi.call(t)]}function ko(t){return t===w}function Lo(t){var e=t?Fa(t):0;return Qn(e)?e?te(t):[]:Yo(t)}function Ao(t){return ge(t,zo(t))}function Uo(t,e,n){var r=Pa(t);return n&&Kn(t,e,n)&&(e=null),e?Ia(r,e):r}function Vo(t){return Ie(t,zo(t))}function jo(t,e,n){var r=null==t?w:Pe(t,ir(e),e+"");return r===w?n:r}function Bo(t,e){if(null==t)return!1;var n=Hi.call(t,e);return n||Yn(e)||(e=ir(e),t=1==e.length?t:Pe(t,Ke(e,0,-1)),e=_r(e),n=null!=t&&Hi.call(t,e)),n}function Fo(t,e,n){n&&Kn(t,e,n)&&(e=null);for(var r=-1,o=Vs(t),i=o.length,a={};++r<i;){var s=o[r],u=t[s];e?Hi.call(a,u)?a[u].push(s):a[u]=[s]:a[u]=s}return a}function zo(t){if(null==t)return[];wo(t)||(t=ki(t));var e=t.length;e=e&&Qn(e)&&(Os(t)||Ta.nonEnumArgs&&go(t))&&e||0;for(var n=t.constructor,r=-1,o="function"==typeof n&&n.prototype===t,i=xi(e),a=e>0;++r<e;)i[r]=r+"";for(var s in t)a&&qn(s,e)||"constructor"==s&&(o||!Hi.call(t,s))||i.push(s);return i}function Ho(t){for(var e=-1,n=Vs(t),r=n.length,o=xi(r);++e<r;){var i=n[e];o[e]=[i,t[i]]}return o}function Wo(t,e,n){var r=null==t?w:t[e];return r===w&&(null==t||Yn(e,t)||(e=ir(e),t=1==e.length?t:Pe(t,Ke(e,0,-1)),r=null==t?w:t[_r(e)]),r=r===w?n:r),xs(r)?r.call(t):r}function qo(t,e,n){if(null==t)return t;var r=e+"";e=null!=t[r]||Yn(e,t)?[r]:ir(e);for(var o=-1,i=e.length,a=i-1,s=t;null!=s&&++o<i;){var u=e[o];wo(s)&&(o==a?s[u]=n:null==s[u]&&(s[u]=qn(e[o+1])?[]:{})),s=s[u]}return t}function Ko(t,e,n,r){var o=Os(t)||So(t);if(e=Un(e,r,4),null==n)if(o||wo(t)){var i=t.constructor;n=o?Os(t)?new i:[]:Pa(xs(i)&&i.prototype)}else n={};return(o?ee:Me)(t,function(t,r,o){return e(n,t,r,o)}),n}function Yo(t){return Je(t,Vs(t))}function Go(t){return Je(t,zo(t))}function Qo(t,e,n){return e=+e||0,"undefined"==typeof n?(n=e,e=0):n=+n||0,t>=va(e,n)&&t<ma(e,n)}function Xo(t,e,n){n&&Kn(t,e,n)&&(e=n=null);var r=null==t,o=null==e;if(null==n&&(o&&"boolean"==typeof t?(n=t,t=1):"boolean"==typeof e&&(n=e,o=!0)),r&&o&&(e=1,o=!1),t=+t||0,o?(e=t,t=0):e=+e||0,n||t%1||e%1){var i=_a();return va(t+i*(e-t+parseFloat("1e-"+((i+"").length-1))),e)}return We(t,e)}function $o(t){return t=s(t),t&&t.charAt(0).toUpperCase()+t.slice(1)}function Jo(t){return t=s(t),t&&t.replace(Lt,d).replace(Mt,"")}function Zo(t,e,n){t=s(t),e+="";var r=t.length;return n=n===w?r:va(0>n?0:+n||0,r),n-=e.length,n>=0&&t.indexOf(e,n)==n}function ti(t){return t=s(t),t&&_t.test(t)?t.replace(gt,h):t}function ei(t){return t=s(t),t&&xt.test(t)?t.replace(Dt,"\\$&"):t}function ni(t,e,n){t=s(t),e=+e;var r=t.length;if(r>=e||!da(e))return t;var o=(e-r)/2,i=Ji(o),a=Xi(o);return n=Mn("",a,n),n.slice(0,i)+t+n}function ri(t,e,n){return n&&Kn(t,e,n)&&(e=0),Ea(t,e)}function oi(t,e){var n="";if(t=s(t),e=+e,1>e||!t||!da(e))return n;do e%2&&(n+=t),e=Ji(e/2),t+=t;while(e);return n}function ii(t,e,n){return t=s(t),n=null==n?0:va(0>n?0:+n||0,t.length),t.lastIndexOf(e,n)==n}function ai(t,n,r){var o=e.templateSettings;r&&Kn(t,n,r)&&(n=r=null),t=s(t),n=ve(Ia({},r||n),o,me);var i,a,u=ve(Ia({},n.imports),o.imports,me),c=Vs(u),l=Je(u,c),p=0,f=n.interpolate||At,d="__p += '",h=Li((n.escape||At).source+"|"+f.source+"|"+(f===bt?It:At).source+"|"+(n.evaluate||At).source+"|$","g"),v="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++Ft+"]")+"\n";t.replace(h,function(e,n,r,o,s,u){return r||(r=o),d+=t.slice(p,u).replace(Ut,m),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),p=u+e.length,e}),d+="';\n";var y=n.variable;y||(d="with (obj) {\n"+d+"\n}\n"),d=(a?d.replace(ht,""):d).replace(mt,"$1").replace(vt,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=Xs(function(){return Ii(c,v+"return "+d).apply(w,l)});if(g.source=d,No(g))throw g;return g}function si(t,e,n){var r=t;return(t=s(t))?(n?Kn(r,e,n):null==e)?t.slice(C(t),R(t)+1):(e+="",t.slice(c(t,e),l(t,e)+1)):t}function ui(t,e,n){var r=t;return t=s(t),t?t.slice((n?Kn(r,e,n):null==e)?C(t):c(t,e+"")):t}function ci(t,e,n){var r=t;return t=s(t),t?(n?Kn(r,e,n):null==e)?t.slice(0,R(t)+1):t.slice(0,l(t,e+"")+1):t}function li(t,e,n){n&&Kn(t,e,n)&&(e=null);var r=A,o=U;if(null!=e)if(wo(e)){var i="separator"in e?e.separator:i;r="length"in e?+e.length||0:r,o="omission"in e?s(e.omission):o}else r=+e||0;if(t=s(t),r>=t.length)return t;var a=r-o.length;if(1>a)return o;var u=t.slice(0,a);if(null==i)return u+o;if(Io(i)){if(t.slice(a).search(i)){var c,l,p=t.slice(0,a);for(i.global||(i=Li(i.source,(Pt.exec(i)||"")+"g")),i.lastIndex=0;c=i.exec(p);)l=c.index;u=u.slice(0,null==l?a:l)}}else if(t.indexOf(i,a)!=a){var f=u.lastIndexOf(i);f>-1&&(u=u.slice(0,f))}return u+o}function pi(t){return t=s(t),t&&Et.test(t)?t.replace(yt,b):t}function fi(t,e,n){return n&&Kn(t,e,n)&&(e=null),t=s(t),t.match(e||Vt)||[]}function di(t,e,n){return n&&Kn(t,e,n)&&(e=null),y(t)?vi(t):Ee(t,e)}function hi(t){return function(){return t}}function mi(t){return t}function vi(t){return Ue(_e(t,!0))}function yi(t,e){return Ve(t,_e(e,!0))}function gi(t,e,n){if(null==n){var r=wo(e),o=r&&Vs(e),i=o&&o.length&&Ie(e,o);(i?i.length:r)||(i=!1,n=e,e=t,t=this)}i||(i=Ie(e,Vs(e)));var a=!0,s=-1,u=xs(t),c=i.length;n===!1?a=!1:wo(n)&&"chain"in n&&(a=n.chain);for(;++s<c;){var l=i[s],p=e[l];t[l]=p,u&&(t.prototype[l]=function(e){return function(){var n=this.__chain__;if(a||n){var r=t(this.__wrapped__),o=r.__actions__=te(this.__actions__);return o.push({func:e,args:arguments,thisArg:t}),r.__chain__=n,r}var i=[this.value()];return ea.apply(i,arguments),e.apply(t,i)}}(p))}return t}function Ei(){return t._=Ki,this}function _i(){}function Ci(t){return Yn(t)?Fe(t):ze(t)}function Ri(t){return function(e){return Pe(t,ir(e),e+"")}}function bi(t,e,n){n&&Kn(t,e,n)&&(e=n=null),t=+t||0,n=null==n?1:+n||0,null==e?(e=t,t=0):e=+e||0;for(var r=-1,o=ma(Xi((e-t)/(n||1)),0),i=xi(o);++r<o;)i[r]=t,t+=n;return i}function Ni(t,e,n){if(t=Ji(t),1>t||!da(t))return[];var r=-1,o=xi(va(t,ba));for(e=rn(e,n,1);++r<t;)ba>r?o[r]=e(r):e(r);return o}function wi(t){var e=++Wi;return s(t)+e}function Oi(t,e){return(+t||0)+(+e||0)}function Di(t,e,n){n&&Kn(t,e,n)&&(e=null);var r=Un(),o=null==e;return r===Ee&&o||(o=!1,e=r(e,n,3)),o?de(Os(t)?t:rr(t)):Xe(t,e)}t=t?re.defaults(ne.Object(),t,re.pick(ne,Bt)):ne;var xi=t.Array,Mi=t.Date,Ti=t.Error,Ii=t.Function,Pi=t.Math,Si=t.Number,ki=t.Object,Li=t.RegExp,Ai=t.String,Ui=t.TypeError,Vi=xi.prototype,ji=ki.prototype,Bi=Ai.prototype,Fi=(Fi=t.window)&&Fi.document,zi=Ii.prototype.toString,Hi=ji.hasOwnProperty,Wi=0,qi=ji.toString,Ki=t._,Yi=Li("^"+ei(qi).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gi=xo(Gi=t.ArrayBuffer)&&Gi,Qi=xo(Qi=Gi&&new Gi(0).slice)&&Qi,Xi=Pi.ceil,$i=t.clearTimeout,Ji=Pi.floor,Zi=xo(Zi=ki.getOwnPropertySymbols)&&Zi,ta=xo(ta=ki.getPrototypeOf)&&ta,ea=Vi.push,na=xo(na=ki.preventExtensions)&&na,ra=ji.propertyIsEnumerable,oa=xo(oa=t.Set)&&oa,ia=t.setTimeout,aa=Vi.splice,sa=xo(sa=t.Uint8Array)&&sa,ua=xo(ua=t.WeakMap)&&ua,ca=function(){try{var e=xo(e=t.Float64Array)&&e,n=new e(new Gi(10),0,1)&&e}catch(r){}return n}(),la=function(){var t=na&&xo(t=ki.assign)&&t;try{if(t){var e=na({1:0});e[0]=1}}catch(n){try{t(e,"xo")}catch(n){}return!e[1]&&t}return!1}(),pa=xo(pa=xi.isArray)&&pa,fa=xo(fa=ki.create)&&fa,da=t.isFinite,ha=xo(ha=ki.keys)&&ha,ma=Pi.max,va=Pi.min,ya=xo(ya=Mi.now)&&ya,ga=xo(ga=Si.isFinite)&&ga,Ea=t.parseInt,_a=Pi.random,Ca=Si.NEGATIVE_INFINITY,Ra=Si.POSITIVE_INFINITY,ba=Pi.pow(2,32)-1,Na=ba-1,wa=ba>>>1,Oa=ca?ca.BYTES_PER_ELEMENT:0,Da=Pi.pow(2,53)-1,xa=ua&&new ua,Ma={},Ta=e.support={};
!function(t){var e=function(){this.x=t},n=arguments,r=[];e.prototype={valueOf:t,y:t};for(var o in new e)r.push(o);Ta.funcDecomp=/\bthis\b/.test(function(){return this}),Ta.funcNames="string"==typeof Ii.name;try{Ta.dom=11===Fi.createDocumentFragment().nodeType}catch(i){Ta.dom=!1}try{Ta.nonEnumArgs=!ra.call(n,1)}catch(i){Ta.nonEnumArgs=!0}}(1,0),e.templateSettings={escape:Ct,evaluate:Rt,interpolate:bt,variable:"",imports:{_:e}};var Ia=la||function(t,e){return null==e?t:ge(e,za(e),ge(e,Vs(e),t))},Pa=function(){function e(){}return function(n){if(wo(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}(),Sa=ln(Me),ka=ln(Te,!0),La=pn(),Aa=pn(!0),Ua=xa?function(t,e){return xa.set(t,e),t}:mi;Qi||(on=Gi&&sa?function(t){var e=t.byteLength,n=ca?Ji(e/Oa):0,r=n*Oa,o=new Gi(e);if(n){var i=new ca(o,0,n);i.set(new ca(t,0,n))}return e!=r&&(i=new sa(o,r),i.set(new sa(t,r))),o}:hi(null));var Va=fa&&oa?function(t){return new $t(t)}:hi(null),ja=xa?function(t){return xa.get(t)}:_i,Ba=function(){return Ta.funcNames?"constant"==hi.name?Fe("name"):function(t){for(var e=t.name,n=Ma[e],r=n?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}:hi("")}(),Fa=Fe("length"),za=Zi?function(t){return Zi(or(t))}:hi([]),Ha=function(){var t=0,e=0;return function(n,r){var o=ds(),i=j-(o-e);if(e=o,i>0){if(++t>=V)return n}else t=0;return Ua(n,r)}}(),Wa=po(function(t,e){return Wn(t)?Re(t,De(e,!1,!0)):[]}),qa=gn(),Ka=gn(!0),Ya=po(function(t,e){e=De(e);var n=ye(t,e);return He(t,e.sort(r)),n}),Ga=In(),Qa=In(!0),Xa=po(function(t){return $e(De(t,!1,!0))}),$a=po(function(t,e){return Wn(t)?Re(t,e):[]}),Ja=po(Ir),Za=po(function(t){var e=t.length,n=t[e-2],r=t[e-1];return e>2&&"function"==typeof n?e-=2:(n=e>1&&"function"==typeof r?(--e,r):w,r=w),t.length=e,Pr(t,n,r)}),ts=po(function(t,e){return ye(t,De(e))}),es=un(function(t,e,n){Hi.call(t,n)?++t[n]:t[n]=1}),ns=yn(Sa),rs=yn(ka,!0),os=Cn(ee,Sa),is=Cn(oe,ka),as=un(function(t,e,n){Hi.call(t,n)?t[n].push(e):t[n]=[e]}),ss=un(function(t,e,n){t[n]=e}),us=po(function(t,e,n){var r=-1,o="function"==typeof e,i=Yn(e),a=Wn(t)?xi(t.length):[];return Sa(t,function(t){var s=o?e:i&&null!=t&&t[e];a[++r]=s?s.apply(t,n):Hn(t,e,n)}),a}),cs=un(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),ls=Dn(le,Sa),ps=Dn(pe,ka),fs=po(function(t,e){if(null==t)return[];var n=e[2];return n&&Kn(e[0],e[1],n)&&(e.length=1),Qe(t,De(e),[])}),ds=ya||function(){return(new Mi).getTime()},hs=po(function(t,e,n){var r=D;if(n.length){var o=E(n,hs.placeholder);r|=P}return Pn(t,r,e,n,o)}),ms=po(function(t,e){e=e.length?De(e):Vo(t);for(var n=-1,r=e.length;++n<r;){var o=e[n];t[o]=Pn(t[o],D,t)}return t}),vs=po(function(t,e,n){var r=D|x;if(n.length){var o=E(n,vs.placeholder);r|=P}return Pn(e,r,t,n,o)}),ys=mn(T),gs=mn(I),Es=po(function(t,e){return Ce(t,1,e)}),_s=po(function(t,e,n){return Ce(t,e,n)}),Cs=_n(),Rs=_n(!0),bs=On(P),Ns=On(S),ws=po(function(t,e){return Pn(t,L,null,null,null,De(e))}),Os=pa||function(t){return y(t)&&Qn(t.length)&&qi.call(t)==K};Ta.dom||(Co=function(t){return!!t&&1===t.nodeType&&y(t)&&!Ms(t)});var Ds=ga||function(t){return"number"==typeof t&&da(t)},xs=a(/x/)||sa&&!a(sa)?function(t){return qi.call(t)==X}:a,Ms=ta?function(t){if(!t||qi.call(t)!=Z)return!1;var e=t.valueOf,n=xo(e)&&(n=ta(e))&&ta(n);return n?t==n||ta(t)==n:er(t)}:er,Ts=cn(function(t,e,n){return n?ve(t,e,n):Ia(t,e)}),Is=po(function(t){var e=t[0];return null==e?e:(t.push(he),Ts.apply(w,t))}),Ps=En(Me),Ss=En(Te),ks=Rn(La),Ls=Rn(Aa),As=bn(Me),Us=bn(Te),Vs=ha?function(t){var e=null!=t&&t.constructor;return"function"==typeof e&&e.prototype===t||"function"!=typeof t&&Wn(t)?nr(t):wo(t)?ha(t):[]}:nr,js=Nn(!0),Bs=Nn(),Fs=cn(je),zs=po(function(t,e){if(null==t)return{};if("function"!=typeof e[0]){var e=se(De(e),Ai);return Jn(t,Re(zo(t),e))}var n=rn(e[0],e[1],3);return Zn(t,function(t,e,r){return!n(t,e,r)})}),Hs=po(function(t,e){return null==t?{}:"function"==typeof e[0]?Zn(t,rn(e[0],e[1],3)):Jn(t,De(e))}),Ws=dn(function(t,e,n){return e=e.toLowerCase(),t+(n?e.charAt(0).toUpperCase()+e.slice(1):e)}),qs=dn(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Ks=wn(),Ys=wn(!0);8!=Ea(jt+"08")&&(ri=function(t,e,n){return(n?Kn(t,e,n):null==e)?e=0:e&&(e=+e),t=si(t),Ea(t,e||(St.test(t)?16:10))});var Gs=dn(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Qs=dn(function(t,e,n){return t+(n?" ":"")+(e.charAt(0).toUpperCase()+e.slice(1))}),Xs=po(function(t,e){try{return t.apply(w,e)}catch(n){return No(n)?n:new Ti(n)}}),$s=po(function(t,e){return function(n){return Hn(n,t,e)}}),Js=po(function(t,e){return function(n){return Hn(t,n,e)}}),Zs=vn(ue),tu=vn(ce,!0);return e.prototype=n.prototype,g.prototype=Pa(n.prototype),g.prototype.constructor=g,$.prototype=Pa(n.prototype),$.prototype.constructor=$,Kt.prototype["delete"]=Yt,Kt.prototype.get=Gt,Kt.prototype.has=Qt,Kt.prototype.set=Xt,$t.prototype.push=Zt,uo.Cache=Kt,e.after=oo,e.ary=io,e.assign=Ts,e.at=ts,e.before=ao,e.bind=hs,e.bindAll=ms,e.bindKey=vs,e.callback=di,e.chain=Lr,e.chunk=sr,e.compact=ur,e.constant=hi,e.countBy=es,e.create=Uo,e.curry=ys,e.curryRight=gs,e.debounce=so,e.defaults=Is,e.defer=Es,e.delay=_s,e.difference=Wa,e.drop=cr,e.dropRight=lr,e.dropRightWhile=pr,e.dropWhile=fr,e.fill=dr,e.filter=qr,e.flatten=mr,e.flattenDeep=vr,e.flow=Cs,e.flowRight=Rs,e.forEach=os,e.forEachRight=is,e.forIn=ks,e.forInRight=Ls,e.forOwn=As,e.forOwnRight=Us,e.functions=Vo,e.groupBy=as,e.indexBy=ss,e.initial=gr,e.intersection=Er,e.invert=Fo,e.invoke=us,e.keys=Vs,e.keysIn=zo,e.map=Gr,e.mapKeys=js,e.mapValues=Bs,e.matches=vi,e.matchesProperty=yi,e.memoize=uo,e.merge=Fs,e.method=$s,e.methodOf=Js,e.mixin=gi,e.negate=co,e.omit=zs,e.once=lo,e.pairs=Ho,e.partial=bs,e.partialRight=Ns,e.partition=cs,e.pick=Hs,e.pluck=Qr,e.property=Ci,e.propertyOf=Ri,e.pull=Rr,e.pullAt=Ya,e.range=bi,e.rearg=ws,e.reject=Xr,e.remove=br,e.rest=Nr,e.restParam=po,e.set=qo,e.shuffle=Jr,e.slice=wr,e.sortBy=eo,e.sortByAll=fs,e.sortByOrder=no,e.spread=fo,e.take=Or,e.takeRight=Dr,e.takeRightWhile=xr,e.takeWhile=Mr,e.tap=Ar,e.throttle=ho,e.thru=Ur,e.times=Ni,e.toArray=Lo,e.toPlainObject=Ao,e.transform=Ko,e.union=Xa,e.uniq=Tr,e.unzip=Ir,e.unzipWith=Pr,e.values=Yo,e.valuesIn=Go,e.where=ro,e.without=$a,e.wrap=mo,e.xor=Sr,e.zip=Ja,e.zipObject=kr,e.zipWith=Za,e.backflow=Rs,e.collect=Gr,e.compose=Rs,e.each=os,e.eachRight=is,e.extend=Ts,e.iteratee=di,e.methods=Vo,e.object=kr,e.select=qr,e.tail=Nr,e.unique=Tr,gi(e,e),e.add=Oi,e.attempt=Xs,e.camelCase=Ws,e.capitalize=$o,e.clone=vo,e.cloneDeep=yo,e.deburr=Jo,e.endsWith=Zo,e.escape=ti,e.escapeRegExp=ei,e.every=Wr,e.find=ns,e.findIndex=qa,e.findKey=Ps,e.findLast=rs,e.findLastIndex=Ka,e.findLastKey=Ss,e.findWhere=Kr,e.first=hr,e.get=jo,e.has=Bo,e.identity=mi,e.includes=Yr,e.indexOf=yr,e.inRange=Qo,e.isArguments=go,e.isArray=Os,e.isBoolean=Eo,e.isDate=_o,e.isElement=Co,e.isEmpty=Ro,e.isEqual=bo,e.isError=No,e.isFinite=Ds,e.isFunction=xs,e.isMatch=Oo,e.isNaN=Do,e.isNative=xo,e.isNull=Mo,e.isNumber=To,e.isObject=wo,e.isPlainObject=Ms,e.isRegExp=Io,e.isString=Po,e.isTypedArray=So,e.isUndefined=ko,e.kebabCase=qs,e.last=_r,e.lastIndexOf=Cr,e.max=Zs,e.min=tu,e.noConflict=Ei,e.noop=_i,e.now=ds,e.pad=ni,e.padLeft=Ks,e.padRight=Ys,e.parseInt=ri,e.random=Xo,e.reduce=ls,e.reduceRight=ps,e.repeat=oi,e.result=Wo,e.runInContext=N,e.size=Zr,e.snakeCase=Gs,e.some=to,e.sortedIndex=Ga,e.sortedLastIndex=Qa,e.startCase=Qs,e.startsWith=ii,e.sum=Di,e.template=ai,e.trim=si,e.trimLeft=ui,e.trimRight=ci,e.trunc=li,e.unescape=pi,e.uniqueId=wi,e.words=fi,e.all=Wr,e.any=to,e.contains=Yr,e.detect=ns,e.foldl=ls,e.foldr=ps,e.head=hr,e.include=Yr,e.inject=ls,gi(e,function(){var t={};return Me(e,function(n,r){e.prototype[r]||(t[r]=n)}),t}(),!1),e.sample=$r,e.prototype.sample=function(t){return this.__chain__||null!=t?this.thru(function(e){return $r(e,t)}):$r(this.value())},e.VERSION=O,ee(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),ee(["dropWhile","filter","map","takeWhile"],function(t,e){var n=e!=z,r=e==B;$.prototype[t]=function(t,o){var i=this.__filtered__,a=i&&r?new $(this):this.clone(),s=a.__iteratees__||(a.__iteratees__=[]);return s.push({done:!1,count:0,index:0,iteratee:Un(t,o,1),limit:-1,type:e}),a.__filtered__=i||n,a}}),ee(["drop","take"],function(t,e){var n=t+"While";$.prototype[t]=function(n){var r=this.__filtered__,o=r&&!e?this.dropWhile():this.clone();if(n=null==n?1:ma(Ji(n)||0,0),r)e?o.__takeCount__=va(o.__takeCount__,n):_r(o.__iteratees__).limit=n;else{var i=o.__views__||(o.__views__=[]);i.push({size:n,type:t+(o.__dir__<0?"Right":"")})}return o},$.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()},$.prototype[t+"RightWhile"]=function(t,e){return this.reverse()[n](t,e).reverse()}}),ee(["first","last"],function(t,e){var n="take"+(e?"Right":"");$.prototype[t]=function(){return this[n](1).value()[0]}}),ee(["initial","rest"],function(t,e){var n="drop"+(e?"":"Right");$.prototype[t]=function(){return this[n](1)}}),ee(["pluck","where"],function(t,e){var n=e?"filter":"map",r=e?Ue:Ci;$.prototype[t]=function(t){return this[n](r(t))}}),$.prototype.compact=function(){return this.filter(mi)},$.prototype.reject=function(t,e){return t=Un(t,e,1),this.filter(function(e){return!t(e)})},$.prototype.slice=function(t,e){t=null==t?0:+t||0;var n=this;return 0>t?n=this.takeRight(-t):t&&(n=this.drop(t)),e!==w&&(e=+e||0,n=0>e?n.dropRight(-e):n.take(e-t)),n},$.prototype.toArray=function(){return this.drop(0)},Me($.prototype,function(t,n){var r=e[n];if(r){var o=/^(?:filter|map|reject)|While$/.test(n),i=/^(?:first|last)$/.test(n);e.prototype[n]=function(){var n=arguments,a=this.__chain__,s=this.__wrapped__,u=!!this.__actions__.length,c=s instanceof $,l=n[0],p=c||Os(s);p&&o&&"function"==typeof l&&1!=l.length&&(c=p=!1);var f=c&&!u;if(i&&!a)return f?t.call(s):r.call(e,this.value());var d=function(t){var o=[t];return ea.apply(o,n),r.apply(e,o)};if(p){var h=f?s:new $(this),m=t.apply(h,n);if(!i&&(u||m.__actions__)){var v=m.__actions__||(m.__actions__=[]);v.push({func:Ur,args:[d],thisArg:e})}return new g(m,a)}return this.thru(d)}}}),ee(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var n=(/^(?:replace|split)$/.test(t)?Bi:Vi)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",o=/^(?:join|pop|replace|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;return o&&!this.__chain__?n.apply(this.value(),t):this[r](function(e){return n.apply(e,t)})}}),Me($.prototype,function(t,n){var r=e[n];if(r){var o=r.name,i=Ma[o]||(Ma[o]=[]);i.push({name:n,func:r})}}),Ma[xn(null,x).name]=[{name:"wrapper",func:null}],$.prototype.clone=et,$.prototype.reverse=rt,$.prototype.value=qt,e.prototype.chain=Vr,e.prototype.commit=jr,e.prototype.plant=Br,e.prototype.reverse=Fr,e.prototype.toString=zr,e.prototype.run=e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=Hr,e.prototype.collect=e.prototype.map,e.prototype.head=e.prototype.first,e.prototype.select=e.prototype.filter,e.prototype.tail=e.prototype.rest,e}var w,O="3.8.0",D=1,x=2,M=4,T=8,I=16,P=32,S=64,k=128,L=256,A=30,U="...",V=150,j=16,B=0,F=1,z=2,H="Expected a function",W="__lodash_placeholder__",q="[object Arguments]",K="[object Array]",Y="[object Boolean]",G="[object Date]",Q="[object Error]",X="[object Function]",$="[object Map]",J="[object Number]",Z="[object Object]",tt="[object RegExp]",et="[object Set]",nt="[object String]",rt="[object WeakMap]",ot="[object ArrayBuffer]",it="[object Float32Array]",at="[object Float64Array]",st="[object Int8Array]",ut="[object Int16Array]",ct="[object Int32Array]",lt="[object Uint8Array]",pt="[object Uint8ClampedArray]",ft="[object Uint16Array]",dt="[object Uint32Array]",ht=/\b__p \+= '';/g,mt=/\b(__p \+=) '' \+/g,vt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,yt=/&(?:amp|lt|gt|quot|#39|#96);/g,gt=/[&<>"'`]/g,Et=RegExp(yt.source),_t=RegExp(gt.source),Ct=/<%-([\s\S]+?)%>/g,Rt=/<%([\s\S]+?)%>/g,bt=/<%=([\s\S]+?)%>/g,Nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,wt=/^\w*$/,Ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,Dt=/[.*+?^${}()|[\]\/\\]/g,xt=RegExp(Dt.source),Mt=/[\u0300-\u036f\ufe20-\ufe23]/g,Tt=/\\(\\)?/g,It=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pt=/\w*$/,St=/^0[xX]/,kt=/^\[object .+?Constructor\]$/,Lt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,At=/($^)/,Ut=/['\n\r\u2028\u2029\\]/g,Vt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",e="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+e+")|"+t+"?"+e+"|"+t+"+|[0-9]+","g")}(),jt=" \f \ufeff\n\r\u2028\u2029 ",Bt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"],Ft=-1,zt={};zt[it]=zt[at]=zt[st]=zt[ut]=zt[ct]=zt[lt]=zt[pt]=zt[ft]=zt[dt]=!0,zt[q]=zt[K]=zt[ot]=zt[Y]=zt[G]=zt[Q]=zt[X]=zt[$]=zt[J]=zt[Z]=zt[tt]=zt[et]=zt[nt]=zt[rt]=!1;var Ht={};Ht[q]=Ht[K]=Ht[ot]=Ht[Y]=Ht[G]=Ht[it]=Ht[at]=Ht[st]=Ht[ut]=Ht[ct]=Ht[J]=Ht[Z]=Ht[tt]=Ht[nt]=Ht[lt]=Ht[pt]=Ht[ft]=Ht[dt]=!0,Ht[Q]=Ht[X]=Ht[$]=Ht[et]=Ht[rt]=!1;var Wt={leading:!1,maxWait:0,trailing:!1},qt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},Kt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Yt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Gt={"function":!0,object:!0},Qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xt=Gt[typeof n]&&n&&!n.nodeType&&n,$t=Gt[typeof e]&&e&&!e.nodeType&&e,Jt=Xt&&$t&&"object"==typeof t&&t&&t.Object&&t,Zt=Gt[typeof self]&&self&&self.Object&&self,te=Gt[typeof window]&&window&&window.Object&&window,ee=$t&&$t.exports===Xt&&Xt,ne=Jt||te!==(this&&this.window)&&te||Zt||this,re=N();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ne._=re,define(function(){return re})):Xt&&$t?ee?($t.exports=re)._=re:Xt._=re:ne._=re}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],44:[function(t,e,n){"use strict";function r(){}e.exports=r},{}],45:[function(t,e,n){"use strict";function r(t,e,n){for(var r in e)if(e.hasOwnProperty(r)){var i=e[r](n,r,t);i instanceof Error&&o(!1,i.message)}}var o=t("react/lib/warning"),i=t("react/lib/invariant"),a={statics:{validateProps:function(t){r(this.displayName,this.propTypes,t)}},render:function(){i(!1,"%s elements are for router configuration only and should not be rendered",this.constructor.displayName)}};e.exports=a},{"react/lib/invariant":210,"react/lib/warning":229}],46:[function(t,e,n){"use strict";var r=t("react/lib/invariant"),o=t("react/lib/ExecutionEnvironment").canUseDOM,i={length:1,back:function(){r(o,"Cannot use History.back without a DOM"),i.length-=1,window.history.back()}};e.exports=i},{"react/lib/ExecutionEnvironment":104,"react/lib/invariant":210}],47:[function(t,e,n){"use strict";function r(t,e,n){var o=t.childRoutes;if(o)for(var i,u,c=0,l=o.length;l>c;++c)if(u=o[c],!u.isDefault&&!u.isNotFound&&(i=r(u,e,n)))return i.routes.unshift(t),i;var p=t.defaultRoute;if(p&&(d=a.extractParams(p.path,e)))return new s(e,d,n,[t,p]);var f=t.notFoundRoute;if(f&&(d=a.extractParams(f.path,e)))return new s(e,d,n,[t,f]);var d=a.extractParams(t.path,e);return d?new s(e,d,n,[t]):null}var o=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=t("./PathUtils"),s=function(){function t(e,n,r,o){i(this,t),this.pathname=e,this.params=n,this.query=r,this.routes=o}return o(t,{findMatch:{value:function(t,e){for(var n=a.withoutQuery(e),o=a.extractQuery(e),i=null,s=0,u=t.length;null==i&&u>s;++s)i=r(t[s],n,o);return i},writable:!0,configurable:!0}}),t}();e.exports=s},{"./PathUtils":50}],48:[function(t,e,n){"use strict";var r=t("./PropTypes"),o={contextTypes:{makePath:r.func.isRequired,makeHref:r.func.isRequired,transitionTo:r.func.isRequired,replaceWith:r.func.isRequired,goBack:r.func.isRequired},makePath:function(t,e,n){return this.context.makePath(t,e,n)},makeHref:function(t,e,n){return this.context.makeHref(t,e,n)},transitionTo:function(t,e,n){this.context.transitionTo(t,e,n)},replaceWith:function(t,e,n){this.context.replaceWith(t,e,n)},goBack:function(){return this.context.goBack()}};e.exports=o},{"./PropTypes":51}],49:[function(t,e,n){"use strict";var r=t("./PropTypes"),o={childContextTypes:{makePath:r.func.isRequired,makeHref:r.func.isRequired,transitionTo:r.func.isRequired,replaceWith:r.func.isRequired,goBack:r.func.isRequired},getChildContext:function(){return{makePath:this.constructor.makePath.bind(this.constructor),makeHref:this.constructor.makeHref.bind(this.constructor),transitionTo:this.constructor.transitionTo.bind(this.constructor),replaceWith:this.constructor.replaceWith.bind(this.constructor),goBack:this.constructor.goBack.bind(this.constructor)}}};e.exports=o},{"./PropTypes":51}],50:[function(t,e,n){"use strict";function r(t){if(!(t in p)){var e=[],n=t.replace(s,function(t,n){return n?(e.push(n),"([^/?#]+)"):"*"===t?(e.push("splat"),"(.*?)"):"\\"+t});p[t]={matcher:new RegExp("^"+n+"$","i"),paramNames:e}}return p[t]}var o=t("react/lib/invariant"),i=t("qs/lib/utils").merge,a=t("qs"),s=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|[*.()\[\]\\+|{}^$]/g,u=/:([a-zA-Z_$][a-zA-Z0-9_$?]*[?]?)|[*]/g,c=/\/\/\?|\/\?\/|\/\?/g,l=/\?(.+)/,p={},f={isAbsolute:function(t){return"/"===t.charAt(0)},join:function(t,e){return t.replace(/\/*$/,"/")+e},extractParamNames:function(t){return r(t).paramNames},extractParams:function(t,e){var n=r(t),o=n.matcher,i=n.paramNames,a=e.match(o);if(!a)return null;var s={};return i.forEach(function(t,e){s[t]=a[e+1]}),s},injectParams:function(t,e){e=e||{};var n=0;return t.replace(u,function(r,i){if(i=i||"splat","?"===i.slice(-1)){if(i=i.slice(0,-1),null==e[i])return""}else o(null!=e[i],'Missing "%s" parameter for path "%s"',i,t);var a;return"splat"===i&&Array.isArray(e[i])?(a=e[i][n++],o(null!=a,'Missing splat # %s for path "%s"',n,t)):a=e[i],a}).replace(c,"/")},extractQuery:function(t){var e=t.match(l);return e&&a.parse(e[1])},withoutQuery:function(t){return t.replace(l,"")},withQuery:function(t,e){var n=f.extractQuery(t);n&&(e=e?i(n,e):n);var r=a.stringify(e,{indices:!1});return r?f.withoutQuery(t)+"?"+r:t}};e.exports=f},{qs:79,"qs/lib/utils":83,"react/lib/invariant":210}],51:[function(t,e,n){"use strict";var r=t("react/lib/Object.assign"),o=t("react").PropTypes,i=r({falsy:function(t,e,n){return t[e]?new Error("<"+n+'> may not have a "'+e+'" prop'):void 0}},o);e.exports=i},{react:230,"react/lib/Object.assign":109}],52:[function(t,e,n){"use strict";function r(t,e,n){this.to=t,this.params=e,this.query=n}e.exports=r},{}],53:[function(t,e,n){"use strict";var r,o=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=t("react/lib/Object.assign"),s=t("react/lib/invariant"),u=t("react/lib/warning"),c=t("./PathUtils"),l=function(){function t(e,n,r,o,a,s,u,l){i(this,t),this.name=e,this.path=n,this.paramNames=c.extractParamNames(this.path),this.ignoreScrollBehavior=!!r,this.isDefault=!!o,this.isNotFound=!!a,this.onEnter=s,this.onLeave=u,this.handler=l}return o(t,{createRoute:{value:function(e,n){e=e||{},"string"==typeof e&&(e={path:e});var o=r;o?u(null==e.parentRoute||e.parentRoute===o,"You should not use parentRoute with createRoute inside another route's child callback; it is ignored"):o=e.parentRoute;var i=e.name,a=e.path||i;!a||e.isDefault||e.isNotFound?a=o?o.path:"/":c.isAbsolute(a)?o&&s(0===o.paramNames.length,'You cannot nest path "%s" inside "%s"; the parent requires URL parameters',a,o.path):a=o?c.join(o.path,a):"/"+a,e.isNotFound&&!/\*$/.test(a)&&(a+="*");var l=new t(i,a,e.ignoreScrollBehavior,e.isDefault,e.isNotFound,e.onEnter,e.onLeave,e.handler);if(o&&(l.isDefault?(s(null==o.defaultRoute,"%s may not have more than one default route",o),o.defaultRoute=l):l.isNotFound&&(s(null==o.notFoundRoute,"%s may not have more than one not found route",o),o.notFoundRoute=l),o.appendChild(l)),"function"==typeof n){var p=r;r=l,n.call(l,l),r=p}return l},writable:!0,configurable:!0},createDefaultRoute:{value:function(e){return t.createRoute(a({},e,{isDefault:!0}))},writable:!0,configurable:!0},createNotFoundRoute:{value:function(e){return t.createRoute(a({},e,{isNotFound:!0}))},writable:!0,configurable:!0},createRedirect:{value:function(e){return t.createRoute(a({},e,{path:e.path||e.from||"*",onEnter:function(t,n,r){t.redirect(e.to,e.params||n,e.query||r)}}))},writable:!0,configurable:!0}},{appendChild:{value:function(e){s(e instanceof t,"route.appendChild must use a valid Route"),this.childRoutes||(this.childRoutes=[]),this.childRoutes.push(e)},writable:!0,configurable:!0},toString:{value:function(){var t="<Route";return this.name&&(t+=' name="'+this.name+'"'),t+=' path="'+this.path+'">'},writable:!0,configurable:!0}}),t}();e.exports=l},{"./PathUtils":50,"react/lib/Object.assign":109,"react/lib/invariant":210,"react/lib/warning":229}],54:[function(t,e,n){"use strict";var r=t("react"),o=t("react/lib/Object.assign"),i=t("./PropTypes"),a="__routeHandler__",s={contextTypes:{getRouteAtDepth:i.func.isRequired,setRouteComponentAtDepth:i.func.isRequired,routeHandlers:i.array.isRequired},childContextTypes:{routeHandlers:i.array.isRequired},getChildContext:function(){return{routeHandlers:this.context.routeHandlers.concat([this])}},componentDidMount:function(){this._updateRouteComponent(this.refs[a])},componentDidUpdate:function(){this._updateRouteComponent(this.refs[a])},componentWillUnmount:function(){this._updateRouteComponent(null)},_updateRouteComponent:function(t){this.context.setRouteComponentAtDepth(this.getRouteDepth(),t)},getRouteDepth:function(){return this.context.routeHandlers.length},createChildRouteHandler:function(t){var e=this.context.getRouteAtDepth(this.getRouteDepth());return e?r.createElement(e.handler,o({},t||this.props,{ref:a})):null}};e.exports=s},{"./PropTypes":51,react:230,"react/lib/Object.assign":109}],55:[function(t,e,n){"use strict";function r(t,e){if(!e)return!0;if(t.pathname===e.pathname)return!1;var n=t.routes,r=e.routes,o=n.filter(function(t){return-1!==r.indexOf(t)});return!o.some(function(t){return t.ignoreScrollBehavior})}var o=t("react/lib/invariant"),i=t("react/lib/ExecutionEnvironment").canUseDOM,a=t("./getWindowScrollPosition"),s={statics:{recordScrollPosition:function(t){this.scrollHistory||(this.scrollHistory={}),this.scrollHistory[t]=a()},getScrollPosition:function(t){return this.scrollHistory||(this.scrollHistory={}),this.scrollHistory[t]||null}},componentWillMount:function(){o(null==this.constructor.getScrollBehavior()||i,"Cannot use scroll behavior without a DOM")},componentDidMount:function(){this._updateScroll()},componentDidUpdate:function(t,e){this._updateScroll(e)},_updateScroll:function(t){if(r(this.state,t)){var e=this.constructor.getScrollBehavior();e&&e.updateScrollPosition(this.constructor.getScrollPosition(this.state.path),this.state.action)}}};e.exports=s},{"./getWindowScrollPosition":70,"react/lib/ExecutionEnvironment":104,"react/lib/invariant":210}],56:[function(t,e,n){"use strict";var r=t("./PropTypes"),o={contextTypes:{getCurrentPath:r.func.isRequired,getCurrentRoutes:r.func.isRequired,getCurrentPathname:r.func.isRequired,getCurrentParams:r.func.isRequired,getCurrentQuery:r.func.isRequired,isActive:r.func.isRequired},getPath:function(){return this.context.getCurrentPath()},getRoutes:function(){return this.context.getCurrentRoutes()},getPathname:function(){return this.context.getCurrentPathname()},getParams:function(){return this.context.getCurrentParams()},getQuery:function(){return this.context.getCurrentQuery()},isActive:function(t,e,n){return this.context.isActive(t,e,n)}};e.exports=o},{"./PropTypes":51}],57:[function(t,e,n){"use strict";function r(t,e){return t.some(function(t){return t.name===e})}function o(t,e){for(var n in e)if(String(t[n])!==String(e[n]))return!1;return!0}function i(t,e){for(var n in e)if(String(t[n])!==String(e[n]))return!1;return!0}var a=t("react/lib/Object.assign"),s=t("./PropTypes"),u=t("./PathUtils"),c={getCurrentPath:function(){return this.state.path},getCurrentRoutes:function(){return this.state.routes.slice(0)},getCurrentPathname:function(){return this.state.pathname},getCurrentParams:function(){return a({},this.state.params)},getCurrentQuery:function(){return a({},this.state.query)},isActive:function(t,e,n){return u.isAbsolute(t)?t===this.state.path:r(this.state.routes,t)&&o(this.state.params,e)&&(null==n||i(this.state.query,n))},childContextTypes:{getCurrentPath:s.func.isRequired,getCurrentRoutes:s.func.isRequired,getCurrentPathname:s.func.isRequired,getCurrentParams:s.func.isRequired,getCurrentQuery:s.func.isRequired,isActive:s.func.isRequired},getChildContext:function(){return{getCurrentPath:this.getCurrentPath,getCurrentRoutes:this.getCurrentRoutes,getCurrentPathname:this.getCurrentPathname,getCurrentParams:this.getCurrentParams,getCurrentQuery:this.getCurrentQuery,isActive:this.isActive}}};e.exports=c},{"./PathUtils":50,"./PropTypes":51,"react/lib/Object.assign":109}],58:[function(t,e,n){"use strict";function r(t,e){this.path=t,this.abortReason=null,this.retry=e.bind(this)}var o=t("./Cancellation"),i=t("./Redirect");r.prototype.abort=function(t){null==this.abortReason&&(this.abortReason=t||"ABORT")},r.prototype.redirect=function(t,e,n){this.abort(new i(t,e,n))},r.prototype.cancel=function(){this.abort(new o)},r.from=function(t,e,n,r){e.reduce(function(e,r,o){return function(i){if(i||t.abortReason)e(i);else if(r.onLeave)try{r.onLeave(t,n[o],e),r.onLeave.length<3&&e()}catch(a){e(a)}else e()}},r)()},r.to=function(t,e,n,r,o){e.reduceRight(function(e,o){return function(i){if(i||t.abortReason)e(i);else if(o.onEnter)try{o.onEnter(t,n,r,e),o.onEnter.length<4&&e()}catch(a){e(a)}else e()}},o)()},e.exports=r},{"./Cancellation":44,"./Redirect":52}],59:[function(t,e,n){"use strict";var r={PUSH:"push",REPLACE:"replace",POP:"pop"};e.exports=r},{}],60:[function(t,e,n){"use strict";var r=t("../actions/LocationActions"),o={updateScrollPosition:function(t,e){switch(e){case r.PUSH:case r.REPLACE:window.scrollTo(0,0);break;case r.POP:t?window.scrollTo(t.x,t.y):window.scrollTo(0,0)}}};e.exports=o},{"../actions/LocationActions":59}],61:[function(t,e,n){"use strict";var r={updateScrollPosition:function(){window.scrollTo(0,0)}};e.exports=r},{}],62:[function(t,e,n){"use strict";var r=t("react"),o=t("../Configuration"),i=t("../PropTypes"),a=r.createClass({displayName:"DefaultRoute",mixins:[o],propTypes:{name:i.string,path:i.falsy,children:i.falsy,handler:i.func.isRequired}});e.exports=a},{"../Configuration":45,"../PropTypes":51,react:230}],63:[function(t,e,n){"use strict";function r(t){return 0===t.button}function o(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}var i=t("react"),a=t("react/lib/cx"),s=t("react/lib/Object.assign"),u=t("../Navigation"),c=t("../State"),l=t("../PropTypes"),p=t("../Route"),f=i.createClass({displayName:"Link",mixins:[u,c],propTypes:{activeClassName:l.string.isRequired,to:l.oneOfType([l.string,l.instanceOf(p)]),params:l.object,query:l.object,activeStyle:l.object,onClick:l.func},getDefaultProps:function(){return{activeClassName:"active"}},handleClick:function(t){var e,n=!0;this.props.onClick&&(e=this.props.onClick(t)),!o(t)&&r(t)&&((e===!1||t.defaultPrevented===!0)&&(n=!1),t.preventDefault(),n&&this.transitionTo(this.props.to,this.props.params,this.props.query))},getHref:function(){return this.makeHref(this.props.to,this.props.params,this.props.query)},getClassName:function(){var t={};return this.props.className&&(t[this.props.className]=!0),this.getActiveState()&&(t[this.props.activeClassName]=!0),a(t)},getActiveState:function(){return this.isActive(this.props.to,this.props.params,this.props.query)},render:function(){var t=s({},this.props,{href:this.getHref(),className:this.getClassName(),onClick:this.handleClick});return t.activeStyle&&this.getActiveState()&&(t.style=t.activeStyle),i.DOM.a(t,this.props.children)}});e.exports=f},{"../Navigation":48,"../PropTypes":51,"../Route":53,"../State":56,react:230,"react/lib/Object.assign":109,"react/lib/cx":188}],64:[function(t,e,n){"use strict";var r=t("react"),o=t("../Configuration"),i=t("../PropTypes"),a=r.createClass({displayName:"NotFoundRoute",mixins:[o],propTypes:{name:i.string,path:i.falsy,children:i.falsy,handler:i.func.isRequired}});e.exports=a},{"../Configuration":45,"../PropTypes":51,react:230}],65:[function(t,e,n){"use strict";var r=t("react"),o=t("../Configuration"),i=t("../PropTypes"),a=r.createClass({displayName:"Redirect",mixins:[o],propTypes:{path:i.string,from:i.string,to:i.string,handler:i.falsy}});e.exports=a},{"../Configuration":45,"../PropTypes":51,react:230}],66:[function(t,e,n){"use strict";var r=t("react"),o=t("../Configuration"),i=t("../PropTypes"),a=t("./RouteHandler"),s=r.createClass({displayName:"Route",mixins:[o],propTypes:{name:i.string,path:i.string,handler:i.func,ignoreScrollBehavior:i.bool},getDefaultProps:function(){return{handler:a}}});e.exports=s},{"../Configuration":45,"../PropTypes":51,"./RouteHandler":67,react:230}],67:[function(t,e,n){"use strict";var r=t("react"),o=t("../RouteHandlerMixin"),i=r.createClass({displayName:"RouteHandler",mixins:[o],render:function(){return this.createChildRouteHandler()}});e.exports=i},{"../RouteHandlerMixin":54,react:230}],68:[function(t,e,n){(function(n){"use strict";function r(t,e){for(var n in e)if(e.hasOwnProperty(n)&&t[n]!==e[n])return!1;return!0}function o(t,e,n,o,i,a){return t.some(function(t){if(t!==e)return!1;for(var s,u=e.paramNames,c=0,l=u.length;l>c;++c)if(s=u[c],o[s]!==n[s])return!1;return r(i,a)&&r(a,i)})}function i(t,e){for(var n,r=0,o=t.length;o>r;++r)n=t[r],n.name&&(c(null==e[n.name],'You may not have more than one route named "%s"',n.name),e[n.name]=n),n.childRoutes&&i(n.childRoutes,e)}function a(t){t=t||{},C(t)&&(t={routes:t});var e=[],r=t.location||I,a=t.scrollBehavior||P,f={},S={},k=null,L=null;"string"==typeof r&&(r=new v(r)),r instanceof v?u(!l||"test"===n.env.NODE_ENV,"You should not use a static location in a DOM environment because the router will not be kept in sync with the current URL"):c(l||r.needsDOM===!1,"You cannot use %s without a DOM",r),r!==h||M()||(r=m);var A=s.createClass({displayName:"Router",statics:{isRunning:!1,cancelPendingTransition:function(){k&&(k.cancel(),k=null)},clearAllRoutes:function(){this.cancelPendingTransition(),this.namedRoutes={},this.routes=[]},addRoutes:function(t){C(t)&&(t=_(t)),i(t,this.namedRoutes),this.routes.push.apply(this.routes,t)},replaceRoutes:function(t){this.clearAllRoutes(),this.addRoutes(t),this.refresh()},match:function(t){return D.findMatch(this.routes,t)},makePath:function(t,e,n){var r;if(T.isAbsolute(t))r=t;else{var o=t instanceof x?t:this.namedRoutes[t];c(o instanceof x,'Cannot find a route named "%s"',t),r=o.path}return T.withQuery(T.injectParams(r,e),n)},makeHref:function(t,e,n){var o=this.makePath(t,e,n);return r===d?"#"+o:o},transitionTo:function(t,e,n){var o=this.makePath(t,e,n);k?r.replace(o):r.push(o)},replaceWith:function(t,e,n){r.replace(this.makePath(t,e,n))},goBack:function(){return w.length>1||r===m?(r.pop(),!0):(u(!1,"goBack() was ignored because there is no router history"),!1)},handleAbort:t.onAbort||function(t){if(r instanceof v)throw new Error("Unhandled aborted transition! Reason: "+t);t instanceof O||(t instanceof N?r.replace(this.makePath(t.to,t.params,t.query)):r.pop());
},handleError:t.onError||function(t){throw t},handleLocationChange:function(t){this.dispatch(t.path,t.type)},dispatch:function(t,n){this.cancelPendingTransition();var r=f.path,i=null==n;if(r!==t||i){r&&n===p.PUSH&&this.recordScrollPosition(r);var a=this.match(t);u(null!=a,'No route matches path "%s". Make sure you have <Route path="%s"> somewhere in your routes',t,t),null==a&&(a={});var s,c,l=f.routes||[],d=f.params||{},h=f.query||{},m=a.routes||[],v=a.params||{},y=a.query||{};l.length?(s=l.filter(function(t){return!o(m,t,d,v,h,y)}),c=m.filter(function(t){return!o(l,t,d,v,h,y)})):(s=[],c=m);var g=new R(t,this.replaceWith.bind(this,t));k=g;var E=e.slice(l.length-s.length);R.from(g,s,E,function(e){return e||g.abortReason?L.call(A,e,g):void R.to(g,c,v,y,function(e){L.call(A,e,g,{path:t,action:n,pathname:a.pathname,routes:m,params:v,query:y})})})}},run:function(t){c(!this.isRunning,"Router is already running"),L=function(e,n,r){e&&A.handleError(e),k===n&&(k=null,n.abortReason?A.handleAbort(n.abortReason):t.call(this,this,S=r))},r instanceof v||(r.addChangeListener&&r.addChangeListener(A.handleLocationChange),this.isRunning=!0),this.refresh()},refresh:function(){A.dispatch(r.getCurrentPath(),null)},stop:function(){this.cancelPendingTransition(),r.removeChangeListener&&r.removeChangeListener(A.handleLocationChange),this.isRunning=!1},getScrollBehavior:function(){return a}},mixins:[y,E,g],propTypes:{children:b.falsy},childContextTypes:{getRouteAtDepth:s.PropTypes.func.isRequired,setRouteComponentAtDepth:s.PropTypes.func.isRequired,routeHandlers:s.PropTypes.array.isRequired},getChildContext:function(){return{getRouteAtDepth:this.getRouteAtDepth,setRouteComponentAtDepth:this.setRouteComponentAtDepth,routeHandlers:[this]}},getInitialState:function(){return f=S},componentWillReceiveProps:function(){this.setState(f=S)},componentWillUnmount:function(){A.stop()},getLocation:function(){return r},getRouteAtDepth:function(t){var e=this.state.routes;return e&&e[t]},setRouteComponentAtDepth:function(t,n){e[t]=n},render:function(){var t=this.getRouteAtDepth(0);return t?s.createElement(t.handler,this.props):null}});return A.clearAllRoutes(),t.routes&&A.addRoutes(t.routes),A}var s=t("react"),u=t("react/lib/warning"),c=t("react/lib/invariant"),l=t("react/lib/ExecutionEnvironment").canUseDOM,p=t("./actions/LocationActions"),f=t("./behaviors/ImitateBrowserBehavior"),d=t("./locations/HashLocation"),h=t("./locations/HistoryLocation"),m=t("./locations/RefreshLocation"),v=t("./locations/StaticLocation"),y=t("./NavigationContext"),g=t("./ScrollHistory"),E=t("./StateContext"),_=t("./createRoutesFromReactChildren"),C=t("./isReactChildren"),R=t("./Transition"),b=t("./PropTypes"),N=t("./Redirect"),w=t("./History"),O=t("./Cancellation"),D=t("./Match"),x=t("./Route"),M=t("./supportsHistory"),T=t("./PathUtils"),I=l?d:"/",P=l?f:null;e.exports=a}).call(this,t("_process"))},{"./Cancellation":44,"./History":46,"./Match":47,"./NavigationContext":49,"./PathUtils":50,"./PropTypes":51,"./Redirect":52,"./Route":53,"./ScrollHistory":55,"./StateContext":57,"./Transition":58,"./actions/LocationActions":59,"./behaviors/ImitateBrowserBehavior":60,"./createRoutesFromReactChildren":69,"./isReactChildren":72,"./locations/HashLocation":73,"./locations/HistoryLocation":74,"./locations/RefreshLocation":75,"./locations/StaticLocation":76,"./supportsHistory":78,_process:21,react:230,"react/lib/ExecutionEnvironment":104,"react/lib/invariant":210,"react/lib/warning":229}],69:[function(t,e,n){"use strict";function r(t,e,n){t=t||"UnknownComponent";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r](n,r,t);o instanceof Error&&c(!1,o.message)}}function o(t){var e=u({},t),n=e.handler;return n&&(e.onEnter=n.willTransitionTo,e.onLeave=n.willTransitionFrom),e}function i(t){if(s.isValidElement(t)){var e=t.type,n=t.props;return e.propTypes&&r(e.displayName,e.propTypes,n),e===l?d.createDefaultRoute(o(n)):e===p?d.createNotFoundRoute(o(n)):e===f?d.createRedirect(o(n)):d.createRoute(o(n),function(){n.children&&a(n.children)})}}function a(t){var e=[];return s.Children.forEach(t,function(t){(t=i(t))&&e.push(t)}),e}var s=t("react"),u=t("react/lib/Object.assign"),c=t("react/lib/warning"),l=t("./components/DefaultRoute").type,p=t("./components/NotFoundRoute").type,f=t("./components/Redirect").type,d=t("./Route");e.exports=a},{"./Route":53,"./components/DefaultRoute":62,"./components/NotFoundRoute":64,"./components/Redirect":65,react:230,"react/lib/Object.assign":109,"react/lib/warning":229}],70:[function(t,e,n){"use strict";function r(){return o(i,"Cannot get current scroll position without a DOM"),{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}}var o=t("react/lib/invariant"),i=t("react/lib/ExecutionEnvironment").canUseDOM;e.exports=r},{"react/lib/ExecutionEnvironment":104,"react/lib/invariant":210}],71:[function(t,e,n){"use strict";n.DefaultRoute=t("./components/DefaultRoute"),n.Link=t("./components/Link"),n.NotFoundRoute=t("./components/NotFoundRoute"),n.Redirect=t("./components/Redirect"),n.Route=t("./components/Route"),n.RouteHandler=t("./components/RouteHandler"),n.HashLocation=t("./locations/HashLocation"),n.HistoryLocation=t("./locations/HistoryLocation"),n.RefreshLocation=t("./locations/RefreshLocation"),n.StaticLocation=t("./locations/StaticLocation"),n.ImitateBrowserBehavior=t("./behaviors/ImitateBrowserBehavior"),n.ScrollToTopBehavior=t("./behaviors/ScrollToTopBehavior"),n.History=t("./History"),n.Navigation=t("./Navigation"),n.RouteHandlerMixin=t("./RouteHandlerMixin"),n.State=t("./State"),n.createRoute=t("./Route").createRoute,n.createDefaultRoute=t("./Route").createDefaultRoute,n.createNotFoundRoute=t("./Route").createNotFoundRoute,n.createRedirect=t("./Route").createRedirect,n.createRoutesFromReactChildren=t("./createRoutesFromReactChildren"),n.create=t("./createRouter"),n.run=t("./runRouter")},{"./History":46,"./Navigation":48,"./Route":53,"./RouteHandlerMixin":54,"./State":56,"./behaviors/ImitateBrowserBehavior":60,"./behaviors/ScrollToTopBehavior":61,"./components/DefaultRoute":62,"./components/Link":63,"./components/NotFoundRoute":64,"./components/Redirect":65,"./components/Route":66,"./components/RouteHandler":67,"./createRouter":68,"./createRoutesFromReactChildren":69,"./locations/HashLocation":73,"./locations/HistoryLocation":74,"./locations/RefreshLocation":75,"./locations/StaticLocation":76,"./runRouter":77}],72:[function(t,e,n){"use strict";function r(t){return null==t||i.isValidElement(t)}function o(t){return r(t)||Array.isArray(t)&&t.every(r)}var i=t("react");e.exports=o},{react:230}],73:[function(t,e,n){"use strict";function r(){return decodeURI(window.location.href.split("#")[1]||"")}function o(){var t=r();return"/"===t.charAt(0)?!0:(f.replace("/"+t),!1)}function i(t){t===u.PUSH&&(c.length+=1);var e={path:r(),type:t};l.forEach(function(t){t(e)})}function a(){o()&&(i(s||u.POP),s=null)}var s,u=t("../actions/LocationActions"),c=t("../History"),l=[],p=!1,f={addChangeListener:function(t){l.push(t),o(),p||(window.addEventListener?window.addEventListener("hashchange",a,!1):window.attachEvent("onhashchange",a),p=!0)},removeChangeListener:function(t){l=l.filter(function(e){return e!==t}),0===l.length&&(window.removeEventListener?window.removeEventListener("hashchange",a,!1):window.removeEvent("onhashchange",a),p=!1)},push:function(t){s=u.PUSH,window.location.hash=t},replace:function(t){s=u.REPLACE,window.location.replace(window.location.pathname+window.location.search+"#"+t)},pop:function(){s=u.POP,c.back()},getCurrentPath:r,toString:function(){return"<HashLocation>"}};e.exports=f},{"../History":46,"../actions/LocationActions":59}],74:[function(t,e,n){"use strict";function r(){return decodeURI(window.location.pathname+window.location.search)}function o(t){var e={path:r(),type:t};u.forEach(function(t){t(e)})}function i(t){void 0!==t.state&&o(a.POP)}var a=t("../actions/LocationActions"),s=t("../History"),u=[],c=!1,l={addChangeListener:function(t){u.push(t),c||(window.addEventListener?window.addEventListener("popstate",i,!1):window.attachEvent("onpopstate",i),c=!0)},removeChangeListener:function(t){u=u.filter(function(e){return e!==t}),0===u.length&&(window.addEventListener?window.removeEventListener("popstate",i,!1):window.removeEvent("onpopstate",i),c=!1)},push:function(t){window.history.pushState({path:t},"",t),s.length+=1,o(a.PUSH)},replace:function(t){window.history.replaceState({path:t},"",t),o(a.REPLACE)},pop:s.back,getCurrentPath:r,toString:function(){return"<HistoryLocation>"}};e.exports=l},{"../History":46,"../actions/LocationActions":59}],75:[function(t,e,n){"use strict";var r=t("./HistoryLocation"),o=t("../History"),i={push:function(t){window.location=t},replace:function(t){window.location.replace(t)},pop:o.back,getCurrentPath:r.getCurrentPath,toString:function(){return"<RefreshLocation>"}};e.exports=i},{"../History":46,"./HistoryLocation":74}],76:[function(t,e,n){"use strict";function r(){a(!1,"You cannot modify a static location")}var o=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},a=t("react/lib/invariant"),s=function(){function t(e){i(this,t),this.path=e}return o(t,null,{getCurrentPath:{value:function(){return this.path},writable:!0,configurable:!0},toString:{value:function(){return'<StaticLocation path="'+this.path+'">'},writable:!0,configurable:!0}}),t}();s.prototype.push=r,s.prototype.replace=r,s.prototype.pop=r,e.exports=s},{"react/lib/invariant":210}],77:[function(t,e,n){"use strict";function r(t,e,n){"function"==typeof e&&(n=e,e=null);var r=o({routes:t,location:e});return r.run(n),r}var o=t("./createRouter");e.exports=r},{"./createRouter":68}],78:[function(t,e,n){"use strict";function r(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?window.history&&"pushState"in window.history:!1}e.exports=r},{}],79:[function(t,e,n){e.exports=t("./lib/")},{"./lib/":80}],80:[function(t,e,n){var r=t("./stringify"),o=t("./parse");e.exports={stringify:r,parse:o}},{"./parse":81,"./stringify":82}],81:[function(t,e,n){var r=t("./utils"),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3};o.parseValues=function(t,e){for(var n={},o=t.split(e.delimiter,e.parameterLimit===1/0?void 0:e.parameterLimit),i=0,a=o.length;a>i;++i){var s=o[i],u=-1===s.indexOf("]=")?s.indexOf("="):s.indexOf("]=")+1;if(-1===u)n[r.decode(s)]="";else{var c=r.decode(s.slice(0,u)),l=r.decode(s.slice(u+1));n[c]=n.hasOwnProperty(c)?[].concat(n[c]).concat(l):l}}return n},o.parseObject=function(t,e,n){if(!t.length)return e;var r=t.shift(),i={};if("[]"===r)i=[],i=i.concat(o.parseObject(t,e,n));else{var a="["===r[0]&&"]"===r[r.length-1]?r.slice(1,r.length-1):r,s=parseInt(a,10),u=""+s;!isNaN(s)&&r!==a&&u===a&&s>=0&&s<=n.arrayLimit?(i=[],i[s]=o.parseObject(t,e,n)):i[a]=o.parseObject(t,e,n)}return i},o.parseKeys=function(t,e,n){if(t){var r=/^([^\[\]]*)/,i=/(\[[^\[\]]*\])/g,a=r.exec(t);if(!Object.prototype.hasOwnProperty(a[1])){var s=[];a[1]&&s.push(a[1]);for(var u=0;null!==(a=i.exec(t))&&u<n.depth;)++u,Object.prototype.hasOwnProperty(a[1].replace(/\[|\]/g,""))||s.push(a[1]);return a&&s.push("["+t.slice(a.index)+"]"),o.parseObject(s,e,n)}}},e.exports=function(t,e){if(""===t||null===t||"undefined"==typeof t)return{};e=e||{},e.delimiter="string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,e.depth="number"==typeof e.depth?e.depth:o.depth,e.arrayLimit="number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,e.parameterLimit="number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit;for(var n="string"==typeof t?o.parseValues(t,e):t,i={},a=Object.keys(n),s=0,u=a.length;u>s;++s){var c=a[s],l=o.parseKeys(c,n[c],e);i=r.merge(i,l)}return r.compact(i)}},{"./utils":83}],82:[function(t,e,n){var r=t("./utils"),o={delimiter:"&",indices:!0};o.stringify=function(t,e,n){if(r.isBuffer(t)?t=t.toString():t instanceof Date?t=t.toISOString():null===t&&(t=""),"string"==typeof t||"number"==typeof t||"boolean"==typeof t)return[encodeURIComponent(e)+"="+encodeURIComponent(t)];var i=[];if("undefined"==typeof t)return i;for(var a=Object.keys(t),s=0,u=a.length;u>s;++s){var c=a[s];i=i.concat(!n.indices&&Array.isArray(t)?o.stringify(t[c],e,n):o.stringify(t[c],e+"["+c+"]",n))}return i},e.exports=function(t,e){e=e||{};var n="undefined"==typeof e.delimiter?o.delimiter:e.delimiter;e.indices="boolean"==typeof e.indices?e.indices:o.indices;var r=[];if("object"!=typeof t||null===t)return"";for(var i=Object.keys(t),a=0,s=i.length;s>a;++a){var u=i[a];r=r.concat(o.stringify(t[u],u,e))}return r.join(n)}},{"./utils":83}],83:[function(t,e,n){n.arrayToObject=function(t){for(var e={},n=0,r=t.length;r>n;++n)"undefined"!=typeof t[n]&&(e[n]=t[n]);return e},n.merge=function(t,e){if(!e)return t;if("object"!=typeof e)return Array.isArray(t)?t.push(e):t[e]=!0,t;if("object"!=typeof t)return t=[t].concat(e);Array.isArray(t)&&!Array.isArray(e)&&(t=n.arrayToObject(t));for(var r=Object.keys(e),o=0,i=r.length;i>o;++o){var a=r[o],s=e[a];t[a]=t[a]?n.merge(t[a],s):s}return t},n.decode=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},n.compact=function(t,e){if("object"!=typeof t||null===t)return t;e=e||[];var r=e.indexOf(t);if(-1!==r)return e[r];if(e.push(t),Array.isArray(t)){for(var o=[],i=0,a=t.length;a>i;++i)"undefined"!=typeof t[i]&&o.push(t[i]);return o}var s=Object.keys(t);for(i=0,a=s.length;a>i;++i){var u=s[i];t[u]=n.compact(t[u],e)}return t},n.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},n.isBuffer=function(t){return null===t||"undefined"==typeof t?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}},{}],84:[function(t,e,n){"use strict";var r=t("./focusNode"),o={componentDidMount:function(){this.props.autoFocus&&r(this.getDOMNode())}};e.exports=o},{"./focusNode":195}],85:[function(t,e,n){"use strict";function r(){var t=window.opera;return"object"==typeof t&&"function"==typeof t.version&&parseInt(t.version(),10)<=12}function o(t){return(t.ctrlKey||t.altKey||t.metaKey)&&!(t.ctrlKey&&t.altKey)}var i=t("./EventConstants"),a=t("./EventPropagators"),s=t("./ExecutionEnvironment"),u=t("./SyntheticInputEvent"),c=t("./keyOf"),l=s.canUseDOM&&"TextEvent"in window&&!("documentMode"in document||r()),p=32,f=String.fromCharCode(p),d=i.topLevelTypes,h={beforeInput:{phasedRegistrationNames:{bubbled:c({onBeforeInput:null}),captured:c({onBeforeInputCapture:null})},dependencies:[d.topCompositionEnd,d.topKeyPress,d.topTextInput,d.topPaste]}},m=null,v=!1,y={eventTypes:h,extractEvents:function(t,e,n,r){var i;if(l)switch(t){case d.topKeyPress:var s=r.which;if(s!==p)return;v=!0,i=f;break;case d.topTextInput:if(i=r.data,i===f&&v)return;break;default:return}else{switch(t){case d.topPaste:m=null;break;case d.topKeyPress:r.which&&!o(r)&&(m=String.fromCharCode(r.which));break;case d.topCompositionEnd:m=r.data}if(null===m)return;i=m}if(i){var c=u.getPooled(h.beforeInput,n,r);return c.data=i,m=null,a.accumulateTwoPhaseDispatches(c),c}}};e.exports=y},{"./EventConstants":98,"./EventPropagators":103,"./ExecutionEnvironment":104,"./SyntheticInputEvent":172,"./keyOf":217}],86:[function(t,e,n){"use strict";function r(t,e){return t+e.charAt(0).toUpperCase()+e.substring(1)}var o={columnCount:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeOpacity:!0},i=["Webkit","ms","Moz","O"];Object.keys(o).forEach(function(t){i.forEach(function(e){o[r(e,t)]=o[t]})});var a={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},s={isUnitlessNumber:o,shorthandPropertyExpansions:a};e.exports=s},{}],87:[function(t,e,n){(function(n){"use strict";var r=t("./CSSProperty"),o=t("./ExecutionEnvironment"),i=t("./camelizeStyleName"),a=t("./dangerousStyleValue"),s=t("./hyphenateStyleName"),u=t("./memoizeStringOnly"),c=t("./warning"),l=u(function(t){return s(t)}),p="cssFloat";if(o.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(p="styleFloat"),"production"!==n.env.NODE_ENV)var f={},d=function(t){f.hasOwnProperty(t)&&f[t]||(f[t]=!0,"production"!==n.env.NODE_ENV?c(!1,"Unsupported style property "+t+". Did you mean "+i(t)+"?"):null)};var h={createMarkupForStyles:function(t){var e="";for(var r in t)if(t.hasOwnProperty(r)){"production"!==n.env.NODE_ENV&&r.indexOf("-")>-1&&d(r);var o=t[r];null!=o&&(e+=l(r)+":",e+=a(r,o)+";")}return e||null},setValueForStyles:function(t,e){var o=t.style;for(var i in e)if(e.hasOwnProperty(i)){"production"!==n.env.NODE_ENV&&i.indexOf("-")>-1&&d(i);var s=a(i,e[i]);if("float"===i&&(i=p),s)o[i]=s;else{var u=r.shorthandPropertyExpansions[i];if(u)for(var c in u)o[c]="";else o[i]=""}}}};e.exports=h}).call(this,t("_process"))},{"./CSSProperty":86,"./ExecutionEnvironment":104,"./camelizeStyleName":183,"./dangerousStyleValue":189,"./hyphenateStyleName":208,"./memoizeStringOnly":219,"./warning":229,_process:21}],88:[function(t,e,n){(function(n){"use strict";function r(){this._callbacks=null,this._contexts=null}var o=t("./PooledClass"),i=t("./Object.assign"),a=t("./invariant");i(r.prototype,{enqueue:function(t,e){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(t),this._contexts.push(e)},notifyAll:function(){var t=this._callbacks,e=this._contexts;if(t){"production"!==n.env.NODE_ENV?a(t.length===e.length,"Mismatched list of contexts in callback queue"):a(t.length===e.length),this._callbacks=null,this._contexts=null;for(var r=0,o=t.length;o>r;r++)t[r].call(e[r]);t.length=0,e.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),e.exports=r}).call(this,t("_process"))},{"./Object.assign":109,"./PooledClass":110,"./invariant":210,_process:21}],89:[function(t,e,n){"use strict";function r(t){return"SELECT"===t.nodeName||"INPUT"===t.nodeName&&"file"===t.type}function o(t){var e=b.getPooled(x.change,T,t);_.accumulateTwoPhaseDispatches(e),R.batchedUpdates(i,e)}function i(t){E.enqueueEvents(t),E.processEventQueue()}function a(t,e){M=t,T=e,M.attachEvent("onchange",o)}function s(){M&&(M.detachEvent("onchange",o),M=null,T=null)}function u(t,e,n){return t===D.topChange?n:void 0}function c(t,e,n){t===D.topFocus?(s(),a(e,n)):t===D.topBlur&&s()}function l(t,e){M=t,T=e,I=t.value,P=Object.getOwnPropertyDescriptor(t.constructor.prototype,"value"),Object.defineProperty(M,"value",L),M.attachEvent("onpropertychange",f)}function p(){M&&(delete M.value,M.detachEvent("onpropertychange",f),M=null,T=null,I=null,P=null)}function f(t){if("value"===t.propertyName){var e=t.srcElement.value;e!==I&&(I=e,o(t))}}function d(t,e,n){return t===D.topInput?n:void 0}function h(t,e,n){t===D.topFocus?(p(),l(e,n)):t===D.topBlur&&p()}function m(t,e,n){return t!==D.topSelectionChange&&t!==D.topKeyUp&&t!==D.topKeyDown||!M||M.value===I?void 0:(I=M.value,T)}function v(t){return"INPUT"===t.nodeName&&("checkbox"===t.type||"radio"===t.type)}function y(t,e,n){return t===D.topClick?n:void 0}var g=t("./EventConstants"),E=t("./EventPluginHub"),_=t("./EventPropagators"),C=t("./ExecutionEnvironment"),R=t("./ReactUpdates"),b=t("./SyntheticEvent"),N=t("./isEventSupported"),w=t("./isTextInputElement"),O=t("./keyOf"),D=g.topLevelTypes,x={change:{phasedRegistrationNames:{bubbled:O({onChange:null}),captured:O({onChangeCapture:null})},dependencies:[D.topBlur,D.topChange,D.topClick,D.topFocus,D.topInput,D.topKeyDown,D.topKeyUp,D.topSelectionChange]}},M=null,T=null,I=null,P=null,S=!1;C.canUseDOM&&(S=N("change")&&(!("documentMode"in document)||document.documentMode>8));var k=!1;C.canUseDOM&&(k=N("input")&&(!("documentMode"in document)||document.documentMode>9));var L={get:function(){return P.get.call(this)},set:function(t){I=""+t,P.set.call(this,t)}},A={eventTypes:x,extractEvents:function(t,e,n,o){var i,a;if(r(e)?S?i=u:a=c:w(e)?k?i=d:(i=m,a=h):v(e)&&(i=y),i){var s=i(t,e,n);if(s){var l=b.getPooled(x.change,s,o);return _.accumulateTwoPhaseDispatches(l),l}}a&&a(t,e,n)}};e.exports=A},{"./EventConstants":98,"./EventPluginHub":100,"./EventPropagators":103,"./ExecutionEnvironment":104,"./ReactUpdates":162,"./SyntheticEvent":170,"./isEventSupported":211,"./isTextInputElement":213,"./keyOf":217}],90:[function(t,e,n){"use strict";var r=0,o={createReactRootIndex:function(){return r++}};e.exports=o},{}],91:[function(t,e,n){"use strict";function r(t){switch(t){case g.topCompositionStart:return _.compositionStart;case g.topCompositionEnd:return _.compositionEnd;case g.topCompositionUpdate:return _.compositionUpdate}}function o(t,e){return t===g.topKeyDown&&e.keyCode===m}function i(t,e){switch(t){case g.topKeyUp:return-1!==h.indexOf(e.keyCode);case g.topKeyDown:return e.keyCode!==m;case g.topKeyPress:case g.topMouseDown:case g.topBlur:return!0;default:return!1}}function a(t){this.root=t,this.startSelection=l.getSelection(t),this.startValue=this.getText()}var s=t("./EventConstants"),u=t("./EventPropagators"),c=t("./ExecutionEnvironment"),l=t("./ReactInputSelection"),p=t("./SyntheticCompositionEvent"),f=t("./getTextContentAccessor"),d=t("./keyOf"),h=[9,13,27,32],m=229,v=c.canUseDOM&&"CompositionEvent"in window,y=!v||"documentMode"in document&&document.documentMode>8&&document.documentMode<=11,g=s.topLevelTypes,E=null,_={compositionEnd:{phasedRegistrationNames:{bubbled:d({onCompositionEnd:null}),captured:d({onCompositionEndCapture:null})},dependencies:[g.topBlur,g.topCompositionEnd,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:d({onCompositionStart:null}),captured:d({onCompositionStartCapture:null})},dependencies:[g.topBlur,g.topCompositionStart,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:d({onCompositionUpdate:null}),captured:d({onCompositionUpdateCapture:null})},dependencies:[g.topBlur,g.topCompositionUpdate,g.topKeyDown,g.topKeyPress,g.topKeyUp,g.topMouseDown]}};a.prototype.getText=function(){return this.root.value||this.root[f()]},a.prototype.getData=function(){var t=this.getText(),e=this.startSelection.start,n=this.startValue.length-this.startSelection.end;return t.substr(e,t.length-n-e)};var C={eventTypes:_,extractEvents:function(t,e,n,s){var c,l;if(v?c=r(t):E?i(t,s)&&(c=_.compositionEnd):o(t,s)&&(c=_.compositionStart),y&&(E||c!==_.compositionStart?c===_.compositionEnd&&E&&(l=E.getData(),E=null):E=new a(e)),c){var f=p.getPooled(c,n,s);return l&&(f.data=l),u.accumulateTwoPhaseDispatches(f),f}}};e.exports=C},{"./EventConstants":98,"./EventPropagators":103,"./ExecutionEnvironment":104,"./ReactInputSelection":142,"./SyntheticCompositionEvent":168,"./getTextContentAccessor":205,"./keyOf":217}],92:[function(t,e,n){(function(n){"use strict";function r(t,e,n){t.insertBefore(e,t.childNodes[n]||null)}var o,i=t("./Danger"),a=t("./ReactMultiChildUpdateTypes"),s=t("./getTextContentAccessor"),u=t("./invariant"),c=s();o="textContent"===c?function(t,e){t.textContent=e}:function(t,e){for(;t.firstChild;)t.removeChild(t.firstChild);if(e){var n=t.ownerDocument||document;t.appendChild(n.createTextNode(e))}};var l={dangerouslyReplaceNodeWithMarkup:i.dangerouslyReplaceNodeWithMarkup,updateTextContent:o,processUpdates:function(t,e){for(var s,c=null,l=null,p=0;s=t[p];p++)if(s.type===a.MOVE_EXISTING||s.type===a.REMOVE_NODE){var f=s.fromIndex,d=s.parentNode.childNodes[f],h=s.parentID;"production"!==n.env.NODE_ENV?u(d,"processUpdates(): Unable to find child %s of element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.",f,h):u(d),c=c||{},c[h]=c[h]||[],c[h][f]=d,l=l||[],l.push(d)}var m=i.dangerouslyRenderMarkup(e);if(l)for(var v=0;v<l.length;v++)l[v].parentNode.removeChild(l[v]);for(var y=0;s=t[y];y++)switch(s.type){case a.INSERT_MARKUP:r(s.parentNode,m[s.markupIndex],s.toIndex);break;case a.MOVE_EXISTING:r(s.parentNode,c[s.parentID][s.fromIndex],s.toIndex);break;case a.TEXT_CONTENT:o(s.parentNode,s.textContent);break;case a.REMOVE_NODE:}}};e.exports=l}).call(this,t("_process"))},{"./Danger":95,"./ReactMultiChildUpdateTypes":148,"./getTextContentAccessor":205,"./invariant":210,_process:21}],93:[function(t,e,n){(function(n){"use strict";function r(t,e){return(t&e)===e}var o=t("./invariant"),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(t){var e=t.Properties||{},a=t.DOMAttributeNames||{},u=t.DOMPropertyNames||{},c=t.DOMMutationMethods||{};t.isCustomAttribute&&s._isCustomAttributeFunctions.push(t.isCustomAttribute);for(var l in e){"production"!==n.env.NODE_ENV?o(!s.isStandardName.hasOwnProperty(l),"injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",l):o(!s.isStandardName.hasOwnProperty(l)),s.isStandardName[l]=!0;var p=l.toLowerCase();if(s.getPossibleStandardName[p]=l,a.hasOwnProperty(l)){var f=a[l];s.getPossibleStandardName[f]=l,s.getAttributeName[l]=f}else s.getAttributeName[l]=p;s.getPropertyName[l]=u.hasOwnProperty(l)?u[l]:l,s.getMutationMethod[l]=c.hasOwnProperty(l)?c[l]:null;var d=e[l];s.mustUseAttribute[l]=r(d,i.MUST_USE_ATTRIBUTE),s.mustUseProperty[l]=r(d,i.MUST_USE_PROPERTY),s.hasSideEffects[l]=r(d,i.HAS_SIDE_EFFECTS),s.hasBooleanValue[l]=r(d,i.HAS_BOOLEAN_VALUE),s.hasNumericValue[l]=r(d,i.HAS_NUMERIC_VALUE),s.hasPositiveNumericValue[l]=r(d,i.HAS_POSITIVE_NUMERIC_VALUE),s.hasOverloadedBooleanValue[l]=r(d,i.HAS_OVERLOADED_BOOLEAN_VALUE),"production"!==n.env.NODE_ENV?o(!s.mustUseAttribute[l]||!s.mustUseProperty[l],"DOMProperty: Cannot require using both attribute and property: %s",l):o(!s.mustUseAttribute[l]||!s.mustUseProperty[l]),"production"!==n.env.NODE_ENV?o(s.mustUseProperty[l]||!s.hasSideEffects[l],"DOMProperty: Properties that have side effects must use property: %s",l):o(s.mustUseProperty[l]||!s.hasSideEffects[l]),"production"!==n.env.NODE_ENV?o(!!s.hasBooleanValue[l]+!!s.hasNumericValue[l]+!!s.hasOverloadedBooleanValue[l]<=1,"DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s",l):o(!!s.hasBooleanValue[l]+!!s.hasNumericValue[l]+!!s.hasOverloadedBooleanValue[l]<=1)}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(t){for(var e=0;e<s._isCustomAttributeFunctions.length;e++){var n=s._isCustomAttributeFunctions[e];if(n(t))return!0}return!1},getDefaultValueForProperty:function(t,e){var n,r=a[t];return r||(a[t]=r={}),e in r||(n=document.createElement(t),r[e]=n[e]),r[e]},injection:i};e.exports=s}).call(this,t("_process"))},{"./invariant":210,_process:21}],94:[function(t,e,n){(function(n){"use strict";function r(t,e){return null==e||o.hasBooleanValue[t]&&!e||o.hasNumericValue[t]&&isNaN(e)||o.hasPositiveNumericValue[t]&&1>e||o.hasOverloadedBooleanValue[t]&&e===!1}var o=t("./DOMProperty"),i=t("./escapeTextForBrowser"),a=t("./memoizeStringOnly"),s=t("./warning"),u=a(function(t){return i(t)+'="'});if("production"!==n.env.NODE_ENV)var c={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0},l={},p=function(t){if(!(c.hasOwnProperty(t)&&c[t]||l.hasOwnProperty(t)&&l[t])){l[t]=!0;var e=t.toLowerCase(),r=o.isCustomAttribute(e)?e:o.getPossibleStandardName.hasOwnProperty(e)?o.getPossibleStandardName[e]:null;"production"!==n.env.NODE_ENV?s(null==r,"Unknown DOM property "+t+". Did you mean "+r+"?"):null}};var f={createMarkupForID:function(t){return u(o.ID_ATTRIBUTE_NAME)+i(t)+'"'},createMarkupForProperty:function(t,e){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){if(r(t,e))return"";var a=o.getAttributeName[t];return o.hasBooleanValue[t]||o.hasOverloadedBooleanValue[t]&&e===!0?i(a):u(a)+i(e)+'"'}return o.isCustomAttribute(t)?null==e?"":u(t)+i(e)+'"':("production"!==n.env.NODE_ENV&&p(t),null)},setValueForProperty:function(t,e,i){if(o.isStandardName.hasOwnProperty(e)&&o.isStandardName[e]){var a=o.getMutationMethod[e];if(a)a(t,i);else if(r(e,i))this.deleteValueForProperty(t,e);else if(o.mustUseAttribute[e])t.setAttribute(o.getAttributeName[e],""+i);else{var s=o.getPropertyName[e];o.hasSideEffects[e]&&""+t[s]==""+i||(t[s]=i)}}else o.isCustomAttribute(e)?null==i?t.removeAttribute(e):t.setAttribute(e,""+i):"production"!==n.env.NODE_ENV&&p(e)},deleteValueForProperty:function(t,e){if(o.isStandardName.hasOwnProperty(e)&&o.isStandardName[e]){var r=o.getMutationMethod[e];if(r)r(t,void 0);else if(o.mustUseAttribute[e])t.removeAttribute(o.getAttributeName[e]);else{var i=o.getPropertyName[e],a=o.getDefaultValueForProperty(t.nodeName,i);o.hasSideEffects[e]&&""+t[i]===a||(t[i]=a)}}else o.isCustomAttribute(e)?t.removeAttribute(e):"production"!==n.env.NODE_ENV&&p(e)}};e.exports=f}).call(this,t("_process"))},{"./DOMProperty":93,"./escapeTextForBrowser":193,"./memoizeStringOnly":219,"./warning":229,_process:21}],95:[function(t,e,n){(function(n){"use strict";function r(t){return t.substring(1,t.indexOf(" "))}var o=t("./ExecutionEnvironment"),i=t("./createNodesFromMarkup"),a=t("./emptyFunction"),s=t("./getMarkupWrap"),u=t("./invariant"),c=/^(<[^ \/>]+)/,l="data-danger-index",p={dangerouslyRenderMarkup:function(t){"production"!==n.env.NODE_ENV?u(o.canUseDOM,"dangerouslyRenderMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use React.renderToString for server rendering."):u(o.canUseDOM);for(var e,p={},f=0;f<t.length;f++)"production"!==n.env.NODE_ENV?u(t[f],"dangerouslyRenderMarkup(...): Missing markup."):u(t[f]),e=r(t[f]),e=s(e)?e:"*",p[e]=p[e]||[],p[e][f]=t[f];var d=[],h=0;for(e in p)if(p.hasOwnProperty(e)){var m=p[e];for(var v in m)if(m.hasOwnProperty(v)){var y=m[v];m[v]=y.replace(c,"$1 "+l+'="'+v+'" ')}var g=i(m.join(""),a);for(f=0;f<g.length;++f){var E=g[f];E.hasAttribute&&E.hasAttribute(l)?(v=+E.getAttribute(l),E.removeAttribute(l),"production"!==n.env.NODE_ENV?u(!d.hasOwnProperty(v),"Danger: Assigning to an already-occupied result index."):u(!d.hasOwnProperty(v)),d[v]=E,h+=1):"production"!==n.env.NODE_ENV&&console.error("Danger: Discarding unexpected node:",E)}}return"production"!==n.env.NODE_ENV?u(h===d.length,"Danger: Did not assign to every index of resultList."):u(h===d.length),"production"!==n.env.NODE_ENV?u(d.length===t.length,"Danger: Expected markup to render %s nodes, but rendered %s.",t.length,d.length):u(d.length===t.length),d},dangerouslyReplaceNodeWithMarkup:function(t,e){"production"!==n.env.NODE_ENV?u(o.canUseDOM,"dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use React.renderToString for server rendering."):u(o.canUseDOM),"production"!==n.env.NODE_ENV?u(e,"dangerouslyReplaceNodeWithMarkup(...): Missing markup."):u(e),
"production"!==n.env.NODE_ENV?u("html"!==t.tagName.toLowerCase(),"dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See renderComponentToString()."):u("html"!==t.tagName.toLowerCase());var r=i(e,a)[0];t.parentNode.replaceChild(r,t)}};e.exports=p}).call(this,t("_process"))},{"./ExecutionEnvironment":104,"./createNodesFromMarkup":187,"./emptyFunction":191,"./getMarkupWrap":202,"./invariant":210,_process:21}],96:[function(t,e,n){"use strict";var r=t("./keyOf"),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({CompositionEventPlugin:null}),r({BeforeInputEventPlugin:null}),r({AnalyticsEventPlugin:null}),r({MobileSafariClickEventPlugin:null})];e.exports=o},{"./keyOf":217}],97:[function(t,e,n){"use strict";var r=t("./EventConstants"),o=t("./EventPropagators"),i=t("./SyntheticMouseEvent"),a=t("./ReactMount"),s=t("./keyOf"),u=r.topLevelTypes,c=a.getFirstReactDOM,l={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},p=[null,null],f={eventTypes:l,extractEvents:function(t,e,n,r){if(t===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(t!==u.topMouseOut&&t!==u.topMouseOver)return null;var s;if(e.window===e)s=e;else{var f=e.ownerDocument;s=f?f.defaultView||f.parentWindow:window}var d,h;if(t===u.topMouseOut?(d=e,h=c(r.relatedTarget||r.toElement)||s):(d=s,h=e),d===h)return null;var m=d?a.getID(d):"",v=h?a.getID(h):"",y=i.getPooled(l.mouseLeave,m,r);y.type="mouseleave",y.target=d,y.relatedTarget=h;var g=i.getPooled(l.mouseEnter,v,r);return g.type="mouseenter",g.target=h,g.relatedTarget=d,o.accumulateEnterLeaveDispatches(y,g,m,v),p[0]=y,p[1]=g,p}};e.exports=f},{"./EventConstants":98,"./EventPropagators":103,"./ReactMount":146,"./SyntheticMouseEvent":174,"./keyOf":217}],98:[function(t,e,n){"use strict";var r=t("./keyMirror"),o=r({bubbled:null,captured:null}),i=r({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),a={topLevelTypes:i,PropagationPhases:o};e.exports=a},{"./keyMirror":216}],99:[function(t,e,n){(function(n){var r=t("./emptyFunction"),o={listen:function(t,e,n){return t.addEventListener?(t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}}):t.attachEvent?(t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}):void 0},capture:function(t,e,o){return t.addEventListener?(t.addEventListener(e,o,!0),{remove:function(){t.removeEventListener(e,o,!0)}}):("production"!==n.env.NODE_ENV&&console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events."),{remove:r})},registerDefault:function(){}};e.exports=o}).call(this,t("_process"))},{"./emptyFunction":191,_process:21}],100:[function(t,e,n){(function(n){"use strict";function r(){var t=!f||!f.traverseTwoPhase||!f.traverseEnterLeave;if(t)throw new Error("InstanceHandle not injected before use!")}var o=t("./EventPluginRegistry"),i=t("./EventPluginUtils"),a=t("./accumulateInto"),s=t("./forEachAccumulated"),u=t("./invariant"),c={},l=null,p=function(t){if(t){var e=i.executeDispatch,n=o.getPluginModuleForEvent(t);n&&n.executeDispatch&&(e=n.executeDispatch),i.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t)}},f=null,d={injection:{injectMount:i.injection.injectMount,injectInstanceHandle:function(t){f=t,"production"!==n.env.NODE_ENV&&r()},getInstanceHandle:function(){return"production"!==n.env.NODE_ENV&&r(),f},injectEventPluginOrder:o.injectEventPluginOrder,injectEventPluginsByName:o.injectEventPluginsByName},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:function(t,e,r){"production"!==n.env.NODE_ENV?u(!r||"function"==typeof r,"Expected %s listener to be a function, instead got type %s",e,typeof r):u(!r||"function"==typeof r);var o=c[e]||(c[e]={});o[t]=r},getListener:function(t,e){var n=c[e];return n&&n[t]},deleteListener:function(t,e){var n=c[e];n&&delete n[t]},deleteAllListeners:function(t){for(var e in c)delete c[e][t]},extractEvents:function(t,e,n,r){for(var i,s=o.plugins,u=0,c=s.length;c>u;u++){var l=s[u];if(l){var p=l.extractEvents(t,e,n,r);p&&(i=a(i,p))}}return i},enqueueEvents:function(t){t&&(l=a(l,t))},processEventQueue:function(){var t=l;l=null,s(t,p),"production"!==n.env.NODE_ENV?u(!l,"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."):u(!l)},__purge:function(){c={}},__getListenerBank:function(){return c}};e.exports=d}).call(this,t("_process"))},{"./EventPluginRegistry":101,"./EventPluginUtils":102,"./accumulateInto":180,"./forEachAccumulated":196,"./invariant":210,_process:21}],101:[function(t,e,n){(function(n){"use strict";function r(){if(s)for(var t in u){var e=u[t],r=s.indexOf(t);if("production"!==n.env.NODE_ENV?a(r>-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",t):a(r>-1),!c.plugins[r]){"production"!==n.env.NODE_ENV?a(e.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",t):a(e.extractEvents),c.plugins[r]=e;var i=e.eventTypes;for(var l in i)"production"!==n.env.NODE_ENV?a(o(i[l],e,l),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",l,t):a(o(i[l],e,l))}}}function o(t,e,r){"production"!==n.env.NODE_ENV?a(!c.eventNameDispatchConfigs.hasOwnProperty(r),"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",r):a(!c.eventNameDispatchConfigs.hasOwnProperty(r)),c.eventNameDispatchConfigs[r]=t;var o=t.phasedRegistrationNames;if(o){for(var s in o)if(o.hasOwnProperty(s)){var u=o[s];i(u,e,r)}return!0}return t.registrationName?(i(t.registrationName,e,r),!0):!1}function i(t,e,r){"production"!==n.env.NODE_ENV?a(!c.registrationNameModules[t],"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",t):a(!c.registrationNameModules[t]),c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[r].dependencies}var a=t("./invariant"),s=null,u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(t){"production"!==n.env.NODE_ENV?a(!s,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):a(!s),s=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];u.hasOwnProperty(o)&&u[o]===i||("production"!==n.env.NODE_ENV?a(!u[o],"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",o):a(!u[o]),u[o]=i,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;for(var n in e.phasedRegistrationNames)if(e.phasedRegistrationNames.hasOwnProperty(n)){var r=c.registrationNameModules[e.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var t in u)u.hasOwnProperty(t)&&delete u[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=c.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=c}).call(this,t("_process"))},{"./invariant":210,_process:21}],102:[function(t,e,n){(function(n){"use strict";function r(t){return t===y.topMouseUp||t===y.topTouchEnd||t===y.topTouchCancel}function o(t){return t===y.topMouseMove||t===y.topTouchMove}function i(t){return t===y.topMouseDown||t===y.topTouchStart}function a(t,e){var r=t._dispatchListeners,o=t._dispatchIDs;if("production"!==n.env.NODE_ENV&&d(t),Array.isArray(r))for(var i=0;i<r.length&&!t.isPropagationStopped();i++)e(t,r[i],o[i]);else r&&e(t,r,o)}function s(t,e,n){t.currentTarget=v.Mount.getNode(n);var r=e(t,n);return t.currentTarget=null,r}function u(t,e){a(t,e),t._dispatchListeners=null,t._dispatchIDs=null}function c(t){var e=t._dispatchListeners,r=t._dispatchIDs;if("production"!==n.env.NODE_ENV&&d(t),Array.isArray(e)){for(var o=0;o<e.length&&!t.isPropagationStopped();o++)if(e[o](t,r[o]))return r[o]}else if(e&&e(t,r))return r;return null}function l(t){var e=c(t);return t._dispatchIDs=null,t._dispatchListeners=null,e}function p(t){"production"!==n.env.NODE_ENV&&d(t);var e=t._dispatchListeners,r=t._dispatchIDs;"production"!==n.env.NODE_ENV?m(!Array.isArray(e),"executeDirectDispatch(...): Invalid `event`."):m(!Array.isArray(e));var o=e?e(t,r):null;return t._dispatchListeners=null,t._dispatchIDs=null,o}function f(t){return!!t._dispatchListeners}var d,h=t("./EventConstants"),m=t("./invariant"),v={Mount:null,injectMount:function(t){v.Mount=t,"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?m(t&&t.getNode,"EventPluginUtils.injection.injectMount(...): Injected Mount module is missing getNode."):m(t&&t.getNode))}},y=h.topLevelTypes;"production"!==n.env.NODE_ENV&&(d=function(t){var e=t._dispatchListeners,r=t._dispatchIDs,o=Array.isArray(e),i=Array.isArray(r),a=i?r.length:r?1:0,s=o?e.length:e?1:0;"production"!==n.env.NODE_ENV?m(i===o&&a===s,"EventPluginUtils: Invalid `event`."):m(i===o&&a===s)});var g={isEndish:r,isMoveish:o,isStartish:i,executeDirectDispatch:p,executeDispatch:s,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:l,hasDispatches:f,injection:v,useTouchEvents:!1};e.exports=g}).call(this,t("_process"))},{"./EventConstants":98,"./invariant":210,_process:21}],103:[function(t,e,n){(function(n){"use strict";function r(t,e,n){var r=e.dispatchConfig.phasedRegistrationNames[n];return v(t,r)}function o(t,e,o){if("production"!==n.env.NODE_ENV&&!t)throw new Error("Dispatching id must not be null");var i=e?m.bubbled:m.captured,a=r(t,o,i);a&&(o._dispatchListeners=d(o._dispatchListeners,a),o._dispatchIDs=d(o._dispatchIDs,t))}function i(t){t&&t.dispatchConfig.phasedRegistrationNames&&f.injection.getInstanceHandle().traverseTwoPhase(t.dispatchMarker,o,t)}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=v(t,r);o&&(n._dispatchListeners=d(n._dispatchListeners,o),n._dispatchIDs=d(n._dispatchIDs,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t.dispatchMarker,null,t)}function u(t){h(t,i)}function c(t,e,n,r){f.injection.getInstanceHandle().traverseEnterLeave(n,r,a,t,e)}function l(t){h(t,s)}var p=t("./EventConstants"),f=t("./EventPluginHub"),d=t("./accumulateInto"),h=t("./forEachAccumulated"),m=p.PropagationPhases,v=f.getListener,y={accumulateTwoPhaseDispatches:u,accumulateDirectDispatches:l,accumulateEnterLeaveDispatches:c};e.exports=y}).call(this,t("_process"))},{"./EventConstants":98,"./EventPluginHub":100,"./accumulateInto":180,"./forEachAccumulated":196,_process:21}],104:[function(t,e,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=o},{}],105:[function(t,e,n){"use strict";var r,o=t("./DOMProperty"),i=t("./ExecutionEnvironment"),a=o.injection.MUST_USE_ATTRIBUTE,s=o.injection.MUST_USE_PROPERTY,u=o.injection.HAS_BOOLEAN_VALUE,c=o.injection.HAS_SIDE_EFFECTS,l=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,f=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var d=document.implementation;r=d&&d.hasFeature&&d.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,cellPadding:null,cellSpacing:null,charSet:a,checked:s|u,classID:a,className:r?a:s,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,defer:u,dir:null,disabled:a|u,download:f,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,height:a,hidden:a|u,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,label:null,lang:null,list:a,loop:s|u,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,multiple:s|u,muted:s|u,name:null,noValidate:u,open:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:s,srcSet:a,start:l,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|c,width:a,wmode:a,autoCapitalize:null,autoCorrect:null,itemProp:a,itemScope:a|u,itemType:a,property:null},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"enctype",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},{"./DOMProperty":93,"./ExecutionEnvironment":104}],106:[function(t,e,n){(function(n){"use strict";function r(t){"production"!==n.env.NODE_ENV?c(null==t.props.checkedLink||null==t.props.valueLink,"Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa."):c(null==t.props.checkedLink||null==t.props.valueLink)}function o(t){r(t),"production"!==n.env.NODE_ENV?c(null==t.props.value&&null==t.props.onChange,"Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink."):c(null==t.props.value&&null==t.props.onChange)}function i(t){r(t),"production"!==n.env.NODE_ENV?c(null==t.props.checked&&null==t.props.onChange,"Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink"):c(null==t.props.checked&&null==t.props.onChange)}function a(t){this.props.valueLink.requestChange(t.target.value)}function s(t){this.props.checkedLink.requestChange(t.target.checked)}var u=t("./ReactPropTypes"),c=t("./invariant"),l={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},p={Mixin:{propTypes:{value:function(t,e,n){return!t[e]||l[t.type]||t.onChange||t.readOnly||t.disabled?void 0:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(t,e,n){return!t[e]||t.onChange||t.readOnly||t.disabled?void 0:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func}},getValue:function(t){return t.props.valueLink?(o(t),t.props.valueLink.value):t.props.value},getChecked:function(t){return t.props.checkedLink?(i(t),t.props.checkedLink.value):t.props.checked},getOnChange:function(t){return t.props.valueLink?(o(t),a):t.props.checkedLink?(i(t),s):t.props.onChange}};e.exports=p}).call(this,t("_process"))},{"./ReactPropTypes":155,"./invariant":210,_process:21}],107:[function(t,e,n){(function(n){"use strict";function r(t){t.remove()}var o=t("./ReactBrowserEventEmitter"),i=t("./accumulateInto"),a=t("./forEachAccumulated"),s=t("./invariant"),u={trapBubbledEvent:function(t,e){"production"!==n.env.NODE_ENV?s(this.isMounted(),"Must be mounted to trap events"):s(this.isMounted());var r=o.trapBubbledEvent(t,e,this.getDOMNode());this._localEventListeners=i(this._localEventListeners,r)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,r)}};e.exports=u}).call(this,t("_process"))},{"./ReactBrowserEventEmitter":113,"./accumulateInto":180,"./forEachAccumulated":196,"./invariant":210,_process:21}],108:[function(t,e,n){"use strict";var r=t("./EventConstants"),o=t("./emptyFunction"),i=r.topLevelTypes,a={eventTypes:null,extractEvents:function(t,e,n,r){if(t===i.topTouchStart){var a=r.target;a&&!a.onclick&&(a.onclick=o)}}};e.exports=a},{"./EventConstants":98,"./emptyFunction":191}],109:[function(t,e,n){function r(t,e){if(null==t)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(t),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i){var a=Object(i);for(var s in a)r.call(a,s)&&(n[s]=a[s])}}return n}e.exports=r},{}],110:[function(t,e,n){(function(n){"use strict";var r=t("./invariant"),o=function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)},i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},s=function(t,e,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,t,e,n,r,o),a}return new i(t,e,n,r,o)},u=function(t){var e=this;"production"!==n.env.NODE_ENV?r(t instanceof e,"Trying to release an instance into a pool of a different type."):r(t instanceof e),t.destructor&&t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=10,l=o,p=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||l,n.poolSize||(n.poolSize=c),n.release=u,n},f={addPoolingTo:p,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fiveArgumentPooler:s};e.exports=f}).call(this,t("_process"))},{"./invariant":210,_process:21}],111:[function(t,e,n){(function(n){"use strict";var r=t("./DOMPropertyOperations"),o=t("./EventPluginUtils"),i=t("./ReactChildren"),a=t("./ReactComponent"),s=t("./ReactCompositeComponent"),u=t("./ReactContext"),c=t("./ReactCurrentOwner"),l=t("./ReactElement"),p=t("./ReactElementValidator"),f=t("./ReactDOM"),d=t("./ReactDOMComponent"),h=t("./ReactDefaultInjection"),m=t("./ReactInstanceHandles"),v=t("./ReactLegacyElement"),y=t("./ReactMount"),g=t("./ReactMultiChild"),E=t("./ReactPerf"),_=t("./ReactPropTypes"),C=t("./ReactServerRendering"),R=t("./ReactTextComponent"),b=t("./Object.assign"),N=t("./deprecated"),w=t("./onlyChild");h.inject();var O=l.createElement,D=l.createFactory;"production"!==n.env.NODE_ENV&&(O=p.createElement,D=p.createFactory),O=v.wrapCreateElement(O),D=v.wrapCreateFactory(D);var x=E.measure("React","render",y.render),M={Children:{map:i.map,forEach:i.forEach,count:i.count,only:w},DOM:f,PropTypes:_,initializeTouchEvents:function(t){o.useTouchEvents=t},createClass:s.createClass,createElement:O,createFactory:D,constructAndRenderComponent:y.constructAndRenderComponent,constructAndRenderComponentByID:y.constructAndRenderComponentByID,render:x,renderToString:C.renderToString,renderToStaticMarkup:C.renderToStaticMarkup,unmountComponentAtNode:y.unmountComponentAtNode,isValidClass:v.isValidClass,isValidElement:l.isValidElement,withContext:u.withContext,__spread:b,renderComponent:N("React","renderComponent","render",this,x),renderComponentToString:N("React","renderComponentToString","renderToString",this,C.renderToString),renderComponentToStaticMarkup:N("React","renderComponentToStaticMarkup","renderToStaticMarkup",this,C.renderToStaticMarkup),isValidComponent:N("React","isValidComponent","isValidElement",this,l.isValidElement)};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({Component:a,CurrentOwner:c,DOMComponent:d,DOMPropertyOperations:r,InstanceHandles:m,Mount:y,MultiChild:g,TextComponent:R}),"production"!==n.env.NODE_ENV){var T=t("./ExecutionEnvironment");if(T.canUseDOM&&window.top===window.self){navigator.userAgent.indexOf("Chrome")>-1&&"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&console.debug("Download the React DevTools for a better development experience: http://fb.me/react-devtools");for(var I=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze],P=0;P<I.length;P++)if(!I[P]){console.error("One or more ES5 shim/shams expected by React are not available: http://fb.me/react-warning-polyfills");break}}}M.version="0.12.2",e.exports=M}).call(this,t("_process"))},{"./DOMPropertyOperations":94,"./EventPluginUtils":102,"./ExecutionEnvironment":104,"./Object.assign":109,"./ReactChildren":114,"./ReactComponent":115,"./ReactCompositeComponent":117,"./ReactContext":118,"./ReactCurrentOwner":119,"./ReactDOM":120,"./ReactDOMComponent":122,"./ReactDefaultInjection":132,"./ReactElement":135,"./ReactElementValidator":136,"./ReactInstanceHandles":143,"./ReactLegacyElement":144,"./ReactMount":146,"./ReactMultiChild":147,"./ReactPerf":151,"./ReactPropTypes":155,"./ReactServerRendering":159,"./ReactTextComponent":161,"./deprecated":190,"./onlyChild":221,_process:21}],112:[function(t,e,n){(function(n){"use strict";var r=t("./ReactEmptyComponent"),o=t("./ReactMount"),i=t("./invariant"),a={getDOMNode:function(){return"production"!==n.env.NODE_ENV?i(this.isMounted(),"getDOMNode(): A component must be mounted to have a DOM node."):i(this.isMounted()),r.isNullComponentID(this._rootNodeID)?null:o.getNode(this._rootNodeID)}};e.exports=a}).call(this,t("_process"))},{"./ReactEmptyComponent":137,"./ReactMount":146,"./invariant":210,_process:21}],113:[function(t,e,n){"use strict";function r(t){return Object.prototype.hasOwnProperty.call(t,m)||(t[m]=d++,p[t[m]]={}),p[t[m]]}var o=t("./EventConstants"),i=t("./EventPluginHub"),a=t("./EventPluginRegistry"),s=t("./ReactEventEmitterMixin"),u=t("./ViewportMetrics"),c=t("./Object.assign"),l=t("./isEventSupported"),p={},f=!1,d=0,h={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=c({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(t){t.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=t}},setEnabled:function(t){v.ReactEventListener&&v.ReactEventListener.setEnabled(t)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(t,e){for(var n=e,i=r(n),s=a.registrationNameDependencies[t],u=o.topLevelTypes,c=0,p=s.length;p>c;c++){var f=s[c];i.hasOwnProperty(f)&&i[f]||(f===u.topWheel?l("wheel")?v.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):l("mousewheel")?v.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):v.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):f===u.topScroll?l("scroll",!0)?v.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):v.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",v.ReactEventListener.WINDOW_HANDLE):f===u.topFocus||f===u.topBlur?(l("focus",!0)?(v.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),v.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):l("focusin")&&(v.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),v.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),i[u.topBlur]=!0,i[u.topFocus]=!0):h.hasOwnProperty(f)&&v.ReactEventListener.trapBubbledEvent(f,h[f],n),i[f]=!0)}},trapBubbledEvent:function(t,e,n){return v.ReactEventListener.trapBubbledEvent(t,e,n)},trapCapturedEvent:function(t,e,n){return v.ReactEventListener.trapCapturedEvent(t,e,n)},ensureScrollValueMonitoring:function(){if(!f){var t=u.refreshScrollValues;v.ReactEventListener.monitorScrollValue(t),f=!0}},eventNameDispatchConfigs:i.eventNameDispatchConfigs,registrationNameModules:i.registrationNameModules,putListener:i.putListener,getListener:i.getListener,deleteListener:i.deleteListener,deleteAllListeners:i.deleteAllListeners});e.exports=v},{"./EventConstants":98,"./EventPluginHub":100,"./EventPluginRegistry":101,"./Object.assign":109,"./ReactEventEmitterMixin":139,"./ViewportMetrics":179,"./isEventSupported":211}],114:[function(t,e,n){(function(n){"use strict";function r(t,e){this.forEachFunction=t,this.forEachContext=e}function o(t,e,n,r){var o=t;o.forEachFunction.call(o.forEachContext,e,r)}function i(t,e,n){if(null==t)return t;var i=r.getPooled(e,n);f(t,o,i),r.release(i)}function a(t,e,n){this.mapResult=t,this.mapFunction=e,this.mapContext=n}function s(t,e,r,o){var i=t,a=i.mapResult,s=!a.hasOwnProperty(r);if("production"!==n.env.NODE_ENV?d(s,"ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",r):null,s){var u=i.mapFunction.call(i.mapContext,e,o);a[r]=u}}function u(t,e,n){if(null==t)return t;var r={},o=a.getPooled(r,e,n);return f(t,s,o),a.release(o),r}function c(t,e,n,r){return null}function l(t,e){return f(t,c,null)}var p=t("./PooledClass"),f=t("./traverseAllChildren"),d=t("./warning"),h=p.twoArgumentPooler,m=p.threeArgumentPooler;p.addPoolingTo(r,h),p.addPoolingTo(a,m);var v={forEach:i,map:u,count:l};e.exports=v}).call(this,t("_process"))},{"./PooledClass":110,"./traverseAllChildren":228,"./warning":229,_process:21}],115:[function(t,e,n){(function(n){"use strict";var r=t("./ReactElement"),o=t("./ReactOwner"),i=t("./ReactUpdates"),a=t("./Object.assign"),s=t("./invariant"),u=t("./keyMirror"),c=u({MOUNTED:null,UNMOUNTED:null}),l=!1,p=null,f=null,d={injection:{injectEnvironment:function(t){"production"!==n.env.NODE_ENV?s(!l,"ReactComponent: injectEnvironment() can only be called once."):s(!l),f=t.mountImageIntoNode,p=t.unmountIDFromEnvironment,d.BackendIDOperations=t.BackendIDOperations,l=!0}},LifeCycle:c,BackendIDOperations:null,Mixin:{isMounted:function(){return this._lifeCycleState===c.MOUNTED},setProps:function(t,e){var n=this._pendingElement||this._currentElement;this.replaceProps(a({},n.props,t),e)},replaceProps:function(t,e){"production"!==n.env.NODE_ENV?s(this.isMounted(),"replaceProps(...): Can only update a mounted component."):s(this.isMounted()),"production"!==n.env.NODE_ENV?s(0===this._mountDepth,"replaceProps(...): You called `setProps` or `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):s(0===this._mountDepth),this._pendingElement=r.cloneAndReplaceProps(this._pendingElement||this._currentElement,t),i.enqueueUpdate(this,e)},_setPropsInternal:function(t,e){var n=this._pendingElement||this._currentElement;this._pendingElement=r.cloneAndReplaceProps(n,a({},n.props,t)),i.enqueueUpdate(this,e)},construct:function(t){this.props=t.props,this._owner=t._owner,this._lifeCycleState=c.UNMOUNTED,this._pendingCallbacks=null,this._currentElement=t,this._pendingElement=null},mountComponent:function(t,e,r){"production"!==n.env.NODE_ENV?s(!this.isMounted(),"mountComponent(%s, ...): Can only mount an unmounted component. Make sure to avoid storing components between renders or reusing a single component instance in multiple places.",t):s(!this.isMounted());var i=this._currentElement.ref;if(null!=i){var a=this._currentElement._owner;o.addComponentAsRefTo(this,i,a)}this._rootNodeID=t,this._lifeCycleState=c.MOUNTED,this._mountDepth=r},unmountComponent:function(){"production"!==n.env.NODE_ENV?s(this.isMounted(),"unmountComponent(): Can only unmount a mounted component."):s(this.isMounted());var t=this._currentElement.ref;null!=t&&o.removeComponentAsRefFrom(this,t,this._owner),p(this._rootNodeID),this._rootNodeID=null,this._lifeCycleState=c.UNMOUNTED},receiveComponent:function(t,e){"production"!==n.env.NODE_ENV?s(this.isMounted(),"receiveComponent(...): Can only update a mounted component."):s(this.isMounted()),this._pendingElement=t,this.performUpdateIfNecessary(e)},performUpdateIfNecessary:function(t){if(null!=this._pendingElement){var e=this._currentElement,n=this._pendingElement;this._currentElement=n,this.props=n.props,this._owner=n._owner,this._pendingElement=null,this.updateComponent(t,e)}},updateComponent:function(t,e){var n=this._currentElement;(n._owner!==e._owner||n.ref!==e.ref)&&(null!=e.ref&&o.removeComponentAsRefFrom(this,e.ref,e._owner),null!=n.ref&&o.addComponentAsRefTo(this,n.ref,n._owner))},mountComponentIntoNode:function(t,e,n){var r=i.ReactReconcileTransaction.getPooled();r.perform(this._mountComponentIntoNode,this,t,e,r,n),i.ReactReconcileTransaction.release(r)},_mountComponentIntoNode:function(t,e,n,r){var o=this.mountComponent(t,n,0);f(o,e,r)},isOwnedBy:function(t){return this._owner===t},getSiblingByRef:function(t){var e=this._owner;return e&&e.refs?e.refs[t]:null}}};e.exports=d}).call(this,t("_process"))},{"./Object.assign":109,"./ReactElement":135,"./ReactOwner":150,"./ReactUpdates":162,"./invariant":210,"./keyMirror":216,_process:21}],116:[function(t,e,n){(function(n){"use strict";var r=t("./ReactDOMIDOperations"),o=t("./ReactMarkupChecksum"),i=t("./ReactMount"),a=t("./ReactPerf"),s=t("./ReactReconcileTransaction"),u=t("./getReactRootElementInContainer"),c=t("./invariant"),l=t("./setInnerHTML"),p=1,f=9,d={ReactReconcileTransaction:s,BackendIDOperations:r,unmountIDFromEnvironment:function(t){i.purgeID(t)},mountImageIntoNode:a.measure("ReactComponentBrowserEnvironment","mountImageIntoNode",function(t,e,r){if("production"!==n.env.NODE_ENV?c(e&&(e.nodeType===p||e.nodeType===f),"mountComponentIntoNode(...): Target container is not valid."):c(e&&(e.nodeType===p||e.nodeType===f)),r){if(o.canReuseMarkup(t,u(e)))return;"production"!==n.env.NODE_ENV?c(e.nodeType!==f,"You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side."):c(e.nodeType!==f),
"production"!==n.env.NODE_ENV&&console.warn("React attempted to use reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server.")}"production"!==n.env.NODE_ENV?c(e.nodeType!==f,"You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See renderComponentToString() for server rendering."):c(e.nodeType!==f),l(e,t)})};e.exports=d}).call(this,t("_process"))},{"./ReactDOMIDOperations":124,"./ReactMarkupChecksum":145,"./ReactMount":146,"./ReactPerf":151,"./ReactReconcileTransaction":157,"./getReactRootElementInContainer":204,"./invariant":210,"./setInnerHTML":224,_process:21}],117:[function(t,e,n){(function(n){"use strict";function r(t){var e=t._owner||null;return e&&e.constructor&&e.constructor.displayName?" Check the render method of `"+e.constructor.displayName+"`.":""}function o(t,e,r){for(var o in e)e.hasOwnProperty(o)&&("production"!==n.env.NODE_ENV?x("function"==typeof e[o],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",t.displayName||"ReactCompositeComponent",N[r],o):x("function"==typeof e[o]))}function i(t,e){var r=V.hasOwnProperty(e)?V[e]:null;F.hasOwnProperty(e)&&("production"!==n.env.NODE_ENV?x(r===A.OVERRIDE_BASE,"ReactCompositeComponentInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e):x(r===A.OVERRIDE_BASE)),t.hasOwnProperty(e)&&("production"!==n.env.NODE_ENV?x(r===A.DEFINE_MANY||r===A.DEFINE_MANY_MERGED,"ReactCompositeComponentInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e):x(r===A.DEFINE_MANY||r===A.DEFINE_MANY_MERGED))}function a(t){var e=t._compositeLifeCycleState;"production"!==n.env.NODE_ENV?x(t.isMounted()||e===B.MOUNTING,"replaceState(...): Can only update a mounted or mounting component."):x(t.isMounted()||e===B.MOUNTING),"production"!==n.env.NODE_ENV?x(null==h.current,"replaceState(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."):x(null==h.current),"production"!==n.env.NODE_ENV?x(e!==B.UNMOUNTING,"replaceState(...): Cannot update while unmounting component. This usually means you called setState() on an unmounted component."):x(e!==B.UNMOUNTING)}function s(t,e){if(e){"production"!==n.env.NODE_ENV?x(!E.isValidFactory(e),"ReactCompositeComponent: You're attempting to use a component class as a mixin. Instead, just use a regular object."):x(!E.isValidFactory(e)),"production"!==n.env.NODE_ENV?x(!m.isValidElement(e),"ReactCompositeComponent: You're attempting to use a component as a mixin. Instead, just use a regular object."):x(!m.isValidElement(e));var r=t.prototype;e.hasOwnProperty(L)&&j.mixins(t,e.mixins);for(var o in e)if(e.hasOwnProperty(o)&&o!==L){var a=e[o];if(i(r,o),j.hasOwnProperty(o))j[o](t,a);else{var s=V.hasOwnProperty(o),u=r.hasOwnProperty(o),c=a&&a.__reactDontBind,f="function"==typeof a,d=f&&!s&&!u&&!c;if(d)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=a,r[o]=a;else if(u){var h=V[o];"production"!==n.env.NODE_ENV?x(s&&(h===A.DEFINE_MANY_MERGED||h===A.DEFINE_MANY),"ReactCompositeComponent: Unexpected spec policy %s for key %s when mixing in component specs.",h,o):x(s&&(h===A.DEFINE_MANY_MERGED||h===A.DEFINE_MANY)),h===A.DEFINE_MANY_MERGED?r[o]=l(r[o],a):h===A.DEFINE_MANY&&(r[o]=p(r[o],a))}else r[o]=a,"production"!==n.env.NODE_ENV&&"function"==typeof a&&e.displayName&&(r[o].displayName=e.displayName+"_"+o)}}}}function u(t,e){if(e)for(var r in e){var o=e[r];if(e.hasOwnProperty(r)){var i=r in j;"production"!==n.env.NODE_ENV?x(!i,'ReactCompositeComponent: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',r):x(!i);var a=r in t;"production"!==n.env.NODE_ENV?x(!a,"ReactCompositeComponent: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r):x(!a),t[r]=o}}}function c(t,e){return"production"!==n.env.NODE_ENV?x(t&&e&&"object"==typeof t&&"object"==typeof e,"mergeObjectsWithNoDuplicateKeys(): Cannot merge non-objects"):x(t&&e&&"object"==typeof t&&"object"==typeof e),P(e,function(e,r){"production"!==n.env.NODE_ENV?x(void 0===t[r],"mergeObjectsWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",r):x(void 0===t[r]),t[r]=e}),t}function l(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);return null==n?r:null==r?n:c(n,r)}}function p(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}var f=t("./ReactComponent"),d=t("./ReactContext"),h=t("./ReactCurrentOwner"),m=t("./ReactElement"),v=t("./ReactElementValidator"),y=t("./ReactEmptyComponent"),g=t("./ReactErrorUtils"),E=t("./ReactLegacyElement"),_=t("./ReactOwner"),C=t("./ReactPerf"),R=t("./ReactPropTransferer"),b=t("./ReactPropTypeLocations"),N=t("./ReactPropTypeLocationNames"),w=t("./ReactUpdates"),O=t("./Object.assign"),D=t("./instantiateReactComponent"),x=t("./invariant"),M=t("./keyMirror"),T=t("./keyOf"),I=t("./monitorCodeUse"),P=t("./mapObject"),S=t("./shouldUpdateReactComponent"),k=t("./warning"),L=T({mixins:null}),A=M({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),U=[],V={mixins:A.DEFINE_MANY,statics:A.DEFINE_MANY,propTypes:A.DEFINE_MANY,contextTypes:A.DEFINE_MANY,childContextTypes:A.DEFINE_MANY,getDefaultProps:A.DEFINE_MANY_MERGED,getInitialState:A.DEFINE_MANY_MERGED,getChildContext:A.DEFINE_MANY_MERGED,render:A.DEFINE_ONCE,componentWillMount:A.DEFINE_MANY,componentDidMount:A.DEFINE_MANY,componentWillReceiveProps:A.DEFINE_MANY,shouldComponentUpdate:A.DEFINE_ONCE,componentWillUpdate:A.DEFINE_MANY,componentDidUpdate:A.DEFINE_MANY,componentWillUnmount:A.DEFINE_MANY,updateComponent:A.OVERRIDE_BASE},j={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)s(t,e[n])},childContextTypes:function(t,e){o(t,e,b.childContext),t.childContextTypes=O({},t.childContextTypes,e)},contextTypes:function(t,e){o(t,e,b.context),t.contextTypes=O({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps=t.getDefaultProps?l(t.getDefaultProps,e):e},propTypes:function(t,e){o(t,e,b.prop),t.propTypes=O({},t.propTypes,e)},statics:function(t,e){u(t,e)}},B=M({MOUNTING:null,UNMOUNTING:null,RECEIVING_PROPS:null}),F={construct:function(t){f.Mixin.construct.apply(this,arguments),_.Mixin.construct.apply(this,arguments),this.state=null,this._pendingState=null,this.context=null,this._compositeLifeCycleState=null},isMounted:function(){return f.Mixin.isMounted.call(this)&&this._compositeLifeCycleState!==B.MOUNTING},mountComponent:C.measure("ReactCompositeComponent","mountComponent",function(t,e,r){f.Mixin.mountComponent.call(this,t,e,r),this._compositeLifeCycleState=B.MOUNTING,this.__reactAutoBindMap&&this._bindAutoBindMethods(),this.context=this._processContext(this._currentElement._context),this.props=this._processProps(this.props),this.state=this.getInitialState?this.getInitialState():null,"production"!==n.env.NODE_ENV?x("object"==typeof this.state&&!Array.isArray(this.state),"%s.getInitialState(): must return an object or null",this.constructor.displayName||"ReactCompositeComponent"):x("object"==typeof this.state&&!Array.isArray(this.state)),this._pendingState=null,this._pendingForceUpdate=!1,this.componentWillMount&&(this.componentWillMount(),this._pendingState&&(this.state=this._pendingState,this._pendingState=null)),this._renderedComponent=D(this._renderValidatedComponent(),this._currentElement.type),this._compositeLifeCycleState=null;var o=this._renderedComponent.mountComponent(t,e,r+1);return this.componentDidMount&&e.getReactMountReady().enqueue(this.componentDidMount,this),o}),unmountComponent:function(){this._compositeLifeCycleState=B.UNMOUNTING,this.componentWillUnmount&&this.componentWillUnmount(),this._compositeLifeCycleState=null,this._renderedComponent.unmountComponent(),this._renderedComponent=null,f.Mixin.unmountComponent.call(this)},setState:function(t,e){"production"!==n.env.NODE_ENV?x("object"==typeof t||null==t,"setState(...): takes an object of state variables to update."):x("object"==typeof t||null==t),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?k(null!=t,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."):null),this.replaceState(O({},this._pendingState||this.state,t),e)},replaceState:function(t,e){a(this),this._pendingState=t,this._compositeLifeCycleState!==B.MOUNTING&&w.enqueueUpdate(this,e)},_processContext:function(t){var e=null,r=this.constructor.contextTypes;if(r){e={};for(var o in r)e[o]=t[o];"production"!==n.env.NODE_ENV&&this._checkPropTypes(r,e,b.context)}return e},_processChildContext:function(t){var e=this.getChildContext&&this.getChildContext(),r=this.constructor.displayName||"ReactCompositeComponent";if(e){"production"!==n.env.NODE_ENV?x("object"==typeof this.constructor.childContextTypes,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",r):x("object"==typeof this.constructor.childContextTypes),"production"!==n.env.NODE_ENV&&this._checkPropTypes(this.constructor.childContextTypes,e,b.childContext);for(var o in e)"production"!==n.env.NODE_ENV?x(o in this.constructor.childContextTypes,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',r,o):x(o in this.constructor.childContextTypes);return O({},t,e)}return t},_processProps:function(t){if("production"!==n.env.NODE_ENV){var e=this.constructor.propTypes;e&&this._checkPropTypes(e,t,b.prop)}return t},_checkPropTypes:function(t,e,o){var i=this.constructor.displayName;for(var a in t)if(t.hasOwnProperty(a)){var s=t[a](e,a,i,o);if(s instanceof Error){var u=r(this);"production"!==n.env.NODE_ENV?k(!1,s.message+u):null}}},performUpdateIfNecessary:function(t){var e=this._compositeLifeCycleState;if(e!==B.MOUNTING&&e!==B.RECEIVING_PROPS&&(null!=this._pendingElement||null!=this._pendingState||this._pendingForceUpdate)){var r=this.context,o=this.props,i=this._currentElement;null!=this._pendingElement&&(i=this._pendingElement,r=this._processContext(i._context),o=this._processProps(i.props),this._pendingElement=null,this._compositeLifeCycleState=B.RECEIVING_PROPS,this.componentWillReceiveProps&&this.componentWillReceiveProps(o,r)),this._compositeLifeCycleState=null;var a=this._pendingState||this.state;this._pendingState=null;var s=this._pendingForceUpdate||!this.shouldComponentUpdate||this.shouldComponentUpdate(o,a,r);"production"!==n.env.NODE_ENV&&"undefined"==typeof s&&console.warn((this.constructor.displayName||"ReactCompositeComponent")+".shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false."),s?(this._pendingForceUpdate=!1,this._performComponentUpdate(i,o,a,r,t)):(this._currentElement=i,this.props=o,this.state=a,this.context=r,this._owner=i._owner)}},_performComponentUpdate:function(t,e,n,r,o){var i=this._currentElement,a=this.props,s=this.state,u=this.context;this.componentWillUpdate&&this.componentWillUpdate(e,n,r),this._currentElement=t,this.props=e,this.state=n,this.context=r,this._owner=t._owner,this.updateComponent(o,i),this.componentDidUpdate&&o.getReactMountReady().enqueue(this.componentDidUpdate.bind(this,a,s,u),this)},receiveComponent:function(t,e){(t!==this._currentElement||null==t._owner)&&f.Mixin.receiveComponent.call(this,t,e)},updateComponent:C.measure("ReactCompositeComponent","updateComponent",function(t,e){f.Mixin.updateComponent.call(this,t,e);var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(S(r,o))n.receiveComponent(o,t);else{var i=this._rootNodeID,a=n._rootNodeID;n.unmountComponent(),this._renderedComponent=D(o,this._currentElement.type);var s=this._renderedComponent.mountComponent(i,t,this._mountDepth+1);f.BackendIDOperations.dangerouslyReplaceNodeWithMarkupByID(a,s)}}),forceUpdate:function(t){var e=this._compositeLifeCycleState;"production"!==n.env.NODE_ENV?x(this.isMounted()||e===B.MOUNTING,"forceUpdate(...): Can only force an update on mounted or mounting components."):x(this.isMounted()||e===B.MOUNTING),"production"!==n.env.NODE_ENV?x(e!==B.UNMOUNTING&&null==h.current,"forceUpdate(...): Cannot force an update while unmounting component or within a `render` function."):x(e!==B.UNMOUNTING&&null==h.current),this._pendingForceUpdate=!0,w.enqueueUpdate(this,t)},_renderValidatedComponent:C.measure("ReactCompositeComponent","_renderValidatedComponent",function(){var t,e=d.current;d.current=this._processChildContext(this._currentElement._context),h.current=this;try{t=this.render(),null===t||t===!1?(t=y.getEmptyComponent(),y.registerNullComponentID(this._rootNodeID)):y.deregisterNullComponentID(this._rootNodeID)}finally{d.current=e,h.current=null}return"production"!==n.env.NODE_ENV?x(m.isValidElement(t),"%s.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.",this.constructor.displayName||"ReactCompositeComponent"):x(m.isValidElement(t)),t}),_bindAutoBindMethods:function(){for(var t in this.__reactAutoBindMap)if(this.__reactAutoBindMap.hasOwnProperty(t)){var e=this.__reactAutoBindMap[t];this[t]=this._bindAutoBindMethod(g.guard(e,this.constructor.displayName+"."+t))}},_bindAutoBindMethod:function(t){var e=this,r=t.bind(e);if("production"!==n.env.NODE_ENV){r.__reactBoundContext=e,r.__reactBoundMethod=t,r.__reactBoundArguments=null;var o=e.constructor.displayName,i=r.bind;r.bind=function(n){for(var a=[],s=1,u=arguments.length;u>s;s++)a.push(arguments[s]);if(n!==e&&null!==n)I("react_bind_warning",{component:o}),console.warn("bind(): React component methods may only be bound to the component instance. See "+o);else if(!a.length)return I("react_bind_warning",{component:o}),console.warn("bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See "+o),r;var c=i.apply(r,arguments);return c.__reactBoundContext=e,c.__reactBoundMethod=t,c.__reactBoundArguments=a,c}}return r}},z=function(){};O(z.prototype,f.Mixin,_.Mixin,R.Mixin,F);var H={LifeCycle:B,Base:z,createClass:function(t){var e=function(t){};e.prototype=new z,e.prototype.constructor=e,U.forEach(s.bind(null,e)),s(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),"production"!==n.env.NODE_ENV?x(e.prototype.render,"createClass(...): Class specification must implement a `render` method."):x(e.prototype.render),"production"!==n.env.NODE_ENV&&e.prototype.componentShouldUpdate&&(I("react_component_should_update_warning",{component:t.displayName}),console.warn((t.displayName||"A component")+" has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value."));for(var r in V)e.prototype[r]||(e.prototype[r]=null);return E.wrapFactory("production"!==n.env.NODE_ENV?v.createFactory(e):m.createFactory(e))},injection:{injectMixin:function(t){U.push(t)}}};e.exports=H}).call(this,t("_process"))},{"./Object.assign":109,"./ReactComponent":115,"./ReactContext":118,"./ReactCurrentOwner":119,"./ReactElement":135,"./ReactElementValidator":136,"./ReactEmptyComponent":137,"./ReactErrorUtils":138,"./ReactLegacyElement":144,"./ReactOwner":150,"./ReactPerf":151,"./ReactPropTransferer":152,"./ReactPropTypeLocationNames":153,"./ReactPropTypeLocations":154,"./ReactUpdates":162,"./instantiateReactComponent":209,"./invariant":210,"./keyMirror":216,"./keyOf":217,"./mapObject":218,"./monitorCodeUse":220,"./shouldUpdateReactComponent":226,"./warning":229,_process:21}],118:[function(t,e,n){"use strict";var r=t("./Object.assign"),o={current:{},withContext:function(t,e){var n,i=o.current;o.current=r({},i,t);try{n=e()}finally{o.current=i}return n}};e.exports=o},{"./Object.assign":109}],119:[function(t,e,n){"use strict";var r={current:null};e.exports=r},{}],120:[function(t,e,n){(function(n){"use strict";function r(t){return a.markNonLegacyFactory("production"!==n.env.NODE_ENV?i.createFactory(t):o.createFactory(t))}var o=t("./ReactElement"),i=t("./ReactElementValidator"),a=t("./ReactLegacyElement"),s=t("./mapObject"),u=s({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},r);e.exports=u}).call(this,t("_process"))},{"./ReactElement":135,"./ReactElementValidator":136,"./ReactLegacyElement":144,"./mapObject":218,_process:21}],121:[function(t,e,n){"use strict";var r=t("./AutoFocusMixin"),o=t("./ReactBrowserComponentMixin"),i=t("./ReactCompositeComponent"),a=t("./ReactElement"),s=t("./ReactDOM"),u=t("./keyMirror"),c=a.createFactory(s.button.type),l=u({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),p=i.createClass({displayName:"ReactDOMButton",mixins:[r,o],render:function(){var t={};for(var e in this.props)!this.props.hasOwnProperty(e)||this.props.disabled&&l[e]||(t[e]=this.props[e]);return c(t,this.props.children)}});e.exports=p},{"./AutoFocusMixin":84,"./ReactBrowserComponentMixin":112,"./ReactCompositeComponent":117,"./ReactDOM":120,"./ReactElement":135,"./keyMirror":216}],122:[function(t,e,n){(function(n){"use strict";function r(t){t&&("production"!==n.env.NODE_ENV?g(null==t.children||null==t.dangerouslySetInnerHTML,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):g(null==t.children||null==t.dangerouslySetInnerHTML),"production"!==n.env.NODE_ENV&&t.contentEditable&&null!=t.children&&console.warn("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),"production"!==n.env.NODE_ENV?g(null==t.style||"object"==typeof t.style,"The `style` prop expects a mapping from style properties to values, not a string."):g(null==t.style||"object"==typeof t.style))}function o(t,e,r,o){"production"!==n.env.NODE_ENV&&("onScroll"!==e||E("scroll",!0)||(C("react_no_scroll_event"),console.warn("This browser doesn't support the `onScroll` event")));var i=d.findReactContainerForID(t);if(i){var a=i.nodeType===D?i.ownerDocument:i;b(e,a)}o.getPutListenerQueue().enqueuePutListener(t,e,r)}function i(t){I.call(T,t)||("production"!==n.env.NODE_ENV?g(M.test(t),"Invalid tag: %s",t):g(M.test(t)),T[t]=!0)}function a(t){i(t),this._tag=t,this.tagName=t.toUpperCase()}var s=t("./CSSPropertyOperations"),u=t("./DOMProperty"),c=t("./DOMPropertyOperations"),l=t("./ReactBrowserComponentMixin"),p=t("./ReactComponent"),f=t("./ReactBrowserEventEmitter"),d=t("./ReactMount"),h=t("./ReactMultiChild"),m=t("./ReactPerf"),v=t("./Object.assign"),y=t("./escapeTextForBrowser"),g=t("./invariant"),E=t("./isEventSupported"),_=t("./keyOf"),C=t("./monitorCodeUse"),R=f.deleteListener,b=f.listenTo,N=f.registrationNameModules,w={string:!0,number:!0},O=_({style:null}),D=1,x={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},M=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,T={},I={}.hasOwnProperty;a.displayName="ReactDOMComponent",a.Mixin={mountComponent:m.measure("ReactDOMComponent","mountComponent",function(t,e,n){p.Mixin.mountComponent.call(this,t,e,n),r(this.props);var o=x[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(e)+this._createContentMarkup(e)+o}),_createOpenTagMarkupAndPutListeners:function(t){var e=this.props,n="<"+this._tag;for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];if(null!=i)if(N.hasOwnProperty(r))o(this._rootNodeID,r,i,t);else{r===O&&(i&&(i=e.style=v({},e.style)),i=s.createMarkupForStyles(i));var a=c.createMarkupForProperty(r,i);a&&(n+=" "+a)}}if(t.renderToStaticMarkup)return n+">";var u=c.createMarkupForID(this._rootNodeID);return n+" "+u+">"},_createContentMarkup:function(t){var e=this.props.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html)return e.__html}else{var n=w[typeof this.props.children]?this.props.children:null,r=null!=n?null:this.props.children;if(null!=n)return y(n);if(null!=r){var o=this.mountChildren(r,t);return o.join("")}}return""},receiveComponent:function(t,e){(t!==this._currentElement||null==t._owner)&&p.Mixin.receiveComponent.call(this,t,e)},updateComponent:m.measure("ReactDOMComponent","updateComponent",function(t,e){r(this._currentElement.props),p.Mixin.updateComponent.call(this,t,e),this._updateDOMProperties(e.props,t),this._updateDOMChildren(e.props,t)}),_updateDOMProperties:function(t,e){var n,r,i,a=this.props;for(n in t)if(!a.hasOwnProperty(n)&&t.hasOwnProperty(n))if(n===O){var s=t[n];for(r in s)s.hasOwnProperty(r)&&(i=i||{},i[r]="")}else N.hasOwnProperty(n)?R(this._rootNodeID,n):(u.isStandardName[n]||u.isCustomAttribute(n))&&p.BackendIDOperations.deletePropertyByID(this._rootNodeID,n);for(n in a){var c=a[n],l=t[n];if(a.hasOwnProperty(n)&&c!==l)if(n===O)if(c&&(c=a.style=v({},c)),l){for(r in l)!l.hasOwnProperty(r)||c&&c.hasOwnProperty(r)||(i=i||{},i[r]="");for(r in c)c.hasOwnProperty(r)&&l[r]!==c[r]&&(i=i||{},i[r]=c[r])}else i=c;else N.hasOwnProperty(n)?o(this._rootNodeID,n,c,e):(u.isStandardName[n]||u.isCustomAttribute(n))&&p.BackendIDOperations.updatePropertyByID(this._rootNodeID,n,c)}i&&p.BackendIDOperations.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(t,e){var n=this.props,r=w[typeof t.children]?t.children:null,o=w[typeof n.children]?n.children:null,i=t.dangerouslySetInnerHTML&&t.dangerouslySetInnerHTML.__html,a=n.dangerouslySetInnerHTML&&n.dangerouslySetInnerHTML.__html,s=null!=r?null:t.children,u=null!=o?null:n.children,c=null!=r||null!=i,l=null!=o||null!=a;null!=s&&null==u?this.updateChildren(null,e):c&&!l&&this.updateTextContent(""),null!=o?r!==o&&this.updateTextContent(""+o):null!=a?i!==a&&p.BackendIDOperations.updateInnerHTMLByID(this._rootNodeID,a):null!=u&&this.updateChildren(u,e)},unmountComponent:function(){this.unmountChildren(),f.deleteAllListeners(this._rootNodeID),p.Mixin.unmountComponent.call(this)}},v(a.prototype,p.Mixin,a.Mixin,h.Mixin,l),e.exports=a}).call(this,t("_process"))},{"./CSSPropertyOperations":87,"./DOMProperty":93,"./DOMPropertyOperations":94,"./Object.assign":109,"./ReactBrowserComponentMixin":112,"./ReactBrowserEventEmitter":113,"./ReactComponent":115,"./ReactMount":146,"./ReactMultiChild":147,"./ReactPerf":151,"./escapeTextForBrowser":193,"./invariant":210,"./isEventSupported":211,"./keyOf":217,"./monitorCodeUse":220,_process:21}],123:[function(t,e,n){"use strict";var r=t("./EventConstants"),o=t("./LocalEventTrapMixin"),i=t("./ReactBrowserComponentMixin"),a=t("./ReactCompositeComponent"),s=t("./ReactElement"),u=t("./ReactDOM"),c=s.createFactory(u.form.type),l=a.createClass({displayName:"ReactDOMForm",mixins:[i,o],render:function(){return c(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(r.topLevelTypes.topSubmit,"submit")}});e.exports=l},{"./EventConstants":98,"./LocalEventTrapMixin":107,"./ReactBrowserComponentMixin":112,"./ReactCompositeComponent":117,"./ReactDOM":120,"./ReactElement":135}],124:[function(t,e,n){(function(n){"use strict";var r=t("./CSSPropertyOperations"),o=t("./DOMChildrenOperations"),i=t("./DOMPropertyOperations"),a=t("./ReactMount"),s=t("./ReactPerf"),u=t("./invariant"),c=t("./setInnerHTML"),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},p={updatePropertyByID:s.measure("ReactDOMIDOperations","updatePropertyByID",function(t,e,r){var o=a.getNode(t);"production"!==n.env.NODE_ENV?u(!l.hasOwnProperty(e),"updatePropertyByID(...): %s",l[e]):u(!l.hasOwnProperty(e)),null!=r?i.setValueForProperty(o,e,r):i.deleteValueForProperty(o,e)}),deletePropertyByID:s.measure("ReactDOMIDOperations","deletePropertyByID",function(t,e,r){var o=a.getNode(t);"production"!==n.env.NODE_ENV?u(!l.hasOwnProperty(e),"updatePropertyByID(...): %s",l[e]):u(!l.hasOwnProperty(e)),i.deleteValueForProperty(o,e,r)}),updateStylesByID:s.measure("ReactDOMIDOperations","updateStylesByID",function(t,e){var n=a.getNode(t);r.setValueForStyles(n,e)}),updateInnerHTMLByID:s.measure("ReactDOMIDOperations","updateInnerHTMLByID",function(t,e){var n=a.getNode(t);c(n,e)}),updateTextContentByID:s.measure("ReactDOMIDOperations","updateTextContentByID",function(t,e){var n=a.getNode(t);o.updateTextContent(n,e)}),dangerouslyReplaceNodeWithMarkupByID:s.measure("ReactDOMIDOperations","dangerouslyReplaceNodeWithMarkupByID",function(t,e){var n=a.getNode(t);o.dangerouslyReplaceNodeWithMarkup(n,e)}),dangerouslyProcessChildrenUpdates:s.measure("ReactDOMIDOperations","dangerouslyProcessChildrenUpdates",function(t,e){for(var n=0;n<t.length;n++)t[n].parentNode=a.getNode(t[n].parentID);o.processUpdates(t,e)})};e.exports=p}).call(this,t("_process"))},{"./CSSPropertyOperations":87,"./DOMChildrenOperations":92,"./DOMPropertyOperations":94,"./ReactMount":146,"./ReactPerf":151,"./invariant":210,"./setInnerHTML":224,_process:21}],125:[function(t,e,n){"use strict";var r=t("./EventConstants"),o=t("./LocalEventTrapMixin"),i=t("./ReactBrowserComponentMixin"),a=t("./ReactCompositeComponent"),s=t("./ReactElement"),u=t("./ReactDOM"),c=s.createFactory(u.img.type),l=a.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[i,o],render:function(){return c(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(r.topLevelTypes.topError,"error")}});e.exports=l},{"./EventConstants":98,"./LocalEventTrapMixin":107,"./ReactBrowserComponentMixin":112,"./ReactCompositeComponent":117,"./ReactDOM":120,"./ReactElement":135}],126:[function(t,e,n){(function(n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=t("./AutoFocusMixin"),i=t("./DOMPropertyOperations"),a=t("./LinkedValueUtils"),s=t("./ReactBrowserComponentMixin"),u=t("./ReactCompositeComponent"),c=t("./ReactElement"),l=t("./ReactDOM"),p=t("./ReactMount"),f=t("./ReactUpdates"),d=t("./Object.assign"),h=t("./invariant"),m=c.createFactory(l.input.type),v={},y=u.createClass({displayName:"ReactDOMInput",mixins:[o,a.Mixin,s],getInitialState:function(){var t=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=t?t:null}},render:function(){var t=d({},this.props);t.defaultChecked=null,t.defaultValue=null;var e=a.getValue(this);t.value=null!=e?e:this.state.initialValue;var n=a.getChecked(this);return t.checked=null!=n?n:this.state.initialChecked,t.onChange=this._handleChange,m(t,this.props.children)},componentDidMount:function(){var t=p.getID(this.getDOMNode());v[t]=this},componentWillUnmount:function(){var t=this.getDOMNode(),e=p.getID(t);delete v[e]},componentDidUpdate:function(t,e,n){var r=this.getDOMNode();null!=this.props.checked&&i.setValueForProperty(r,"checked",this.props.checked||!1);var o=a.getValue(this);null!=o&&i.setValueForProperty(r,"value",""+o)},_handleChange:function(t){var e,o=a.getOnChange(this);o&&(e=o.call(this,t)),f.asap(r,this);var i=this.props.name;if("radio"===this.props.type&&null!=i){for(var s=this.getDOMNode(),u=s;u.parentNode;)u=u.parentNode;for(var c=u.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),l=0,d=c.length;d>l;l++){var m=c[l];if(m!==s&&m.form===s.form){var y=p.getID(m);"production"!==n.env.NODE_ENV?h(y,"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."):h(y);var g=v[y];"production"!==n.env.NODE_ENV?h(g,"ReactDOMInput: Unknown radio button ID %s.",y):h(g),f.asap(r,g)}}}return e}});e.exports=y}).call(this,t("_process"))},{"./AutoFocusMixin":84,"./DOMPropertyOperations":94,"./LinkedValueUtils":106,"./Object.assign":109,"./ReactBrowserComponentMixin":112,"./ReactCompositeComponent":117,"./ReactDOM":120,"./ReactElement":135,"./ReactMount":146,"./ReactUpdates":162,"./invariant":210,_process:21}],127:[function(t,e,n){(function(n){"use strict";var r=t("./ReactBrowserComponentMixin"),o=t("./ReactCompositeComponent"),i=t("./ReactElement"),a=t("./ReactDOM"),s=t("./warning"),u=i.createFactory(a.option.type),c=o.createClass({displayName:"ReactDOMOption",mixins:[r],componentWillMount:function(){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?s(null==this.props.selected,"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."):null)},render:function(){return u(this.props,this.props.children)}});e.exports=c}).call(this,t("_process"))},{"./ReactBrowserComponentMixin":112,"./ReactCompositeComponent":117,"./ReactDOM":120,"./ReactElement":135,"./warning":229,_process:21}],128:[function(t,e,n){"use strict";function r(){this.isMounted()&&(this.setState({value:this._pendingValue}),this._pendingValue=0)}function o(t,e,n){if(null!=t[e])if(t.multiple){if(!Array.isArray(t[e]))return new Error("The `"+e+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(t[e]))return new Error("The `"+e+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function i(t,e){var n,r,o,i=t.props.multiple,a=null!=e?e:t.state.value,s=t.getDOMNode().options;if(i)for(n={},r=0,o=a.length;o>r;++r)n[""+a[r]]=!0;else n=""+a;for(r=0,o=s.length;o>r;r++){var u=i?n.hasOwnProperty(s[r].value):s[r].value===n;u!==s[r].selected&&(s[r].selected=u)}}var a=t("./AutoFocusMixin"),s=t("./LinkedValueUtils"),u=t("./ReactBrowserComponentMixin"),c=t("./ReactCompositeComponent"),l=t("./ReactElement"),p=t("./ReactDOM"),f=t("./ReactUpdates"),d=t("./Object.assign"),h=l.createFactory(p.select.type),m=c.createClass({displayName:"ReactDOMSelect",mixins:[a,s.Mixin,u],
propTypes:{defaultValue:o,value:o},getInitialState:function(){return{value:this.props.defaultValue||(this.props.multiple?[]:"")}},componentWillMount:function(){this._pendingValue=null},componentWillReceiveProps:function(t){!this.props.multiple&&t.multiple?this.setState({value:[this.state.value]}):this.props.multiple&&!t.multiple&&this.setState({value:this.state.value[0]})},render:function(){var t=d({},this.props);return t.onChange=this._handleChange,t.value=null,h(t,this.props.children)},componentDidMount:function(){i(this,s.getValue(this))},componentDidUpdate:function(t){var e=s.getValue(this),n=!!t.multiple,r=!!this.props.multiple;(null!=e||n!==r)&&i(this,e)},_handleChange:function(t){var e,n=s.getOnChange(this);n&&(e=n.call(this,t));var o;if(this.props.multiple){o=[];for(var i=t.target.options,a=0,u=i.length;u>a;a++)i[a].selected&&o.push(i[a].value)}else o=t.target.value;return this._pendingValue=o,f.asap(r,this),e}});e.exports=m},{"./AutoFocusMixin":84,"./LinkedValueUtils":106,"./Object.assign":109,"./ReactBrowserComponentMixin":112,"./ReactCompositeComponent":117,"./ReactDOM":120,"./ReactElement":135,"./ReactUpdates":162}],129:[function(t,e,n){"use strict";function r(t,e,n,r){return t===n&&e===r}function o(t){var e=document.selection,n=e.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(t),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(t){var e=window.getSelection&&window.getSelection();if(!e||0===e.rangeCount)return null;var n=e.anchorNode,o=e.anchorOffset,i=e.focusNode,a=e.focusOffset,s=e.getRangeAt(0),u=r(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset),c=u?0:s.toString().length,l=s.cloneRange();l.selectNodeContents(t),l.setEnd(s.startContainer,s.startOffset);var p=r(l.startContainer,l.startOffset,l.endContainer,l.endOffset),f=p?0:l.toString().length,d=f+c,h=document.createRange();h.setStart(n,o),h.setEnd(i,a);var m=h.collapsed;return{start:m?d:f,end:m?f:d}}function a(t,e){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof e.end?(n=e.start,r=n):e.start>e.end?(n=e.end,r=e.start):(n=e.start,r=e.end),o.moveToElementText(t),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(t,e){if(window.getSelection){var n=window.getSelection(),r=t[l()].length,o=Math.min(e.start,r),i="undefined"==typeof e.end?o:Math.min(e.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=c(t,o),u=c(t,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=t("./ExecutionEnvironment"),c=t("./getNodeForCharacterOffset"),l=t("./getTextContentAccessor"),p=u.canUseDOM&&document.selection,f={getOffsets:p?o:i,setOffsets:p?a:s};e.exports=f},{"./ExecutionEnvironment":104,"./getNodeForCharacterOffset":203,"./getTextContentAccessor":205}],130:[function(t,e,n){(function(n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=t("./AutoFocusMixin"),i=t("./DOMPropertyOperations"),a=t("./LinkedValueUtils"),s=t("./ReactBrowserComponentMixin"),u=t("./ReactCompositeComponent"),c=t("./ReactElement"),l=t("./ReactDOM"),p=t("./ReactUpdates"),f=t("./Object.assign"),d=t("./invariant"),h=t("./warning"),m=c.createFactory(l.textarea.type),v=u.createClass({displayName:"ReactDOMTextarea",mixins:[o,a.Mixin,s],getInitialState:function(){var t=this.props.defaultValue,e=this.props.children;null!=e&&("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?h(!1,"Use the `defaultValue` or `value` props instead of setting children on <textarea>."):null),"production"!==n.env.NODE_ENV?d(null==t,"If you supply `defaultValue` on a <textarea>, do not pass children."):d(null==t),Array.isArray(e)&&("production"!==n.env.NODE_ENV?d(e.length<=1,"<textarea> can only have at most one child."):d(e.length<=1),e=e[0]),t=""+e),null==t&&(t="");var r=a.getValue(this);return{initialValue:""+(null!=r?r:t)}},render:function(){var t=f({},this.props);return"production"!==n.env.NODE_ENV?d(null==t.dangerouslySetInnerHTML,"`dangerouslySetInnerHTML` does not make sense on <textarea>."):d(null==t.dangerouslySetInnerHTML),t.defaultValue=null,t.value=null,t.onChange=this._handleChange,m(t,this.state.initialValue)},componentDidUpdate:function(t,e,n){var r=a.getValue(this);if(null!=r){var o=this.getDOMNode();i.setValueForProperty(o,"value",""+r)}},_handleChange:function(t){var e,n=a.getOnChange(this);return n&&(e=n.call(this,t)),p.asap(r,this),e}});e.exports=v}).call(this,t("_process"))},{"./AutoFocusMixin":84,"./DOMPropertyOperations":94,"./LinkedValueUtils":106,"./Object.assign":109,"./ReactBrowserComponentMixin":112,"./ReactCompositeComponent":117,"./ReactDOM":120,"./ReactElement":135,"./ReactUpdates":162,"./invariant":210,"./warning":229,_process:21}],131:[function(t,e,n){"use strict";function r(){this.reinitializeTransaction()}var o=t("./ReactUpdates"),i=t("./Transaction"),a=t("./Object.assign"),s=t("./emptyFunction"),u={initialize:s,close:function(){f.isBatchingUpdates=!1}},c={initialize:s,close:o.flushBatchedUpdates.bind(o)},l=[c,u];a(r.prototype,i.Mixin,{getTransactionWrappers:function(){return l}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(t,e,n){var r=f.isBatchingUpdates;f.isBatchingUpdates=!0,r?t(e,n):p.perform(t,null,e,n)}};e.exports=f},{"./Object.assign":109,"./ReactUpdates":162,"./Transaction":178,"./emptyFunction":191}],132:[function(t,e,n){(function(n){"use strict";function r(){if(w.EventEmitter.injectReactEventListener(N),w.EventPluginHub.injectEventPluginOrder(u),w.EventPluginHub.injectInstanceHandle(O),w.EventPluginHub.injectMount(D),w.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:T,EnterLeaveEventPlugin:c,ChangeEventPlugin:i,CompositionEventPlugin:s,MobileSafariClickEventPlugin:f,SelectEventPlugin:x,BeforeInputEventPlugin:o}),w.NativeComponent.injectGenericComponentClass(v),w.NativeComponent.injectComponentClasses({button:y,form:g,img:E,input:_,option:C,select:R,textarea:b,html:P("html"),head:P("head"),body:P("body")}),w.CompositeComponent.injectMixin(d),w.DOMProperty.injectDOMPropertyConfig(p),w.DOMProperty.injectDOMPropertyConfig(I),w.EmptyComponent.injectEmptyComponent("noscript"),w.Updates.injectReconcileTransaction(h.ReactReconcileTransaction),w.Updates.injectBatchingStrategy(m),w.RootIndex.injectCreateReactRootIndex(l.canUseDOM?a.createReactRootIndex:M.createReactRootIndex),w.Component.injectEnvironment(h),"production"!==n.env.NODE_ENV){var e=l.canUseDOM&&window.location.href||"";if(/[?&]react_perf\b/.test(e)){var r=t("./ReactDefaultPerf");r.start()}}}var o=t("./BeforeInputEventPlugin"),i=t("./ChangeEventPlugin"),a=t("./ClientReactRootIndex"),s=t("./CompositionEventPlugin"),u=t("./DefaultEventPluginOrder"),c=t("./EnterLeaveEventPlugin"),l=t("./ExecutionEnvironment"),p=t("./HTMLDOMPropertyConfig"),f=t("./MobileSafariClickEventPlugin"),d=t("./ReactBrowserComponentMixin"),h=t("./ReactComponentBrowserEnvironment"),m=t("./ReactDefaultBatchingStrategy"),v=t("./ReactDOMComponent"),y=t("./ReactDOMButton"),g=t("./ReactDOMForm"),E=t("./ReactDOMImg"),_=t("./ReactDOMInput"),C=t("./ReactDOMOption"),R=t("./ReactDOMSelect"),b=t("./ReactDOMTextarea"),N=t("./ReactEventListener"),w=t("./ReactInjection"),O=t("./ReactInstanceHandles"),D=t("./ReactMount"),x=t("./SelectEventPlugin"),M=t("./ServerReactRootIndex"),T=t("./SimpleEventPlugin"),I=t("./SVGDOMPropertyConfig"),P=t("./createFullPageComponent");e.exports={inject:r}}).call(this,t("_process"))},{"./BeforeInputEventPlugin":85,"./ChangeEventPlugin":89,"./ClientReactRootIndex":90,"./CompositionEventPlugin":91,"./DefaultEventPluginOrder":96,"./EnterLeaveEventPlugin":97,"./ExecutionEnvironment":104,"./HTMLDOMPropertyConfig":105,"./MobileSafariClickEventPlugin":108,"./ReactBrowserComponentMixin":112,"./ReactComponentBrowserEnvironment":116,"./ReactDOMButton":121,"./ReactDOMComponent":122,"./ReactDOMForm":123,"./ReactDOMImg":125,"./ReactDOMInput":126,"./ReactDOMOption":127,"./ReactDOMSelect":128,"./ReactDOMTextarea":130,"./ReactDefaultBatchingStrategy":131,"./ReactDefaultPerf":133,"./ReactEventListener":140,"./ReactInjection":141,"./ReactInstanceHandles":143,"./ReactMount":146,"./SVGDOMPropertyConfig":163,"./SelectEventPlugin":164,"./ServerReactRootIndex":165,"./SimpleEventPlugin":166,"./createFullPageComponent":186,_process:21}],133:[function(t,e,n){"use strict";function r(t){return Math.floor(100*t)/100}function o(t,e,n){t[e]=(t[e]||0)+n}var i=t("./DOMProperty"),a=t("./ReactDefaultPerfAnalysis"),s=t("./ReactMount"),u=t("./ReactPerf"),c=t("./performanceNow"),l={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){l._injected||u.injection.injectMeasure(l.measure),l._allMeasurements.length=0,u.enableMeasure=!0},stop:function(){u.enableMeasure=!1},getLastMeasurements:function(){return l._allMeasurements},printExclusive:function(t){t=t||l._allMeasurements;var e=a.getExclusiveSummary(t);console.table(e.map(function(t){return{"Component class name":t.componentName,"Total inclusive time (ms)":r(t.inclusive),"Exclusive mount time (ms)":r(t.exclusive),"Exclusive render time (ms)":r(t.render),"Mount time per instance (ms)":r(t.exclusive/t.count),"Render time per instance (ms)":r(t.render/t.count),Instances:t.count}}))},printInclusive:function(t){t=t||l._allMeasurements;var e=a.getInclusiveSummary(t);console.table(e.map(function(t){return{"Owner > component":t.componentName,"Inclusive time (ms)":r(t.time),Instances:t.count}})),console.log("Total time:",a.getTotalTime(t).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(t){var e=a.getInclusiveSummary(t,!0);return e.map(function(t){return{"Owner > component":t.componentName,"Wasted time (ms)":t.time,Instances:t.count}})},printWasted:function(t){t=t||l._allMeasurements,console.table(l.getMeasurementsSummaryMap(t)),console.log("Total time:",a.getTotalTime(t).toFixed(2)+" ms")},printDOM:function(t){t=t||l._allMeasurements;var e=a.getDOMSummary(t);console.table(e.map(function(t){var e={};return e[i.ID_ATTRIBUTE_NAME]=t.id,e.type=t.type,e.args=JSON.stringify(t.args),e})),console.log("Total time:",a.getTotalTime(t).toFixed(2)+" ms")},_recordWrite:function(t,e,n,r){var o=l._allMeasurements[l._allMeasurements.length-1].writes;o[t]=o[t]||[],o[t].push({type:e,time:n,args:r})},measure:function(t,e,n){return function(){for(var r=[],i=0,a=arguments.length;a>i;i++)r.push(arguments[i]);var u,p,f;if("_renderNewRootComponent"===e||"flushBatchedUpdates"===e)return l._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0}),f=c(),p=n.apply(this,r),l._allMeasurements[l._allMeasurements.length-1].totalTime=c()-f,p;if("ReactDOMIDOperations"===t||"ReactComponentBrowserEnvironment"===t){if(f=c(),p=n.apply(this,r),u=c()-f,"mountImageIntoNode"===e){var d=s.getID(r[1]);l._recordWrite(d,e,u,r[0])}else"dangerouslyProcessChildrenUpdates"===e?r[0].forEach(function(t){var e={};null!==t.fromIndex&&(e.fromIndex=t.fromIndex),null!==t.toIndex&&(e.toIndex=t.toIndex),null!==t.textContent&&(e.textContent=t.textContent),null!==t.markupIndex&&(e.markup=r[1][t.markupIndex]),l._recordWrite(t.parentID,t.type,u,e)}):l._recordWrite(r[0],e,u,Array.prototype.slice.call(r,1));return p}if("ReactCompositeComponent"!==t||"mountComponent"!==e&&"updateComponent"!==e&&"_renderValidatedComponent"!==e)return n.apply(this,r);var h="mountComponent"===e?r[0]:this._rootNodeID,m="_renderValidatedComponent"===e,v="mountComponent"===e,y=l._mountStack,g=l._allMeasurements[l._allMeasurements.length-1];if(m?o(g.counts,h,1):v&&y.push(0),f=c(),p=n.apply(this,r),u=c()-f,m)o(g.render,h,u);else if(v){var E=y.pop();y[y.length-1]+=u,o(g.exclusive,h,u-E),o(g.inclusive,h,u)}else o(g.inclusive,h,u);return g.displayNames[h]={current:this.constructor.displayName,owner:this._owner?this._owner.constructor.displayName:"<root>"},p}}};e.exports=l},{"./DOMProperty":93,"./ReactDefaultPerfAnalysis":134,"./ReactMount":146,"./ReactPerf":151,"./performanceNow":223}],134:[function(t,e,n){function r(t){for(var e=0,n=0;n<t.length;n++){var r=t[n];e+=r.totalTime}return e}function o(t){for(var e=[],n=0;n<t.length;n++){var r,o=t[n];for(r in o.writes)o.writes[r].forEach(function(t){e.push({id:r,type:l[t.type]||t.type,args:t.args})})}return e}function i(t){for(var e,n={},r=0;r<t.length;r++){var o=t[r],i=u({},o.exclusive,o.inclusive);for(var a in i)e=o.displayNames[a].current,n[e]=n[e]||{componentName:e,inclusive:0,exclusive:0,render:0,count:0},o.render[a]&&(n[e].render+=o.render[a]),o.exclusive[a]&&(n[e].exclusive+=o.exclusive[a]),o.inclusive[a]&&(n[e].inclusive+=o.inclusive[a]),o.counts[a]&&(n[e].count+=o.counts[a])}var s=[];for(e in n)n[e].exclusive>=c&&s.push(n[e]);return s.sort(function(t,e){return e.exclusive-t.exclusive}),s}function a(t,e){for(var n,r={},o=0;o<t.length;o++){var i,a=t[o],l=u({},a.exclusive,a.inclusive);e&&(i=s(a));for(var p in l)if(!e||i[p]){var f=a.displayNames[p];n=f.owner+" > "+f.current,r[n]=r[n]||{componentName:n,time:0,count:0},a.inclusive[p]&&(r[n].time+=a.inclusive[p]),a.counts[p]&&(r[n].count+=a.counts[p])}}var d=[];for(n in r)r[n].time>=c&&d.push(r[n]);return d.sort(function(t,e){return e.time-t.time}),d}function s(t){var e={},n=Object.keys(t.writes),r=u({},t.exclusive,t.inclusive);for(var o in r){for(var i=!1,a=0;a<n.length;a++)if(0===n[a].indexOf(o)){i=!0;break}!i&&t.counts[o]>0&&(e[o]=!0)}return e}var u=t("./Object.assign"),c=1.2,l={mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"},p={getExclusiveSummary:i,getInclusiveSummary:a,getDOMSummary:o,getTotalTime:r};e.exports=p},{"./Object.assign":109}],135:[function(t,e,n){(function(n){"use strict";function r(t,e){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:function(){return this._store?this._store[e]:null},set:function(t){"production"!==n.env.NODE_ENV?s(!1,"Don't set the "+e+" property of the component. Mutate the existing props object instead."):null,this._store[e]=t}})}function o(t){try{var e={props:!0};for(var n in e)r(t,n);c=!0}catch(o){}}var i=t("./ReactContext"),a=t("./ReactCurrentOwner"),s=t("./warning"),u={key:!0,ref:!0},c=!1,l=function(t,e,r,o,i,a){return this.type=t,this.key=e,this.ref=r,this._owner=o,this._context=i,"production"!==n.env.NODE_ENV&&(this._store={validated:!1,props:a},c)?void Object.freeze(this):void(this.props=a)};l.prototype={_isReactElement:!0},"production"!==n.env.NODE_ENV&&o(l.prototype),l.createElement=function(t,e,r){var o,c={},p=null,f=null;if(null!=e){f=void 0===e.ref?null:e.ref,"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?s(null!==e.key,"createElement(...): Encountered component with a `key` of null. In a future version, this will be treated as equivalent to the string 'null'; instead, provide an explicit key or use undefined."):null),p=null==e.key?null:""+e.key;for(o in e)e.hasOwnProperty(o)&&!u.hasOwnProperty(o)&&(c[o]=e[o])}var d=arguments.length-2;if(1===d)c.children=r;else if(d>1){for(var h=Array(d),m=0;d>m;m++)h[m]=arguments[m+2];c.children=h}if(t&&t.defaultProps){var v=t.defaultProps;for(o in v)"undefined"==typeof c[o]&&(c[o]=v[o])}return new l(t,p,f,a.current,i.current,c)},l.createFactory=function(t){var e=l.createElement.bind(null,t);return e.type=t,e},l.cloneAndReplaceProps=function(t,e){var r=new l(t.type,t.key,t.ref,t._owner,t._context,e);return"production"!==n.env.NODE_ENV&&(r._store.validated=t._store.validated),r},l.isValidElement=function(t){var e=!(!t||!t._isReactElement);return e},e.exports=l}).call(this,t("_process"))},{"./ReactContext":118,"./ReactCurrentOwner":119,"./warning":229,_process:21}],136:[function(t,e,n){(function(n){"use strict";function r(){var t=f.current;return t&&t.constructor.displayName||void 0}function o(t,e){t._store.validated||null!=t.key||(t._store.validated=!0,a("react_key_warning",'Each child in an array should have a unique "key" prop.',t,e))}function i(t,e,n){g.test(t)&&a("react_numeric_key_warning","Child objects should have non-numeric keys so ordering is preserved.",e,n)}function a(t,e,n,o){var i=r(),a=o.displayName,s=i||a,u=m[t];if(!u.hasOwnProperty(s)){u[s]=!0,e+=i?" Check the render method of "+i+".":" Check the renderComponent call using <"+a+">.";var c=null;n._owner&&n._owner!==f.current&&(c=n._owner.constructor.displayName,e+=" It was passed a child from "+c+"."),e+=" See http://fb.me/react-warning-keys for more information.",d(t,{component:s,componentOwner:c}),console.warn(e)}}function s(){var t=r()||"";v.hasOwnProperty(t)||(v[t]=!0,d("react_object_map_children"))}function u(t,e){if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];l.isValidElement(r)&&o(r,e)}else if(l.isValidElement(t))t._store.validated=!0;else if(t&&"object"==typeof t){s();for(var a in t)i(a,t[a],e)}}function c(t,e,n,r){for(var o in e)if(e.hasOwnProperty(o)){var i;try{i=e[o](n,o,t,r)}catch(a){i=a}i instanceof Error&&!(i.message in y)&&(y[i.message]=!0,d("react_failed_descriptor_type_check",{message:i.message}))}}var l=t("./ReactElement"),p=t("./ReactPropTypeLocations"),f=t("./ReactCurrentOwner"),d=t("./monitorCodeUse"),h=t("./warning"),m={react_key_warning:{},react_numeric_key_warning:{}},v={},y={},g=/^\d+$/,E={createElement:function(t,e,r){"production"!==n.env.NODE_ENV?h(null!=t,"React.createElement: type should not be null or undefined. It should be a string (for DOM elements) or a ReactClass (for composite components)."):null;var o=l.createElement.apply(this,arguments);if(null==o)return o;for(var i=2;i<arguments.length;i++)u(arguments[i],t);if(t){var a=t.displayName;t.propTypes&&c(a,t.propTypes,o.props,p.prop),t.contextTypes&&c(a,t.contextTypes,o._context,p.context)}return o},createFactory:function(t){var e=E.createElement.bind(null,t);return e.type=t,e}};e.exports=E}).call(this,t("_process"))},{"./ReactCurrentOwner":119,"./ReactElement":135,"./ReactPropTypeLocations":154,"./monitorCodeUse":220,"./warning":229,_process:21}],137:[function(t,e,n){(function(n){"use strict";function r(){return"production"!==n.env.NODE_ENV?c(s,"Trying to return null from a render, but no null placeholder component was injected."):c(s),s()}function o(t){l[t]=!0}function i(t){delete l[t]}function a(t){return l[t]}var s,u=t("./ReactElement"),c=t("./invariant"),l={},p={injectEmptyComponent:function(t){s=u.createFactory(t)}},f={deregisterNullComponentID:i,getEmptyComponent:r,injection:p,isNullComponentID:a,registerNullComponentID:o};e.exports=f}).call(this,t("_process"))},{"./ReactElement":135,"./invariant":210,_process:21}],138:[function(t,e,n){"use strict";var r={guard:function(t,e){return t}};e.exports=r},{}],139:[function(t,e,n){"use strict";function r(t){o.enqueueEvents(t),o.processEventQueue()}var o=t("./EventPluginHub"),i={handleTopLevel:function(t,e,n,i){var a=o.extractEvents(t,e,n,i);r(a)}};e.exports=i},{"./EventPluginHub":100}],140:[function(t,e,n){"use strict";function r(t){var e=p.getID(t),n=l.getReactRootIDFromNodeID(e),r=p.findReactContainerForID(n),o=p.getFirstReactDOM(r);return o}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function i(t){for(var e=p.getFirstReactDOM(h(t.nativeEvent))||window,n=e;n;)t.ancestors.push(n),n=r(n);for(var o=0,i=t.ancestors.length;i>o;o++){e=t.ancestors[o];var a=p.getID(e)||"";v._handleTopLevel(t.topLevelType,e,a,t.nativeEvent)}}function a(t){var e=m(window);t(e)}var s=t("./EventListener"),u=t("./ExecutionEnvironment"),c=t("./PooledClass"),l=t("./ReactInstanceHandles"),p=t("./ReactMount"),f=t("./ReactUpdates"),d=t("./Object.assign"),h=t("./getEventTarget"),m=t("./getUnboundedScrollPosition");d(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),c.addPoolingTo(o,c.twoArgumentPooler);var v={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(t){v._handleTopLevel=t},setEnabled:function(t){v._enabled=!!t},isEnabled:function(){return v._enabled},trapBubbledEvent:function(t,e,n){var r=n;if(r)return s.listen(r,e,v.dispatchEvent.bind(null,t))},trapCapturedEvent:function(t,e,n){var r=n;if(r)return s.capture(r,e,v.dispatchEvent.bind(null,t))},monitorScrollValue:function(t){var e=a.bind(null,t);s.listen(window,"scroll",e),s.listen(window,"resize",e)},dispatchEvent:function(t,e){if(v._enabled){var n=o.getPooled(t,e);try{f.batchedUpdates(i,n)}finally{o.release(n)}}}};e.exports=v},{"./EventListener":99,"./ExecutionEnvironment":104,"./Object.assign":109,"./PooledClass":110,"./ReactInstanceHandles":143,"./ReactMount":146,"./ReactUpdates":162,"./getEventTarget":201,"./getUnboundedScrollPosition":206}],141:[function(t,e,n){"use strict";var r=t("./DOMProperty"),o=t("./EventPluginHub"),i=t("./ReactComponent"),a=t("./ReactCompositeComponent"),s=t("./ReactEmptyComponent"),u=t("./ReactBrowserEventEmitter"),c=t("./ReactNativeComponent"),l=t("./ReactPerf"),p=t("./ReactRootIndex"),f=t("./ReactUpdates"),d={Component:i.injection,CompositeComponent:a.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventEmitter:u.injection,NativeComponent:c.injection,Perf:l.injection,RootIndex:p.injection,Updates:f.injection};e.exports=d},{"./DOMProperty":93,"./EventPluginHub":100,"./ReactBrowserEventEmitter":113,"./ReactComponent":115,"./ReactCompositeComponent":117,"./ReactEmptyComponent":137,"./ReactNativeComponent":149,"./ReactPerf":151,"./ReactRootIndex":158,"./ReactUpdates":162}],142:[function(t,e,n){"use strict";function r(t){return i(document.documentElement,t)}var o=t("./ReactDOMSelection"),i=t("./containsNode"),a=t("./focusNode"),s=t("./getActiveElement"),u={hasSelectionCapabilities:function(t){return t&&("INPUT"===t.nodeName&&"text"===t.type||"TEXTAREA"===t.nodeName||"true"===t.contentEditable)},getSelectionInformation:function(){var t=s();return{focusedElem:t,selectionRange:u.hasSelectionCapabilities(t)?u.getSelection(t):null}},restoreSelection:function(t){var e=s(),n=t.focusedElem,o=t.selectionRange;e!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,o),a(n))},getSelection:function(t){var e;if("selectionStart"in t)e={start:t.selectionStart,end:t.selectionEnd};else if(document.selection&&"INPUT"===t.nodeName){var n=document.selection.createRange();n.parentElement()===t&&(e={start:-n.moveStart("character",-t.value.length),end:-n.moveEnd("character",-t.value.length)})}else e=o.getOffsets(t);return e||{start:0,end:0}},setSelection:function(t,e){var n=e.start,r=e.end;if("undefined"==typeof r&&(r=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(r,t.value.length);else if(document.selection&&"INPUT"===t.nodeName){var i=t.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(t,e)}};e.exports=u},{"./ReactDOMSelection":129,"./containsNode":184,"./focusNode":195,"./getActiveElement":197}],143:[function(t,e,n){(function(n){"use strict";function r(t){return d+t.toString(36)}function o(t,e){return t.charAt(e)===d||e===t.length}function i(t){return""===t||t.charAt(0)===d&&t.charAt(t.length-1)!==d}function a(t,e){return 0===e.indexOf(t)&&o(e,t.length)}function s(t){return t?t.substr(0,t.lastIndexOf(d)):""}function u(t,e){if("production"!==n.env.NODE_ENV?f(i(t)&&i(e),"getNextDescendantID(%s, %s): Received an invalid React DOM ID.",t,e):f(i(t)&&i(e)),"production"!==n.env.NODE_ENV?f(a(t,e),"getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",t,e):f(a(t,e)),t===e)return t;for(var r=t.length+h,s=r;s<e.length&&!o(e,s);s++);return e.substr(0,s)}function c(t,e){var r=Math.min(t.length,e.length);if(0===r)return"";for(var a=0,s=0;r>=s;s++)if(o(t,s)&&o(e,s))a=s;else if(t.charAt(s)!==e.charAt(s))break;var u=t.substr(0,a);return"production"!==n.env.NODE_ENV?f(i(u),"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",t,e,u):f(i(u)),u}function l(t,e,r,o,i,c){t=t||"",e=e||"","production"!==n.env.NODE_ENV?f(t!==e,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",t):f(t!==e);var l=a(e,t);"production"!==n.env.NODE_ENV?f(l||a(t,e),"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",t,e):f(l||a(t,e));for(var p=0,d=l?s:u,h=t;;h=d(h,e)){var v;if(i&&h===t||c&&h===e||(v=r(h,l,o)),v===!1||h===e)break;"production"!==n.env.NODE_ENV?f(p++<m,"traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s",t,e):f(p++<m)}}var p=t("./ReactRootIndex"),f=t("./invariant"),d=".",h=d.length,m=100,v={createReactRootID:function(){return r(p.createReactRootIndex())},createReactID:function(t,e){return t+e},getReactRootIDFromNodeID:function(t){if(t&&t.charAt(0)===d&&t.length>1){var e=t.indexOf(d,1);return e>-1?t.substr(0,e):t}return null},traverseEnterLeave:function(t,e,n,r,o){var i=c(t,e);i!==t&&l(t,i,n,r,!1,!0),i!==e&&l(i,e,n,o,!0,!1)},traverseTwoPhase:function(t,e,n){t&&(l("",t,e,n,!0,!1),l(t,"",e,n,!1,!0))},traverseAncestors:function(t,e,n){l("",t,e,n,!0,!1)},_getFirstCommonAncestorID:c,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:d};e.exports=v}).call(this,t("_process"))},{"./ReactRootIndex":158,"./invariant":210,_process:21}],144:[function(t,e,n){(function(n){"use strict";function r(){if(h._isLegacyCallWarningEnabled){var t=s.current,e=t&&t.constructor?t.constructor.displayName:"";e||(e="Something"),p.hasOwnProperty(e)||(p[e]=!0,"production"!==n.env.NODE_ENV?l(!1,e+" is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory"):null,c("react_legacy_factory_call",{version:3,name:e}))}}function o(t){var e=t.prototype&&"function"==typeof t.prototype.mountComponent&&"function"==typeof t.prototype.receiveComponent;if(e)"production"!==n.env.NODE_ENV?l(!1,"Did not expect to get a React class here. Use `Component` instead of `Component.type` or `this.constructor`."):null;else{if(!t._reactWarnedForThisType){try{t._reactWarnedForThisType=!0}catch(r){}c("react_non_component_in_jsx",{version:3,name:t.name})}"production"!==n.env.NODE_ENV?l(!1,"This JSX uses a plain function. Only React components are valid in React's JSX transform."):null}}function i(t){"production"!==n.env.NODE_ENV?l(!1,"Do not pass React.DOM."+t.type+' to JSX or createFactory. Use the string "'+t.type+'" instead.'):null}function a(t,e){if("function"==typeof e)for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if("function"==typeof r){var o=r.bind(e);for(var i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);t[n]=o}else t[n]=r}}var s=t("./ReactCurrentOwner"),u=t("./invariant"),c=t("./monitorCodeUse"),l=t("./warning"),p={},f={},d={},h={};h.wrapCreateFactory=function(t){var e=function(e){return"function"!=typeof e?t(e):e.isReactNonLegacyFactory?("production"!==n.env.NODE_ENV&&i(e),t(e.type)):e.isReactLegacyFactory?t(e.type):("production"!==n.env.NODE_ENV&&o(e),e)};return e},h.wrapCreateElement=function(t){var e=function(e,r,a){if("function"!=typeof e)return t.apply(this,arguments);var s;return e.isReactNonLegacyFactory?("production"!==n.env.NODE_ENV&&i(e),s=Array.prototype.slice.call(arguments,0),s[0]=e.type,t.apply(this,s)):e.isReactLegacyFactory?(e._isMockFunction&&(e.type._mockedReactClassConstructor=e),s=Array.prototype.slice.call(arguments,0),s[0]=e.type,t.apply(this,s)):("production"!==n.env.NODE_ENV&&o(e),e.apply(null,Array.prototype.slice.call(arguments,1)))};return e},h.wrapFactory=function(t){"production"!==n.env.NODE_ENV?u("function"==typeof t,"This is suppose to accept a element factory"):u("function"==typeof t);var e=function(e,o){return"production"!==n.env.NODE_ENV&&r(),t.apply(this,arguments)};return a(e,t.type),e.isReactLegacyFactory=f,e.type=t.type,e},h.markNonLegacyFactory=function(t){return t.isReactNonLegacyFactory=d,t},h.isValidFactory=function(t){return"function"==typeof t&&t.isReactLegacyFactory===f},h.isValidClass=function(t){return"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?l(!1,"isValidClass is deprecated and will be removed in a future release. Use a more specific validator instead."):null),h.isValidFactory(t)},h._isLegacyCallWarningEnabled=!0,e.exports=h}).call(this,t("_process"))},{"./ReactCurrentOwner":119,"./invariant":210,"./monitorCodeUse":220,"./warning":229,_process:21}],145:[function(t,e,n){"use strict";var r=t("./adler32"),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=r(t);return t.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+e+'">')},canReuseMarkup:function(t,e){var n=e.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(t);return i===n}};e.exports=o},{"./adler32":181}],146:[function(t,e,n){(function(n){"use strict";function r(t){var e=C(t);return e&&U.getID(e)}function o(t){var e=i(t);if(e)if(M.hasOwnProperty(e)){var r=M[e];r!==t&&("production"!==n.env.NODE_ENV?b(!u(r,e),"ReactMount: Two valid but unequal nodes with the same `%s`: %s",x,e):b(!u(r,e)),M[e]=t)}else M[e]=t;return e}function i(t){return t&&t.getAttribute&&t.getAttribute(x)||""}function a(t,e){var n=i(t);n!==e&&delete M[n],t.setAttribute(x,e),M[e]=t}function s(t){return M.hasOwnProperty(t)&&u(M[t],t)||(M[t]=U.findReactNodeByID(t)),M[t]}function u(t,e){if(t){"production"!==n.env.NODE_ENV?b(i(t)===e,"ReactMount: Unexpected modification of `%s`",x):b(i(t)===e);var r=U.findReactContainerForID(e);if(r&&E(r,t))return!0}return!1}function c(t){delete M[t]}function l(t){var e=M[t];return e&&u(e,t)?void(A=e):!1}function p(t){A=null,y.traverseAncestors(t,l);var e=A;return A=null,e}var f=t("./DOMProperty"),d=t("./ReactBrowserEventEmitter"),h=t("./ReactCurrentOwner"),m=t("./ReactElement"),v=t("./ReactLegacyElement"),y=t("./ReactInstanceHandles"),g=t("./ReactPerf"),E=t("./containsNode"),_=t("./deprecated"),C=t("./getReactRootElementInContainer"),R=t("./instantiateReactComponent"),b=t("./invariant"),N=t("./shouldUpdateReactComponent"),w=t("./warning"),O=v.wrapCreateElement(m.createElement),D=y.SEPARATOR,x=f.ID_ATTRIBUTE_NAME,M={},T=1,I=9,P={},S={};if("production"!==n.env.NODE_ENV)var k={};var L=[],A=null,U={_instancesByReactRootID:P,scrollMonitor:function(t,e){e()},_updateRootComponent:function(t,e,o,i){var a=e.props;return U.scrollMonitor(o,function(){t.replaceProps(a,i)}),"production"!==n.env.NODE_ENV&&(k[r(o)]=C(o)),t},_registerComponent:function(t,e){"production"!==n.env.NODE_ENV?b(e&&(e.nodeType===T||e.nodeType===I),"_registerComponent(...): Target container is not a DOM element."):b(e&&(e.nodeType===T||e.nodeType===I)),d.ensureScrollValueMonitoring();var r=U.registerContainer(e);return P[r]=t,r},_renderNewRootComponent:g.measure("ReactMount","_renderNewRootComponent",function(t,e,r){"production"!==n.env.NODE_ENV?w(null==h.current,"_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null;var o=R(t,null),i=U._registerComponent(o,e);return o.mountComponentIntoNode(i,e,r),"production"!==n.env.NODE_ENV&&(k[i]=C(e)),o}),render:function(t,e,o){"production"!==n.env.NODE_ENV?b(m.isValidElement(t),"renderComponent(): Invalid component element.%s","string"==typeof t?" Instead of passing an element string, make sure to instantiate it by passing it to React.createElement.":v.isValidFactory(t)?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"undefined"!=typeof t.props?" This may be caused by unintentionally loading two independent copies of React.":""):b(m.isValidElement(t));var i=P[r(e)];if(i){var a=i._currentElement;if(N(a,t))return U._updateRootComponent(i,t,e,o);U.unmountComponentAtNode(e)}var s=C(e),u=s&&U.isRenderedByReact(s),c=u&&!i,l=U._renderNewRootComponent(t,e,c);return o&&o.call(l),l},constructAndRenderComponent:function(t,e,n){var r=O(t,e);return U.render(r,n)},constructAndRenderComponentByID:function(t,e,r){
var o=document.getElementById(r);return"production"!==n.env.NODE_ENV?b(o,'Tried to get element with id of "%s" but it is not present on the page.',r):b(o),U.constructAndRenderComponent(t,e,o)},registerContainer:function(t){var e=r(t);return e&&(e=y.getReactRootIDFromNodeID(e)),e||(e=y.createReactRootID()),S[e]=t,e},unmountComponentAtNode:function(t){"production"!==n.env.NODE_ENV?w(null==h.current,"unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null;var e=r(t),o=P[e];return o?(U.unmountComponentFromNode(o,t),delete P[e],delete S[e],"production"!==n.env.NODE_ENV&&delete k[e],!0):!1},unmountComponentFromNode:function(t,e){for(t.unmountComponent(),e.nodeType===I&&(e=e.documentElement);e.lastChild;)e.removeChild(e.lastChild)},findReactContainerForID:function(t){var e=y.getReactRootIDFromNodeID(t),r=S[e];if("production"!==n.env.NODE_ENV){var o=k[e];if(o&&o.parentNode!==r){"production"!==n.env.NODE_ENV?b(i(o)===e,"ReactMount: Root element ID differed from reactRootID."):b(i(o)===e);var a=r.firstChild;a&&e===i(a)?k[e]=a:console.warn("ReactMount: Root element has been removed from its original container. New container:",o.parentNode)}}return r},findReactNodeByID:function(t){var e=U.findReactContainerForID(t);return U.findComponentRoot(e,t)},isRenderedByReact:function(t){if(1!==t.nodeType)return!1;var e=U.getID(t);return e?e.charAt(0)===D:!1},getFirstReactDOM:function(t){for(var e=t;e&&e.parentNode!==e;){if(U.isRenderedByReact(e))return e;e=e.parentNode}return null},findComponentRoot:function(t,e){var r=L,o=0,i=p(e)||t;for(r[0]=i.firstChild,r.length=1;o<r.length;){for(var a,s=r[o++];s;){var u=U.getID(s);u?e===u?a=s:y.isAncestorIDOf(u,e)&&(r.length=o=0,r.push(s.firstChild)):r.push(s.firstChild),s=s.nextSibling}if(a)return r.length=0,a}r.length=0,"production"!==n.env.NODE_ENV?b(!1,"findComponentRoot(..., %s): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.",e,U.getID(t)):b(!1)},getReactRootID:r,getID:o,setID:a,getNode:s,purgeID:c};U.renderComponent=_("ReactMount","renderComponent","render",this,U.render),e.exports=U}).call(this,t("_process"))},{"./DOMProperty":93,"./ReactBrowserEventEmitter":113,"./ReactCurrentOwner":119,"./ReactElement":135,"./ReactInstanceHandles":143,"./ReactLegacyElement":144,"./ReactPerf":151,"./containsNode":184,"./deprecated":190,"./getReactRootElementInContainer":204,"./instantiateReactComponent":209,"./invariant":210,"./shouldUpdateReactComponent":226,"./warning":229,_process:21}],147:[function(t,e,n){"use strict";function r(t,e,n){m.push({parentID:t,parentNode:null,type:l.INSERT_MARKUP,markupIndex:v.push(e)-1,textContent:null,fromIndex:null,toIndex:n})}function o(t,e,n){m.push({parentID:t,parentNode:null,type:l.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:e,toIndex:n})}function i(t,e){m.push({parentID:t,parentNode:null,type:l.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:e,toIndex:null})}function a(t,e){m.push({parentID:t,parentNode:null,type:l.TEXT_CONTENT,markupIndex:null,textContent:e,fromIndex:null,toIndex:null})}function s(){m.length&&(c.BackendIDOperations.dangerouslyProcessChildrenUpdates(m,v),u())}function u(){m.length=0,v.length=0}var c=t("./ReactComponent"),l=t("./ReactMultiChildUpdateTypes"),p=t("./flattenChildren"),f=t("./instantiateReactComponent"),d=t("./shouldUpdateReactComponent"),h=0,m=[],v=[],y={Mixin:{mountChildren:function(t,e){var n=p(t),r=[],o=0;this._renderedChildren=n;for(var i in n){var a=n[i];if(n.hasOwnProperty(i)){var s=f(a,null);n[i]=s;var u=this._rootNodeID+i,c=s.mountComponent(u,e,this._mountDepth+1);s._mountIndex=o,r.push(c),o++}}return r},updateTextContent:function(t){h++;var e=!0;try{var n=this._renderedChildren;for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(t),e=!1}finally{h--,h||(e?u():s())}},updateChildren:function(t,e){h++;var n=!0;try{this._updateChildren(t,e),n=!1}finally{h--,h||(n?u():s())}},_updateChildren:function(t,e){var n=p(t),r=this._renderedChildren;if(n||r){var o,i=0,a=0;for(o in n)if(n.hasOwnProperty(o)){var s=r&&r[o],u=s&&s._currentElement,c=n[o];if(d(u,c))this.moveChild(s,a,i),i=Math.max(s._mountIndex,i),s.receiveComponent(c,e),s._mountIndex=a;else{s&&(i=Math.max(s._mountIndex,i),this._unmountChildByName(s,o));var l=f(c,null);this._mountChildByNameAtIndex(l,o,a,e)}a++}for(o in r)!r.hasOwnProperty(o)||n&&n[o]||this._unmountChildByName(r[o],o)}},unmountChildren:function(){var t=this._renderedChildren;for(var e in t){var n=t[e];n.unmountComponent&&n.unmountComponent()}this._renderedChildren=null},moveChild:function(t,e,n){t._mountIndex<n&&o(this._rootNodeID,t._mountIndex,e)},createChild:function(t,e){r(this._rootNodeID,e,t._mountIndex)},removeChild:function(t){i(this._rootNodeID,t._mountIndex)},setTextContent:function(t){a(this._rootNodeID,t)},_mountChildByNameAtIndex:function(t,e,n,r){var o=this._rootNodeID+e,i=t.mountComponent(o,r,this._mountDepth+1);t._mountIndex=n,this.createChild(t,i),this._renderedChildren=this._renderedChildren||{},this._renderedChildren[e]=t},_unmountChildByName:function(t,e){this.removeChild(t),t._mountIndex=null,t.unmountComponent(),delete this._renderedChildren[e]}}};e.exports=y},{"./ReactComponent":115,"./ReactMultiChildUpdateTypes":148,"./flattenChildren":194,"./instantiateReactComponent":209,"./shouldUpdateReactComponent":226}],148:[function(t,e,n){"use strict";var r=t("./keyMirror"),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});e.exports=o},{"./keyMirror":216}],149:[function(t,e,n){(function(n){"use strict";function r(t,e,r){var o=s[t];return null==o?("production"!==n.env.NODE_ENV?i(a,"There is no registered component for the tag %s",t):i(a),new a(t,e)):r===t?("production"!==n.env.NODE_ENV?i(a,"There is no registered component for the tag %s",t):i(a),new a(t,e)):new o.type(e)}var o=t("./Object.assign"),i=t("./invariant"),a=null,s={},u={injectGenericComponentClass:function(t){a=t},injectComponentClasses:function(t){o(s,t)}},c={createInstanceForTag:r,injection:u};e.exports=c}).call(this,t("_process"))},{"./Object.assign":109,"./invariant":210,_process:21}],150:[function(t,e,n){(function(n){"use strict";var r=t("./emptyObject"),o=t("./invariant"),i={isValidOwner:function(t){return!(!t||"function"!=typeof t.attachRef||"function"!=typeof t.detachRef)},addComponentAsRefTo:function(t,e,r){"production"!==n.env.NODE_ENV?o(i.isValidOwner(r),"addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."):o(i.isValidOwner(r)),r.attachRef(e,t)},removeComponentAsRefFrom:function(t,e,r){"production"!==n.env.NODE_ENV?o(i.isValidOwner(r),"removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This usually means that you're trying to remove a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."):o(i.isValidOwner(r)),r.refs[e]===t&&r.detachRef(e)},Mixin:{construct:function(){this.refs=r},attachRef:function(t,e){"production"!==n.env.NODE_ENV?o(e.isOwnedBy(this),"attachRef(%s, ...): Only a component's owner can store a ref to it.",t):o(e.isOwnedBy(this));var i=this.refs===r?this.refs={}:this.refs;i[t]=e},detachRef:function(t){delete this.refs[t]}}};e.exports=i}).call(this,t("_process"))},{"./emptyObject":192,"./invariant":210,_process:21}],151:[function(t,e,n){(function(t){"use strict";function n(t,e,n){return n}var r={enableMeasure:!1,storedMeasure:n,measure:function(e,n,o){if("production"!==t.env.NODE_ENV){var i=null,a=function(){return r.enableMeasure?(i||(i=r.storedMeasure(e,n,o)),i.apply(this,arguments)):o.apply(this,arguments)};return a.displayName=e+"_"+n,a}return o},injection:{injectMeasure:function(t){r.storedMeasure=t}}};e.exports=r}).call(this,t("_process"))},{_process:21}],152:[function(t,e,n){(function(n){"use strict";function r(t){return function(e,n,r){e[n]=e.hasOwnProperty(n)?t(e[n],r):r}}function o(t,e){for(var n in e)if(e.hasOwnProperty(n)){var r=f[n];r&&f.hasOwnProperty(n)?r(t,n,e[n]):t.hasOwnProperty(n)||(t[n]=e[n])}return t}var i=t("./Object.assign"),a=t("./emptyFunction"),s=t("./invariant"),u=t("./joinClasses"),c=t("./warning"),l=!1,p=r(function(t,e){return i({},e,t)}),f={children:a,className:r(u),style:p},d={TransferStrategies:f,mergeProps:function(t,e){return o(i({},t),e)},Mixin:{transferPropsTo:function(t){return"production"!==n.env.NODE_ENV?s(t._owner===this,"%s: You can't call transferPropsTo() on a component that you don't own, %s. This usually means you are calling transferPropsTo() on a component passed in as props or children.",this.constructor.displayName,"string"==typeof t.type?t.type:t.type.displayName):s(t._owner===this),"production"!==n.env.NODE_ENV&&(l||(l=!0,"production"!==n.env.NODE_ENV?c(!1,"transferPropsTo is deprecated. See http://fb.me/react-transferpropsto for more information."):null)),o(t.props,this.props),t}}};e.exports=d}).call(this,t("_process"))},{"./Object.assign":109,"./emptyFunction":191,"./invariant":210,"./joinClasses":215,"./warning":229,_process:21}],153:[function(t,e,n){(function(t){"use strict";var n={};"production"!==t.env.NODE_ENV&&(n={prop:"prop",context:"context",childContext:"child context"}),e.exports=n}).call(this,t("_process"))},{_process:21}],154:[function(t,e,n){"use strict";var r=t("./keyMirror"),o=r({prop:null,context:null,childContext:null});e.exports=o},{"./keyMirror":216}],155:[function(t,e,n){"use strict";function r(t){function e(e,n,r,o,i){if(o=o||C,null!=n[r])return t(n,r,o,i);var a=g[i];return e?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):void 0}var n=e.bind(null,!1);return n.isRequired=e.bind(null,!0),n}function o(t){function e(e,n,r,o){var i=e[n],a=m(i);if(a!==t){var s=g[o],u=v(i);return new Error("Invalid "+s+" `"+n+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `"+t+"`."))}}return r(e)}function i(){return r(_.thatReturns())}function a(t){function e(e,n,r,o){var i=e[n];if(!Array.isArray(i)){var a=g[o],s=m(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u<i.length;u++){var c=t(i,u,r,o);if(c instanceof Error)return c}}return r(e)}function s(){function t(t,e,n,r){if(!y.isValidElement(t[e])){var o=g[r];return new Error("Invalid "+o+" `"+e+"` supplied to "+("`"+n+"`, expected a ReactElement."))}}return r(t)}function u(t){function e(e,n,r,o){if(!(e[n]instanceof t)){var i=g[o],a=t.name||C;return new Error("Invalid "+i+" `"+n+"` supplied to "+("`"+r+"`, expected instance of `"+a+"`."))}}return r(e)}function c(t){function e(e,n,r,o){for(var i=e[n],a=0;a<t.length;a++)if(i===t[a])return;var s=g[o],u=JSON.stringify(t);return new Error("Invalid "+s+" `"+n+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+u+"."))}return r(e)}function l(t){function e(e,n,r,o){var i=e[n],a=m(i);if("object"!==a){var s=g[o];return new Error("Invalid "+s+" `"+n+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var u in i)if(i.hasOwnProperty(u)){var c=t(i,u,r,o);if(c instanceof Error)return c}}return r(e)}function p(t){function e(e,n,r,o){for(var i=0;i<t.length;i++){var a=t[i];if(null==a(e,n,r,o))return}var s=g[o];return new Error("Invalid "+s+" `"+n+"` supplied to "+("`"+r+"`."))}return r(e)}function f(){function t(t,e,n,r){if(!h(t[e])){var o=g[r];return new Error("Invalid "+o+" `"+e+"` supplied to "+("`"+n+"`, expected a ReactNode."))}}return r(t)}function d(t){function e(e,n,r,o){var i=e[n],a=m(i);if("object"!==a){var s=g[o];return new Error("Invalid "+s+" `"+n+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in t){var c=t[u];if(c){var l=c(i,u,r,o);if(l)return l}}}return r(e,"expected `object`")}function h(t){switch(typeof t){case"number":case"string":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(h);if(y.isValidElement(t))return!0;for(var e in t)if(!h(t[e]))return!1;return!0;default:return!1}}function m(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":e}function v(t){var e=m(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}var y=t("./ReactElement"),g=t("./ReactPropTypeLocationNames"),E=t("./deprecated"),_=t("./emptyFunction"),C="<<anonymous>>",R=s(),b=f(),N={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:R,instanceOf:u,node:b,objectOf:l,oneOf:c,oneOfType:p,shape:d,component:E("React.PropTypes","component","element",this,R),renderable:E("React.PropTypes","renderable","node",this,b)};e.exports=N},{"./ReactElement":135,"./ReactPropTypeLocationNames":153,"./deprecated":190,"./emptyFunction":191}],156:[function(t,e,n){"use strict";function r(){this.listenersToPut=[]}var o=t("./PooledClass"),i=t("./ReactBrowserEventEmitter"),a=t("./Object.assign");a(r.prototype,{enqueuePutListener:function(t,e,n){this.listenersToPut.push({rootNodeID:t,propKey:e,propValue:n})},putListeners:function(){for(var t=0;t<this.listenersToPut.length;t++){var e=this.listenersToPut[t];i.putListener(e.rootNodeID,e.propKey,e.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),o.addPoolingTo(r),e.exports=r},{"./Object.assign":109,"./PooledClass":110,"./ReactBrowserEventEmitter":113}],157:[function(t,e,n){"use strict";function r(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.putListenerQueue=u.getPooled()}var o=t("./CallbackQueue"),i=t("./PooledClass"),a=t("./ReactBrowserEventEmitter"),s=t("./ReactInputSelection"),u=t("./ReactPutListenerQueue"),c=t("./Transaction"),l=t("./Object.assign"),p={initialize:s.getSelectionInformation,close:s.restoreSelection},f={initialize:function(){var t=a.isEnabled();return a.setEnabled(!1),t},close:function(t){a.setEnabled(t)}},d={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},m=[h,p,f,d],v={getTransactionWrappers:function(){return m},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null,u.release(this.putListenerQueue),this.putListenerQueue=null}};l(r.prototype,c.Mixin,v),i.addPoolingTo(r),e.exports=r},{"./CallbackQueue":88,"./Object.assign":109,"./PooledClass":110,"./ReactBrowserEventEmitter":113,"./ReactInputSelection":142,"./ReactPutListenerQueue":156,"./Transaction":178}],158:[function(t,e,n){"use strict";var r={injectCreateReactRootIndex:function(t){o.createReactRootIndex=t}},o={createReactRootIndex:null,injection:r};e.exports=o},{}],159:[function(t,e,n){(function(n){"use strict";function r(t){"production"!==n.env.NODE_ENV?l(i.isValidElement(t),"renderToString(): You must pass a valid ReactElement."):l(i.isValidElement(t));var e;try{var r=a.createReactRootID();return e=u.getPooled(!1),e.perform(function(){var n=c(t,null),o=n.mountComponent(r,e,0);return s.addChecksumToMarkup(o)},null)}finally{u.release(e)}}function o(t){"production"!==n.env.NODE_ENV?l(i.isValidElement(t),"renderToStaticMarkup(): You must pass a valid ReactElement."):l(i.isValidElement(t));var e;try{var r=a.createReactRootID();return e=u.getPooled(!0),e.perform(function(){var n=c(t,null);return n.mountComponent(r,e,0)},null)}finally{u.release(e)}}var i=t("./ReactElement"),a=t("./ReactInstanceHandles"),s=t("./ReactMarkupChecksum"),u=t("./ReactServerRenderingTransaction"),c=t("./instantiateReactComponent"),l=t("./invariant");e.exports={renderToString:r,renderToStaticMarkup:o}}).call(this,t("_process"))},{"./ReactElement":135,"./ReactInstanceHandles":143,"./ReactMarkupChecksum":145,"./ReactServerRenderingTransaction":160,"./instantiateReactComponent":209,"./invariant":210,_process:21}],160:[function(t,e,n){"use strict";function r(t){this.reinitializeTransaction(),this.renderToStaticMarkup=t,this.reactMountReady=i.getPooled(null),this.putListenerQueue=a.getPooled()}var o=t("./PooledClass"),i=t("./CallbackQueue"),a=t("./ReactPutListenerQueue"),s=t("./Transaction"),u=t("./Object.assign"),c=t("./emptyFunction"),l={initialize:function(){this.reactMountReady.reset()},close:c},p={initialize:function(){this.putListenerQueue.reset()},close:c},f=[p,l],d={getTransactionWrappers:function(){return f},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null,a.release(this.putListenerQueue),this.putListenerQueue=null}};u(r.prototype,s.Mixin,d),o.addPoolingTo(r),e.exports=r},{"./CallbackQueue":88,"./Object.assign":109,"./PooledClass":110,"./ReactPutListenerQueue":156,"./Transaction":178,"./emptyFunction":191}],161:[function(t,e,n){"use strict";var r=t("./DOMPropertyOperations"),o=t("./ReactComponent"),i=t("./ReactElement"),a=t("./Object.assign"),s=t("./escapeTextForBrowser"),u=function(t){};a(u.prototype,o.Mixin,{mountComponent:function(t,e,n){o.Mixin.mountComponent.call(this,t,e,n);var i=s(this.props);return e.renderToStaticMarkup?i:"<span "+r.createMarkupForID(t)+">"+i+"</span>"},receiveComponent:function(t,e){var n=t.props;n!==this.props&&(this.props=n,o.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}});var c=function(t){return new i(u,null,null,null,null,t)};c.type=u,e.exports=c},{"./DOMPropertyOperations":94,"./Object.assign":109,"./ReactComponent":115,"./ReactElement":135,"./escapeTextForBrowser":193}],162:[function(t,e,n){(function(n){"use strict";function r(){"production"!==n.env.NODE_ENV?v(D.ReactReconcileTransaction&&C,"ReactUpdates: must inject a reconcile transaction class and batching strategy"):v(D.ReactReconcileTransaction&&C)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=l.getPooled(),this.reconcileTransaction=D.ReactReconcileTransaction.getPooled()}function i(t,e,n){r(),C.batchedUpdates(t,e,n)}function a(t,e){return t._mountDepth-e._mountDepth}function s(t){var e=t.dirtyComponentsLength;"production"!==n.env.NODE_ENV?v(e===g.length,"Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).",e,g.length):v(e===g.length),g.sort(a);for(var r=0;e>r;r++){var o=g[r];if(o.isMounted()){var i=o._pendingCallbacks;if(o._pendingCallbacks=null,o.performUpdateIfNecessary(t.reconcileTransaction),i)for(var s=0;s<i.length;s++)t.callbackQueue.enqueue(i[s],o)}}}function u(t,e){return"production"!==n.env.NODE_ENV?v(!e||"function"==typeof e,"enqueueUpdate(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):v(!e||"function"==typeof e),r(),"production"!==n.env.NODE_ENV?y(null==f.current,"enqueueUpdate(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null,C.isBatchingUpdates?(g.push(t),void(e&&(t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e]))):void C.batchedUpdates(u,t,e)}function c(t,e){"production"!==n.env.NODE_ENV?v(C.isBatchingUpdates,"ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."):v(C.isBatchingUpdates),E.enqueue(t,e),_=!0}var l=t("./CallbackQueue"),p=t("./PooledClass"),f=t("./ReactCurrentOwner"),d=t("./ReactPerf"),h=t("./Transaction"),m=t("./Object.assign"),v=t("./invariant"),y=t("./warning"),g=[],E=l.getPooled(),_=!1,C=null,R={initialize:function(){this.dirtyComponentsLength=g.length},close:function(){this.dirtyComponentsLength!==g.length?(g.splice(0,this.dirtyComponentsLength),w()):g.length=0}},b={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},N=[R,b];m(o.prototype,h.Mixin,{getTransactionWrappers:function(){return N},destructor:function(){this.dirtyComponentsLength=null,l.release(this.callbackQueue),this.callbackQueue=null,D.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(t,e,n){return h.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,t,e,n)}}),p.addPoolingTo(o);var w=d.measure("ReactUpdates","flushBatchedUpdates",function(){for(;g.length||_;){if(g.length){var t=o.getPooled();t.perform(s,null,t),o.release(t)}if(_){_=!1;var e=E;E=l.getPooled(),e.notifyAll(),l.release(e)}}}),O={injectReconcileTransaction:function(t){"production"!==n.env.NODE_ENV?v(t,"ReactUpdates: must provide a reconcile transaction class"):v(t),D.ReactReconcileTransaction=t},injectBatchingStrategy:function(t){"production"!==n.env.NODE_ENV?v(t,"ReactUpdates: must provide a batching strategy"):v(t),"production"!==n.env.NODE_ENV?v("function"==typeof t.batchedUpdates,"ReactUpdates: must provide a batchedUpdates() function"):v("function"==typeof t.batchedUpdates),"production"!==n.env.NODE_ENV?v("boolean"==typeof t.isBatchingUpdates,"ReactUpdates: must provide an isBatchingUpdates boolean attribute"):v("boolean"==typeof t.isBatchingUpdates),C=t}},D={ReactReconcileTransaction:null,batchedUpdates:i,enqueueUpdate:u,flushBatchedUpdates:w,injection:O,asap:c};e.exports=D}).call(this,t("_process"))},{"./CallbackQueue":88,"./Object.assign":109,"./PooledClass":110,"./ReactCurrentOwner":119,"./ReactPerf":151,"./Transaction":178,"./invariant":210,"./warning":229,_process:21}],163:[function(t,e,n){"use strict";var r=t("./DOMProperty"),o=r.injection.MUST_USE_ATTRIBUTE,i={Properties:{cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,y1:o,y2:o,y:o},DOMAttributeNames:{fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};e.exports=i},{"./DOMProperty":93}],164:[function(t,e,n){"use strict";function r(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(t){if(!g&&null!=m&&m==c()){var e=r(m);if(!y||!f(y,e)){y=e;var n=u.getPooled(h.select,v,t);return n.type="select",n.target=m,a.accumulateTwoPhaseDispatches(n),n}}}var i=t("./EventConstants"),a=t("./EventPropagators"),s=t("./ReactInputSelection"),u=t("./SyntheticEvent"),c=t("./getActiveElement"),l=t("./isTextInputElement"),p=t("./keyOf"),f=t("./shallowEqual"),d=i.topLevelTypes,h={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[d.topBlur,d.topContextMenu,d.topFocus,d.topKeyDown,d.topMouseDown,d.topMouseUp,d.topSelectionChange]}},m=null,v=null,y=null,g=!1,E={eventTypes:h,extractEvents:function(t,e,n,r){switch(t){case d.topFocus:(l(e)||"true"===e.contentEditable)&&(m=e,v=n,y=null);break;case d.topBlur:m=null,v=null,y=null;break;case d.topMouseDown:g=!0;break;case d.topContextMenu:case d.topMouseUp:return g=!1,o(r);case d.topSelectionChange:case d.topKeyDown:case d.topKeyUp:return o(r)}}};e.exports=E},{"./EventConstants":98,"./EventPropagators":103,"./ReactInputSelection":142,"./SyntheticEvent":170,"./getActiveElement":197,"./isTextInputElement":213,"./keyOf":217,"./shallowEqual":225}],165:[function(t,e,n){"use strict";var r=Math.pow(2,53),o={createReactRootIndex:function(){return Math.ceil(Math.random()*r)}};e.exports=o},{}],166:[function(t,e,n){(function(n){"use strict";var r=t("./EventConstants"),o=t("./EventPluginUtils"),i=t("./EventPropagators"),a=t("./SyntheticClipboardEvent"),s=t("./SyntheticEvent"),u=t("./SyntheticFocusEvent"),c=t("./SyntheticKeyboardEvent"),l=t("./SyntheticMouseEvent"),p=t("./SyntheticDragEvent"),f=t("./SyntheticTouchEvent"),d=t("./SyntheticUIEvent"),h=t("./SyntheticWheelEvent"),m=t("./getEventCharCode"),v=t("./invariant"),y=t("./keyOf"),g=t("./warning"),E=r.topLevelTypes,_={blur:{phasedRegistrationNames:{bubbled:y({onBlur:!0}),captured:y({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:y({onClick:!0}),captured:y({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:y({onContextMenu:!0}),captured:y({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:y({onCopy:!0}),captured:y({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:y({onCut:!0}),captured:y({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:y({onDoubleClick:!0}),captured:y({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:y({onDrag:!0}),captured:y({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:y({onDragEnd:!0}),captured:y({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:y({onDragEnter:!0}),captured:y({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:y({onDragExit:!0}),captured:y({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:y({onDragLeave:!0}),captured:y({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:y({onDragOver:!0}),captured:y({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:y({onDragStart:!0}),captured:y({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:y({onDrop:!0}),captured:y({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:y({onFocus:!0}),captured:y({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:y({onInput:!0}),captured:y({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:y({onKeyDown:!0}),captured:y({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:y({onKeyPress:!0}),captured:y({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:y({onKeyUp:!0}),captured:y({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:y({onLoad:!0}),captured:y({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:y({onError:!0}),captured:y({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:y({onMouseDown:!0}),captured:y({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:y({onMouseMove:!0}),captured:y({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:y({onMouseOut:!0}),captured:y({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:y({onMouseOver:!0}),captured:y({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:y({onMouseUp:!0}),captured:y({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:y({onPaste:!0}),captured:y({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:y({onReset:!0}),captured:y({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:y({onScroll:!0}),captured:y({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:y({onSubmit:!0}),captured:y({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:y({onTouchCancel:!0}),captured:y({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:y({onTouchEnd:!0}),captured:y({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:y({onTouchMove:!0}),captured:y({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:y({onTouchStart:!0}),captured:y({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:y({onWheel:!0}),captured:y({onWheelCapture:!0})}}},C={topBlur:_.blur,topClick:_.click,topContextMenu:_.contextMenu,topCopy:_.copy,topCut:_.cut,topDoubleClick:_.doubleClick,topDrag:_.drag,topDragEnd:_.dragEnd,topDragEnter:_.dragEnter,topDragExit:_.dragExit,topDragLeave:_.dragLeave,topDragOver:_.dragOver,topDragStart:_.dragStart,topDrop:_.drop,topError:_.error,topFocus:_.focus,topInput:_.input,topKeyDown:_.keyDown,topKeyPress:_.keyPress,topKeyUp:_.keyUp,topLoad:_.load,topMouseDown:_.mouseDown,topMouseMove:_.mouseMove,topMouseOut:_.mouseOut,topMouseOver:_.mouseOver,topMouseUp:_.mouseUp,topPaste:_.paste,topReset:_.reset,topScroll:_.scroll,topSubmit:_.submit,topTouchCancel:_.touchCancel,topTouchEnd:_.touchEnd,topTouchMove:_.touchMove,topTouchStart:_.touchStart,topWheel:_.wheel};for(var R in C)C[R].dependencies=[R];var b={eventTypes:_,executeDispatch:function(t,e,r){var i=o.executeDispatch(t,e,r);"production"!==n.env.NODE_ENV?g("boolean"!=typeof i,"Returning `false` from an event handler is deprecated and will be ignored in a future release. Instead, manually call e.stopPropagation() or e.preventDefault(), as appropriate."):null,i===!1&&(t.stopPropagation(),t.preventDefault())},extractEvents:function(t,e,r,o){var y=C[t];if(!y)return null;var g;switch(t){case E.topInput:case E.topLoad:case E.topError:case E.topReset:case E.topSubmit:g=s;break;case E.topKeyPress:if(0===m(o))return null;case E.topKeyDown:case E.topKeyUp:g=c;break;case E.topBlur:case E.topFocus:g=u;break;case E.topClick:if(2===o.button)return null;case E.topContextMenu:case E.topDoubleClick:case E.topMouseDown:case E.topMouseMove:case E.topMouseOut:case E.topMouseOver:case E.topMouseUp:g=l;break;case E.topDrag:case E.topDragEnd:case E.topDragEnter:case E.topDragExit:case E.topDragLeave:case E.topDragOver:case E.topDragStart:case E.topDrop:g=p;break;case E.topTouchCancel:case E.topTouchEnd:case E.topTouchMove:case E.topTouchStart:g=f;break;case E.topScroll:g=d;break;case E.topWheel:g=h;break;case E.topCopy:case E.topCut:case E.topPaste:g=a}"production"!==n.env.NODE_ENV?v(g,"SimpleEventPlugin: Unhandled event type, `%s`.",t):v(g);var _=g.getPooled(y,r,o);return i.accumulateTwoPhaseDispatches(_),_}};e.exports=b}).call(this,t("_process"))},{"./EventConstants":98,"./EventPluginUtils":102,"./EventPropagators":103,"./SyntheticClipboardEvent":167,"./SyntheticDragEvent":169,"./SyntheticEvent":170,"./SyntheticFocusEvent":171,"./SyntheticKeyboardEvent":173,"./SyntheticMouseEvent":174,"./SyntheticTouchEvent":175,"./SyntheticUIEvent":176,"./SyntheticWheelEvent":177,"./getEventCharCode":198,"./invariant":210,"./keyOf":217,"./warning":229,_process:21}],167:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticEvent"),i={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(r,i),e.exports=r},{"./SyntheticEvent":170}],168:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticEvent"),i={data:null};o.augmentClass(r,i),e.exports=r},{"./SyntheticEvent":170
}],169:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticMouseEvent"),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},{"./SyntheticMouseEvent":174}],170:[function(t,e,n){"use strict";function r(t,e,n){this.dispatchConfig=t,this.dispatchMarker=e,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];this[o]=i?i(n):n[o]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;this.isDefaultPrevented=s?a.thatReturnsTrue:a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=t("./PooledClass"),i=t("./Object.assign"),a=t("./emptyFunction"),s=t("./getEventTarget"),u={type:null,target:s,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var t=this.nativeEvent;t.preventDefault?t.preventDefault():t.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue},stopPropagation:function(){var t=this.nativeEvent;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var t=this.constructor.Interface;for(var e in t)this[e]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(t,e){var n=this,r=Object.create(n.prototype);i(r,t.prototype),t.prototype=r,t.prototype.constructor=t,t.Interface=i({},n.Interface,e),t.augmentClass=n.augmentClass,o.addPoolingTo(t,o.threeArgumentPooler)},o.addPoolingTo(r,o.threeArgumentPooler),e.exports=r},{"./Object.assign":109,"./PooledClass":110,"./emptyFunction":191,"./getEventTarget":201}],171:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticUIEvent"),i={relatedTarget:null};o.augmentClass(r,i),e.exports=r},{"./SyntheticUIEvent":176}],172:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticEvent"),i={data:null};o.augmentClass(r,i),e.exports=r},{"./SyntheticEvent":170}],173:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticUIEvent"),i=t("./getEventCharCode"),a=t("./getEventKey"),s=t("./getEventModifierState"),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(t){return"keypress"===t.type?i(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?i(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(r,u),e.exports=r},{"./SyntheticUIEvent":176,"./getEventCharCode":198,"./getEventKey":199,"./getEventModifierState":200}],174:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticUIEvent"),i=t("./ViewportMetrics"),a=t("./getEventModifierState"),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(t){var e=t.button;return"which"in t?e:2===e?2:4===e?1:0},buttons:null,relatedTarget:function(t){return t.relatedTarget||(t.fromElement===t.srcElement?t.toElement:t.fromElement)},pageX:function(t){return"pageX"in t?t.pageX:t.clientX+i.currentScrollLeft},pageY:function(t){return"pageY"in t?t.pageY:t.clientY+i.currentScrollTop}};o.augmentClass(r,s),e.exports=r},{"./SyntheticUIEvent":176,"./ViewportMetrics":179,"./getEventModifierState":200}],175:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticUIEvent"),i=t("./getEventModifierState"),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},{"./SyntheticUIEvent":176,"./getEventModifierState":200}],176:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticEvent"),i=t("./getEventTarget"),a={view:function(t){if(t.view)return t.view;var e=i(t);if(null!=e&&e.window===e)return e;var n=e.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(t){return t.detail||0}};o.augmentClass(r,a),e.exports=r},{"./SyntheticEvent":170,"./getEventTarget":201}],177:[function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n)}var o=t("./SyntheticMouseEvent"),i={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),e.exports=r},{"./SyntheticMouseEvent":174}],178:[function(t,e,n){(function(n){"use strict";var r=t("./invariant"),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(t,e,o,i,a,s,u,c){"production"!==n.env.NODE_ENV?r(!this.isInTransaction(),"Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction."):r(!this.isInTransaction());var l,p;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),p=t.call(e,o,i,a,s,u,c),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(f){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return p},initializeAll:function(t){for(var e=this.transactionWrappers,n=t;n<e.length;n++){var r=e[n];try{this.wrapperInitData[n]=i.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===i.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(t){"production"!==n.env.NODE_ENV?r(this.isInTransaction(),"Transaction.closeAll(): Cannot close transaction when none are open."):r(this.isInTransaction());for(var e=this.transactionWrappers,o=t;o<e.length;o++){var a,s=e[o],u=this.wrapperInitData[o];try{a=!0,u!==i.OBSERVED_ERROR&&s.close&&s.close.call(this,u),a=!1}finally{if(a)try{this.closeAll(o+1)}catch(c){}}}this.wrapperInitData.length=0}},i={Mixin:o,OBSERVED_ERROR:{}};e.exports=i}).call(this,t("_process"))},{"./invariant":210,_process:21}],179:[function(t,e,n){"use strict";var r=t("./getUnboundedScrollPosition"),o={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(){var t=r(window);o.currentScrollLeft=t.x,o.currentScrollTop=t.y}};e.exports=o},{"./getUnboundedScrollPosition":206}],180:[function(t,e,n){(function(n){"use strict";function r(t,e){if("production"!==n.env.NODE_ENV?o(null!=e,"accumulateInto(...): Accumulated items must not be null or undefined."):o(null!=e),null==t)return e;var r=Array.isArray(t),i=Array.isArray(e);return r&&i?(t.push.apply(t,e),t):r?(t.push(e),t):i?[t].concat(e):[t,e]}var o=t("./invariant");e.exports=r}).call(this,t("_process"))},{"./invariant":210,_process:21}],181:[function(t,e,n){"use strict";function r(t){for(var e=1,n=0,r=0;r<t.length;r++)e=(e+t.charCodeAt(r))%o,n=(n+e)%o;return e|n<<16}var o=65521;e.exports=r},{}],182:[function(t,e,n){function r(t){return t.replace(o,function(t,e){return e.toUpperCase()})}var o=/-(.)/g;e.exports=r},{}],183:[function(t,e,n){"use strict";function r(t){return o(t.replace(i,"ms-"))}var o=t("./camelize"),i=/^-ms-/;e.exports=r},{"./camelize":182}],184:[function(t,e,n){function r(t,e){return t&&e?t===e?!0:o(t)?!1:o(e)?r(t,e.parentNode):t.contains?t.contains(e):t.compareDocumentPosition?!!(16&t.compareDocumentPosition(e)):!1:!1}var o=t("./isTextNode");e.exports=r},{"./isTextNode":214}],185:[function(t,e,n){function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"length"in t&&!("setInterval"in t)&&"number"!=typeof t.nodeType&&(Array.isArray(t)||"callee"in t||"item"in t)}function o(t){return r(t)?Array.isArray(t)?t.slice():i(t):[t]}var i=t("./toArray");e.exports=o},{"./toArray":227}],186:[function(t,e,n){(function(n){"use strict";function r(t){var e=i.createFactory(t),r=o.createClass({displayName:"ReactFullPageComponent"+t,componentWillUnmount:function(){"production"!==n.env.NODE_ENV?a(!1,"%s tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this.constructor.displayName):a(!1)},render:function(){return e(this.props)}});return r}var o=t("./ReactCompositeComponent"),i=t("./ReactElement"),a=t("./invariant");e.exports=r}).call(this,t("_process"))},{"./ReactCompositeComponent":117,"./ReactElement":135,"./invariant":210,_process:21}],187:[function(t,e,n){(function(n){function r(t){var e=t.match(l);return e&&e[1].toLowerCase()}function o(t,e){var o=c;"production"!==n.env.NODE_ENV?u(!!c,"createNodesFromMarkup dummy not initialized"):u(!!c);var i=r(t),l=i&&s(i);if(l){o.innerHTML=l[1]+t+l[2];for(var p=l[0];p--;)o=o.lastChild}else o.innerHTML=t;var f=o.getElementsByTagName("script");f.length&&("production"!==n.env.NODE_ENV?u(e,"createNodesFromMarkup(...): Unexpected <script> element rendered."):u(e),a(f).forEach(e));for(var d=a(o.childNodes);o.lastChild;)o.removeChild(o.lastChild);return d}var i=t("./ExecutionEnvironment"),a=t("./createArrayFrom"),s=t("./getMarkupWrap"),u=t("./invariant"),c=i.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=o}).call(this,t("_process"))},{"./ExecutionEnvironment":104,"./createArrayFrom":185,"./getMarkupWrap":202,"./invariant":210,_process:21}],188:[function(t,e,n){function r(t){return"object"==typeof t?Object.keys(t).filter(function(e){return t[e]}).join(" "):Array.prototype.join.call(arguments," ")}e.exports=r},{}],189:[function(t,e,n){"use strict";function r(t,e){var n=null==e||"boolean"==typeof e||""===e;if(n)return"";var r=isNaN(e);return r||0===e||i.hasOwnProperty(t)&&i[t]?""+e:("string"==typeof e&&(e=e.trim()),e+"px")}var o=t("./CSSProperty"),i=o.isUnitlessNumber;e.exports=r},{"./CSSProperty":86}],190:[function(t,e,n){(function(n){function r(t,e,r,a,s){var u=!1;if("production"!==n.env.NODE_ENV){var c=function(){return"production"!==n.env.NODE_ENV?i(u,t+"."+e+" will be deprecated in a future version. "+("Use "+t+"."+r+" instead.")):null,u=!0,s.apply(a,arguments)};return c.displayName=t+"_"+e,o(c,s)}return s}var o=t("./Object.assign"),i=t("./warning");e.exports=r}).call(this,t("_process"))},{"./Object.assign":109,"./warning":229,_process:21}],191:[function(t,e,n){function r(t){return function(){return t}}function o(){}o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(t){return t},e.exports=o},{}],192:[function(t,e,n){(function(t){"use strict";var n={};"production"!==t.env.NODE_ENV&&Object.freeze(n),e.exports=n}).call(this,t("_process"))},{_process:21}],193:[function(t,e,n){"use strict";function r(t){return i[t]}function o(t){return(""+t).replace(a,r)}var i={"&":"&",">":">","<":"<",'"':""","'":"'"},a=/[&><"']/g;e.exports=o},{}],194:[function(t,e,n){(function(n){"use strict";function r(t,e,r){var o=t,a=!o.hasOwnProperty(r);if("production"!==n.env.NODE_ENV?s(a,"flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",r):null,a&&null!=e){var u,c=typeof e;u="string"===c?i(e):"number"===c?i(""+e):e,o[r]=u}}function o(t){if(null==t)return t;var e={};return a(t,r,e),e}var i=t("./ReactTextComponent"),a=t("./traverseAllChildren"),s=t("./warning");e.exports=o}).call(this,t("_process"))},{"./ReactTextComponent":161,"./traverseAllChildren":228,"./warning":229,_process:21}],195:[function(t,e,n){"use strict";function r(t){try{t.focus()}catch(e){}}e.exports=r},{}],196:[function(t,e,n){"use strict";var r=function(t,e,n){Array.isArray(t)?t.forEach(e,n):t&&e.call(n,t)};e.exports=r},{}],197:[function(t,e,n){function r(){try{return document.activeElement||document.body}catch(t){return document.body}}e.exports=r},{}],198:[function(t,e,n){"use strict";function r(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}e.exports=r},{}],199:[function(t,e,n){"use strict";function r(t){if(t.key){var e=i[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=o(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?a[t.keyCode]||"Unidentified":""}var o=t("./getEventCharCode"),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},{"./getEventCharCode":198}],200:[function(t,e,n){"use strict";function r(t){var e=this,n=e.nativeEvent;if(n.getModifierState)return n.getModifierState(t);var r=i[t];return r?!!n[r]:!1}function o(t){return r}var i={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=o},{}],201:[function(t,e,n){"use strict";function r(t){var e=t.target||t.srcElement||window;return 3===e.nodeType?e.parentNode:e}e.exports=r},{}],202:[function(t,e,n){(function(n){function r(t){return"production"!==n.env.NODE_ENV?i(!!a,"Markup wrapping node not initialized"):i(!!a),f.hasOwnProperty(t)||(t="*"),s.hasOwnProperty(t)||(a.innerHTML="*"===t?"<link />":"<"+t+"></"+t+">",s[t]=!a.firstChild),s[t]?f[t]:null}var o=t("./ExecutionEnvironment"),i=t("./invariant"),a=o.canUseDOM?document.createElement("div"):null,s={circle:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},u=[1,'<select multiple="true">',"</select>"],c=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],p=[1,"<svg>","</svg>"],f={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l,circle:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};e.exports=r}).call(this,t("_process"))},{"./ExecutionEnvironment":104,"./invariant":210,_process:21}],203:[function(t,e,n){"use strict";function r(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function i(t,e){for(var n=r(t),i=0,a=0;n;){if(3==n.nodeType){if(a=i+n.textContent.length,e>=i&&a>=e)return{node:n,offset:e-i};i=a}n=r(o(n))}}e.exports=i},{}],204:[function(t,e,n){"use strict";function r(t){return t?t.nodeType===o?t.documentElement:t.firstChild:null}var o=9;e.exports=r},{}],205:[function(t,e,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=t("./ExecutionEnvironment"),i=null;e.exports=r},{"./ExecutionEnvironment":104}],206:[function(t,e,n){"use strict";function r(t){return t===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:t.scrollLeft,y:t.scrollTop}}e.exports=r},{}],207:[function(t,e,n){function r(t){return t.replace(o,"-$1").toLowerCase()}var o=/([A-Z])/g;e.exports=r},{}],208:[function(t,e,n){"use strict";function r(t){return o(t).replace(i,"-ms-")}var o=t("./hyphenate"),i=/^ms-/;e.exports=r},{"./hyphenate":207}],209:[function(t,e,n){(function(n){"use strict";function r(t,e){var r;if("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?o(t&&("function"==typeof t.type||"string"==typeof t.type),"Only functions or strings can be mounted as React components."):null,t.type._mockedReactClassConstructor)){a._isLegacyCallWarningEnabled=!1;try{r=new t.type._mockedReactClassConstructor(t.props)}finally{a._isLegacyCallWarningEnabled=!0}i.isValidElement(r)&&(r=new r.type(r.props));var c=r.render;if(c)return c._isMockFunction&&!c._getMockImplementation()&&c.mockImplementation(u.getEmptyComponent),r.construct(t),r;t=u.getEmptyComponent()}return r="string"==typeof t.type?s.createInstanceForTag(t.type,t.props,e):new t.type(t.props),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?o("function"==typeof r.construct&&"function"==typeof r.mountComponent&&"function"==typeof r.receiveComponent,"Only React Components can be mounted."):null),r.construct(t),r}var o=t("./warning"),i=t("./ReactElement"),a=t("./ReactLegacyElement"),s=t("./ReactNativeComponent"),u=t("./ReactEmptyComponent");e.exports=r}).call(this,t("_process"))},{"./ReactElement":135,"./ReactEmptyComponent":137,"./ReactLegacyElement":144,"./ReactNativeComponent":149,"./warning":229,_process:21}],210:[function(t,e,n){(function(t){"use strict";var n=function(e,n,r,o,i,a,s,u){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===n)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,o,i,a,s,u],p=0;c=new Error("Invariant Violation: "+n.replace(/%s/g,function(){return l[p++]}))}throw c.framesToPop=1,c}};e.exports=n}).call(this,t("_process"))},{_process:21}],211:[function(t,e,n){"use strict";function r(t,e){if(!i.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===t&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=t("./ExecutionEnvironment");i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},{"./ExecutionEnvironment":104}],212:[function(t,e,n){function r(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}e.exports=r},{}],213:[function(t,e,n){"use strict";function r(t){return t&&("INPUT"===t.nodeName&&o[t.type]||"TEXTAREA"===t.nodeName)}var o={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=r},{}],214:[function(t,e,n){function r(t){return o(t)&&3==t.nodeType}var o=t("./isNode");e.exports=r},{"./isNode":212}],215:[function(t,e,n){"use strict";function r(t){t||(t="");var e,n=arguments.length;if(n>1)for(var r=1;n>r;r++)e=arguments[r],e&&(t=(t?t+" ":"")+e);return t}e.exports=r},{}],216:[function(t,e,n){(function(n){"use strict";var r=t("./invariant"),o=function(t){var e,o={};"production"!==n.env.NODE_ENV?r(t instanceof Object&&!Array.isArray(t),"keyMirror(...): Argument must be an object."):r(t instanceof Object&&!Array.isArray(t));for(e in t)t.hasOwnProperty(e)&&(o[e]=e);return o};e.exports=o}).call(this,t("_process"))},{"./invariant":210,_process:21}],217:[function(t,e,n){var r=function(t){var e;for(e in t)if(t.hasOwnProperty(e))return e;return null};e.exports=r},{}],218:[function(t,e,n){"use strict";function r(t,e,n){if(!t)return null;var r={};for(var i in t)o.call(t,i)&&(r[i]=e.call(n,t[i],i,t));return r}var o=Object.prototype.hasOwnProperty;e.exports=r},{}],219:[function(t,e,n){"use strict";function r(t){var e={};return function(n){return e.hasOwnProperty(n)?e[n]:e[n]=t.call(this,n)}}e.exports=r},{}],220:[function(t,e,n){(function(n){"use strict";function r(t,e){"production"!==n.env.NODE_ENV?o(t&&!/[^a-z0-9_]/.test(t),"You must provide an eventName using only the characters [a-z0-9_]"):o(t&&!/[^a-z0-9_]/.test(t))}var o=t("./invariant");e.exports=r}).call(this,t("_process"))},{"./invariant":210,_process:21}],221:[function(t,e,n){(function(n){"use strict";function r(t){return"production"!==n.env.NODE_ENV?i(o.isValidElement(t),"onlyChild must be passed a children with exactly one child."):i(o.isValidElement(t)),t}var o=t("./ReactElement"),i=t("./invariant");e.exports=r}).call(this,t("_process"))},{"./ReactElement":135,"./invariant":210,_process:21}],222:[function(t,e,n){"use strict";var r,o=t("./ExecutionEnvironment");o.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),e.exports=r||{}},{"./ExecutionEnvironment":104}],223:[function(t,e,n){var r=t("./performance");r&&r.now||(r=Date);var o=r.now.bind(r);e.exports=o},{"./performance":222}],224:[function(t,e,n){"use strict";var r=t("./ExecutionEnvironment"),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(t,e){t.innerHTML=e};if(r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),o.test(e)||"<"===e[0]&&i.test(e)){t.innerHTML="\ufeff"+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e})}e.exports=a},{"./ExecutionEnvironment":104}],225:[function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;var n;for(n in t)if(t.hasOwnProperty(n)&&(!e.hasOwnProperty(n)||t[n]!==e[n]))return!1;for(n in e)if(e.hasOwnProperty(n)&&!t.hasOwnProperty(n))return!1;return!0}e.exports=r},{}],226:[function(t,e,n){"use strict";function r(t,e){return t&&e&&t.type===e.type&&t.key===e.key&&t._owner===e._owner?!0:!1}e.exports=r},{}],227:[function(t,e,n){(function(n){function r(t){var e=t.length;if("production"!==n.env.NODE_ENV?o(!Array.isArray(t)&&("object"==typeof t||"function"==typeof t),"toArray: Array-like object expected"):o(!Array.isArray(t)&&("object"==typeof t||"function"==typeof t)),"production"!==n.env.NODE_ENV?o("number"==typeof e,"toArray: Object needs a length property"):o("number"==typeof e),"production"!==n.env.NODE_ENV?o(0===e||e-1 in t,"toArray: Object should have keys for indices"):o(0===e||e-1 in t),t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(r){}for(var i=Array(e),a=0;e>a;a++)i[a]=t[a];return i}var o=t("./invariant");e.exports=r}).call(this,t("_process"))},{"./invariant":210,_process:21}],228:[function(t,e,n){(function(n){"use strict";function r(t){return d[t]}function o(t,e){return t&&null!=t.key?a(t.key):e.toString(36)}function i(t){return(""+t).replace(h,r)}function a(t){return"$"+i(t)}function s(t,e,n){return null==t?0:m(t,"",0,e,n)}var u=t("./ReactElement"),c=t("./ReactInstanceHandles"),l=t("./invariant"),p=c.SEPARATOR,f=":",d={"=":"=0",".":"=1",":":"=2"},h=/[=.:]/g,m=function(t,e,r,i,s){var c,d,h=0;if(Array.isArray(t))for(var v=0;v<t.length;v++){var y=t[v];c=e+(e?f:p)+o(y,v),d=r+h,h+=m(y,c,d,i,s)}else{var g=typeof t,E=""===e,_=E?p+o(t,0):e;if(null==t||"boolean"===g)i(s,null,_,r),h=1;else if("string"===g||"number"===g||u.isValidElement(t))i(s,t,_,r),h=1;else if("object"===g){"production"!==n.env.NODE_ENV?l(!t||1!==t.nodeType,"traverseAllChildren(...): Encountered an invalid child; DOM elements are not valid children of React components."):l(!t||1!==t.nodeType);for(var C in t)t.hasOwnProperty(C)&&(c=e+(e?f:p)+a(C)+f+o(t[C],0),d=r+h,h+=m(t[C],c,d,i,s))}}return h};e.exports=s}).call(this,t("_process"))},{"./ReactElement":135,"./ReactInstanceHandles":143,"./invariant":210,_process:21}],229:[function(t,e,n){(function(n){"use strict";var r=t("./emptyFunction"),o=r;"production"!==n.env.NODE_ENV&&(o=function(t,e){for(var n=[],r=2,o=arguments.length;o>r;r++)n.push(arguments[r]);if(void 0===e)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(!t){var i=0;console.warn("Warning: "+e.replace(/%s/g,function(){return n[i++]}))}}),e.exports=o}).call(this,t("_process"))},{"./emptyFunction":191,_process:21}],230:[function(t,e,n){e.exports=t("./lib/React")},{"./lib/React":111}],231:[function(t,e,n){"use strict";function r(t,e){for(var n in e)e[n]&&(t[n]=e[n]);return t}function o(t,e){t.prototype=r(t.prototype||{},e.prototype)}function i(t){t=t||{},this._startOffsetX=0,this._currentOffsetX=0,this._opening=!1,this._moved=!1,this._opened=!1,this._preventOpen=!1,this._touch=void 0===t.touch?!0:t.touch&&!0,this.panel=t.panel,this.menu=t.menu,this.panel.className+=" slideout-panel",this.menu.className+=" slideout-menu",this._fx=t.fx||"ease",this._duration=parseInt(t.duration,10)||300,this._tolerance=parseInt(t.tolerance,10)||70,this._padding=this._translateTo=parseInt(t.padding,10)||256,this._orientation="right"===t.side?-1:1,this._translateTo*=this._orientation,this._touch&&this._initTouchEvents()}var a,s=t("decouple"),u=t("emitter"),c=!1,l=window.document,p=l.documentElement,f=window.navigator.msPointerEnabled,d={start:f?"MSPointerDown":"touchstart",move:f?"MSPointerMove":"touchmove",end:f?"MSPointerUp":"touchend"},h=function(){var t=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,e=l.getElementsByTagName("script")[0].style;for(var n in e)if(t.test(n))return"-"+n.match(t)[0].toLowerCase()+"-";return"WebkitOpacity"in e?"-webkit-":"KhtmlOpacity"in e?"-khtml-":""}();o(i,u),i.prototype.open=function(){var t=this;return this.emit("beforeopen"),-1===p.className.search("slideout-open")&&(p.className+=" slideout-open"),this._setTransition(),this._translateXTo(this._translateTo),this._opened=!0,setTimeout(function(){t.panel.style.transition=t.panel.style["-webkit-transition"]="",t.emit("open")},this._duration+50),this},i.prototype.close=function(){var t=this;return this.isOpen()||this._opening?(this.emit("beforeclose"),this._setTransition(),this._translateXTo(0),this._opened=!1,setTimeout(function(){p.className=p.className.replace(/ slideout-open/,""),t.panel.style.transition=t.panel.style["-webkit-transition"]=t.panel.style[h+"transform"]=t.panel.style.transform="",t.emit("close")},this._duration+50),this):this},i.prototype.toggle=function(){return this.isOpen()?this.close():this.open()},i.prototype.isOpen=function(){return this._opened},i.prototype._translateXTo=function(t){this._currentOffsetX=t,this.panel.style[h+"transform"]=this.panel.style.transform="translate3d("+t+"px, 0, 0)"},i.prototype._setTransition=function(){this.panel.style[h+"transition"]=this.panel.style.transition=h+"transform "+this._duration+"ms "+this._fx},i.prototype._initTouchEvents=function(){var t=this;s(l,"scroll",function(){t._moved||(clearTimeout(a),c=!0,a=setTimeout(function(){c=!1},250))}),l.addEventListener(d.move,function(e){t._moved&&e.preventDefault()}),this.panel.addEventListener(d.start,function(e){"undefined"!=typeof e.touches&&(t._moved=!1,t._opening=!1,t._startOffsetX=e.touches[0].pageX,t._preventOpen=!t.isOpen()&&0!==t.menu.clientWidth)}),this.panel.addEventListener("touchcancel",function(){t._moved=!1,t._opening=!1}),this.panel.addEventListener(d.end,function(){t._moved&&(t._opening&&Math.abs(t._currentOffsetX)>t._tolerance?t.open():t.close()),t._moved=!1}),this.panel.addEventListener(d.move,function(e){if(!c&&!t._preventOpen&&"undefined"!=typeof e.touches){var n=e.touches[0].clientX-t._startOffsetX,r=t._currentOffsetX=n;if(!(Math.abs(r)>t._padding)&&Math.abs(n)>20){t._opening=!0;var o=n*t._orientation;if(t._opened&&o>0||!t._opened&&0>o)return;0>=o&&(r=n+t._padding*t._orientation,t._opening=!1),t._moved||-1!==p.className.search("slideout-open")||(p.className+=" slideout-open"),t.panel.style[h+"transform"]=t.panel.style.transform="translate3d("+r+"px, 0, 0)",t.emit("translate",r),t._moved=!0}}})},e.exports=i},{decouple:232,emitter:233}],232:[function(t,e,n){"use strict";function r(t,e,n){function r(t){s=t,i()}function i(){u||(o(a),u=!0)}function a(){n.call(t,s),u=!1}var s,u=!1;t.addEventListener(e,r,!1)}var o=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();e.exports=r},{}],233:[function(t,e,n){"use strict";var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};n.__esModule=!0;var o=function(){function t(){r(this,t)}return t.prototype.on=function(t,e){return this._eventCollection=this._eventCollection||{},this._eventCollection[t]=this._eventCollection[t]||[],this._eventCollection[t].push(e),this},t.prototype.once=function(t,e){function n(){r.off(t,n),e.apply(this,arguments)}var r=this;return n.listener=e,this.on(t,n),this},t.prototype.off=function(t,e){var n=void 0;return this._eventCollection&&(n=this._eventCollection[t])?(n.forEach(function(t,r){(t===e||t.listener===e)&&n.splice(r,1)}),0===n.length&&delete this._eventCollection[t],this):this},t.prototype.emit=function(t){for(var e=this,n=arguments.length,r=Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];var i=void 0;return this._eventCollection&&(i=this._eventCollection[t])?(i=i.slice(0),i.forEach(function(t){return t.apply(e,r)}),this):this},t}();n["default"]=o,e.exports=n["default"]},{}]},{},[1]); | 22,713.285714 | 32,260 | 0.712594 |
101f94a44e0d690008641c2c109bf75465d7683b | 403 | js | JavaScript | src/repositories/Cupom.js | Bratech-BR/emporio | 0a05f3cb0016d66adbc467242b0ffad6b4431d72 | [
"MIT"
] | 1 | 2022-01-25T02:58:24.000Z | 2022-01-25T02:58:24.000Z | src/repositories/Cupom.js | Bratech-BR/emporio | 0a05f3cb0016d66adbc467242b0ffad6b4431d72 | [
"MIT"
] | 19 | 2020-04-24T11:41:38.000Z | 2021-05-26T21:49:15.000Z | src/repositories/Cupom.js | Bratech-BR/emporio | 0a05f3cb0016d66adbc467242b0ffad6b4431d72 | [
"MIT"
] | 1 | 2022-03-28T19:17:52.000Z | 2022-03-28T19:17:52.000Z | import { Repository, createRepository } from '@/repositories/Base/Repository'
class CupomRepository extends Repository {
endpoint = 'cupom'
fetchTipos () {
return this.$axios.get(`${this.endpoint}/tipos`)
}
valida(params) {
return this.$axios.post(`${this.endpoint}/valida`, params)
}
}
export default new CupomRepository()
export const create = createRepository(CupomRepository)
| 22.388889 | 77 | 0.722084 |
101fae35c1eb35606906da76007e1dd9ab0636a9 | 643 | js | JavaScript | dist/transformers/transformer/dictionary.transformer.js | anowrot/Kakunin | 40432f26c4bc89971ef887605aaca612bae6912e | [
"MIT"
] | null | null | null | dist/transformers/transformer/dictionary.transformer.js | anowrot/Kakunin | 40432f26c4bc89971ef887605aaca612bae6912e | [
"MIT"
] | null | null | null | dist/transformers/transformer/dictionary.transformer.js | anowrot/Kakunin | 40432f26c4bc89971ef887605aaca612bae6912e | [
"MIT"
] | null | null | null | 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createDictionaryTransformer = undefined;
var _dictionaries = require('../../dictionaries');
class DictionaryTransformer {
constructor(dictionaries) {
this.dictionaries = dictionaries;
}
isSatisfiedBy(prefix) {
return 'd:' === prefix;
}
transform(value) {
const splittedValue = value.split(':');
return this.dictionaries.getMappedValue(splittedValue[0], splittedValue[1]);
}
}
const createDictionaryTransformer = exports.createDictionaryTransformer = (dicts = _dictionaries.dictionaries) => new DictionaryTransformer(dicts); | 26.791667 | 147 | 0.735614 |
10201508ab97d8158256c24de1776547a4b50643 | 5,895 | js | JavaScript | seller/assets/site_assets/js/components/hs.fancybox.js | 9xm/eshop | 76efb12e3c3ee2bc9489c2f334fd3cc58a1057cd | [
"MIT"
] | null | null | null | seller/assets/site_assets/js/components/hs.fancybox.js | 9xm/eshop | 76efb12e3c3ee2bc9489c2f334fd3cc58a1057cd | [
"MIT"
] | null | null | null | seller/assets/site_assets/js/components/hs.fancybox.js | 9xm/eshop | 76efb12e3c3ee2bc9489c2f334fd3cc58a1057cd | [
"MIT"
] | null | null | null | /**
* Fancybox wrapper.
*
* @author Htmlstream
* @version 1.0
* @requires
*
*/
;
(function ($) {
'use strict';
$.HSCore.components.HSFancyBox = {
/**
*
*
* @var Object _baseConfig
*/
_baseConfig: {
parentEl: 'html',
baseClass: 'u-fancybox-theme',
slideClass: 'u-fancybox-slide',
speed: 1000,
slideSpeedCoefficient: 1,
infobar: false,
fullScreen: true,
thumbs: true,
closeBtn: true,
baseTpl: '<div class="fancybox-container" role="dialog" tabindex="-1">' +
'<div class="fancybox-content">' +
'<div class="fancybox-bg"></div>' +
'<div class="fancybox-controls" style="position: relative; z-index: 99999;">' +
'<div class="fancybox-infobar">' +
'<div class="fancybox-infobar__body">' +
'<span data-fancybox-index></span> / <span data-fancybox-count></span>' +
'</div>' +
'</div>' +
'<div class="fancybox-toolbar">{{BUTTONS}}</div>' +
'</div>' +
'<div class="fancybox-slider-wrap">' +
'<button data-fancybox-prev class="fancybox-arrow fancybox-arrow--left" title="Previous"></button>' +
'<button data-fancybox-next class="fancybox-arrow fancybox-arrow--right" title="Next"></button>' +
'<div class="fancybox-stage"></div>' +
'</div>' +
'<div class="fancybox-caption-wrap">' +
'<div class="fancybox-caption"></div>' +
'</div>' +
'</div>' +
'</div>',
animationEffect: 'fade'
},
/**
*
*
* @var jQuery pageCollection
*/
pageCollection: $(),
/**
* Initialization of Fancybox wrapper.
*
* @param String selector (optional)
* @param Object config (optional)
*
* @return jQuery pageCollection - collection of initialized items.
*/
init: function (selector, config) {
if (!selector) return;
var $collection = $(selector);
if (!$collection.length) return;
config = config && $.isPlainObject(config) ? $.extend(true, {}, this._baseConfig, config) : this._baseConfig;
this.initFancyBox(selector, config);
},
initFancyBox: function (el, conf) {
var $fancybox = $(el);
$fancybox.on('click', function () {
var $this = $(this),
animationDuration = $this.data('speed'),
isGroup = $this.data('fancybox'),
isInfinite = Boolean($this.data('is-infinite')),
isSlideShowAutoStart = Boolean($this.data('is-slideshow-auto-start')),
slideShowSpeed = $this.data('slideshow-speed');
$.fancybox.defaults.animationDuration = animationDuration;
if (isInfinite === true) {
$.fancybox.defaults.loop = true;
}
if (isSlideShowAutoStart === true) {
$.fancybox.defaults.slideShow.autoStart = true;
} else {
$.fancybox.defaults.slideShow.autoStart = false;
}
if (isGroup) {
$.fancybox.defaults.transitionEffect = 'slide';
$.fancybox.defaults.slideShow.speed = slideShowSpeed;
}
});
$fancybox.fancybox($.extend(true, {}, conf, {
beforeShow: function (instance, slide) {
var $fancyModal = $(instance.$refs.container),
$fancyOverlay = $(instance.$refs.bg[0]),
$fancySlide = $(instance.current.$slide),
animateIn = instance.current.opts.$orig[0].dataset.animateIn,
animateOut = instance.current.opts.$orig[0].dataset.animateOut,
speed = instance.current.opts.$orig[0].dataset.speed,
overlayBG = instance.current.opts.$orig[0].dataset.overlayBg,
overlayBlurBG = instance.current.opts.$orig[0].dataset.overlayBlurBg;
if (animateIn && $('body').hasClass('u-first-slide-init')) {
var $fancyPrevSlide = $(instance.slides[instance.prevPos].$slide);
$fancySlide.addClass('has-animation');
$fancyPrevSlide.addClass('animated ' + animateOut);
setTimeout(function () {
$fancySlide.addClass('animated ' + animateIn);
}, speed / 2);
} else if (animateIn) {
var $fancyPrevSlide = $(instance.slides[instance.prevPos].$slide);
$fancySlide.addClass('has-animation');
$fancySlide.addClass('animated ' + animateIn);
$('body').addClass('u-first-slide-init');
$fancySlide.on('animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', function (e) {
$fancySlide.removeClass(animateIn);
});
}
if (speed) {
$fancyOverlay.css('transition-duration', speed + 'ms');
} else {
$fancyOverlay.css('transition-duration', '1000ms');
}
if (overlayBG) {
$fancyOverlay.css('background-color', overlayBG);
}
if (overlayBlurBG) {
$('body').addClass('u-blur-30');
}
},
beforeClose: function (instance, slide) {
var $fancyModal = $(instance.$refs.container),
$fancySlide = $(instance.current.$slide),
animateIn = instance.current.opts.$orig[0].dataset.animateIn,
animateOut = instance.current.opts.$orig[0].dataset.animateOut,
overlayBlurBG = instance.current.opts.$orig[0].dataset.overlayBlurBg;
if (animateOut) {
$fancySlide.removeClass(animateIn).addClass(animateOut);
$('body').removeClass('u-first-slide-init')
}
if (overlayBlurBG) {
$('body').removeClass('u-blur-30')
}
}
}));
}
}
})(jQuery);
| 32.39011 | 116 | 0.542154 |
10207ceca86d98b5624c683896f4091e555ef65a | 6,235 | js | JavaScript | js/ui/list/ui.list.edit.decorator.selection.js | RomanTsukanov/DevExtreme | 9e268cf6eed550dbe82cff13a619fcd6e3c3a54e | [
"Apache-2.0"
] | null | null | null | js/ui/list/ui.list.edit.decorator.selection.js | RomanTsukanov/DevExtreme | 9e268cf6eed550dbe82cff13a619fcd6e3c3a54e | [
"Apache-2.0"
] | null | null | null | js/ui/list/ui.list.edit.decorator.selection.js | RomanTsukanov/DevExtreme | 9e268cf6eed550dbe82cff13a619fcd6e3c3a54e | [
"Apache-2.0"
] | null | null | null | "use strict";
var $ = require("jquery"),
clickEvent = require("../../events/click"),
CheckBox = require("../check_box"),
RadioButton = require("../radio_group/radio_button"),
eventUtils = require("../../events/utils"),
registerDecorator = require("./ui.list.edit.decorator_registry").register,
EditDecorator = require("./ui.list.edit.decorator");
var SELECT_DECORATOR_ENABLED_CLASS = "dx-list-select-decorator-enabled",
SELECT_DECORATOR_SELECT_ALL_CLASS = "dx-list-select-all",
SELECT_DECORATOR_SELECT_ALL_CHECKBOX_CLASS = "dx-list-select-all-checkbox",
SELECT_DECORATOR_SELECT_ALL_LABEL_CLASS = "dx-list-select-all-label",
SELECT_CHECKBOX_CONTAINER_CLASS = "dx-list-select-checkbox-container",
SELECT_CHECKBOX_CLASS = "dx-list-select-checkbox",
SELECT_RADIO_BUTTON_CONTAINER_CLASS = "dx-list-select-radiobutton-container",
SELECT_RADIO_BUTTON_CLASS = "dx-list-select-radiobutton";
var CLICK_EVENT_NAME = eventUtils.addNamespace(clickEvent.name, "dxListEditDecorator");
registerDecorator(
"selection",
"default",
EditDecorator.inherit({
_init: function() {
this.callBase.apply(this, arguments);
var selectionMode = this._list.option("selectionMode");
this._singleStrategy = selectionMode === "single";
this._containerClass = this._singleStrategy ? SELECT_RADIO_BUTTON_CONTAINER_CLASS : SELECT_CHECKBOX_CONTAINER_CLASS;
this._controlClass = this._singleStrategy ? SELECT_RADIO_BUTTON_CLASS : SELECT_CHECKBOX_CLASS;
this._controlWidget = this._singleStrategy ? RadioButton : CheckBox;
this._list.element().addClass(SELECT_DECORATOR_ENABLED_CLASS);
},
beforeBag: function(config) {
var $itemElement = config.$itemElement,
$container = config.$container;
var $control = $("<div />").addClass(this._controlClass);
new this._controlWidget($control, $.extend(this._commonOptions(), {
value: this._isSelected($itemElement),
focusStateEnabled: false,
hoverStateEnabled: false,
onValueChanged: $.proxy(function(e) {
this._processCheckedState($itemElement, e.value);
e.jQueryEvent && e.jQueryEvent.stopPropagation();
}, this)
}));
$container.addClass(this._containerClass);
$container.append($control);
},
modifyElement: function(config) {
this.callBase.apply(this, arguments);
var $itemElement = config.$itemElement,
control = this._controlWidget.getInstance($itemElement.find("." + this._controlClass));
$itemElement.on("stateChanged", $.proxy(function() {
control.option("value", this._isSelected($itemElement));
this._updateSelectAllState();
}, this));
},
_updateSelectAllState: function() {
if(!this._$selectAll) {
return;
}
this._selectAllCheckBox.option("value", this._list.isSelectAll());
},
afterRender: function() {
if(this._list.option("selectionMode") !== "all") {
return;
}
if(!this._$selectAll) {
this._renderSelectAll();
} else {
this._updateSelectAllState();
}
},
_renderSelectAll: function() {
var $selectAll = this._$selectAll = $("<div>").addClass(SELECT_DECORATOR_SELECT_ALL_CLASS);
this._selectAllCheckBox = this._list._createComponent($("<div>")
.addClass(SELECT_DECORATOR_SELECT_ALL_CHECKBOX_CLASS)
.appendTo($selectAll), CheckBox);
$("<div>").addClass(SELECT_DECORATOR_SELECT_ALL_LABEL_CLASS)
.text(this._list.option("selectAllText"))
.appendTo($selectAll);
this._list.itemsContainer().prepend($selectAll);
this._updateSelectAllState();
this._attachSelectAllHandler();
},
_attachSelectAllHandler: function() {
this._selectAllCheckBox.option("onValueChanged", $.proxy(this._selectAllHandler, this));
this._$selectAll
.off(CLICK_EVENT_NAME)
.on(CLICK_EVENT_NAME, $.proxy(this._selectAllClickHandler, this));
},
_selectAllHandler: function(e) {
e.jQueryEvent && e.jQueryEvent.stopPropagation();
var isSelectedAll = this._selectAllCheckBox.option("value");
var result = this._list._createActionByOption("onSelectAllValueChanged")({ value: isSelectedAll });
if(result === false) {
return;
}
if(isSelectedAll === true) {
this._selectAllItems();
} else if(isSelectedAll === false) {
this._unselectAllItems();
}
},
_selectAllItems: function() {
this._list._selection.selectAll(this._list.option("selectAllMode") === "page");
},
_unselectAllItems: function() {
this._list._selection.deselectAll(this._list.option("selectAllMode") === "page");
},
_selectAllClickHandler: function() {
this._selectAllCheckBox.option("value", !this._selectAllCheckBox.option("value"));
},
_isSelected: function($itemElement) {
return this._list.isItemSelected($itemElement);
},
_processCheckedState: function($itemElement, checked) {
if(checked) {
this._list.selectItem($itemElement);
} else {
this._list.unselectItem($itemElement);
}
},
dispose: function() {
this._disposeSelectAll();
this._list.element().removeClass(SELECT_DECORATOR_ENABLED_CLASS);
this.callBase.apply(this, arguments);
},
_disposeSelectAll: function() {
if(this._$selectAll) {
this._$selectAll.remove();
this._$selectAll = null;
}
}
})
);
| 35.426136 | 128 | 0.593745 |
10209b65849b92a2001198588584500850be12ad | 1,389 | js | JavaScript | assets/javascript/game.js | gregoryjmckenzie7/Psychic-Game | fb40aca1a0f8f316c2e909c6a97c5c5451df65cd | [
"MIT"
] | null | null | null | assets/javascript/game.js | gregoryjmckenzie7/Psychic-Game | fb40aca1a0f8f316c2e909c6a97c5c5451df65cd | [
"MIT"
] | null | null | null | assets/javascript/game.js | gregoryjmckenzie7/Psychic-Game | fb40aca1a0f8f316c2e909c6a97c5c5451df65cd | [
"MIT"
] | null | null | null | var computerOptions = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
var wins = 0;
var losses = 0;
var guessesLeft = 9;
var guessesSoFar = [];
var userGuess = null;
var letterToBeGuessed = computerOptions[Math.floor(Math.random() * computerOptions.length)];
document.onkeyup = function(event) {
var userGuess = String.fromCharCode(event.keyCode).toLowerCase();
if (guessesSoFar.indexOf(userGuess) < 0 && computerOptions.indexOf(userGuess) >= 0) {
guessesSoFar[guessesSoFar.length]=userGuess;
guessesLeft--;
}
if (letterToBeGuessed == userGuess) {
wins++;
alert(" Wow, you have psychic powers!!! You Win!")
guessesLeft = 9;
guessesSoFar = [];
letterToBeGuessed = computerOptions[Math.floor(Math.random() * computerOptions.length)];
}
if (guessesLeft == 0) {
losses++;
alert(" You lose, you have no psychic powers. Try Again?")
guessesLeft = 9;
guessesSoFar = [];
letterToBeGuessed = computerOptions[Math.floor(Math.random() * computerOptions.length)];
}
var html = "<h1>The Psychic Game</h1>" + "<h4>Guess what letter I\'m thinking of</h4>" + "<h4>Wins: " + wins + "</h4>" + "<h4>Losses: " + losses + "</h4>" + "<h4>Guesses Left: " + guessesLeft + "</h4>" + "<h4>Your guesses so far: " + guessesSoFar + "</h4>";
document.querySelector("#game").innerHTML = html;
} | 35.615385 | 258 | 0.631389 |
1020bfb9e7ee52a0a3bc12a8ff9570f14c276d07 | 30,937 | js | JavaScript | bkpsiteantigo/vtigercrm/libraries/jquery/gantt/ganttMaster.js | renatoads1/mobytel | 8667d84f114a5de35313c0a7b98e61db2ce87271 | [
"MIT"
] | null | null | null | bkpsiteantigo/vtigercrm/libraries/jquery/gantt/ganttMaster.js | renatoads1/mobytel | 8667d84f114a5de35313c0a7b98e61db2ce87271 | [
"MIT"
] | null | null | null | bkpsiteantigo/vtigercrm/libraries/jquery/gantt/ganttMaster.js | renatoads1/mobytel | 8667d84f114a5de35313c0a7b98e61db2ce87271 | [
"MIT"
] | null | null | null | /*
Copyright (c) 2012-2014 Open Lab
Written by Roberto Bicchierai and Silvia Chelazzi http://roberto.open-lab.com
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
function GanttMaster() {
this.tasks = [];
this.deletedTaskIds = [];
this.links = [];
this.editor; //element for editor
this.gantt; //element for gantt
this.element;
this.resources; //list of resources
this.roles; //list of roles
this.minEditableDate = 0;
this.maxEditableDate = Infinity;
this.canWriteOnParent = true;
this.canWrite = true;
this.firstDayOfWeek = Date.firstDayOfWeek;
this.currentTask; // task currently selected;
this.__currentTransaction; // a transaction object holds previous state during changes
this.__undoStack = [];
this.__redoStack = [];
this.__inUndoRedo = false; // a control flag to avoid Undo/Redo stacks reset when needed
var self = this;
}
GanttMaster.prototype.init = function (place) {
this.element = place;
var self = this;
//load templates
$("#gantEditorTemplates").loadTemplates().remove(); // TODO: Remove inline jquery, this should be injected
//create editor
this.editor = new GridEditor(this);
place.append(this.editor.gridified);
//create gantt
this.gantt = new Ganttalendar("m", new Date().getTime() - 3600000 * 24 * 2, new Date().getTime() + 3600000 * 24 * 15, this, place.width() * .6);
//setup splitter
var splitter = $.splittify.init(place, this.editor.gridified, this.gantt.element, 60);
self.splitter=splitter;
//bindings
place.bind("refreshTasks.gantt",function () {
self.redrawTasks();
}).bind("refreshTask.gantt",function (e, task) {
self.drawTask(task);
}).bind("deleteCurrentTask.gantt",function (e) {
self.deleteCurrentTask();
}).bind("addAboveCurrentTask.gantt",function () {
self.addAboveCurrentTask();
}).bind("addBelowCurrentTask.gantt",function () {
self.addBelowCurrentTask();
}).bind("indentCurrentTask.gantt",function () {
self.indentCurrentTask();
}).bind("outdentCurrentTask.gantt",function () {
self.outdentCurrentTask();
}).bind("moveUpCurrentTask.gantt",function () {
self.moveUpCurrentTask();
}).bind("moveDownCurrentTask.gantt",function () {
self.moveDownCurrentTask();
}).bind("zoomPlus.gantt",function () {
self.gantt.zoomGantt(true);
}).bind("zoomMinus.gantt",function () {
self.gantt.zoomGantt(false);
}).bind("undo.gantt",function () {
if(!self.canWrite)
return;
self.undo();
}).bind("redo.gantt", function () {
if(!self.canWrite)
return;
self.redo();
}).bind("resize.gantt", function () {
self.resize();
});
//keyboard management bindings
$("body").bind("keydown.body", function (e) {
//console.debug(e.keyCode+ " "+e.target.nodeName)
//manage only events for body -> not from inputs
if (e.target.nodeName.toLowerCase() == "body" || e.target.nodeName.toLowerCase() == "svg") { // chrome,ff receive "body" ie "svg"
//something focused?
//console.debug(e.keyCode, e.ctrlKey)
var eventManaged=true;
switch (e.keyCode) {
case 46: //del
case 8: //backspace
var focused = self.gantt.element.find(".focused.focused");// orrible hack for chrome that seems to keep in memory a cached object
if (focused.is(".taskBox")) { // remove task
self.deleteCurrentTask();
} else if (focused.is(".linkGroup")) {
self.removeLink(focused.data("from"), focused.data("to"));
}
break;
case 38: //up
if (self.currentTask) {
if (self.currentTask.ganttElement.is(".focused")) {
self.moveUpCurrentTask();
self.gantt.element.oneTime(100, function () {self.currentTask.ganttElement.addClass("focused");});
} else {
self.currentTask.rowElement.prev().click();
}
}
break;
case 40: //down
if (self.currentTask) {
if (self.currentTask.ganttElement.is(".focused")) {
self.moveDownCurrentTask();
self.gantt.element.oneTime(100, function () {self.currentTask.ganttElement.addClass("focused");});
} else {
self.currentTask.rowElement.next().click();
}
}
break;
case 39: //right
if (self.currentTask) {
if (self.currentTask.ganttElement.is(".focused")) {
self.indentCurrentTask();
self.gantt.element.oneTime(100, function () {self.currentTask.ganttElement.addClass("focused");});
}
}
break;
case 37: //left
if (self.currentTask) {
if (self.currentTask.ganttElement.is(".focused")) {
self.outdentCurrentTask();
self.gantt.element.oneTime(100, function () {self.currentTask.ganttElement.addClass("focused");});
}
}
break;
case 89: //Y
if (e.ctrlKey) {
self.redo();
}
break;
case 90: //Z
if (e.ctrlKey) {
self.undo();
}
break;
default :{
eventManaged=false;
}
}
if (eventManaged){
e.preventDefault();
e.stopPropagation();
}
}
});
};
GanttMaster.messages = {
"CANNOT_WRITE": "CANNOT_WRITE",
"CHANGE_OUT_OF_SCOPE": "NO_RIGHTS_FOR_UPDATE_PARENTS_OUT_OF_EDITOR_SCOPE",
"START_IS_MILESTONE": "START_IS_MILESTONE",
"END_IS_MILESTONE": "END_IS_MILESTONE",
"TASK_HAS_CONSTRAINTS": "TASK_HAS_CONSTRAINTS",
"GANTT_ERROR_DEPENDS_ON_OPEN_TASK": "GANTT_ERROR_DEPENDS_ON_OPEN_TASK",
"GANTT_ERROR_DESCENDANT_OF_CLOSED_TASK":"GANTT_ERROR_DESCENDANT_OF_CLOSED_TASK",
"TASK_HAS_EXTERNAL_DEPS": "TASK_HAS_EXTERNAL_DEPS",
"GANTT_ERROR_LOADING_DATA_TASK_REMOVED":"GANTT_ERROR_LOADING_DATA_TASK_REMOVED",
"CIRCULAR_REFERENCE": "CIRCULAR_REFERENCE",
"ERROR_SETTING_DATES": "ERROR_SETTING_DATES",
"CANNOT_DEPENDS_ON_ANCESTORS": "CANNOT_DEPENDS_ON_ANCESTORS",
"CANNOT_DEPENDS_ON_DESCENDANTS": "CANNOT_DEPENDS_ON_DESCENDANTS",
"INVALID_DATE_FORMAT": "INVALID_DATE_FORMAT",
"GANTT_QUARTER_SHORT": "Q ",
"GANTT_SEMESTER_SHORT":"Half-Yearly ",
"CANNOT_CLOSE_TASK_IF_OPEN_ISSUE":"CANNOT_CLOSE_TASK_IF_OPEN_ISSUE"
};
GanttMaster.prototype.createTask = function (id, name, code, level, start, duration) {
var factory = new TaskFactory();
return factory.build(id, name, code, level, start, duration);
};
GanttMaster.prototype.createResource = function (id, name) {
var res = new Resource(id, name);
return res;
};
//update depends strings
GanttMaster.prototype.updateDependsStrings = function () {
//remove all deps
for (var i = 0; i < this.tasks.length; i++) {
this.tasks[i].depends = "";
}
for (var i = 0; i < this.links.length; i++) {
var link = this.links[i];
var dep = link.to.depends;
link.to.depends = link.to.depends + (link.to.depends == "" ? "" : ",") + (link.from.getRow() + 1) + (link.lag ? ":" + link.lag : "");
}
};
GanttMaster.prototype.removeLink = function (fromTask,toTask) {
//console.debug("removeLink");
if (!this.canWrite || (!fromTask.canWrite && !toTask.canWrite))
return;
this.beginTransaction();
var found = false;
for (var i = 0; i < this.links.length; i++) {
if (this.links[i].from == fromTask && this.links[i].to == toTask) {
this.links.splice(i, 1);
found = true;
break;
}
}
if (found) {
this.updateDependsStrings();
if (this.updateLinks(toTask))
this.changeTaskDates(toTask, toTask.start, toTask.end); // fake change to force date recomputation from dependencies
}
this.endTransaction();
};
//------------------------------------ ADD TASK --------------------------------------------
GanttMaster.prototype.addTask = function (task, row) {
//console.debug("master.addTask",task,row,this);
/* task.master = this; // in order to access controller from task
//replace if already exists
var pos = -1;
for (var i = 0; i < this.tasks.length; i++) {
if (task.id == this.tasks[i].id) {
pos = i;
break;
}
}
if (pos >= 0) {
this.tasks.splice(pos, 1);
row = parseInt(pos);
}
//add task in collection
if (typeof(row) != "number") {
this.tasks.push(task);
} else {
this.tasks.splice(row, 0, task);
//recompute depends string
this.updateDependsStrings();
}
//add Link collection in memory
var linkLoops = !this.updateLinks(task);
//set the status according to parent
if (task.getParent())
task.status = task.getParent().status;
else
task.status = "STATUS_ACTIVE";
var ret = task;
if (linkLoops || !task.setPeriod(task.start, task.end)) {
//remove task from in-memory collection
//console.debug("removing task from memory",task);
this.tasks.splice(task.getRow(), 1);
ret = undefined;
} else {
//append task to editor
this.editor.addTask(task, row);
//append task to gantt
this.gantt.addTask(task);
}
return ret; */
};
/**
* a project contais tasks, resources, roles, and info about permisions
* @param project
*/
GanttMaster.prototype.loadProject = function (project) {
this.beginTransaction();
this.resources = project.resources;
this.roles = project.roles;
this.canWrite = project.canWrite;
this.canWriteOnParent = project.canWriteOnParent;
this.cannotCloseTaskIfIssueOpen = project.cannotCloseTaskIfIssueOpen;
if (project.minEditableDate)
this.minEditableDate = computeStart(project.minEditableDate);
else
this.minEditableDate = -Infinity;
if (project.maxEditableDate)
this.maxEditableDate = computeEnd(project.maxEditableDate);
else
this.maxEditableDate = Infinity;
this.loadTasks(project.tasks, project.selectedRow);
this.deletedTaskIds = [];
//[expand]
this.gantt.refreshGantt();
this.endTransaction();
var self = this;
this.gantt.element.oneTime(200, function () {self.gantt.centerOnToday()});
};
GanttMaster.prototype.loadTasks = function (tasks, selectedRow) {
var factory = new TaskFactory();
//reset
this.reset();
for (var i = 0; i < tasks.length; i++) {
var task = tasks[i];
if (!(task instanceof Task)) {
var t = factory.build(task.id, task.name, task.code, task.level, task.start, task.duration, task.collapsed);
for (var key in task) {
if (key != "end" && key != "start")
t[key] = task[key]; //copy all properties
}
task = t;
}
task.master = this; // in order to access controller from task
/*//replace if already exists
var pos = -1;
for (var i=0;i<this.tasks.length;i++) {
if (task.id == this.tasks[i].id) {
pos = i;
break;
}
}*/
this.tasks.push(task); //append task at the end
}
//var prof=new Profiler("gm_loadTasks_addTaskLoop");
for (var i = 0; i < this.tasks.length; i++) {
var task = this.tasks[i];
//add Link collection in memory
var linkLoops = !this.updateLinks(task);
if (linkLoops || !task.setPeriod(task.start, task.end)) {
alert(GanttMaster.messages.GANNT_ERROR_LOADING_DATA_TASK_REMOVED + "\n" + task.name + "\n" +
(linkLoops ? GanttMaster.messages.CIRCULAR_REFERENCE : GanttMaster.messages.ERROR_SETTING_DATES));
//remove task from in-memory collection
this.tasks.splice(task.getRow(), 1);
} else {
//append task to editor
this.editor.addTask(task, null, true);
//append task to gantt
this.gantt.addTask(task);
}
}
this.editor.fillEmptyLines();
//prof.stop();
// re-select old row if tasks is not empty
if (this.tasks && this.tasks.length > 0) {
selectedRow = selectedRow ? selectedRow : 0;
this.tasks[selectedRow].rowElement.click();
}
};
GanttMaster.prototype.getTask = function (taskId) {
var ret;
for (var i = 0; i < this.tasks.length; i++) {
var tsk = this.tasks[i];
if (tsk.id == taskId) {
ret = tsk;
break;
}
}
return ret;
};
GanttMaster.prototype.getResource = function (resId) {
var ret;
for (var i = 0; i < this.resources.length; i++) {
var res = this.resources[i];
if (res.id == resId) {
ret = res;
break;
}
}
return ret;
};
GanttMaster.prototype.changeTaskDates = function (task, start, end) {
return task.setPeriod(start, end);
};
GanttMaster.prototype.moveTask = function (task, newStart) {
return task.moveTo(newStart, true);
};
GanttMaster.prototype.taskIsChanged = function () {
//console.debug("taskIsChanged");
var master = this;
//refresh is executed only once every 50ms
this.element.stopTime("gnnttaskIsChanged");
//var profilerext = new Profiler("gm_taskIsChangedRequest");
this.element.oneTime(50, "gnnttaskIsChanged", function () {
//console.debug("task Is Changed real call to redraw");
//var profiler = new Profiler("gm_taskIsChangedReal");
master.editor.redraw();
master.gantt.refreshGantt();
//profiler.stop();
});
//profilerext.stop();
};
GanttMaster.prototype.redraw = function () {
this.editor.redraw();
this.gantt.refreshGantt();
};
GanttMaster.prototype.reset = function () {
this.tasks = [];
this.links = [];
this.deletedTaskIds = [];
if (!this.__inUndoRedo) {
this.__undoStack = [];
this.__redoStack = [];
} else { // don't reset the stacks if we're in an Undo/Redo, but restart the inUndoRedo control
this.__inUndoRedo = false;
}
delete this.currentTask;
this.editor.reset();
this.gantt.reset();
};
GanttMaster.prototype.showTaskEditor = function (taskId) {
var task = this.getTask(taskId);
task.rowElement.find(".edit").click();
};
GanttMaster.prototype.saveProject = function () {
return this.saveGantt(false);
};
GanttMaster.prototype.saveGantt = function (forTransaction) {
//var prof = new Profiler("gm_saveGantt");
var saved = [];
for (var i = 0; i < this.tasks.length; i++) {
var task = this.tasks[i];
var cloned = task.clone();
delete cloned.master;
delete cloned.rowElement;
delete cloned.ganttElement;
saved.push(cloned);
}
var ret = {tasks:saved};
if (this.currentTask) {
ret.selectedRow = this.currentTask.getRow();
}
ret.deletedTaskIds = this.deletedTaskIds; //this must be consistent with transactions and undo
if (!forTransaction) {
ret.resources = this.resources;
ret.roles = this.roles;
ret.canWrite = this.canWrite;
ret.canWriteOnParent = this.canWriteOnParent;
}
//prof.stop();
return ret;
};
GanttMaster.prototype.updateLinks = function (task) {
//console.debug("updateLinks",task);
//var prof= new Profiler("gm_updateLinks");
// defines isLoop function
function isLoop(task, target, visited) {
//var prof= new Profiler("gm_isLoop");
//console.debug("isLoop :"+task.name+" - "+target.name);
if (target == task) {
return true;
}
var sups = task.getSuperiors();
//my parent' superiors are my superiors too
var p= task.getParent();
while (p){
sups=sups.concat(p.getSuperiors());
p= p.getParent();
}
//my children superiors are my superiors too
var chs=task.getChildren();
for (var i=0;i<chs.length;i++){
sups=sups.concat(chs[i].getSuperiors());
}
var loop = false;
//check superiors
for (var i = 0; i < sups.length; i++) {
var supLink = sups[i];
if (supLink.from == target) {
loop = true;
break;
} else {
if (visited.indexOf(supLink.from.id+"x"+target.id) <= 0) {
visited.push(supLink.from.id+"x"+target.id);
if (isLoop(supLink.from, target, visited)) {
loop = true;
break;
}
}
}
}
//check target parent
var tpar=target.getParent();
if (tpar ){
if (visited.indexOf(task.id+"x"+tpar.id) <= 0) {
visited.push(task.id+"x"+tpar.id);
if (isLoop(task,tpar, visited)) {
loop = true;
}
}
}
//prof.stop();
return loop;
}
//remove my depends
this.links = this.links.filter(function (link) {
return link.to != task;
});
var todoOk = true;
if (task.depends) {
//cannot depend from an ancestor
var parents = task.getParents();
//cannot depend from descendants
var descendants = task.getDescendant();
var deps = task.depends.split(",");
var newDepsString = "";
var visited = [];
for (var j = 0; j < deps.length; j++) {
var dep = deps[j]; // in the form of row(lag) e.g. 2:3,3:4,5
var par = dep.split(":");
var lag = 0;
if (par.length > 1) {
lag = parseInt(par[1]);
}
var sup = this.tasks[parseInt(par[0] - 1)];
if (sup) {
if (parents && parents.indexOf(sup) >= 0) {
this.setErrorOnTransaction(task.name + "\n" + GanttMaster.messages.CANNOT_DEPENDS_ON_ANCESTORS + "\n" + sup.name);
todoOk = false;
} else if (descendants && descendants.indexOf(sup) >= 0) {
this.setErrorOnTransaction(task.name + "\n" + GanttMaster.messages.CANNOT_DEPENDS_ON_DESCENDANTS + "\n" + sup.name);
todoOk = false;
} else if (isLoop(sup, task, visited)) {
todoOk = false;
this.setErrorOnTransaction(GanttMaster.messages.CIRCULAR_REFERENCE + "\n" + task.name + " -> " + sup.name);
} else {
this.links.push(new Link(sup, task, lag));
newDepsString = newDepsString + (newDepsString.length > 0 ? "," : "") + dep;
}
}
}
if (todoOk) {
task.depends = newDepsString;
}
}
//prof.stop();
return todoOk;
};
GanttMaster.prototype.moveUpCurrentTask=function(){
var self=this;
//console.debug("moveUpCurrentTask",self.currentTask)
if(!self.canWrite )
return;
if (self.currentTask) {
self.beginTransaction();
self.currentTask.moveUp();
self.endTransaction();
}
};
GanttMaster.prototype.moveDownCurrentTask=function(){
var self=this;
//console.debug("moveDownCurrentTask",self.currentTask)
if(!self.canWrite)
return;
if (self.currentTask) {
self.beginTransaction();
self.currentTask.moveDown();
self.endTransaction();
}
};
GanttMaster.prototype.outdentCurrentTask=function(){
var self=this;
if(!self.canWrite|| !self.currentTask.canWrite)
return;
if (self.currentTask) {
var par = self.currentTask.getParent();
self.beginTransaction();
self.currentTask.outdent();
self.endTransaction();
//[expand]
if(par) self.editor.refreshExpandStatus(par);
}
};
GanttMaster.prototype.indentCurrentTask=function(){
var self=this;
if (!self.canWrite|| !self.currentTask.canWrite)
return;
if (self.currentTask) {
self.beginTransaction();
self.currentTask.indent();
self.endTransaction();
}
};
GanttMaster.prototype.addBelowCurrentTask=function(){
var self=this;
if (!self.canWrite)
return;
var factory = new TaskFactory();
self.beginTransaction();
var ch;
var row = 0;
if (self.currentTask) {
ch = factory.build("tmp_" + new Date().getTime(), "", "", self.currentTask.level + 1, self.currentTask.start, 1);
row = self.currentTask.getRow() + 1;
} else {
ch = factory.build("tmp_" + new Date().getTime(), "", "", 0, new Date().getTime(), 1);
}
var task = self.addTask(ch, row);
if (task) {
task.rowElement.click();
task.rowElement.find("[name=name]").focus();
}
self.endTransaction();
};
GanttMaster.prototype.addAboveCurrentTask=function(){
var self=this;
if (!self.canWrite)
return;
var factory = new TaskFactory();
var ch;
var row = 0;
if (self.currentTask) {
//cannot add brothers to root
if (self.currentTask.level <= 0)
return;
ch = factory.build("tmp_" + new Date().getTime(), "", "", self.currentTask.level, self.currentTask.start, 1);
row = self.currentTask.getRow();
} else {
ch = factory.build("tmp_" + new Date().getTime(), "", "", 0, new Date().getTime(), 1);
}
self.beginTransaction();
var task = self.addTask(ch, row);
if (task) {
task.rowElement.click();
task.rowElement.find("[name=name]").focus();
}
self.endTransaction();
};
GanttMaster.prototype.deleteCurrentTask=function(){
var self=this;
if (!self.currentTask || !self.canWrite || !self.currentTask.canWrite)
return;
var row = self.currentTask.getRow();
if (self.currentTask && (row > 0 || self.currentTask.isNew())) {
var par = self.currentTask.getParent();
self.beginTransaction();
self.currentTask.deleteTask();
self.currentTask = undefined;
//recompute depends string
self.updateDependsStrings();
//redraw
self.redraw();
//[expand]
if(par) self.editor.refreshExpandStatus(par);
//focus next row
row = row > self.tasks.length - 1 ? self.tasks.length - 1 : row;
if (row >= 0) {
self.currentTask = self.tasks[row];
self.currentTask.rowElement.click();
self.currentTask.rowElement.find("[name=name]").focus();
}
self.endTransaction();
}
};
//<%----------------------------- TRANSACTION MANAGEMENT ---------------------------------%>
GanttMaster.prototype.beginTransaction = function () {
if (!this.__currentTransaction) {
this.__currentTransaction = {
snapshot:JSON.stringify(this.saveGantt(true)),
errors: []
};
} else {
console.error("Cannot open twice a transaction");
}
return this.__currentTransaction;
};
GanttMaster.prototype.endTransaction = function () {
if (!this.__currentTransaction) {
console.error("Transaction never started.");
return true;
}
var ret = true;
//no error -> commit
if (this.__currentTransaction.errors.length <= 0) {
//console.debug("committing transaction");
//put snapshot in undo
this.__undoStack.push(this.__currentTransaction.snapshot);
//clear redo stack
this.__redoStack = [];
//shrink gantt bundaries
this.gantt.originalStartMillis = Infinity;
this.gantt.originalEndMillis = -Infinity;
for (var i = 0; i < this.tasks.length; i++) {
var task = this.tasks[i];
if (this.gantt.originalStartMillis > task.start)
this.gantt.originalStartMillis = task.start;
if (this.gantt.originalEndMillis < task.end)
this.gantt.originalEndMillis = task.end;
}
this.taskIsChanged(); //enqueue for gantt refresh
//error -> rollback
} else {
ret = false;
//console.debug("rolling-back transaction");
//try to restore changed tasks
var oldTasks = JSON.parse(this.__currentTransaction.snapshot);
this.deletedTaskIds = oldTasks.deletedTaskIds;
this.loadTasks(oldTasks.tasks, oldTasks.selectedRow);
this.redraw();
//compose error message
var msg = "";
for (var i = 0; i < this.__currentTransaction.errors.length; i++) {
var err = this.__currentTransaction.errors[i];
msg = msg + err.msg + "\n\n";
}
alert(msg);
}
//reset transaction
this.__currentTransaction = undefined;
//[expand]
this.editor.refreshExpandStatus(this.currentTask);
return ret;
};
//this function notify an error to a transaction -> transaction will rollback
GanttMaster.prototype.setErrorOnTransaction = function (errorMessage, task) {
if (this.__currentTransaction) {
this.__currentTransaction.errors.push({msg:errorMessage, task:task});
} else {
console.error(errorMessage);
}
};
// inhibit undo-redo
GanttMaster.prototype.checkpoint = function () {
this.__undoStack = [];
this.__redoStack = [];
};
//----------------------------- UNDO/REDO MANAGEMENT ---------------------------------%>
GanttMaster.prototype.undo = function () {
//console.debug("undo before:",this.__undoStack,this.__redoStack);
if (this.__undoStack.length > 0) {
var his = this.__undoStack.pop();
this.__redoStack.push(JSON.stringify(this.saveGantt()));
var oldTasks = JSON.parse(his);
this.deletedTaskIds = oldTasks.deletedTaskIds;
this.__inUndoRedo = true; // avoid Undo/Redo stacks reset
this.loadTasks(oldTasks.tasks, oldTasks.selectedRow);
//console.debug(oldTasks,oldTasks.deletedTaskIds)
this.redraw();
//console.debug("undo after:",this.__undoStack,this.__redoStack);
}
};
GanttMaster.prototype.redo = function () {
//console.debug("redo before:",undoStack,redoStack);
if (this.__redoStack.length > 0) {
var his = this.__redoStack.pop();
this.__undoStack.push(JSON.stringify(this.saveGantt()));
var oldTasks = JSON.parse(his);
this.deletedTaskIds = oldTasks.deletedTaskIds;
this.__inUndoRedo = true; // avoid Undo/Redo stacks reset
this.loadTasks(oldTasks.tasks, oldTasks.selectedRow);
this.redraw();
//console.debug("redo after:",undoStack,redoStack);
}
};
GanttMaster.prototype.resize = function () {
//console.debug("GanttMaster.resize")
this.splitter.resize();
};
GanttMaster.prototype.getCollapsedDescendant = function(){
var allTasks = this.tasks;
var collapsedDescendant = [];
for (var i = 0; i < allTasks.length; i++) {
var task = allTasks[i];
if(collapsedDescendant.indexOf(task) >= 0) continue;
if(task.collapsed) collapsedDescendant = collapsedDescendant.concat(task.getDescendant());
}
return collapsedDescendant;
}
/**
* Compute the critical path using Backflow algorithm.
* Translated from Java code supplied by M. Jessup here http://stackoverflow.com/questions/2985317/critical-path-method-algorithm
*
* For each task computes:
* earlyStart, earlyFinish, latestStart, latestFinish, criticalCost
*
* A task on the critical path has isCritical=true
* A task not in critical path can float by latestStart-earlyStart days
*
* If you use critical path avoid usage of dependencies between different levels of tasks
*
* WARNNG: It ignore milestones!!!!
* @return {*}
*/
GanttMaster.prototype.computeCriticalPath = function () {
if (!this.tasks)
return false;
// do not consider grouping tasks
var tasks = this.tasks.filter(function (t) {
return !t.isParent()
});
// reset values
for (var i = 0; i < tasks.length; i++) {
var t = tasks[i];
t.earlyStart = -1;
t.earlyFinish = -1;
t.latestStart = -1;
t.latestFinish = -1;
t.criticalCost = -1;
t.isCritical=false;
}
// tasks whose critical cost has been calculated
var completed = [];
// tasks whose critical cost needs to be calculated
var remaining = tasks.concat(); // put all tasks in remaining
// Backflow algorithm
// while there are tasks whose critical cost isn't calculated.
while (remaining.length > 0) {
var progress = false;
// find a new task to calculate
for (var i = 0; i < remaining.length; i++) {
var task = remaining[i];
var inferiorTasks = task.getInferiorTasks();
if (containsAll(completed, inferiorTasks)) {
// all dependencies calculated, critical cost is max dependency critical cost, plus our cost
var critical = 0;
for (var j = 0; j < inferiorTasks.length; j++) {
var t = inferiorTasks[j];
if (t.criticalCost > critical) {
critical = t.criticalCost;
}
}
task.criticalCost = critical + task.duration;
// set task as calculated an remove
completed.push(task);
remaining.splice(i, 1);
// note we are making progress
progress = true;
}
}
// If we haven't made any progress then a cycle must exist in
// the graph and we wont be able to calculate the critical path
if (!progress) {
console.error("Cyclic dependency, algorithm stopped!");
return false;
}
}
// set earlyStart, earlyFinish, latestStart, latestFinish
computeMaxCost(tasks);
var initialNodes = initials(tasks);
calculateEarly(initialNodes);
calculateCritical(tasks);
/*
for (var i = 0; i < tasks.length; i++) {
var t = tasks[i];
console.debug("Task ", t.name, t.duration, t.earlyStart, t.earlyFinish, t.latestStart, t.latestFinish, t.latestStart - t.earlyStart, t.earlyStart == t.latestStart)
}*/
return tasks;
function containsAll(set, targets) {
for (var i = 0; i < targets.length; i++) {
if (set.indexOf(targets[i]) < 0)
return false;
}
return true;
}
function computeMaxCost(tasks) {
var max = -1;
for (var i = 0; i < tasks.length; i++) {
var t = tasks[i];
if (t.criticalCost > max)
max = t.criticalCost;
}
//console.debug("Critical path length (cost): " + max);
for (var i = 0; i < tasks.length; i++) {
var t = tasks[i];
t.setLatest(max);
}
}
function initials(tasks) {
var initials = [];
for (var i = 0; i < tasks.length; i++) {
if (!tasks[i].depends || tasks[i].depends == "")
initials.push(tasks[i]);
}
return initials;
}
function calculateEarly(initials) {
for (var i = 0; i < initials.length; i++) {
var initial = initials[i];
initial.earlyStart = 0;
initial.earlyFinish = initial.duration;
setEarly(initial);
}
}
function setEarly(initial) {
var completionTime = initial.earlyFinish;
var inferiorTasks = initial.getInferiorTasks();
for (var i = 0; i < inferiorTasks.length; i++) {
var t = inferiorTasks[i];
if (completionTime >= t.earlyStart) {
t.earlyStart = completionTime;
t.earlyFinish = completionTime + t.duration;
}
setEarly(t);
}
}
function calculateCritical(tasks) {
for (var i = 0; i < tasks.length; i++) {
var t = tasks[i];
t.isCritical=(t.earlyStart == t.latestStart)
}
}
};
| 28.330586 | 167 | 0.631962 |
1020eee6a1432b4f7a0e6ab231a8ca1f52868f93 | 1,667 | js | JavaScript | gulpfile.js | robertgarcia/template-university | ba424a4b014467c0e069886bd0668e6e80196cd4 | [
"Apache-2.0"
] | null | null | null | gulpfile.js | robertgarcia/template-university | ba424a4b014467c0e069886bd0668e6e80196cd4 | [
"Apache-2.0"
] | 4 | 2021-03-09T12:16:44.000Z | 2021-05-10T02:20:25.000Z | gulpfile.js | robertgarcia/template-university | ba424a4b014467c0e069886bd0668e6e80196cd4 | [
"Apache-2.0"
] | null | null | null | var gulp = require('gulp'),
settings = require('./settings'),
webpack = require('webpack'),
browserSync = require('browser-sync').create(),
postcss = require('gulp-postcss'),
rgba = require('postcss-hexrgba'),
autoprefixer = require('autoprefixer'),
cssvars = require('postcss-simple-vars'),
nested = require('postcss-nested'),
cssImport = require('postcss-import'),
mixins = require('postcss-mixins'),
colorFunctions = require('postcss-color-function');
gulp.task('styles', function() {
return gulp.src(settings.themeLocation + 'css/style.css')
.pipe(postcss([cssImport, mixins, cssvars, nested, rgba, colorFunctions, autoprefixer]))
.on('error', (error) => console.log(error.toString()))
.pipe(gulp.dest(settings.themeLocation));
});
gulp.task('scripts', function(callback) {
webpack(require('./webpack.config.js'), function(err, stats) {
if (err) {
console.log(err.toString());
}
console.log(stats.toString());
callback();
});
});
gulp.task('watch', function() {
browserSync.init({
notify: false,
proxy: settings.urlToPreview,
ghostMode: false
});
gulp.watch('./**/*.php', function() {
browserSync.reload();
});
gulp.watch(settings.themeLocation + 'css/**/*.css', gulp.parallel('waitForStyles'));
gulp.watch([settings.themeLocation + 'js/modules/*.js', settings.themeLocation + 'js/scripts.js'], gulp.parallel('waitForScripts'));
});
gulp.task('waitForStyles', gulp.series('styles', function() {
return gulp.src(settings.themeLocation + 'style.css')
.pipe(browserSync.stream());
}))
gulp.task('waitForScripts', gulp.series('scripts', function(cb) {
browserSync.reload();
cb()
})) | 30.87037 | 134 | 0.676065 |
102107fe401c3fc9b0f8d8177846a7d9cbbfa13d | 94 | js | JavaScript | src/gatsby-theme-blog/gatsby-plugin-theme-ui/typography.js | RobRuizR/typedgames.dev | 01777bf80d50dab155516f3b0847e95a22598c3b | [
"MIT"
] | null | null | null | src/gatsby-theme-blog/gatsby-plugin-theme-ui/typography.js | RobRuizR/typedgames.dev | 01777bf80d50dab155516f3b0847e95a22598c3b | [
"MIT"
] | null | null | null | src/gatsby-theme-blog/gatsby-plugin-theme-ui/typography.js | RobRuizR/typedgames.dev | 01777bf80d50dab155516f3b0847e95a22598c3b | [
"MIT"
] | null | null | null | import typography from "../../gatsby-plugin-theme-ui/typography";
export default typography;
| 23.5 | 65 | 0.765957 |
102157f39930381f961e6f0e8223de641df5186e | 8,157 | js | JavaScript | app/static/script/app/overrides/gxp/script/widgets/form/AutoCompleteComboBox.js | zaanstad/ZaanAtlas | 3bfef7c6007224e8ca40e15a5dc2a4bfd0c5d518 | [
"BSD-3-Clause"
] | null | null | null | app/static/script/app/overrides/gxp/script/widgets/form/AutoCompleteComboBox.js | zaanstad/ZaanAtlas | 3bfef7c6007224e8ca40e15a5dc2a4bfd0c5d518 | [
"BSD-3-Clause"
] | 1 | 2015-12-03T13:03:44.000Z | 2015-12-03T13:03:44.000Z | app/static/script/app/overrides/gxp/script/widgets/form/AutoCompleteComboBox.js | zaanstad/ZaanAtlas | 3bfef7c6007224e8ca40e15a5dc2a4bfd0c5d518 | [
"BSD-3-Clause"
] | 4 | 2015-09-07T23:24:30.000Z | 2018-12-23T19:37:22.000Z | /**
* Copyright (c) 2008-2011 The Open Planning Project
*
* Published under the GPL license.
* See https://github.com/opengeo/gxp/raw/master/license.txt for the full text
* of the license.
*/
/**
* Reasons for override: Add outputFormat option to make JSON support available
*/
/**
* @include data/AutoCompleteReader.js
* @include data/AutoCompleteProxy.js
*/
/** api: (define)
* module = gxp.form
* class = AutoCompleteComboBox
* base_link = `Ext.form.ComboBox <http://extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox>`_
*/
Ext.namespace("gxp.form");
/** api: constructor
* .. class:: AutoCompleteComboBox(config)
*
* Creates an autocomplete combo box that issues queries to a WFS typename.
*
*/
gxp.form.AutoCompleteComboBox = Ext.extend(Ext.form.ComboBox, {
/** api: xtype = gxp_autocompletecombo */
xtype: "gxp_autocompletecombo",
/** api: config[fieldName]
* ``String``
* The name of the field/attribute to search on. The "name" of this form
* field will also default to fieldName if not provided explicitly.
*/
fieldName: null,
/**
* api: config[featureType]
* ``String``
* The WFS featureType to search on.
*/
featureType: null,
/**
* api: config[featurePrefix]
* ``String``
* The featurePrefix associated with the featureType.
*/
featurePrefix: null,
/**
* api: config[fieldLabel]
* ``String``
* The label to associate with this search field.
*/
fieldLabel: null,
/**
* api: config[geometryName]
* ``String``
* The name of the geometry field.
*/
geometryName: null,
/**
* api: config[maxFeatures]
* ``Integer``
* The maximum number of features to retrieve in one search action.
* Defaults to 500.
*/
maxFeatures: 500,
/**
* api: config[url]
* ``String``
* The url of the WFS to search on.
*/
url: null,
/**
* api: config[srsName]
* ``String``
* The SRS to use in the WFS GetFeature request.
*/
srsName: null,
/**
* api: config[url]
* ``String``
* The outputformat of the request.
*/
outputFormat: "GML2",
autoHeight: true,
hideTrigger: true,
/** api: config[customSortInfo]
* ``Object``
* Providing custom sort info allows sorting of a single field value by
* multiple parts within that value. For example, a value representing
* a street address like "1234 Main Street" would make sense to sort first
* by "Main Street" (case insensitive) and then by "1234" (as an integer).
* The ``customSortInfo`` object must contain ``matcher`` and ``parts``
* properties.
*
* The ``matcher`` value will be used to create a regular expression (with
* ``new RegExp(matcher)``). This regular expression is assumed to have
* grouping parentheses for each part of the value to be compared.
*
* The ``parts`` value must be an array with the same length as the number
* of groups, or parts of the value to be compared. Each item in the
* ``parts`` array may have an ``order`` property and a ``sortType``
* property. The optional ``order`` value determines precedence for a part
* (e.g. part with order 0 will be compared before part with order 1).
* The optional ``sortType`` value must be a string matching one of the
* ``Ext.data.SortTypes`` methods (e.g. "asFloat").
*
* Example custom sort info to match addresses like "123 Main St" first by
* street name and then by number:
*
* .. code-block:: javascript
*
* customSortInfo: {
* matcher: "^(\\d+)\\s(.*)$",
* parts: [
* {order: 1, sortType: "asInt"},
* {order: 0, sortType: "asUCString"}
* ]
* }
*/
customSortInfo: null,
/** private: method[initComponent]
* Override
*/
initComponent: function() {
var fields = [{name: this.fieldName}];
var propertyNames = [this.fieldName];
if (this.geometryName !== null) {
fields.push({name: this.geometryName});
propertyNames.push(this.geometryName);
}
if (!this.name) {
this.name = this.fieldName;
}
this.valueField = this.displayField = this.fieldName;
this.tpl = new Ext.XTemplate('<tpl for="."><div class="x-form-field">','{'+this.fieldName+'}','</div></tpl>');
this.itemSelector = 'div.x-form-field';
this.store = new Ext.data.Store({
fields: fields,
reader: new gxp.data.AutoCompleteReader({uniqueField: this.fieldName}, propertyNames),
proxy: new gxp.data.AutoCompleteProxy({protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url: this.url,
outputFormat: this.outputFormat,
featureType: this.featureType,
featurePrefix: this.featurePrefix,
srsName: this.srsName,
propertyNames: propertyNames,
maxFeatures: this.maxFeatures
}), setParamsAsOptions: true}),
sortInfo: this.customSortInfo && {
field: this.fieldName,
direction: this.customSortInfo.direction
}
});
if (this.customSortInfo) {
this.store.createSortFunction = this.createCustomSortFunction();
}
return gxp.form.AutoCompleteComboBox.superclass.initComponent.apply(this, arguments);
},
/** private: method[createCustomSortFunction]
* If a ``customSortInfo`` property is provided, this method will be called
* to replace the store's ``createSortFunction`` method.
*/
createCustomSortFunction: function() {
/** Example customSortInfo:
*
* customSortInfo: {
* matcher: "^(\\d+)\\s(.*)$",
* parts: [
* {order: 1, sortType: "asInt"},
* {order: 0, sortType: "asUCString"}
* ]
* };
*/
var matchRE = new RegExp(this.customSortInfo.matcher);
var num = this.customSortInfo.parts.length;
var orderLookup = new Array(num);
var part;
for (var i=0; i<num; ++i) {
part = this.customSortInfo.parts[i];
orderLookup[i] = {
index: i,
sortType: Ext.data.SortTypes[part.sortType || "none"],
order: part.order || 0
};
}
orderLookup.sort(function(a, b) {
return a.order - b.order;
});
// this method is the replacement for store.createSortFunction
return function(field, direction) {
direction = direction || "ASC";
var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1;
// this is our custom comparison function that uses the given regex
// to sort by parts of a single field value
return function(r1, r2) {
var d1 = r1.data[field];
var d2 = r2.data[field];
var matches1 = matchRE.exec(d1) || [];
var matches2 = matchRE.exec(d2) || [];
// compare matched parts in order - stopping at first unequal match
var cmp, v1, v2, lookup;
for (var i=0, ii=orderLookup.length; i<ii; ++i) {
lookup = orderLookup[i];
v1 = lookup.sortType(matches1[lookup.index + 1] || d1);
v2 = lookup.sortType(matches2[lookup.index + 1] || d2);
cmp = (v1 > v2 ? 1 : (v1 < v2 ? -1 : 0));
if (cmp) {
break;
}
}
// flip the sign if descending
return directionModifier * cmp;
};
};
}
});
Ext.reg(gxp.form.AutoCompleteComboBox.prototype.xtype, gxp.form.AutoCompleteComboBox);
| 33.024291 | 118 | 0.555351 |
10219f59b3b74ee4a5fbb87ce6d7946c31406230 | 301 | js | JavaScript | wxgh-jssdk/config.js | xuedingmiaojun/koa-demo | aca87607bcbce5415edf1e3cbdaf60bb30f2ed34 | [
"MIT"
] | null | null | null | wxgh-jssdk/config.js | xuedingmiaojun/koa-demo | aca87607bcbce5415edf1e3cbdaf60bb30f2ed34 | [
"MIT"
] | 16 | 2021-03-02T01:36:31.000Z | 2022-03-08T23:36:40.000Z | wxgh-jssdk/config.js | xuedingmiaojun/koa-demo | aca87607bcbce5415edf1e3cbdaf60bb30f2ed34 | [
"MIT"
] | 2 | 2021-12-27T07:12:29.000Z | 2022-02-07T04:51:45.000Z | module.exports = {
grant_type: 'client_credential',
appid: 'wx36963a5a84d5ca4d',
secret: '',
noncestr: 'Wm3WZYTPz0wzccnW',
accessTokenUrl: 'https://api.weixin.qq.com/cgi-bin/token',
ticketUrl: 'https://api.weixin.qq.com/cgi-bin/ticket/getticket',
cache_duration: 1000 * 60 * 60 * 24,
};
| 30.1 | 66 | 0.697674 |
10223269f2a6fe01bc21bee0ab08c9c5a95b49c2 | 10,788 | js | JavaScript | packages/boba/gateway/src/containers/modals/exit/steps/DoExitStepFast.js | gamedazed/optimism-v2 | 11c35fac814801d7c89e9615fe4c2048c09e907f | [
"MIT"
] | null | null | null | packages/boba/gateway/src/containers/modals/exit/steps/DoExitStepFast.js | gamedazed/optimism-v2 | 11c35fac814801d7c89e9615fe4c2048c09e907f | [
"MIT"
] | null | null | null | packages/boba/gateway/src/containers/modals/exit/steps/DoExitStepFast.js | gamedazed/optimism-v2 | 11c35fac814801d7c89e9615fe4c2048c09e907f | [
"MIT"
] | null | null | null | /*
Copyright 2019-present OmiseGO Pte Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
import React, { useState, useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { depositL2LP, fastExitAll } from 'actions/networkAction'
import { openAlert } from 'actions/uiAction'
import { selectLoading } from 'selectors/loadingSelector'
import { selectSignatureStatus_exitLP } from 'selectors/signatureSelector'
import { selectLookupPrice } from 'selectors/lookupSelector'
import Button from 'components/button/Button'
import Input from 'components/input/Input'
import { amountToUsd, logAmount, toWei_String } from 'util/amountConvert'
import networkService from 'services/networkService'
import { Typography, useMediaQuery } from '@material-ui/core'
import { useTheme } from '@emotion/react'
import { WrapperActionsModal } from 'components/modal/Modal.styles'
import { Box } from '@material-ui/system'
import BN from 'bignumber.js'
function DoExitStepFast({ handleClose, token }) {
const dispatch = useDispatch()
const [ value, setValue ] = useState('')
const [ value_Wei_String, setValue_Wei_String ] = useState('0')
const [ LPBalance, setLPBalance ] = useState(0)
const [ LPLiquidity, setLPLiquidity ] = useState(0)
const [ feeRate, setFeeRate ] = useState(0)
const [ LPRatio, setLPRatio ] = useState(0)
const [ l1gas, setl1gas ] = useState(0)
const [ l2FeeBalance, setL2FeeBalance ] = useState(0)
const [ validValue, setValidValue ] = useState(false)
const loading = useSelector(selectLoading(['EXIT/CREATE']))
const lookupPrice = useSelector(selectLookupPrice)
const signatureStatus = useSelector(selectSignatureStatus_exitLP)
const maxValue = logAmount(token.balance, token.decimals)
function setAmount(value) {
const tooSmall = new BN(value).lte(new BN(0.0))
const tooBig = new BN(value).gt(new BN(maxValue))
if (tooSmall || tooBig) {
setValidValue(false)
} else if (token.symbol === 'ETH' && (Number(l1gas) + Number(value)) > Number(l2FeeBalance)) {
//insufficient funds to actually exit
setValidValue(false)
} else if ((Number(l1gas) > Number(l2FeeBalance))) {
//insufficient funds to actually exit
setValidValue(false)
} else if (Number(LPRatio) < 0.1) {
//not enough balance/liquidity ratio
//we always want some balance for unstaking
setValidValue(false)
} else if (Number(value) > Number(LPBalance) * 0.9) {
//not enough absolute balance
//we don't want want one large bridge to wipe out all balance
setValidValue(false)
} else {
//Whew, finally!
setValidValue(true)
}
setValue(value)
}
const receivableAmount = (value) => {
return (Number(value) * ((100 - Number(feeRate)) / 100)).toFixed(3)
}
async function doExit() {
console.log("Amount to exit:", value_Wei_String)
let res = await dispatch(
depositL2LP(
token.address,
value_Wei_String
)
)
if (res) {
dispatch(
openAlert(
`${token.symbol} was bridged. You will receive
${receivableAmount(value)} ${token.symbol} on L1.`
)
)
handleClose()
}
}
async function doExitAll() {
console.log("Amount to exit:", token.balance.toString())
let res = await dispatch(
fastExitAll(
token.address
)
)
if (res) {
dispatch(
openAlert(
`${token.symbol} was bridged. You will receive
${receivableAmount(value)} ${token.symbol}
minus gas fees (if bridging ETH) on L1.`
)
)
handleClose()
}
}
useEffect(() => {
if (typeof(token) !== 'undefined') {
networkService.L1LPBalance(token.addressL1).then((res) => {
setLPBalance(Number(logAmount(res, token.decimals)).toFixed(3))
})
networkService.L1LPLiquidity(token.addressL1).then((res) => {
setLPLiquidity(Number(logAmount(res, token.decimals)).toFixed(3))
})
networkService.getL1TotalFeeRate().then((feeRate) => {
setFeeRate(feeRate)
})
networkService.getFastExitCost(token.address).then((fee) => {
setl1gas(fee)
})
networkService.getL2FeeBalance().then((ETHbalance) => {
setL2FeeBalance(ETHbalance)
})
}
// to clean up state and fix the
// error in console for max state update.
return ()=>{
setLPBalance(0)
setLPLiquidity(0)
setFeeRate(0)
setl1gas(0)
}
}, [ token ])
useEffect(() => {
if(LPLiquidity > 0){
const LPR = LPBalance / LPLiquidity
setLPRatio(Number(LPR).toFixed(3))
}
}, [LPLiquidity, LPBalance])
useEffect(() => {
if (signatureStatus && loading) {
//we are all set - can close the window
//transaction has been sent and signed
handleClose()
}
}, [ signatureStatus, loading, handleClose ])
const feeLabel = 'There is a ' + feeRate + '% fee.'
const theme = useTheme()
const isMobile = useMediaQuery(theme.breakpoints.down('md'))
let buttonLabel = 'Cancel'
if( loading ) buttonLabel = 'Close'
let ETHstring = ''
let warning = false
if(l1gas && Number(l1gas) > 0) {
if (token.symbol !== 'ETH') {
if(Number(l1gas) > Number(l2FeeBalance)) {
warning = true
ETHstring = `The estimated gas fee for this transaction (approval + bridge) is ${Number(l1gas).toFixed(4)} ETH.
WARNING: your L2 ETH balance of ${Number(l2FeeBalance).toFixed(4)} is not sufficient to cover the estimated cost.
THIS TRANSACTION WILL FAIL.`
}
else if(Number(l1gas) > Number(l2FeeBalance) * 0.96) {
warning = true
ETHstring = `The estimated gas fee for this transaction (approval + bridge) is ${Number(l1gas).toFixed(4)} ETH.
CAUTION: your L2 ETH balance of ${Number(l2FeeBalance).toFixed(4)} is very close to the estimated cost.
This transaction might fail. It would be safer to have slightly more ETH in your L2 wallet to cover gas fees.`
}
else {
ETHstring = `The estimated gas fee for this transaction (approval + bridge) is ${Number(l1gas).toFixed(4)} ETH.
Your L2 ETH balance of ${Number(l2FeeBalance).toFixed(4)} is sufficent to cover this transaction.`
}
}
if (token.symbol === 'ETH') {
if((Number(value) + Number(l1gas)) > Number(l2FeeBalance)) {
warning = true
ETHstring = `The estimated total of this transaction (amount + approval + bridge) is ${(Number(value) + Number(l1gas)).toFixed(4)} ETH.
WARNING: your L2 ETH balance of ${Number(l2FeeBalance).toFixed(4)} is not sufficient to cover this transaction.
THIS TRANSACTION WILL FAIL. If you would like to bridge all of your ETH, please use the "BRIDGE ALL" button.`
}
else if ((Number(value) + Number(l1gas)) > Number(l2FeeBalance) * 0.96) {
warning = true
ETHstring = `The estimated total of this transaction (amount + approval + bridge) is ${(Number(value) + Number(l1gas)).toFixed(4)} ETH.
CAUTION: your L2 ETH balance of ${Number(l2FeeBalance).toFixed(4)} is very close to the estimated total.
THIS TRANSACTION MIGHT FAIL. If you would like to bridge all of your ETH, please use the "BRIDGE ALL" button.`
} else {
ETHstring = `The estimated total value of this transaction (amount + approval + bridge) is ${(Number(value) + Number(l1gas)).toFixed(4)} ETH.
Your L2 ETH balance of ${Number(l2FeeBalance).toFixed(4)} is sufficent to cover this transaction.`
}
}
}
return (
<>
<Box>
<Typography variant="h2" sx={{fontWeight: 700, mb: 1}}>
Fast Bridge to L1
</Typography>
<Typography variant="body2" sx={{mb: 3}}>{feeLabel}</Typography>
<Input
label={`Amount to bridge to L1`}
placeholder="0.0"
value={value}
type="number"
onChange={(i)=>{
setAmount(i.target.value)
setValue_Wei_String(toWei_String(i.target.value, token.decimals))
}}
unit={token.symbol}
maxValue={maxValue}
newStyle
variant="standard"
loading={loading}
onExitAll={doExitAll}
allowExitAll={true}
/>
{validValue && token && (
<Typography variant="body2" sx={{mt: 2}}>
{value &&
`You will receive
${receivableAmount(value)}
${token.symbol}
${!!amountToUsd(value, lookupPrice, token) ? `($${amountToUsd(value, lookupPrice, token).toFixed(2)})`: ''}
on L1.`
}
</Typography>
)}
{warning && (
<Typography variant="body2" sx={{mt: 2, color: 'red'}}>
{ETHstring}
</Typography>
)}
{!warning && (
<Typography variant="body2" sx={{mt: 2}}>
{ETHstring}
</Typography>
)}
{Number(LPRatio) < 0.10 && (
<Typography variant="body2" sx={{mt: 2, color: 'red'}}>
The pool's balance/liquidity ratio (of {LPRatio}) is too low to cover your fast bridge right now. Please
use the classic bridge or reduce the amount.
</Typography>
)}
{loading && (
<Typography variant="body2" sx={{mt: 2}}>
This window will automatically close when your transaction has been signed and submitted.
</Typography>
)}
</Box>
<WrapperActionsModal>
<Button
onClick={handleClose}
color='neutral'
size='large'
>
{buttonLabel}
</Button>
<Button
onClick={doExit}
color='primary'
variant='contained'
loading={loading}
tooltip={loading ? "Your transaction is still pending. Please wait for confirmation." : "Click here to bridge your funds to L1"}
disabled={!validValue}
triggerTime={new Date()}
fullWidth={isMobile}
size='large'
>
Bridge to L1
</Button>
</WrapperActionsModal>
</>
)
}
export default React.memo(DoExitStepFast)
| 32.592145 | 150 | 0.618558 |
1022906918a91c4d87568663f1433f17f0f79ce3 | 976 | js | JavaScript | lib/WarnCaseSensitiveModulesPlugin.js | joshunger/webpack | 0e1f9c637ca4c539ade26316e8c1261090efff21 | [
"MIT"
] | null | null | null | lib/WarnCaseSensitiveModulesPlugin.js | joshunger/webpack | 0e1f9c637ca4c539ade26316e8c1261090efff21 | [
"MIT"
] | null | null | null | lib/WarnCaseSensitiveModulesPlugin.js | joshunger/webpack | 0e1f9c637ca4c539ade26316e8c1261090efff21 | [
"MIT"
] | null | null | null | /*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const CaseSensitiveModulesWarning = require("./CaseSensitiveModulesWarning");
class WarnCaseSensitiveModulesPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("WarnCaseSensitiveModulesPlugin", (compilation) => {
compilation.hooks.seal.tap("WarnCaseSensitiveModulesPlugin", () => {
const moduleWithoutCase = new Map();
for(const module of compilation.modules) {
const identifier = module.identifier().toLowerCase();
const array = moduleWithoutCase.get(identifier);
if(array) {
array.push(module);
} else {
moduleWithoutCase.set(identifier, [module]);
}
}
for(const pair of moduleWithoutCase) {
const array = pair[1];
if(array.length > 1)
compilation.warnings.push(new CaseSensitiveModulesWarning(array));
}
});
});
}
}
module.exports = WarnCaseSensitiveModulesPlugin;
| 28.705882 | 85 | 0.702869 |
102296c285a394ccffcd1e2cc2045ed228f24214 | 865 | js | JavaScript | auth/authenticate.js | tabless-thursday-4-15-2019/Backend-Itel | 467bb18aa16e69dd4c4f6a3c3c8c122b99a5af30 | [
"MIT"
] | null | null | null | auth/authenticate.js | tabless-thursday-4-15-2019/Backend-Itel | 467bb18aa16e69dd4c4f6a3c3c8c122b99a5af30 | [
"MIT"
] | null | null | null | auth/authenticate.js | tabless-thursday-4-15-2019/Backend-Itel | 467bb18aa16e69dd4c4f6a3c3c8c122b99a5af30 | [
"MIT"
] | null | null | null | const jwt = require('jsonwebtoken');
//const jwtKey = process.env.JWT_SECRET;
module.exports = {
authenticate,
generateToken
};
// implementation details
function authenticate(req, res, next) {
const token = req.get('Authorization');
if (token) {
jwt.verify(token, process.env.JWT_SECRET, (err, decodedToken) => {
if (err) return res.status(400).json(err);
req.decoded = decodedToken;
next();
});
} else {
return res.status(401).json({
error: 'Where is your token? It must be set on the Authorization Header with Content-type',
});
}
}
function generateToken(user) {
const payload = {
subject: user.id,
username: user.username,
};
const options = {
expiresIn: '1d',
};
const secret = process.env.JWT_SECRET;
return jwt.sign(payload, secret, options);
}
| 20.595238 | 97 | 0.62659 |
1022a36e0043db2e8e1760b9ce8dbfb1dbf7603a | 1,322 | js | JavaScript | ExpressJS Fundamentals/02.Web Server and Development Tools/MovieDB/handlers/detailsMovie.js | MartinValchevv/JS-Web-2019 | 10ac7f30f0fa7d1b7567ec8c6dd3352b766ed24d | [
"MIT"
] | null | null | null | ExpressJS Fundamentals/02.Web Server and Development Tools/MovieDB/handlers/detailsMovie.js | MartinValchevv/JS-Web-2019 | 10ac7f30f0fa7d1b7567ec8c6dd3352b766ed24d | [
"MIT"
] | null | null | null | ExpressJS Fundamentals/02.Web Server and Development Tools/MovieDB/handlers/detailsMovie.js | MartinValchevv/JS-Web-2019 | 10ac7f30f0fa7d1b7567ec8c6dd3352b766ed24d | [
"MIT"
] | null | null | null | const fs = require('fs');
const path = require('path');
const qs = require('querystring');
let database = require('../config/dataBase');
module.exports = (req, res) => {
if (req.path.startsWith('/movies/details')) {
let idMovie = +req.path.split('/')[3];
for (let movie of database) {
if (idMovie === movie.id) {
fs.readFile(path.join(__dirname, '../views/details.html'), (err, data) => {
if(err){
console.log(err);
return;
}
let result = '';
result += '<div class="content">';
result += `<img src="${movie.moviePoster}> alt="picture"/>`;
result += `<h3>Title ${movie.movieTitle}</h3>`;
result += `<h3>Year ${movie.movieYear}</h3>`;
result += `<p>${movie.movieDescription}</p>`;
result += '</div>';
res.writeHead(200, {
'Content-Type':'text/html'
});
data = data.toString().replace('{{content}}',result);
res.write(data);
res.end();
});
}else {
}
}
}
}; | 34.789474 | 91 | 0.403933 |
1022d7e03174af044d6ff83db844dcc8693f0336 | 445 | js | JavaScript | app/src/scripts/user/profile_user/education.fix/educationFix.state.js | HuynhHungManh/Capstone1 | e1f80289254f47187bd64ba27526eacc87d25e3b | [
"MIT"
] | null | null | null | app/src/scripts/user/profile_user/education.fix/educationFix.state.js | HuynhHungManh/Capstone1 | e1f80289254f47187bd64ba27526eacc87d25e3b | [
"MIT"
] | null | null | null | app/src/scripts/user/profile_user/education.fix/educationFix.state.js | HuynhHungManh/Capstone1 | e1f80289254f47187bd64ba27526eacc87d25e3b | [
"MIT"
] | null | null | null |
angular.module('myApp')
.config(function ($stateProvider) {
$stateProvider.state('education', {
url: '/education/username=:username',
parent: 'site',
views: {
'content@':{
templateUrl: 'src/scripts/user/profile_user/education.fix/educationFix.html',
controller : 'EducationFix_Controller'
}
}
});
}); | 31.785714 | 97 | 0.494382 |
102436904cda291a20cdc01cdec2b4198e915d5f | 3,843 | js | JavaScript | service-worker.js | sachink23/crop-insurance-calculator | 46dd250ec70a4cb20eaae5028dd9918b6e02fb41 | [
"MIT"
] | null | null | null | service-worker.js | sachink23/crop-insurance-calculator | 46dd250ec70a4cb20eaae5028dd9918b6e02fb41 | [
"MIT"
] | null | null | null | service-worker.js | sachink23/crop-insurance-calculator | 46dd250ec70a4cb20eaae5028dd9918b6e02fb41 | [
"MIT"
] | null | null | null | const cacheName = 'crop-ins-cal-1.0.1';
const startPage = '/?utm_source=pwa';
const offlinePage = '/ofline.html';
const filesToCache = [startPage, offlinePage, '/PikvimaCalculator/', '/PikvimaCalculator', '/affiliate/','/PikvimaCalculator/Jalna/','/PikvimaCalculator/assets/js/script.js','/PikvimaCalculator/Jalna/assets/js/script.js', '/PikvimaCalculator/Aurangabad/assets/js/script.js', '/PikvimaCalculator/Aurangabad', '/PikvimaCalculator/Aurangabad/', '/PikvimaCalculator/assets/img/logo-rect.png','/PikvimaCalculator/assets/img/background1.jpg', '/PikvimaCalculator/assets/img/title-back.png', '/PikvimaCalculator/assets/img/logo.ico', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css', 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/css/bootstrap.min.css', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js', 'https://code.jquery.com/jquery-3.2.1.slim.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js', 'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0/js/bootstrap.bundle.min.js'];
const neverCacheUrls = [/preview=true/];
// Install
self.addEventListener('install', function(e) {
console.log('PWA service worker installation');
e.waitUntil(
caches.open(cacheName).then(function(cache) {
console.log('PWA service worker caching dependencies');
filesToCache.map(function(url) {
return cache.add(url).catch(function (reason) {
return console.log('PWA: ' + String(reason) + ' ' + url);
});
});
})
);
});
// Activate
self.addEventListener('activate', function(e) {
console.log('PWA service worker activation');
e.waitUntil(
caches.keys().then(function(keyList) {
return Promise.all(keyList.map(function(key) {
if ( key !== cacheName ) {
console.log('PWA old cache removed', key);
return caches.delete(key);
}
}));
})
);
return self.clients.claim();
});
// Fetch
self.addEventListener('fetch', function(e) {
// Return if the current request url is in the never cache list
if ( ! neverCacheUrls.every(checkNeverCacheList, e.request.url) ) {
console.log( 'PWA: Current request is excluded from cache.' );
return;
}
// Return if request url protocal isn't http or https
if ( ! e.request.url.match(/^(http|https):\/\//i) )
return;
// Return if request url is from an external domain.
if ( new URL(e.request.url).origin !== location.origin )
return;
// For POST requests, do not use the cache. Serve offline page if offline.
if ( e.request.method !== 'GET' ) {
e.respondWith(
fetch(e.request).catch( function() {
return caches.match(offlinePage);
})
);
return;
}
// Revving strategy
if ( e.request.mode === 'navigate' && navigator.onLine ) {
e.respondWith(
fetch(e.request).then(function(response) {
return caches.open(cacheName).then(function(cache) {
cache.put(e.request, response.clone());
return response;
});
})
);
return;
}
e.respondWith(
caches.match(e.request).then(function(response) {
return response || fetch(e.request).then(function(response) {
return caches.open(cacheName).then(function(cache) {
cache.put(e.request, response.clone());
return response;
});
});
}).catch(function() {
return caches.match(offlinePage);
})
);
});
// Check if current url is in the neverCacheUrls list
function checkNeverCacheList(url) {
if ( this.match(url) ) {
return false;
}
return true;
}
| 38.818182 | 1,353 | 0.697112 |
102469d0b01ba1f1c68b1c9c67633132c5b49e2e | 549 | js | JavaScript | apps/website/tasks/config/uglify.js | prateekbhatt/userjoy | 7b281a854f44cb51f56ab3d4b21e27049eb3ec72 | [
"MIT"
] | 3 | 2015-04-27T12:30:09.000Z | 2017-02-17T18:56:38.000Z | apps/website/tasks/config/uglify.js | prateekbhatt/userjoy | 7b281a854f44cb51f56ab3d4b21e27049eb3ec72 | [
"MIT"
] | null | null | null | apps/website/tasks/config/uglify.js | prateekbhatt/userjoy | 7b281a854f44cb51f56ab3d4b21e27049eb3ec72 | [
"MIT"
] | 3 | 2015-11-13T05:24:51.000Z | 2020-05-12T19:09:58.000Z | /**
* Minify files with UglifyJS.
*
* ---------------------------------------------------------------
*
* Minifies client-side javascript `assets`.
*
* For usage docs see:
* https://github.com/gruntjs/grunt-contrib-uglify
*
*/
module.exports = function (grunt) {
grunt.config.set('uglify', {
options: {
compress: {
drop_console: true
}
},
dist: {
src: ['.tmp/public/concat/production.js'],
dest: '.tmp/public/min/production.js'
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
}; | 20.333333 | 66 | 0.519126 |
102470134eb815d4a017380bb4850e484c3ce97d | 134 | js | JavaScript | lib/cli/generators/templates/middlewares/dynamic_helpers.js | dreamerslab/coke | ae802b5b9e96b3a1ce5814d727e818afabd1a705 | [
"MIT",
"Unlicense"
] | 30 | 2015-01-08T00:31:17.000Z | 2022-01-07T10:01:11.000Z | lib/cli/generators/templates/middlewares/dynamic_helpers.js | dreamerslab/coke | ae802b5b9e96b3a1ce5814d727e818afabd1a705 | [
"MIT",
"Unlicense"
] | null | null | null | lib/cli/generators/templates/middlewares/dynamic_helpers.js | dreamerslab/coke | ae802b5b9e96b3a1ce5814d727e818afabd1a705 | [
"MIT",
"Unlicense"
] | 3 | 2015-05-06T07:15:52.000Z | 2016-11-11T17:26:18.000Z | module.exports = function ( req, res, next ){
res.locals.styles = [ 'common' ];
res.locals.scripts = [ 'common' ];
next();
};
| 19.142857 | 45 | 0.58209 |
1024a729826b69457eee05544992fa6b6c3ca18a | 95,592 | js | JavaScript | src/jquery/jquery/plugins/jquery.layout.js | kosmas58/compass-jquery-plugin | 110237f9ff80cbc481d32b1d8e88280a4ca84309 | [
"MIT"
] | 3 | 2015-10-20T09:20:46.000Z | 2019-06-12T19:52:25.000Z | templates/jquery/jquery.layout.js | kosmas58/compass-jquery-plugin | 110237f9ff80cbc481d32b1d8e88280a4ca84309 | [
"MIT"
] | null | null | null | templates/jquery/jquery.layout.js | kosmas58/compass-jquery-plugin | 110237f9ff80cbc481d32b1d8e88280a4ca84309 | [
"MIT"
] | null | null | null | /*
* jquery.layout 1.2.0
*
* Copyright (c) 2008
* Fabrizio Balliano (http://www.fabrizioballiano.net)
* Kevin Dalman (http://allpro.net)
*
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
*
* $Date: 2008-12-27 02:17:22 +0100 (sab, 27 dic 2008) $
* $Rev: 203 $
*
* NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
*/
(function($) {
$.fn.layout = function (opts) {
/*
* ###########################
* WIDGET CONFIG & OPTIONS
* ###########################
*/
// DEFAULTS for options
var
prefix = "ui-layout-" // prefix for ALL selectors and classNames
, defaults = { // misc default values
paneClass: prefix + "pane" // ui-layout-pane
, resizerClass: prefix + "resizer" // ui-layout-resizer
, togglerClass: prefix + "toggler" // ui-layout-toggler
, togglerInnerClass: prefix + "" // ui-layout-open / ui-layout-closed
, buttonClass: prefix + "button" // ui-layout-button
, contentSelector: "." + prefix + "content"// ui-layout-content
, contentIgnoreSelector: "." + prefix + "ignore" // ui-layout-mask
}
;
// DEFAULT PANEL OPTIONS - CHANGE IF DESIRED
var options = {
name: "" // FUTURE REFERENCE - not used right now
, scrollToBookmarkOnLoad: true // after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark)
, defaults: { // default options for 'all panes' - will be overridden by 'per-pane settings'
applyDefaultStyles: false // apply basic styles directly to resizers & buttons? If not, then stylesheet must handle it
, closable: true // pane can open & close
, resizable: true // when open, pane can be resized
, slidable: true // when closed, pane can 'slide' open over other panes - closes on mouse-out
//, paneSelector: [ ] // MUST be pane-specific!
, contentSelector: defaults.contentSelector // INNER div/element to auto-size so only it scrolls, not the entire pane!
, contentIgnoreSelector: defaults.contentIgnoreSelector // elem(s) to 'ignore' when measuring 'content'
, paneClass: defaults.paneClass // border-Pane - default: 'ui-layout-pane'
, resizerClass: defaults.resizerClass // Resizer Bar - default: 'ui-layout-resizer'
, togglerClass: defaults.togglerClass // Toggler Button - default: 'ui-layout-toggler'
, buttonClass: defaults.buttonClass // CUSTOM Buttons - default: 'ui-layout-button-toggle/-open/-close/-pin'
, resizerDragOpacity: 1 // option for ui.draggable
//, resizerCursor: "" // MUST be pane-specific - cursor when over resizer-bar
, maskIframesOnResize: true // true = all iframes OR = iframe-selector(s) - adds masking-div during resizing/dragging
//, size: 100 // inital size of pane - defaults are set 'per pane'
, minSize: 0 // when manually resizing a pane
, maxSize: 0 // ditto, 0 = no limit
, spacing_open: 6 // space between pane and adjacent panes - when pane is 'open'
, spacing_closed: 6 // ditto - when pane is 'closed'
, togglerLength_open: 50 // Length = WIDTH of toggler button on north/south edges - HEIGHT on east/west edges
, togglerLength_closed: 50 // 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden'
, togglerAlign_open: "center" // top/left, bottom/right, center, OR...
, togglerAlign_closed: "center" // 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right
, togglerTip_open: "Close" // Toggler tool-tip (title)
, togglerTip_closed: "Open" // ditto
, resizerTip: "Resize" // Resizer tool-tip (title)
, sliderTip: "Slide Open" // resizer-bar triggers 'sliding' when pane is closed
, sliderCursor: "pointer" // cursor when resizer-bar will trigger 'sliding'
, slideTrigger_open: "click" // click, dblclick, mouseover
, slideTrigger_close: "mouseout" // click, mouseout
, hideTogglerOnSlide: false // when pane is slid-open, should the toggler show?
, togglerContent_open: "" // text or HTML to put INSIDE the toggler
, togglerContent_closed: "" // ditto
, showOverflowOnHover: false // will bind allowOverflow() utility to pane.onMouseOver
, enableCursorHotkey: true // enabled 'cursor' hotkeys
//, customHotkey: "" // MUST be pane-specific - EITHER a charCode OR a character
, customHotkeyModifier: "SHIFT" // either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
// NOTE: fxSss_open & fxSss_close options (eg: fxName_open) are auto-generated if not passed
, fxName: "slide" // ('none' or blank), slide, drop, scale
, fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
, fxSettings: {} // can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
, initClosed: false // true = init pane as 'closed'
, initHidden: false // true = init pane as 'hidden' - no resizer or spacing
/* callback options do not have to be set - listed here for reference only
, onshow_start: "" // CALLBACK when pane STARTS to Show - BEFORE onopen/onhide_start
, onshow_end: "" // CALLBACK when pane ENDS being Shown - AFTER onopen/onhide_end
, onhide_start: "" // CALLBACK when pane STARTS to Close - BEFORE onclose_start
, onhide_end: "" // CALLBACK when pane ENDS being Closed - AFTER onclose_end
, onopen_start: "" // CALLBACK when pane STARTS to Open
, onopen_end: "" // CALLBACK when pane ENDS being Opened
, onclose_start: "" // CALLBACK when pane STARTS to Close
, onclose_end: "" // CALLBACK when pane ENDS being Closed
, onresize_start: "" // CALLBACK when pane STARTS to be ***MANUALLY*** Resized
, onresize_end: "" // CALLBACK when pane ENDS being Resized ***FOR ANY REASON***
*/
}
, north: {
paneSelector: "." + prefix + "north" // default = .ui-layout-north
, size: "auto"
, resizerCursor: "n-resize"
}
, south: {
paneSelector: "." + prefix + "south" // default = .ui-layout-south
, size: "auto"
, resizerCursor: "s-resize"
}
, east: {
paneSelector: "." + prefix + "east" // default = .ui-layout-east
, size: 200
, resizerCursor: "e-resize"
}
, west: {
paneSelector: "." + prefix + "west" // default = .ui-layout-west
, size: 200
, resizerCursor: "w-resize"
}
, center: {
paneSelector: "." + prefix + "center" // default = .ui-layout-center
}
};
var effects = { // LIST *PREDEFINED EFFECTS* HERE, even if effect has no settings
slide: {
all: { duration: "fast" } // eg: duration: 1000, easing: "easeOutBounce"
, north: { direction: "up" }
, south: { direction: "down" }
, east: { direction: "right"}
, west: { direction: "left" }
}
, drop: {
all: { duration: "slow" } // eg: duration: 1000, easing: "easeOutQuint"
, north: { direction: "up" }
, south: { direction: "down" }
, east: { direction: "right"}
, west: { direction: "left" }
}
, scale: {
all: { duration: "fast" }
}
};
// STATIC, INTERNAL CONFIG - DO NOT CHANGE THIS!
var config = {
allPanes: "north,south,east,west,center"
, borderPanes: "north,south,east,west"
, zIndex: { // set z-index values here
resizer_normal: 1 // normal z-index for resizer-bars
, pane_normal: 2 // normal z-index for panes
, mask: 4 // overlay div used to mask pane(s) during resizing
, sliding: 100 // applied to both the pane and its resizer when a pane is 'slid open'
, resizing: 10000 // applied to the CLONED resizer-bar when being 'dragged'
, animation: 10000 // applied to the pane when being animated - not applied to the resizer
}
, resizers: {
cssReq: {
position: "absolute"
, padding: 0
, margin: 0
, fontSize: "1px"
, textAlign: "left" // to counter-act "center" alignment!
, overflow: "hidden" // keep toggler button from overflowing
, zIndex: 1
}
, cssDef: { // DEFAULT CSS - applied if: options.PANE.applyDefaultStyles=true
background: "#DDD"
, border: "none"
}
}
, togglers: {
cssReq: {
position: "absolute"
, display: "block"
, padding: 0
, margin: 0
, overflow: "hidden"
, textAlign: "center"
, fontSize: "1px"
, cursor: "pointer"
, zIndex: 1
}
, cssDef: { // DEFAULT CSS - applied if: options.PANE.applyDefaultStyles=true
background: "#AAA"
}
}
, content: {
cssReq: {
overflow: "auto"
}
, cssDef: {}
}
, defaults: { // defaults for ALL panes - overridden by 'per-pane settings' below
cssReq: {
position: "absolute"
, margin: 0
, zIndex: 2
}
, cssDef: {
padding: "10px"
, background: "#FFF"
, border: "1px solid #BBB"
, overflow: "auto"
}
}
, north: {
edge: "top"
, sizeType: "height"
, dir: "horz"
, cssReq: {
top: 0
, bottom: "auto"
, left: 0
, right: 0
, width: "auto"
// height: DYNAMIC
}
}
, south: {
edge: "bottom"
, sizeType: "height"
, dir: "horz"
, cssReq: {
top: "auto"
, bottom: 0
, left: 0
, right: 0
, width: "auto"
// height: DYNAMIC
}
}
, east: {
edge: "right"
, sizeType: "width"
, dir: "vert"
, cssReq: {
left: "auto"
, right: 0
, top: "auto" // DYNAMIC
, bottom: "auto" // DYNAMIC
, height: "auto"
// width: DYNAMIC
}
}
, west: {
edge: "left"
, sizeType: "width"
, dir: "vert"
, cssReq: {
left: 0
, right: "auto"
, top: "auto" // DYNAMIC
, bottom: "auto" // DYNAMIC
, height: "auto"
// width: DYNAMIC
}
}
, center: {
dir: "center"
, cssReq: {
left: "auto" // DYNAMIC
, right: "auto" // DYNAMIC
, top: "auto" // DYNAMIC
, bottom: "auto" // DYNAMIC
, height: "auto"
, width: "auto"
}
}
};
// DYNAMIC DATA
var state = {
// generate random 'ID#' to identify layout - used to create global namespace for timers
id: Math.floor(Math.random() * 10000)
, container: {}
, north: {}
, south: {}
, east: {}
, west: {}
, center: {}
};
var
altEdge = {
top: "bottom"
, bottom: "top"
, left: "right"
, right: "left"
}
, altSide = {
north: "south"
, south: "north"
, east: "west"
, west: "east"
}
;
/*
* ###########################
* INTERNAL HELPER FUNCTIONS
* ###########################
*/
/*
* isStr
*
* Returns true if passed param is EITHER a simple string OR a 'string object' - otherwise returns false
*/
var isStr = function (o) {
if (typeof o == "string")
return true;
else if (typeof o == "object") {
try {
var match = o.constructor.toString().match(/string/i);
return (match !== null);
} catch (e) {
}
}
return false;
};
/*
* str
*
* Returns a simple string if the passed param is EITHER a simple string OR a 'string object',
* else returns the original object
*/
var str = function (o) {
if (typeof o == "string" || isStr(o)) return $.trim(o); // trim converts 'String object' to a simple string
else return o;
};
/*
* min / max
*
* Alias for Math.min/.max to simplify coding
*/
var min = function (x, y) {
return Math.min(x, y);
};
var max = function (x, y) {
return Math.max(x, y);
};
/*
* transformData
*
* Processes the options passed in and transforms them into the format used by layout()
* Missing keys are added, and converts the data if passed in 'flat-format' (no sub-keys)
* In flat-format, pane-specific-settings are prefixed like: north__optName (2-underscores)
* To update effects, options MUST use nested-keys format, with an effects key
*
* @callers initOptions()
* @params JSON d Data/options passed by user - may be a single level or nested levels
* @returns JSON Creates a data struture that perfectly matches 'options', ready to be imported
*/
var transformData = function (d) {
var json = { defaults:{fxSettings:{}}, north:{fxSettings:{}}, south:{fxSettings:{}}, east:{fxSettings:{}}, west:{fxSettings:{}}, center:{fxSettings:{}} };
d = d || {};
if (d.effects || d.defaults || d.north || d.south || d.west || d.east || d.center)
json = $.extend(json, d); // already in json format - add to base keys
else
// convert 'flat' to 'nest-keys' format - also handles 'empty' user-options
$.each(d, function (key, val) {
a = key.split("__");
json[ a[1] ? a[0] : "defaults" ][ a[1] ? a[1] : a[0] ] = val;
});
return json;
};
/*
* setFlowCallback
*
* Set an INTERNAL callback to avoid simultaneous animation
* Runs only if needed and only if all callbacks are not 'already set'!
*
* @param String action Either 'open' or 'close'
* @pane String pane A valid border-pane name, eg 'west'
* @pane Boolean param Extra param for callback (optional)
*/
var setFlowCallback = function (action, pane, param) {
var
cb = action + "," + pane + "," + (param ? 1 : 0)
, cP, cbPane
;
$.each(c.borderPanes.split(","), function (i, p) {
if (c[p].isMoving) {
bindCallback(p); // TRY to bind a callback
return false; // BREAK
}
});
function bindCallback(p, test) {
cP = c[p];
if (!cP.doCallback) {
cP.doCallback = true;
cP.callback = cb;
}
else { // try to 'chain' this callback
cpPane = cP.callback.split(",")[1]; // 2nd param is 'pane'
if (cpPane != p && cpPane != pane) // callback target NOT 'itself' and NOT 'this pane'
bindCallback(cpPane, true); // RECURSE
}
}
};
/*
* execFlowCallback
*
* RUN the INTERNAL callback for this pane - if one exists
*
* @param String action Either 'open' or 'close'
* @pane String pane A valid border-pane name, eg 'west'
* @pane Boolean param Extra param for callback (optional)
*/
var execFlowCallback = function (pane) {
var cP = c[pane];
// RESET flow-control flaGs
c.isLayoutBusy = false;
delete cP.isMoving;
if (!cP.doCallback || !cP.callback) return;
cP.doCallback = false; // RESET logic flag
// EXECUTE the callback
var
cb = cP.callback.split(",")
, param = (cb[2] > 0 ? true : false)
;
if (cb[0] == "open")
open(cb[1], param);
else if (cb[0] == "close")
close(cb[1], param);
if (!cP.doCallback) cP.callback = null; // RESET - unless callback above enabled it again!
};
/*
* execUserCallback
*
* Executes a Callback function after a trigger event, like resize, open or close
*
* @param String pane This is passed only so we can pass the 'pane object' to the callback
* @param String v_fn Accepts a function name, OR a comma-delimited array: [0]=function name, [1]=argument
*/
var execUserCallback = function (pane, v_fn) {
if (!v_fn) return;
var fn;
try {
if (typeof v_fn == "function")
fn = v_fn;
else if (typeof v_fn != "string")
return;
else if (v_fn.indexOf(",") > 0) {
// function name cannot contain a comma, so must be a function name AND a 'name' parameter
var
args = v_fn.split(",")
, fn = eval(args[0])
;
if (typeof fn == "function" && args.length > 1)
return fn(args[1]); // pass the argument parsed from 'list'
}
else // just the name of an external function?
fn = eval(v_fn);
if (typeof fn == "function")
// pass data: pane-name, pane-element, pane-state, pane-options, and layout-name
return fn(pane, $Ps[pane], $.extend({}, state[pane]), $.extend({}, options[pane]), options.name);
}
catch (ex) {
}
};
/*
* cssNum
*
* Returns the 'current CSS value' for an element - returns 0 if property does not exist
*
* @callers Called by many methods
* @param jQuery $Elem Must pass a jQuery object - first element is processed
* @param String property The name of the CSS property, eg: top, width, etc.
* @returns Variant Usually is used to get an integer value for position (top, left) or size (height, width)
*/
var cssNum = function ($E, prop) {
var
val = 0
, hidden = false
, visibility = ""
;
if (!$.browser.msie) { // IE CAN read dimensions of 'hidden' elements - FF CANNOT
if ($.curCSS($E[0], "display", true) == "none") {
hidden = true;
visibility = $.curCSS($E[0], "visibility", true); // SAVE current setting
$E.css({ display: "block", visibility: "hidden" }); // show element 'invisibly' so we can measure it
}
}
val = parseInt($.curCSS($E[0], prop, true), 10) || 0;
if (hidden) { // WAS hidden, so put back the way it was
$E.css({ display: "none" });
if (visibility && visibility != "hidden")
$E.css({ visibility: visibility }); // reset 'visibility'
}
return val;
};
/*
* cssW / cssH / cssSize
*
* Contains logic to check boxModel & browser, and return the correct width/height for the current browser/doctype
*
* @callers initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
* @param Variant elem Can accept a 'pane' (east, west, etc) OR a DOM object OR a jQuery object
* @param Integer outerWidth/outerHeight (optional) Can pass a width, allowing calculations BEFORE element is resized
* @returns Integer Returns the innerHeight of the elem by subtracting padding and borders
*
* @TODO May need to add additional logic to handle more browser/doctype variations?
*/
var cssW = function (e, outerWidth) {
var $E;
if (isStr(e)) {
e = str(e);
$E = $Ps[e];
}
else
$E = $(e);
// a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
if (outerWidth <= 0)
return 0;
else if (!(outerWidth > 0))
outerWidth = isStr(e) ? getPaneSize(e) : $E.outerWidth();
if (!$.boxModel)
return outerWidth;
else // strip border and padding size from outerWidth to get CSS Width
return outerWidth
- cssNum($E, "paddingLeft")
- cssNum($E, "paddingRight")
- ($.curCSS($E[0], "borderLeftStyle", true) == "none" ? 0 : cssNum($E, "borderLeftWidth"))
- ($.curCSS($E[0], "borderRightStyle", true) == "none" ? 0 : cssNum($E, "borderRightWidth"))
;
};
var cssH = function (e, outerHeight) {
var $E;
if (isStr(e)) {
e = str(e);
$E = $Ps[e];
}
else
$E = $(e);
// a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
if (outerHeight <= 0)
return 0;
else if (!(outerHeight > 0))
outerHeight = (isStr(e)) ? getPaneSize(e) : $E.outerHeight();
if (!$.boxModel)
return outerHeight;
else // strip border and padding size from outerHeight to get CSS Height
return outerHeight
- cssNum($E, "paddingTop")
- cssNum($E, "paddingBottom")
- ($.curCSS($E[0], "borderTopStyle", true) == "none" ? 0 : cssNum($E, "borderTopWidth"))
- ($.curCSS($E[0], "borderBottomStyle", true) == "none" ? 0 : cssNum($E, "borderBottomWidth"))
;
};
var cssSize = function (pane, outerSize) {
if (c[pane].dir == "horz") // pane = north or south
return cssH(pane, outerSize);
else // pane = east or west
return cssW(pane, outerSize);
};
/*
* getPaneSize
*
* Calculates the current 'size' (width or height) of a border-pane - optionally with 'pane spacing' added
*
* @returns Integer Returns EITHER Width for east/west panes OR Height for north/south panes - adjusted for boxModel & browser
*/
var getPaneSize = function (pane, inclSpace) {
var
$P = $Ps[pane]
, o = options[pane]
, s = state[pane]
, oSp = (inclSpace ? o.spacing_open : 0)
, cSp = (inclSpace ? o.spacing_closed : 0)
;
if (!$P || s.isHidden)
return 0;
else if (s.isClosed || (s.isSliding && inclSpace))
return cSp;
else if (c[pane].dir == "horz")
return $P.outerHeight() + oSp;
else // dir == "vert"
return $P.outerWidth() + oSp;
};
var setPaneMinMaxSizes = function (pane) {
var
d = cDims
, edge = c[pane].edge
, dir = c[pane].dir
, o = options[pane]
, s = state[pane]
, $P = $Ps[pane]
, $altPane = $Ps[ altSide[pane] ]
, paneSpacing = o.spacing_open
, altPaneSpacing = options[ altSide[pane] ].spacing_open
, altPaneSize = (!$altPane ? 0 : (dir == "horz" ? $altPane.outerHeight() : $altPane.outerWidth()))
, containerSize = (dir == "horz" ? d.innerHeight : d.innerWidth)
// limitSize prevents this pane from 'overlapping' opposite pane - even if opposite pane is currently closed
, limitSize = containerSize - paneSpacing - altPaneSize - altPaneSpacing
, minSize = s.minSize || 0
, maxSize = Math.min(s.maxSize || 9999, limitSize)
, minPos, maxPos // used to set resizing limits
;
switch (pane) {
case "north":
minPos = d.offsetTop + minSize;
maxPos = d.offsetTop + maxSize;
break;
case "west":
minPos = d.offsetLeft + minSize;
maxPos = d.offsetLeft + maxSize;
break;
case "south":
minPos = d.offsetTop + d.innerHeight - maxSize;
maxPos = d.offsetTop + d.innerHeight - minSize;
break;
case "east":
minPos = d.offsetLeft + d.innerWidth - maxSize;
maxPos = d.offsetLeft + d.innerWidth - minSize;
break;
}
// save data to pane-state
$.extend(s, { minSize: minSize, maxSize: maxSize, minPosition: minPos, maxPosition: maxPos });
};
/*
* getPaneDims
*
* Returns data for setting the size/position of center pane. Date is also used to set Height for east/west panes
*
* @returns JSON Returns a hash of all dimensions: top, bottom, left, right, (outer) width and (outer) height
*/
var getPaneDims = function () {
var d = {
top: getPaneSize("north", true) // true = include 'spacing' value for p
, bottom: getPaneSize("south", true)
, left: getPaneSize("west", true)
, right: getPaneSize("east", true)
, width: 0
, height: 0
};
d.width = cDims.innerWidth - left - right;
d.height = cDims.innerHeight - bottom - top;
// now add the 'container border/padding' to get final positions - relative to the container
d.top += cDims.top;
d.bottom += cDims.bottom;
d.left += cDims.left;
d.right += cDims.right;
return d;
};
/*
* getElemDims
*
* Returns data for setting size of an element (container or a pane).
*
* @callers create(), onWindowResize() for container, plus others for pane
* @returns JSON Returns a hash of all dimensions: top, bottom, left, right, outerWidth, innerHeight, etc
*/
var getElemDims = function ($E) {
var
d = {} // dimensions hash
, e, b, p // edge, border, padding
;
$.each("Left,Right,Top,Bottom".split(","), function () {
e = str(this);
b = d["border" + e] = cssNum($E, "border" + e + "Width");
p = d["padding" + e] = cssNum($E, "padding" + e);
d["offset" + e] = b + p; // total offset of content from outer edge
// if BOX MODEL, then 'position' = PADDING (ignore borderWidth)
if ($E == $Container)
d[e.toLowerCase()] = ($.boxModel ? p : 0);
});
d.innerWidth = d.outerWidth = $E.outerWidth();
d.innerHeight = d.outerHeight = $E.outerHeight();
if ($.boxModel) {
d.innerWidth -= (d.offsetLeft + d.offsetRight);
d.innerHeight -= (d.offsetTop + d.offsetBottom);
}
return d;
};
var setTimer = function (pane, action, fn, ms) {
var
Layout = window.layout = window.layout || {}
, Timers = Layout.timers = Layout.timers || {}
, name = "layout_" + state.id + "_" + pane + "_" + action // UNIQUE NAME for every layout-pane-action
;
if (Timers[name]) return; // timer already set!
else Timers[name] = setTimeout(fn, ms);
};
var clearTimer = function (pane, action) {
var
Layout = window.layout = window.layout || {}
, Timers = Layout.timers = Layout.timers || {}
, name = "layout_" + state.id + "_" + pane + "_" + action // UNIQUE NAME for every layout-pane-action
;
if (Timers[name]) {
clearTimeout(Timers[name]);
delete Timers[name];
return true;
}
else
return false;
};
/*
* ###########################
* INITIALIZATION METHODS
* ###########################
*/
/*
* create
*
* Initialize the layout - called automatically whenever an instance of layout is created
*
* @callers NEVER explicity called
* @returns An object pointer to the instance created
*/
var create = function () {
// initialize config/options
initOptions();
// initialize all objects
initContainer(); // set CSS as needed and init state.container dimensions
initPanes(); // size & position all panes
initHandles(); // create and position all resize bars & togglers buttons
initResizable(); // activate resizing on all panes where resizable=true
sizeContent("all"); // AFTER panes & handles have been initialized, size 'content' divs
if (options.scrollToBookmarkOnLoad)
if (self.location.hash) replace(self.location.hash); // scrollTo Bookmark
// bind hotkey function - keyDown - if required
initHotkeys();
// bind resizeAll() for 'this layout instance' to window.resize event
$(window).resize(function () {
var timerID = "timerLayout_" + state.id;
if (window[timerID]) clearTimeout(window[timerID]);
window[timerID] = null;
if (true || $.browser.msie) // use a delay for IE because the resize event fires repeatly
window[timerID] = setTimeout(resizeAll, 100);
else // most other browsers have a built-in delay before firing the resize event
resizeAll(); // resize all layout elements NOW!
});
};
/*
* initContainer
*
* Validate and initialize container CSS and events
*
* @callers create()
*/
var initContainer = function () {
try { // format html/body if this is a full page layout
if ($Container[0].tagName == "BODY") {
$("html").css({
height: "100%"
, overflow: "hidden"
});
$("body").css({
position: "relative"
, height: "100%"
, overflow: "hidden"
, margin: 0
, padding: 0 // TODO: test whether body-padding could be handled?
, border: "none" // a body-border creates problems because it cannot be measured!
});
}
else { // set required CSS - overflow and position
var
CSS = { overflow: "hidden" } // make sure container will not 'scroll'
, p = $Container.css("position")
, h = $Container.css("height")
;
// if this is a NESTED layout, then outer-pane ALREADY has position and height
if (!$Container.hasClass("ui-layout-pane")) {
if (!p || "fixed,absolute,relative".indexOf(p) < 0)
CSS.position = "relative"; // container MUST have a 'position'
if (!h || h == "auto")
CSS.height = "100%"; // container MUST have a 'height'
}
$Container.css(CSS);
}
} catch (ex) {
}
// get layout-container dimensions (updated when necessary)
cDims = state.container = getElemDims($Container); // update data-pointer too
};
/*
* initHotkeys
*
* Bind layout hotkeys - if options enabled
*
* @callers create()
*/
var initHotkeys = function () {
// bind keyDown to capture hotkeys, if option enabled for ANY pane
$.each(c.borderPanes.split(","), function (i, pane) {
var o = options[pane];
if (o.enableCursorHotkey || o.customHotkey) {
$(document).keydown(keyDown); // only need to bind this ONCE
return false; // BREAK - binding was done
}
});
};
/*
* initOptions
*
* Build final CONFIG and OPTIONS data
*
* @callers create()
*/
var initOptions = function () {
// simplify logic by making sure passed 'opts' var has basic keys
opts = transformData(opts);
// update default effects, if case user passed key
if (opts.effects) {
$.extend(effects, opts.effects);
delete opts.effects;
}
// see if any 'global options' were specified
$.each("name,scrollToBookmarkOnLoad".split(","), function (idx, key) {
if (opts[key] !== undefined)
options[key] = opts[key];
else if (opts.defaults[key] !== undefined) {
options[key] = opts.defaults[key];
delete opts.defaults[key];
}
});
// remove any 'defaults' that MUST be set 'per-pane'
$.each("paneSelector,resizerCursor,customHotkey".split(","),
function (idx, key) {
delete opts.defaults[key];
} // is OK if key does not exist
);
// now update options.defaults
$.extend(options.defaults, opts.defaults);
// make sure required sub-keys exist
//if (typeof options.defaults.fxSettings != "object") options.defaults.fxSettings = {};
// merge all config & options for the 'center' pane
c.center = $.extend(true, {}, c.defaults, c.center);
$.extend(options.center, opts.center);
// Most 'default options' do not apply to 'center', so add only those that DO
var o_Center = $.extend(true, {}, options.defaults, opts.defaults, options.center); // TEMP data
$.each("paneClass,contentSelector,contentIgnoreSelector,applyDefaultStyles,showOverflowOnHover".split(","),
function (idx, key) {
options.center[key] = o_Center[key];
}
);
var defs = options.defaults;
// create a COMPLETE set of options for EACH border-pane
$.each(c.borderPanes.split(","), function(i, pane) {
// apply 'pane-defaults' to CONFIG.PANE
c[pane] = $.extend(true, {}, c.defaults, c[pane]);
// apply 'pane-defaults' + user-options to OPTIONS.PANE
o = options[pane] = $.extend(true, {}, options.defaults, options[pane], opts.defaults, opts[pane]);
// make sure we have base-classes
if (!o.paneClass) o.paneClass = defaults.paneClass;
if (!o.resizerClass) o.resizerClass = defaults.resizerClass;
if (!o.togglerClass) o.togglerClass = defaults.togglerClass;
// create FINAL fx options for each pane, ie: options.PANE.fxName/fxSpeed/fxSettings[_open|_close]
$.each(["_open","_close",""], function (i, n) {
var
sName = "fxName" + n
, sSpeed = "fxSpeed" + n
, sSettings = "fxSettings" + n
;
// recalculate fxName according to specificity rules
o[sName] =
opts[pane][sName] // opts.west.fxName_open
|| opts[pane].fxName // opts.west.fxName
|| opts.defaults[sName] // opts.defaults.fxName_open
|| opts.defaults.fxName // opts.defaults.fxName
|| o[sName] // options.west.fxName_open
|| o.fxName // options.west.fxName
|| defs[sName] // options.defaults.fxName_open
|| defs.fxName // options.defaults.fxName
|| "none"
;
// validate fxName to be sure is a valid effect
var fxName = o[sName];
if (fxName == "none" || !$.effects || !$.effects[fxName] || (!effects[fxName] && !o[sSettings] && !o.fxSettings))
fxName = o[sName] = "none"; // effect not loaded, OR undefined FX AND fxSettings not passed
// set vars for effects subkeys to simplify logic
var
fx = effects[fxName] || {} // effects.slide
, fx_all = fx.all || {} // effects.slide.all
, fx_pane = fx[pane] || {} // effects.slide.west
;
// RECREATE the fxSettings[_open|_close] keys using specificity rules
o[sSettings] = $.extend(
{}
, fx_all // effects.slide.all
, fx_pane // effects.slide.west
, defs.fxSettings || {} // options.defaults.fxSettings
, defs[sSettings] || {} // options.defaults.fxSettings_open
, o.fxSettings // options.west.fxSettings
, o[sSettings] // options.west.fxSettings_open
, opts.defaults.fxSettings // opts.defaults.fxSettings
, opts.defaults[sSettings] || {} // opts.defaults.fxSettings_open
, opts[pane].fxSettings // opts.west.fxSettings
, opts[pane][sSettings] || {} // opts.west.fxSettings_open
);
// recalculate fxSpeed according to specificity rules
o[sSpeed] =
opts[pane][sSpeed] // opts.west.fxSpeed_open
|| opts[pane].fxSpeed // opts.west.fxSpeed (pane-default)
|| opts.defaults[sSpeed] // opts.defaults.fxSpeed_open
|| opts.defaults.fxSpeed // opts.defaults.fxSpeed
|| o[sSpeed] // options.west.fxSpeed_open
|| o[sSettings].duration // options.west.fxSettings_open.duration
|| o.fxSpeed // options.west.fxSpeed
|| o.fxSettings.duration // options.west.fxSettings.duration
|| defs.fxSpeed // options.defaults.fxSpeed
|| defs.fxSettings.duration// options.defaults.fxSettings.duration
|| fx_pane.duration // effects.slide.west.duration
|| fx_all.duration // effects.slide.all.duration
|| "normal" // DEFAULT
;
// DEBUG: if (pane=="east") debugData( $.extend({}, {speed: o[sSpeed], fxSettings_duration: o[sSettings].duration}, o[sSettings]), pane+"."+sName+" = "+fxName );
});
});
};
/*
* initPanes
*
* Initialize module objects, styling, size and position for all panes
*
* @callers create()
*/
var initPanes = function () {
// NOTE: do north & south FIRST so we can measure their height - do center LAST
$.each(c.allPanes.split(","), function() {
var
pane = str(this)
, o = options[pane]
, s = state[pane]
, fx = s.fx
, dir = c[pane].dir
// if o.size is not > 0, then we will use MEASURE the pane and use that as it's 'size'
, size = o.size == "auto" || isNaN(o.size) ? 0 : o.size
, minSize = o.minSize || 1
, maxSize = o.maxSize || 9999
, spacing = o.spacing_open || 0
, sel = o.paneSelector
, isIE6 = ($.browser.msie && $.browser.version < 7)
, CSS = {}
, $P, $C
;
$Cs[pane] = false; // init
if (sel.substr(0, 1) === "#") // ID selector
// NOTE: elements selected 'by ID' DO NOT have to be 'children'
$P = $Ps[pane] = $Container.find(sel + ":first");
else { // class or other selector
$P = $Ps[pane] = $Container.children(sel + ":first");
// look for the pane nested inside a 'form' element
if (!$P.length) $P = $Ps[pane] = $Container.children("form:first").children(sel + ":first");
}
if (!$P.length) {
$Ps[pane] = false; // logic
return true; // SKIP to next
}
// add basic classes & attributes
$P
.attr("pane", pane)// add pane-identifier
.addClass(o.paneClass + " " + o.paneClass + "-" + pane) // default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector'
;
// init pane-logic vars, etc.
if (pane != "center") {
s.isClosed = false; // true = pane is closed
s.isSliding = false; // true = pane is currently open by 'sliding' over adjacent panes
s.isResizing = false; // true = pane is in process of being resized
s.isHidden = false; // true = pane is hidden - no spacing, resizer or toggler is visible!
s.noRoom = false; // true = pane 'automatically' hidden due to insufficient room - will unhide automatically
// create special keys for internal use
c[pane].pins = []; // used to track and sync 'pin-buttons' for border-panes
}
CSS = $.extend({ visibility: "visible", display: "block" }, c.defaults.cssReq, c[pane].cssReq);
if (o.applyDefaultStyles) $.extend(CSS, c.defaults.cssDef, c[pane].cssDef); // cosmetic defaults
$P.css(CSS); // add base-css BEFORE 'measuring' to calc size & position
CSS = {}; // reset var
// set css-position to account for container borders & padding
switch (pane) {
case "north":
CSS.top = cDims.top;
CSS.left = cDims.left;
CSS.right = cDims.right;
break;
case "south":
CSS.bottom = cDims.bottom;
CSS.left = cDims.left;
CSS.right = cDims.right;
break;
case "west":
CSS.left = cDims.left; // top, bottom & height set by sizeMidPanes()
break;
case "east":
CSS.right = cDims.right; // ditto
break;
case "center": // top, left, width & height set by sizeMidPanes()
}
if (dir == "horz") { // north or south pane
if (size === 0 || size == "auto") {
$P.css({ height: "auto" });
size = $P.outerHeight();
}
size = max(size, minSize);
size = min(size, maxSize);
size = min(size, cDims.innerHeight - spacing);
CSS.height = max(1, cssH(pane, size));
s.size = size; // update state
// make sure minSize is sufficient to avoid errors
s.maxSize = maxSize; // init value
s.minSize = max(minSize, size - CSS.height + 1); // = pane.outerHeight when css.height = 1px
// handle IE6
//if (isIE6) CSS.width = cssW($P, cDims.innerWidth);
$P.css(CSS); // apply size & position
}
else if (dir == "vert") { // east or west pane
if (size === 0 || size == "auto") {
$P.css({ width: "auto", "float": "left" }); // float = FORCE pane to auto-size
size = $P.outerWidth();
$P.css({ "float": "none" }); // RESET
}
size = max(size, minSize);
size = min(size, maxSize);
size = min(size, cDims.innerWidth - spacing);
CSS.width = max(1, cssW(pane, size));
s.size = size; // update state
s.maxSize = maxSize; // init value
// make sure minSize is sufficient to avoid errors
s.minSize = max(minSize, size - CSS.width + 1); // = pane.outerWidth when css.width = 1px
$P.css(CSS); // apply size - top, bottom & height set by sizeMidPanes
sizeMidPanes(pane, null, true); // true = onInit
}
else if (pane == "center") {
$P.css(CSS); // top, left, width & height set by sizeMidPanes...
sizeMidPanes("center", null, true); // true = onInit
}
// close or hide the pane if specified in settings
if (o.initClosed && o.closable) {
$P.hide().addClass("closed");
s.isClosed = true;
}
else if (o.initHidden || o.initClosed) {
hide(pane, true); // will be completely invisible - no resizer or spacing
s.isHidden = true;
}
else
$P.addClass("open");
// check option for auto-handling of pop-ups & drop-downs
if (o.showOverflowOnHover)
$P.hover(allowOverflow, resetOverflow);
/*
* see if this pane has a 'content element' that we need to auto-size
*/
if (o.contentSelector) {
$C = $Cs[pane] = $P.children(o.contentSelector + ":first"); // match 1-element only
if (!$C.length) {
$Cs[pane] = false;
return true; // SKIP to next
}
$C.css(c.content.cssReq);
if (o.applyDefaultStyles) $C.css(c.content.cssDef); // cosmetic defaults
// NO PANE-SCROLLING when there is a content-div
$P.css({ overflow: "hidden" });
}
});
};
/*
* initHandles
*
* Initialize module objects, styling, size and position for all resize bars and toggler buttons
*
* @callers create()
*/
var initHandles = function () {
// create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
$.each(c.borderPanes.split(","), function() {
var
pane = str(this)
, o = options[pane]
, s = state[pane]
, rClass = o.resizerClass
, tClass = o.togglerClass
, $P = $Ps[pane]
;
$Rs[pane] = false; // INIT
$Ts[pane] = false;
if (!$P || (!o.closable && !o.resizable)) return; // pane does not exist - skip
var
edge = c[pane].edge
, isOpen = $P.is(":visible")
, spacing = (isOpen ? o.spacing_open : o.spacing_closed)
, _pane = "-" + pane // used for classNames
, _state = (isOpen ? "-open" : "-closed") // used for classNames
, $R, $T
;
// INIT RESIZER BAR
$R = $Rs[pane] = $("<span></span>");
if (isOpen && o.resizable) {
}
// this is handled by initResizable
else if (!isOpen && o.slidable)
$R.attr("title", o.sliderTip).css("cursor", o.sliderCursor);
$R
// if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer"
.attr("id", (o.paneSelector.substr(0, 1) == "#" ? o.paneSelector.substr(1) + "-resizer" : ""))
.attr("resizer", pane)// so we can read this from the resizer
.css(c.resizers.cssReq)// add base/required styles
// POSITION of resizer bar - allow for container border & padding
.css(edge, cDims[edge] + getPaneSize(pane))
// ADD CLASSNAMES - eg: class="resizer resizer-west resizer-open"
.addClass(rClass + " " + rClass + _pane + " " + rClass + _state + " " + rClass + _pane + _state)
.appendTo($Container) // append DIV to container
;
// ADD VISUAL STYLES
if (o.applyDefaultStyles)
$R.css(c.resizers.cssDef);
if (o.closable) {
// INIT COLLAPSER BUTTON
$T = $Ts[pane] = $("<div></div>");
$T
// if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-toggler"
.attr("id", (o.paneSelector.substr(0, 1) == "#" ? o.paneSelector.substr(1) + "-toggler" : ""))
.css(c.togglers.cssReq)// add base/required styles
.attr("title", (isOpen ? o.togglerTip_open : o.togglerTip_closed))
.click(function(evt) {
toggle(pane);
evt.stopPropagation();
})
.mouseover(function(evt) {
evt.stopPropagation();
})// prevent resizer event
// ADD CLASSNAMES - eg: class="toggler toggler-west toggler-west-open"
.addClass(tClass + " " + tClass + _pane + " " + tClass + _state + " " + tClass + _pane + _state)
.appendTo($R) // append SPAN to resizer DIV
;
// ADD INNER-SPANS TO TOGGLER
if (o.togglerContent_open) // ui-layout-open
$("<span>" + o.togglerContent_open + "</span>")
.addClass("content content-open")
.css("display", s.isClosed ? "none" : "block")
.appendTo($T)
;
if (o.togglerContent_closed) // ui-layout-closed
$("<span>" + o.togglerContent_closed + "</span>")
.addClass("content content-closed")
.css("display", s.isClosed ? "block" : "none")
.appendTo($T)
;
// ADD BASIC VISUAL STYLES
if (o.applyDefaultStyles)
$T.css(c.togglers.cssDef);
if (!isOpen) bindStartSlidingEvent(pane, true); // will enable if state.PANE.isSliding = true
}
});
// SET ALL HANDLE SIZES & LENGTHS
sizeHandles("all", true); // true = onInit
};
/*
* initResizable
*
* Add resize-bars to all panes that specify it in options
*
* @dependancies $.fn.resizable - will abort if not found
* @callers create()
*/
var initResizable = function () {
var
draggingAvailable = (typeof $.fn.draggable == "function")
, minPosition, maxPosition, edge // set in start()
;
$.each(c.borderPanes.split(","), function() {
var
pane = str(this)
, o = options[pane]
, s = state[pane]
;
if (!draggingAvailable || !$Ps[pane] || !o.resizable) {
o.resizable = false;
return true; // skip to next
}
var
rClass = o.resizerClass
// 'drag' classes are applied to the ORIGINAL resizer-bar while dragging is in process
, dragClass = rClass + "-drag" // resizer-drag
, dragPaneClass = rClass + "-" + pane + "-drag" // resizer-north-drag
// 'dragging' class is applied to the CLONED resizer-bar while it is being dragged
, draggingClass = rClass + "-dragging" // resizer-dragging
, draggingPaneClass = rClass + "-" + pane + "-dragging" // resizer-north-dragging
, draggingClassSet = false // logic var
, $P = $Ps[pane]
, $R = $Rs[pane]
;
if (!s.isClosed)
$R
.attr("title", o.resizerTip)
.css("cursor", o.resizerCursor) // n-resize, s-resize, etc
;
$R.draggable({
containment: $Container[0] // limit resizing to layout container
, axis: (c[pane].dir == "horz" ? "y" : "x") // limit resizing to horz or vert axis
, delay: 200
, distance: 1
// basic format for helper - style it using class: .ui-draggable-dragging
, helper: "clone"
, opacity: o.resizerDragOpacity
//, iframeFix: o.draggableIframeFix // TODO: consider using when bug is fixed
, zIndex: c.zIndex.resizing
, start: function (e, ui) {
// onresize_start callback - will CANCEL hide if returns false
// TODO: CONFIRM that dragging can be cancelled like this???
if (false === execUserCallback(pane, o.onresize_start)) return false;
s.isResizing = true; // prevent pane from closing while resizing
clearTimer(pane, "closeSlider"); // just in case already triggered
$R.addClass(dragClass + " " + dragPaneClass); // add drag classes
draggingClassSet = false; // reset logic var - see drag()
// SET RESIZING LIMITS - used in drag()
var resizerWidth = (pane == "east" || pane == "south" ? o.spacing_open : 0);
setPaneMinMaxSizes(pane); // update pane-state
s.minPosition -= resizerWidth;
s.maxPosition -= resizerWidth;
edge = (c[pane].dir == "horz" ? "top" : "left");
// MASK PANES WITH IFRAMES OR OTHER TROUBLESOME ELEMENTS
$(o.maskIframesOnResize === true ? "iframe" : o.maskIframesOnResize).each(function() {
$('<div class="ui-layout-mask"/>')
.css({
background: "#fff"
, opacity: "0.001"
, zIndex: 9
, position: "absolute"
, width: this.offsetWidth + "px"
, height: this.offsetHeight + "px"
})
.css($(this).offset())// top & left
.appendTo(this.parentNode) // put div INSIDE pane to avoid zIndex issues
;
});
}
, drag: function (e, ui) {
if (!draggingClassSet) { // can only add classes after clone has been added to the DOM
$(".ui-draggable-dragging")
.addClass(draggingClass + " " + draggingPaneClass)// add dragging classes
.children().css("visibility", "hidden") // hide toggler inside dragged resizer-bar
;
draggingClassSet = true;
// draggable bug!? RE-SET zIndex to prevent E/W resize-bar showing through N/S pane!
if (s.isSliding) $Ps[pane].css("zIndex", c.zIndex.sliding);
}
// CONTAIN RESIZER-BAR TO RESIZING LIMITS
if (ui.position[edge] < s.minPosition) ui.position[edge] = s.minPosition;
else if (ui.position[edge] > s.maxPosition) ui.position[edge] = s.maxPosition;
}
, stop: function (e, ui) {
var
dragPos = ui.position
, resizerPos
, newSize
;
$R.removeClass(dragClass + " " + dragPaneClass); // remove drag classes
switch (pane) {
case "north":
resizerPos = dragPos.top;
break;
case "west":
resizerPos = dragPos.left;
break;
case "south":
resizerPos = cDims.outerHeight - dragPos.top - $R.outerHeight();
break;
case "east":
resizerPos = cDims.outerWidth - dragPos.left - $R.outerWidth();
break;
}
// remove container margin from resizer position to get the pane size
newSize = resizerPos - cDims[ c[pane].edge ];
sizePane(pane, newSize);
// UN-MASK PANES MASKED IN drag.start
$("div.ui-layout-mask").remove(); // Remove iframe masks
s.isResizing = false;
}
});
});
};
/*
* ###########################
* ACTION METHODS
* ###########################
*/
/*
* hide / show
*
* Completely 'hides' a pane, including its spacing - as if it does not exist
* The pane is not actually 'removed' from the source, so can use 'show' to un-hide it
*
* @param String pane The pane being hidden, ie: north, south, east, or west
*/
var hide = function (pane, onInit) {
var
o = options[pane]
, s = state[pane]
, $P = $Ps[pane]
, $R = $Rs[pane]
;
if (!$P || s.isHidden) return; // pane does not exist OR is already hidden
// onhide_start callback - will CANCEL hide if returns false
if (false === execUserCallback(pane, o.onhide_start)) return;
s.isSliding = false; // just in case
// now hide the elements
if ($R) $R.hide(); // hide resizer-bar
if (onInit || s.isClosed) {
s.isClosed = true; // to trigger open-animation on show()
s.isHidden = true;
$P.hide(); // no animation when loading page
sizeMidPanes(c[pane].dir == "horz" ? "all" : "center");
execUserCallback(pane, o.onhide_end || o.onhide);
}
else {
s.isHiding = true; // used by onclose
close(pane, false); // adjust all panes to fit
//s.isHidden = true; - will be set by close - if not cancelled
}
};
var show = function (pane, openPane) {
var
o = options[pane]
, s = state[pane]
, $P = $Ps[pane]
, $R = $Rs[pane]
;
if (!$P || !s.isHidden) return; // pane does not exist OR is not hidden
// onhide_start callback - will CANCEL hide if returns false
if (false === execUserCallback(pane, o.onshow_start)) return;
s.isSliding = false; // just in case
s.isShowing = true; // used by onopen/onclose
//s.isHidden = false; - will be set by open/close - if not cancelled
// now show the elements
if ($R && o.spacing_open > 0) $R.show();
if (openPane === false)
close(pane, true); // true = force
else
open(pane); // adjust all panes to fit
};
/*
* toggle
*
* Toggles a pane open/closed by calling either open or close
*
* @param String pane The pane being toggled, ie: north, south, east, or west
*/
var toggle = function (pane) {
var s = state[pane];
if (s.isHidden)
show(pane); // will call 'open' after unhiding it
else if (s.isClosed)
open(pane);
else
close(pane);
};
/*
* close
*
* Close the specified pane (animation optional), and resize all other panes as needed
*
* @param String pane The pane being closed, ie: north, south, east, or west
*/
var close = function (pane, force, noAnimation) {
var
$P = $Ps[pane]
, $R = $Rs[pane]
, $T = $Ts[pane]
, o = options[pane]
, s = state[pane]
, doFX = !noAnimation && !s.isClosed && (o.fxName_close != "none")
, edge = c[pane].edge
, rClass = o.resizerClass
, tClass = o.togglerClass
, _pane = "-" + pane // used for classNames
, _open = "-open"
, _sliding = "-sliding"
, _closed = "-closed"
// transfer logic vars to temp vars
, isShowing = s.isShowing
, isHiding = s.isHiding
;
// now clear the logic vars
delete s.isShowing;
delete s.isHiding;
if (!$P || (!o.resizable && !o.closable)) return; // invalid request
else if (!force && s.isClosed && !isShowing) return; // already closed
if (c.isLayoutBusy) { // layout is 'busy' - probably with an animation
setFlowCallback("close", pane, force); // set a callback for this action, if possible
return; // ABORT
}
// onclose_start callback - will CANCEL hide if returns false
// SKIP if just 'showing' a hidden pane as 'closed'
if (!isShowing && false === execUserCallback(pane, o.onclose_start)) return;
// SET flow-control flags
c[pane].isMoving = true;
c.isLayoutBusy = true;
s.isClosed = true;
// update isHidden BEFORE sizing panes
if (isHiding) s.isHidden = true;
else if (isShowing) s.isHidden = false;
// sync any 'pin buttons'
syncPinBtns(pane, false);
// resize panes adjacent to this one
if (!s.isSliding) sizeMidPanes(c[pane].dir == "horz" ? "all" : "center");
// if this pane has a resizer bar, move it now
if ($R) {
$R
.css(edge, cDims[edge])// move the resizer bar
.removeClass(rClass + _open + " " + rClass + _pane + _open)
.removeClass(rClass + _sliding + " " + rClass + _pane + _sliding)
.addClass(rClass + _closed + " " + rClass + _pane + _closed)
;
// DISABLE 'resizing' when closed - do this BEFORE bindStartSlidingEvent
if (o.resizable)
$R
.draggable("disable")
.css("cursor", "default")
.attr("title", "")
;
// if pane has a toggler button, adjust that too
if ($T) {
$T
.removeClass(tClass + _open + " " + tClass + _pane + _open)
.addClass(tClass + _closed + " " + tClass + _pane + _closed)
.attr("title", o.togglerTip_closed) // may be blank
;
}
sizeHandles(); // resize 'length' and position togglers for adjacent panes
}
// ANIMATE 'CLOSE' - if no animation, then was ALREADY shown above
if (doFX) {
lockPaneForFX(pane, true); // need to set left/top so animation will work
$P.hide(o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () {
lockPaneForFX(pane, false); // undo
if (!s.isClosed) return; // pane was opened before animation finished!
close_2();
});
}
else {
$P.hide(); // just hide pane NOW
close_2();
}
// SUBROUTINE
function close_2() {
bindStartSlidingEvent(pane, true); // will enable if state.PANE.isSliding = true
// onclose callback - UNLESS just 'showing' a hidden pane as 'closed'
if (!isShowing) execUserCallback(pane, o.onclose_end || o.onclose);
// onhide OR onshow callback
if (isShowing) execUserCallback(pane, o.onshow_end || o.onshow);
if (isHiding) execUserCallback(pane, o.onhide_end || o.onhide);
// internal flow-control callback
execFlowCallback(pane);
}
};
/*
* open
*
* Open the specified pane (animation optional), and resize all other panes as needed
*
* @param String pane The pane being opened, ie: north, south, east, or west
*/
var open = function (pane, slide, noAnimation) {
var
$P = $Ps[pane]
, $R = $Rs[pane]
, $T = $Ts[pane]
, o = options[pane]
, s = state[pane]
, doFX = !noAnimation && s.isClosed && (o.fxName_open != "none")
, edge = c[pane].edge
, rClass = o.resizerClass
, tClass = o.togglerClass
, _pane = "-" + pane // used for classNames
, _open = "-open"
, _closed = "-closed"
, _sliding = "-sliding"
// transfer logic var to temp var
, isShowing = s.isShowing
;
// now clear the logic var
delete s.isShowing;
if (!$P || (!o.resizable && !o.closable)) return; // invalid request
else if (!s.isClosed && !s.isSliding) return; // already open
// pane can ALSO be unhidden by just calling show(), so handle this scenario
if (s.isHidden && !isShowing) {
show(pane, true);
return;
}
if (c.isLayoutBusy) { // layout is 'busy' - probably with an animation
setFlowCallback("open", pane, slide); // set a callback for this action, if possible
return; // ABORT
}
// onopen_start callback - will CANCEL hide if returns false
if (false === execUserCallback(pane, o.onopen_start)) return;
// SET flow-control flags
c[pane].isMoving = true;
c.isLayoutBusy = true;
// 'PIN PANE' - stop sliding
if (s.isSliding && !slide) // !slide = 'open pane normally' - NOT sliding
bindStopSlidingEvents(pane, false); // will set isSliding=false
s.isClosed = false;
// update isHidden BEFORE sizing panes
if (isShowing) s.isHidden = false;
// Container size may have changed - shrink the pane if now 'too big'
setPaneMinMaxSizes(pane); // update pane-state
if (s.size > s.maxSize) // pane is too big! resize it before opening
$P.css(c[pane].sizeType, max(1, cssSize(pane, s.maxSize)));
bindStartSlidingEvent(pane, false); // remove trigger event from resizer-bar
if (doFX) { // ANIMATE
lockPaneForFX(pane, true); // need to set left/top so animation will work
$P.show(o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function() {
lockPaneForFX(pane, false); // undo
if (s.isClosed) return; // pane was closed before animation finished!
open_2(); // continue
});
}
else {// no animation
$P.show(); // just show pane and...
open_2(); // continue
}
// SUBROUTINE
function open_2() {
// NOTE: if isSliding, then other panes are NOT 'resized'
if (!s.isSliding) // resize all panes adjacent to this one
sizeMidPanes(c[pane].dir == "vert" ? "center" : "all");
// if this pane has a toggler, move it now
if ($R) {
$R
.css(edge, cDims[edge] + getPaneSize(pane))// move the toggler
.removeClass(rClass + _closed + " " + rClass + _pane + _closed)
.addClass(rClass + _open + " " + rClass + _pane + _open)
.addClass(!s.isSliding ? "" : rClass + _sliding + " " + rClass + _pane + _sliding)
;
if (o.resizable)
$R
.draggable("enable")
.css("cursor", o.resizerCursor)
.attr("title", o.resizerTip)
;
else
$R.css("cursor", "default"); // n-resize, s-resize, etc
// if pane also has a toggler button, adjust that too
if ($T) {
$T
.removeClass(tClass + _closed + " " + tClass + _pane + _closed)
.addClass(tClass + _open + " " + tClass + _pane + _open)
.attr("title", o.togglerTip_open) // may be blank
;
}
sizeHandles("all"); // resize resizer & toggler sizes for all panes
}
// resize content every time pane opens - to be sure
sizeContent(pane);
// sync any 'pin buttons'
syncPinBtns(pane, !s.isSliding);
// onopen callback
execUserCallback(pane, o.onopen_end || o.onopen);
// onshow callback
if (isShowing) execUserCallback(pane, o.onshow_end || o.onshow);
// internal flow-control callback
execFlowCallback(pane);
}
};
/*
* lockPaneForFX
*
* Must set left/top on East/South panes so animation will work properly
*
* @param String pane The pane to lock, 'east' or 'south' - any other is ignored!
* @param Boolean doLock true = set left/top, false = remove
*/
var lockPaneForFX = function (pane, doLock) {
var $P = $Ps[pane];
if (doLock) {
$P.css({ zIndex: c.zIndex.animation }); // overlay all elements during animation
if (pane == "south")
$P.css({ top: cDims.top + cDims.innerHeight - $P.outerHeight() });
else if (pane == "east")
$P.css({ left: cDims.left + cDims.innerWidth - $P.outerWidth() });
}
else {
if (!state[pane].isSliding) $P.css({ zIndex: c.zIndex.pane_normal });
if (pane == "south")
$P.css({ top: "auto" });
else if (pane == "east")
$P.css({ left: "auto" });
}
};
/*
* bindStartSlidingEvent
*
* Toggle sliding functionality of a specific pane on/off by adding removing 'slide open' trigger
*
* @callers open(), close()
* @param String pane The pane to enable/disable, 'north', 'south', etc.
* @param Boolean enable Enable or Disable sliding?
*/
var bindStartSlidingEvent = function (pane, enable) {
var
o = options[pane]
, $R = $Rs[pane]
, trigger = o.slideTrigger_open
;
if (!$R || !o.slidable) return;
// make sure we have a valid event
if (trigger != "click" && trigger != "dblclick" && trigger != "mouseover") trigger = "click";
$R
// add or remove trigger event
[enable ? "bind" : "unbind"](trigger, slideOpen)
// set the appropriate cursor & title/tip
.css("cursor", (enable ? o.sliderCursor : "default"))
.attr("title", (enable ? o.sliderTip : ""))
;
};
/*
* bindStopSlidingEvents
*
* Add or remove 'mouseout' events to 'slide close' when pane is 'sliding' open or closed
* Also increases zIndex when pane is sliding open
* See bindStartSlidingEvent for code to control 'slide open'
*
* @callers slideOpen(), slideClosed()
* @param String pane The pane to process, 'north', 'south', etc.
* @param Boolean isOpen Is pane open or closed?
*/
var bindStopSlidingEvents = function (pane, enable) {
var
o = options[pane]
, s = state[pane]
, trigger = o.slideTrigger_close
, action = (enable ? "bind" : "unbind") // can't make 'unbind' work! - see disabled code below
, $P = $Ps[pane]
, $R = $Rs[pane]
;
s.isSliding = enable; // logic
clearTimer(pane, "closeSlider"); // just in case
// raise z-index when sliding
$P.css({ zIndex: (enable ? c.zIndex.sliding : c.zIndex.pane_normal) });
$R.css({ zIndex: (enable ? c.zIndex.sliding : c.zIndex.resizer_normal) });
// make sure we have a valid event
if (trigger != "click" && trigger != "mouseout") trigger = "mouseout";
// when trigger is 'mouseout', must cancel timer when mouse moves between 'pane' and 'resizer'
if (enable) { // BIND trigger events
$P.bind(trigger, slideClosed);
$R.bind(trigger, slideClosed);
if (trigger = "mouseout") {
$P.bind("mouseover", cancelMouseOut);
$R.bind("mouseover", cancelMouseOut);
}
}
else { // UNBIND trigger events
// TODO: why does unbind of a 'single function' not work reliably?
//$P[action](trigger, slideClosed );
$P.unbind(trigger);
$R.unbind(trigger);
if (trigger = "mouseout") {
//$P[action]("mouseover", cancelMouseOut );
$P.unbind("mouseover");
$R.unbind("mouseover");
clearTimer(pane, "closeSlider");
}
}
// SUBROUTINE for mouseout timer clearing
function cancelMouseOut(evt) {
clearTimer(pane, "closeSlider");
evt.stopPropagation();
}
};
var slideOpen = function () {
var pane = $(this).attr("resizer"); // attr added by initHandles
if (state[pane].isClosed) { // skip if already open!
bindStopSlidingEvents(pane, true); // pane is opening, so BIND trigger events to close it
open(pane, true); // true = slide - ie, called from here!
}
};
var slideClosed = function () {
var
$E = $(this)
, pane = $E.attr("pane") || $E.attr("resizer")
, o = options[pane]
, s = state[pane]
;
if (s.isClosed || s.isResizing)
return; // skip if already closed OR in process of resizing
else if (o.slideTrigger_close == "click")
close_NOW(); // close immediately onClick
else // trigger = mouseout - use a delay
setTimer(pane, "closeSlider", close_NOW, 300); // .3 sec delay
// SUBROUTINE for timed close
function close_NOW() {
bindStopSlidingEvents(pane, false); // pane is being closed, so UNBIND trigger events
if (!s.isClosed) close(pane); // skip if already closed!
}
};
/*
* sizePane
*
* @callers initResizable.stop()
* @param String pane The pane being resized - usually west or east, but potentially north or south
* @param Integer newSize The new size for this pane - will be validated
*/
var sizePane = function (pane, size) {
// TODO: accept "auto" as size, and size-to-fit pane content
var
edge = c[pane].edge
, dir = c[pane].dir
, o = options[pane]
, s = state[pane]
, $P = $Ps[pane]
, $R = $Rs[pane]
;
// calculate 'current' min/max sizes
setPaneMinMaxSizes(pane); // update pane-state
// compare/update calculated min/max to user-options
s.minSize = max(s.minSize, o.minSize);
if (o.maxSize > 0) s.maxSize = min(s.maxSize, o.maxSize);
// validate passed size
size = max(size, s.minSize);
size = min(size, s.maxSize);
s.size = size; // update state
// move the resizer bar and resize the pane
$R.css(edge, size + cDims[edge]);
$P.css(c[pane].sizeType, max(1, cssSize(pane, size)));
// resize all the adjacent panes, and adjust their toggler buttons
if (!s.isSliding) sizeMidPanes(dir == "horz" ? "all" : "center");
sizeHandles();
sizeContent(pane);
execUserCallback(pane, o.onresize_end || o.onresize);
};
/*
* sizeMidPanes
*
* @callers create(), open(), close(), onWindowResize()
*/
var sizeMidPanes = function (panes, overrideDims, onInit) {
if (!panes || panes == "all") panes = "east,west,center";
var d = getPaneDims();
if (overrideDims) $.extend(d, overrideDims);
$.each(panes.split(","), function() {
if (!$Ps[this]) return; // NO PANE - skip
var
pane = str(this)
, o = options[pane]
, s = state[pane]
, $P = $Ps[pane]
, $R = $Rs[pane]
, hasRoom = true
, CSS = {}
;
if (pane == "center") {
d = getPaneDims(); // REFRESH Dims because may have just 'unhidden' East or West pane after a 'resize'
CSS = $.extend({}, d); // COPY ALL of the paneDims
CSS.width = max(1, cssW(pane, CSS.width));
CSS.height = max(1, cssH(pane, CSS.height));
hasRoom = (CSS.width > 1 && CSS.height > 1);
/*
* Extra CSS for IE6 or IE7 in Quirks-mode - add 'width' to NORTH/SOUTH panes
* Normally these panes have only 'left' & 'right' positions so pane auto-sizes
*/
if ($.browser.msie && (!$.boxModel || $.browser.version < 7)) {
if ($Ps.north) $Ps.north.css({ width: cssW($Ps.north, cDims.innerWidth) });
if ($Ps.south) $Ps.south.css({ width: cssW($Ps.south, cDims.innerWidth) });
}
}
else { // for east and west, set only the height
CSS.top = d.top;
CSS.bottom = d.bottom;
CSS.height = max(1, cssH(pane, d.height));
hasRoom = (CSS.height > 1);
}
if (hasRoom) {
$P.css(CSS);
if (s.noRoom) {
s.noRoom = false;
if (s.isHidden) return;
else show(pane, !s.isClosed);
/* OLD CODE - keep until sure line above works right!
if (!s.isClosed) $P.show(); // in case was previously hidden due to NOT hasRoom
if ($R) $R.show();
*/
}
if (!onInit) {
sizeContent(pane);
execUserCallback(pane, o.onresize_end || o.onresize);
}
}
else if (!s.noRoom) { // no room for pane, so just hide it (if not already)
s.noRoom = true; // update state
if (s.isHidden) return;
if (onInit) { // skip onhide callback and other logic onLoad
$P.hide();
if ($R) $R.hide();
}
else hide(pane);
}
});
};
var sizeContent = function (panes) {
if (!panes || panes == "all") panes = c.allPanes;
$.each(panes.split(","), function() {
if (!$Cs[this]) return; // NO CONTENT - skip
var
pane = str(this)
, ignore = options[pane].contentIgnoreSelector
, $P = $Ps[pane]
, $C = $Cs[pane]
, e_C = $C[0] // DOM element
, height = cssH($P); // init to pane.innerHeight
;
$P.children().each(function() {
if (this == e_C) return; // Content elem - skip
var $E = $(this);
if (!ignore || !$E.is(ignore))
height -= $E.outerHeight();
});
if (height > 0)
height = cssH($C, height);
if (height < 1)
$C.hide(); // no room for content!
else
$C.css({ height: height }).show();
});
};
/*
* sizeHandles
*
* Called every time a pane is opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary
*
* @callers initHandles(), open(), close(), resizeAll()
*/
var sizeHandles = function (panes, onInit) {
if (!panes || panes == "all") panes = c.borderPanes;
$.each(panes.split(","), function() {
var
pane = str(this)
, o = options[pane]
, s = state[pane]
, $P = $Ps[pane]
, $R = $Rs[pane]
, $T = $Ts[pane]
;
if (!$P || !$R || (!o.resizable && !o.closable)) return; // skip
var
dir = c[pane].dir
, _state = (s.isClosed ? "_closed" : "_open")
, spacing = o["spacing" + _state]
, togAlign = o["togglerAlign" + _state]
, togLen = o["togglerLength" + _state]
, paneLen
, offset
, CSS = {}
;
if (spacing == 0) {
$R.hide();
return;
}
else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason
$R.show(); // in case was previously hidden
// Resizer Bar is ALWAYS same width/height of pane it is attached to
if (dir == "horz") { // north/south
paneLen = $P.outerWidth();
$R.css({
width: max(1, cssW($R, paneLen)) // account for borders & padding
, height: max(1, cssH($R, spacing)) // ditto
, left: cssNum($P, "left")
});
}
else { // east/west
paneLen = $P.outerHeight();
$R.css({
height: max(1, cssH($R, paneLen)) // account for borders & padding
, width: max(1, cssW($R, spacing)) // ditto
, top: cDims.top + getPaneSize("north", true)
//, top: cssNum($Ps["center"], "top")
});
}
if ($T) {
if (togLen == 0 || (s.isSliding && o.hideTogglerOnSlide)) {
$T.hide(); // always HIDE the toggler when 'sliding'
return;
}
else
$T.show(); // in case was previously hidden
if (!(togLen > 0) || togLen == "100%" || togLen > paneLen) {
togLen = paneLen;
offset = 0;
}
else { // calculate 'offset' based on options.PANE.togglerAlign_open/closed
if (typeof togAlign == "string") {
switch (togAlign) {
case "top":
case "left":
offset = 0;
break;
case "bottom":
case "right":
offset = paneLen - togLen;
break;
case "middle":
case "center":
default:
offset = Math.floor((paneLen - togLen) / 2); // 'default' catches typos
}
}
else { // togAlign = number
var x = parseInt(togAlign); //
if (togAlign >= 0) offset = x;
else offset = paneLen - togLen + x; // NOTE: x is negative!
}
}
var
$TC_o = (o.togglerContent_open ? $T.children(".content-open") : false)
, $TC_c = (o.togglerContent_closed ? $T.children(".content-closed") : false)
, $TC = (s.isClosed ? $TC_c : $TC_o)
;
if ($TC_o) $TC_o.css("display", s.isClosed ? "none" : "block");
if ($TC_c) $TC_c.css("display", s.isClosed ? "block" : "none");
if (dir == "horz") { // north/south
var width = cssW($T, togLen);
$T.css({
width: max(0, width) // account for borders & padding
, height: max(1, cssH($T, spacing)) // ditto
, left: offset // TODO: VERIFY that toggler positions correctly for ALL values
});
if ($TC) // CENTER the toggler content SPAN
$TC.css("marginLeft", Math.floor((width - $TC.outerWidth()) / 2)); // could be negative
}
else { // east/west
var height = cssH($T, togLen);
$T.css({
height: max(0, height) // account for borders & padding
, width: max(1, cssW($T, spacing)) // ditto
, top: offset // POSITION the toggler
});
if ($TC) // CENTER the toggler content SPAN
$TC.css("marginTop", Math.floor((height - $TC.outerHeight()) / 2)); // could be negative
}
}
// DONE measuring and sizing this resizer/toggler, so can be 'hidden' now
if (onInit && o.initHidden) {
$R.hide();
if ($T) $T.hide();
}
});
};
/*
* resizeAll
*
* @callers window.onresize(), callbacks or custom code
*/
var resizeAll = function () {
var
oldW = cDims.innerWidth
, oldH = cDims.innerHeight
;
cDims = state.container = getElemDims($Container); // UPDATE container dimensions
var
checkH = (cDims.innerHeight < oldH)
, checkW = (cDims.innerWidth < oldW)
, s, dir
;
if (checkH || checkW)
// NOTE special order for sizing: S-N-E-W
$.each(["south","north","east","west"], function(i, pane) {
s = state[pane];
dir = c[pane].dir;
if (!s.isClosed && ((checkH && dir == "horz") || (checkW && dir == "vert"))) {
setPaneMinMaxSizes(pane); // update pane-state
// shrink pane if 'too big' to fit
if (s.size > s.maxSize)
sizePane(pane, s.maxSize);
}
});
sizeMidPanes("all");
sizeHandles("all"); // reposition the toggler elements
};
/*
* keyDown
*
* Capture keys when enableCursorHotkey - toggle pane if hotkey pressed
*
* @callers document.keydown()
*/
function keyDown(evt) {
if (!evt) return true;
var code = evt.keyCode;
if (code < 33) return true; // ignore special keys: ENTER, TAB, etc
var
PANE = {
38: "north" // Up Cursor
, 40: "south" // Down Cursor
, 37: "west" // Left Cursor
, 39: "east" // Right Cursor
}
, isCursorKey = (code >= 37 && code <= 40)
, ALT = evt.altKey // no worky!
, SHIFT = evt.shiftKey
, CTRL = evt.ctrlKey
, pane = false
, s, o, k, m, el
;
if (!CTRL && !SHIFT)
return true; // no modifier key - abort
else if (isCursorKey && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey
pane = PANE[code];
else // check to see if this matches a custom-hotkey
$.each(c.borderPanes.split(","), function(i, p) { // loop each pane to check its hotkey
o = options[p];
k = o.customHotkey;
m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT"
if ((SHIFT && m == "SHIFT") || (CTRL && m == "CTRL") || (CTRL && SHIFT)) { // Modifier matches
if (k && code == (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches
pane = p;
return false; // BREAK
}
}
});
if (!pane) return true; // no hotkey - abort
// validate pane
o = options[pane]; // get pane options
s = state[pane]; // get pane options
if (!o.enableCursorHotkey || s.isHidden || !$Ps[pane]) return true;
// see if user is in a 'form field' because may be 'selecting text'!
el = evt.target || evt.srcElement;
if (el && SHIFT && isCursorKey && (el.tagName == "TEXTAREA" || (el.tagName == "INPUT" && (code == 37 || code == 39))))
return true; // allow text-selection
// SYNTAX NOTES
// use "returnValue=false" to abort keystroke but NOT abort function - can run another command afterwards
// use "return false" to abort keystroke AND abort function
toggle(pane);
evt.stopPropagation();
evt.returnValue = false; // CANCEL key
return false;
}
;
/*
* ###########################
* UTILITY METHODS
* called externally only
* ###########################
*/
function allowOverflow(elem) {
if (this && this.tagName) elem = this; // BOUND to element
var $P;
if (typeof elem == "string")
$P = $Ps[elem];
else {
if ($(elem).attr("pane")) $P = $(elem);
else $P = $(elem).parents("div[pane]:first");
}
if (!$P.length) return; // INVALID
var
pane = $P.attr("pane")
, s = state[pane]
;
// if pane is already raised, then reset it before doing it again!
// this would happen if allowOverflow is attached to BOTH the pane and an element
if (s.cssSaved)
resetOverflow(pane); // reset previous CSS before continuing
// if pane is raised by sliding or resizing, or it's closed, then abort
if (s.isSliding || s.isResizing || s.isClosed) {
s.cssSaved = false;
return;
}
var
newCSS = { zIndex: (c.zIndex.pane_normal + 1) }
, curCSS = {}
, of = $P.css("overflow")
, ofX = $P.css("overflowX")
, ofY = $P.css("overflowY")
;
// determine which, if any, overflow settings need to be changed
if (of != "visible") {
curCSS.overflow = of;
newCSS.overflow = "visible";
}
if (ofX && ofX != "visible" && ofX != "auto") {
curCSS.overflowX = ofX;
newCSS.overflowX = "visible";
}
if (ofY && ofY != "visible" && ofY != "auto") {
curCSS.overflowY = ofX;
newCSS.overflowY = "visible";
}
// save the current overflow settings - even if blank!
s.cssSaved = curCSS;
// apply new CSS to raise zIndex and, if necessary, make overflow 'visible'
$P.css(newCSS);
// make sure the zIndex of all other panes is normal
$.each(c.allPanes.split(","), function(i, p) {
if (p != pane) resetOverflow(p);
});
}
;
function resetOverflow(elem) {
if (this && this.tagName) elem = this; // BOUND to element
var $P;
if (typeof elem == "string")
$P = $Ps[elem];
else {
if ($(elem).hasClass("ui-layout-pane")) $P = $(elem);
else $P = $(elem).parents("div[pane]:first");
}
if (!$P.length) return; // INVALID
var
pane = $P.attr("pane")
, s = state[pane]
, CSS = s.cssSaved || {}
;
// reset the zIndex
if (!s.isSliding && !s.isResizing)
$P.css("zIndex", c.zIndex.pane_normal);
// reset Overflow - if necessary
$P.css(CSS);
// clear var
s.cssSaved = false;
}
;
/*
* getBtn
*
* Helper function to validate params received by addButton utilities
*
* @param String selector jQuery selector for button, eg: ".ui-layout-north .toggle-button"
* @param String pane Name of the pane the button is for: 'north', 'south', etc.
* @returns If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise 'false'
*/
function getBtn(selector, pane, action) {
var
$E = $(selector)
, err = "Error Adding Button \n\nInvalid "
;
if (!$E.length) // element not found
alert(err + "selector: " + selector);
else if (c.borderPanes.indexOf(pane) == -1) // invalid 'pane' sepecified
alert(err + "pane: " + pane);
else { // VALID
var btn = options[pane].buttonClass + "-" + action;
$E.addClass(btn + " " + btn + "-" + pane);
return $E;
}
return false; // INVALID
}
;
/*
* addToggleBtn
*
* Add a custom Toggler button for a pane
*
* @param String selector jQuery selector for button, eg: ".ui-layout-north .toggle-button"
* @param String pane Name of the pane the button is for: 'north', 'south', etc.
*/
function addToggleBtn(selector, pane) {
var $E = getBtn(selector, pane, "toggle");
if ($E)
$E
.attr("title", state[pane].isClosed ? "Open" : "Close")
.click(function (evt) {
toggle(pane);
evt.stopPropagation();
})
;
}
;
/*
* addOpenBtn
*
* Add a custom Open button for a pane
*
* @param String selector jQuery selector for button, eg: ".ui-layout-north .open-button"
* @param String pane Name of the pane the button is for: 'north', 'south', etc.
*/
function addOpenBtn(selector, pane) {
var $E = getBtn(selector, pane, "open");
if ($E)
$E
.attr("title", "Open")
.click(function (evt) {
open(pane);
evt.stopPropagation();
})
;
}
;
/*
* addCloseBtn
*
* Add a custom Close button for a pane
*
* @param String selector jQuery selector for button, eg: ".ui-layout-north .close-button"
* @param String pane Name of the pane the button is for: 'north', 'south', etc.
*/
function addCloseBtn(selector, pane) {
var $E = getBtn(selector, pane, "close");
if ($E)
$E
.attr("title", "Close")
.click(function (evt) {
close(pane);
evt.stopPropagation();
})
;
}
;
/*
* addPinBtn
*
* Add a custom Pin button for a pane
*
* Four classes are added to the element, based on the paneClass for the associated pane...
* Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
* - ui-layout-pane-pin
* - ui-layout-pane-west-pin
* - ui-layout-pane-pin-up
* - ui-layout-pane-west-pin-up
*
* @param String selector jQuery selector for button, eg: ".ui-layout-north .ui-layout-pin"
* @param String pane Name of the pane the pin is for: 'north', 'south', etc.
*/
function addPinBtn(selector, pane) {
var $E = getBtn(selector, pane, "pin");
if ($E) {
var s = state[pane];
$E.click(function (evt) {
setPinState($(this), pane, (s.isSliding || s.isClosed));
if (s.isSliding || s.isClosed) open(pane); // change from sliding to open
else close(pane); // slide-closed
evt.stopPropagation();
});
// add up/down pin attributes and classes
setPinState($E, pane, (!s.isClosed && !s.isSliding));
// add this pin to the pane data so we can 'sync it' automatically
// PANE.pins key is an array so we can store multiple pins for each pane
c[pane].pins.push(selector); // just save the selector string
}
}
;
/*
* syncPinBtns
*
* INTERNAL function to sync 'pin buttons' when pane is opened or closed
* Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
*
* @callers open(), close()
* @params pane These are the params returned to callbacks by layout()
* @params doPin True means set the pin 'down', False means 'up'
*/
function syncPinBtns(pane, doPin) {
$.each(c[pane].pins, function (i, selector) {
setPinState($(selector), pane, doPin);
});
}
;
/*
* setPinState
*
* Change the class of the pin button to make it look 'up' or 'down'
*
* @callers addPinBtn(), syncPinBtns()
* @param Element $Pin The pin-span element in a jQuery wrapper
* @param Boolean doPin True = set the pin 'down', False = set it 'up'
* @param String pinClass The root classname for pins - will add '-up' or '-down' suffix
*/
function setPinState($Pin, pane, doPin) {
var updown = $Pin.attr("pin");
if (updown && doPin == (updown == "down")) return; // already in correct state
var
root = options[pane].buttonClass
, class1 = root + "-pin"
, class2 = class1 + "-" + pane
, UP1 = class1 + "-up"
, UP2 = class2 + "-up"
, DN1 = class1 + "-down"
, DN2 = class2 + "-down"
;
$Pin
.attr("pin", doPin ? "down" : "up")// logic
.attr("title", doPin ? "Un-Pin" : "Pin")
.removeClass(doPin ? UP1 : DN1)
.removeClass(doPin ? UP2 : DN2)
.addClass(doPin ? DN1 : UP1)
.addClass(doPin ? DN2 : UP2)
;
}
;
/*
* ###########################
* CREATE/RETURN BORDER-LAYOUT
* ###########################
*/
// init global vars
var
$Container = $(this).css({ overflow: "hidden" }) // Container elem
, $Ps = {} // Panes x4 - set in initPanes()
, $Cs = {} // Content x4 - set in initPanes()
, $Rs = {} // Resizers x4 - set in initHandles()
, $Ts = {} // Togglers x4 - set in initHandles()
// object aliases
, c = config // alias for config hash
, cDims = state.container // alias for easy access to 'container dimensions'
;
// create the border layout NOW
create();
// return object pointers to expose data & option Properties, and primary action Methods
return {
options: options // property - options hash
, state: state // property - dimensions hash
, panes: $Ps // property - object pointers for ALL panes: panes.north, panes.center
, toggle: toggle // method - pass a 'pane' ("north", "west", etc)
, open: open // method - ditto
, close: close // method - ditto
, hide: hide // method - ditto
, show: show // method - ditto
, resizeContent: sizeContent // method - ditto
, sizePane: sizePane // method - pass a 'pane' AND a 'size' in pixels
, resizeAll: resizeAll // method - no parameters
, addToggleBtn: addToggleBtn // utility - pass element selector and 'pane'
, addOpenBtn: addOpenBtn // utility - ditto
, addCloseBtn: addCloseBtn // utility - ditto
, addPinBtn: addPinBtn // utility - ditto
, allowOverflow: allowOverflow // utility - pass calling element
, resetOverflow: resetOverflow // utility - ditto
, cssWidth: cssW
, cssHeight: cssH
};
}
})(jQuery); | 37.340625 | 171 | 0.516759 |
1024a9a2a4e20547c728cf5f84ae17975a22d4c9 | 709 | js | JavaScript | demos/ids-checkbox/example.js | whernebrink/enterprise-wc | f8a3d5bfa4c8fc7a70b7f1de599fbd82b54c5a38 | [
"Apache-2.0"
] | 13 | 2020-10-13T19:00:22.000Z | 2021-09-30T04:12:07.000Z | demos/ids-checkbox/example.js | whernebrink/enterprise-wc | f8a3d5bfa4c8fc7a70b7f1de599fbd82b54c5a38 | [
"Apache-2.0"
] | 487 | 2020-07-22T17:43:46.000Z | 2022-03-31T19:58:19.000Z | demos/ids-checkbox/example.js | corpulent/enterprise-wc | 0527b7727f2b3a2632bbc811c93a7cae1de2c29b | [
"Apache-2.0"
] | 7 | 2021-03-04T01:44:45.000Z | 2021-11-18T08:08:21.000Z | // Supporting components
import IdsButton from '../../src/components/ids-button';
import IdsLayoutGrid from '../../src/components/ids-layout-grid';
document.addEventListener('DOMContentLoaded', () => {
const btnSetIndeterminate = document.querySelector('#btn-set-indeterminate');
const btnRemoveIndeterminate = document.querySelector('#btn-remove-indeterminate');
const cbIndeterminate = document.querySelector('#cb-indeterminate');
// Set indeterminate
btnSetIndeterminate?.addEventListener('click', () => {
cbIndeterminate.indeterminate = true;
});
// Remove indeterminate
btnRemoveIndeterminate?.addEventListener('click', () => {
cbIndeterminate.indeterminate = false;
});
});
| 35.45 | 85 | 0.737659 |
1024b3a6c4008b239753f9be1cb14aae965894d6 | 2,692 | js | JavaScript | next.config.js | DaneTheory/next-with-moxy | 7fbd99e92fdf5d10751da62fbd0399ec09a66b08 | [
"MIT"
] | null | null | null | next.config.js | DaneTheory/next-with-moxy | 7fbd99e92fdf5d10751da62fbd0399ec09a66b08 | [
"MIT"
] | 1 | 2021-12-09T05:57:29.000Z | 2021-12-09T05:57:29.000Z | next.config.js | DaneTheory/next-with-moxy | 7fbd99e92fdf5d10751da62fbd0399ec09a66b08 | [
"MIT"
] | null | null | null | 'use strict';
const { withRasterImages, withPlayback, withSVG, withFonts, with3D } = require('@moxy/next-common-files');
const withOneOf = require('@moxy/next-webpack-oneof');
const withCompileNodeModules = require('@moxy/next-compile-node-modules');
const withNextIntl = require('@moxy/next-intl/plugin');
const withPlugins = require('next-compose-plugins');
const withSitemap = require('@moxy/next-sitemaps/plugin');
const envVar = require('env-var');
const { PHASE_DEVELOPMENT_SERVER, PHASE_PRODUCTION_BUILD } = require('next/constants');
const isEnvRequired = (phase) => phase === PHASE_DEVELOPMENT_SERVER || phase === PHASE_PRODUCTION_BUILD;
const extEnvVar = envVar.from(process.env, {
asStringWithPattern(value, regExp) {
const valid = regExp.test(value);
if (!valid) {
throw new Error(`should match pattern ${regExp.toString()}`);
}
return value;
},
});
module.exports = (phase, params) => {
const COMPRESSION = extEnvVar.get('COMPRESSION').asBool();
const GTM_CONTAINER_ID = extEnvVar.get('GTM_CONTAINER_ID').asString();
const SITE_URL = extEnvVar.get('SITE_URL')
.required(isEnvRequired(phase))
.asStringWithPattern(/^https?:\/\/[^/]+$/);
return withPlugins([
withOneOf,
withRasterImages(),
withRasterImages({
include: /\.data-url\./,
options: {
limit: Infinity,
},
}),
withPlayback(),
withPlayback({
include: /\.data-url\./,
options: {
limit: Infinity,
},
}),
withFonts(),
withFonts({
include: /\.data-url\./,
options: {
limit: Infinity,
},
}),
with3D(),
with3D({
include: /\.data-url\./,
options: {
limit: Infinity,
},
}),
withSVG(),
withSVG({
include: /\.data-url\./,
options: {
limit: Infinity,
},
}),
withSVG({
include: /\.inline\./,
inline: true,
}),
withNextIntl(),
withCompileNodeModules({
exclude: [
// Exclude next-intl related polyfills as they are huge but are already compiled down to ES5
/[\\/]node_modules[\\/]@formatjs[\\/].+?[\\/]locales\.js$/,
],
}),
withSitemap(phase, SITE_URL),
], {
poweredByHeader: false,
compress: COMPRESSION,
env: {
GTM_CONTAINER_ID,
SITE_URL,
},
})(phase, params);
};
| 29.582418 | 108 | 0.529346 |
10260c8e5b5eacc7aa2aa389909806c6dd83ffde | 4,333 | js | JavaScript | src/anol/layer/gml.js | MrSnyder/anol | 2ede6686cd834cf0ebe6642a7a987a767a019984 | [
"MIT"
] | 6 | 2015-03-16T06:29:21.000Z | 2021-04-09T10:45:19.000Z | src/anol/layer/gml.js | MrSnyder/anol | 2ede6686cd834cf0ebe6642a7a987a767a019984 | [
"MIT"
] | 7 | 2021-04-01T14:45:51.000Z | 2022-03-17T09:20:01.000Z | src/anol/layer/gml.js | MrSnyder/anol | 2ede6686cd834cf0ebe6642a7a987a767a019984 | [
"MIT"
] | 8 | 2015-01-12T08:15:08.000Z | 2021-02-17T10:22:30.000Z | /**
* @ngdoc object
* @name anol.layer.StaticGeoJSON
*
* @param {Object} options AnOl Layer options
* @param {Object} options.olLayer Options for ol.layer.Vector
* @param {Object} options.olLayer.source Options for ol.source.Vector
* @param {Object} options.olLayer.source.url Url to GeoJSON
* @param {String} options.olLayer.source.dataProjection Projection if GeoJSON
*
* @description
* Inherits from {@link anol.layer.Layer anol.layer.Layer}.
*/
import FeatureLayer from './feature.js';
import GML2 from 'ol/format/GML2';
import Style from 'ol/style/Style';
import Stroke from 'ol/style/Stroke';
import Fill from 'ol/style/Fill';
import VectorSource from 'ol/source/Vector';
class GMLLayer extends FeatureLayer {
constructor(_options) {
if(_options === false) {
super();
return;
}
// TODO use openlayers gml filter
if (_options.filter) {
var filter = '';
if (!angular.isArray(_options.filter.literal)) {
_options.filter.literal = [_options.filter.literal];
}
angular.forEach(_options.filter.literal, function(literal) {
filter +=
'<PropertyIsEqualTo>' +
'<PropertyName>' + _options.filter.propertyName +'</PropertyName>'+
'<Literal>'+ literal +'</Literal>'+
'</PropertyIsEqualTo>';
})
if (angular.isDefined(_options.filter.filterType)) {
filter =
'<Filter>'+
'<'+_options.filter.filterType + '>' +
filter +
'</'+ _options.filter.filterType +'>'+
'</Filter>';
} else {
filter = '<Filter>'+ filter + '</Filter>';
}
_options.olLayer.source.filter = filter;
}
var defaults = {
olLayer: {
source: {
format: new GML2()
},
style: new Style({
stroke: new Stroke({
color: 'rgba(255,0,0,1)',
width: 1
}),
fill: new Fill({
color: 'rgba(255,0,0,0.3)'
})
})
}
};
var options = $.extend(true, {}, defaults, _options);
super(options);
this.method = options.method || 'GET';
this.CLASS_NAME = 'anol.layer.GML';
}
_createSourceOptions(srcOptions) {
var self = this;
srcOptions.loader = function() {
self.loader(
srcOptions.url, srcOptions.params, srcOptions.filter
);
};
return super._createSourceOptions(srcOptions);
}
loader(url, params, filter) {
var self = this;
if (this.method === 'GET') {
url = url + params + '&FILTER=' + filter;
self.addWaiting();
$.ajax({
method: this.method,
url: url
}).done(function(response) {
self.responseHandler(response);
self.removeWaiting();
});
} else {
var data = JSON.parse('{"' + params.replace(/&/g, '","').replace(/=/g,'":"') + '"}',
function(key, value) { return key==="" ? value:decodeURIComponent(value) })
data.FILTER = filter;
self.addWaiting();
$.ajax({
method: this.method,
url: url,
data: data,
}).done(function(response) {
self.responseHandler(response);
self.removeWaiting();
});
}
}
responseHandler(response) {
var self = this;
var sourceFeatures = self.olLayer.getSource().getFeatures();
for(var i = 0; i < sourceFeatures.length; i++) {
self.olLayer.getSource().removeFeature(sourceFeatures[i]);
}
var format = new GML2();
var features = format.readFeatures(response);
self.olLayer.getSource().addFeatures(features);
}
}
export default GMLLayer;
| 32.578947 | 97 | 0.484883 |
1026214184f1f57f947defeb1c4e7bb267248f5c | 6,488 | js | JavaScript | app/libs/leaflet-mapbox-gl.js | hotosm/osm-analytics-fsp | b7cb48b8c4026fd59952a5df3c29e2b0c9ce93b3 | [
"BSD-3-Clause"
] | null | null | null | app/libs/leaflet-mapbox-gl.js | hotosm/osm-analytics-fsp | b7cb48b8c4026fd59952a5df3c29e2b0c9ce93b3 | [
"BSD-3-Clause"
] | 27 | 2017-06-07T05:57:22.000Z | 2017-09-13T11:03:46.000Z | app/libs/leaflet-mapbox-gl.js | hotosm/osm-analytics-fsp | b7cb48b8c4026fd59952a5df3c29e2b0c9ce93b3 | [
"BSD-3-Clause"
] | 1 | 2017-07-21T11:18:44.000Z | 2017-07-21T11:18:44.000Z | L.MapboxGL = L.Layer.extend({
options: {
updateInterval: 32
},
initialize: function (options) {
L.setOptions(this, options);
if (options.accessToken) {
mapboxgl.accessToken = options.accessToken;
} else {
//throw new Error('You should provide a Mapbox GL access token as a token option.');
}
/**
* Create a version of `fn` that only fires once every `time` millseconds.
*
* @param {Function} fn the function to be throttled
* @param {number} time millseconds required between function calls
* @param {*} context the value of `this` with which the function is called
* @returns {Function} debounced function
* @private
*/
var throttle = function (fn, time, context) {
var lock, args, wrapperFn, later;
later = function () {
// reset lock and call if queued
lock = false;
if (args) {
wrapperFn.apply(context, args);
args = false;
}
};
wrapperFn = function () {
if (lock) {
// called too soon, queue to call later
args = arguments;
} else {
// call and lock until later
fn.apply(context, arguments);
setTimeout(later, time);
lock = true;
}
};
return wrapperFn;
};
// setup throttling the update event when panning
this._throttledUpdate = throttle(L.Util.bind(this._update, this), this.options.updateInterval);
},
onAdd: function (map) {
this._map = map;
if (!this._glContainer) {
this._initContainer();
}
map._panes.tilePane.appendChild(this._glContainer);
this._initGL();
},
onRemove: function (map) {
map.getPanes().tilePane.removeChild(this._glContainer);
this._glMap.remove();
this._glMap = null;
},
getEvents: function () {
return {
move: this._throttledUpdate, // sensibly throttle updating while panning
zoomanim: this._animateZoom, // applys the zoom animation to the <canvas>
zoom: this._pinchZoom, // animate every zoom event for smoother pinch-zooming
zoomstart: this._zoomStart, // flag starting a zoom to disable panning
zoomend: this._zoomEnd // reset the gl map view at the end of a zoom
}
},
addTo: function (map) {
map.addLayer(this);
this._update();
return this;
},
setStyle: function(style) {
this.options.style = style;
if (this._glMap) {
this._glMap.setStyle(style);
}
},
_initContainer: function () {
var container = this._glContainer = L.DomUtil.create('div', 'leaflet-gl-layer');
var size = this._map.getSize();
container.style.width = size.x + 'px';
container.style.height = size.y + 'px';
},
_initGL: function () {
var center = this._map.getCenter();
var options = L.extend({}, this.options, {
container: this._glContainer,
interactive: false,
center: [center.lng, center.lat],
zoom: this._map.getZoom() - 1,
attributionControl: false
});
this._glMap = new mapboxgl.Map(options);
// allow GL base map to pan beyond min/max latitudes
this._glMap.transform.latRange = null;
// treat child <canvas> element like L.ImageOverlay
L.DomUtil.addClass(this._glMap._canvas.canvas, 'leaflet-image-layer');
L.DomUtil.addClass(this._glMap._canvas.canvas, 'leaflet-zoom-animated');
},
_update: function (e) {
// update the offset so we can correct for it later when we zoom
this._offset = this._map.containerPointToLayerPoint([0, 0]);
if (this._zooming) {
return;
}
var size = this._map.getSize(),
container = this._glContainer,
gl = this._glMap,
topLeft = this._map.containerPointToLayerPoint([0, 0]);
L.DomUtil.setPosition(container, topLeft);
var center = this._map.getCenter();
// gl.setView([center.lat, center.lng], this._map.getZoom() - 1, 0);
// calling setView directly causes sync issues because it uses requestAnimFrame
var tr = gl.transform;
tr.center = mapboxgl.LngLat.convert([center.lng, center.lat]);
tr.zoom = this._map.getZoom() - 1;
if (gl.transform.width !== size.x || gl.transform.height !== size.y) {
container.style.width = size.x + 'px';
container.style.height = size.y + 'px';
gl.resize();
} else {
gl._update();
}
},
// update the map constantly during a pinch zoom
_pinchZoom: function (e) {
this._glMap.jumpTo({
zoom: this._map.getZoom() - 1,
center: this._map.getCenter()
});
},
// borrowed from L.ImageOverlay https://github.com/Leaflet/Leaflet/blob/master/src/layer/ImageOverlay.js#L139-L144
_animateZoom: function (e) {
var scale = this._map.getZoomScale(e.zoom),
offset = this._map._latLngToNewLayerPoint(this._map.getBounds().getNorthWest(), e.zoom, e.center);
L.DomUtil.setTransform(this._glMap._canvas.canvas, offset.subtract(this._offset), scale);
},
_zoomStart: function () {
this._zooming = true;
},
_zoomEnd: function () {
var zoom = this._map.getZoom(),
center = this._map.getCenter(),
offset = this._map.latLngToContainerPoint(this._map.getBounds().getNorthWest());
// update the map on the next available frame to avoid stuttering
L.Util.requestAnimFrame(function () {
// reset the scale and offset
L.DomUtil.setTransform(this._glMap._canvas.canvas, offset, 1);
// enable panning once the gl map is ready again
this._glMap.once('moveend', L.Util.bind(function () {
this._zooming = false;
}, this));
// update the map position
this._glMap.jumpTo({
center: center,
zoom: zoom - 1
});
}, this);
}
});
L.mapboxGL = function (options) {
return new L.MapboxGL(options);
};
| 31.495146 | 118 | 0.563039 |
1026834631e8d532aa184e09cc600d516665d10a | 1,499 | js | JavaScript | src/spawn-promise.js | koush/windows-installer | b1889fa55a126598e286357a9e70831f7c1b04a1 | [
"MIT"
] | 4 | 2016-09-26T03:50:01.000Z | 2019-01-24T07:20:40.000Z | src/spawn-promise.js | koush/windows-installer | b1889fa55a126598e286357a9e70831f7c1b04a1 | [
"MIT"
] | null | null | null | src/spawn-promise.js | koush/windows-installer | b1889fa55a126598e286357a9e70831f7c1b04a1 | [
"MIT"
] | 3 | 2016-12-03T05:26:26.000Z | 2019-11-06T14:02:56.000Z | import { Promise } from 'bluebird';
import { spawn as spawnOg, execFile } from 'child_process';
const debug = require('debug')('electron-windows-installer');
// Public: Maps a process's output into an {Observable}
//
// exe - The program to execute
// params - Arguments passed to the process
//
// Returns an {Observable} with a single value, that is the output of the
// spawned process
export function spawn(exe, params, options) {
return new Promise((resolve, reject) => {
debug(`Spawning ${exe} ${params.join(' ')}`);
const proc = spawnOg(exe, params, Object.assign({
stdio: debug.enabled ? 'inherit' : ['ignore', 'ignore', 'inherit']
}, options));
proc.on('error', reject);
proc.on('close', (code) => {
if (code === 0) {
resolve();
} else {
reject(new Error(`${exe} failed with exit code: ${code}`));
}
});
});
}
export function exec(file, args, options) {
if (debug.enabled) {
debug(`Executing ${file} ${args == null ? '' : args.join(' ')}`)
}
return new Promise((resolve, reject) => {
execFile(file, args, Object.assign({maxBuffer: 4 * 1024000}, options), function (error, stdout, stderr) {
if (error == null) {
resolve(stdout)
}
else {
if (stdout.length !== 0) {
console.log(stdout)
}
if (stderr.length === 0) {
reject(error)
}
else {
reject(new Error(stderr + '\n' + error))
}
}
})
})
} | 27.759259 | 109 | 0.566378 |
10268af2ea0d7020607ce36fbe4155250f5ff22c | 17,744 | js | JavaScript | AlarmAppDemo/node_modules/sparqlee/dist/lib/functions/RegularFunctions.js | avatar-use-cases/CCO-LD-Avatar | ec98761657245e9ef33afce5caa3b107209c36e0 | [
"Apache-2.0"
] | null | null | null | AlarmAppDemo/node_modules/sparqlee/dist/lib/functions/RegularFunctions.js | avatar-use-cases/CCO-LD-Avatar | ec98761657245e9ef33afce5caa3b107209c36e0 | [
"Apache-2.0"
] | 1 | 2022-03-08T21:14:28.000Z | 2022-03-08T21:14:28.000Z | AlarmAppDemo/node_modules/sparqlee/dist/lib/functions/RegularFunctions.js | avatar-use-cases/CCO-LD-Avatar | ec98761657245e9ef33afce5caa3b107209c36e0 | [
"Apache-2.0"
] | null | null | null | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const RDFDM = require("@rdfjs/data-model");
const hash = require("create-hash");
const uuid = require("uuid");
const immutable_1 = require("immutable");
const E = require("../expressions");
const C = require("../util/Consts");
const Err = require("../util/Errors");
const P = require("../util/Parsing");
const X = require("./XPathFunctions");
const Consts_1 = require("../util/Consts");
const Transformation_1 = require("../Transformation");
const Helpers_1 = require("./Helpers");
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Begin definitions
// ----------------------------------------------------------------------------
// Operator Mapping
// https://www.w3.org/TR/sparql11-query/#OperatorMapping
// ----------------------------------------------------------------------------
const not = {
arity: 1,
overloads: Helpers_1.declare()
.onTerm1((val) => Helpers_1.bool(!val.coerceEBV()))
.collect(),
};
const unaryPlus = {
arity: 1,
overloads: Helpers_1.declare()
.onNumeric1((val) => {
return Helpers_1.number(val.typedValue, val.typeURL.value);
})
.collect(),
};
const unaryMinus = {
arity: 1,
overloads: Helpers_1.declare()
.onNumeric1((val) => {
return Helpers_1.number(-val.typedValue, val.typeURL.value);
})
.collect(),
};
const multiplication = {
arity: 2,
overloads: Helpers_1.declare()
.arithmetic((left, right) => left * right)
.collect(),
};
const division = {
arity: 2,
overloads: Helpers_1.declare()
.arithmetic((left, right) => left / right)
.onBinaryTyped(['integer', 'integer'], (left, right) => {
if (right === 0) {
throw new Err.ExpressionError('Integer division by 0');
}
return Helpers_1.number(left / right, Consts_1.TypeURL.XSD_DECIMAL);
})
.collect(),
};
const addition = {
arity: 2,
overloads: Helpers_1.declare()
.arithmetic((left, right) => left + right)
.collect(),
};
const subtraction = {
arity: 2,
overloads: Helpers_1.declare()
.arithmetic((left, right) => left - right)
.collect(),
};
// https://www.w3.org/TR/sparql11-query/#func-RDFterm-equal
const equality = {
arity: 2,
overloads: Helpers_1.declare()
.numberTest((left, right) => left === right)
.stringTest((left, right) => left.localeCompare(right) === 0)
.booleanTest((left, right) => left === right)
.dateTimeTest((left, right) => left.getTime() === right.getTime())
.set(['term', 'term'], ([left, right]) => Helpers_1.bool(RDFTermEqual(left, right)))
.collect(),
};
function RDFTermEqual(_left, _right) {
const left = _left.toRDF();
const right = _right.toRDF();
const val = left.equals(right);
if ((left.termType === 'Literal') && (right.termType === 'Literal')) {
throw new Err.RDFEqualTypeError([_left, _right]);
}
return val;
}
const inequality = {
arity: 2,
overloads: Helpers_1.declare()
.numberTest((left, right) => left !== right)
.stringTest((left, right) => left.localeCompare(right) !== 0)
.booleanTest((left, right) => left !== right)
.dateTimeTest((left, right) => left.getTime() !== right.getTime())
.set(['term', 'term'], ([left, right]) => Helpers_1.bool(!RDFTermEqual(left, right)))
.collect(),
};
const lesserThan = {
arity: 2,
overloads: Helpers_1.declare()
.numberTest((left, right) => left < right)
.stringTest((left, right) => left.localeCompare(right) === -1)
.booleanTest((left, right) => left < right)
.dateTimeTest((left, right) => left.getTime() < right.getTime())
.collect(),
};
const greaterThan = {
arity: 2,
overloads: Helpers_1.declare()
.numberTest((left, right) => left > right)
.stringTest((left, right) => left.localeCompare(right) === 1)
.booleanTest((left, right) => left > right)
.dateTimeTest((left, right) => left.getTime() > right.getTime())
.collect(),
};
const lesserThanEqual = {
arity: 2,
overloads: Helpers_1.declare()
.numberTest((left, right) => left <= right)
.stringTest((left, right) => left.localeCompare(right) !== 1)
.booleanTest((left, right) => left <= right)
.dateTimeTest((left, right) => left.getTime() <= right.getTime())
.collect(),
};
const greaterThanEqual = {
arity: 2,
overloads: Helpers_1.declare()
.numberTest((left, right) => left >= right)
.stringTest((left, right) => left.localeCompare(right) !== -1)
.booleanTest((left, right) => left >= right)
.dateTimeTest((left, right) => left.getTime() >= right.getTime())
.collect(),
};
// ----------------------------------------------------------------------------
// Functions on RDF Terms
// https://www.w3.org/TR/sparql11-query/#func-rdfTerms
// ----------------------------------------------------------------------------
const isIRI = {
arity: 1,
overloads: Helpers_1.declare()
.onTerm1((term) => Helpers_1.bool(term.termType === 'namedNode'))
.collect(),
};
const isBlank = {
arity: 1,
overloads: Helpers_1.declare()
.onTerm1((term) => Helpers_1.bool(term.termType === 'blankNode'))
.collect(),
};
const isLiteral = {
arity: 1,
overloads: Helpers_1.declare()
.onTerm1((term) => Helpers_1.bool(term.termType === 'literal'))
.collect(),
};
const isNumeric = {
arity: 1,
overloads: Helpers_1.declare()
.onNumeric1((term) => Helpers_1.bool(true))
.set(['nonlexical'], (term) => Helpers_1.bool(false))
.collect(),
};
const toString = {
arity: 1,
overloads: Helpers_1.declare()
.onTerm1((term) => Helpers_1.string(term.str()))
.collect(),
};
const lang = {
arity: 1,
overloads: Helpers_1.declare()
.onLiteral1((lit) => Helpers_1.string(lit.language || ''))
.collect(),
};
const datatype = {
arity: 1,
overloads: Helpers_1.declare()
.onLiteral1((lit) => new E.NamedNode(lit.typeURL.value))
.collect(),
};
// https://www.w3.org/TR/sparql11-query/#func-iri
const IRI = {
arity: 1,
overloads: Helpers_1.declare().unimplemented('IRI').collect(),
};
// https://www.w3.org/TR/sparql11-query/#func-bnode
// id has to be distinct over all id's in dataset
const BNODE = {
arity: [0, 1],
overloads: Helpers_1.declare()
// .set([], () => new E.BlankNode()) // TODO
.onString1Typed((val) => new E.BlankNode(val))
.collect(),
};
const STRDT = {
arity: 2,
overloads: Helpers_1.declare()
.onBinary(['string', 'namedNode'], (str, iri) => {
const lit = RDFDM.literal(str.typedValue, RDFDM.namedNode(iri.value));
return Transformation_1.transformLiteral(lit);
})
.collect(),
};
const STRLANG = {
arity: 2,
overloads: Helpers_1.declare()
.onBinaryTyped(['string', 'string'], (val, language) => new E.LangStringLiteral(val, language))
.collect(),
};
const UUID = {
arity: 0,
overloads: Helpers_1.declare()
.set([], () => new E.NamedNode(`urn:uuid:${uuid.v4()}`))
.collect(),
};
const STRUUID = {
arity: 0,
overloads: Helpers_1.declare()
.set([], () => Helpers_1.string(uuid.v4()))
.collect(),
};
// ----------------------------------------------------------------------------
// Functions on strings
// https://www.w3.org/TR/sparql11-query/#func-forms
// ----------------------------------------------------------------------------
const STRLEN = {
arity: 1,
overloads: Helpers_1.declare()
.onLiteral1((lit) => Helpers_1.number(lit.typedValue.length, Consts_1.TypeURL.XSD_INTEGER))
.collect(),
};
const SUBSTR = {
arity: [2, 3],
overloads: Helpers_1.declare().unimplemented('SUBSTR').collect(),
};
const UCASE = {
arity: 1,
overloads: Helpers_1.declare().unimplemented('UCASE').collect(),
};
const LCASE = {
arity: 1,
overloads: Helpers_1.declare().unimplemented('LCASE').collect(),
};
const STRSTARTS = {
arity: 2,
overloads: Helpers_1.declare().unimplemented('STRSTARTS').collect(),
};
const STRENDS = {
arity: 2,
overloads: Helpers_1.declare().unimplemented('STRENDS').collect(),
};
const CONTAINS = {
arity: 2,
overloads: Helpers_1.declare().unimplemented('CONTAINS').collect(),
};
const STRBEFORE = {
arity: 2,
overloads: Helpers_1.declare().unimplemented('STRBEFORE').collect(),
};
const STRAFTER = {
arity: 2,
overloads: Helpers_1.declare().unimplemented('STRAFTER').collect(),
};
const ENCODE_FOR_URI = {
arity: 1,
overloads: Helpers_1.declare().unimplemented('ENCODE_FOR_URI').collect(),
};
const CONCAT = {
arity: Infinity,
overloads: Helpers_1.declare().unimplemented('CONCAT').collect(),
};
const langmatches = {
arity: 2,
overloads: Helpers_1.declare()
.onBinaryTyped(['string', 'string'], (tag, range) => Helpers_1.bool(X.langMatches(tag, range))).collect(),
};
const regex2 = (text, pattern) => Helpers_1.bool(X.matches(text, pattern));
const regex3 = (text, pattern, flags) => Helpers_1.bool(X.matches(text, pattern, flags));
const REGEX = {
arity: [2, 3],
overloads: Helpers_1.declare()
.onBinaryTyped(['string', 'string'], regex2)
.onBinaryTyped(['langString', 'langString'], regex2)
.onTernaryTyped(['string', 'string', 'string'], regex3)
.onTernaryTyped(['langString', 'string', 'string'], regex3)
.collect(),
};
const REPLACE = {
arity: [3, 4],
overloads: Helpers_1.declare().unimplemented('REPLACE').collect(),
};
// ----------------------------------------------------------------------------
// Functions on numerics
// https://www.w3.org/TR/sparql11-query/#func-numerics
// ----------------------------------------------------------------------------
const abs = {
arity: 1,
overloads: Helpers_1.declare()
.onNumeric1((num) => Helpers_1.number(Math.abs(num.typedValue), num.typeURL.value))
.collect(),
};
const round = {
arity: 1,
overloads: Helpers_1.declare()
.onNumeric1((num) => Helpers_1.number(Math.round(num.typedValue), num.typeURL.value))
.collect(),
};
const ceil = {
arity: 1,
overloads: Helpers_1.declare()
.onNumeric1((num) => Helpers_1.number(Math.ceil(num.typedValue), num.typeURL.value))
.collect(),
};
const floor = {
arity: 1,
overloads: Helpers_1.declare()
.onNumeric1((num) => Helpers_1.number(Math.floor(num.typedValue), num.typeURL.value))
.collect(),
};
const rand = {
arity: 0,
overloads: Helpers_1.declare()
.set([], () => Helpers_1.number(Math.random(), Consts_1.TypeURL.XSD_DOUBLE))
.collect(),
};
// ----------------------------------------------------------------------------
// Functions on Dates and Times
// https://www.w3.org/TR/sparql11-query/#func-date-time
// ----------------------------------------------------------------------------
function parseDate(dateLit) {
// TODO: This is assuming datelits always have a string
return P.parseXSDDateTime(dateLit.strValue);
}
const now = {
arity: 0,
overloads: Helpers_1.declare().unimplemented('now').collect(),
};
const year = {
arity: 1,
overloads: Helpers_1.declare()
.onDateTime1((date) => Helpers_1.number(Number(parseDate(date).year), Consts_1.TypeURL.XSD_INTEGER))
.collect(),
};
const month = {
arity: 1,
overloads: Helpers_1.declare()
.onDateTime1((date) => Helpers_1.number(Number(parseDate(date).month), Consts_1.TypeURL.XSD_INTEGER))
.collect(),
};
const day = {
arity: 1,
overloads: Helpers_1.declare()
.onDateTime1((date) => Helpers_1.number(Number(parseDate(date).day), Consts_1.TypeURL.XSD_INTEGER))
.collect(),
};
const hours = {
arity: 1,
overloads: Helpers_1.declare()
.onDateTime1((date) => Helpers_1.number(Number(parseDate(date).hours), Consts_1.TypeURL.XSD_INTEGER))
.collect(),
};
const minutes = {
arity: 1,
overloads: Helpers_1.declare()
.onDateTime1((date) => Helpers_1.number(Number(parseDate(date).minutes), Consts_1.TypeURL.XSD_INTEGER))
.collect(),
};
const seconds = {
arity: 1,
overloads: Helpers_1.declare()
.onDateTime1((date) => Helpers_1.number(Number(parseDate(date).seconds), Consts_1.TypeURL.XSD_DECIMAL))
.collect(),
};
const timezone = {
arity: 1,
overloads: Helpers_1.declare()
.onDateTime1((date) => {
const duration = X.formatDayTimeDuration(parseDate(date).timezone);
if (!duration) {
throw new Err.InvalidTimezoneCall(date.strValue);
}
return new E.Literal(duration, C.make(Consts_1.TypeURL.XSD_DAYTIME_DURATION), duration);
})
.collect(),
};
const tz = {
arity: 1,
overloads: Helpers_1.declare()
.onDateTime1((date) => Helpers_1.string(parseDate(date).timezone))
.collect(),
};
// ----------------------------------------------------------------------------
// Hash functions
// https://www.w3.org/TR/sparql11-query/#func-hash
// ----------------------------------------------------------------------------
const MD5 = {
arity: 1,
overloads: Helpers_1.declare()
.onString1Typed((str) => Helpers_1.string(hash('md5').update(str).digest('hex')))
.collect(),
};
const SHA1 = {
arity: 1,
overloads: Helpers_1.declare()
.onString1Typed((str) => Helpers_1.string(hash('sha1').update(str).digest('hex')))
.collect(),
};
const SHA256 = {
arity: 1,
overloads: Helpers_1.declare()
.onString1Typed((str) => Helpers_1.string(hash('sha256').update(str).digest('hex')))
.collect(),
};
const SHA384 = {
arity: 1,
overloads: Helpers_1.declare()
.onString1Typed((str) => Helpers_1.string(hash('sha384').update(str).digest('hex')))
.collect(),
};
const SHA512 = {
arity: 1,
overloads: Helpers_1.declare()
.onString1Typed((str) => Helpers_1.string(hash('sha512').update(str).digest('hex')))
.collect(),
};
// End definitions.
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
/*
* Collect all the definitions from above into an object
*/
const _definitions = {
// --------------------------------------------------------------------------
// Operator Mapping
// https://www.w3.org/TR/sparql11-query/#OperatorMapping
// --------------------------------------------------------------------------
'!': not,
'UPLUS': unaryPlus,
'UMINUS': unaryMinus,
'*': multiplication,
'/': division,
'+': addition,
'-': subtraction,
'=': equality,
'!=': inequality,
'<': lesserThan,
'>': greaterThan,
'<=': lesserThanEqual,
'>=': greaterThanEqual,
// --------------------------------------------------------------------------
// Functions on RDF Terms
// https://www.w3.org/TR/sparql11-query/#func-rdfTerms
// --------------------------------------------------------------------------
'isiri': isIRI,
'isblank': isBlank,
'isliteral': isLiteral,
'isnumeric': isNumeric,
'str': toString,
'lang': lang,
'datatype': datatype,
'iri': IRI,
'uri': IRI,
'BNODE': BNODE,
'strdt': STRDT,
'strlang': STRLANG,
'uuid': UUID,
'struuid': STRUUID,
// --------------------------------------------------------------------------
// Functions on strings
// https://www.w3.org/TR/sparql11-query/#func-forms
// --------------------------------------------------------------------------
'strlen': STRLEN,
'substr': SUBSTR,
'ucase': UCASE,
'lcase': LCASE,
'strstarts': STRSTARTS,
'strends': STRENDS,
'contains': CONTAINS,
'strbefore': STRBEFORE,
'strafter': STRAFTER,
'encode_for_uri': ENCODE_FOR_URI,
'concat': CONCAT,
'langmatches': langmatches,
'regex': REGEX,
'replace': REPLACE,
// --------------------------------------------------------------------------
// Functions on numerics
// https://www.w3.org/TR/sparql11-query/#func-numerics
// --------------------------------------------------------------------------
'abs': abs,
'round': round,
'ceil': ceil,
'floor': floor,
'rand': rand,
// --------------------------------------------------------------------------
// Functions on Dates and Times
// https://www.w3.org/TR/sparql11-query/#func-date-time
// --------------------------------------------------------------------------
'now': now,
'year': year,
'month': month,
'day': day,
'hours': hours,
'minutes': minutes,
'seconds': seconds,
'timezone': timezone,
'tz': tz,
// --------------------------------------------------------------------------
// Hash functions
// https://www.w3.org/TR/sparql11-query/#func-hash
// --------------------------------------------------------------------------
'md5': MD5,
'sha1': SHA1,
'sha256': SHA256,
'sha384': SHA384,
'sha512': SHA512,
};
exports.definitions = immutable_1.Map(_definitions);
//# sourceMappingURL=RegularFunctions.js.map | 33.669829 | 114 | 0.52615 |