text
stringlengths 3
1.05M
|
---|
/********************************************
* REVOLUTION 5.4.2 EXTENSION - ACTIONS
* @version: 2.1.0 (15.05.2017)
* @requires jquery.themepunch.revolution.js
* @author ThemePunch
*********************************************/
(function ($) {
"use strict";
var _R = jQuery.fn.revolution,
_ISM = _R.is_mobile(),
extension = {
alias: "Actions Min JS",
name: "revolution.extensions.actions.min.js",
min_core: "5.4.5",
version: "2.1.0"
};
///////////////////////////////////////////
// EXTENDED FUNCTIONS AVAILABLE GLOBAL //
///////////////////////////////////////////
jQuery.extend(true, _R, {
checkActions: function (_nc, opt, as) {
if (_R.compare_version(extension).check === "stop") return false;
checkActions_intern(_nc, opt, as);
}
});
//////////////////////////////////////////
// - INITIALISATION OF ACTIONS - //
//////////////////////////////////////////
var checkActions_intern = function (_nc, opt, as) {
if (as)
jQuery.each(as, function (i, a) {
a.delay = parseInt(a.delay, 0) / 1000;
_nc.addClass("tp-withaction");
// LISTEN TO ESC TO EXIT FROM FULLSCREEN
if (!opt.fullscreen_esclistener) {
if (a.action == "exitfullscreen" || a.action == "togglefullscreen") {
jQuery(document).keyup(function (e) {
if (e.keyCode == 27 && jQuery('#rs-go-fullscreen').length > 0)
_nc.trigger(a.event);
});
opt.fullscreen_esclistener = true;
}
}
var tnc = a.layer == "backgroundvideo" ? jQuery(".rs-background-video-layer") : a.layer == "firstvideo" ? jQuery(".tp-revslider-slidesli").find('.tp-videolayer') : jQuery("#" + a.layer);
// NO NEED EXTRA TOGGLE CLASS HANDLING
if (jQuery.inArray(a.action, ["toggleslider", "toggle_mute_video", "toggle_global_mute_video", "togglefullscreen"]) != -1) {
_nc.data('togglelisteners', true);
}
// COLLECT ALL TOGGLE TRIGGER TO CONNECT THEM WITH TRIGGERED LAYER
switch (a.action) {
case "togglevideo":
jQuery.each(tnc, function (i, _tnc) {
_tnc = jQuery(_tnc);
var videotoggledby = _tnc.data('videotoggledby');
if (videotoggledby == undefined)
videotoggledby = [];
videotoggledby.push(_nc);
_tnc.data('videotoggledby', videotoggledby)
});
break;
case "togglelayer":
jQuery.each(tnc, function (i, _tnc) {
_tnc = jQuery(_tnc);
var layertoggledby = _tnc.data('layertoggledby');
if (layertoggledby == undefined)
layertoggledby = [];
layertoggledby.push(_nc);
_tnc.data('layertoggledby', layertoggledby);
_tnc.data('triggered_startstatus', a.layerstatus);
});
break;
case "toggle_mute_video":
jQuery.each(tnc, function (i, _tnc) {
_tnc = jQuery(_tnc);
var videomutetoggledby = _tnc.data('videomutetoggledby');
if (videomutetoggledby == undefined)
videomutetoggledby = [];
videomutetoggledby.push(_nc);
_tnc.data('videomutetoggledby', videomutetoggledby);
});
break;
case "toggle_global_mute_video":
jQuery.each(tnc, function (i, _tnc) {
_tnc = jQuery(_tnc);
var videomutetoggledby = _tnc.data('videomutetoggledby');
if (videomutetoggledby == undefined)
videomutetoggledby = [];
videomutetoggledby.push(_nc);
_tnc.data('videomutetoggledby', videomutetoggledby);
});
break;
case "toggleslider":
if (opt.slidertoggledby == undefined) opt.slidertoggledby = [];
opt.slidertoggledby.push(_nc);
break;
case "togglefullscreen":
if (opt.fullscreentoggledby == undefined) opt.fullscreentoggledby = [];
opt.fullscreentoggledby.push(_nc);
break;
}
_nc.on(a.event, function () {
if (a.event === "click" && _nc.hasClass("tp-temporarydisabled")) return false;
var tnc = a.layer == "backgroundvideo" ? jQuery(".active-revslide .slotholder .rs-background-video-layer") : a.layer == "firstvideo" ? jQuery(".active-revslide .tp-videolayer").first() : jQuery("#" + a.layer);
if (a.action == "stoplayer" || a.action == "togglelayer" || a.action == "startlayer") {
if (tnc.length > 0) {
var _ = tnc.data();
if (_.clicked_time_stamp !== undefined) {
if ((new Date().getTime() - _.clicked_time_stamp) > 150) {
clearTimeout(_.triggerdelayIn);
clearTimeout(_.triggerdelayOut);
}
}
_.clicked_time_stamp = new Date().getTime();
if (a.action == "startlayer" || (a.action == "togglelayer" && tnc.data('animdirection') != "in")) {
_.animdirection = "in";
_.triggerstate = "on";
_R.toggleState(_.layertoggledby);
if (_R.playAnimationFrame) {
clearTimeout(_.triggerdelayIn);
_.triggerdelayIn = setTimeout(function () {
_R.playAnimationFrame({
caption: tnc,
opt: opt,
frame: "frame_0",
triggerdirection: "in",
triggerframein: "frame_0",
triggerframeout: "frame_999"
});
}, (a.delay * 1000));
}
} else if (a.action == "stoplayer" || (a.action == "togglelayer" && tnc.data('animdirection') != "out")) {
_.animdirection = "out";
_.triggered = true;
_.triggerstate = "off";
if (_R.stopVideo) _R.stopVideo(tnc, opt);
_R.unToggleState(_.layertoggledby);
if (_R.endMoveCaption) {
clearTimeout(_.triggerdelayOut);
_.triggerdelayOut = setTimeout(function () {
_R.playAnimationFrame({
caption: tnc,
opt: opt,
frame: "frame_999",
triggerdirection: "out",
triggerframein: "frame_0",
triggerframeout: "frame_999"
});
}, (a.delay * 1000));
}
}
}
} else {
if (_ISM && (a.action == 'playvideo' || a.action == 'stopvideo' || a.action == 'togglevideo' || a.action == 'mutevideo' || a.action == 'unmutevideo' || a.action == 'toggle_mute_video' || a.action == 'toggle_global_mute_video')) {
actionSwitches(tnc, opt, a, _nc);
} else {
a.delay = a.delay === "NaN" || a.delay === NaN ? 0 : a.delay;
punchgs.TweenLite.delayedCall(a.delay, function () {
actionSwitches(tnc, opt, a, _nc);
}, [tnc, opt, a, _nc]);
}
}
});
switch (a.action) {
case "togglelayer":
case "startlayer":
case "playlayer":
case "stoplayer":
var tnc = jQuery("#" + a.layer),
d = tnc.data();
if (tnc.length > 0 && d !== undefined && ((d.frames !== undefined && d.frames[0].delay != "bytrigger") || (d.frames === undefined && d.start !== "bytrigger"))) {
d.triggerstate = "on";
//d.animdirection="in";
}
break;
}
})
};
function getScrollRoot() {
var html = document.documentElement, body = document.body,
cacheTop = ((typeof window.pageYOffset !== "undefined") ? window.pageYOffset : null) || body.scrollTop || html.scrollTop, // cache the window's current scroll position
root;
html.scrollTop = body.scrollTop = cacheTop + (cacheTop > 0) ? -1 : 1;
root = (html.scrollTop !== cacheTop) ? html : body;
root.scrollTop = cacheTop;
return root;
}
var actionSwitches = function (tnc, opt, a, _nc) {
switch (a.action) {
case "scrollbelow":
a.speed = a.speed !== undefined ? a.speed : 400;
a.ease = a.ease !== undefined ? a.ease : punchgs.Power2.easeOut;
_nc.addClass("tp-scrollbelowslider");
_nc.data('scrolloffset', a.offset);
_nc.data('scrolldelay', a.delay);
_nc.data('scrollspeed', a.speed);
_nc.data('scrollease', a.ease);
var off = getOffContH(opt.fullScreenOffsetContainer) || 0,
aof = parseInt(a.offset, 0) || 0;
off = off - aof || 0;
opt.scrollRoot = jQuery(document);
var sobj = {_y: opt.scrollRoot.scrollTop()};
punchgs.TweenLite.to(sobj, a.speed / 1000, {
_y: (opt.c.offset().top + (jQuery(opt.li[0]).height()) - off),
ease: a.ease,
onUpdate: function () {
opt.scrollRoot.scrollTop(sobj._y)
}
});
break;
case "callback":
eval(a.callback);
break;
case "jumptoslide":
switch (a.slide.toLowerCase()) {
case "+1":
case "next":
opt.sc_indicator = "arrow";
_R.callingNewSlide(opt.c, 1);
break;
case "previous":
case "prev":
case "-1":
opt.sc_indicator = "arrow";
_R.callingNewSlide(opt.c, -1);
break;
default:
var ts = jQuery.isNumeric(a.slide) ? parseInt(a.slide, 0) : a.slide;
_R.callingNewSlide(opt.c, ts);
break;
}
break;
case "simplelink":
window.open(a.url, a.target);
break;
case "toggleslider":
opt.noloopanymore = 0;
if (opt.sliderstatus == "playing") {
opt.c.revpause();
opt.forcepause_viatoggle = true;
_R.unToggleState(opt.slidertoggledby);
}
else {
opt.forcepause_viatoggle = false;
opt.c.revresume();
_R.toggleState(opt.slidertoggledby);
}
break;
case "pauseslider":
opt.c.revpause();
_R.unToggleState(opt.slidertoggledby);
break;
case "playslider":
opt.noloopanymore = 0;
opt.c.revresume();
_R.toggleState(opt.slidertoggledby);
break;
case "playvideo":
if (tnc.length > 0)
_R.playVideo(tnc, opt);
break;
case "stopvideo":
if (tnc.length > 0)
if (_R.stopVideo) _R.stopVideo(tnc, opt);
break;
case "togglevideo":
if (tnc.length > 0)
if (!_R.isVideoPlaying(tnc, opt))
_R.playVideo(tnc, opt);
else if (_R.stopVideo) _R.stopVideo(tnc, opt);
break;
case "mutevideo":
if (tnc.length > 0)
_R.muteVideo(tnc, opt);
break;
case "unmutevideo":
if (tnc.length > 0)
if (_R.unMuteVideo) _R.unMuteVideo(tnc, opt);
break;
case "toggle_mute_video":
if (tnc.length > 0)
if (_R.isVideoMuted(tnc, opt)) {
_R.unMuteVideo(tnc, opt);
} else {
if (_R.muteVideo) _R.muteVideo(tnc, opt);
}
_nc.toggleClass('rs-toggle-content-active');
break;
case "toggle_global_mute_video":
if (opt.globalmute === true) {
opt.globalmute = false;
if (opt.playingvideos != undefined && opt.playingvideos.length > 0) {
jQuery.each(opt.playingvideos, function (i, _nc) {
if (_R.unMuteVideo) _R.unMuteVideo(_nc, opt);
});
}
} else {
opt.globalmute = true;
if (opt.playingvideos != undefined && opt.playingvideos.length > 0) {
jQuery.each(opt.playingvideos, function (i, _nc) {
if (_R.muteVideo) _R.muteVideo(_nc, opt);
});
}
}
_nc.toggleClass('rs-toggle-content-active');
break;
case "simulateclick":
if (tnc.length > 0) tnc.click();
break;
case "toggleclass":
if (tnc.length > 0)
if (!tnc.hasClass(a.classname))
tnc.addClass(a.classname);
else
tnc.removeClass(a.classname);
break;
case "gofullscreen":
case "exitfullscreen":
case "togglefullscreen":
if (jQuery('.rs-go-fullscreen').length > 0 && (a.action == "togglefullscreen" || a.action == "exitfullscreen")) {
jQuery('.rs-go-fullscreen').removeClass("rs-go-fullscreen");
var gf = opt.c.closest('.forcefullwidth_wrapper_tp_banner').length > 0 ? opt.c.closest('.forcefullwidth_wrapper_tp_banner') : opt.c.closest('.rev_slider_wrapper');
opt.minHeight = opt.oldminheight;
opt.infullscreenmode = false;
opt.c.revredraw();
jQuery(window).trigger("resize");
_R.unToggleState(opt.fullscreentoggledby);
} else if (jQuery('.rs-go-fullscreen').length == 0 && (a.action == "togglefullscreen" || a.action == "gofullscreen")) {
var gf = opt.c.closest('.forcefullwidth_wrapper_tp_banner').length > 0 ? opt.c.closest('.forcefullwidth_wrapper_tp_banner') : opt.c.closest('.rev_slider_wrapper');
gf.addClass("rs-go-fullscreen");
opt.oldminheight = opt.minHeight;
opt.minHeight = jQuery(window).height();
opt.infullscreenmode = true;
opt.c.revredraw();
jQuery(window).trigger("resize");
_R.toggleState(opt.fullscreentoggledby);
}
break;
default:
var obj = {};
obj.event = a;
obj.layer = _nc;
opt.c.trigger('layeraction', [obj]);
break;
}
};
var getOffContH = function (c) {
if (c == undefined) return 0;
if (c.split(',').length > 1) {
var oc = c.split(","),
a = 0;
if (oc)
jQuery.each(oc, function (index, sc) {
if (jQuery(sc).length > 0)
a = a + jQuery(sc).outerHeight(true);
});
return a;
} else {
return jQuery(c).height();
}
return 0;
}
})(jQuery); |
import MonAttr from './MonAttr'
export default MonAttr
|
# SPDX-License-Identifier: Apache-2.0
# Copyright Contributors to the Rez Project
"""
Zsh shell
"""
import os
import os.path
from rez.utils.platform_ import platform_
from rezplugins.shell.sh import SH
from rez import module_root_path
class Zsh(SH):
rcfile_arg = '--rcs'
norc_arg = '--no-rcs'
@classmethod
def name(cls):
return 'zsh'
@classmethod
def startup_capabilities(cls, rcfile=False, norc=False, stdin=False,
command=False):
if norc:
cls._overruled_option('rcfile', 'norc', rcfile)
rcfile = False
if command is not None:
cls._overruled_option('stdin', 'command', stdin)
cls._overruled_option('rcfile', 'command', rcfile)
stdin = False
rcfile = False
if stdin:
cls._overruled_option('rcfile', 'stdin', rcfile)
rcfile = False
return (rcfile, norc, stdin, command)
@classmethod
def get_startup_sequence(cls, rcfile, norc, stdin, command):
rcfile, norc, stdin, command = \
cls.startup_capabilities(rcfile, norc, stdin, command)
files = []
envvar = None
do_rcfile = False
if rcfile or norc:
do_rcfile = True
if rcfile and os.path.exists(os.path.expanduser(rcfile)):
files.append(rcfile)
else:
for file_ in (
"~/.zprofile",
"~/.zlogin",
"~/.zshrc",
"~/.zshenv"):
if os.path.exists(os.path.expanduser(file_)):
files.append(file_)
bind_files = [
"~/.zprofile",
"~/.zshrc"
]
return dict(
stdin=stdin,
command=command,
do_rcfile=do_rcfile,
envvar=envvar,
files=files,
bind_files=bind_files,
source_bind_files=True
)
def _bind_interactive_rez(self):
super(Zsh, self)._bind_interactive_rez()
completion = os.path.join(module_root_path, "completion", "complete.zsh")
self.source(completion)
def register_plugin():
if platform_.name != "windows":
return Zsh
|
import { Utils } from "./Utils.js";
import { UndockInitiator } from "./UndockInitiator.js";
import { ContainerType } from "./ContainerType.js";
import { EventHandler } from "./EventHandler.js";
import { PanelType } from "./enums/PanelType.js";
/**
* This dock container wraps the specified element on a panel frame with a title bar and close button
*/
export class PanelContainer {
constructor(elementContent, dockManager, title, panelType, hideCloseButton) {
if (!title)
title = 'Panel';
if (!panelType)
panelType = PanelType.panel;
this.panelType = panelType;
this.elementContent = Object.assign(elementContent, { _dockSpawnPanelContainer: this });
this.dockManager = dockManager;
this.title = title;
this.containerType = ContainerType.panel;
this.icon = null;
this.minimumAllowedChildNodes = 0;
this._floatingDialog = undefined;
this.isDialog = false;
this._canUndock = dockManager._undockEnabled;
this.eventListeners = [];
this._hideCloseButton = hideCloseButton;
this._initialize();
}
canUndock(state) {
this._canUndock = state;
this.undockInitiator.enabled = state;
this.eventListeners.forEach((listener) => {
if (listener.onDockEnabled) {
listener.onDockEnabled({ self: this, state: state });
}
});
}
addListener(listener) {
this.eventListeners.push(listener);
}
removeListener(listener) {
this.eventListeners.splice(this.eventListeners.indexOf(listener), 1);
}
get floatingDialog() {
return this._floatingDialog;
}
set floatingDialog(value) {
this._floatingDialog = value;
let canUndock = (this._floatingDialog === undefined);
this.undockInitiator.enabled = canUndock;
}
static loadFromState(state, dockManager) {
let elementName = state.element;
let elementContent = document.getElementById(elementName);
if (elementContent === null) {
return null;
}
let ret = new PanelContainer(elementContent, dockManager);
ret.loadState(state);
return ret;
}
saveState(state) {
state.element = this.elementContent.id;
state.width = this.width;
state.height = this.height;
state.canUndock = this._canUndock;
state.hideCloseButton = this._hideCloseButton;
state.panelType = this.panelType;
}
loadState(state) {
this.width = state.width;
this.height = state.height;
this.state = { width: state.width, height: state.height };
this.canUndock(state.canUndock);
this.hideCloseButton(state.hideCloseButton);
this.panelType = state.panelType;
}
setActiveChild( /*child*/) {
}
get containerElement() {
return this.elementPanel;
}
_initialize() {
this.name = Utils.getNextId('panel_');
this.elementPanel = document.createElement('div');
this.elementPanel.tabIndex = 0;
this.elementTitle = document.createElement('div');
this.elementTitleText = document.createElement('div');
this.elementContentHost = document.createElement('div');
this.elementButtonClose = document.createElement('div');
this.elementPanel.appendChild(this.elementTitle);
this.elementTitle.appendChild(this.elementTitleText);
this.elementTitle.appendChild(this.elementButtonClose);
this.elementButtonClose.classList.add('panel-titlebar-button-close');
this.elementButtonClose.style.display = this._hideCloseButton ? 'none' : 'block';
this.elementPanel.appendChild(this.elementContentHost);
this.elementPanel.classList.add('panel-base');
this.elementTitle.classList.add('panel-titlebar');
this.elementTitle.classList.add('disable-selection');
this.elementTitleText.classList.add('panel-titlebar-text');
this.elementContentHost.classList.add('panel-content');
// set the size of the dialog elements based on the panel's size
let panelWidth = this.elementContent.clientWidth;
let panelHeight = this.elementContent.clientHeight;
let titleHeight = this.elementTitle.clientHeight;
this._setPanelDimensions(panelWidth, panelHeight + titleHeight);
if (!this._hideCloseButton) {
this.closeButtonClickedHandler =
new EventHandler(this.elementButtonClose, 'click', this.onCloseButtonClicked.bind(this));
this.closeButtonTouchedHandler =
new EventHandler(this.elementButtonClose, 'touchstart', this.onCloseButtonClicked.bind(this));
}
Utils.removeNode(this.elementContent);
this.elementContentHost.appendChild(this.elementContent);
// Extract the title from the content element's attribute
let contentTitle = this.elementContent.dataset.panelCaption;
let contentIcon = this.elementContent.dataset.panelIcon;
if (contentTitle)
this.title = contentTitle;
if (contentIcon)
this.icon = contentIcon;
this._updateTitle();
this.undockInitiator = new UndockInitiator(this.elementTitle, this.performUndockToDialog.bind(this));
delete this.floatingDialog;
this.mouseDownHandler = new EventHandler(this.elementPanel, 'mousedown', this.onMouseDown.bind(this));
this.touchDownHandler = new EventHandler(this.elementPanel, 'touchstart', this.onMouseDown.bind(this));
this.elementContent.removeAttribute("hidden");
}
onMouseDown() {
this.dockManager.activePanel = this;
}
hideCloseButton(state) {
this._hideCloseButton = state;
this.elementButtonClose.style.display = state ? 'none' : 'block';
this.eventListeners.forEach((listener) => {
if (listener.onHideCloseButton) {
listener.onHideCloseButton({ self: this, state: state });
}
});
}
destroy() {
if (this.mouseDownHandler) {
this.mouseDownHandler.cancel();
delete this.mouseDownHandler;
}
if (this.touchDownHandler) {
this.touchDownHandler.cancel();
delete this.touchDownHandler;
}
Utils.removeNode(this.elementPanel);
if (this.closeButtonClickedHandler) {
this.closeButtonClickedHandler.cancel();
delete this.closeButtonClickedHandler;
}
if (this.closeButtonTouchedHandler) {
this.closeButtonTouchedHandler.cancel();
delete this.closeButtonTouchedHandler;
}
}
/**
* Undocks the panel and and converts it to a dialog box
*/
performUndockToDialog(e, dragOffset) {
this.isDialog = true;
this.undockInitiator.enabled = false;
this.elementContent.style.display = "block";
this.elementPanel.style.position = "";
return this.dockManager.requestUndockToDialog(this, e, dragOffset);
}
/**
* Closes the panel
*/
performClose() {
this.isDialog = true;
this.undockInitiator.enabled = false;
this.elementContent.style.display = "block";
this.elementPanel.style.position = "";
this.dockManager.requestClose(this);
}
/**
* Undocks the container and from the layout hierarchy
* The container would be removed from the DOM
*/
performUndock() {
this.undockInitiator.enabled = false;
this.dockManager.requestUndock(this);
}
;
prepareForDocking() {
this.isDialog = false;
this.undockInitiator.enabled = this._canUndock;
}
get width() {
return this._cachedWidth;
}
set width(value) {
if (value !== this._cachedWidth) {
this._cachedWidth = value;
this.elementPanel.style.width = value + 'px';
}
}
get height() {
return this._cachedHeight;
}
set height(value) {
if (value !== this._cachedHeight) {
this._cachedHeight = value;
this.elementPanel.style.height = value + 'px';
}
}
resize(width, height) {
// if (this._cachedWidth === width && this._cachedHeight === height)
// {
// // Already in the desired size
// return;
// }
this._setPanelDimensions(width, height);
this._cachedWidth = width;
this._cachedHeight = height;
try {
if (this.elementContent != undefined && (typeof this.elementContent.resizeHandler == 'function'))
this.elementContent.resizeHandler(width, height - this.elementTitle.clientHeight);
}
catch (err) {
console.log("error calling resizeHandler:", err, " elt:", this.elementContent);
}
}
_setPanelDimensions(width, height) {
this.elementTitle.style.width = width + 'px';
this.elementContentHost.style.width = width + 'px';
this.elementContent.style.width = width + 'px';
this.elementPanel.style.width = width + 'px';
let titleBarHeight = this.elementTitle.clientHeight;
let contentHeight = height - titleBarHeight;
this.elementContentHost.style.height = contentHeight + 'px';
this.elementContent.style.height = contentHeight + 'px';
this.elementPanel.style.height = height + 'px';
}
setTitle(title) {
this.title = title;
this._updateTitle();
if (this.onTitleChanged)
this.onTitleChanged(this, title);
}
setTitleIcon(icon) {
this.icon = icon;
this._updateTitle();
if (this.onTitleChanged)
this.onTitleChanged(this, this.title);
}
setCloseIconTemplate(closeIconTemplate) {
this.elementButtonClose.innerHTML = closeIconTemplate;
}
_updateTitle() {
if (this.icon !== null) {
this.elementTitleText.innerHTML = '<img class="panel-titlebar-icon" src="' + this.icon + '"><span>' + this.title + '</span>';
return;
}
this.elementTitleText.innerHTML = this.title;
}
getRawTitle() {
return this.elementTitleText.innerHTML;
}
performLayout(children, relayoutEvenIfEqual) {
}
onCloseButtonClicked() {
this.close();
}
close() {
if (this.isDialog) {
if (this.floatingDialog) {
//this.floatingDialog.hide();
this.floatingDialog.close(); // fires onClose
}
}
else {
this.performClose();
this.dockManager.notifyOnClosePanel(this);
}
}
}
//# sourceMappingURL=PanelContainer.js.map |
var gapi=window.gapi=window.gapi||{};gapi._bs=new Date().getTime();(function(){var f=window,h=document,m=f.location,n=function(){},u=/\[native code\]/,w=function(a,b,c){return a[b]=a[b]||c},A=function(a){for(var b=0;b<this.length;b++)if(this[b]===a)return b;return-1},B=function(a){a=a.sort();for(var b=[],c=void 0,d=0;d<a.length;d++){var e=a[d];e!=c&&b.push(e);c=e}return b},C=function(){var a;if((a=Object.create)&&u.test(a))a=a(null);else{a={};for(var b in a)a[b]=void 0}return a},D=w(f,"gapi",{});var E;E=w(f,"___jsl",C());w(E,"I",0);w(E,"hel",10);var F=function(){var a=m.href,b;if(E.dpo)b=E.h;else{b=E.h;var c=RegExp("([#].*&|[#])jsh=([^&#]*)","g"),d=RegExp("([?#].*&|[?#])jsh=([^&#]*)","g");if(a=a&&(c.exec(a)||d.exec(a)))try{b=decodeURIComponent(a[2])}catch(e){}}return b},G=function(a){var b=w(E,"PQ",[]);E.PQ=[];var c=b.length;if(0===c)a();else for(var d=0,e=function(){++d===c&&a()},g=0;g<c;g++)b[g](e)},H=function(a){return w(w(E,"H",C()),a,C())};var J=w(E,"perf",C()),K=w(J,"g",C()),aa=w(J,"i",C());w(J,"r",[]);C();C();var L=function(a,b,c){var d=J.r;"function"===typeof d?d(a,b,c):d.push([a,b,c])},N=function(a,b,c){b&&0<b.length&&(b=M(b),c&&0<c.length&&(b+="___"+M(c)),28<b.length&&(b=b.substr(0,28)+(b.length-28)),c=b,b=w(aa,"_p",C()),w(b,c,C())[a]=(new Date).getTime(),L(a,"_p",c))},M=function(a){return a.join("__").replace(/\./g,"_").replace(/\-/g,"_").replace(/\,/g,"_")};var O=C(),P=[],Q=function(a){throw Error("Bad hint"+(a?": "+a:""));};P.push(["jsl",function(a){for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b)){var c=a[b];"object"==typeof c?E[b]=w(E,b,[]).concat(c):w(E,b,c)}if(b=a.u)a=w(E,"us",[]),a.push(b),(b=/^https:(.*)$/.exec(b))&&a.push("http:"+b[1])}]);var ba=/^(\/[a-zA-Z0-9_\-]+)+$/,ca=/^[a-zA-Z0-9\-_\.,!]+$/,da=/^gapi\.loaded_[0-9]+$/,ea=/^[a-zA-Z0-9,._-]+$/,ia=function(a,b,c,d){var e=a.split(";"),g=e.shift(),l=O[g],k=null;l?k=l(e,b,c,d):Q("no hint processor for: "+g);k||Q("failed to generate load url");b=k;c=b.match(fa);(d=b.match(ga))&&1===d.length&&ha.test(b)&&c&&1===c.length||Q("failed sanity: "+a);return k},ka=function(a,b,c,d){a=ja(a);da.test(c)||Q("invalid_callback");b=R(b);d=d&&d.length?R(d):null;var e=function(a){return encodeURIComponent(a).replace(/%2C/g,
",")};return[encodeURIComponent(a.g).replace(/%2C/g,",").replace(/%2F/g,"/"),"/k=",e(a.version),"/m=",e(b),d?"/exm="+e(d):"","/rt=j/sv=1/d=1/ed=1",a.a?"/am="+e(a.a):"",a.c?"/rs="+e(a.c):"",a.f?"/t="+e(a.f):"","/cb=",e(c)].join("")},ja=function(a){"/"!==a.charAt(0)&&Q("relative path");for(var b=a.substring(1).split("/"),c=[];b.length;){a=b.shift();if(!a.length||0==a.indexOf("."))Q("empty/relative directory");else if(0<a.indexOf("=")){b.unshift(a);break}c.push(a)}a={};for(var d=0,e=b.length;d<e;++d){var g=
b[d].split("="),l=decodeURIComponent(g[0]),k=decodeURIComponent(g[1]);2==g.length&&l&&k&&(a[l]=a[l]||k)}b="/"+c.join("/");ba.test(b)||Q("invalid_prefix");c=S(a,"k",!0);d=S(a,"am");e=S(a,"rs");a=S(a,"t");return{g:b,version:c,a:d,c:e,f:a}},R=function(a){for(var b=[],c=0,d=a.length;c<d;++c){var e=a[c].replace(/\./g,"_").replace(/-/g,"_");ea.test(e)&&b.push(e)}return b.join(",")},S=function(a,b,c){a=a[b];!a&&c&&Q("missing: "+b);if(a){if(ca.test(a))return a;Q("invalid: "+b)}return null},ha=/^https?:\/\/[a-z0-9_.-]+\.google\.com(:\d+)?\/[a-zA-Z0-9_.,!=\-\/]+$/,
ga=/\/cb=/g,fa=/\/\//g,la=function(){var a=F();if(!a)throw Error("Bad hint");return a};O.m=function(a,b,c,d){(a=a[0])||Q("missing_hint");return"https://apis.google.com"+ka(a,b,c,d)};var U=decodeURI("%73cript"),V=function(a,b){for(var c=[],d=0;d<a.length;++d){var e=a[d];e&&0>A.call(b,e)&&c.push(e)}return c},ma=function(a){"loading"!=h.readyState?W(a):h.write("<"+U+' src="'+encodeURI(a)+'"></'+U+">")},W=function(a){var b=h.createElement(U);b.setAttribute("src",a);b.async="true";(a=h.getElementsByTagName(U)[0])?a.parentNode.insertBefore(b,a):(h.head||h.body||h.documentElement).appendChild(b)},na=function(a,b){var c=b&&b._c;if(c)for(var d=0;d<P.length;d++){var e=P[d][0],g=P[d][1];
g&&Object.prototype.hasOwnProperty.call(c,e)&&g(c[e],a,b)}},oa=function(a,b,c){X(function(){var c;c=b===F()?w(D,"_",C()):C();c=w(H(b),"_",c);a(c)},c)},Z=function(a,b){var c=b||{};"function"==typeof b&&(c={},c.callback=b);na(a,c);var d=a?a.split(":"):[],e=c.h||la(),g=w(E,"ah",C());if(g["::"]&&d.length){for(var l=[],k=null;k=d.shift();){var q=k.split("."),q=g[k]||g[q[1]&&"ns:"+q[0]||""]||e,x=l.length&&l[l.length-1]||null,y=x;x&&x.hint==q||(y={hint:q,b:[]},l.push(y));y.b.push(k)}var z=l.length;if(1<
z){var v=c.callback;v&&(c.callback=function(){0==--z&&v()})}for(;d=l.shift();)Y(d.b,c,d.hint)}else Y(d||[],c,e)},Y=function(a,b,c){a=B(a)||[];var d=b.callback,e=b.config,g=b.timeout,l=b.ontimeout,k=b.onerror,q=void 0;"function"==typeof k&&(q=k);var x=null,y=!1;if(g&&!l||!g&&l)throw"Timeout requires both the timeout parameter and ontimeout parameter to be set";var k=w(H(c),"r",[]).sort(),z=w(H(c),"L",[]).sort(),v=[].concat(k),T=function(a,b){if(y)return 0;f.clearTimeout(x);z.push.apply(z,p);var d=
((D||{}).config||{}).update;d?d(e):e&&w(E,"cu",[]).push(e);if(b){N("me0",a,v);try{oa(b,c,q)}finally{N("me1",a,v)}}return 1};0<g&&(x=f.setTimeout(function(){y=!0;l()},g));var p=V(a,z);if(p.length){var p=V(a,k),r=w(E,"CP",[]),t=r.length;r[t]=function(a){if(!a)return 0;N("ml1",p,v);var b=function(b){r[t]=null;T(p,a)&&G(function(){d&&d();b()})},c=function(){var a=r[t+1];a&&a()};0<t&&r[t-1]?r[t]=function(){b(c)}:b(c)};if(p.length){var I="loaded_"+E.I++;D[I]=function(a){r[t](a);D[I]=null};a=ia(c,p,"gapi."+
I,k);k.push.apply(k,p);N("ml0",p,v);b.sync||f.___gapisync?ma(a):W(a)}else r[t](n)}else T(p)&&d&&d()};var X=function(a,b){if(E.hee&&0<E.hel)try{return a()}catch(c){b&&b(c),E.hel--,Z("debug_error",function(){try{window.___jsl.hefn(c)}catch(d){throw c;}})}else try{return a()}catch(c){throw b&&b(c),c;}};D.load=function(a,b){return X(function(){return Z(a,b)})};K.bs0=window.gapi._bs||(new Date).getTime();L("bs0");K.bs1=(new Date).getTime();L("bs1");delete window.gapi._bs;})();
gapi.load("",{callback:window["gapi_onload"],_c:{"jsl":{"ci":{"deviceType":"desktop","oauth-flow":{"authUrl":"https://accounts.google.com/o/oauth2/auth","proxyUrl":"https://accounts.google.com/o/oauth2/postmessageRelay","disableOpt":true,"idpIframeUrl":"https://accounts.google.com/o/oauth2/iframe","usegapi":false},"debug":{"reportExceptionRate":0.05,"forceIm":false,"rethrowException":false,"host":"https://apis.google.com"},"lexps":[81,97,99,122,123,30,79,127],"enableMultilogin":true,"googleapis.config":{"auth":{"useFirstPartyAuthV2":true}},"isPlusUser":true,"inline":{"css":1},"disableRealtimeCallback":false,"drive_share":{"skipInitCommand":true},"csi":{"rate":0.01},"report":{"apiRate":{"gapi\\.signin\\..*":0.05,"gapi\\.signin2\\..*":0.05},"apis":["iframes\\..*","gadgets\\..*","gapi\\.appcirclepicker\\..*","gapi\\.auth\\..*","gapi\\.client\\..*"],"rate":0.001,"host":"https://apis.google.com"},"client":{"headers":{"request":["Accept","Accept-Language","Authorization","Cache-Control","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-MD5","Content-Range","Content-Type","Date","GData-Version","Host","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Origin","OriginToken","Pragma","Range","Slug","Transfer-Encoding","Want-Digest","X-ClientDetails","X-GData-Client","X-GData-Key","X-Goog-AuthUser","X-Goog-PageId","X-Goog-Encode-Response-If-Executable","X-Goog-Correlation-Id","X-Goog-Request-Info","X-Goog-Experiments","x-goog-iam-authority-selector","x-goog-iam-authorization-token","X-Goog-Spatula","X-Goog-Upload-Command","X-Goog-Upload-Content-Disposition","X-Goog-Upload-Content-Length","X-Goog-Upload-Content-Type","X-Goog-Upload-File-Name","X-Goog-Upload-Offset","X-Goog-Upload-Protocol","X-Goog-Visitor-Id","X-HTTP-Method-Override","X-JavaScript-User-Agent","X-Pan-Versionid","X-Origin","X-Referer","X-Upload-Content-Length","X-Upload-Content-Type","X-Use-HTTP-Status-Code-Override","X-Ios-Bundle-Identifier","X-Android-Package","X-YouTube-VVT","X-YouTube-Page-CL","X-YouTube-Page-Timestamp"],"response":["Digest","Cache-Control","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-MD5","Content-Range","Content-Type","Date","ETag","Expires","Last-Modified","Location","Pragma","Range","Server","Transfer-Encoding","WWW-Authenticate","Vary","Unzipped-Content-MD5","X-Goog-Generation","X-Goog-Metageneration","X-Goog-Safety-Content-Type","X-Goog-Safety-Encoding","X-Google-Trace","X-Goog-Upload-Chunk-Granularity","X-Goog-Upload-Control-URL","X-Goog-Upload-Size-Received","X-Goog-Upload-Status","X-Goog-Upload-URL","X-Goog-Diff-Download-Range","X-Goog-Hash","X-Goog-Updated-Authorization","X-Server-Object-Version","X-Guploader-Customer","X-Guploader-Upload-Result","X-Guploader-Uploadid","X-Google-Gfe-Backend-Request-Cost"]},"rms":"migrated","cors":false},"isLoggedIn":true,"signInDeprecation":{"rate":0.0},"include_granted_scopes":true,"llang":"en","iframes":{"youtube":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/youtube?usegapi\u003d1","methods":["scroll","openwindow"]},"ytsubscribe":{"url":"https://www.youtube.com/subscribe_embed?usegapi\u003d1"},"plus_circle":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/plus/circle?usegapi\u003d1"},"plus_share":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/+1/sharebutton?plusShare\u003dtrue\u0026usegapi\u003d1"},"rbr_s":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/render/recobarsimplescroller"},"udc_webconsentflow":{"params":{"url":""},"url":"https://www.google.com/settings/webconsent?usegapi\u003d1"},":source:":"3p","playemm":{"url":"https://play.google.com/work/embedded/search?usegapi\u003d1\u0026usegapi\u003d1"},"blogger":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/blogger?usegapi\u003d1","methods":["scroll","openwindow"]},"evwidget":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/events/widget?usegapi\u003d1"},"partnersbadge":{"url":"https://www.gstatic.com/partners/badge/templates/badge.html?usegapi\u003d1"},"surveyoptin":{"url":"https://www.google.com/shopping/customerreviews/optin?usegapi\u003d1"},":socialhost:":"https://apis.google.com","shortlists":{"url":""},"hangout":{"url":"https://talkgadget.google.com/:session_prefix:talkgadget/_/widget"},"plus_followers":{"params":{"url":""},"url":":socialhost:/_/im/_/widget/render/plus/followers?usegapi\u003d1"},"post":{"params":{"url":""},"url":":socialhost:/:session_prefix::im_prefix:_/widget/render/post?usegapi\u003d1"},":gplus_url:":"https://plus.google.com","signin":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/signin?usegapi\u003d1","methods":["onauth"]},"rbr_i":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/render/recobarinvitation"},"donation":{"url":"https://onetoday.google.com/home/donationWidget?usegapi\u003d1"},"share":{"url":":socialhost:/:session_prefix::im_prefix:_/widget/render/share?usegapi\u003d1"},"plusone":{"params":{"count":"","size":"","url":""},"url":":socialhost:/:session_prefix::se:_/+1/fastbutton?usegapi\u003d1"},"comments":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/comments?usegapi\u003d1","methods":["scroll","openwindow"]},":im_socialhost:":"https://plus.googleapis.com","backdrop":{"url":"https://clients3.google.com/cast/chromecast/home/widget/backdrop?usegapi\u003d1"},"visibility":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/visibility?usegapi\u003d1"},"autocomplete":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/autocomplete"},"additnow":{"url":"https://apis.google.com/additnow/additnow.html?usegapi\u003d1","methods":["launchurl"]},":signuphost:":"https://plus.google.com","ratingbadge":{"url":"https://www.google.com/shopping/customerreviews/badge?usegapi\u003d1"},"appcirclepicker":{"url":":socialhost:/:session_prefix:_/widget/render/appcirclepicker"},"follow":{"url":":socialhost:/:session_prefix:_/widget/render/follow?usegapi\u003d1"},"community":{"url":":ctx_socialhost:/:session_prefix::im_prefix:_/widget/render/community?usegapi\u003d1"},"sharetoclassroom":{"url":"https://www.gstatic.com/classroom/sharewidget/widget_stable.html?usegapi\u003d1"},"ytshare":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/ytshare?usegapi\u003d1"},"plus":{"url":":socialhost:/:session_prefix:_/widget/render/badge?usegapi\u003d1"},"family_creation":{"params":{"url":""},"url":"https://families.google.com/webcreation?usegapi\u003d1\u0026usegapi\u003d1"},"commentcount":{"url":":socialhost:/:session_prefix:_/widget/render/commentcount?usegapi\u003d1"},"configurator":{"url":":socialhost:/:session_prefix:_/plusbuttonconfigurator?usegapi\u003d1"},"zoomableimage":{"url":"https://ssl.gstatic.com/microscope/embed/"},"savetowallet":{"url":"https://clients5.google.com/s2w/o/savetowallet"},"person":{"url":":socialhost:/:session_prefix:_/widget/render/person?usegapi\u003d1"},"savetodrive":{"url":"https://drive.google.com/savetodrivebutton?usegapi\u003d1","methods":["save"]},"page":{"url":":socialhost:/:session_prefix:_/widget/render/page?usegapi\u003d1"},"card":{"url":":socialhost:/:session_prefix:_/hovercard/card"}}},"h":"m;/_/scs/apps-static/_/js/k\u003doz.gapi.en.JQHX-0gt2nQ.O/m\u003d__features__/am\u003dAQ/rt\u003dj/d\u003d1/rs\u003dAGLTcCMxCHba3O2oARJ4ftjU5nmghOlA8w","u":"https://apis.google.com/js/api.js","hee":true,"fp":"d909a679f79dfb16c0b7588b1035a2db2a09fbe4","dpo":false},"fp":"d909a679f79dfb16c0b7588b1035a2db2a09fbe4","annotation":["interactivepost","recobar","signin2","autocomplete","profile"],"bimodal":["signin","share"]}}); |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const client_1 = require("./client");
let count = 0;
const config_1 = require("./config");
let exchangeName = config_1.config.exchangeName;
let test = function () {
return __awaiter(this, void 0, void 0, function* () {
yield client_1.mq.init();
yield client_1.mq.subscribe(exchangeName, (msg) => {
console.log(`进程F---------收到消息内容为:==>${msg}`);
return new Promise((resolve, reject) => {
if (msg) {
resolve(msg);
}
else {
reject({ error: 1, msg: "未收到" });
}
});
});
});
};
test();
|
var friendsList = {
"name":"Ahmed",
"photo":"https://placem.at/things?w=250&random=some_seed",
"scores":[
5,
1,
4,
4,
5,
1,
2,
5,
4,
1
],
"name":"Amy",
"photo":"https://placem.at/things?w=250&random=some_seed",
"scores":[
3,
2,
6,
4,
5,
1,
2,
5,
4,
1
]
}
module.exports = friendsList; |
var myCity = angular.module('myCity', ['ngRoute', 'ngResource'])
//
// .controller('CityCtrl', ['$scope', 'Citys','$route', function ($scope, Citys, $route) {
// Citys.get(function(data){
// $scope.citys =data.citys;
// $scope.myCity = $scope.citys[0];
//
// })
// }])
.controller('CityCtrl', function ($scope, $stateParams, $state, Citys) {
var getCities = Citys.all();
getCities.success(function (response) {
$scope.citys = response;
});
})
// .factory('Citys', function ($resource) {
// return $resource('api/citys/:id', {id: "@_id"}, {
// update: {method: "PUT", params: {id: "@id"}},
// })
// })
.factory("Citys", function ($http) {
return{
all: function () {
var request = $http({method: 'GET', url: 'api/citys'});
return request;
},
create: function (data) {
var request = $http({method: 'GET', url: 'api/citys/create', params: data});
return request;
},
get: function (id) {
var request = $http.get('api/citys/' + id);
return request;
},
update: function (id, data) {
var request = $http.put('api/citys/' + id, data);
return request;
},
delete: function (id) {
//delete a specific post
}
};
}); |
from __future__ import absolute_import
from uuid import uuid4
from django.http import Http404
from sentry.api.bases.organization import (
OrganizationEndpoint, OrganizationIntegrationsPermission
)
from sentry.api.serializers import serialize
from sentry.integrations.exceptions import IntegrationError
from sentry.models import Integration, ObjectStatus, OrganizationIntegration
from sentry.tasks.deletion import delete_organization_integration
class OrganizationIntegrationDetailsEndpoint(OrganizationEndpoint):
permission_classes = (OrganizationIntegrationsPermission, )
def get(self, request, organization, integration_id):
try:
integration = OrganizationIntegration.objects.get(
integration_id=integration_id,
organization=organization,
)
except OrganizationIntegration.DoesNotExist:
raise Http404
return self.respond(serialize(integration, request.user))
def delete(self, request, organization, integration_id):
# Removing the integration removes the organization and project
# integrations and all linked issues.
try:
org_integration = OrganizationIntegration.objects.get(
integration_id=integration_id,
organization=organization,
)
except OrganizationIntegration.DoesNotExist:
raise Http404
updated = OrganizationIntegration.objects.filter(
id=org_integration.id,
status=ObjectStatus.VISIBLE,
).update(status=ObjectStatus.PENDING_DELETION)
if updated:
delete_organization_integration.apply_async(
kwargs={
'object_id': org_integration.id,
'transaction_id': uuid4().hex,
'actor_id': request.user.id,
},
countdown=0,
)
return self.respond(status=204)
def post(self, request, organization, integration_id):
try:
integration = Integration.objects.get(
id=integration_id,
organizations=organization,
)
except Integration.DoesNotExist:
raise Http404
installation = integration.get_installation(organization.id)
try:
installation.update_organization_config(request.DATA)
except IntegrationError as e:
return self.respond({'detail': e.message}, status=400)
return self.respond(status=200)
|
/**
* This file was unminified in Jetpack 4.0 to address an issue wherein ClamAV
* was flagging the minified version of this file with a false-positive virus warning.
*
* This file will be re-minified in a future Jetpack release once ClamAV corrects their
* incorrect definition.
*/
( function( $ ) {
/**
* A function to help debouncing.
*/
var debounce = function( func, wait ) {
var timeout, args, context, timestamp;
return function() {
context = this;
args = [].slice.call( arguments, 0 );
timestamp = new Date();
var later = function() {
var last = ( new Date() ) - timestamp;
if ( last < wait ) {
timeout = setTimeout( later, wait - last );
} else {
timeout = null;
func.apply( context, args );
}
};
if ( ! timeout ) {
timeout = setTimeout( later, wait );
}
};
};
/**
* A function to resize videos.
*/
function responsive_videos() {
$( '.jetpack-video-wrapper' ).find( 'embed, iframe, object' ).each( function() {
var video_element, video_width, video_height, video_ratio, video_wrapper, video_margin, container_width;
video_element = $( this );
video_margin = 0;
if ( video_element.parents( '.jetpack-video-wrapper' ).prev( 'p' ).css( 'text-align' ) === 'center' ) {
video_margin = '0 auto';
}
if ( ! video_element.attr( 'data-ratio' ) ) {
video_element
.attr( 'data-ratio', this.height / this.width )
.attr( 'data-width', this.width )
.attr( 'data-height', this.height )
.css( {
'display' : 'block',
'margin' : video_margin
} );
}
video_width = video_element.attr( 'data-width' );
video_height = video_element.attr( 'data-height' );
video_ratio = video_element.attr( 'data-ratio' );
video_wrapper = video_element.parent();
container_width = video_wrapper.width();
if ( video_ratio === 'Infinity' ) {
video_width = '100%';
}
video_element
.removeAttr( 'height' )
.removeAttr( 'width' );
if ( video_width > container_width ) {
video_element
.width( container_width )
.height( container_width * video_ratio );
} else {
video_element
.width( video_width )
.height( video_height );
}
} );
}
/**
* Load responsive_videos().
* Trigger resize to make sure responsive_videos() is loaded after IS.
*/
$( window ).load( responsive_videos ).resize( debounce( responsive_videos, 100 ) ).trigger( 'resize' );
$( document ).on( 'post-load', responsive_videos );
} )( jQuery );
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, json
from frappe.utils import getdate, date_diff, add_days, cstr
from frappe import _, throw
from frappe.utils.nestedset import NestedSet
class CircularReferenceError(frappe.ValidationError): pass
class Task(NestedSet):
nsm_parent_field = 'parent_task'
def get_feed(self):
return '{0}: {1}'.format(_(self.status), self.subject)
def get_project_details(self):
return {
"project": self.project
}
def get_customer_details(self):
cust = frappe.db.sql("select customer_name from `tabCustomer` where name=%s", self.customer)
if cust:
ret = {'customer_name': cust and cust[0][0] or ''}
return ret
def validate(self):
self.validate_dates()
self.validate_progress()
self.validate_status()
self.update_depends_on()
def validate_dates(self):
if self.exp_start_date and self.exp_end_date and getdate(self.exp_start_date) > getdate(self.exp_end_date):
frappe.throw(_("'Expected Start Date' can not be greater than 'Expected End Date'"))
if self.act_start_date and self.act_end_date and getdate(self.act_start_date) > getdate(self.act_end_date):
frappe.throw(_("'Actual Start Date' can not be greater than 'Actual End Date'"))
def validate_status(self):
if self.status!=self.get_db_value("status") and self.status == "Closed":
for d in self.depends_on:
if frappe.db.get_value("Task", d.task, "status") != "Closed":
frappe.throw(_("Cannot close task as its dependant task {0} is not closed.").format(d.task))
from frappe.desk.form.assign_to import clear
clear(self.doctype, self.name)
def validate_progress(self):
if (self.progress or 0) > 100:
frappe.throw(_("Progress % for a task cannot be more than 100."))
def update_depends_on(self):
depends_on_tasks = self.depends_on_tasks or ""
for d in self.depends_on:
if d.task and not d.task in depends_on_tasks:
depends_on_tasks += d.task + ","
self.depends_on_tasks = depends_on_tasks
def update_nsm_model(self):
frappe.utils.nestedset.update_nsm(self)
def on_update(self):
self.update_nsm_model()
self.check_recursion()
self.reschedule_dependent_tasks()
self.update_project()
self.unassign_todo()
self.populate_depends_on()
def unassign_todo(self):
if self.status == "Closed" or self.status == "Cancelled":
from frappe.desk.form.assign_to import clear
clear(self.doctype, self.name)
def update_total_expense_claim(self):
self.total_expense_claim = frappe.db.sql("""select sum(total_sanctioned_amount) from `tabExpense Claim`
where project = %s and task = %s and docstatus=1""",(self.project, self.name))[0][0]
def update_time_and_costing(self):
tl = frappe.db.sql("""select min(from_time) as start_date, max(to_time) as end_date,
sum(billing_amount) as total_billing_amount, sum(costing_amount) as total_costing_amount,
sum(hours) as time from `tabTimesheet Detail` where task = %s and docstatus=1"""
,self.name, as_dict=1)[0]
if self.status == "Open":
self.status = "Working"
self.total_costing_amount= tl.total_costing_amount
self.total_billing_amount= tl.total_billing_amount
self.actual_time= tl.time
self.act_start_date= tl.start_date
self.act_end_date= tl.end_date
def update_project(self):
if self.project and not self.flags.from_project:
frappe.get_doc("Project", self.project).update_project()
def check_recursion(self):
if self.flags.ignore_recursion_check: return
check_list = [['task', 'parent'], ['parent', 'task']]
for d in check_list:
task_list, count = [self.name], 0
while (len(task_list) > count ):
tasks = frappe.db.sql(" select %s from `tabTask Depends On` where %s = %s " %
(d[0], d[1], '%s'), cstr(task_list[count]))
count = count + 1
for b in tasks:
if b[0] == self.name:
frappe.throw(_("Circular Reference Error"), CircularReferenceError)
if b[0]:
task_list.append(b[0])
if count == 15:
break
def reschedule_dependent_tasks(self):
end_date = self.exp_end_date or self.act_end_date
if end_date:
for task_name in frappe.db.sql("""
select name from `tabTask` as parent
where parent.project = %(project)s
and parent.name in (
select parent from `tabTask Depends On` as child
where child.task = %(task)s and child.project = %(project)s)
""", {'project': self.project, 'task':self.name }, as_dict=1):
task = frappe.get_doc("Task", task_name.name)
if task.exp_start_date and task.exp_end_date and task.exp_start_date < getdate(end_date) and task.status == "Open":
task_duration = date_diff(task.exp_end_date, task.exp_start_date)
task.exp_start_date = add_days(end_date, 1)
task.exp_end_date = add_days(task.exp_start_date, task_duration)
task.flags.ignore_recursion_check = True
task.save()
def has_webform_permission(doc):
project_user = frappe.db.get_value("Project User", {"parent": doc.project, "user":frappe.session.user} , "user")
if project_user:
return True
def populate_depends_on(self):
if self.parent_task:
parent = frappe.get_doc('Task', self.parent_task)
parent.append("depends_on", {
"doctype": "Task Depends On",
"task": self.name,
"subject": self.subject
})
parent.save()
def on_trash(self):
if check_if_child_exists(self.name):
throw(_("Child Task exists for this Task. You can not delete this Task."))
self.update_nsm_model()
@frappe.whitelist()
def check_if_child_exists(name):
return frappe.db.sql("""select name from `tabTask`
where parent_task = %s""", name)
def get_project(doctype, txt, searchfield, start, page_len, filters):
from erpnext.controllers.queries import get_match_cond
return frappe.db.sql(""" select name from `tabProject`
where %(key)s like "%(txt)s"
%(mcond)s
order by name
limit %(start)s, %(page_len)s """ % {'key': searchfield,
'txt': "%%%s%%" % frappe.db.escape(txt), 'mcond':get_match_cond(doctype),
'start': start, 'page_len': page_len})
@frappe.whitelist()
def set_multiple_status(names, status):
names = json.loads(names)
for name in names:
task = frappe.get_doc("Task", name)
task.status = status
task.save()
def set_tasks_as_overdue():
frappe.db.sql("""update tabTask set `status`='Overdue'
where exp_end_date is not null
and exp_end_date < CURDATE()
and `status` not in ('Closed', 'Cancelled')""")
@frappe.whitelist()
def get_children(doctype, parent, task=None, project=None, is_root=False):
filters = [['docstatus', '<', '2']]
if task:
filters.append(['parent_task', '=', task])
elif parent and not is_root:
# via expand child
filters.append(['parent_task', '=', parent])
else:
filters.append(['ifnull(`parent_task`, "")', '=', ''])
if project:
filters.append(['project', '=', project])
tasks = frappe.get_list(doctype, fields=[
'name as value',
'subject as title',
'is_group as expandable'
], filters=filters, order_by='name')
# return tasks
return tasks
@frappe.whitelist()
def add_node():
from frappe.desk.treeview import make_tree_args
args = frappe.form_dict
args.update({
"name_field": "subject"
})
args = make_tree_args(**args)
if args.parent_task == 'All Tasks' or args.parent_task == args.project:
args.parent_task = None
frappe.get_doc(args).insert()
@frappe.whitelist()
def add_multiple_tasks(data, parent):
data = json.loads(data)
new_doc = {'doctype': 'Task', 'parent_task': parent if parent!="All Tasks" else ""}
new_doc['project'] = frappe.db.get_value('Task', {"name": parent}, 'project') or ""
for d in data:
if not d.get("subject"): continue
new_doc['subject'] = d.get("subject")
new_task = frappe.get_doc(new_doc)
new_task.insert()
def on_doctype_update():
frappe.db.add_index("Task", ["lft", "rgt"]) |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# 'License'); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
import sys
import time
from six.moves import configparser
from datahub import DataHub
from datahub.exceptions import ResourceExistException, InvalidOperationException
from datahub.models import RecordSchema, FieldType, ShardState
current_path = os.path.split(os.path.realpath(__file__))[0]
root_path = os.path.join(current_path, '../..')
configer = configparser.ConfigParser()
configer.read(os.path.join(current_path, '../datahub.ini'))
access_id = configer.get('datahub', 'access_id')
access_key = configer.get('datahub', 'access_key')
endpoint = configer.get('datahub', 'endpoint')
print('=======================================')
print('access_id: %s' % access_id)
print('access_key: %s' % access_key)
print('endpoint: %s' % endpoint)
print('=======================================\n\n')
if not access_id or not access_key or not endpoint:
print('[access_id, access_key, endpoint] must be set in datahub.ini!')
sys.exit(-1)
dh = DataHub(access_id, access_key, endpoint)
def clean_topic(datahub_client, project_name, force=False):
topic_names = datahub_client.list_topic(project_name).topic_names
for topic_name in topic_names:
if force:
clean_subscription(datahub_client, project_name, topic_name)
datahub_client.delete_topic(project_name, topic_name)
def clean_project(datahub_client, force=False):
project_names = datahub_client.list_project().project_names
for project_name in project_names:
if force:
clean_topic(datahub_client, project_name)
try:
datahub_client.delete_project(project_name)
except InvalidOperationException:
pass
def clean_subscription(datahub_client, project_name, topic_name):
subscriptions = datahub_client.list_subscription(project_name, topic_name, '', 1, 100).subscriptions
for subscription in subscriptions:
datahub_client.delete_subscription(project_name, topic_name, subscription.sub_id)
class TestShard:
def test_list_shard(self):
project_name_0 = 'shard_test_p%d_0' % int(time.time())
topic_name_0 = 'shard_test_t%d_0' % int(time.time())
record_schema = RecordSchema.from_lists(
['bigint_field', 'string_field', 'double_field', 'bool_field', 'event_time1'],
[FieldType.BIGINT, FieldType.STRING, FieldType.DOUBLE, FieldType.BOOLEAN, FieldType.TIMESTAMP])
try:
dh.create_project(project_name_0, '')
except ResourceExistException:
pass
# make sure project wil be deleted
try:
try:
dh.create_tuple_topic(project_name_0, topic_name_0, 3, 7, record_schema, '1')
except ResourceExistException:
pass
# ======================= list shard =======================
shard_results = dh.list_shard(project_name_0, topic_name_0)
print(shard_results)
assert len(shard_results.shards) == 3
assert shard_results.shards[0].left_shard_id != ''
assert shard_results.shards[0].right_shard_id != ''
finally:
clean_topic(dh, project_name_0)
dh.delete_project(project_name_0)
def test_split_merge_shard(self):
project_name_1 = 'shard_test_p%d_1' % int(time.time())
topic_name_1 = 'shard_test_t%d_1' % int(time.time())
record_schema = RecordSchema.from_lists(
['bigint_field', 'string_field', 'double_field', 'bool_field', 'event_time1'],
[FieldType.BIGINT, FieldType.STRING, FieldType.DOUBLE, FieldType.BOOLEAN, FieldType.TIMESTAMP])
try:
dh.create_project(project_name_1, '')
except ResourceExistException:
pass
# make sure project wil be deleted
try:
try:
dh.create_tuple_topic(project_name_1, topic_name_1, 1, 7, record_schema, '1')
except ResourceExistException:
pass
time.sleep(5)
# ======================= split shard =======================
new_shards = dh.split_shard(project_name_1, topic_name_1, '0',
'66666666666666666666666666666666').new_shards
assert new_shards[0].shard_id == '1'
assert new_shards[1].shard_id == '2'
assert new_shards[0].end_hash_key == '66666666666666666666666666666666'
assert new_shards[1].begin_hash_key == '66666666666666666666666666666666'
dh.wait_shards_ready(project_name_1, topic_name_1)
shard_list = dh.list_shard(project_name_1, topic_name_1).shards
print(shard_list)
assert shard_list[0].shard_id == '0'
assert shard_list[0].state == ShardState.CLOSED
assert shard_list[1].shard_id == '1'
assert shard_list[1].state == ShardState.ACTIVE
assert shard_list[2].shard_id == '2'
assert shard_list[2].state == ShardState.ACTIVE
time.sleep(5)
# ======================= merge shard =======================
merge_result = dh.merge_shard(project_name_1, topic_name_1, '1', '2')
print(merge_result)
assert merge_result.shard_id == '3'
dh.wait_shards_ready(project_name_1, topic_name_1)
shard_list = dh.list_shard(project_name_1, topic_name_1).shards
print(shard_list)
assert shard_list[0].shard_id == '0'
assert shard_list[0].state == ShardState.CLOSED
assert shard_list[1].shard_id == '1'
assert shard_list[1].state == ShardState.CLOSED
assert shard_list[2].shard_id == '2'
assert shard_list[2].state == ShardState.CLOSED
assert shard_list[3].shard_id == '3'
assert shard_list[3].state == ShardState.ACTIVE
finally:
clean_topic(dh, project_name_1)
dh.delete_project(project_name_1)
# run directly
if __name__ == '__main__':
test = TestShard()
test.test_list_shard()
test.test_split_merge_shard()
|
var vm = new Vue({
el: '#app',
data: {
host: host,
image_code_id: '',
image_code_url: '',
username: '',
image_code: '',
mobile: '',
access_token: '',
sms_code: '',
user_id: '',
password: '',
password2: '',
// 发送短信的标志
sending_flag: false,
error_username: false,
error_image_code: false,
error_sms_code: false,
error_username_message: '',
error_image_code_message: '',
sms_code_tip: '获取短信验证码',
error_sms_code_message: '',
error_password: false,
error_check_password: false,
// 控制表单显示
is_show_form_1: true,
is_show_form_2: false,
is_show_form_3: false,
is_show_form_4: false,
// 控制进度条显示
step_class: {
'step-1': true,
'step-2': false,
'step-3': false,
'step-4': false
},
},
created: function(){
this.generate_image_code();
},
methods: {
// 生成uuid
generate_uuid: function(){
var d = new Date().getTime();
if(window.performance && typeof window.performance.now === "function"){
d += performance.now(); //use high-precision timer if available
}
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c =='x' ? r : (r&0x3|0x8)).toString(16);
});
return uuid;
},
// 生成一个图片验证码的编号,并设置页面中图片验证码img标签的src属性
generate_image_code: function(){
// 生成一个编号
// 严格一点的使用uuid保证编号唯一, 不是很严谨的情况下,也可以使用时间戳
this.image_code_id = this.generate_uuid();
// 设置页面中图片验证码img标签的src属性
this.image_code_url = this.host + "/image_codes/" + this.image_code_id + "/";
},
// 检查数据
check_username: function(){
if (!this.username) {
this.error_username_message = '请填写用户名或手机号';
this.error_username = true;
} else {
this.error_username = false;
}
},
check_image_code: function(){
if (!this.image_code) {
this.error_image_code_message = '请填写验证码';
this.error_image_code = true;
} else {
this.error_image_code = false;
}
},
check_sms_code: function(){
if(!this.sms_code){
this.error_sms_code_message = '请填写短信验证码';
this.error_sms_code = true;
} else {
this.error_sms_code = false;
}
},
// 第一步表单提交, 获取手机号与发送短信的token
form_1_on_submit: function(){
this.check_username();
this.check_image_code();
if (this.error_username == false && this.error_image_code == false) {
axios.get(this.host+'/accounts/' + this.username + '/sms/token/?text='+ this.image_code + '&image_code_id=' + this.image_code_id, {
responseType: 'json'
})
.then(response => {
this.mobile = response.data.mobile;
this.access_token = response.data.access_token;
this.step_class['step-2'] = true;
this.step_class['step-1'] = false;
this.is_show_form_1 = false;
this.is_show_form_2 = true;
})
.catch(error => {
if (error.response.status == 400) {
this.error_image_code_message = '验证码错误';
this.error_image_code = true;
} else if (error.response.status == 404) {
this.error_username_message = '用户名或手机号不存在';
this.error_username = true;
} else {
console.log(error.response.data);
}
})
}
},
// 第二步
// 发送短信验证码
send_sms_code: function(){
if (this.sending_flag == true) {
return;
}
this.sending_flag = true;
axios.get(this.host+'/sms_codes/?access_token='+ this.access_token, {
responseType: 'json'
})
.then(response => {
// 表示后端发送短信成功
// 倒计时60秒,60秒后允许用户再次点击发送短信验证码的按钮
var num = 60;
// 设置一个计时器
var t = setInterval(() => {
if (num == 1) {
// 如果计时器到最后, 清除计时器对象
clearInterval(t);
// 将点击获取验证码的按钮展示的文本回复成原始文本
this.sms_code_tip = '获取短信验证码';
// 将点击按钮的onclick事件函数恢复回去
this.sending_flag = false;
} else {
num -= 1;
// 展示倒计时信息
this.sms_code_tip = num + '秒';
}
}, 1000, 60)
})
.catch(error => {
alert(error.response.data.message);
this.sending_flag = false;
})
},
// 第二步表单提交,验证手机号,获取修改密码的access_token
form_2_on_submit: function(){
this.check_sms_code();
if (this.error_sms_code == false) {
axios.get(this.host + '/accounts/' + this.username + '/password/token/?sms_code=' + this.sms_code, {
responseType: 'json'
})
.then(response => {
this.user_id = response.data.user_id;
this.access_token = response.data.access_token;
this.step_class['step-3'] = true;
this.step_class['step-2'] = false;
this.is_show_form_2 = false;
this.is_show_form_3 = true;
})
.catch(error => {
if (error.response.status == 400) {
this.error_sms_code_message = '验证码错误';
this.error_sms_code = true;
} else if(error.response.status == 404){
this.error_sms_code_message = '手机号不存在';
this.error_sms_code = true;
} else {
alert(error.response.data.message);
console.log(error.response.data);
}
})
}
},
// 第三步
check_pwd: function (){
var len = this.password.length;
if(len<8||len>20) {
this.error_password = true;
} else {
this.error_password = false;
}
},
check_cpwd: function (){
if(this.password!=this.password2) {
this.error_check_password = true;
} else {
this.error_check_password = false;
}
},
form_3_on_submit: function(){
this.check_pwd();
this.check_cpwd();
if (this.error_password == false && this.error_check_password == false) {
axios.post(this.host + '/users/'+ this.user_id +'/password/', {
password: this.password,
password2: this.password2,
access_token: this.access_token
}, {
responseType: 'json'
})
.then(response => {
this.step_class['step-4'] = true;
this.step_class['step-3'] = false;
this.is_show_form_3 = false;
this.is_show_form_4 = true;
})
.catch(error => {
alert(error.response.data.message);
console.log(error.response.data);
})
}
}
}
}) |
// Select DOM Items
const menuBtn = document.querySelector(".menu-btn");
const menu = document.querySelector(".menu");
const menuNav = document.querySelector(".menu-nav");
const menuBranding = document.querySelector(".menu-branding");
const navItems = document.querySelectorAll(".nav-item");
// Set Initial State Of Menu
let showMenu = false;
menuBtn.addEventListener("click", toggleMenu);
function toggleMenu() {
if (!showMenu) {
menuBtn.classList.add("close");
menu.classList.add("show");
menuNav.classList.add("show");
menuBranding.classList.add("show");
navItems.forEach(item => item.classList.add("show"));
// Set Menu state
showMenu = true;
} else {
menuBtn.classList.remove("close");
menu.classList.remove("show");
menuNav.classList.remove("show");
menuBranding.classList.remove("show");
navItems.forEach(item => item.classList.remove("show"));
// Set Menu state
showMenu = false;
}
}
|
const CopyToClipboard = require('./output/copyToClipboard')
const OpenInBrowser = require('./output/openInBrowser')
const SendNotification = require('./output/sendNotification')
const UserScript = require('./output/userScript')
const ShowFile = require('./output/showFile')
const OpenFile = require('./output/openFile')
const ReloadConfig = require('./output/reloadConfig')
const Preview = require('./output/preview')
const PlaySound = require('./output/playSound')
module.exports = {
CopyToClipboard,
OpenInBrowser,
SendNotification,
UserScript,
OpenFile,
ShowFile,
ReloadConfig,
Preview,
PlaySound,
}
|
function fetch() {
var main = new XMLHttpRequest();
main.onreadystatechange = function() {
var loader = '<svg version="1.1" class="svg-loader" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 80 80" xml:space="preserve"><path fill="yellow" d="M10,40c0,0,0-0.4,0-1.1c0-0.3,0-0.8,0-1.3c0-0.3,0-0.5,0-0.8c0-0.3,0.1-0.6,0.1-0.9c0.1-0.6,0.1-1.4,0.2-2.1 c0.2-0.8,0.3-1.6,0.5-2.5c0.2-0.9,0.6-1.8,0.8-2.8c0.3-1,0.8-1.9,1.2-3c0.5-1,1.1-2,1.7-3.1c0.7-1,1.4-2.1,2.2-3.1 c1.6-2.1,3.7-3.9,6-5.6c2.3-1.7,5-3,7.9-4.1c0.7-0.2,1.5-0.4,2.2-0.7c0.7-0.3,1.5-0.3,2.3-0.5c0.8-0.2,1.5-0.3,2.3-0.4l1.2-0.1 l0.6-0.1l0.3,0l0.1,0l0.1,0l0,0c0.1,0-0.1,0,0.1,0c1.5,0,2.9-0.1,4.5,0.2c0.8,0.1,1.6,0.1,2.4,0.3c0.8,0.2,1.5,0.3,2.3,0.5 c3,0.8,5.9,2,8.5,3.6c2.6,1.6,4.9,3.4,6.8,5.4c1,1,1.8,2.1,2.7,3.1c0.8,1.1,1.5,2.1,2.1,3.2c0.6,1.1,1.2,2.1,1.6,3.1 c0.4,1,0.9,2,1.2,3c0.3,1,0.6,1.9,0.8,2.7c0.2,0.9,0.3,1.6,0.5,2.4c0.1,0.4,0.1,0.7,0.2,1c0,0.3,0.1,0.6,0.1,0.9 c0.1,0.6,0.1,1,0.1,1.4C74,39.6,74,40,74,40c0.2,2.2-1.5,4.1-3.7,4.3s-4.1-1.5-4.3-3.7c0-0.1,0-0.2,0-0.3l0-0.4c0,0,0-0.3,0-0.9 c0-0.3,0-0.7,0-1.1c0-0.2,0-0.5,0-0.7c0-0.2-0.1-0.5-0.1-0.8c-0.1-0.6-0.1-1.2-0.2-1.9c-0.1-0.7-0.3-1.4-0.4-2.2 c-0.2-0.8-0.5-1.6-0.7-2.4c-0.3-0.8-0.7-1.7-1.1-2.6c-0.5-0.9-0.9-1.8-1.5-2.7c-0.6-0.9-1.2-1.8-1.9-2.7c-1.4-1.8-3.2-3.4-5.2-4.9 c-2-1.5-4.4-2.7-6.9-3.6c-0.6-0.2-1.3-0.4-1.9-0.6c-0.7-0.2-1.3-0.3-1.9-0.4c-1.2-0.3-2.8-0.4-4.2-0.5l-2,0c-0.7,0-1.4,0.1-2.1,0.1 c-0.7,0.1-1.4,0.1-2,0.3c-0.7,0.1-1.3,0.3-2,0.4c-2.6,0.7-5.2,1.7-7.5,3.1c-2.2,1.4-4.3,2.9-6,4.7c-0.9,0.8-1.6,1.8-2.4,2.7 c-0.7,0.9-1.3,1.9-1.9,2.8c-0.5,1-1,1.9-1.4,2.8c-0.4,0.9-0.8,1.8-1,2.6c-0.3,0.9-0.5,1.6-0.7,2.4c-0.2,0.7-0.3,1.4-0.4,2.1 c-0.1,0.3-0.1,0.6-0.2,0.9c0,0.3-0.1,0.6-0.1,0.8c0,0.5-0.1,0.9-0.1,1.3C10,39.6,10,40,10,40z"><animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0 40 40" to="360 40 40" dur="0.6s" repeatCount="indefinite" /> </path> </svg>';
if (this.readyState == 0) {
document.getElementById("output").innerHTML = '<p>request not initialized</p>' + loader;
} else if (this.readyState == 1) {
document.getElementById("output").innerHTML = '<p>server connection established</p>' + loader;
} else if (this.readyState == 2) {
document.getElementById("output").innerHTML = '<p>request received</p>' + loader;
} else if (this.readyState == 3) {
document.getElementById("output").innerHTML = '<p>processing request</p>' + loader;
} else if (this.readyState == 4 && this.status == 200) {
var data = JSON.parse(this.responseText);
final = '<h3><a target="_blank" href="https://github.com/' + data.login + '">' + data.login + '</a></h3><img class="w3-round" src="' + data.avatar_url + '">';
validate(data.bio, '<p><b>' + data.bio + '</b></p>');
validate(data.name, '<p>Name: ' + data.name + '</p>');
validate(data.email, '<p><a href="maito:' + data.email + '">' + data.email + '</a></p>');
validate(data.location, '<p>Location: ' + data.location + '</p>');
validate(data.twitter_username, '<p>Twitter: <a href="https://twitter.com/" ' + data.twitter_username + '>' + data.twitter_username + '</a></p>');
validate(data.blog, '<p> <a href="' + data.blog + '">Blog/ Website</a></p>');
validate(data.followers, '<p>Followers: ' + data.followers + '</p>');
validate(data.following, '<p>Following: ' + data.following + '</p>');
validate(data.public_repos, '<p>Repositories: ' + data.public_repos + '</p>');
validate(data.public_gists, '<p>Gists: ' + data.public_gists + '</p>');
document.getElementById("output").innerHTML = final;
} else {
document.getElementById("output").innerHTML = '<p class="warning">Something went wrong</p>' + loader;
}
};
main.open("GET", "https://api.github.com/users/" + document.getElementById("user").value, true);
main.send();
}
function hidesettings(){
document.getElementById('settings').style.display='none';
fetch();
}
window.onclick = function(event) {
if (event.target == document.getElementById('settings')) {
hidesettings()
}
}
document.getElementById("user")
.addEventListener("keyup", function(event) {
event.preventDefault();
if (event.keyCode === 13) {
document.getElementById("start").click();
}
});
function validate(name, fill) {
if (name !== null && name !== "") {
final = final + fill;
}
}
var final;
|
import { log } from 'utils/console-utils'
import scrapeNpm from 'scraping/scrape-npm'
import downloadPackagesFromNpm from 'downloading/download-packages-from-npm'
const PKG_DIR = './packages/'
async function downloadPackages(numberOfPackages, callback) {
try {
const packagesMeta = await scrapeNpm(numberOfPackages)
await downloadPackagesFromNpm(packagesMeta, PKG_DIR)
} catch (e) {
log.error(e)
} finally {
callback()
}
}
// downloadPackages(process.env.COUNT, () => log.info('Done!'))
export default downloadPackages
|
// @flow
import * as React from 'react';
import { Route, Switch, withRouter } from 'react-router-dom';
/**
* MountPointPlain class wrapped withRouter.
*/
export const MountPoint = withRouter(
/**
* MountPointPlain class.
*/
class MountPointPlain extends React.PureComponent<*> {
/**
* Returns object with path.
*
* @param {string} parentRoute - Parent route.
* @param {Array} childRoutes - Child routes.
* @param {string} path - Path.
* @param {*} route - Rest props.
* @returns {{childRoutes: Array, path: string}} Route props.
*/
static getRouteProps(
parentRoute: string,
{ childRoutes = [], path = '', ...route }: *,
) {
return {
...route,
childRoutes,
path: `${parentRoute}/${path}`.replace(/\/+/g, '/'),
};
}
/**
* Render method.
*
* @returns {?string} HTML markup or null.
*/
render() {
const {
childRoutes,
component: Component = React.Fragment,
path,
isSwitch,
...route
} = this.props;
if (route.render) {
throw new Error(
'#render is not allowed property for route configuration.',
);
}
if (route.children) {
throw new Error(
'#children is not allowed property for route configuration.',
);
}
/**
* Function returns component for render.
*
* @param {Object} match - Router object with url.
* @returns {React.Node} React component.
*/
const render = ({ match }) => {
const content = childRoutes.map((childRoute, i) => (
<MountPoint
key={`${childRoute.path}:${i}-${match.path}`}
{...MountPointPlain.getRouteProps(match.path, childRoute)}
/>
));
if (typeof Component === 'string' || Component === React.Fragment) {
return <Component>{content}</Component>;
}
return <Component match={match}>{content}</Component>;
};
if (isSwitch) {
if (!childRoutes) {
throw new Error("Can't use Route.isSwitch without childRoutes.");
}
if (typeof Component === 'string' || Component === React.Fragment) {
return (
<Route
path={path}
render={({ match }) => (
<Component>
<Switch {...route}>
{childRoutes.map((route, index) => (
<MountPoint
key={index}
{...MountPointPlain.getRouteProps(match.path, route)}
/>
))}
</Switch>
</Component>
)}
/>
);
}
return (
<Route
path={path}
render={({ match }) => (
<Component match={match}>
<Switch {...route}>
{childRoutes.map((route, index) => (
<MountPoint
key={index}
{...MountPointPlain.getRouteProps(match.path, route)}
/>
))}
</Switch>
</Component>
)}
/>
);
}
return <Route {...route} path={path} render={render} />;
}
},
);
|
'use strict';
const webpack = require('webpack');
module.exports = {
context: __dirname,
target: 'web',
entry: './index.js',
output: {
path: __dirname,
filename: '[name].js',
library: ['xhr'],
libraryTarget: 'umd',
},
resolve: {
extensions: [
'',
'.js',
],
modulesDirectories: [
'node_modules',
],
},
plugins: [
new webpack.NoErrorsPlugin,
new webpack.IgnorePlugin(/vertx/),
new webpack.optimize.OccurenceOrderPlugin,
new webpack.optimize.DedupePlugin,
new webpack.optimize.AggressiveMergingPlugin,
new webpack.BannerPlugin([
'@license xhr.js Copyright(c) 2016 sasa+1',
'https://github.com/sasaplus1-prototype/xhr.js',
'Released under the MIT license.',
].join('\n'), {
options: {
raw: false,
entryOnly: true,
},
})
],
};
|
import React from 'react';
import { AppProvider } from '../src/context/AppProvider';
import { ThemeProvider } from '../src/context/StateContext';
export const wrapRootElement = ({ element }) => {
return (
<ThemeProvider>
<AppProvider>{element}</AppProvider>
</ThemeProvider>
);
};
|
/*
Copyright © 2001-2004 World Wide Web Consortium,
(Massachusetts Institute of Technology, European Research Consortium
for Informatics and Mathematics, Keio University). All
Rights Reserved. This work is distributed under the W3C® Software License [1] in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* Gets URI that identifies the test.
* @return uri identifier of test
*/
function getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level1/html/HTMLTableColElement06";
}
var docsLoaded = -1000000;
var builder = null;
//
// This function is called by the testing framework before
// running the test suite.
//
// If there are no configuration exceptions, asynchronous
// document loading is started. Otherwise, the status
// is set to complete and the exception is immediately
// raised when entering the body of the test.
//
function setUpPage() {
setUpPageStatus = 'running';
try {
//
// creates test document builder, may throw exception
//
builder = createConfiguredBuilder();
docsLoaded = 0;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
docsLoaded += preload(docRef, "doc", "tablecol");
if (docsLoaded == 1) {
setUpPageStatus = 'complete';
}
} catch(ex) {
catchInitializationError(builder, ex);
setUpPageStatus = 'complete';
}
}
//
// This method is called on the completion of
// each asychronous load started in setUpTests.
//
// When every synchronous loaded document has completed,
// the page status is changed which allows the
// body of the test to be executed.
function loadComplete() {
if (++docsLoaded == 1) {
setUpPageStatus = 'complete';
}
}
/**
*
The charoff attribute specifies offset of alignment character(COLGROUP).
Retrieve the charoff attribute from the COLGROUP element and examine
its value.
* @author NIST
* @author Mary Brady
* @see http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-html#ID-57779225
*/
function HTMLTableColElement06() {
var success;
if(checkInitialization(builder, "HTMLTableColElement06") != null) return;
var nodeList;
var testNode;
var vchoff;
var doc;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
doc = load(docRef, "doc", "tablecol");
nodeList = doc.getElementsByTagName("colgroup");
assertSize("Asize",1,nodeList);
testNode = nodeList.item(0);
vchoff = testNode.chOff;
assertEquals("chLink","15",vchoff);
}
function runTest() {
HTMLTableColElement06();
}
|
import * as asn1js from "../asn1js/asn1.js";
import { getParametersValue, clearProps } from "../pvutils/utils.js";
//**************************************************************************************
/**
* Class from RFC3161. Accuracy represents the time deviation around the UTC time contained in GeneralizedTime.
*/
export default class Accuracy
{
//**********************************************************************************
/**
* Constructor for Accuracy class
* @param {Object} [parameters={}]
* @param {Object} [parameters.schema] asn1js parsed value to initialize the class from
*/
constructor(parameters = {})
{
//region Internal properties of the object
if("seconds" in parameters)
/**
* @type {number}
* @desc seconds
*/
this.seconds = getParametersValue(parameters, "seconds", Accuracy.defaultValues("seconds"));
if("millis" in parameters)
/**
* @type {number}
* @desc millis
*/
this.millis = getParametersValue(parameters, "millis", Accuracy.defaultValues("millis"));
if("micros" in parameters)
/**
* @type {number}
* @desc micros
*/
this.micros = getParametersValue(parameters, "micros", Accuracy.defaultValues("micros"));
//endregion
//region If input argument array contains "schema" for this object
if("schema" in parameters)
this.fromSchema(parameters.schema);
//endregion
}
//**********************************************************************************
/**
* Return default values for all class members
* @param {string} memberName String name for a class member
*/
static defaultValues(memberName)
{
switch(memberName)
{
case "seconds":
case "millis":
case "micros":
return 0;
default:
throw new Error(`Invalid member name for Accuracy class: ${memberName}`);
}
}
//**********************************************************************************
/**
* Compare values with default values for all class members
* @param {string} memberName String name for a class member
* @param {*} memberValue Value to compare with default value
*/
static compareWithDefault(memberName, memberValue)
{
switch(memberName)
{
case "seconds":
case "millis":
case "micros":
return (memberValue === Accuracy.defaultValues(memberName));
default:
throw new Error(`Invalid member name for Accuracy class: ${memberName}`);
}
}
//**********************************************************************************
/**
* Return value of pre-defined ASN.1 schema for current class
*
* ASN.1 schema:
* ```asn1
* Accuracy ::= SEQUENCE {
* seconds INTEGER OPTIONAL,
* millis [0] INTEGER (1..999) OPTIONAL,
* micros [1] INTEGER (1..999) OPTIONAL }
* ```
*
* @param {Object} parameters Input parameters for the schema
* @returns {Object} asn1js schema object
*/
static schema(parameters = {})
{
/**
* @type {Object}
* @property {string} [blockName]
* @property {string} [seconds]
* @property {string} [millis]
* @property {string} [micros]
*/
const names = getParametersValue(parameters, "names", {});
return (new asn1js.Sequence({
name: (names.blockName || ""),
optional: true,
value: [
new asn1js.Integer({
optional: true,
name: (names.seconds || "")
}),
new asn1js.Primitive({
name: (names.millis || ""),
optional: true,
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
}
}),
new asn1js.Primitive({
name: (names.micros || ""),
optional: true,
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 1 // [1]
}
})
]
}));
}
//**********************************************************************************
/**
* Convert parsed asn1js object into current class
* @param {!Object} schema
*/
fromSchema(schema)
{
//region Clear input data first
clearProps(schema, [
"seconds",
"millis",
"micros"
]);
//endregion
//region Check the schema is valid
const asn1 = asn1js.compareSchema(schema,
schema,
Accuracy.schema({
names: {
seconds: "seconds",
millis: "millis",
micros: "micros"
}
})
);
if(asn1.verified === false)
throw new Error("Object's schema was not verified against input data for Accuracy");
//endregion
//region Get internal properties from parsed schema
if("seconds" in asn1.result)
this.seconds = asn1.result.seconds.valueBlock.valueDec;
if("millis" in asn1.result)
{
const intMillis = new asn1js.Integer({ valueHex: asn1.result.millis.valueBlock.valueHex });
this.millis = intMillis.valueBlock.valueDec;
}
if("micros" in asn1.result)
{
const intMicros = new asn1js.Integer({ valueHex: asn1.result.micros.valueBlock.valueHex });
this.micros = intMicros.valueBlock.valueDec;
}
//endregion
}
//**********************************************************************************
/**
* Convert current object to asn1js object and set correct values
* @returns {Object} asn1js object
*/
toSchema()
{
//region Create array of output sequence
const outputArray = [];
if("seconds" in this)
outputArray.push(new asn1js.Integer({ value: this.seconds }));
if("millis" in this)
{
const intMillis = new asn1js.Integer({ value: this.millis });
outputArray.push(new asn1js.Primitive({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 0 // [0]
},
valueHex: intMillis.valueBlock.valueHex
}));
}
if("micros" in this)
{
const intMicros = new asn1js.Integer({ value: this.micros });
outputArray.push(new asn1js.Primitive({
idBlock: {
tagClass: 3, // CONTEXT-SPECIFIC
tagNumber: 1 // [1]
},
valueHex: intMicros.valueBlock.valueHex
}));
}
//endregion
//region Construct and return new ASN.1 schema for this object
return (new asn1js.Sequence({
value: outputArray
}));
//endregion
}
//**********************************************************************************
/**
* Convertion for the class to JSON object
* @returns {Object}
*/
toJSON()
{
const _object = {};
if("seconds" in this)
_object.seconds = this.seconds;
if("millis" in this)
_object.millis = this.millis;
if("micros" in this)
_object.micros = this.micros;
return _object;
}
//**********************************************************************************
}
//**************************************************************************************
|
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
/**
* @requires OpenLayers/Handler.js
*/
/**
* Class: OpenLayers.Handler.Drag
* The drag handler is used to deal with sequences of browser events related
* to dragging. The handler is used by controls that want to know when
* a drag sequence begins, when a drag is happening, and when it has
* finished.
*
* Controls that use the drag handler typically construct it with callbacks
* for 'down', 'move', and 'done'. Callbacks for these keys are called
* when the drag begins, with each move, and when the drag is done. In
* addition, controls can have callbacks keyed to 'up' and 'out' if they
* care to differentiate between the types of events that correspond with
* the end of a drag sequence. If no drag actually occurs (no mouse move)
* the 'down' and 'up' callbacks will be called, but not the 'done'
* callback.
*
* Create a new drag handler with the <OpenLayers.Handler.Drag> constructor.
*
* Inherits from:
* - <OpenLayers.Handler>
*/
OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
/**
* Property: started
* {Boolean} When a mousedown or touchstart event is received, we want to
* record it, but not set 'dragging' until the mouse moves after starting.
*/
started: false,
/**
* Property: stopDown
* {Boolean} Stop propagation of mousedown events from getting to listeners
* on the same element. Default is true.
*/
stopDown: true,
/**
* Property: dragging
* {Boolean}
*/
dragging: false,
/**
* Property: last
* {<OpenLayers.Pixel>} The last pixel location of the drag.
*/
last: null,
/**
* Property: start
* {<OpenLayers.Pixel>} The first pixel location of the drag.
*/
start: null,
/**
* Property: lastMoveEvt
* {Object} The last mousemove event that occurred. Used to
* position the map correctly when our "delay drag"
* timeout expired.
*/
lastMoveEvt: null,
/**
* Property: oldOnselectstart
* {Function}
*/
oldOnselectstart: null,
/**
* Property: interval
* {Integer} In order to increase performance, an interval (in
* milliseconds) can be set to reduce the number of drag events
* called. If set, a new drag event will not be set until the
* interval has passed.
* Defaults to 0, meaning no interval.
*/
interval: 0,
/**
* Property: timeoutId
* {String} The id of the timeout used for the mousedown interval.
* This is "private", and should be left alone.
*/
timeoutId: null,
/**
* APIProperty: documentDrag
* {Boolean} If set to true, the handler will also handle mouse moves when
* the cursor has moved out of the map viewport. Default is false.
*/
documentDrag: false,
/**
* Property: documentEvents
* {Boolean} Are we currently observing document events?
*/
documentEvents: null,
/**
* Constructor: OpenLayers.Handler.Drag
* Returns OpenLayers.Handler.Drag
*
* Parameters:
* control - {<OpenLayers.Control>} The control that is making use of
* this handler. If a handler is being used without a control, the
* handlers setMap method must be overridden to deal properly with
* the map.
* callbacks - {Object} An object containing a single function to be
* called when the drag operation is finished. The callback should
* expect to receive a single argument, the pixel location of the event.
* Callbacks for 'move' and 'done' are supported. You can also speficy
* callbacks for 'down', 'up', and 'out' to respond to those events.
* options - {Object}
*/
initialize: function(control, callbacks, options) {
OpenLayers.Handler.prototype.initialize.apply(this, arguments);
if (this.documentDrag === true) {
var me = this;
this._docMove = function(evt) {
me.mousemove({
xy: {x: evt.clientX, y: evt.clientY},
element: document
});
};
this._docUp = function(evt) {
me.mouseup({xy: {x: evt.clientX, y: evt.clientY}});
};
}
},
/**
* Method: dragstart
* This private method is factorized from mousedown and touchstart methods
*
* Parameters:
* evt - {Event} The event
*
* Returns:
* {Boolean} Let the event propagate.
*/
dragstart: function (evt) {
var propagate = true;
this.dragging = false;
if (this.checkModifiers(evt) &&
(OpenLayers.Event.isLeftClick(evt) ||
OpenLayers.Event.isSingleTouch(evt))) {
this.started = true;
this.start = evt.xy;
this.last = evt.xy;
OpenLayers.Element.addClass(
this.map.viewPortDiv, "olDragDown"
);
this.down(evt);
this.callback("down", [evt.xy]);
// prevent document dragging
OpenLayers.Event.preventDefault(evt);
if(!this.oldOnselectstart) {
this.oldOnselectstart = document.onselectstart ?
document.onselectstart : OpenLayers.Function.True;
}
document.onselectstart = OpenLayers.Function.False;
propagate = !this.stopDown;
} else {
this.started = false;
this.start = null;
this.last = null;
}
return propagate;
},
/**
* Method: dragmove
* This private method is factorized from mousemove and touchmove methods
*
* Parameters:
* evt - {Event} The event
*
* Returns:
* {Boolean} Let the event propagate.
*/
dragmove: function (evt) {
this.lastMoveEvt = evt;
if (this.started && !this.timeoutId && (evt.xy.x != this.last.x ||
evt.xy.y != this.last.y)) {
if(this.documentDrag === true && this.documentEvents) {
if(evt.element === document) {
this.adjustXY(evt);
// do setEvent manually because the documentEvents are not
// registered with the map
this.setEvent(evt);
} else {
this.removeDocumentEvents();
}
}
if (this.interval > 0) {
this.timeoutId = setTimeout(
OpenLayers.Function.bind(this.removeTimeout, this),
this.interval);
}
this.dragging = true;
this.move(evt);
this.callback("move", [evt.xy]);
if(!this.oldOnselectstart) {
this.oldOnselectstart = document.onselectstart;
document.onselectstart = OpenLayers.Function.False;
}
this.last = evt.xy;
}
return true;
},
/**
* Method: dragend
* This private method is factorized from mouseup and touchend methods
*
* Parameters:
* evt - {Event} The event
*
* Returns:
* {Boolean} Let the event propagate.
*/
dragend: function (evt) {
if (this.started) {
if(this.documentDrag === true && this.documentEvents) {
this.adjustXY(evt);
this.removeDocumentEvents();
}
var dragged = (this.start != this.last);
this.started = false;
this.dragging = false;
OpenLayers.Element.removeClass(
this.map.viewPortDiv, "olDragDown"
);
this.up(evt);
this.callback("up", [evt.xy]);
if(dragged) {
this.callback("done", [evt.xy]);
}
document.onselectstart = this.oldOnselectstart;
}
return true;
},
/**
* The four methods below (down, move, up, and out) are used by subclasses
* to do their own processing related to these mouse events.
*/
/**
* Method: down
* This method is called during the handling of the mouse down event.
* Subclasses can do their own processing here.
*
* Parameters:
* evt - {Event} The mouse down event
*/
down: function(evt) {
},
/**
* Method: move
* This method is called during the handling of the mouse move event.
* Subclasses can do their own processing here.
*
* Parameters:
* evt - {Event} The mouse move event
*
*/
move: function(evt) {
},
/**
* Method: up
* This method is called during the handling of the mouse up event.
* Subclasses can do their own processing here.
*
* Parameters:
* evt - {Event} The mouse up event
*/
up: function(evt) {
},
/**
* Method: out
* This method is called during the handling of the mouse out event.
* Subclasses can do their own processing here.
*
* Parameters:
* evt - {Event} The mouse out event
*/
out: function(evt) {
},
/**
* The methods below are part of the magic of event handling. Because
* they are named like browser events, they are registered as listeners
* for the events they represent.
*/
/**
* Method: mousedown
* Handle mousedown events
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
mousedown: function(evt) {
return this.dragstart(evt);
},
/**
* Method: touchstart
* Handle touchstart events
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
touchstart: function(evt) {
this.startTouch();
return this.dragstart(evt);
},
/**
* Method: mousemove
* Handle mousemove events
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
mousemove: function(evt) {
return this.dragmove(evt);
},
/**
* Method: touchmove
* Handle touchmove events
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
touchmove: function(evt) {
return this.dragmove(evt);
},
/**
* Method: removeTimeout
* Private. Called by mousemove() to remove the drag timeout.
*/
removeTimeout: function() {
this.timeoutId = null;
// if timeout expires while we're still dragging (mouseup
// hasn't occurred) then call mousemove to move to the
// correct position
if(this.dragging) {
this.mousemove(this.lastMoveEvt);
}
},
/**
* Method: mouseup
* Handle mouseup events
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
mouseup: function(evt) {
return this.dragend(evt);
},
/**
* Method: touchend
* Handle touchend events
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
touchend: function(evt) {
// override evt.xy with last position since touchend does not have
// any touch position
evt.xy = this.last;
return this.dragend(evt);
},
/**
* Method: mouseout
* Handle mouseout events
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
mouseout: function (evt) {
if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
if(this.documentDrag === true) {
this.addDocumentEvents();
} else {
var dragged = (this.start != this.last);
this.started = false;
this.dragging = false;
OpenLayers.Element.removeClass(
this.map.viewPortDiv, "olDragDown"
);
this.out(evt);
this.callback("out", []);
if(dragged) {
this.callback("done", [evt.xy]);
}
if(document.onselectstart) {
document.onselectstart = this.oldOnselectstart;
}
}
}
return true;
},
/**
* Method: click
* The drag handler captures the click event. If something else registers
* for clicks on the same element, its listener will not be called
* after a drag.
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
click: function (evt) {
// let the click event propagate only if the mouse moved
return (this.start == this.last);
},
/**
* Method: activate
* Activate the handler.
*
* Returns:
* {Boolean} The handler was successfully activated.
*/
activate: function() {
var activated = false;
if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
this.dragging = false;
activated = true;
}
return activated;
},
/**
* Method: deactivate
* Deactivate the handler.
*
* Returns:
* {Boolean} The handler was successfully deactivated.
*/
deactivate: function() {
var deactivated = false;
if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
this.started = false;
this.dragging = false;
this.start = null;
this.last = null;
deactivated = true;
OpenLayers.Element.removeClass(
this.map.viewPortDiv, "olDragDown"
);
}
return deactivated;
},
/**
* Method: adjustXY
* Converts event coordinates that are relative to the document body to
* ones that are relative to the map viewport. The latter is the default in
* OpenLayers.
*
* Parameters:
* evt - {Object}
*/
adjustXY: function(evt) {
var pos = OpenLayers.Util.pagePosition(this.map.viewPortDiv);
evt.xy.x -= pos[0];
evt.xy.y -= pos[1];
},
/**
* Method: addDocumentEvents
* Start observing document events when documentDrag is true and the mouse
* cursor leaves the map viewport while dragging.
*/
addDocumentEvents: function() {
OpenLayers.Element.addClass(document.body, "olDragDown");
this.documentEvents = true;
OpenLayers.Event.observe(document, "mousemove", this._docMove);
OpenLayers.Event.observe(document, "mouseup", this._docUp);
},
/**
* Method: removeDocumentEvents
* Stops observing document events when documentDrag is true and the mouse
* cursor re-enters the map viewport while dragging.
*/
removeDocumentEvents: function() {
OpenLayers.Element.removeClass(document.body, "olDragDown");
this.documentEvents = false;
OpenLayers.Event.stopObserving(document, "mousemove", this._docMove);
OpenLayers.Event.stopObserving(document, "mouseup", this._docUp);
},
CLASS_NAME: "OpenLayers.Handler.Drag"
});
|
export let gamemode = false
import { loadingTuberList } from "./index.js"
const gameModeSwitch = document.querySelector("#gameModeSwitch")
const gameModeSwitchDot = document.querySelector("#gameModeSwitchDot")
const gameModeAlertPopupRoot = document.querySelector(".gameModeAlertPopupRoot")
if (localStorage["gamemode"] == undefined) {
localStorage["gamemode"] = "false"
gameModeSwitchDot.classList.add("switchOff")
gameModeSwitchDot.classList.remove("switchOn")
gamemode = false
console.log("Gamemode : false")
}
if (localStorage["gamemode"] == "true") {
gameModeSwitchDot.classList.add("switchOn")
gameModeSwitchDot.classList.remove("switchOff")
gamemode = true
console.log("Gamemode : true")
}
else {
gameModeSwitchDot.classList.add("switchOff")
gameModeSwitchDot.classList.remove("switchOn")
gamemode = false
console.log("Gamemode : false")
}
gameModeSwitch.addEventListener("click", () => {
if (!gamemode) {
gameModeSwitchDot.classList.add("switchOn")
gameModeSwitchDot.classList.remove("switchOff")
if (!loadingTuberList.length == 0) {
gameModeAlertPopupRoot.style.display = "block"
gameModeAlertPopupRoot.classList.add("showPopup")
gameModeAlertPopupRoot.classList.remove("hidePopup")
}
gamemode = true
localStorage["gamemode"] = "true"
console.log("Gamemode : true")
}
else {
gameModeSwitchDot.classList.add("switchOff")
gameModeSwitchDot.classList.remove("switchOn")
gamemode = false
localStorage["gamemode"] = "false"
console.log("Gamemode : false")
}
})
export function checkNoLoadingTuber() {
if (!loadingTuberList.length == 0) {return false}
gameModeAlertPopupRoot.classList.add("hidePopup")
gameModeAlertPopupRoot.classList.remove("showPopup")
setTimeout(() => {gameModeAlertPopupRoot.style.display = "none"}, 250)
} |
import React from 'react'
import { useMutation, useQuery, gql } from '@apollo/client'
import { makeStyles } from '@material-ui/core/styles'
import {
CssBaseline,
Container,
Grid,
Typography,
Box,
Link as MUILink,
Backdrop,
CircularProgress,
} from '@material-ui/core'
import { Header } from '../components/commons/Header'
import { Post } from '../components/timeLineComponents/Post'
import { CreatePost } from '../components/modals/CreatePost'
import { CreateUser } from '../components/modals/CreateUser'
// import { Link } from 'react-router-dom'
const useStyles = makeStyles((theme) => ({
card: {
width: '100%',
},
backdrop: {
zIndex: theme.zIndex.drawer + 1,
color: '#fff',
},
}))
function Copyright() {
return (
<Typography variant="body2" color="textSecondary" align="center">
{'Copyright © '}
<MUILink color="inherit" target="_blank" href="https://www.g5l.com.br/">
Gabriel
</MUILink>{' '}
{new Date().getFullYear()}
{'.'}
</Typography>
)
}
const GET_POSTS = gql`
{
Post {
postId
title
description
numberOfLikes
comments {
comment
author {
name
}
}
}
}
`
const ADD_POST = gql`
mutation CreatePost(
$title: String!
$description: String!
$numberOfLikes: Int!
) {
CreatePost(
title: $title
description: $description
numberOfLikes: $numberOfLikes
) {
title
description
numberOfLikes
}
}
`
const ADD_USER = gql`
mutation CreateUser($name: String!) {
CreateUser(name: $name) {
name
}
}
`
const INCREMENT_LIKE = gql`
mutation incrementLike($id: ID!, $likes: Int!) {
UpdatePost(postId: $id, numberOfLikes: $likes) {
postId
numberOfLikes
}
}
`
const ADD_COMMENT = gql`
mutation CreateComment($comment: String!) {
CreateComment(comment: $comment) {
commentId
}
}
`
const ADD_POST_COMMENT = gql`
mutation AddPostComments($from: _CommentInput!, $to: _PostInput!) {
AddPostComments(from: $from, to: $to) {
from {
comment
}
}
}
`
export const TimeLineContainer = () => {
const classes = useStyles()
const [openPostModal, setOpenPostModal] = React.useState(false)
const [openUserModal, setOpenUserModal] = React.useState(false)
const [title, setTitle] = React.useState()
const [description, setDescription] = React.useState()
const [name, setName] = React.useState()
const [expanded, setIdentifier] = React.useState(false)
const [comment, setComment] = React.useState()
const [addPost] = useMutation(ADD_POST)
const [addUser] = useMutation(ADD_USER)
const [addLike] = useMutation(INCREMENT_LIKE)
const [addComment] = useMutation(ADD_COMMENT)
const [AddPostComment] = useMutation(ADD_POST_COMMENT)
const handleOpenPostModal = () => {
setOpenPostModal(true)
}
const handleClosePostModal = () => {
setOpenPostModal(false)
}
const handleOpenUserModal = () => {
setOpenUserModal(true)
}
const handleCloseUserModa = () => {
setOpenUserModal(false)
}
const handleAddComment = (e, postId) => {
e.preventDefault()
e.target.reset()
addComment({
variables: { comment },
update: (cache, { data: { CreateComment } }) => {
const { commentId } = CreateComment
AddPostComment({
variables: { to: { postId }, from: { commentId } },
refetchQueries: [{ query: GET_POSTS }],
})
},
})
}
const handlePostSubmit = (event) => {
event.preventDefault()
addPost({
variables: { title, description, numberOfLikes: 0 },
refetchQueries: [{ query: GET_POSTS }],
update: () => {
handleClosePostModal()
},
})
}
const handleUserSubmit = (event) => {
event.preventDefault()
addUser({
variables: { name },
update: () => {
handleCloseUserModa()
},
})
}
const incrementLike = ({ id, likes }) => {
likes = likes + 1
addLike({
variables: { id, likes },
refetchQueries: [{ query: GET_POSTS }],
})
}
const { error, loading, data: postData } = useQuery(GET_POSTS)
if (error) return <p>Error</p>
if (loading) {
return (
<Backdrop className={classes.backdrop} open={true}>
<CircularProgress color="inherit" />
</Backdrop>
)
}
return (
<Container maxWidth="md">
<CssBaseline />
<Header
handleOpenPostModal={handleOpenPostModal}
handleOpenUserModal={handleOpenUserModal}
/>
<Grid container spacing={4}>
{postData.Post.map((post, index) => (
<Grid key={index} item md={6} sm={1} className={classes.card}>
<Post
post={post}
identifier={index}
expanded={index === expanded}
incrementLike={incrementLike}
setIdentifier={setIdentifier}
handleAddComment={handleAddComment}
setComment={setComment}
/>
</Grid>
))}
</Grid>
<Box pt={4}>
<Copyright />
</Box>
<CreatePost
isOpen={openPostModal}
handleSubmit={handlePostSubmit}
handleClose={handleOpenPostModal}
setDescription={setDescription}
setTitle={setTitle}
/>
<CreateUser
isOpen={openUserModal}
handleSubmit={handleUserSubmit}
handleClose={handleCloseUserModa}
setName={setName}
/>
</Container>
)
}
|
enchant();
window.onload = function() {
var game = new Game(320, 320);
game.onload = function() {
var button1 = new Button('Back'); // 左の項目に配置するボタンを作成
button1.ontouchend = function() {
alert('「Back」がタップされました。');
};
var button2 = new Button('Edit'); // 右の項目に配置するボタンを作成
button2.ontouchend = function() {
alert('「Edit」がタップされました。');
};
/*
* new NavigationBar(center, left, right)
* ナビゲーションバー(ボタンなどを設定できるメニューバー)を作成する。
* 中央、左、右の項目を設定できる。
*/
var navigationBar = new NavigationBar('Navigationbar', button1, button2); // ナビゲーションバーを作成
game.rootScene.addChild(navigationBar);
};
game.start();
};
|
export function isFn(value) {
return typeof value === "function";
}
export var isArray = Array.isArray;
export function assign(source, assignments) {
var result = {},
i;
for (i in source) result[i] = source[i];
for (i in assignments) result[i] = assignments[i];
return result;
}
export function omit(object, keys) {
var copy = {};
Object.keys(object)
.filter(function(key) {
return keys.indexOf(key) === -1;
})
.forEach(function(key) {
copy[key] = object[key];
});
return copy;
}
export function difference(source, exclude) {
return source.filter(function(currentValue) {
return exclude.indexOf(currentValue) === -1;
});
}
export function flatten(arr) {
return arr.reduce(function(out, obj) {
return out.concat(
!obj || obj === true ? false : isFn(obj[0]) ? [obj] : flatten(obj)
);
}, []);
}
|
const path = require('path')
const fs = require('fs-extra')
const build = require('../build')
const cheerio = require('cheerio')
const express = require('express')
const puppeteer = require('puppeteer')
const context = path.join(__dirname, '__fixtures__', 'project-path-prefix')
const content = file => fs.readFileSync(path.join(context, file), 'utf8')
const exists = file => fs.existsSync(path.join(context, file))
const load = file => cheerio.load(content(file))
const app = express()
let browser, page, server, pathPrefix
beforeAll(async () => {
const { config } = await build(context)
pathPrefix = config.pathPrefix
await fs.remove(path.join(context, 'public'))
await fs.copy(path.join(context, 'dist'), path.join(context, 'public', pathPrefix))
app.use(express.static(path.join(context, 'public')))
browser = await puppeteer.launch({ headless: false })
page = await browser.newPage()
server = app.listen(8080)
}, 20000)
afterAll(async () => {
server && await server.close()
browser && await browser.close()
await fs.remove(path.join(context, 'dist'))
await fs.remove(path.join(context, 'public'))
await fs.remove(path.join(context, 'src', '.temp'))
await fs.remove(path.join(context, '.cache'))
})
test('include pathPrefix in asset URLs', () => {
const $home = load('dist/index.html')
expect($home('.g-link-about').attr('href')).toEqual('/sub/-/dir/about')
expect($home('.g-link-home').attr('href')).toEqual('/sub/-/dir/')
expect($home('.g-image-test').data('src')).toEqual('/sub/-/dir/assets/static/test.97c148e.test.png')
expect($home('.g-link-file').attr('href')).toEqual('/sub/-/dir/assets/files/dummy.pdf')
expect($home('script[src="/sub/-/dir/assets/js/app.js"]').get().length).toEqual(1)
})
test('include pathPrefix in scripts', () => {
const appJS = content('dist/assets/js/app.js')
// __webpack_public_path__
expect(appJS).toMatch('__webpack_require__.p = "/sub/-/dir/"')
// stripPathPrefix(path) helper
expect(appJS).toMatch('publicPath = "/sub/-/dir/"')
// router base
expect(appJS).toMatch('base: "/sub/-/dir/"')
})
test('put assets in correct folder', () => {
expect(exists('dist/assets/files/dummy.pdf')).toEqual(true)
expect(exists('dist/assets/static/favicon.1539b60.test.png')).toEqual(true)
expect(exists('dist/assets/static/test.97c148e.test.png')).toEqual(true)
})
test('open homepage in browser', async () => {
await page.goto(`http://localhost:8080${pathPrefix}`, { waitUntil: 'networkidle2' })
await page.waitForSelector('#app.is-mounted')
})
test('navigate to /about', async () => {
await page.click('.g-link-about')
await page.waitForSelector('#app.about')
})
test('navigate to /', async () => {
await page.click('.g-link-home')
await page.waitForSelector('#app.home')
})
test('open /about/ directly', async () => {
await page.goto(`http://localhost:8080${pathPrefix}/about/`, { waitUntil: 'networkidle2' })
await page.waitForSelector('#app.is-mounted')
})
|
/* eslint-disable */
export default {
pages: {
key: "title",
data: [
{title: 'Home', url: '/admin/dashboard', icon: 'HomeIcon', is_bookmarked: false},
{title: 'Page 2', url: '/admin/page2', icon: 'FileIcon', is_bookmarked: false},
]
}
}
/* eslint-enable */
|
angular.module("app").controller('EmergencyController', function($scope, $rootScope, ApiService, $log, $filter, $timeout, $mdDialog, $sce) {
$scope.activeUser = $rootScope.activeUser;
$scope.moment = moment;
$scope.showNoEmergencyMsg = true;
$scope.formModeNew = true;
$scope.waitServer = true;
var resetCallersWatcher = $scope.$watch('callers', function () {});
$scope.getEventDate = function(ts){
return moment(ts).format('DD/MM/YYYY');
};
$scope.getEventTime = function(ts){
return moment(ts).format('HH:mm');
};
$scope.pages = [];
$scope.defaultIssue = function(){
return {
issue: '',
issueTime: '',
solution: '',
client: '',
clientId: '',
responseTime: '',
date: new Date(),
hour: '',
minutes:'',
caller: {}
};
};
$scope.defaultCaller = function(){
return {
name: '',
_id: '',
clientId: '',
clientName: '',
phone: [],
email: []
};
};
$scope.newIssue = new $scope.defaultIssue();
$scope.caller = new $scope.defaultCaller();
$scope.callers = [];
$scope.showEmergencyForm = function(isEdit){
if(!isEdit){
$scope.searchText = null;
$scope.callerSearchText = null;
$scope.phoneSearchText = null;
$scope.emailSearchText = null;
}
$scope.showNoEmergencyMsg = false;
$('#add-emergency').show(300);
};
$scope.hideEmergencyForm = function(){
$scope.searchText = null;
$scope.callerSearchText = null;
$scope.phoneSearchText = null;
$scope.emailSearchText = null;
$scope.showNoEmergencyMsg = true;
$('#add-emergency').hide(300);
};
var checkFormErrors = function(){
if(
!$scope.newIssue.passenger ||
$scope.newIssue.passenger.length===0 ||
!$scope.newIssue.issue ||
$scope.newIssue.issue.length<2 ||
!$scope.newIssue.solution ||
$scope.newIssue.solution.length<2
){
return false;
}else{
return true;
}
};
$scope.editIssue = function(emr){
$scope.emrEditing = emr;
$scope.showEmergencyForm(true);
for(var i=0;i<$scope.clientsList.length;i++){
if($scope.clientsList[i]._id === emr.clientId){
$scope.selectedItem = $scope.clientsList[i];
$scope.searchText = $scope.selectedItem.name;
}
}
$scope.formModeNew = false;
$scope.newIssue = emr;
$scope.newIssue.date = moment(emr.issueTime).toDate();
$scope.newIssue.hour = moment(emr.issueTime).hours();
$scope.newIssue.minutes = moment(emr.issueTime).minutes();
if(emr.callerName){
$scope.newIssue.caller = {
name: emr.callerName,
phone: emr.callerPhone,
email: emr.callerEmail
};
}
$scope.$watch('callers', function (newt,oldt) {
if(newt !== oldt && $scope.emrEditing){
var scls = $scope.callers;
var callerFound, callerPhoneFound, callerEmailFound;
for(var i=0;i<scls.length;i++){
if(scls[i].name === emr.callerName){
callerFound = scls[i];
$scope.newIssue.caller._id = callerFound._id;
$scope.caller = callerFound;
$scope.selectedCaller = callerFound;
for(var j=0;j<callerFound.phone.length;j++){
if(callerFound.phone[j] === emr.callerPhone){
callerPhoneFound = emr.callerPhone;
}
}
for(var k=0;k<callerFound.email.length;k++){
if(callerFound.email[k] === emr.callerEmail){
callerEmailFound = emr.callerEmail;
}
}
}
}
if(callerPhoneFound){
$timeout(function(){
$scope.selectedPhone = callerPhoneFound;
},200);
}else{
$scope.phoneSearchText = emr.callerPhone;
}
if(callerEmailFound){
$timeout(function(){
$scope.selectedEmail = callerEmailFound;
},200);
}else{
$scope.emailSearchText = emr.callerEmail;
}
}
});
};
ApiService.get('issues', {params: $.param({skip: 0,limit:50})}, function(res){
$scope.waitServer = false;
if(res.success === true){
$scope.emergencies = res.data;
}else{
console.log('error');
}
});
var selectedItem;
var createIssue = function(issue){
issue.caller = {};
if($scope.caller._id.length>0){
issue.caller._id = $scope.caller._id;
}
if($scope.phoneSearchText && $scope.phoneSearchText.length>2){
issue.caller.phone = $scope.phoneSearchText;
}
if($scope.emailSearchText && $scope.emailSearchText.length>2){
issue.caller.email = $scope.emailSearchText;
}
issue.caller.name = $scope.callerSearchText;
ApiService.post('issue', issue , function(res){
$scope.waitServer = false;
if(res.success === true){
$scope.emergencies.unshift(res.data);
}else{
console.log('error');
}
$scope.dismissEdit();
});
};
$scope.createIssue = function(){
if(!checkFormErrors()){
return false;
}
$scope.formModeNew = true;
var issue = $scope.newIssue;
issue.issueTime = moment($scope.newIssue.date).set('hour', $scope.newIssue.hour).set('minute', $scope.newIssue.minutes).unix()*1000;
issue.user = $scope.activeUser.user;
issue.userId = $scope.activeUser._id;
/* delete issue.date;
delete issue.hour;
delete issue.minutes;*/
$scope.waitServer = true;
if($scope.searchText.length>2){
if(selectedItem == null){
$scope.waitServer = true;
ApiService.post('client', {name: $scope.searchText} , function(res){
$scope.waitServer = false;
if(res.success === true){
issue.client = res.data.name;
issue.clientId = res.data._id;
$scope.clientsList.unshift(res.data);
createIssue(issue);
}else{
console.log('error');
}
});
}else{
issue.client = selectedItem.name;
issue.clientId = selectedItem._id;
createIssue(issue);
}
}
};
$scope.removeIssue = function(emr){
$scope.waitServer = true;
ApiService.remove('issue', {_id: emr._id} , function(res){
$scope.waitServer = false;
if(res.success === true){
var oldemr = $scope.emergencies;
var newemr = [];
for(var i=0;i<oldemr.length;i++){
if(oldemr[i]._id !== emr._id){
newemr.push(oldemr[i]);
}
}
$scope.emergencies = newemr;
}else{
console.log('error');
}
});
};
var updateIssue = function(issue){
ApiService.put('issue',issue, function(res){
$scope.waitServer = false;
$scope.dismissEdit();
});
};
$scope.updateIssue = function(){
if(!checkFormErrors()){
return false;
}
if(!$scope.selectedCaller){
$scope.newIssue.caller.name = $scope.callerSearchText;
delete $scope.newIssue.caller._id;
}
var issue = $scope.newIssue;
issue.callerName = $scope.callerSearchText;
if($scope.phoneSearchText && $scope.phoneSearchText.length>2){
$scope.newIssue.caller.phone = $scope.phoneSearchText;
issue.callerPhone = $scope.phoneSearchText;
}else{
issue.callerPhone = $scope.newIssue.caller.phone;
}
if($scope.emailSearchText && $scope.emailSearchText.length>2){
$scope.newIssue.caller.email = $scope.emailSearchText;
issue.callerEmail = $scope.emailSearchText;
}else{
issue.callerEmail = $scope.newIssue.caller.email;
}
issue.issueTime = moment($scope.newIssue.date).set('hour', $scope.newIssue.hour).set('minute', $scope.newIssue.minutes).unix()*1000;
issue.user = $scope.activeUser.user;
issue.userId = $scope.activeUser._id;
issue._id = $scope.emrEditing._id;
delete issue.date;
delete issue.hour;
delete issue.minutes;
$scope.waitServer = true;
if(selectedItem == null && $scope.searchText){
if($scope.searchText.length>2){
$scope.waitServer = true;
ApiService.post('client', {name: $scope.searchText} , function(res){
$scope.waitServer = false;
if(res.success === true){
issue.client = res.data.name;
issue.clientId = res.data._id;
$scope.clientsList.unshift(res.data);
updateIssue(issue);
}else{
console.log('error');
}
});
}
}else{
issue.client = selectedItem.name;
issue.clientId = selectedItem._id;
updateIssue(issue);
}
};
$scope.dismissEdit = function(){
$scope.hideEmergencyForm();
$timeout(function(){
resetCallersWatcher();
$scope.formModeNew = true;
$scope.emrEditing = null;
selectedItem = null;
$scope.selectedItem = null;
$scope.selectedCaller = null;
$scope.selectedPhone = null;
$scope.selectedEmail = null;
$scope.searchText = null;
$scope.callerSearchText = null;
$scope.phoneSearchText = null;
$scope.emailSearchText = null;
$scope.newIssue = new $scope.defaultIssue();
$scope.caller = new $scope.defaultCaller();
$scope.newIssue.caller = {};
$scope.callers = [];
$scope.newIssue.user = $scope.activeUser;
$scope.foundItemsLength = -1;
},1400);
};
$scope.showCallerDetails = function(ev,iss) {
var dContent = '';
if(iss.callerPhone && iss.callerPhone.length>0){
dContent += 'Telefon: '+iss.callerPhone+'<br/>';
}
if(iss.callerEmail && iss.callerEmail.length>0){
dContent += 'Email: <a href="mailto:'+iss.callerEmail+'">'+iss.callerEmail+'</a><br/>';
}
dContent = $sce.trustAsHtml(dContent);
var dTemplate =
'<md-dialog aria-label="Datele apelantului">' +
' <md-dialog-content class="md-dialog-content">'+
' <h2 class="md-title">'+iss.callerName+'</h2>'+
' '+dContent+
' </md-dialog-content>' +
' <md-dialog-actions>' +
' <md-button ng-click="closeDialog()" class="md-primary">' +
' Ok' +
' </md-button>' +
' </md-dialog-actions>' +
'</md-dialog>';
$mdDialog.show(
$mdDialog.alert({
template: dTemplate,
clickOutsideToClose: true,
targetEvent: ev,
controller: function DialogController($scope, $mdDialog) {
$scope.closeDialog = function() {
$mdDialog.hide();
};
}
})
);
};
var selectedIssueLog = null, oldSelectedHistory;
var DialogController = function($scope, $mdDialog) {
oldSelectedHistory = [];
$scope.displayNewIssue = null;
$scope.newLogIssue = {};
$scope.getEventDate = function(ts){
return moment(ts).format('DD/MM/YYYY');
};
$scope.closeIssueEdit = function(issedit){
issedit.issueTime = moment(issedit.date).set('hour', issedit.hour).set('minute', issedit.minutes).unix()*1000;
issedit.enabled = false;
};
$scope.newIssueAdd = function(){
var nli = $scope.newLogIssue;
nli.issueTime = moment(nli.date).set('hour', nli.hour).set('minute', nli.minutes).unix()*1000;
$scope.selectedIssueLog.history.push(nli);
$scope.showNewIssue(false);
};
$scope.removeItem = function(index){
$scope.selectedIssueLog.history.splice(index, 1);
};
$scope.showNewIssue = function(show){
if(show){
$scope.displayNewIssue = true;
}else{
$scope.displayNewIssue = null;
}
};
$scope.getEventTime = function(ts){
return moment(ts).format('HH:mm').split(':');
};
for(var j=0;j<selectedIssueLog.history.length;j++){
oldSelectedHistory.push(selectedIssueLog.history[j]);
}
$scope.selectedIssueLog = selectedIssueLog;
$scope.activeUser = selectedIssueLog.activeUser;
$scope.closeWithSave = function(answer) {
if(answer){
_.indexBy($scope.selectedIssueLog.history,'issueTime');
ApiService.put('issuelog',{_id: $scope.selectedIssueLog,history: selectedIssueLog.history}, function(res){
$mdDialog.hide();
});
}else{
$scope.selectedIssueLog.history = oldSelectedHistory;
$mdDialog.hide();
}
};
};
$scope.getResponseSum = function(emr){
var rt = 0;
for(var i=0; i<emr.history.length; i++){
rt += emr.history[i].responseTime;
}
return rt;
};
$scope.showIssueLog = function(ev, emr) {
selectedIssueLog = emr;
selectedIssueLog.activeUser = $scope.activeUser;
_.indexBy(selectedIssueLog.history,'issueTime');
for(var i=0; i<selectedIssueLog.history.length;i++){
var it = selectedIssueLog.history[i];
it.date = moment(it.issueTime).toDate();
it.hour = moment(it.issueTime).hours();
it.minutes = moment(it.issueTime).minutes();
}
$mdDialog.show({
controller: DialogController,
templateUrl: 'dialogues/issue_history.html',
targetEvent: ev,
clickOutsideToClose:true
});
};
/* Callers management */
$scope.getCallers = function(clientId){
ApiService.get('callers',{params: $.param({clientId: clientId})} , function(res){
$scope.waitServer = false;
if(res.success === true){
$scope.callerSearchText = null;
$scope.phoneSearchText = null;
$scope.emailSearchText = null;
$scope.callers = res.data;
}else{
console.log('error');
}
});
};
/* Autocomplete */
ApiService.get('clients', function(res){
$scope.waitServer = false;
if(res.success === true){
$scope.clientsList = res.data;
}else{
console.log('error');
}
});
/* Client autocomplete */
$scope.selectedItemChange = function (item) {
selectedItem = item;
$scope.caller = new $scope.defaultCaller();
if(!selectedItem){
$scope.callerSearchText = '';
$scope.phoneSearchText = '';
$scope.emailSearchText = '';
}else{
$scope.getCallers(item._id);
}
};
$scope.foundItemsLength = -1;
$scope.searchTextChange = function (text) {
$scope.foundItemsLength = $filter('filter')($scope.clientsList, {name: text}).length;
if(text === ''){
$scope.foundItemsLength = -1;
}
};
/* Caller autocomplete */
$scope.foundCallersLength = -1;
$scope.searchCallerTextChange = function (text) {
$scope.foundCallersLength = $filter('filter')($scope.callers, {name: text}).length;
if(text === ''){
$scope.foundCallersLength = -1;
}
};
$scope.selectedCallerChange = function (item) {
if(!item){
$scope.caller = new $scope.defaultCaller();
}else{
$scope.caller = item;
$scope.newIssue.caller.name = item.name;
$scope.newIssue.caller._id = item._id;
}
$scope.phoneSearchText = '';
$scope.emailSearchText = '';
};
/* Caller phone autocomplete */
$scope.foundPhonesLength = -1;
$scope.searchCallerPhoneChange = function (text) {
$scope.foundPhonesLength = $filter('filter')($scope.caller.phone, text).length;
if(text === ''){
$scope.foundPhonesLength = -1;
}
};
$scope.selectedPhoneChange = function (item) {
if(!item){
$scope.newIssue.caller.phone = '';
}else{
$scope.newIssue.caller.phone = item;
}
};
/* Caller phone autocomplete */
$scope.foundEmailsLength = -1;
$scope.searchCallerEmailChange = function (text) {
$scope.foundEmailsLength = $filter('filter')($scope.caller.email, text).length;
if(text === ''){
$scope.foundEmailsLength = -1;
}
};
$scope.selectedEmailChange = function (item) {
if(!item){
$scope.newIssue.caller.email = '';
}else{
$scope.newIssue.caller.email = item;
}
};
}); |
import React from 'react'
import {
ListItem,
ListItemText,
Typography,
makeStyles
} from '@material-ui/core'
import { Grow } from '.'
const useStyles = makeStyles(theme => ({
primaryText: {
display: 'flex',
alignItems: 'center'
},
}))
export default ({ title, date, summary, author, onClick }) => {
const classes = useStyles()
return (
<ListItem button onClick={onClick}>
<ListItemText
primary={
<div className={classes.primaryText}>
<Typography variant="body1">
{title}
</Typography>
<Grow />
<Typography variant="caption">
{date.toLocaleDateString()}
</Typography>
</div>
}
secondary={`${summary} - By ${author}`}
/>
</ListItem>
)
}
|
'use strict'
const { JoiRG } = require('../helpers')
const { log } = require('../../handlers/logHandlers')
const { PATH_SCHEMA } = require('../schemas')
const dd = require('dedent')
const filterSchema = JoiRG.string().filter().empty('')
const reqBodySchema = JoiRG.object().keys({
path: PATH_SCHEMA,
postFilter: filterSchema
})
module.exports = router => {
buildEndpoint(router.get('/log', processLogRequest, 'logGet'))
.queryParam('path', PATH_SCHEMA, 'The path pattern to pick nodes whose logs should be returned.')
.queryParam('postFilter', filterSchema, 'The optional post-filter expression to apply on the log.')
.summary('Get event logs (path & postFilter param in query).')
buildEndpoint(router.post('/log', processLogRequest, 'logPost'))
.body(reqBodySchema, dd`
The path pattern to pick nodes whose logs should be returned, and the optional post-filter expression to
apply on them. (e.g. \`{"path": "/c/*raw_data*", "postFilter": "x == 2 && y < 1"}\`)
`)
.summary('Get event logs (path & postFilter param in body).')
console.debug('Loaded "log" routes')
}
function processLogRequest (req, res) {
res.status(200).json(log(req))
}
function buildEndpoint (endpoint) {
return endpoint
.queryParam('since', JoiRG.number(), dd`
The unix timestamp (sec) starting from which to return events (inclusive). Precision: 0.1μs.
Example: since=1581583228.2800217
`)
.queryParam('until', JoiRG.number(), dd`
The unix timestamp (sec) until which to return events (exclusive). Precision: 0.1μs.
Example: until=1581583228.2800217
`)
.queryParam('sort', JoiRG.string().valid('asc', 'desc'), dd`
The outer/primary sort order of records in the result set, sorted by \`event.ctime\` (\`groupBy==null\`) or
aggregation key (\`groupBy\` is not \`null\` and \`countsOnly\` is \`false\`) or aggregated total
(\`groupBy\` is not null and \`countsOnly\` is \`true\`). Default: \`desc\` for \`event.ctime\` or
aggregated total, \`asc\` otherwise.
`)
.queryParam('skip', JoiRG.number().integer().min(0),
'The number records to skip/omit from the result set, starting from the first. Falsey implies none.')
.queryParam('limit', JoiRG.number().integer().min(0),
'The number records to keep in the result set, starting from `skip` or `0`. Falsey implies all.')
.queryParam('groupBy', JoiRG.string().valid('node', 'collection', 'event', 'type'), dd`
The parameter on which to group records in the result set. One of \`node\`, \`collection\`, \`event\` or
\`type\`.
`)
.queryParam('countsOnly', JoiRG.boolean(), dd`
If \`groupBy\` is specified, this parameter determines whether to return aggregated event totals
(\`countsOnly==true\`), or entire event lists per group (\`countsOnly==false\`).
`)
.queryParam('groupSort', JoiRG.string().valid('asc', 'desc'), dd`
The inner/secondary sort order of records in a group (if \`groupBy\` is specified and \`countsOnly\` is
falsey), sorted by \`event.ctime\`. Default: \`desc\`.
`)
.queryParam('groupSkip', JoiRG.number().integer().min(0), dd`
The number records to skip/omit from each group of the result set (if \`groupBy\` is specified and
\`countsOnly\` is falsey), starting from the first. Falsey implies none.
`)
.queryParam('groupLimit', JoiRG.number().integer().min(0), dd`
The number records to keep in each group of the result set (if \`groupBy\` is specified and \`countsOnly\`
is falsey), starting from \`groupSkip\` or \`0\`. Falsey implies all.
`)
.response(200, ['application/json'], 'The log was successfully generated.')
.error(400, 'Invalid request body/params. Response body contains the error details.')
.error(500, 'The operation failed.')
.description(dd`
Returns event logs for nodes matching the given path pattern and the
aggregating/sorting/slicing/post-filter constraints.
Also see:
1. https://docs.recallgraph.tech/getting-started/terminology#event
2. https://docs.recallgraph.tech/getting-started/terminology#path
3. https://docs.recallgraph.tech/getting-started/terminology/grouping
4. https://docs.recallgraph.tech/getting-started/terminology/sorting
5. https://docs.recallgraph.tech/getting-started/terminology/slicing
6. https://docs.recallgraph.tech/getting-started/terminology/post-filters
`)
.tag('Event')
}
|
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import viewsets
from rest_framework.authentication import TokenAuthentication
from rest_framework import filters
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
from rest_framework.permissions import IsAuthenticated
from profiles_api import serializers
from profiles_api import models
from profiles_api import permissions
class HelloApiView(APIView):
"""Test API view"""
serializer_class = serializers.HelloSerializer
def get(self, request, format=None):
"""Return a list of APIView features"""
an_apiview = [
'Uses HTTP methods as function (get, post, patch, put, delete)',
'Is similar to a traditional Django View',
'Gives you the most control over your application logic',
'Is mapped manually to URLs',
]
return Response({'message' : 'Hello!', 'an_apiview' : an_apiview})
def post(self, request):
"""Create a hello message with our name"""
serializer = self.serializer_class(data=request.data)
if serializer.is_valid():
name = serializer.validated_data.get('name')
message = f'Hello {name}'
return Response({'message':message})
else:
return Response(
serializer.errors,
status = status.HTTP_400_BAD_REQUEST
)
def put(self, request, pk=None):
"""Handle updating an object"""
return Response({'method': 'PUT'})
def patch(self, request, pk=None):
"""Handle a partial update of an object"""
return Response({'method': 'PATCH'})
def delete(self, request, pk=None):
"""Delete an object"""
return Response({'method': 'DELETE'})
class HelloViewSet(viewsets.ViewSet):
"""test API ViewSet"""
serializer_class = serializers.HelloSerializer
def list(self, request):
"""Return a hello message"""
a_viewset = [
'Uses actions (list, create, retreive, update, partial_update)',
'Automatically maps to URLs using Routers',
'Provides more fuctionality with less code',
]
return Response({'message':'Hello!', 'a_viewset': a_viewset})
def create(self, request):
"""Create a new hello maessage"""
serializer = self.serializer_class(data=request.data)
if serializer.is_valid():
name = serializer.validated_data.get('name')
message = f'Hello {name}!'
return Response({'message':message})
else:
return Response(
serializer.errors,
status = status.HTTP_400_BAD_REQUEST
)
def retrieve(self, request, pk=None):
"""handle getting an object by it's ID"""
return Response({'http_method':'GET'})
def update(self, request, pk=None):
"""Handle updating an object"""
return Response({'http_method':'PUT'})
def partial_update(self, request, pk=None):
"""Handle updating part of an object"""
return Response({'http_method':'PATCH'})
def destroy(self, request, pk=None):
"""handle removing an object"""
return Response({'http_method':'DELETE'})
class UserProfileViewSet(viewsets.ModelViewSet):
"""Handle creating and updating profiles"""
serializer_class = serializers.UserProfileSerializer
queryset = models.UserProfile.objects.all()
authentication_classes = (TokenAuthentication,)
permission_classes = (permissions.UpdateOwnProfile,)
filter_backends = (filters.SearchFilter,)
search_fields = ('name', 'email',)
class UserLoginApiView(ObtainAuthToken):
"""Handle creating user authentication tokens"""
renderer_classes = api_settings.DEFAULT_RENDERER_CLASSES
class UserProfileFeedViewSet(viewsets.ModelViewSet):
"""Handles creating, reading and updating profile feed items"""
authentication_classes = (TokenAuthentication,)
serializer_class = serializers.ProfileFeedItemSerializer
queryset = models.ProfileFeedItem.objects.all()
permission_classes = (permissions.UpdateOwnStatus, IsAuthenticated)
def perform_create(self, serializer):
"""Sets the user profile to the logged in user"""
serializer.save(user_profile=self.request.user)
|
import IndexPage from './page-model';
fixture `Index page`
.page('http://localhost:4000');
const page = new IndexPage();
test('first test', async t => {
{{#if_not bfui}}
await t.expect(page.counter.innerText).contains('1')
.click(page.increment)
.expect(page.counter.innerText).contains('2')
.click(page.desrement)
.expect(page.counter.innerText).contains('1');
{{/if_not}}
{{#bfui}}
await t.expect(page.counter.innerText).contains('1')
.click(page.increment)
.expect(page.counter.innerText).contains('2')
.click(page.desrement)
.expect(page.counter.innerText).contains('1');
{{/bfui}}
});
|
import { Meteor } from 'meteor/meteor';
import _ from 'underscore';
import { Users } from '../../app/models';
Meteor.publish('userAutocomplete', function(selector) {
if (!this.userId) {
return this.ready();
}
if (!_.isObject(selector)) {
return this.ready();
}
const options = {
fields: {
name: 1,
username: 1,
status: 1,
},
sort: {
username: 1,
},
limit: 10,
};
const pub = this;
const exceptions = selector.exceptions || [];
const cursorHandle = Users.findActiveByUsernameOrNameRegexWithExceptions(selector.term, exceptions, options).observeChanges({
added(_id, record) {
return pub.added('autocompleteRecords', _id, record);
},
changed(_id, record) {
return pub.changed('autocompleteRecords', _id, record);
},
removed(_id, record) {
return pub.removed('autocompleteRecords', _id, record);
},
});
this.ready();
this.onStop(function() {
return cursorHandle.stop();
});
});
|
Vue.component('titulo', {
template: /*html*/
`
<div>
<h1>Numero: {{ numero }} </h1>
<hijo></hijo>
</div>
`,
computed: {
// numero(){
// return store.state.numero
// }
...Vuex.mapState(['numero'])
},
});
Vue.component('hijo', {
template: /*html*/
`
<div>
<button @click="aumentar">+</button>
<button @click="disminuir(2)">-</button>
<h1>Numero: {{ numero }} </h1>
</div>
`,
computed: {
...Vuex.mapState(['numero'])
},
methods: {
...Vuex.mapMutations(['aumentar', 'disminuir'])
},
});
const store = new Vuex.Store({
state: {
numero: 10
},
mutations: {
aumentar(state) {
state.numero ++
},
disminuir(state, n) {
state.numero -= n
}
}
});
new Vue({
el: '#app',
store: store
}) |
import React from "react";
import Popup from "../../src/Popup";
export default class ControlledPopup extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<Popup
trigger={<button className="button">Controlled Tooltip </button>}
position="right center"
//open={this.state.open}
closeOnDocumentClick
// onClose={this.closeModal}
>
{close => (
<div className="modal">
<a className="close" onClick={close}>
× remove
</a>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Beatae
magni omnis delectus nemo, maxime molestiae dolorem numquam
mollitia, voluptate ea, accusamus excepturi deleniti ratione
sapiente! Laudantium, aperiam doloribus. Odit, aut.
</div>
)}
</Popup>
);
}
}
|
// COPYRIGHT © 201 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute and use this code without modification,
// provided you adhere to the terms of the MLA and include this
// copyright notice.
//
// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
//
// For additional information, contact:
// Environmental Systems Research Institute, Inc.
// Attn: Contracts and Legal Services Department
// 380 New York Street
// Redlands, California, USA 92373
// USA
//
// email: [email protected]
//
// See http://js.arcgis.com/3.34/esri/copyright.txt for details.
define({relationalDS:"สัมพันธ์",spatialDS:"อุณหภูมิเชิงพื้นที่",agsDataStore:"ArcGIS Data Store",bdfsTemplates:"เทมเพลตผลลัพธ์สำหรับแชร์ไฟล์ข้อมูลขนาดใหญ่"}); |
const log = require('electron-log');
const fs = require('fs');
const path = require('path');
const app = require('electron').app; // eslint-disable-line
const isDev = process.env.NODE_ENV === 'development';
const isProd = process.env.NODE_ENV === 'production';
function getBinDir() {
// Use project base dir for development.
return isDev ? './' : process.resourcesPath;
}
function getLogDir() {
const p = isDev ? './logs' : path.join(app.getPath('userData'), 'logs');
// Ensure path exists.
// TODO: handle error better.
fs.mkdir(p, (e) => {
if (e && e.code !== 'EEXIST') {
log.error('Could not create log dir', p, e);
}
});
return p;
}
function checkExists(target) {
return new Promise((resolve) => {
fs.access(target, fs.constants.R_OK | fs.constants.X_OK, (err) => {
if (err) {
resolve(false);
} else {
fs.stat(target, (e, stat) => {
if (e) {
resolve(false);
} else if (!stat.isFile() || stat.size === 0) {
resolve(false);
} else {
resolve(true);
}
});
}
});
});
}
function deleteIfExists(filePath) {
return new Promise((resolve, reject) => {
fs.access(filePath, fs.constants.W_OK, (err) => {
if (err) {
resolve('not_exists');
} else {
fs.unlink(filePath, (err2) => {
if (err2) {
log.error('Failed to delete', filePath, err);
reject(err2);
} else {
resolve('deleted');
}
});
}
});
});
}
const knownChains = [
{ name: 'mainnet', id: 61 },
{ name: 'morden', id: 62 },
{ name: 'eth', id: 1 },
];
function isValidChain(chain) {
const found = knownChains.filter((c) => c.name === chain.name && c.id === parseInt(chain.id, 10));
return found.length === 1;
}
const URL_FOR_CHAIN = {
mainnet: {
launchType: 3,
url: 'https://web3.emeraldwallet.io/etc',
type: 'remote',
},
morden: {
launchType: 3,
url: 'https://web3.emeraldwallet.io/morden',
type: 'remote',
},
eth: {
launchType: 3,
url: 'https://web3.emeraldwallet.io/eth',
type: 'remote',
},
};
module.exports = {
checkExists,
deleteIfExists,
getBinDir,
getLogDir,
isValidChain,
URL_FOR_CHAIN,
};
|
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _default = (0, _createSvgIcon.default)(_react.default.createElement(_react.default.Fragment, null, _react.default.createElement("path", {
fill: "none",
d: "M0 0h24v24H0V0z"
}), _react.default.createElement("path", {
d: "M20 6.83V19c0 .55-.45 1-1 1H6.83L20 6.83m.29-3.12L3.71 20.29c-.63.63-.19 1.71.7 1.71H20c1.1 0 2-.9 2-2V4.41c0-.89-1.08-1.33-1.71-.7z"
})), 'SignalCellularNullRounded');
exports.default = _default; |
/**
* Created by Vicky on 6/10/2017.
*/
function occurences(sentence, word) {
let regex = new RegExp("\\b"+word + "\\b", "gi");
if(sentence.match(regex)==null){
return 0;
}else {
return sentence.match(regex).length;
}
}
console.log(occurences('The waterfall was so high, that the child couldn’t see its peak.',
'the'));
; |
"use strict"
const chai = require("chai")
const assert = chai.assert
const nock = require("nock") // HTTP mocking
// Used for debugging.
const util = require("util")
util.inspect.defaultOptions = { depth: 1 }
// Mocking data.
const { mockReq, mockRes, mockNext } = require("./mocks/express-mocks")
// Libraries under test
const rateLimitMiddleware = require("../../src/middleware/route-ratelimit")
const controlRoute = require("../../src/routes/v2/control")
let req, res, next
let originalEnvVars // Used during transition from integration to unit tests.
describe("#route-ratelimits", () => {
before(() => {
// Save existing environment variables.
originalEnvVars = {
BITCOINCOM_BASEURL: process.env.BITCOINCOM_BASEURL,
RPC_BASEURL: process.env.RPC_BASEURL,
RPC_USERNAME: process.env.RPC_USERNAME,
RPC_PASSWORD: process.env.RPC_PASSWORD
}
})
// Setup the mocks before each test.
beforeEach(() => {
// Mock the req and res objects used by Express routes.
req = mockReq
res = mockRes
next = mockNext
// Explicitly reset the parmas and body.
req.params = {}
req.body = {}
req.query = {}
})
describe("#routeRateLimit", () => {
const routeRateLimit = rateLimitMiddleware.routeRateLimit
const getInfo = controlRoute.testableComponents.getInfo
/*
it("should pass through rate-limit middleware", async () => {
req.baseUrl = "/v2"
req.path = "/control/getInfo"
req.method = "GET"
await routeRateLimit(req, res, next)
// next() will be called if rate-limit is not triggered
assert.equal(next.called, true)
})
it("should trigger rate-limit handler if rate limits exceeds 60 request per minute", async () => {
req.baseUrl = "/v2"
req.path = "/control/getInfo"
req.method = "GET"
for (let i = 0; i < 65; i++) {
next.reset() // reset the stubbed next() function.
await routeRateLimit(req, res, next)
//console.log(`next() called: ${next.called}`)
}
// Note: next() will be called unless the rate-limit kicks in.
assert.equal(
next.called,
false,
`next should not be called if rate limit was triggered.`
)
})
*/
/*
it("should NOT trigger rate-limit handler for pro-tier at 65 RPM", async () => {
// Clear the require cache before running this test.
delete require.cache[
require.resolve("../../dist/middleware/route-ratelimit")
]
rateLimitMiddleware = require("../../dist/middleware/route-ratelimit")
routeRateLimit = rateLimitMiddleware.routeRateLimit
req.baseUrl = "/v2"
req.path = "/control/getInfo"
req.method = "GET"
req.locals.proLimit = true
//console.log(`req.locals before test: ${util.inspect(req.locals)}`)
// Prepare the authorization header
//req.headers.authorization = generateAuthHeader("BITBOX")
for (let i = 0; i < 65; i++) {
next.reset() // reset the stubbed next() function.
await routeRateLimit(req, res, next)
//console.log(`next() called: ${next.called}`)
}
//console.log(`req.locals after test: ${util.inspect(req.locals)}`)
// Note: next() will be called unless the rate-limit kicks in.
assert.equal(
next.called,
true,
`next should be called if rate limit was not triggered.`
)
})
it("rate-limiting should still kick in at a higher RPM for pro-tier", async () => {
// Clear the require cache before running this test.
delete require.cache[
require.resolve("../../dist/middleware/route-ratelimit")
]
rateLimitMiddleware = require("../../dist/middleware/route-ratelimit")
routeRateLimit = rateLimitMiddleware.routeRateLimit
req.baseUrl = "/v2"
req.path = "/control/getInfo"
req.method = "GET"
req.locals.proLimit = true
//console.log(`req.locals before test: ${util.inspect(req.locals)}`)
// Prepare the authorization header
//req.headers.authorization = generateAuthHeader("BITBOX")
for (let i = 0; i < 650; i++) {
next.reset() // reset the stubbed next() function.
await routeRateLimit(req, res, next)
//console.log(`next() called: ${next.called}`)
}
//console.log(`req.locals after test: ${util.inspect(req.locals)}`)
// Note: next() will be called unless the rate-limit kicks in.
assert.equal(
next.called,
false,
`next should NOT be called if rate limit was triggered.`
)
})
*/
})
})
// Generates a Basic authorization header.
function generateAuthHeader(pass) {
// https://en.wikipedia.org/wiki/Basic_access_authentication
const username = "BITBOX"
const combined = `${username}:${pass}`
var base64Credential = Buffer.from(combined).toString("base64")
var readyCredential = `Basic ${base64Credential}`
return readyCredential
}
|
const Command = require("../../util/Command.js");
class Reload extends Command {
constructor(client) {
super(client, {
name: "reload",
description: "Reloads a command that has been modified.",
category: "System",
usage: "reload <command>",
permLevel: "Bot Admin"
});
}
async run(message, args, level) {
if (!args[0]) return message.reply("you must provide a command to reload.");
const commands = this.client.commands.get(args[0]) || this.client.commands.get(this.client.aliases.get(args[0]));
if (!commands) return message.reply(`the command \`${args[0]}\` does not exist, nor is it an alias.`);
let response = await this.client.unloadCommand(commands.conf.location, commands.help.name);
if (response) return message.channel.send(`Error Unloading: \`${response}\`.`);
response = this.client.loadCommand(commands.conf.location, commands.help.name);
if (response) return message.channel.send(`Error loading: \`${response}\`.`);
message.channel.send(`The command \`${commands.help.name}\` has been reloaded.`);
}
}
module.exports = Reload;
|
import json
import unittest
from mock import Mock
from conans.client.generators.json_generator import JsonGenerator
from conans.model.build_info import CppInfo
from conans.model.conan_file import ConanFile
from conans.model.env_info import EnvValues, EnvInfo
from conans.model.ref import ConanFileReference
from conans.model.settings import Settings
from conans.model.user_info import UserInfo, DepsUserInfo
class JsonTest(unittest.TestCase):
def test_variables_setup(self):
conanfile = ConanFile(Mock(), None)
conanfile.initialize(Settings({}), EnvValues())
# Add some cpp_info for dependencies
ref = ConanFileReference.loads("MyPkg/0.1@lasote/stables")
cpp_info = CppInfo(ref.name, "dummy_root_folder1")
cpp_info.defines = ["MYDEFINE1"]
cpp_info.cflags.append("-Flag1=23")
cpp_info.version = "1.3"
cpp_info.description = "My cool description"
conanfile.deps_cpp_info.add(ref.name, cpp_info)
ref = ConanFileReference.loads("MyPkg2/0.1@lasote/stables")
cpp_info = CppInfo(ref.name, "dummy_root_folder2")
cpp_info.defines = ["MYDEFINE2"]
cpp_info.version = "2.3"
cpp_info.exelinkflags = ["-exelinkflag"]
cpp_info.sharedlinkflags = ["-sharedlinkflag"]
cpp_info.cxxflags = ["-cxxflag"]
cpp_info.public_deps = ["MyPkg"]
conanfile.deps_cpp_info.add(ref.name, cpp_info)
# Add env_info
env_info = EnvInfo()
env_info.VAR1 = "env_info-value1"
env_info.PATH.append("path-extended")
conanfile.deps_env_info.update(env_info, "env_info_pkg")
# Add user_info
user_info = UserInfo()
user_info.VAR1 = "user_info-value1"
conanfile.deps_user_info["user_info_pkg"] = user_info
# Add user_info_build
conanfile.user_info_build = DepsUserInfo()
user_info = UserInfo()
user_info.VAR1 = "user_info_build-value1"
conanfile.user_info_build["user_info_build_pkg"] = user_info
generator = JsonGenerator(conanfile)
json_out = generator.content
parsed = json.loads(json_out)
# Check dependencies
dependencies = parsed["dependencies"]
self.assertEqual(len(dependencies), 2)
my_pkg = dependencies[0]
self.assertEqual(my_pkg["name"], "MyPkg")
self.assertEqual(my_pkg["description"], "My cool description")
self.assertEqual(my_pkg["defines"], ["MYDEFINE1"])
# Check env_info
env_info = parsed["deps_env_info"]
self.assertListEqual(sorted(env_info.keys()), sorted(["VAR1", "PATH"]))
self.assertEqual(env_info["VAR1"], "env_info-value1")
self.assertListEqual(env_info["PATH"], ["path-extended"])
# Check user_info
user_info = parsed["deps_user_info"]
self.assertListEqual(list(user_info.keys()), ["user_info_pkg"])
self.assertListEqual(list(user_info["user_info_pkg"].keys()), ["VAR1"])
self.assertEqual(user_info["user_info_pkg"]["VAR1"], "user_info-value1")
# Check user_info_build
user_info_build = parsed["user_info_build"]
self.assertListEqual(list(user_info_build.keys()), ["user_info_build_pkg"])
self.assertListEqual(list(user_info_build["user_info_build_pkg"].keys()), ["VAR1"])
self.assertEqual(user_info_build["user_info_build_pkg"]["VAR1"], "user_info_build-value1")
|
export const clamp = (number, min, max) => Math.min(Math.max(number, min), max);
export default {
clamp,
};
|
// Model import
const database = require('../../models')
const { logger } = require('../../helpers/logger')
//Delete One Tag
module.exports = async (id) => {
// I created these two try catch blocks because the MODEL.update method doesnt
// verify if the id searched really exists. It just try to update.
// If the instance doesnt exists, it return success.
try {
const tagToRemove = await database.Tags.findOne({
where: { id }
})
if(tagToRemove.dataValues.active) { //If tag is active...
try {
//Tags table
await database.Tags.update(
{ active: false },
{ where: { id } }
)
//TaskTags table
await database.TaskTags.update(
{ active: false },
{ where: { tag_id: id } }
)
logger.debug({ status: 200, msg: `Tag removed successfully!`, function: 'DAO - deleteOneTag' })
return { status: 200, msg: `Tag removed successfully!` }
} catch(error) {
logger.error({ status: 500, msg: error.message, function: 'DAO - deleteOneTag' })
return { status: 500, msg: error.message }
}
} else { //The tag is already inactive
logger.debug({ status: 400, msg: `Tag already deleted!`, function: 'DAO - deleteOneTag' })
return { status: 400, msg: `Tag already deleted!` }
}
} catch (error) {
return { status: 404, msg: `Tag not Found` }
}
} |
const compileTemplateExpression = function(expression, state) {
const dependencies = state.dependencies;
let props = dependencies.props;
let methods = dependencies.methods;
const exclude = state.exclude;
const locals = state.locals;
let dynamic = false;
let info;
while((info = expressionRE.exec(expression)) !== null) {
let match = info[0];
let name = info[1];
if(name !== undefined && exclude.indexOf(name) === -1) {
if(match[match.length - 1] === "(") {
if(methods.indexOf(name) === -1) {
methods.push(name);
}
} else {
if(locals.indexOf(name) === -1 && props.indexOf(name) === -1) {
props.push(name);
}
dynamic = true;
}
}
}
return dynamic;
}
const compileTemplate = function(template, state) {
const length = template.length;
let current = 0;
let dynamic = false;
let output = '';
if(length === 0) {
output = "\"\"";
} else {
while(current < length) {
// Match text
const textTail = template.substring(current);
const textMatch = textTail.match(openRE);
if(textMatch === null) {
// Only static text
output += `"${textTail}"`;
break;
}
const textIndex = textMatch.index;
if(textIndex !== 0) {
// Add static text and move to template expression
output += `"${textTail.substring(0, textIndex)}"`;
current += textIndex;
}
// Mark as dynamic
dynamic = true;
// Concatenate if not at the start
if(current !== 0) {
output += concatenationSymbol;
}
// Exit opening delimiter
current += textMatch[0].length;
// Get expression, and exit closing delimiter
const expressionTail = template.substring(current);
const expressionMatch = expressionTail.match(closeRE);
if("__ENV__" !== "production" && expressionMatch === null) {
error(`Expected closing delimiter after "${expressionTail}"`);
} else {
// Add expression
const expressionIndex = expressionMatch.index;
const expression = expressionTail.substring(0, expressionIndex);
compileTemplateExpression(expression, state);
output += `(${expression})`;
current += expression.length + expressionMatch[0].length;
// Concatenate if not at the end
if(current !== length) {
output += concatenationSymbol;
}
}
}
}
return {
output: output,
dynamic: dynamic
};
}
|
'use strict';
var test = require('ava');
var exec = require('child_process').exec;
test('should return version', function (t) {
t.plan(2);
exec('node cli.js --version', {cwd: __dirname}, function (err, stdout) {
t.ifError(err);
t.true(stdout.trim().length > 0);
});
});
|
# lextab.py. This file automatically created by PLY (version 3.10). Don't edit!
_tabversion = '3.10'
_lextokens = set(
('VOID', 'LBRACKET', 'WCHAR_CONST', 'FLOAT_CONST', 'MINUS', 'RPAREN',
'LONG', 'PLUS', 'ELLIPSIS', 'GT', 'GOTO', 'ENUM', 'PERIOD', 'GE',
'INT_CONST_DEC', 'ARROW', '__INT128', 'HEX_FLOAT_CONST', 'DOUBLE',
'MINUSEQUAL', 'INT_CONST_OCT', 'TIMESEQUAL', 'OR', 'SHORT', 'RETURN',
'RSHIFTEQUAL', 'RESTRICT', 'STATIC', 'SIZEOF', 'UNSIGNED', 'UNION',
'COLON', 'WSTRING_LITERAL', 'DIVIDE', 'FOR', 'PLUSPLUS', 'EQUALS', 'ELSE',
'INLINE', 'EQ', 'AND', 'TYPEID', 'LBRACE', 'PPHASH', 'INT', 'SIGNED',
'CONTINUE', 'NOT', 'OREQUAL', 'MOD', 'RSHIFT', 'DEFAULT', 'CHAR', 'WHILE',
'DIVEQUAL', 'EXTERN', 'CASE', 'LAND', 'REGISTER', 'MODEQUAL', 'NE',
'SWITCH', 'INT_CONST_HEX', '_COMPLEX', 'PPPRAGMASTR', 'PLUSEQUAL',
'STRUCT', 'CONDOP', 'BREAK', 'VOLATILE', 'PPPRAGMA', 'ANDEQUAL',
'INT_CONST_BIN', 'DO', 'LNOT', 'CONST', 'LOR', 'CHAR_CONST', 'LSHIFT',
'RBRACE', '_BOOL', 'LE', 'SEMI', 'LT', 'COMMA', 'OFFSETOF', 'TYPEDEF',
'XOR', 'AUTO', 'TIMES', 'LPAREN', 'MINUSMINUS', 'ID', 'IF',
'STRING_LITERAL', 'FLOAT', 'XOREQUAL', 'LSHIFTEQUAL', 'RBRACKET'))
_lexreflags = 64
_lexliterals = ''
_lexstateinfo = {
'ppline': 'exclusive',
'pppragma': 'exclusive',
'INITIAL': 'inclusive'
}
_lexstatere = {
'ppline':
[('(?P<t_ppline_FILENAME>"([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*")|(?P<t_ppline_LINE_NUMBER>(0(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|([1-9][0-9]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?))|(?P<t_ppline_NEWLINE>\\n)|(?P<t_ppline_PPLINE>line)',
[
None, ('t_ppline_FILENAME', 'FILENAME'), None, None, None, None, None,
None, ('t_ppline_LINE_NUMBER', 'LINE_NUMBER'), None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None,
None, ('t_ppline_NEWLINE', 'NEWLINE'), ('t_ppline_PPLINE', 'PPLINE')
])],
'pppragma':
[('(?P<t_pppragma_NEWLINE>\\n)|(?P<t_pppragma_PPPRAGMA>pragma)|(?P<t_pppragma_STR>.+)',
[
None, ('t_pppragma_NEWLINE', 'NEWLINE'),
('t_pppragma_PPPRAGMA', 'PPPRAGMA'), ('t_pppragma_STR', 'STR')
])],
'INITIAL':
[('(?P<t_PPHASH>[ \\t]*\\#)|(?P<t_NEWLINE>\\n+)|(?P<t_LBRACE>\\{)|(?P<t_RBRACE>\\})|(?P<t_FLOAT_CONST>((((([0-9]*\\.[0-9]+)|([0-9]+\\.))([eE][-+]?[0-9]+)?)|([0-9]+([eE][-+]?[0-9]+)))[FfLl]?))|(?P<t_HEX_FLOAT_CONST>(0[xX]([0-9a-fA-F]+|((([0-9a-fA-F]+)?\\.[0-9a-fA-F]+)|([0-9a-fA-F]+\\.)))([pP][+-]?[0-9]+)[FfLl]?))|(?P<t_INT_CONST_HEX>0[xX][0-9a-fA-F]+(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)',
[
None, ('t_PPHASH', 'PPHASH'), ('t_NEWLINE', 'NEWLINE'), ('t_LBRACE',
'LBRACE'),
('t_RBRACE', 'RBRACE'), ('t_FLOAT_CONST', 'FLOAT_CONST'), None, None,
None, None, None, None, None, None, None, ('t_HEX_FLOAT_CONST',
'HEX_FLOAT_CONST'), None,
None, None, None, None, None, None, ('t_INT_CONST_HEX',
'INT_CONST_HEX')
]),
('(?P<t_INT_CONST_BIN>0[bB][01]+(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_BAD_CONST_OCT>0[0-7]*[89])|(?P<t_INT_CONST_OCT>0[0-7]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_INT_CONST_DEC>(0(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|([1-9][0-9]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?))|(?P<t_CHAR_CONST>\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))\')|(?P<t_WCHAR_CONST>L\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))\')|(?P<t_UNMATCHED_QUOTE>(\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*\\n)|(\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*$))|(?P<t_BAD_CHAR_CONST>(\'([^\'\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))[^\'\n]+\')|(\'\')|(\'([\\\\][^a-zA-Z._~^!=&\\^\\-\\\\?\'"x0-7])[^\'\\n]*\'))',
[
None, ('t_INT_CONST_BIN', 'INT_CONST_BIN'), None, None, None, None,
None, None, None, ('t_BAD_CONST_OCT',
'BAD_CONST_OCT'), ('t_INT_CONST_OCT',
'INT_CONST_OCT'), None, None,
None, None, None, None, None, ('t_INT_CONST_DEC', 'INT_CONST_DEC'),
None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, ('t_CHAR_CONST', 'CHAR_CONST'), None,
None, None, None, None, None, ('t_WCHAR_CONST',
'WCHAR_CONST'), None, None, None, None,
None, None, ('t_UNMATCHED_QUOTE',
'UNMATCHED_QUOTE'), None, None, None, None, None, None,
None, None, None, None, None, None, None, None, ('t_BAD_CHAR_CONST',
'BAD_CHAR_CONST')
]),
('(?P<t_WSTRING_LITERAL>L"([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*")|(?P<t_BAD_STRING_LITERAL>"([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*?([\\\\][^a-zA-Z._~^!=&\\^\\-\\\\?\'"x0-7])([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*")|(?P<t_ID>[a-zA-Z_$][0-9a-zA-Z_$]*)|(?P<t_STRING_LITERAL>"([^"\\\\\\n]|(\\\\(([a-zA-Z._~!=&\\^\\-\\\\?\'"])|(\\d+)|(x[0-9a-fA-F]+))))*")|(?P<t_ELLIPSIS>\\.\\.\\.)|(?P<t_PLUSPLUS>\\+\\+)|(?P<t_LOR>\\|\\|)|(?P<t_XOREQUAL>\\^=)|(?P<t_OREQUAL>\\|=)|(?P<t_LSHIFTEQUAL><<=)|(?P<t_RSHIFTEQUAL>>>=)|(?P<t_PLUSEQUAL>\\+=)|(?P<t_TIMESEQUAL>\\*=)|(?P<t_PLUS>\\+)|(?P<t_MODEQUAL>%=)|(?P<t_DIVEQUAL>/=)',
[
None, ('t_WSTRING_LITERAL', 'WSTRING_LITERAL'), None, None, None,
None, None, None, ('t_BAD_STRING_LITERAL',
'BAD_STRING_LITERAL'), None, None, None, None,
None, None, None, None, None, None, None, None, None, ('t_ID', 'ID'),
(None,
'STRING_LITERAL'), None, None, None, None, None, None, (None,
'ELLIPSIS'),
(None, 'PLUSPLUS'), (None, 'LOR'), (None, 'XOREQUAL'), (None,
'OREQUAL'),
(None, 'LSHIFTEQUAL'), (None, 'RSHIFTEQUAL'), (None, 'PLUSEQUAL'),
(None, 'TIMESEQUAL'), (None, 'PLUS'), (None, 'MODEQUAL'), (None,
'DIVEQUAL')
]),
('(?P<t_RBRACKET>\\])|(?P<t_CONDOP>\\?)|(?P<t_XOR>\\^)|(?P<t_LSHIFT><<)|(?P<t_LE><=)|(?P<t_LPAREN>\\()|(?P<t_ARROW>->)|(?P<t_EQ>==)|(?P<t_NE>!=)|(?P<t_MINUSMINUS>--)|(?P<t_OR>\\|)|(?P<t_TIMES>\\*)|(?P<t_LBRACKET>\\[)|(?P<t_GE>>=)|(?P<t_RPAREN>\\))|(?P<t_LAND>&&)|(?P<t_RSHIFT>>>)|(?P<t_MINUSEQUAL>-=)|(?P<t_PERIOD>\\.)|(?P<t_ANDEQUAL>&=)|(?P<t_EQUALS>=)|(?P<t_LT><)|(?P<t_COMMA>,)|(?P<t_DIVIDE>/)|(?P<t_AND>&)|(?P<t_MOD>%)|(?P<t_SEMI>;)|(?P<t_MINUS>-)|(?P<t_GT>>)|(?P<t_COLON>:)|(?P<t_NOT>~)|(?P<t_LNOT>!)',
[
None, (None, 'RBRACKET'), (None, 'CONDOP'), (None, 'XOR'),
(None, 'LSHIFT'), (None, 'LE'), (None, 'LPAREN'), (None, 'ARROW'),
(None, 'EQ'), (None, 'NE'), (None, 'MINUSMINUS'), (None, 'OR'),
(None, 'TIMES'), (None, 'LBRACKET'), (None, 'GE'), (None, 'RPAREN'),
(None, 'LAND'), (None, 'RSHIFT'), (None, 'MINUSEQUAL'), (None,
'PERIOD'),
(None, 'ANDEQUAL'), (None, 'EQUALS'), (None, 'LT'), (None, 'COMMA'),
(None, 'DIVIDE'), (None, 'AND'), (None, 'MOD'), (None, 'SEMI'),
(None, 'MINUS'), (None, 'GT'), (None, 'COLON'), (None,
'NOT'), (None,
'LNOT')
])]
}
_lexstateignore = {'ppline': ' \t', 'pppragma': ' \t', 'INITIAL': ' \t'}
_lexstateerrorf = {
'ppline': 't_ppline_error',
'pppragma': 't_pppragma_error',
'INITIAL': 't_error'
}
_lexstateeoff = {}
|
mui.init();
(function($) {
//alert(1)
//addNav(1)
//阻尼系数
var deceleration = $.os.ios ? 0.003 : 0.0009;
var vm = new Vue({
el: '#main',
data: {
my: {},
islogin: false,
mypage: 1,
isconcern: true,
hot: [],
hotpage: 1,
friends: [],
canConcern: true,
hotSearchContent: '',
isbm:''
}
})
addNav(1);
$.ready(function() {
mui.plusReady(function() {
mui('body').on('tap','#hot_search',function(){
document.querySelector('#nav').style.display = 'none';
document.querySelector('.mui-slider-group').style.bottom = '0';
var div = document.querySelector('#hot_search');
setTimeout(function(){
if(div.value==''){
document.activeElement.blur();
document.querySelector('#nav').style.display = 'block';
document.querySelector('.mui-slider-group').style.bottom = '1rem';
div.value = '';
div.innerHTML = '';
}
},7000);
})
vm.token = plus.storage.getItem('token');
//plus.storage.removeItem('token')
console.log(vm.token,'vm.token');
function isActive() {
if(plus.storage.getItem('token')) {
var datas = {
terminalNo: '3',
token: plus.storage.getItem('token')
}
if(plus.storage.getItem('phonesContacts')) {
datas.phones = plus.storage.getItem('phonesContacts');
}
mui.ajax({
url: URL.path + '/account/new_friend_fans',
type: 'post',
data: datas,
success: function(data) {
if(data.returnCode == 200) {
if(data.data.all_nums != 0) {
addNav(1, true);
} else {
addNav(1);
}
} else {
if(data.returnCode == 401) {
unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
}
})
} else {
addNav(1);
}
}
isActive();
var circle = {
init: function() {
circle.myajaxfirst(); //第一次我的圈子详情加载 带判断状态
circle.bind(); //事件绑定
circle.addFollow(); //关注话题
circle.removeFollow(); //取消关注话题
circle.deleteCircle(); //删除圈子或长文章
circle.hotAjaxFirst() //热门首次加载
circle.upAjax() //热门点赞
circle.hotSearch() // 热门搜索
circle.friendsAdd();
circle.friendsCancel();
},
setIndex: function() {
var n = document.querySelectorAll(".circle-my-list");
for(var i = 0; i < n.length; i++) {
n[i].index = i;
}
var m = document.querySelectorAll(".circle-hot-list");
for(var i = 0; i < m.length; i++) {
m[i].index = i;
}
},
muiScroll: function() { //mui滚动初始化
$('.mui-scroll-wrapper').scroll({
bounce: false,
indicators: true, //是否显示滚动条
deceleration: deceleration
});
},
muiMyInit: function() { //mui我的圈子初始化
mui('#my').pullToRefresh({
up: {
callback: circle.myUp,
contentrefresh: "正在加载...",
contentnomore: '没有更多数据了',
},
down: {
callback: circle.myDown,
}
})
},
hotInit: function() { //mui我的圈子初始化
mui('#hot').pullToRefresh({
up: {
callback: circle.hotUp,
contentrefresh: "正在加载...",
contentnomore: '没有更多数据了',
},
down: {
callback: circle.hotDown,
}
})
},
myajax: function(type) { //我的圈子ajax
if(type == 'up') {
vm.mypage++;
} else {
vm.mypage = 1;
}
mui.ajax({
url: URL.path + '/circle/circle_list',
type: 'post',
data: {
page: vm.mypage,
token: vm.token,
terminalNo: '3',
},
// dataType:'string',
success: function(data) {
// alert(JSON.stringify(data.data))
if(data.returnCode == 200) {
// alert(JSON.stringify(data.data))
// alert(vm.hotpage)
if(type == 'up') {
if(data.data.length == 0) {
setTimeout(function() {
mui('#my').pullToRefresh().endPullUpToRefresh(true);
}, 800)
} else {
//alert(JSON.stringify(vm.my))
vm.my.comments = vm.my.comments.concat(data.data.comments);
mui('#my').pullToRefresh().endPullUpToRefresh(false);
}
} else {
vm.my = data.data;
mui('#my').pullToRefresh().endPullDownToRefresh();
mui('#my').pullToRefresh().refresh(true);
}
vm.$nextTick(function() {
mui.previewImage();
circle.setIndex();
})
} else {
if(data.returnCode == 401) {
unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
}
})
},
myajaxfirst: function() { //第一次我的圈子详情加载 带判断状态
mui.ajax({
url: URL.path + '/circle/circle_list',
type: 'post',
data: {
page: '1',
token: vm.token,
terminalNo: '3',
},
success: function(data) {
if(data.returnCode == 200) {
// alert(JSON.stringify(data.data))
vm.islogin = true;
vm.isconcern = true;
if(data.data.length == 0) {
//mui('#my').pullToRefresh().endPullUpToRefresh(true);
} else {
vm.my = data.data;
//console.log(JSON.stringify(data.data.comments[0]));
// console.log(data.data.comments[0].headimg)
// alert(JSON.stringify(data.data))
vm.$nextTick(function() {
circle.muiScroll();
circle.muiMyInit();
mui.previewImage();
circle.setIndex();
})
}
} else {
if(data.returnCode == 401) {
vm.islogin = false;
vm.isconcern = false;
} else if(data.returnCode == 400) {
circle.newfriends()
vm.islogin = true;
vm.isconcern = false;
} else {
mui.toast(data.msg)
}
}
},
error: function(xhr, type, errorThrown) {
//异常处理;
console.log(type);
}
})
},
myUp: function() { //我的圈子上拉加载更多
circle.myajax('up');
},
myDown: function() { //我的圈子下拉刷新
circle.myajax('down');
},
bind: function() {
window.addEventListener('reload', function() {
circle.myajaxfirst();
})
mui("body").on('tap', '.link-circle', function(e) { //跳转圈子
e.stopPropagation();
if(this.classList.contains('cant')) {
mui.toast('该圈子已经被删除');
return;
}
var id = this.getAttribute('data-id');
mui.openWindow({
url: 'circle-info.html',
id: 'circle-info.html',
extras: {
cid: id
}
})
})
//监听选项卡切换
document.getElementById('slider').addEventListener('slide', function(e) {
switch(e.detail.slideNumber) {
case 0:
var ddd = $('#sliderSegmentedControl>a');
ddd[0].className = 'mui-control-item mui-active';
ddd[1].className = 'mui-control-item';
console.log(ddd,'ddd');
// $('#sliderSegmentedControl a').removeClass('mui-active');
// $('#aaa').addClass('mui-active');
// document.getElementById("publish").style.display = 'block';
break;
case 1:
var eee = $('#sliderSegmentedControl>a');
eee[0].className = 'mui-control-item';
eee[1].className = 'mui-control-item mui-active';
break;
}
});
mui("body").on('tap', '.link-article', function(e) { //跳转长文章
e.stopPropagation();
if(!plus.storage.getItem('token')) {
//mui.toast('您还未登录');
mui.openWindow({
url: 'signin.html',
id: 'signin.html'
})
return;
}
if(this.classList.contains('cant')) {
mui.toast('该文章已经被删除');
return;
}
var id = this.getAttribute('data-tid');
//优化加载
var nwaiting = plus.nativeUI.showWaiting();
var webviewShow = plus.webview.create('circle-article-info.html', 'circle-article-info.html', {
top: '0px',
bottom: '0px'
}, {
cid: id
});
})
mui("body").on('tap', '.link-topic', function(e) { //跳转话题
e.stopPropagation();
if(this.classList.contains('cant')) {
mui.toast('该话题已经被删除');
return;
}
if(!plus.storage.getItem('token')) {
//mui.toast('您还未登录');
mui.openWindow({
url: 'signin.html',
id: 'signin.html'
})
return;
}
var id = this.getAttribute('data-tid');
//优化加载
var nwaiting = plus.nativeUI.showWaiting();
var webviewShow = plus.webview.create('circle-topic-info.html', 'circle-topic-info.html', {
top: '0px',
bottom: '0px'
}, {
cid: id
});
})
mui('body').on('tap', '.circle-my-s-forward', function(e) {
e.stopPropagation();
var parent = this.parentNode.parentNode.parentNode;
var id = '';
var type = '';
Power(function() {
if(parent.classList.contains('link-circle')) {
id = parent.getAttribute('data-id');
tid = parent.getAttribute('data-tid');
} else {
id = parent.getAttribute('data-id');
tid = parent.getAttribute('data-tid');
}
type = parent.getAttribute('data-type');
mui.openWindow({
url: 'circle-forward.html',
id: 'circle-forward.html',
extras: {
cid: id,
tid: tid,
type: type
}
})
})
})
mui('body').on('tap', '.my-follow-li', function() {
var id = this.getAttribute('data-id');
// alert(id)
mui.openWindow({
url: 'homepage-personal.html',
id: 'homepage-personal.html',
extras: {
rid: id
},
createNew: true
})
})
mui('body').on('tap', '.circle-new-ct', function() {
GO('circle-new-comment')
})
mui('body').on('tap', '#publish', function() {
Power(function() {
GO('circle-publish')
})
})
mui('body').on('tap', '#signin', function() {
GO('signin')
})
mui('#nav').on('tap', '#nav_home', function() {
GO('home', {}, true)
})
mui('#nav').on('tap', '#nav_circle', function() {
if(document.getElementById("item1mobile").classList.contains('mui-active')) { //判断处在哪个页面
if(vm.islogin && vm.isconcern) { //已登录已关注,调用下拉刷新方法
mui('#my').pullToRefresh().pullDownLoading();
} else { //未登录或未关注,调用加载方法,带状态判断
//circle.myajaxfirst();
var circleweb = plus.webview.currentWebview();
circleweb.reload(true);
}
} else {
mui('#hot').pullToRefresh().pullDownLoading();
}
})
mui('#nav').on('tap', '#nav_demand', function() {
GO('demand', {}, true)
})
mui('#nav').on('tap', '#nav_my', function() {
GO('my', {}, true)
})
},
topicAjax: function(type, tid, index) { //话题关注或取消ajax
var url = ''
if(type == 'add') {
url = URL.path + '/concerns/cadd';
} else {
url = URL.path + '/concerns/cupdate';
}
mui.ajax({
url: url,
type: 'post',
data: {
tid: tid,
token: vm.token,
terminalNo: '3',
},
success: function(data) {
setTimeout(function() {
vm.canConcern = true;
}, 1000)
if(data.returnCode == 200) {
if(type == 'add') {
mui.toast('关注成功');
if(document.getElementById("item1mobile").classList.contains('mui-active')) {
vm.my.comments[index].is_concern = 0;
} else {
vm.hot[index].is_concern = 0;
}
} else {
mui.toast('已取消关注');
if(document.getElementById("item1mobile").classList.contains('mui-active')) {
vm.my.comments[index].is_concern = 1;
} else {
vm.hot[index].is_concern = 1;
}
}
} else {
if(data.returnCode == 401) {
unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
},
error: function(xhr, type, errorThrown) {
//异常处理;
console.log(type);
}
})
},
addFollow: function() { // 关注话题
mui('body').on('tap', '.circle-my-t-s-follow', function(e) {
e.stopPropagation();
if(!vm.canConcern) {
mui.toast('操作太频繁,请稍后再试');
return;
}
vm.canConcern = false;
var parent = this.parentNode.parentNode.parentNode;
circle.topicAjax('add', parent.getAttribute('data-tid'), parent.index)
})
},
removeFollow: function() { //取消关注话题
mui('body').on('tap', '.circle-my-t-s-followed', function(e) {
e.stopPropagation();
if(!vm.canConcern) {
mui.toast('操作太频繁,请稍后再试');
return;
}
vm.canConcern = false;
var parent = this.parentNode.parentNode.parentNode;
mui.confirm('确认取消关注', '确认', ['取消', '确认'], function(res) {
if(res.index == 1) {
circle.topicAjax('remove', parent.getAttribute('data-tid'), parent.index)
}
}, 'div')
})
},
deleteCircleAjax: function(url, id, index, parent) { //删除圈子 或者长文章 ajax
mui.ajax({
url: url,
type: 'post',
data: {
rid: id,
token: vm.token,
terminalNo: '3',
},
success: function(data) {
if(data.returnCode == 200) {
mui.toast('删除成功');
//vm.my.comments.splice(index, index + 1);
// parent.remove();
//mui('#my').pullToRefresh().pullDownLoading();
//mui('#hot').pullToRefresh().pullDownLoading();
circle.myajax('down');
circle.hotajax('down');
} else {
if(data.returnCode == 401) {
unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
}
})
},
deleteCircle: function() { //删除圈子 或者长文章
Power(function() {
mui('body').on('tap', '.circle-my-s-delete', function(e) {
e.stopPropagation();
var _this = this;
mui.confirm(' ', '确认删除', ['取消', '确认'], function(res) {
if(res.index == 1) {
var parent = _this.parentNode.parentNode.parentNode;
circle.deleteCircleAjax(URL.path + '/circle/delete_circle', parent.getAttribute('data-id'), parent.index, parent)
}
}, 'div')
})
})
},
hotAjaxFirst: function() { //热门首次加载
var datas = {
terminalNo: '3',
page: vm.hotpage
}
if(vm.token) {
datas.token = vm.token;
}
mui.ajax({
url: URL.path + '/circle/hot_list',
type: 'post',
data: datas,
success: function(data) {
if(data.returnCode == 200) {
vm.hot = data.data;
//alert(JSON.stringify(data.data))
circle.hotInit();
vm.$nextTick(function() {
circle.muiScroll();
mui.previewImage();
circle.setIndex();
})
} else {
if(data.returnCode == 401) {
// unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
}
})
},
hotajax: function(type) {
var datas = {
terminalNo: '3',
keyword: vm.hotSearchContent
}
if(plus.storage.getItem('token')) {
datas.token = plus.storage.getItem('token')
}
if(type == 'up') {
vm.hotpage++;
} else {
vm.hotpage = 1;
}
datas.page = vm.hotpage;
mui.ajax({
url: URL.path + '/circle/hot_list',
type: 'post',
data: datas,
success: function(data) {
if(data.returnCode == 200) {
if(type == 'up') {
if(data.data.length == 0) {
setTimeout(function() {
mui('#hot').pullToRefresh().endPullUpToRefresh(true);
}, 800);
} else {
vm.hot = vm.hot.concat(data.data);
mui('#hot').pullToRefresh().endPullUpToRefresh(false);
}
} else {
vm.hot = data.data;
mui('#hot').pullToRefresh().endPullDownToRefresh();
mui('#hot').pullToRefresh().refresh(true);
}
vm.$nextTick(function() {
mui.previewImage();
circle.setIndex();
})
} else {
if(data.returnCode == 401) {
unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
}
})
},
hotUp: function() {
circle.hotajax('up');
},
hotDown: function() {
circle.hotajax('down');
},
friends: function() { //推荐关注
mui.ajax({
url: URL.path + '/concern/clist',
type: 'post',
data: {
token: plus.storage.getItem('token'),
terminalNo: '3'
},
success: function(data) {
//alert(data.returnCode)
if(data.returnCode == 200) {
// alert(JSON.stringify(data.data))
vm.friends = data.data;
} else {
if(data.returnCode == 400) {
circle.newfriends();
}
}
}
})
},
newfriends: function() {
mui.ajax({
url: URL.path + '/concern/friends',
type: 'post',
dataType: 'json',
data: {
token: plus.storage.getItem('token'),
terminalNo: '3'
},
success: function(data) {
console.log(data.data,'2222222')
if(data.returnCode == 200) {
// alert(JSON.stringify(data.data))
vm.friends = data.data;
// mui('.mui-scroll-wrapper').scroll({
// deceleration: 0.0005 //flick 减速系数,系数越大,滚动速度越慢,滚动距离越小,默认值0.0006
// });
}
},
error: function(xhr, type, errorThrown) {
//异常处理;
console.log(type);
}
})
},
friendsCancel: function() {
mui('#main').on('tap', '.followed', function(e) { //取消关注
e.stopPropagation();
var box = this.parentNode;
var id = box.getAttribute('data-id');
var _this = this;
mui.ajax({
url: URL.path + '/concern/cupdate',
type: 'post',
data: {
token: plus.storage.getItem('token'),
rid: id,
terminalNo: '3'
},
success: function(data) {
if(data.returnCode == 200) {
//alert(JSON.stringify(data));
mui.toast('成功取消关注');
//circle.friends();
_this.classList.remove('followed');
_this.classList.add('unfollowed');
_this.innerHTML = '+ 关注';
} else {
if(data.returnCode == 401) {
unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
}
})
})
},
friendsAdd: function() {
mui('#main').on('tap', '.unfollowed', function(e) { //添加关注
e.stopPropagation();
var box = this.parentNode;
var id = box.getAttribute('data-id');
var _this = this;
// alert(id);
mui.ajax({
url: URL.path + '/concern/cupdate',
type: 'post',
data: {
token: plus.storage.getItem('token'),
rid: id,
terminalNo: '3'
},
success: function(data) {
if(data.returnCode == 200) {
//alert(JSON.stringify(data));
mui.toast('成功添加关注');
_this.classList.remove('unfollowed');
_this.classList.add('followed');
_this.innerHTML = '已关注';
//circle.friends();
} else {
if(data.returnCode == 401) {
unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
}
})
})
},
upAjax: function(index) {
mui('body').on('tap', '.circle-my-s-up', function(e) {
e.stopPropagation()
//alert(this.childNodes[0])
var url = '';
var type = 0;
var _this = this;
var num = _this.childNodes[0].innerHTML;
if(this.childNodes[0].classList.contains('cur')) {
url = URL.path + '/praise/cupdate';
type = 1;
} else {
url = URL.path + '/praise/cadd';
type = 2;
}
mui.ajax({
url: url,
type: 'post',
data: {
token: vm.token,
terminalNo: '3',
tid: _this.getAttribute('data-id')
},
success: function(data) {
if(data.returnCode == 200) {
if(type == 1) {
_this.childNodes[0].classList.remove('cur');
_this.childNodes[0].innerHTML = num - 1;
} else {
_this.childNodes[0].classList.add('cur');
_this.childNodes[0].innerHTML = +num + 1;
}
} else {
if(data.returnCode == 401) {
unLoginComfirm();
} else {
mui.toast(data.msg)
}
}
}
})
})
},
hotSearch: function() { //热门搜索
mui('body').on('tap','.my-newfriend-search-btn',function(){
document.getElementById("hot_search").blur();
document.querySelector('#nav').style.display = 'block';
document.querySelector('.mui-slider-group').style.bottom = '1rem';
// document.querySelector('#hot_search').value = '';
// document.querySelector('#hot_search').innerHTML = '';
circle.hotajax();
})
}
}
circle.init();
})
});
})(mui); |
# MODULE: TypeRig / Glyphs App Proxy
# -----------------------------------------------------------
# (C) Vassil Kateliev, 2020 (http://www.kateliev.com)
# (C) Karandash Type Foundry (http://www.karandash.eu)
#------------------------------------------------------------
# www.typerig.com
# No warranties. By using this you agree
# that you use it at your own risk!
from objects import *
|
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.34/esri/copyright.txt for details.
//>>built
define("esri/dijit/nls/BasemapGallery_it",{"esri/layers/vectorTiles/nls/common":{_localized:{}}}); |
'use strict';
var gcd1 = require('../../toolbox/gcd1');
var expect = require('chai').expect;
describe('gcd1 - O(n)', function(){
it('should find the greatest commom divisor if `a > b`', function(){
expect(gcd1(30, 15)).to.be.equal(15);
expect(gcd1(12, 8)).to.be.equal(4);
expect(gcd1(54, 24)).to.be.equal(6);
});
it('should find the greatest commom divisor if `a < b`', function(){
expect(gcd1(15, 30)).to.be.equal(15);
expect(gcd1(8, 12)).to.be.equal(4);
expect(gcd1(24, 54)).to.be.equal(6);
});
}); |
from dataclasses import dataclass, field
from typing import List, Optional
import pytest
from aioesphomeapi.api_pb2 import (
BinarySensorStateResponse,
ClimateStateResponse,
CoverStateResponse,
DeviceInfoResponse,
FanStateResponse,
HomeassistantServiceMap,
HomeassistantServiceResponse,
LightStateResponse,
ListEntitiesBinarySensorResponse,
ListEntitiesButtonResponse,
ListEntitiesClimateResponse,
ListEntitiesCoverResponse,
ListEntitiesFanResponse,
ListEntitiesLightResponse,
ListEntitiesNumberResponse,
ListEntitiesSelectResponse,
ListEntitiesSensorResponse,
ListEntitiesServicesArgument,
ListEntitiesServicesResponse,
ListEntitiesSwitchResponse,
ListEntitiesTextSensorResponse,
NumberStateResponse,
SelectStateResponse,
SensorStateResponse,
ServiceArgType,
SwitchStateResponse,
TextSensorStateResponse,
)
from aioesphomeapi.model import (
APIIntEnum,
APIModelBase,
APIVersion,
BinarySensorInfo,
BinarySensorState,
ButtonInfo,
ClimateInfo,
ClimatePreset,
ClimateState,
CoverInfo,
CoverState,
DeviceInfo,
FanInfo,
FanState,
HomeassistantServiceCall,
LegacyCoverState,
LightInfo,
LightState,
NumberInfo,
NumberState,
SelectInfo,
SelectState,
SensorInfo,
SensorState,
SwitchInfo,
SwitchState,
TextSensorInfo,
TextSensorState,
UserService,
UserServiceArg,
UserServiceArgType,
converter_field,
)
class DummyIntEnum(APIIntEnum):
DEFAULT = 0
MY_VAL = 1
@pytest.mark.parametrize(
"input, output",
[
(0, DummyIntEnum.DEFAULT),
(1, DummyIntEnum.MY_VAL),
(2, None),
(-1, None),
(DummyIntEnum.DEFAULT, DummyIntEnum.DEFAULT),
(DummyIntEnum.MY_VAL, DummyIntEnum.MY_VAL),
],
)
def test_api_int_enum_convert(input, output):
v = DummyIntEnum.convert(input)
assert v == output
assert v is None or isinstance(v, DummyIntEnum)
@pytest.mark.parametrize(
"input, output",
[
([], []),
([1], [DummyIntEnum.MY_VAL]),
([0, 1], [DummyIntEnum.DEFAULT, DummyIntEnum.MY_VAL]),
([-1], []),
([0, -1], [DummyIntEnum.DEFAULT]),
([DummyIntEnum.DEFAULT], [DummyIntEnum.DEFAULT]),
],
)
def test_api_int_enum_convert_list(input, output):
v = DummyIntEnum.convert_list(input)
assert v == output
assert all(isinstance(x, DummyIntEnum) for x in v)
@dataclass(frozen=True)
class DummyAPIModel(APIModelBase):
val1: int = 0
val2: Optional[DummyIntEnum] = converter_field(
default=DummyIntEnum.DEFAULT, converter=DummyIntEnum.convert
)
@dataclass(frozen=True)
class ListAPIModel(APIModelBase):
val: List[DummyAPIModel] = field(default_factory=list)
def test_api_model_base_converter():
assert DummyAPIModel().val2 == DummyIntEnum.DEFAULT
assert isinstance(DummyAPIModel().val2, DummyIntEnum)
assert DummyAPIModel(val2=0).val2 == DummyIntEnum.DEFAULT
assert isinstance(DummyAPIModel().val2, DummyIntEnum)
assert DummyAPIModel(val2=-1).val2 is None
def test_api_model_base_to_dict():
assert DummyAPIModel().to_dict() == {
"val1": 0,
"val2": 0,
}
assert DummyAPIModel(val1=-1, val2=1).to_dict() == {
"val1": -1,
"val2": 1,
}
assert ListAPIModel(val=[DummyAPIModel()]).to_dict() == {
"val": [
{
"val1": 0,
"val2": 0,
}
]
}
def test_api_model_base_from_dict():
assert DummyAPIModel.from_dict({}) == DummyAPIModel()
assert (
DummyAPIModel.from_dict(
{
"val1": -1,
"val2": -1,
}
)
== DummyAPIModel(val1=-1, val2=None)
)
assert (
DummyAPIModel.from_dict(
{
"val1": -1,
"unknown": 100,
}
)
== DummyAPIModel(val1=-1)
)
assert ListAPIModel.from_dict({}) == ListAPIModel()
assert ListAPIModel.from_dict({"val": []}) == ListAPIModel()
def test_api_model_base_from_pb():
class DummyPB:
def __init__(self, val1=0, val2=0):
self.val1 = val1
self.val2 = val2
assert DummyAPIModel.from_pb(DummyPB()) == DummyAPIModel()
assert DummyAPIModel.from_pb(DummyPB(val1=-1, val2=-1)) == DummyAPIModel(
val1=-1, val2=None
)
def test_api_version_ord():
assert APIVersion(1, 0) == APIVersion(1, 0)
assert APIVersion(1, 0) < APIVersion(1, 1)
assert APIVersion(1, 1) <= APIVersion(1, 1)
assert APIVersion(1, 0) < APIVersion(2, 0)
assert not (APIVersion(2, 1) <= APIVersion(2, 0))
assert APIVersion(2, 1) > APIVersion(2, 0)
@pytest.mark.parametrize(
"model, pb",
[
(DeviceInfo, DeviceInfoResponse),
(BinarySensorInfo, ListEntitiesBinarySensorResponse),
(BinarySensorState, BinarySensorStateResponse),
(CoverInfo, ListEntitiesCoverResponse),
(CoverState, CoverStateResponse),
(FanInfo, ListEntitiesFanResponse),
(FanState, FanStateResponse),
(LightInfo, ListEntitiesLightResponse),
(LightState, LightStateResponse),
(SensorInfo, ListEntitiesSensorResponse),
(SensorState, SensorStateResponse),
(SwitchInfo, ListEntitiesSwitchResponse),
(SwitchState, SwitchStateResponse),
(TextSensorInfo, ListEntitiesTextSensorResponse),
(TextSensorState, TextSensorStateResponse),
(ClimateInfo, ListEntitiesClimateResponse),
(ClimateState, ClimateStateResponse),
(NumberInfo, ListEntitiesNumberResponse),
(NumberState, NumberStateResponse),
(SelectInfo, ListEntitiesSelectResponse),
(SelectState, SelectStateResponse),
(HomeassistantServiceCall, HomeassistantServiceResponse),
(UserServiceArg, ListEntitiesServicesArgument),
(UserService, ListEntitiesServicesResponse),
(ButtonInfo, ListEntitiesButtonResponse),
],
)
def test_basic_pb_conversions(model, pb):
assert model.from_pb(pb()) == model()
@pytest.mark.parametrize(
"state, version, out",
[
(CoverState(legacy_state=LegacyCoverState.OPEN), (1, 0), False),
(CoverState(legacy_state=LegacyCoverState.CLOSED), (1, 0), True),
(CoverState(position=1.0), (1, 1), False),
(CoverState(position=0.5), (1, 1), False),
(CoverState(position=0.0), (1, 1), True),
],
)
def test_cover_state_legacy_state(state, version, out):
assert state.is_closed(APIVersion(*version)) is out
@pytest.mark.parametrize(
"state, version, out",
[
(ClimateInfo(legacy_supports_away=False), (1, 4), []),
(
ClimateInfo(legacy_supports_away=True),
(1, 4),
[ClimatePreset.HOME, ClimatePreset.AWAY],
),
(ClimateInfo(supported_presets=[ClimatePreset.HOME]), (1, 4), []),
(ClimateInfo(supported_presets=[], legacy_supports_away=True), (1, 5), []),
(
ClimateInfo(supported_presets=[ClimatePreset.HOME]),
(1, 5),
[ClimatePreset.HOME],
),
],
)
def test_climate_info_supported_presets_compat(state, version, out):
assert state.supported_presets_compat(APIVersion(*version)) == out
@pytest.mark.parametrize(
"state, version, out",
[
(ClimateState(legacy_away=False), (1, 4), ClimatePreset.HOME),
(ClimateState(legacy_away=True), (1, 4), ClimatePreset.AWAY),
(
ClimateState(legacy_away=True, preset=ClimatePreset.HOME),
(1, 4),
ClimatePreset.AWAY,
),
(ClimateState(preset=ClimatePreset.HOME), (1, 5), ClimatePreset.HOME),
(ClimateState(preset=ClimatePreset.BOOST), (1, 5), ClimatePreset.BOOST),
(
ClimateState(legacy_away=True, preset=ClimatePreset.BOOST),
(1, 5),
ClimatePreset.BOOST,
),
],
)
def test_climate_state_preset_compat(state, version, out):
assert state.preset_compat(APIVersion(*version)) == out
def test_homeassistant_service_map_conversion():
assert HomeassistantServiceCall.from_pb(
HomeassistantServiceResponse(
data=[HomeassistantServiceMap(key="key", value="value")]
)
) == HomeassistantServiceCall(data={"key": "value"})
assert HomeassistantServiceCall.from_dict(
{"data": {"key": "value"}}
) == HomeassistantServiceCall(data={"key": "value"})
def test_user_service_conversion():
assert UserService.from_pb(
ListEntitiesServicesResponse(
args=[
ListEntitiesServicesArgument(
name="arg", type=ServiceArgType.SERVICE_ARG_TYPE_INT
)
]
)
) == UserService(args=[UserServiceArg(name="arg", type=UserServiceArgType.INT)])
assert UserService.from_dict({"args": [{"name": "arg", "type": 1}]}) == UserService(
args=[UserServiceArg(name="arg", type=UserServiceArgType.INT)]
)
|
# Copyright 2020 The SQLFlow Authors. All rights reserved.
# 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 contextlib
import copy
import os
import re
import numpy as np
import sqlflow_submitter.db_writer as db_writer
import tensorflow as tf
def parseMySQLDSN(dsn):
# [username[:password]@][protocol[(address)]]/dbname[?param1=value1&...¶mN=valueN]
user, passwd, host, port, database, config_str = re.findall(
"^(\w*):(\w*)@tcp\(([.a-zA-Z0-9\-]*):([0-9]*)\)/(\w*)(\?.*)?$", dsn)[0]
config = {}
if len(config_str) > 1:
for c in config_str[1:].split("&"):
k, v = c.split("=")
config[k] = v
return user, passwd, host, port, database, config
def parseHiveDSN(dsn):
# usr:pswd@hiveserver:10000/mydb?auth=PLAIN&session.mapreduce_job_quenename=mr
user_passwd, address_database, config_str = re.findall(
"^(.*)@([.a-zA-Z0-9/:_]*)(\?.*)?", dsn)[0]
user, passwd = user_passwd.split(":")
if len(address_database.split("/")) > 1:
address, database = address_database.split("/")
else:
address, database = address_database, None
if len(address.split(":")) > 1:
host, port = address.split(":")
else:
host, port = address, None
config = {}
if len(config_str) > 1:
for c in config_str[1:].split("&"):
k, v = c.split("=")
config[k] = v
auth = config["auth"] if "auth" in config else ""
session = {}
for k, v in config.items():
if k.startswith("session."):
session[k[len("session."):]] = v
return user, passwd, host, port, database, auth, session
def parseMaxComputeDSN(dsn):
# access_id:[email protected]/api?curr_project=test_ci&scheme=http
user_passwd, address, config_str = re.findall(
"^(.*)@([-.a-zA-Z0-9/]*)(\?.*)?", dsn)[0]
user, passwd = user_passwd.split(":")
config = {}
if len(config_str) > 1:
for c in config_str[1:].split("&"):
k, v = c.split("=")
config[k] = v
if "scheme" in config:
address = config["scheme"] + "://" + address
return user, passwd, address, config["curr_project"]
def connect_with_data_source(driver_dsn):
driver, dsn = driver_dsn.split("://")
if driver == "mysql":
# NOTE: use MySQLdb to avoid bugs like infinite reading:
# https://bugs.mysql.com/bug.php?id=91971
from MySQLdb import connect
user, passwd, host, port, database, config = parseMySQLDSN(dsn)
conn = connect(user=user,
passwd=passwd,
db=database,
host=host,
port=int(port))
elif driver == "hive":
from impala.dbapi import connect
user, passwd, host, port, database, auth, session_cfg = parseHiveDSN(
dsn)
conn = connect(user=user,
password=passwd,
database=database,
host=host,
port=int(port),
auth_mechanism=auth)
conn.session_cfg = session_cfg
conn.default_db = database
elif driver == "maxcompute":
from sqlflow_submitter.maxcompute import MaxCompute
user, passwd, address, database = parseMaxComputeDSN(dsn)
conn = MaxCompute.connect(database, user, passwd, address)
else:
raise ValueError(
"connect_with_data_source doesn't support driver type {}".format(
driver))
conn.driver = driver
return conn
def connect(driver,
database,
user,
password,
host,
port,
session_cfg={},
auth=""):
if driver == "mysql":
# NOTE: use MySQLdb to avoid bugs like infinite reading:
# https://bugs.mysql.com/bug.php?id=91971
from MySQLdb import connect
return connect(user=user,
passwd=password,
db=database,
host=host,
port=int(port))
elif driver == "hive":
from impala.dbapi import connect
conn = connect(user=user,
password=password,
database=database,
host=host,
port=int(port),
auth_mechanism=auth)
conn.default_db = database
conn.session_cfg = session_cfg
return conn
elif driver == "maxcompute":
from sqlflow_submitter.maxcompute import MaxCompute
return MaxCompute.connect(database, user, password, host)
raise ValueError("unrecognized database driver: %s" % driver)
def read_feature(raw_val, feature_spec, feature_name):
# FIXME(typhoonzero): Should use correct dtype here.
if feature_spec["is_sparse"]:
indices = np.fromstring(raw_val,
dtype=int,
sep=feature_spec["delimiter"])
indices = indices.reshape(indices.size, 1)
values = np.ones([indices.size], dtype=np.int32)
dense_shape = np.array(feature_spec["shape"], dtype=np.int64)
return (indices, values, dense_shape)
elif feature_spec["delimiter"] != "":
# Dense string vector
if feature_spec["dtype"] == "float32":
return np.fromstring(raw_val,
dtype=float,
sep=feature_spec["delimiter"])
elif feature_spec["dtype"] == "int64":
return np.fromstring(raw_val,
dtype=int,
sep=feature_spec["delimiter"])
else:
raise ValueError('unrecognize dtype {}'.format(
feature_spec[feature_name]["dtype"]))
else:
return (raw_val, )
def selected_cols(driver, conn, select):
select = select.strip().rstrip(";")
limited = re.findall("LIMIT [0-9]*$", select.upper())
if not limited:
select += " LIMIT 1"
if driver == "hive":
cursor = conn.cursor(configuration=conn.session_cfg)
cursor.execute(select)
field_names = None if cursor.description is None \
else [i[0][i[0].find('.') + 1:] for i in cursor.description]
else:
cursor = conn.cursor()
cursor.execute(select)
field_names = None if cursor.description is None \
else [i[0] for i in cursor.description]
cursor.close()
return field_names
def pai_selected_cols(table):
import paiio
reader = paiio.TableReader(table)
schema = reader.get_schema()
selected_cols = [i['colname'] for i in schema]
reader.close()
return selected_cols
def get_pai_table_row_num(table):
import paiio
reader = paiio.TableReader(table)
row_num = reader.get_row_count()
reader.close()
return row_num
def read_features_from_row(row, select_cols, feature_column_names,
feature_specs):
features = []
for name in feature_column_names:
feature = read_feature(row[select_cols.index(name)],
feature_specs[name], name)
features.append(feature)
return tuple(features)
def db_generator(driver,
conn,
statement,
feature_column_names,
label_spec,
feature_specs,
fetch_size=128):
def reader():
if driver == "hive":
cursor = conn.cursor(configuration=conn.session_cfg)
else:
cursor = conn.cursor()
cursor.execute(statement)
if driver == "hive":
field_names = None if cursor.description is None \
else [i[0][i[0].find('.') + 1:] for i in cursor.description]
else:
field_names = None if cursor.description is None \
else [i[0] for i in cursor.description]
if label_spec:
try:
label_idx = field_names.index(label_spec["feature_name"])
except ValueError:
# NOTE(typhoonzero): For clustering model, label_column_name may not in field_names when predicting.
label_idx = None
else:
label_idx = None
while True:
rows = cursor.fetchmany(size=fetch_size)
if not rows:
break
# NOTE: keep the connection while training or connection will lost if no activities appear.
if driver == "mysql":
conn.ping(True)
for row in rows:
# NOTE: If there is no label clause in the extended SQL, the default label value would
# be -1, the Model implementation can determine use it or not.
label = row[label_idx] if label_idx is not None else -1
if label_spec and label_spec["delimiter"] != "":
if label_spec["dtype"] == "float32":
label = np.fromstring(label,
dtype=float,
sep=label_spec["delimiter"])
elif label_spec["dtype"] == "int64":
label = np.fromstring(label,
dtype=int,
sep=label_spec["delimiter"])
if label_idx is None:
yield list(row), None
else:
yield list(row), label
if len(rows) < fetch_size:
break
cursor.close()
if driver == "maxcompute":
from sqlflow_submitter.maxcompute import MaxCompute
return MaxCompute.db_generator(conn, statement, feature_column_names,
label_spec, feature_specs, fetch_size)
if driver == "hive":
# trip the suffix ';' to avoid the ParseException in hive
statement = statement.rstrip(';')
return reader
def pai_maxcompute_db_generator(table,
feature_column_names,
label_column_name,
feature_specs,
fetch_size=128,
slice_id=0,
slice_count=1):
def reader():
import paiio
pai_reader = paiio.TableReader(table,
slice_id=slice_id,
slice_count=slice_count)
selected_cols = [item['colname'] for item in pai_reader.get_schema()]
label_index = selected_cols.index(
label_column_name) if label_column_name else None
while True:
try:
row = pai_reader.read(num_records=1)[0]
except:
pai_reader.close()
break
if label_index is not None:
yield list(row), row[label_index]
else:
yield list(row), None
return reader
@contextlib.contextmanager
def buffered_db_writer(driver,
conn,
table_name,
table_schema,
buff_size=100,
hdfs_namenode_addr="",
hive_location="",
hdfs_user="",
hdfs_pass=""):
if driver == "maxcompute":
w = db_writer.MaxComputeDBWriter(conn, table_name, table_schema,
buff_size)
elif driver == "mysql":
w = db_writer.MySQLDBWriter(conn, table_name, table_schema, buff_size)
elif driver == "hive":
w = db_writer.HiveDBWriter(conn,
table_name,
table_schema,
buff_size,
hdfs_namenode_addr=hdfs_namenode_addr,
hive_location=hive_location,
hdfs_user=hdfs_user,
hdfs_pass=hdfs_pass)
elif driver == "pai_maxcompute":
w = db_writer.PAIMaxComputeDBWriter(table_name, table_schema,
buff_size)
else:
raise ValueError("unrecognized database driver: %s" % driver)
try:
yield w
finally:
w.close()
|
#
# Copyright 2016 Cluster Labs, Inc.
#
# 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 httplib
import mimetypes
import os.path
BOUNDARY = '----------5e787aa69b512799e20372db1865a802'
def post_multipart(host, path, file_dict):
content_type, body = _encode_multipart_formdata(file_dict)
req = httplib.HTTP(host)
req.putrequest('POST', path)
req.putheader('Host', host)
req.putheader('Content-Type', content_type)
req.putheader('Content-Length', str(len(body)))
req.endheaders()
req.send(body)
errcode, errmsg, headers = req.getreply()
return req.file.read()
def _get_content_type(filename):
return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
def _encode_multipart_formdata(file_dict):
body_parts = []
for key, filename in file_dict.items():
body_parts.append('--' + BOUNDARY)
body_parts.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, os.path.basename(filename)))
body_parts.append('Content-Type: %s' % _get_content_type(filename))
body_parts.append('')
with open(filename) as f:
body_parts.append(f.read())
body_parts.append('--' + BOUNDARY + '--')
body_parts.append('')
content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
return content_type, '\r\n'.join(body_parts)
|
// 1. Object
const nodejs = {
name: 'Node.js',
type: 'JavaScript runtime environment',
};
// TODO: Destructure the object 'nodejs'
const { name: languageName, type } = nodejs
console.log(languageName); // <= Node.js
console.log(type); // <= JavaScript runtime environment
// 2. Nested Object
const js = {
name: 'JavaScript',
type: 'programming language',
version: 'ES6',
tools: {
frameworks: {
framework1: 'AngularJS',
framework2: 'Vue.js',
},
libraries: {
library1: 'jQuery',
library2: 'React',
},
},
};
// TODO: Destructure the nested object 'js'
const { framework1, framework2 } = js.tools.frameworks
// const { tools:
// {
// frameworks:
// {
// framework1
// }
// }
// } = js;
// const { tools:
// {
// frameworks:
// {
// framework2
// }
// }
// } = js;
console.log(framework1); // <= AngularJS
console.log(framework2); // <= Vue.js
// 3. Arrays
const languages = ['HTML', 'CSS', 'JavaScript'];
// TODO: Destructure the array 'languages'
const [markup, style, scripting] = languages
console.log(markup, style, scripting); // <= HTML CSS JavaScript
console.log(markup); // <= HTML
|
# Copyright 2018, OpenCensus Authors
# Copyright The OpenTelemetry Authors
#
# 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.
"""
OpenTelemetry Jaeger Protobuf Exporter
--------------------------------------
The **OpenTelemetry Jaeger Protobuf Exporter** allows to export `OpenTelemetry`_ traces to `Jaeger`_.
This exporter always sends traces to the configured agent using Protobuf via gRPC.
Usage
-----
.. code:: python
from opentelemetry import trace
from opentelemetry.exporter.jaeger.proto.grpc import JaegerExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
trace.set_tracer_provider(TracerProvider())
tracer = trace.get_tracer(__name__)
# create a JaegerExporter
jaeger_exporter = JaegerExporter(
# optional: configure collector
# collector_endpoint='localhost:14250',
# insecure=True, # optional
# credentials=xxx # optional channel creds
# max_tag_value_length=None # optional
)
# Create a BatchSpanProcessor and add the exporter to it
span_processor = BatchSpanProcessor(jaeger_exporter)
# add to the tracer
trace.get_tracer_provider().add_span_processor(span_processor)
with tracer.start_as_current_span('foo'):
print('Hello world!')
You can configure the exporter with the following environment variables:
- :envvar:`OTEL_EXPORTER_JAEGER_ENDPOINT`
- :envvar:`OTEL_EXPORTER_JAEGER_CERTIFICATE`
API
---
.. _Jaeger: https://www.jaegertracing.io/
.. _OpenTelemetry: https://github.com/open-telemetry/opentelemetry-python/
"""
# pylint: disable=protected-access
import logging
from os import environ
from typing import Optional
from grpc import ChannelCredentials, insecure_channel, secure_channel
from opentelemetry import trace
from opentelemetry.exporter.jaeger.proto.grpc import util
from opentelemetry.exporter.jaeger.proto.grpc.gen import model_pb2
from opentelemetry.exporter.jaeger.proto.grpc.gen.collector_pb2 import (
PostSpansRequest,
)
from opentelemetry.exporter.jaeger.proto.grpc.gen.collector_pb2_grpc import (
CollectorServiceStub,
)
from opentelemetry.exporter.jaeger.proto.grpc.translate import (
ProtobufTranslator,
Translate,
)
from opentelemetry.sdk.environment_variables import (
OTEL_EXPORTER_JAEGER_ENDPOINT,
)
from opentelemetry.sdk.resources import SERVICE_NAME, Resource
from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
DEFAULT_GRPC_COLLECTOR_ENDPOINT = "localhost:14250"
logger = logging.getLogger(__name__)
class JaegerExporter(SpanExporter):
"""Jaeger span exporter for OpenTelemetry.
Args:
collector_endpoint: The endpoint of the Jaeger collector that uses
Protobuf via gRPC.
insecure: True if collector has no encryption or authentication
credentials: Credentials for server authentication.
max_tag_value_length: Max length string attribute values can have. Set to None to disable.
"""
def __init__(
self,
collector_endpoint: Optional[str] = None,
insecure: Optional[bool] = None,
credentials: Optional[ChannelCredentials] = None,
max_tag_value_length: Optional[int] = None,
):
self._max_tag_value_length = max_tag_value_length
self.collector_endpoint = _parameter_setter(
param=collector_endpoint,
env_variable=environ.get(OTEL_EXPORTER_JAEGER_ENDPOINT),
default=None,
)
self._grpc_client = None
self.insecure = insecure
self.credentials = util._get_credentials(credentials)
tracer_provider = trace.get_tracer_provider()
self.service_name = (
tracer_provider.resource.attributes[SERVICE_NAME]
if getattr(tracer_provider, "resource", None)
else Resource.create().attributes.get(SERVICE_NAME)
)
@property
def _collector_grpc_client(self) -> Optional[CollectorServiceStub]:
endpoint = self.collector_endpoint or DEFAULT_GRPC_COLLECTOR_ENDPOINT
if self._grpc_client is None:
if self.insecure:
self._grpc_client = CollectorServiceStub(
insecure_channel(endpoint)
)
else:
self._grpc_client = CollectorServiceStub(
secure_channel(endpoint, self.credentials)
)
return self._grpc_client
def export(self, spans) -> SpanExportResult:
# Populate service_name from first span
# We restrict any SpanProcessor to be only associated with a single
# TracerProvider, so it is safe to assume that all Spans in a single
# batch all originate from one TracerProvider (and in turn have all
# the same service.name)
if spans:
service_name = spans[0].resource.attributes.get(SERVICE_NAME)
if service_name:
self.service_name = service_name
translator = Translate(spans)
pb_translator = ProtobufTranslator(
self.service_name, self._max_tag_value_length
)
jaeger_spans = translator._translate(pb_translator)
batch = model_pb2.Batch(spans=jaeger_spans)
request = PostSpansRequest(batch=batch)
self._collector_grpc_client.PostSpans(request)
return SpanExportResult.SUCCESS
def shutdown(self):
pass
def _parameter_setter(param, env_variable, default):
"""Returns value according to the provided data.
Args:
param: Constructor parameter value
env_variable: Environment variable related to the parameter
default: Constructor parameter default value
"""
if param is None:
res = env_variable or default
else:
res = param
return res
|
var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,a){function o(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n["throw"](t))}catch(t){a(t)}}function l(t){t.done?i(t.value):r(t.value).then(o,s)}l((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return l([t,e])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,r&&(a=o[0]&2?r["return"]:o[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,o[1])).done)return a;if(r=0,a)o=[o[0]&2,a.value];switch(o[0]){case 0:case 1:a=o;break;case 4:i.label++;return{value:o[1],done:false};case 5:i.label++;r=o[1];o=[0];continue;case 7:o=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(o[0]===6||o[0]===2)){i=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){i.label=o[1];break}if(o[0]===6&&i.label<a[1]){i.label=a[1];a=o;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(o);break}if(a[2])i.ops.pop();i.trys.pop();continue}o=e.call(t,i)}catch(t){o=[6,t];r=0}finally{n=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-92f7c087.system.js","./p-5fcc633d.system.js"],(function(t){"use strict";var e,i,n,r,a,o,s,l,d;return{setters:[function(t){e=t.r;i=t.e;n=t.f;r=t.c;a=t.i;o=t.h;s=t.H;l=t.g},function(t){d=t.s}],execute:function(){var c='.paginator-enabled{--padding-top:0;--padding-start:0;--padding-end:0;--padding-bottom:0;--toolbar-padding-top:var(--bkkr-spacer, 16px);--toolbar-padding-start:0;--toolbar-padding-end:0;--toolbar-padding-bottom:0;display:block}.paginator-infinite.paginator-enabled{min-height:84px}.paginator-content{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.paginator-content{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.paginator-ambient{--background:linear-gradient(-45deg, transparent, var(--color-base, var(--color-primary, #3880ff))), linear-gradient(45deg, transparent, var(--color-base, var(--color-primary, #3880ff))), linear-gradient(135deg, transparent, var(--color-base, var(--color-primary, #3880ff))), linear-gradient(-135deg, transparent, var(--color-base, var(--color-primary, #3880ff)));--border-radius:0;border-radius:var(--border-radius);top:0;left:0;position:absolute;width:100%;height:100%;overflow:hidden;background-image:var(--background);background-repeat:no-repeat;background-position:0 0, 100% 0, 100% 100%, 0 100%;background-size:50% 50%, 50% 50%}.paginator-ambient::before{top:40px;left:-40px;position:absolute;width:calc(100% + 80px);height:calc(100% + 80px);background:var(--bkkr-background-color, #fff);-webkit-transform-origin:center top;transform-origin:center top;-webkit-transition:0.2s opacity cubic-bezier(0.32, 0.72, 0, 1);transition:0.2s opacity cubic-bezier(0.32, 0.72, 0, 1);content:"";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1;opacity:1;-webkit-animation-name:shimmer;animation-name:shimmer;-webkit-animation-duration:5s;animation-duration:5s;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-play-state:paused;animation-play-state:paused;pointer-events:none}.paginator-ambient::after{border-radius:var(--border-radius);top:50%;left:50%;position:absolute;width:100%;height:100%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);-webkit-transition:0.2s height cubic-bezier(0.32, 0.72, 0, 1), 0.2s -webkit-transform cubic-bezier(0.32, 0.72, 0, 1);transition:0.2s height cubic-bezier(0.32, 0.72, 0, 1), 0.2s -webkit-transform cubic-bezier(0.32, 0.72, 0, 1);transition:0.2s transform cubic-bezier(0.32, 0.72, 0, 1), 0.2s height cubic-bezier(0.32, 0.72, 0, 1);transition:0.2s transform cubic-bezier(0.32, 0.72, 0, 1), 0.2s height cubic-bezier(0.32, 0.72, 0, 1), 0.2s -webkit-transform cubic-bezier(0.32, 0.72, 0, 1);background:var(--bkkr-background-color, #fff);-webkit-filter:blur(10px);filter:blur(10px);content:"";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;pointer-events:none}@-webkit-keyframes shimmer{0%{-webkit-transform:translateY(-80px) scale(1, 1);transform:translateY(-80px) scale(1, 1);border-bottom-left-radius:0;border-bottom-right-radius:0}70%{-webkit-transform:translateY(-80px) scale(1, 0.1);transform:translateY(-80px) scale(1, 0.1);border-bottom-left-radius:50%;border-bottom-right-radius:50%}100%{-webkit-transform:translateY(0) scale(0, 0);transform:translateY(0) scale(0, 0);border-bottom-left-radius:50%;border-bottom-right-radius:50%}}@keyframes shimmer{0%{-webkit-transform:translateY(-80px) scale(1, 1);transform:translateY(-80px) scale(1, 1);border-bottom-left-radius:0;border-bottom-right-radius:0}70%{-webkit-transform:translateY(-80px) scale(1, 0.1);transform:translateY(-80px) scale(1, 0.1);border-bottom-left-radius:50%;border-bottom-right-radius:50%}100%{-webkit-transform:translateY(0) scale(0, 0);transform:translateY(0) scale(0, 0);border-bottom-left-radius:50%;border-bottom-right-radius:50%}}.paginator-loading-content{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:none;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%;min-height:84px;text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.paginator-loading-text{margin-left:32px;margin-right:32px;margin-top:4px;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.paginator-loading-text{margin-left:unset;margin-right:unset;-webkit-margin-start:32px;margin-inline-start:32px;-webkit-margin-end:32px;margin-inline-end:32px}}.paginator-loading>.paginator-ambient::before{opacity:1;-webkit-animation-play-state:running;animation-play-state:running}.paginator-loading>.paginator-ambient::after{width:calc(100% - 12px);height:calc(100% - 12px)}.paginator-loading>.paginator-loading-content{display:-ms-flexbox;display:flex}.paginator-toolbar{margin-left:0;margin-right:-0.9em;margin-top:0;margin-bottom:0;padding-left:var(--toolbar-padding-start);padding-right:var(--toolbar-padding-end);padding-top:var(--toolbar-padding-top);padding-bottom:var(--toolbar-padding-bottom);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.paginator-toolbar{margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:-0.9em;margin-inline-end:-0.9em}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.paginator-toolbar{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--toolbar-padding-start);padding-inline-start:var(--toolbar-padding-start);-webkit-padding-end:var(--toolbar-padding-end);padding-inline-end:var(--toolbar-padding-end)}}.paginator-toolbar bkkr-select{min-width:60px;font-size:0.875em}.paginator-toolbar-fragment{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%}.paginator-toolbar-fragment bkkr-button{min-width:2.8em}.paginator-toolbar-fragment .paginator-statustext{padding-right:var(--bkkr-spacer, 16px);position:relative}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.paginator-toolbar-fragment .paginator-statustext{padding-right:unset;-webkit-padding-end:var(--bkkr-spacer, 16px);padding-inline-end:var(--bkkr-spacer, 16px)}}.paginator-toolbar-fragment .paginator-statustext:after{top:0;right:0;position:absolute;width:0.55px;height:100%;background-color:var(--bkkr-border, rgba(var(--bkkr-text-color-rgb, 0, 0, 0), 0.1));content:""}';var g=t("bkkr_paginator",function(){function t(t){var n=this;e(this,t);this.bkkrPaginator=i(this,"bkkrPaginator",7);this.bkkrPageSizeChanged=i(this,"bkkrPageSizeChanged",7);this.thrPx=0;this.thrPc=0;this.didFire=false;this.isBusy=false;this.isLoading=false;this.threshold="15%";this.page=1;this.infinite=false;this.toolbar=true;this.position="bottom";this.arrowIcon="chevron";this.statusText="/";this.loadingType="ambient";this.loadingSpinner="crescent";this.disabled=false;this.routerDirection="forward";this.onScroll=function(){var t=n.scrollEl;if(!t||!n.canStart()){return 1}var e=t.scrollTop;var i=t.scrollHeight;var r=t.offsetHeight;var a=n.thrPc!==0?r*n.thrPc:n.thrPx;var o=n.position==="bottom"?i-e-a-r:e-a;if(o<0){if(!n.didFire){n.isLoading=true;n.didFire=true;n.page+=1;n.bkkrPaginator.emit();return 3}}else{n.didFire=false}return 4};this.handleClick=function(t,e){t.preventDefault();n.changeIndex(e)};this.handleLenghtChange=function(t){n.lenght=t.detail.value;var e=n.page*n.lenght;if(e>n.items){n.page=Math.ceil(n.items/n.lenght)}n.bkkrPageSizeChanged.emit()}}t.prototype.thresholdChanged=function(){var t=this.threshold;if(t.lastIndexOf("%")>-1){this.thrPx=0;this.thrPc=parseFloat(t)/100}else{this.thrPx=parseFloat(t);this.thrPc=0}};t.prototype.itemsChanged=function(){n(this)};t.prototype.pageChanged=function(){n(this)};t.prototype.infiniteChanged=function(){var t=this.infinite&&!this.disabled;if(!t){this.isLoading=false;this.isBusy=false}this.enableScrollEvents(t)};t.prototype.disabledChanged=function(){var t=this.disabled;if(t){this.isLoading=false;this.isBusy=false;this.infinite=false}};t.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;var i=this;return __generator(this,(function(n){switch(n.label){case 0:t=this.el.closest("bkkr-content");if(!t){console.error("<bkkr-paginator> must be used inside an <bkkr-content>");return[2]}e=this;return[4,t.getScrollElement()];case 1:e.scrollEl=n.sent();this.thresholdChanged();this.infiniteChanged();this.disabledChanged();if(this.position==="top"){r((function(){if(i.scrollEl){i.scrollEl.scrollTop=i.scrollEl.scrollHeight-i.scrollEl.clientHeight}}))}return[2]}}))}))};t.prototype.onResize=function(){n(this)};t.prototype.disconnectedCallback=function(){this.enableScrollEvents(false);this.scrollEl=undefined};t.prototype.changeIndex=function(t){if(!this.isLoading){this.isLoading=true;this.page=t;this.bkkrPaginator.emit()}};t.prototype.complete=function(){return __awaiter(this,void 0,void 0,(function(){var t,e;var i=this;return __generator(this,(function(n){t=this.scrollEl;if(!this.isLoading||!t){return[2]}this.isLoading=false;if(this.position==="top"){this.isBusy=true;e=t.scrollHeight-t.scrollTop;requestAnimationFrame((function(){a((function(){var n=t.scrollHeight;var a=n-e;requestAnimationFrame((function(){r((function(){t.scrollTop=a;i.isBusy=false}))}))}))}))}return[2]}))}))};t.prototype.canStart=function(){return!this.disabled&&!this.isBusy&&!!this.scrollEl&&!this.isLoading&&!!this.infinite};t.prototype.enableScrollEvents=function(t){if(this.scrollEl){if(t){this.scrollEl.addEventListener("scroll",this.onScroll)}else{this.scrollEl.removeEventListener("scroll",this.onScroll)}}};t.prototype.render=function(){var t;var e=this;var i=this,n=i.disabled,r=i.infinite,a=i.items,l=i.href,c=i.lenght,g=i.page,b=i.isLoading,u=i.loadingType,f=i.loadingSpinner,h=i.loadingText,m=i.toolbar,k=i.arrowIcon,v=i.statusText,x=i.handleClick;var w=window.innerWidth<768;var y=r?1:g*c-(c-1);var C=Math.min(g*c,a);var z=Math.ceil(a/c);var E=y>1;var P=C<a;var S=[];var _=false;for(var L=1;L<=z;L++){if(L===1||L===z||L>=g-1&&L<g+2){S.push({index:L,label:L,selected:L===g?true:null});_=false}else{if(!_&&L>1&&(L>=g-1||L<g+2)){S.push({index:null,label:"..."});_=true}}}return o(s,{class:(t={"paginator-loading":b,"paginator-enabled":!n,"paginator-infinite":r},t["paginator-loading-"+u]=true,t)},o("div",{class:"paginator-content"},o("slot",null),u==="ambient"&&o("div",{class:"paginator-ambient"})),u==="spinner"&&o("div",{class:"paginator-loading-content"},f&&o("div",{class:"paginator-loading-spinner"},o("bkkr-spinner",{type:f})),h&&o("div",{class:"paginator-loading-text",innerHTML:d(h)})),m&&!r&&o("nav",{class:"paginator-toolbar"},!w&&o("div",{class:"paginator-toolbar-fragment"},o("small",{class:"paginator-statustext"},y," - ",C," ",v," ",a),o("bkkr-select",{value:15,search:false,interface:"popover",onBkkrChange:function(t){return e.handleLenghtChange(t)}},o("bkkr-select-option",{value:15},"15"),o("bkkr-select-option",{value:30},"30"),o("bkkr-select-option",{value:50},"50"))),o("div",{class:"paginator-toolbar-fragment justify-content-center justify-content-md-end"},o("bkkr-button",{fill:"clear",color:"primary",href:l!==undefined?l+(g-1):null,disabled:!E,onClick:function(t){return e.handleClick(t,g-1)}},o("bkkr-icon",{name:k+"-left"})),S.map((function(t){return p(t,{href:l,handleClick:x})})),o("bkkr-button",{fill:"clear",color:"primary",href:l!==undefined?l+(g+1):null,disabled:!P,onClick:function(t){return e.handleClick(t,g+1)}},o("bkkr-icon",{name:k+"-right"})))))};Object.defineProperty(t.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{threshold:["thresholdChanged"],lenght:["itemsChanged"],page:["pageChanged"],infinite:["infiniteChanged"],disabled:["disabledChanged"]}},enumerable:false,configurable:true});return t}());var p=function(t,e){var i=e.href,n=e.handleClick;var r=window.innerWidth<768;if(r&&!t.selected){return}return o("bkkr-button",{href:i&&t.index?i+t.index:null,onClick:function(e){return n(e,t.index)},fill:t.selected?"solid":"clear",color:"primary",disabled:t.index===null},t.label)};g.style=c}}})); |
// Export a render(input) method that can be used
// to render this UI component on the client or server
require("marko/legacy-components").renderable(exports, require("./renderer")); |
// @flow
/* eslint import/newline-after-import: 0 */
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import SafeAreaView from 'react-native-safe-area-view'
import {
StyleSheet,
View,
Image,
TouchableOpacity,
Modal,
Text,
TextInput,
ListView,
ScrollView,
Platform
} from 'react-native'
import Fuse from 'fuse.js'
import cca2List from '../data/cca2'
import { getHeightPercent } from './ratio'
import CloseButton from './CloseButton'
import countryPickerStyles from './CountryPicker.style'
import KeyboardAvoidingView from './KeyboardAvoidingView'
let countries = null
let Emoji = null
let styles = {}
let isEmojiable = Platform.OS === 'ios'
const FLAG_TYPES = {
flat: 'flat',
emoji: 'emoji'
}
const setCountries = flagType => {
if (typeof flagType !== 'undefined') {
isEmojiable = flagType === FLAG_TYPES.emoji
}
if (isEmojiable) {
countries = require('../data/countries-emoji')
Emoji = require('./emoji').default
} else {
countries = require('../data/countries')
Emoji = <View />
}
}
const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 })
setCountries()
export const getAllCountries = () =>
cca2List.map(cca2 => ({ ...countries[cca2], cca2 }))
export default class CountryPicker extends Component {
static propTypes = {
cca2: PropTypes.string.isRequired,
translation: PropTypes.string,
onChange: PropTypes.func.isRequired,
onClose: PropTypes.func,
closeable: PropTypes.bool,
filterable: PropTypes.bool,
children: PropTypes.node,
countryList: PropTypes.array,
excludeCountries: PropTypes.array,
styles: PropTypes.object,
filterPlaceholder: PropTypes.string,
autoFocusFilter: PropTypes.bool,
// to provide a functionality to disable/enable the onPress of Country Picker.
disabled: PropTypes.bool,
filterPlaceholderTextColor: PropTypes.string,
closeButtonImage: PropTypes.element,
transparent: PropTypes.bool,
animationType: PropTypes.oneOf(['slide', 'fade', 'none']),
flagType: PropTypes.oneOf(Object.values(FLAG_TYPES)),
hideAlphabetFilter: PropTypes.bool,
renderFilter: PropTypes.func,
showCallingCode: PropTypes.bool,
filterOptions: PropTypes.object
}
static defaultProps = {
translation: 'eng',
countryList: cca2List,
excludeCountries: [],
filterPlaceholder: 'Filter',
autoFocusFilter: true,
transparent: false,
animationType: 'none'
}
static renderEmojiFlag(cca2, emojiStyle) {
return (
<Text style={[styles.emojiFlag, emojiStyle]} allowFontScaling={false}>
{cca2 !== '' && countries[cca2.toUpperCase()] ? (
<Emoji name={countries[cca2.toUpperCase()].flag} />
) : null}
</Text>
)
}
static renderImageFlag(cca2, imageStyle) {
return cca2 !== '' ? (
<Image
style={[styles.imgStyle, imageStyle]}
source={{ uri: countries[cca2].flag }}
/>
) : null
}
static renderFlag(cca2, itemStyle, emojiStyle, imageStyle) {
return (
<View style={[styles.itemCountryFlag, itemStyle]}>
{isEmojiable
? CountryPicker.renderEmojiFlag(cca2, emojiStyle)
: CountryPicker.renderImageFlag(cca2, imageStyle)}
</View>
)
}
constructor(props) {
super(props)
this.openModal = this.openModal.bind(this)
setCountries(props.flagType)
let countryList = [...props.countryList]
const excludeCountries = [...props.excludeCountries]
excludeCountries.forEach(excludeCountry => {
const index = countryList.indexOf(excludeCountry)
if (index !== -1) {
countryList.splice(index, 1)
}
})
// Sort country list
countryList = countryList
.map(c => [c, this.getCountryName(countries[c])])
.sort((a, b) => {
if (a[1] < b[1]) return -1
if (a[1] > b[1]) return 1
return 0
})
.map(c => c[0])
this.state = {
modalVisible: false,
cca2List: countryList,
dataSource: ds.cloneWithRows(countryList),
filter: '',
letters: this.getLetters(countryList)
}
if (this.props.styles) {
Object.keys(countryPickerStyles).forEach(key => {
styles[key] = StyleSheet.flatten([
countryPickerStyles[key],
this.props.styles[key]
])
})
styles = StyleSheet.create(styles)
} else {
styles = countryPickerStyles
}
const options = Object.assign({
shouldSort: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: ['name'],
id: 'id'
}, this.props.filterOptions);
this.fuse = new Fuse(
countryList.reduce(
(acc, item) => [
...acc,
{ id: item, name: this.getCountryName(countries[item]) }
],
[]
),
options
)
}
componentWillReceiveProps(nextProps) {
if (nextProps.countryList !== this.props.countryList) {
this.setState({
cca2List: nextProps.countryList,
dataSource: ds.cloneWithRows(nextProps.countryList)
})
}
}
onSelectCountry(cca2) {
this.setState({
modalVisible: false,
filter: '',
dataSource: ds.cloneWithRows(this.state.cca2List)
})
this.props.onChange({
cca2,
...countries[cca2],
flag: undefined,
name: this.getCountryName(countries[cca2])
})
}
onClose = () => {
this.setState({
modalVisible: false,
filter: '',
dataSource: ds.cloneWithRows(this.state.cca2List)
})
if (this.props.onClose) {
this.props.onClose()
}
}
getCountryName(country, optionalTranslation) {
const translation = optionalTranslation || this.props.translation || 'eng'
return country.name[translation] || country.name.common
}
setVisibleListHeight(offset) {
this.visibleListHeight = getHeightPercent(100) - offset
}
getLetters(list) {
return Object.keys(
list.reduce(
(acc, val) => ({
...acc,
[this.getCountryName(countries[val])
.slice(0, 1)
.toUpperCase()]: ''
}),
{}
)
).sort()
}
openModal = this.openModal.bind(this)
// dimensions of country list and window
itemHeight = getHeightPercent(7)
listHeight = countries.length * this.itemHeight
openModal() {
this.setState({ modalVisible: true })
}
scrollTo(letter) {
// find position of first country that starts with letter
const index = this.state.cca2List
.map(country => this.getCountryName(countries[country])[0])
.indexOf(letter)
if (index === -1) {
return
}
let position = index * this.itemHeight
// do not scroll past the end of the list
if (position + this.visibleListHeight > this.listHeight) {
position = this.listHeight - this.visibleListHeight
}
// scroll
this._listView.scrollTo({
y: position
})
}
handleFilterChange = value => {
const filteredCountries =
value === '' ? this.state.cca2List : this.fuse.search(value)
this._listView.scrollTo({ y: 0 })
this.setState({
filter: value,
dataSource: ds.cloneWithRows(filteredCountries)
})
}
renderCountry(country, index) {
return (
<TouchableOpacity
key={index}
onPress={() => this.onSelectCountry(country)}
activeOpacity={0.99}
>
{this.renderCountryDetail(country)}
</TouchableOpacity>
)
}
renderLetters(letter, index) {
return (
<TouchableOpacity
key={index}
onPress={() => this.scrollTo(letter)}
activeOpacity={0.6}
>
<View style={styles.letter}>
<Text style={styles.letterText} allowFontScaling={false}>
{letter}
</Text>
</View>
</TouchableOpacity>
)
}
renderCountryDetail(cca2) {
const country = countries[cca2]
return (
<View style={styles.itemCountry}>
{CountryPicker.renderFlag(cca2)}
<View style={styles.itemCountryName}>
<Text style={styles.countryName} allowFontScaling={false}>
{this.getCountryName(country)}
{this.props.showCallingCode &&
country.callingCode &&
<Text>{` (+${country.callingCode})`}</Text>}
</Text>
</View>
</View>
)
}
renderFilter = () => {
const {
renderFilter,
autoFocusFilter,
filterPlaceholder,
filterPlaceholderTextColor
} = this.props
const value = this.state.filter
const onChange = this.handleFilterChange
const onClose = this.onClose
return renderFilter ? (
renderFilter({ value, onChange, onClose })
) : (
<TextInput
autoFocus={autoFocusFilter}
autoCorrect={false}
placeholder={filterPlaceholder}
placeholderTextColor={filterPlaceholderTextColor}
style={[styles.input, !this.props.closeable && styles.inputOnly]}
onChangeText={onChange}
value={value}
/>
)
}
render() {
return (
<View style={styles.container}>
<TouchableOpacity
disabled={this.props.disabled}
onPress={() => this.setState({ modalVisible: true })}
activeOpacity={0.7}
>
{this.props.children ? (
this.props.children
) : (
<View
style={[styles.touchFlag, { marginTop: isEmojiable ? 0 : 5 }]}
>
{CountryPicker.renderFlag(this.props.cca2)}
</View>
)}
</TouchableOpacity>
<Modal
transparent={this.props.transparent}
animationType={this.props.animationType}
visible={this.state.modalVisible}
onRequestClose={() => this.setState({ modalVisible: false })}
>
<SafeAreaView style={styles.modalContainer}>
<View style={styles.header}>
{this.props.closeable && (
<CloseButton
image={this.props.closeButtonImage}
styles={[styles.closeButton, styles.closeButtonImage]}
onPress={() => this.onClose()}
/>
)}
{this.props.filterable && this.renderFilter()}
</View>
<KeyboardAvoidingView behavior="padding">
<View style={styles.contentContainer}>
<ListView
keyboardShouldPersistTaps="always"
enableEmptySections
ref={listView => (this._listView = listView)}
dataSource={this.state.dataSource}
renderRow={country => this.renderCountry(country)}
initialListSize={30}
pageSize={15}
onLayout={({ nativeEvent: { layout: { y: offset } } }) =>
this.setVisibleListHeight(offset)
}
/>
{!this.props.hideAlphabetFilter && (
<ScrollView
contentContainerStyle={styles.letters}
keyboardShouldPersistTaps="always"
>
{this.state.filter === '' &&
this.state.letters.map((letter, index) =>
this.renderLetters(letter, index)
)}
</ScrollView>
)}
</View>
</KeyboardAvoidingView>
</SafeAreaView>
</Modal>
</View>
)
}
}
|
import React from 'react';
import loadable from '@loadable/component';
import Loading from 'components/Loading';
import ErrorPage from './pages/ErrorPage';
import HomePage from './pages/HomePage';
const MassList = loadable(() => import('./components/MassList'), {
fallback: <Loading />,
});
export default [
{
path: '/',
exact: true,
component: HomePage,
},
{
path: '/masses/year-a',
component: () => <MassList liturgicalYear="A" />,
},
{
path: '/masses/year-b',
component: () => <MassList liturgicalYear="B" />,
},
{
path: '/masses/year-c',
component: () => <MassList liturgicalYear="C" />,
},
{
path: '*',
render: () => <ErrorPage code="404" message="NOT FOUND" />,
},
];
|
require('./bootstrap');
require('alpinejs');
|
#Code Contributor: Rohan Badlani, Email: [email protected]
import os
import sys
class FileFormat(object):
def __init__(self, filepath):
self.count = 0
self.filepath = filepath
self.labelDict = self.readLabels()
def readLabels(self):
try:
#Filename will act as key and labels list will be the value
self.labelsDict = {}
with open(self.filepath) as filename:
for line in filename:
lineArr = line.split("\t")
#audioFile must be present, make it hard
if len(lineArr) == 4:
if float(lineArr[2].strip()) == 0.0:
if(lineArr[0].split(".wav")[0].split(".flac")[0].strip() not in self.labelsDict.keys()):
self.count = self.count + 1
continue
else:
if(lineArr[0].split(".wav")[0].split(".flac")[0].strip() not in self.labelsDict.keys()):
self.count = self.count + 1
audioFile = lineArr[0].split(".wav")[0].split(".flac")[0].strip()
else:
if(lineArr[0].split(".wav")[0].split(".flac")[0].strip() not in self.labelsDict.keys()):
self.count = self.count + 1
audioFile = lineArr[0].split(".wav")[0].split(".flac")[0].strip()
try:
startTime = lineArr[1].strip()
except Exception as ex1:
startTime = ""
try:
endTime = lineArr[2].strip()
except Exception as ex2:
endTime = ""
try:
label = lineArr[3].strip()
except Exception as ex3:
label = ""
if audioFile not in self.labelsDict.keys():
#does not exist
if label is not "":
self.labelsDict[audioFile] = [label]
else:
self.labelsDict[audioFile] = []
else:
#exists
if label is not "":
self.labelsDict[audioFile].append(label)
filename.close()
#Debug Print
#for key in self.labelsDict.keys():
# print str(key) + ":" + str(self.labelsDict[key])
except Exception as ex:
print "Fileformat of the file " + str(self.filepath) + " is invalid."
raise ex
def validatePredictedDS(self, predictedDS):
#iterate over predicted list
#check bothways
for audioFile in predictedDS.labelsDict.keys():
if(audioFile not in self.labelsDict.keys()):
return False
for audioFile in self.labelsDict.keys():
if(audioFile not in predictedDS.labelsDict.keys()):
return False
#check complete. One-One mapping
return True
def computeMetrics(self, predictedDS, output_filepath):
TP = 0
FP = 0
FN = 0
classWiseMetrics = {}
#iterate over predicted list
for audioFile in predictedDS.labelsDict.keys():
markerList = [0]*len(self.labelsDict[audioFile])
for predicted_label in predictedDS.labelsDict[audioFile]:
#for a predicted label
#1. Check if it is present inside groundTruth, if yes push to TP, mark the existance of that groundtruth label
index = 0
for groundtruth_label in self.labelsDict[audioFile]:
if(predicted_label == groundtruth_label):
TP += 1
markerList[index] = 1
break
index+=1
if(index == len(self.labelsDict[audioFile])):
#not found. Add as FP
FP += 1
#check markerList, add all FN
for marker in markerList:
if marker == 0:
FN += 1
for groundtruth_label in self.labelsDict[audioFile]:
if groundtruth_label in predictedDS.labelsDict[audioFile]:
#the class was predicted correctly
if groundtruth_label in classWiseMetrics.keys():
classWiseMetrics[groundtruth_label][0] += 1
else:
#Format: TP, FP, FN
classWiseMetrics[groundtruth_label] = [1, 0, 0]
else:
#Not predicted --> FN
if groundtruth_label in classWiseMetrics.keys():
classWiseMetrics[groundtruth_label][2] += 1
else:
classWiseMetrics[groundtruth_label] = [0, 0, 1]
for predicted_label in predictedDS.labelsDict[audioFile]:
if predicted_label not in self.labelsDict[audioFile]:
#Predicted but not in Groundtruth --> FP
if predicted_label in classWiseMetrics.keys():
classWiseMetrics[predicted_label][1] += 1
else:
classWiseMetrics[predicted_label] = [0, 1, 0]
if(TP + FP != 0):
Precision = float(TP) / float(TP + FP)
else:
Precision = 0.0
if(TP + FN != 0):
Recall = float(TP) / float(TP + FN)
else:
Recall = 0.0
if(Precision + Recall != 0.0):
F1 = 2 * Precision * Recall / float(Precision + Recall)
else:
F1 = 0.0
with open(output_filepath, "w") as Metric_File:
Metric_File.write("\n\nClassWise Metrics\n\n")
Metric_File.close()
for classLabel in classWiseMetrics.keys():
precision = 0.0
recall = 0.0
f1 = 0.0
tp = classWiseMetrics[classLabel][0]
fp = classWiseMetrics[classLabel][1]
fn = classWiseMetrics[classLabel][2]
if(tp + fp != 0):
precision = float(tp) / float(tp + fp)
if(tp + fn != 0):
recall = float(tp) / float(tp + fn)
if(precision + recall != 0.0):
f1 = 2*precision*recall / float(precision + recall)
with open(output_filepath, "a") as Metric_File:
Metric_File.write("Class = " + str(classLabel) + ", Precision = " + str(precision) + ", Recall = " + str(recall) + ", F1 Score = " + str(f1) + "\n")
Metric_File.close()
#push to file
with open(output_filepath, "a") as Metric_File:
Metric_File.write("\n\nComplete Metrics\n\n")
Metric_File.write("Precision = " + str(Precision*100.0) + "\n")
Metric_File.write("Recall = " + str(Recall*100.0) + "\n")
Metric_File.write("F1 Score = " + str(F1*100.0) + "\n")
Metric_File.write("Number of Audio Files = " + str(self.count))
Metric_File.close()
def computeMetricsString(self, predictedDS):
TP = 0
FP = 0
FN = 0
classWiseMetrics = {}
#iterate over predicted list
for audioFile in predictedDS.labelsDict.keys():
if(audioFile in self.labelsDict):
markerList = [0]*len(self.labelsDict[audioFile])
for predicted_label in predictedDS.labelsDict[audioFile]:
#for a predicted label
#1. Check if it is present inside groundTruth, if yes push to TP, mark the existance of that groundtruth label
index = 0
for groundtruth_label in self.labelsDict[audioFile]:
if(predicted_label == groundtruth_label and markerList[index] != 1):
TP += 1
markerList[index] = 1
break
index+=1
if(index == len(self.labelsDict[audioFile])):
#not found. Add as FP
FP += 1
#check markerList, add all FN
for marker in markerList:
if marker == 0:
FN += 1
for groundtruth_label in self.labelsDict[audioFile]:
if groundtruth_label in predictedDS.labelsDict[audioFile]:
#the class was predicted correctly
if groundtruth_label in classWiseMetrics.keys():
classWiseMetrics[groundtruth_label][0] += 1
else:
#Format: TP, FP, FN
classWiseMetrics[groundtruth_label] = [1, 0, 0]
else:
#Not predicted --> FN
if groundtruth_label in classWiseMetrics.keys():
classWiseMetrics[groundtruth_label][2] += 1
else:
classWiseMetrics[groundtruth_label] = [0, 0, 1]
for predicted_label in predictedDS.labelsDict[audioFile]:
if predicted_label not in self.labelsDict[audioFile]:
#Predicted but not in Groundtruth --> FP
if predicted_label in classWiseMetrics.keys():
classWiseMetrics[predicted_label][1] += 1
else:
classWiseMetrics[predicted_label] = [0, 1, 0]
if(TP + FP != 0):
Precision = float(TP) / float(TP + FP)
else:
Precision = 0.0
if(TP + FN != 0):
Recall = float(TP) / float(TP + FN)
else:
Recall = 0.0
if(Precision + Recall != 0.0):
F1 = 2 * Precision * Recall / float(Precision + Recall)
else:
F1 = 0.0
output = ""
output += "\n\nClass-wise Metrics\n\n"
classWisePrecision = 0.0
classWiseRecall = 0.0
classWiseF1 = 0.0
classCount = 0
for classLabel in classWiseMetrics.keys():
classCount += 1
precision = 0.0
recall = 0.0
f1 = 0.0
tp = classWiseMetrics[classLabel][0]
fp = classWiseMetrics[classLabel][1]
fn = classWiseMetrics[classLabel][2]
if(tp + fp != 0):
precision = float(tp) / float(tp + fp)
classWisePrecision += precision
if(tp + fn != 0):
recall = float(tp) / float(tp + fn)
classWiseRecall += recall
if(precision + recall != 0.0):
f1 = 2*precision*recall / float(precision + recall)
output += "\tClass = " + str(classLabel.split("\n")[0]) + ", Precision = " + str(precision) + ", Recall = " + str(recall) + ", F1 Score = " + str(f1) + "\n"
classWisePrecision = classWisePrecision / classCount
classWiseRecall = classWiseRecall / classCount
if(classWisePrecision + classWiseRecall != 0.0):
classWiseF1 = 2*classWisePrecision*classWiseRecall / float(classWisePrecision + classWiseRecall)
output += "\n\n\tComplete Metrics (Macro Average or Class-Based)\n\n"
output += "\tPrecision = " + str(classWisePrecision*100.0) + "\n"
output += "\tRecall = " + str(classWiseRecall*100.0) + "\n"
output += "\tF1 Score = " + str(classWiseF1*100.0) + "\n"
output += "\tNumber of Audio Files = " + str(predictedDS.count) + "\n\n"
output += "\n\n\tComplete Metrics (Micro Average or Instance-Based) - These metrics will be used for system evaluation.\n\n"
output += "\tPrecision = " + str(Precision*100.0) + "\n"
output += "\tRecall = " + str(Recall*100.0) + "\n"
output += "\tF1 Score = " + str(F1*100.0) + "\n"
output += "\tNumber of Audio Files = " + str(predictedDS.count) + "\n\n"
return output
|
import React from 'react';
import BootstrapTable from "react-bootstrap-table-next";
import paginationFactory from "react-bootstrap-table2-paginator";
import filterFactory, { textFilter } from 'react-bootstrap-table2-filter';
const Table = ({ config }) => {
const initialState = {
selected : config.selected ? config.selected : [],
}
const[state,setState] = React.useState(initialState);
const handleOnSelect = (row, isSelect) => {
console.log(row);
if (isSelect) {
setState(() => ({
selected: [...state.selected, row.id]
}));
} else {
setState(() => ({
selected: state.selected.filter(x => x !== row.id)
}));
}
console.log(state);
}
const handleOnSelectAll = (isSelect, rows) => {
const ids = rows.map(r => r.id);
if (isSelect) {
setState(() => ({
selected: ids
}));
} else {
setState(() => ({
selected: []
}));
}
console.log(state);
}
const CaptionElement = () => (
<h3
style={{
borderRadius: "0.25em",
textAlign: "center",
color: "purple",
border: "1px solid purple",
padding: "0.5em",
}}
>
{config.header}
</h3>
);
const selectRowConfig = () => {
return config.selectRow && {...config.selectRow, selected: state.selected,
onSelect: handleOnSelect,
onSelectAll: handleOnSelectAll };
}
return (
<BootstrapTable
bootstrap4on
caption={<CaptionElement />}
keyField="id"
data={config.data}
columns={config.columns}
defaultSorted={config.defaultSorted}
selectRow={selectRowConfig()}
filter={ filterFactory() }
pagination={config.pagination && paginationFactory(config.pagination)}
/>
);
};
export default Table;
|
# Copyright (c) OpenMMLab. All rights reserved.
from .ema import ExponentialMovingAverageHook
from .visualization import VisualizationHook
__all__ = ['VisualizationHook', 'ExponentialMovingAverageHook']
|
const allAchievements = {
r11 : "You gotta start somewhere",
r12 : "100 antimatter is a lot",
r13 : "Half life 3 confirmed",
r14 : "L4D: Left 4 Dimensions",
r15 : "5 Dimension Antimatter Punch",
r16 : "We couldn't afford 9",
r17 : "Not a luck related achievement",
r18 : "90 degrees to infinity",
r21 : "To infinity!",
r22 : "Fake News",
r23 : "The 9th Dimension is a lie",
r24 : "Antimatter Apocalypse",
r25 : "Boosting to the max",
r26 : "You got past The Big Wall",
r27 : "Double Galaxy",
r28 : "There's no point in doing that",
r31 : "I forgot to nerf that",
r32 : "The Gods are pleased",
r33 : "That's a lot of infinites",
r34 : "You didn't need it anyway",
r35 : "Don't you dare to sleep",
r36 : "Claustrophobic",
r37 : "That's fast!",
r38 : "I don't believe in Gods",
r41 : "Spreading Cancer",
r42 : "Supersanic",
r43 : "Zero Deaths",
r44 : "Over in 30 seconds",
r45 : "Faster than a potato",
r46 : "Multidimensional",
r47 : "Daredevil",
r48 : "AntiChallenged",
r51 : "Limit Break",
r52 : "Age of Automation",
r53 : "Definitely not worth it",
r54 : "That's faster!",
r55 : "Forever isn't that long",
r56 : "Many Deaths",
r57 : "Gift from the Gods",
r58 : "Is this hell?",
r61 : "Bulked up",
r62 : "Oh hey, you're still here",
r63 : "A new beginning.",
r64 : "1 million is a lot",
r65 : "Not-so-challenging",
r66 : "Faster than a squared potato",
r67 : "Infinitely Challenging",
r68 : "You did this again just for the achievement right?",
r71 : "ERROR 909: Dimension not found",
r72 : "Can't hold all these infinities",
r73 : "This achievement doesn't exist",
r74 : "End me",
r75 : "NEW DIMENSIONS???",
r76 : "One for each dimension",
r77 : "How the antitables have turned",
r78 : "Blink of an eye",
r81 : "Hevipelle did nothing wrong",
r82 : "Anti-antichallenged",
r83 : "YOU CAN GET 50 GALAXIES!??",
r84 : "I got a few to spare",
r85 : "All your IP are belong to us",
r86 : "Do you even bend time bro?",
r87 : "2 Million Infinities",
r88 : "Yet another infinity reference",
r91 : "Ludicrous Speed",
r92 : "I brake for nobody",
r93 : "MAXIMUM OVERDRIVE",
r94 : "Minute of infinity",
r95 : "Is this safe?",
r96 : "Time is relative",
r97 : "Yes. This is hell.",
r98 : "0 degrees from infinity",
r101 : "Costco sells dimboosts now",
r102 : "This mile took an Eternity",
r103 : "This achievement doesn't exist II",
r104 : "That wasn't an eternity",
r105 : "Infinite time",
r106 : "The swarm",
r107 : "Do you really need a guide for this?",
r108 : "We could afford 9",
r111 : "Yo dawg, I heard you liked infinities...",
r112 : "Never again",
r113 : "Long lasting relationship",
r114 : "You're a mistake",
r115 : "I wish I had gotten 7 eternities",
r116 : "Do I really need to infinity",
r117 : "8 nobody got time for that",
r118 : "IT'S OVER 9000",
r121 : "Can you get infinite IP?",
r122 : "You're already dead.",
r123 : "5 more eternities until the update",
r124 : "Eternities are the new infinity",
r125 : "Like feasting on a behind",
r126 : "Popular music",
r127 : "But I wanted another prestige layer...",
r128 : "What do I have to do to get rid of you",
r131 : "No ethical consumption",
r132 : "Unique snowflakes",
r133 : "I never liked this infinity stuff anyway",
r134 : "When will it be enough?",
r135 : "Faster than a potato^286078",
r136 : "I told you already, time is relative",
r137 : "Now you're thinking with dilation!",
r138 : "This is what I have to do to get rid of you.",
s11 : "The first one's always free",
s12 : "Just in case",
s13 : "It pays to have respect",
s14 : "So do I",
s15 : "Do a barrel roll!",
s16 : "Do you enjoy pain?",
s17 : "30 Lives",
s18 : "Do you feel lucky? Well do ya punk?",
s21 : "Go study in real life instead",
s22 : "Cancer = Spread",
s23 : "Stop right there criminal scum!",
s24 : "Real news",
s25 : "Shhh... It's a secret",
s26 : "You're a failure",
s27 : "It's not called matter dimensions is it?",
s28 : "Nice.",
s31 : "You should download some more RAM",
s32 : "Less than or equal to 0.001",
s33 : "A sound financial decision",
s34 : "You do know how these work, right?",
s35 : "Should we tell them about buy max...",
s36 : "While you were away... Nothing happened.",
s37 : "You followed the instructions",
s38 : "Professional bodybuilder",
};
const secretAchievementTooltips = {
s11 : "Click on this achievement.",
s12 : "Save 100 times without refreshing.",
s13 : "Pay respects.",
s14 : "Say something naughty.",
s15 : "Do a barrel roll.",
s16 : "Use standard, cancer, or bracket notation for 10 minutes with more than 1 eternity without refreshing.",
s17 : "Input the konami code.",
s18 : "You have a 1/100,000 chance of getting this achievement every second.",
s21 : "Purchase the secret time study.",
s22 : "Buy one million Galaxies in total while using cancer notation.",
s23 : "Open the console.",
s24 : "Click on the news ticker that tells you to click on it.",
s25 : "Discover a secret theme.",
s26 : "Fail eternity challenges 10 times without refreshing. What are you doing with your life...",
s27 : "Get Infinite matter.",
s28 : "Don't act like you don't know what you did.",
s31 : "Set your update rate to 200ms.",
s32 : "Get a fastest infinity or eternity time of less than or equal to 0.001 seconds.",
s33 : "Click on the donate link.",
s34 : "Respec with an empty study tree.",
s35 : "Buy single tickspeed 1,000,000 times.",
s36 : "Have nothing happen while you were away.",
s37 : "Follow instructions.",
s38 : "Get all your dimension bulk buyers to 1e100.",
};
const allAchievementNums = Object.invert(allAchievements)
// to retrieve by value: Object.keys(allAchievements).find(key => allAchievements[key] === "L4D: Left 4 Dimensions");
function clearOldAchieves(){
var toRemove = [];
var achieveKey;
var values = Object.keys(allAchievements).map(function(e) { return allAchievements[e] });
for (var i = 0; i < player.achievements.length; i++) {
if (values.indexOf(player.achievements[i]) !== -1 ) { // does index[i] exist in allAchievements as a value?
toRemove.push(i); // mark it for removal
achieveKey = Object.keys(allAchievements).find(function(key){ return allAchievements[key] === player.achievements[i];});
if (!player.achievements.includes(achieveKey)) { // check if new key already exists as well
player.achievements.push(achieveKey); // if not... add it
}
} else if (allAchievements[player.achievements[i]] === undefined){
toRemove.push(i);
}
}
toRemove.reverse();
for (var i = 0; i < toRemove.length; i++) {
player.achievements.splice(toRemove[i], 1);
}
}
function giveAchievement(name) {
if (player.achievements.includes(name)){ clearOldAchieves(); }
if (player.achievements.includes(allAchievementNums[name])) return false
$.notify(name, "success");
player.achievements.push(allAchievementNums[name]);
document.getElementById(name).className = "achievementunlocked"
kong.submitStats('Achievements', player.achievements.length);
if (name == "All your IP are belong to us" || name == "MAXIMUM OVERDRIVE") {
player.infMult = player.infMult.times(4);
player.autoIP = player.autoIP.times(4);
if (player.autoCrunchMode == "amount" && player.autobuyers[11].priority != undefined) player.autobuyers[11].priority = player.autobuyers[11].priority.times(4);
}
updateAchievements();
}
function updateAchievements() {
var amount = 0
for (var i=1; i<document.getElementById("achievementtable").children[0].children.length+1; i++) {
var n = 0
var achNum = i * 10
for (var l=0; l<8; l++) {
achNum += 1;
var name = allAchievements["r"+achNum]
if (player.achievements.includes("r"+achNum)) {
n++
document.getElementById(name).className = "achievementunlocked"
} else {
document.getElementById(name).className = "achievementlocked"
}
}
if (n == 8) {
amount++
document.getElementById("achRow"+i).className = "completedrow"
} else {
document.getElementById("achRow"+i).className = ""
}
}
for (var i=1; i<document.getElementById("secretachievementtable").children[0].children.length+1; i++) {
var n = 0
var achNum = i * 10
for (var l=0; l<8; l++) {
achNum += 1;
var name = allAchievements["s"+achNum]
if (player.achievements.includes("s"+achNum)) {
n++
document.getElementById(name).setAttribute('ach-tooltip', secretAchievementTooltips["s"+achNum])
document.getElementById(name).className = "achievementunlocked"
} else {
document.getElementById(name).className = "achievementhidden"
document.getElementById(name).setAttribute('ach-tooltip', (name[name.length-1] !== "?" && name[name.length-1] !== "!" && name[name.length-1] !== ".") ? name+"." : name)
}
}
if (n == 8) {
document.getElementById("secretAchRow"+i).className = "completedrow"
} else {
document.getElementById("secretAchRow"+i).className = ""
}
}
player.achPow = Decimal.pow(1.5, amount)
document.getElementById("achmultlabel").textContent = "Current achievement multiplier on each Dimension: " + player.achPow.toFixed(1) + "x"
}
function getSecretAchAmount() {
var n = 0
for (var i=1; i<document.getElementById("secretachievementtable").children[0].children.length+1; i++) {
var achNum = i * 10
for (var l=0; l<8; l++) {
achNum += 1;
if (player.achievements.includes("s"+achNum)) {
n++
}
}
}
return n
} |
/**
* Created by Wu Jian Ping on - 2018/09/02.
*/
import Compoment from './Compoment'
export default class Volume extends Compoment {
// https://docs.docker.com/engine/api/v1.37/#operation/VolumeCreate
create(params) {
return this.request.post('/volumes/create', params)
}
// https://docs.docker.com/engine/api/v1.37/#operation/VolumeList
ls(filters) {
return this.request.get('/volumes', {
params: filters
})
}
inspect(idOrName) {
return this.request.get(`/volumes/${idOrName}`)
}
rm(idOrName) {
return this.request.delete(`/volumes/${idOrName}`)
}
prune(filters) {
return this.request.post('/volumes/prune', {}, {
params: filters
})
}
}
|
/**
* Lo-Dash 2.3.0 (Custom Build) <http://lodash.com/>
* Build: `lodash modularize underscore exports="node" -o ./underscore/`
* Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
* Based on Underscore.js 1.5.2 <http://underscorejs.org/LICENSE>
* Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
* Available under MIT license <http://lodash.com/license>
*/
var createCallback = require('../functions/createCallback'),
forOwn = require('../objects/forOwn'),
isArray = require('../objects/isArray');
/**
* Creates a function that aggregates a collection, creating an object composed
* of keys generated from the results of running each element of the collection
* through a callback. The given `setter` function sets the keys and values
* of the composed object.
*
* @private
* @param {Function} setter The setter function.
* @returns {Function} Returns the new aggregator function.
*/
function createAggregator(setter) {
return function(collection, callback, thisArg) {
var result = {};
callback = createCallback(callback, thisArg, 3);
var index = -1,
length = collection ? collection.length : 0;
if (typeof length == 'number') {
while (++index < length) {
var value = collection[index];
setter(result, value, callback(value, index, collection), collection);
}
} else {
forOwn(collection, function(value, key, collection) {
setter(result, value, callback(value, key, collection), collection);
});
}
return result;
};
}
module.exports = createAggregator;
|
// # Asset helper
// Usage: `{{asset "css/screen.css"}}`, `{{asset "css/screen.css" ghost="true"}}`
//
// Returns the path to the specified asset. The ghost flag outputs the asset path for the Ghost admin
var hbs = require('express-hbs'),
config = require('../config'),
utils = require('./utils'),
asset;
asset = function (context, options) {
var output = '',
isAdmin = options && options.hash && options.hash.ghost;
output += config.paths.subdir + '/';
if (!context.match(/^favicon\.ico$/) && !context.match(/^shared/) && !context.match(/^asset/)) {
if (isAdmin) {
output += 'ghost/';
} else if (config.bgConfig.cdn.isProduction) { // cdn asset
output = config.bgConfig.cdn.staticAssetsUrl;
}else{
output += 'assets/';
}
}
// Get rid of any leading slash on the context
context = context.replace(/^\//, '');
output += context;
if (!context.match(/^favicon\.ico$/)) {
output = utils.assetTemplate({
source: output,
version: config.assetHash
});
}
return new hbs.handlebars.SafeString(output);
};
module.exports = asset;
|
#!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Encode and decode BASE58, P2PKH and P2SH addresses."""
from .script import hash256, hash160, sha256, CScript, OP_0
from .util import bytes_to_hex_str, hex_str_to_bytes
import binascii
chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
def byte_to_base58(b, version):
result = ''
str = bytes_to_hex_str(b)
str = bytes_to_hex_str(chr(version).encode('latin-1')) + str
checksum = bytes_to_hex_str(hash256(hex_str_to_bytes(str)))
str += checksum[:8]
value = int('0x'+str,0)
while value > 0:
result = chars[value % 58] + result
value //= 58
while (str[:2] == '00'):
result = chars[0] + result
str = str[2:]
return result
# TODO: def base58_decode
def base58_to_byte(v, length):
""" decode v into a string of len bytes
"""
__b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
__b58base = len(__b58chars)
long_value = 0
for (i, c) in enumerate(v[::-1]):
long_value += __b58chars.find(c) * (__b58base**i)
result = ''
while long_value >= 256:
div, mod = divmod(long_value, 256)
result = chr(mod) + result
long_value = div
result = chr(long_value) + result
nPad = 0
for c in v:
if c == __b58chars[0]: nPad += 1
else: break
result = chr(0)*nPad + result
if length is not None and len(result) != length:
return None
hexresult = binascii.hexlify(bytes(result.encode('latin-1')))
version = int(hexresult[0:2], 16)
hsh = hexresult[2:-8]
checksum = hexresult[-8:]
return (version, hsh, checksum)
def keyhash_to_p2pkh(hash, main = False):
assert (len(hash) == 20)
version = 58 if main else 120
return byte_to_base58(hash, version)
def scripthash_to_p2sh(hash, main = False):
assert (len(hash) == 20)
version = 50 if main else 110
return byte_to_base58(hash, version)
def key_to_p2pkh(key, main = False):
key = check_key(key)
return keyhash_to_p2pkh(hash160(key), main)
def script_to_p2sh(script, main = False):
script = check_script(script)
return scripthash_to_p2sh(hash160(script), main)
def key_to_p2sh_p2wpkh(key, main = False):
key = check_key(key)
p2shscript = CScript([OP_0, hash160(key)])
return script_to_p2sh(p2shscript, main)
def script_to_p2sh_p2wsh(script, main = False):
script = check_script(script)
p2shscript = CScript([OP_0, sha256(script)])
return script_to_p2sh(p2shscript, main)
def check_key(key):
if (type(key) is str):
key = hex_str_to_bytes(key) # Assuming this is hex string
if (type(key) is bytes and (len(key) == 33 or len(key) == 65)):
return key
assert(False)
def check_script(script):
if (type(script) is str):
script = hex_str_to_bytes(script) # Assuming this is hex string
if (type(script) is bytes or type(script) is CScript):
return script
assert(False)
|
import React from 'react';
import { createUseStyles } from 'react-jss';
import TextField from '@guestyci/foundation/TextField';
import Col from '@guestyci/foundation/Col';
import logo from '../../assets/logo.svg';
import Link from '@guestyci/foundation/Link';
const useStyles = createUseStyles({
appLogo: {
animation: '$spin infinite 20s linear',
pointerEvents: 'none',
height: 100,
width: 100,
},
'@keyframes spin': {
from: {
transform: 'rotate(0deg)',
},
to: {
transform: 'rotate(360deg)',
},
},
});
const Header = () => {
const classes = useStyles();
return (
<Col spacing={1} align="center" justify="center">
<img src={logo} className={classes.appLogo} alt="logo" />
<TextField className="pt-3" size="lg-xl">
Welcome to Guesty's React project.
</TextField>
<TextField size="lg-xl">Edit the ./App.js to start.</TextField>
<TextField size="xl"> Read the Guesty docs </TextField>
<Link
color="blue"
href="https://rnd-docs.guesty.com/ui-infra/react/overview/"
>
Learn React
</Link>
</Col>
);
};
export default Header;
|
(function(){
function MenuCtrl(){
}
angular
.module('saborLatino')
.controller('MenuCtrl', [MenuCtrl]);
})();
|
'use strict'
const config = require('../config')
const errorHandler = require('./ErrorHandler')
const githubApi = require('@octokit/rest')
const GitService = require('./GitService')
const Review = require('./models/Review')
const User = require('./models/User')
const normalizeResponse = ({data}) => data
class GitHub extends GitService {
constructor (options = {}) {
super(options.username, options.repository, options.branch)
this.api = githubApi({
debug: config.get('env') === 'development',
baseUrl: config.get('githubBaseUrl'),
headers: {
'user-agent': 'Staticman agent'
},
timeout: 5000
})
if (options.oauthToken) {
this.api.authenticate({
type: 'oauth',
token: options.oauthToken
})
} else if (options.token) {
this.api.authenticate({
type: 'token',
token: options.token
})
} else {
throw new Error('Require an `oauthToken` or `token` option')
}
}
_pullFile (filePath, branch) {
return this.api.repos.getContent({
owner: this.username,
repo: this.repository,
path: filePath,
ref: branch
})
.then(normalizeResponse)
.catch(err => Promise.reject(errorHandler('GITHUB_READING_FILE', {err})))
}
_commitFile (filePath, content, commitMessage, branch) {
return this.api.repos.createFile({
owner: this.username,
repo: this.repository,
path: filePath,
message: commitMessage,
content,
branch
})
.then(normalizeResponse)
}
writeFile (filePath, data, targetBranch, commitTitle) {
return super.writeFile(filePath, data, targetBranch, commitTitle)
.catch(err => {
try {
const message = err && err.message
if (message) {
const parsedError = JSON.parse(message)
if (
parsedError &&
parsedError.message &&
parsedError.message.includes('"sha" wasn\'t supplied')
) {
return Promise.reject(errorHandler('GITHUB_FILE_ALREADY_EXISTS', {err}))
}
}
} catch (err) {} // eslint-disable-line no-empty
return Promise.reject(errorHandler('GITHUB_WRITING_FILE', {err}))
})
}
getBranchHeadCommit (branch) {
return this.api.repos.getBranch({
owner: this.username,
repo: this.repository,
branch
})
.then(res => res.data.commit.sha)
}
createBranch (branch, sha) {
return this.api.gitdata.createReference({
owner: this.username,
repo: this.repository,
ref: `refs/heads/${branch}`,
sha
})
.then(normalizeResponse)
}
deleteBranch (branch) {
return this.api.gitdata.deleteReference({
owner: this.username,
repo: this.repository,
ref: `heads/${branch}`
})
}
createReview (reviewTitle, branch, reviewBody) {
return this.api.pullRequests.create({
owner: this.username,
repo: this.repository,
title: reviewTitle,
head: branch,
base: this.branch,
body: reviewBody
})
.then(normalizeResponse)
}
getReview (reviewId) {
return this.api.pullRequests.get({
owner: this.username,
repo: this.repository,
number: reviewId
})
.then(normalizeResponse)
.then(({base, body, head, merged, state, title}) =>
new Review(
title,
body,
(merged && state === 'closed') ? 'merged' : state,
head.ref,
base.ref
)
)
}
readFile (filePath, getFullResponse) {
return super.readFile(filePath, getFullResponse)
.catch(err => Promise.reject(errorHandler('GITHUB_READING_FILE', {err})))
}
writeFileAndSendReview (filePath, data, branch, commitTitle, reviewBody) {
return super.writeFileAndSendReview(filePath, data, branch, commitTitle, reviewBody)
.catch(err => Promise.reject(errorHandler('GITHUB_CREATING_PR', {err})))
}
getCurrentUser () {
return this.api.users.get({})
.then(normalizeResponse)
.then(({login, email, avatar_url, name, bio, company, blog}) =>
new User('github', login, email, name, avatar_url, bio, blog, company)
)
.catch(err => Promise.reject(errorHandler('GITHUB_GET_USER', {err})))
}
}
module.exports = GitHub
|
from collections import namedtuple
from flask import url_for
from pytest import fixture, mark
from shorter.app import create_app
from shorter.start.config import TestingConfig
from shorter.start.extensions import DB as _db
# pylint: disable=invalid-name
# pylint: disable=no-member
# pylint: disable=redefined-outer-name
# pylint: disable=too-many-arguments
def pytest_configure(config):
config.addinivalue_line("markers", "slow: run slow tests")
def pytest_addoption(parser):
parser.addoption(
"--runslow", action="store_true", default=False, help="run slow tests"
)
def pytest_collection_modifyitems(config, items):
if config.getoption("--runslow"):
# --runslow given in cli: do not skip slow tests
return
skip_slow = mark.skip(reason="needs --runslow to run")
for item in items:
if "slow" in item.keywords:
item.add_marker(skip_slow)
@fixture(scope="session")
def app():
_app = create_app(TestingConfig)
with _app.app_context():
yield _app
@fixture(scope="function")
def db(app):
_db.app = app
_db.create_all()
yield _db
_db.session.close()
_db.drop_all()
@fixture(scope="function")
def session(db):
_connection = db.engine.connect()
_session = db.create_scoped_session(
options={"bind": _connection, "binds": {}}
)
db.session = _session
yield _session
_connection.close()
_session.remove()
@fixture(scope="session")
def ctx_app(app):
with app.test_request_context():
yield app
@fixture(scope="function")
def client(ctx_app):
with ctx_app.test_client() as cli:
yield cli
def _visitor(client):
def visit(
endpoint,
*,
code=200,
data=None,
headers=None,
method="get",
params=None,
query_string=None,
):
if params is None:
params = {}
url = url_for(endpoint, **params)
func = {
"get": client.get,
"post": client.post,
}.get(method.lower())
resp = func(
url,
data=data,
headers=headers,
query_string=query_string,
)
assert resp.status_code == code
res = {
"url": url,
"response": resp,
"text": resp.get_data(as_text=True),
"headers": resp.headers,
}
return namedtuple("Result", res.keys())(**res)
return visit
@fixture(scope="function")
def visitor(client):
yield _visitor(client)
|
import pickle
import random
import sys
import numpy as np
filename = sys.argv[1]
with open(filename,'rb') as f:
features = pickle.load(f)
new_features = []
dialogue_final,scene_thisround,dids,id_final,type_final,bbox_final,label_final,image_feature = map(list,zip(*features))
didnew = []
for did in dids:
#newid = int(did/1000)
newid = int(did)
if newid not in didnew:
# print(newid)
didnew.append(newid)
print("did all num",len(didnew))
print("did set num",len(list(set(didnew))))
for feature in features:
dialogue_final,scene_thisround,did,id_final,type_final,bbox_final,label_final,image_feature = feature
if int(did) == int(sys.argv[2]):
# pint(image_feature.shape,label_final,label_final.shape)
print(label_final)
print(id_final)
continue
#print(did)
#if len(bbox_final) != len(label_final):
# print("find ==========error bbox and label")
#if len(type_final) != len(label_final):
# print("find ==========error typeand label")
#if len(bbox_final)+1 != len(image_feature):
# print("find ==========error future")
# print(len(bbox_final),len(image_feature))
break
pos = []
neg = []
for i in range(len(label_final)):
if label_final[i] == 1:
pos.append(i)
if len(label_final) == 50:
continue
if len(pos) == 0:
continue
for index in pos:
for p in range(3):
for k in range(10):
neg_index = random.randint(0,len(label_final)-1)
if neg_index not in pos and neg_index not in neg:
neg.append(neg_index)
break
print("len of neg and pos",len(neg),len(pos))
if len(bbox_final)+1 != len(image_feature):
print("find ==========error future")
print(len(bbox_final),len(image_feature))
for index in pos:
id_new = id_final[index]
type_new = type_final[index]
bbox_new = bbox_final[index]
label_new = label_final[index]
image_new = np.array([image_feature[0]] + [image_feature[index+1]])
#print(image_new.shape)
#print(image_new)
new_features.append((dialogue_final,scene_thisround,id_new,type_new,bbox_new,label_new,image_new))
for index in neg:
id_new = id_final[index]
type_new = type_final[index]
bbox_new = bbox_final[index]
label_new = label_final[index]
image_new = np.array([image_feature[0]] + [image_feature[index+1]])
if len(label_final)+1 != len(image_feature):
print("find ==========error future")
print(len(label_final),len(image_feature))
print(index,len(image_feature))
new_features.append((dialogue_final,scene_thisround,id_new,type_new,bbox_new,label_new,image_new))
#outfilename = sys.argv[2]
#print("done features",len(new_features))
#with open(outfilename,'wb') as fp:
# pickle.dump(new_features,fp)
|
import React, { Fragment, useState, useEffect } from 'react';
import {useSelector, useDispatch } from 'react-redux';
import PropTypes from 'prop-types';
import {
completeChecklistItem,
editChecklistItem,
deleteChecklistItem,
} from '../../actions/board';
import { TextField, Button } from '@material-ui/core';
import { Checkbox, FormControlLabel } from '@material-ui/core';
import EditIcon from '@material-ui/icons/Edit';
import HighlightOffIcon from '@material-ui/icons/HighlightOff';
import CloseIcon from '@material-ui/icons/Close';
import useStyles from '../../utils/modalStyles';
const ChecklistItem = ({ item, card }) => {
const { user, isAuthenticated } = useSelector((state) => state.auth);
const classes = useStyles();
const [text, setText] = useState(item.text);
const [editing, setEditing] = useState(false);
const dispatch = useDispatch();
useEffect(() => {
setText(item.text);
}, [item.text]);
const onEdit = async (e) => {
e.preventDefault();
dispatch(editChecklistItem(card._id, item._id, { text }));
setEditing(false);
};
const onComplete = async (e) => {
dispatch(
completeChecklistItem({
cardId: card._id,
complete: e.target.checked,
itemId: item._id,
})
);
};
const onDelete = async (e) => {
dispatch(deleteChecklistItem(card._id, item._id));
};
return (
<div className={classes.checklistItem}>
{editing ? (
<form onSubmit={(e) => onEdit(e)} className={classes.checklistFormLabel}>
<TextField
variant='filled'
fullWidth
multiline
required
autoFocus
value={text}
onChange={(e) => setText(e.target.value)}
onKeyPress={(e) => e.key === 'Enter' && onEdit(e)}
/>
<div>
<Button type='submit' variant='contained' color='primary'>
Save
</Button>
<Button
onClick={() => {
setEditing(false);
setText(item.text);
}}
>
<CloseIcon />
</Button>
</div>
</form>
) : (
<Fragment>
<FormControlLabel
control={
<Checkbox
checked={
card.checklist.find((cardItem) => cardItem._id === item._id).complete
}
onChange={onComplete}
name={item._id}
/>
}
label={item.text}
className={classes.checklistFormLabel}
/>
{ user && user.type == "Job-seeker" ? "":
<div className={classes.itemButtons}>
<Button className={classes.itemButton} onClick={() => setEditing(true)}>
<EditIcon />
</Button>
<Button color='secondary' className={classes.itemButton} onClick={onDelete}>
<HighlightOffIcon />
</Button>
</div>}
</Fragment>
)}
</div>
);
};
ChecklistItem.propTypes = {
item: PropTypes.object.isRequired,
card: PropTypes.object.isRequired,
};
export default ChecklistItem;
|
// Copyright (c) 2014-2017, MyMonero.com
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are
// permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
// of conditions and the following disclaimer in the documentation and/or other
// materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its contributors may be
// used to endorse or promote products derived from this software without specific
// prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
"use strict"
//
const commonComponents_forms = require('../../MMAppUICommonComponents/forms.web')
const commonComponents_navigationBarButtons = require('../../MMAppUICommonComponents/navigationBarButtons.web')
//
const BaseView_Wallet_MetaInfo = require('./BaseView_Wallet_MetaInfo.web')
//
class CreateWallet_MetaInfo_View extends BaseView_Wallet_MetaInfo
{
_setup_views()
{
const self = this
super._setup_views()
self._setup_form_walletNameField()
self._setup_form_walletSwatchField()
// after visible… (TODO: improve this by doing on VDA or other trigger)
setTimeout(function()
{
self.walletNameInputLayer.focus()
}, 600)
}
_setup_startObserving()
{
const self = this
super._setup_startObserving()
}
//
//
// Lifecycle - Teardown
//
TearDown()
{
const self = this
super.TearDown()
}
//
//
// Runtime - Accessors - Navigation
//
Navigation_Title()
{
return "New Wallet"
}
Navigation_New_LeftBarButtonView()
{
const self = this
if (self.options.wizardController_current_wizardTaskModeName != self.wizardController.WizardTask_Mode_FirstTime_CreateWallet()) {
return null // cause we either want null or maybe a back button
}
const view = commonComponents_navigationBarButtons.New_LeftSide_CancelButtonView(self.context)
self.leftBarButtonView = view
const layer = view.layer
{ // observe
layer.addEventListener(
"click",
function(e)
{
e.preventDefault()
self.wizardController._fromScreen_userPickedCancel()
return false
}
)
}
return view
}
//
//
// Runtime - Delegation - Navigation View special methods
//
navigationView_viewIsBeingPoppedFrom()
{ // this will only get popped from when it's not the first in the nav stack, i.e. not adding first wallet,
// so we'll need to get back into Mode_PickCreateOrUseExisting
const self = this
self.wizardController.PatchToDifferentWizardTaskMode_withoutPushingScreen( // to maintain the correct state
self.wizardController.WizardTask_Mode_PickCreateOrUseExisting(),
0 // back to 0 from 1
)
}
//
//
// Runtime - Delegation - Interactions
//
_userSelectedNextButton()
{
const self = this
const walletColorHexString = self.walletColorPickerInputView.Component_Value()
const walletName = self.walletNameInputLayer.value
self.wizardController.walletMeta_name = walletName
self.wizardController.walletMeta_colorHexString = walletColorHexString
//
self.wizardController.ProceedToNextStep()
}
}
module.exports = CreateWallet_MetaInfo_View
|
import os
import pickle
from datetime import datetime, time
import intents.intents
alarms_file = (os.path.dirname(__file__).replace("/services", "") + '/config/alarms')
def create_alarm(sentence):
spoke_time = "7h30"
# TODO: get the day and the hour in the sentence
spoke_time = spoke_time.replace("demain", "").replace("matin", "").replace(" ", "")
hours = spoke_time.split("h")[0]
minutes = spoke_time.split("h")[1]
spoke_time = time(hour=int(hours), minute=int(minutes))
time_formatted = spoke_time.strftime("%H:%M")
add_alarm(time_formatted)
return intents.intents.get_random_response_for_tag('alarm').replace("%time", time_formatted)
def check():
current_time = datetime.now().strftime("%H:%M")
if current_time in get_alarms():
return True
else:
return False
def get_alarms():
return read_alarms()
def add_alarm(time):
alarms = get_alarms()
alarms.append(time)
write_alarms(alarms)
def read_alarms():
if not os.path.exists(alarms_file):
write_alarms([])
infile = open(alarms_file, 'rb')
alarms = pickle.load(infile)
infile.close()
return alarms
def write_alarms(alarms):
outfile = open(alarms_file, 'wb')
pickle.dump(alarms, outfile)
outfile.close()
|
define({
zh_cn: {
'Allowed values:': '允许值:',
'Compare all with predecessor': '与所有较早的比较',
'compare changes to:': '将当前版本与指定版本比较:',
'compared to': '相比于',
'Default value:': '默认值:',
Description: '描述',
Field: '字段',
General: '概要',
'Generated with': '基于',
Name: '名称',
'No response values.': '无返回值.',
optional: '可选',
Parameter: '参数',
Parameters: '参数',
Headers: '头部参数',
'Permission:': '权限:',
Response: '返回',
Send: '发送',
'Send a Sample Request': '发送示例请求',
'show up to version:': '显示到指定版本:',
'Size range:': '取值范围:',
Type: '类型',
url: '网址',
},
});
|
import { Connection } from "autobahn"
import { LOADING_STATES, INITIAL_STATE_SUBSCRIPTION } from "./constants.es6"
import {
registerSession,
getSession,
registerSubscription,
getSubscription,
unregisterSubscription
} from "./crossbar_connector.es6"
import uuid from "uuid"
// TODO: split out user-initiated actions from server-connection-related actions
// Connection-related actions
export const CONNECTING_TO_SERVER = 'CONNECTING_TO_SERVER';
export const CONNECTION_CLOSED = 'CONNECTION_CLOSED';
export const SUBSCRIBING_TO_INITIAL_STATE = 'SUBSCRIBING_TO_INITIAL_STATE';
export const SUBSCRIBE_TO_INITIAL_STATE_FAILED = 'SUBSCRIBE_TO_INITIAL_STATE_FAILED';
export const GETTING_INITIAL_STATE = 'GETTING_INITIAL_STATE';
export const SET_INITIAL_STATE_TIMER = 'SET_INITIAL_STATE_TIMER';
export const UNSUBSCRIBING_FROM_INITIAL_STATE = 'UNSUBSCRIBING_FROM_INITIAL_STATE';
export const UNSUBSCRIBE_FROM_INITIAL_STATE_FAILED = 'UNSUBSCRIBE_FROM_INITIAL_STATE_FAILED';
// For this set, we intentionally don't care about the success case changing the app state
export const SUBSCRIBE_TO_ADD_CARD_FAILED = 'SUBSCRIBE_TO_ADD_CARD_FAILED';
export const SUBSCRIBE_TO_MOVE_CARD_FAILED = 'SUBSCRIBE_TO_MOVE_CARD_FAILED';
export const SUBSCRIBE_TO_DELETE_CARD_FAILED = 'SUBSCRIBE_TO_DELETE_CARD_FAILED';
export const SUBSCRIBE_TO_CLEAR_BOARD_FAILED = 'SUBSCRIBE_TO_CLEAR_BOARD_FAILED';
export const INITIALIZATION_COMPLETE = 'INITIALIZATION_COMPLETE';
// Server-received actions
export const SET_INITIAL_STATE = 'SET_INITIAL_STATE';
export const ADD_CARD_RECEIVED = 'ADD_CARD_RECEIVED';
export const MOVE_CARD_RECEIVED = 'MOVE_CARD_RECEIVED';
export const DELETE_CARD_RECEIVED = 'DELETE_CARD_RECEIVED';
export const CLEAR_BOARD_RECEIVED = 'CLEAR_BOARD_RECEIVED';
export function connectingToServer() {
// TODO: maybe include the URI we're connecting to here?
return {
type: CONNECTING_TO_SERVER,
payload: {}
}
}
export function connectionClosed(reason) {
return {
type: CONNECTION_CLOSED,
payload: {
reason: reason
}
}
}
export function subscribingToInitialState() {
return {
type: SUBSCRIBING_TO_INITIAL_STATE,
payload: {}
}
}
export function subscribeToInitialStateFailed(reason) {
return {
type: SUBSCRIBE_TO_INITIAL_STATE_FAILED,
payload: {
reason: reason
}
}
}
export function setInitialStateTimer(timer) {
return {
type: SET_INITIAL_STATE_TIMER,
payload: {
timer: timer
}
}
}
export function gettingInitialState() {
return {
type: GETTING_INITIAL_STATE,
payload: {}
}
}
export function unsubscribeFromInitialStateFailed(reason) {
return {
type: UNSUBSCRIBE_FROM_INITIAL_STATE_FAILED,
payload: {
reason: reason
}
}
}
export function subscribeToRequestInitialStateFailed(reason) {
return {
type: SUBSCRIBE_TO_ADD_CARD_FAILED,
payload: {
reason: reason
}
}
}
export function subscribeToAddCardFailed(reason) {
return {
type: SUBSCRIBE_TO_ADD_CARD_FAILED,
payload: {
reason: reason
}
}
}
export function subscribeToMoveCardFailed(reason) {
return {
type: SUBSCRIBE_TO_MOVE_CARD_FAILED,
payload: {
reason: reason
}
}
}
export function subscribeToDeleteCardFailed(reason) {
return {
type: SUBSCRIBE_TO_DELETE_CARD_FAILED,
payload: {
reason: reason
}
}
}
export function subscribeToClearBoardFailed(reason) {
return {
type: SUBSCRIBE_TO_CLEAR_BOARD_FAILED,
payload: {
reason: reason
}
}
}
export function setInitialState(cards, columns) {
return {
type: SET_INITIAL_STATE,
payload: {
cards: cards,
columns: columns
}
}
}
export function unsubscribingFromInitialState() {
return {
type: UNSUBSCRIBING_FROM_INITIAL_STATE,
payload: {}
}
}
export function initializationComplete() {
return {
type: INITIALIZATION_COMPLETE,
payload: {}
}
}
export function addCardReceived(card) {
return {
type: ADD_CARD_RECEIVED,
payload: {
card: card
}
}
}
export function moveCardReceived(card_id, to_column) {
return {
type: MOVE_CARD_RECEIVED,
payload: {
card_id: card_id,
to_column: to_column
}
}
}
export function deleteCardReceived(card_id) {
return {
type: DELETE_CARD_RECEIVED,
payload: {
card_id: card_id
}
}
}
export function clearBoardReceived() {
return {
type: CLEAR_BOARD_RECEIVED,
payload: {}
}
}
// "Thunks"
export function connectToServer(url, realm) {
return function (dispatch) {
var connection;
// Update state to 'connecting...'
dispatch(connectingToServer());
// init the server
connection = new Connection({
url: url,
realm: realm
});
connection.onopen = (session) => {
registerSession(session);
dispatch(subscribeToInitialState());
};
connection.onclose = (reason) => {
dispatch(connectionClosed(reason));
};
// Actually connect
console.log("Connecting to WAMP router...");
connection.open();
};
}
export function subscribeToInitialState() {
return function (dispatch, getState) {
var state;
state = getState();
if (state.cards.app_state !== LOADING_STATES.CONNECTING_TO_SERVER) {
dispatch(connectionClosed("Illegal state transition in subscribeToInitialState. From:" + state.app_state));
return;
}
dispatch(subscribingToInitialState());
getSession().subscribe(
"com.wikia.estimator.set_initial_state",
(data) => {
dispatch(initialStateReceived(data[0], data[1]));
dispatch(unsubscribeFromInitialState());
}
).then(
(subscription) => {
registerSubscription(INITIAL_STATE_SUBSCRIPTION, subscription);
dispatch(requestInitialState());
},
(error) => {
dispatch(subscribeToInitialStateFailed(error));
}
);
}
}
export function requestInitialState() {
return function (dispatch) {
var timer;
dispatch(gettingInitialState());
// Broadcast out a request for getting the initial state (we'll take whoever comes back first as our state)
getSession().publish("com.wikia.estimator.request_initial_state", []);
// We may be the first people in the room, in which case our request to get the initial state will never return
// So, set a timer instead to wait for a little while before just assuming we're alone
timer = setTimeout(
() => {
dispatch(initialStateTimeout())
},
5000
);
dispatch(setInitialStateTimer(timer));
}
}
export function initialStateTimeout() {
return function (dispatch, getState) {
// Assume we're alone on the server now, and so just leave the board state at its defaults and move on in the
// state machine.
clearTimeout(getState().cards.initial_state_timer);
dispatch(setInitialStateTimer(null));
dispatch(unsubscribeFromInitialState());
}
}
export function initialStateReceived(cards, columns) {
return function (dispatch, getState) {
var state;
state = getState();
if (state.cards.app_state !== LOADING_STATES.GETTING_INITIAL_STATE) {
// This might happen in a race condition, but isn't a big deal so just skip out
return;
}
clearTimeout(state.cards.initial_state_timer);
dispatch(setInitialStateTimer(null));
dispatch(setInitialState(cards, columns));
dispatch(unsubscribeFromInitialState());
};
}
export function unsubscribeFromInitialState() {
return function (dispatch, getState) {
var state;
state = getState();
if (state.cards.app_state !== LOADING_STATES.GETTING_INITIAL_STATE) {
dispatch(connectionClosed("Illegal state transition in unsubscribeFromInitialState. From:" + state.app_state));
return;
}
// Unsub from set_initial_state, since we won't need it any more
getSession().unsubscribe(getSubscription(INITIAL_STATE_SUBSCRIPTION)).then(
() => {
dispatch(unsubscribedFromInitialState());
},
(error) => {
dispatch(unsubscribeFromInitialStateFailed(error));
}
);
dispatch(unsubscribingFromInitialState());
unregisterSubscription(INITIAL_STATE_SUBSCRIPTION);
};
}
export function unsubscribedFromInitialState() {
return function (dispatch) {
// We're ready to start working now, so go subscribe to all the various events we'll want to receive
dispatch(subscribeToRequestInitialState());
dispatch(subscribeToAddCard());
dispatch(subscribeToMoveCard());
dispatch(subscribeToDeleteCard());
dispatch(subscribeToClearBoard());
dispatch(initializationComplete());
}
}
export function subscribeToRequestInitialState() {
return function (dispatch, getState) {
// Sub to requests for initial state, for future clients
getSession().subscribe(
"com.wikia.estimator.request_initial_state",
(data) => {
var state;
state = getState();
getSession().publish("com.wikia.estimator.set_initial_state", [state.cards.cards, state.cards.columns]);
}
).then(
() => {},
(reason) => {
dispatch(subscribeToRequestInitialStateFailed(reason));
}
);
}
}
export function subscribeToAddCard() {
return function (dispatch) {
getSession().subscribe(
"com.wikia.estimator.new_card",
(data) => {
var card;
card = data[0];
dispatch(addCardReceived(card));
}
).then(
() => {},
(reason) => {
dispatch(subscribeToAddCardFailed(reason));
}
);
}
}
export function subscribeToMoveCard() {
return function (dispatch) {
getSession().subscribe(
"com.wikia.estimator.move_card",
(data) => {
var card_id, to_column;
card_id = data[0];
to_column = data[1];
dispatch(moveCardReceived(card_id, to_column));
}
).then(
null,
(reason) => {
dispatch(subscribeToMoveCardFailed(reason));
}
);
}
}
export function subscribeToDeleteCard() {
return function (dispatch) {
getSession().subscribe(
"com.wikia.estimator.delete_card",
(data) => {
var card_id;
card_id = data[0];
dispatch(deleteCardReceived(card_id));
}
).then(
null,
(reason) => {
dispatch(subscribeToDeleteCardFailed(reason));
}
)
}
}
export function subscribeToClearBoard() {
return function (dispatch) {
getSession().subscribe(
"com.wikia.estimator.clear_board",
(data) => {
dispatch(clearBoardReceived());
}
).then(
null,
(reason) => {
dispatch(subscribeToClearBoardFailed(reason));
}
);
}
}
export function addCard(title) {
return function(dispatch) {
var card;
// Create the card locally
card = {
card_id: uuid.v4(),
title: title,
history: []
};
dispatch(addCardReceived(card));
// Broadcast to other clients that the card has been created
getSession().publish("com.wikia.estimator.new_card", [card]);
}
}
export function moveCard(card_id, to_column) {
return function(dispatch) {
// Move the card locally
dispatch(moveCardReceived(card_id, to_column));
// Broadcast to other clients that the card has been moved
getSession().publish("com.wikia.estimator.move_card", [card_id, to_column]);
}
}
export function deleteCard(card_id) {
return function(dispatch) {
// Delete the card locally
dispatch(deleteCardReceived(card_id));
// Broadcast to other clients that the card has been deleted
getSession().publish("com.wikia.estimator.delete_card", [card_id]);
}
}
export function clearBoard() {
return function(dispatch) {
dispatch(clearBoardReceived());
getSession().publish("com.wikia.estimator.clear_board", []);
}
}
|
import BookForm from './BookForm'
import React, {useState} from 'react'
function NewManualBook() {
const [book,setbook] =useState();
const addToBookShelf = () => {
setbook((prevBook)=>{
console.log(prevBook)
return [...prevBook]
} )
}
return (
<div>
<BookForm addToBookShelf={addToBookShelf}/>
</div>
)
}
export default NewManualBook
|
import React from "react";
import "./Contact.css";
import { Button } from "react-bootstrap";
import ContactBanner from "./ContactBanner";
function Contact() {
return (
<div className="contact">
<ContactBanner />
<section className="entire-container">
<div className="information-contact">
<h2 className="title-contact">Lorem Ipsum</h2>
<p className="body-text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua.
</p>
</div>
<div className="container-contact">
<div className="firstName">
<input
type="email"
className="form-control"
id="exampleFormControlInput1"
placeholder="First Name"
></input>
</div>
<div className="secondName">
<input
type="email"
className="form-control"
id="exampleFormControlInput1"
placeholder="Last Name"
></input>
</div>
<div className="mailAddress">
<input
type="email"
className="email-control"
id="exampleFormControlInput1"
placeholder="Email@address"
></input>
</div>
<div className="emailBox">
<input
type="email"
className="start-number-control"
id="exampleFormControlInput1"
placeholder="+46"
></input>
</div>
<div className="emailStart">
<input
type="email"
className="mobile-control"
id="exampleFormControlInput1"
placeholder=""
></input>
</div>
<div className="docBox">
<textarea
className="documents"
rows="3"
placeholder="Write here"
></textarea>
</div>
<Button className="btn-send">
<h2 className="send-btn">Send</h2>
</Button>
</div>
</section>
</div>
);
}
export default Contact;
|
"""doit version, defined out of __init__.py to avoid circular reference"""
VERSION = (0, 27, 'dev0')
|
const test = require('tape');
const off = require('./off.js');
test('Testing off', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof off === 'function', 'off is a Function');
//t.deepEqual(off(args..), 'Expected');
//t.equal(off(args..), 'Expected');
//t.false(off(args..), 'Expected');
//t.throws(off(args..), 'Expected');
t.end();
}); |
const express = require("express");
const ads = require("../controllers/ads.controller.js")
const router = express.Router();
router.get("/", ads.findAll);
router.post("/", ads.create);
router.put("/:id", ads.update);
router.delete("/:id", ads.delete);
router.get("/:id", ads.findOne)
module.exports = router; |
// Entry Point -> Output
const webpack = require("webpack")
const CompressionPlugin = require("compression-webpack-plugin");
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require("path");
const GoogleFontsPlugin = require("@beyonk/google-fonts-webpack-plugin")
//console.log("node env", process.env.NODE_ENV);
//process.env.NODE_ENV = process.env.NODE_ENV || "development"
//console.log("node env", process.env.NODE_ENV);
module.exports = (env) => {
//console.log("env docker", process.env.DOCKER);
if (env === "test") {
console.log("Loading test env variables")
require("dotenv").config({path: ".env.test"})
} else if (env === "development") {
console.log("Loading development env variables")
require("dotenv").config({path: ".env.development"})
} else {
console.log("Loading production env variables")
require("dotenv").config({path: ".env.production"});
require("dotenv").config({path: "docker-variables.env"});
}
console.log("env", env);
const isProduction = env === "production"
console.log("is prod", isProduction);
const CSSExtract = new MiniCssExtractPlugin({ filename: 'styles.css' });
return {
entry:'./src/app.js',
output: {
path: path.join(__dirname, "public", "dist"),
filename: "bundle.js"
},
module: {
rules: [{
loader: "babel-loader",
test: /\.js$/,
exclude: /node_modules/
}, {
test: /\.s?css$/,
use: [
{
loader: MiniCssExtractPlugin.loader
},
{
loader: 'css-loader',
options: {
sourceMap: true
}
},
{
loader: 'sass-loader',
options: {
implementation: require("dart-sass") ,
sourceMap: true
}
}
]
},
]
},
plugins: [
CSSExtract,
new webpack.DefinePlugin({
"process.env.PORT": JSON.stringify(process.env.PORT),
"process.env.REMOTE_URL": JSON.stringify(process.env.REMOTE_URL),
"process.env.ENABLE_VIDEO_TRANSCODING": JSON.stringify(process.env.ENABLE_VIDEO_TRANSCODING),
"process.env.DISABLE_STORAGE": JSON.stringify(process.env.DISABLE_STORAGE),
"process.env.COMMERCIAL_MODE" : JSON.stringify(process.env.COMMERCIAL_MODE)
}),
new CompressionPlugin(),
new GoogleFontsPlugin({
fonts: [
{ family: "Roboto", variants: ["100", "300", "400", "500", "700"], display: "swap" }
],
outputDir: "/dist/",
/* ...options */
})
],
devtool: isProduction ? "source-map" : "inline-source-map",
devServer: {
contentBase: path.join(__dirname, "public"),
historyApiFallback: true,
publicPath: "/dist/"
},
}
}
|
import * as React from "react";
function IconMicrophone2({
size = 24,
color = "currentColor",
stroke = 2,
...props
}) {
return <svg className="icon icon-tabler icon-tabler-microphone-2" width={size} height={size} viewBox="0 0 24 24" strokeWidth={stroke} stroke={color} fill="none" strokeLinecap="round" strokeLinejoin="round" {...props}><path stroke="none" d="M0 0h24v24H0z" fill="none" /><path d="M15.002 12.9a5 5 0 1 0 -3.902 -3.9" /><path d="M15.002 12.9l-3.902 -3.899l-7.513 8.584a2 2 0 1 0 2.827 2.83l8.588 -7.515z" /></svg>;
}
export default IconMicrophone2; |
var searchData=
[
['length',['length',['../struct__cbor__bytestring__metadata.html#ad20fa7f7cec11db8076419169347ff75',1,'_cbor_bytestring_metadata::length()'],['../struct__cbor__string__metadata.html#a558805df7c655cfaf3c289bc536ff96e',1,'_cbor_string_metadata::length()']]],
['loaders_2ec',['loaders.c',['../loaders_8c.html',1,'']]],
['loaders_2eh',['loaders.h',['../loaders_8h.html',1,'']]],
['location',['location',['../struct__cbor__unicode__status.html#a74b5cdcf18d76a2cdb19c37857f170a7',1,'_cbor_unicode_status']]],
['lower',['lower',['../struct__cbor__stack__record.html#aca7db1e610ee0983b0e24e081ee3e5dd',1,'_cbor_stack_record']]]
];
|
(function() {
'use strict';
// POST RELEASE
// TODO(jelbourn): Demo that uses moment.js
// TODO(jelbourn): make sure this plays well with validation and ngMessages.
// TODO(jelbourn): calendar pane doesn't open up outside of visible viewport.
// TODO(jelbourn): forward more attributes to the internal input (required, autofocus, etc.)
// TODO(jelbourn): something better for mobile (calendar panel takes up entire screen?)
// TODO(jelbourn): input behavior (masking? auto-complete?)
// TODO(jelbourn): UTC mode
// TODO(jelbourn): RTL
angular.module('material.components.datepicker')
.directive('mdDatepicker', datePickerDirective);
/**
* @ngdoc directive
* @name mdDatepicker
* @module material.components.datepicker
*
* @param {Date} ng-model The component's model. Expects a JavaScript Date object.
* @param {expression=} ng-change Expression evaluated when the model value changes.
* @param {Date=} md-min-date Expression representing a min date (inclusive).
* @param {Date=} md-max-date Expression representing a max date (inclusive).
* @param {(function(Date): boolean)=} md-date-filter Function expecting a date and returning a boolean whether it can be selected or not.
* @param {String=} md-placeholder The date input placeholder value.
* @param {boolean=} ng-disabled Whether the datepicker is disabled.
* @param {boolean=} ng-required Whether a value is required for the datepicker.
*
* @description
* `<md-datepicker>` is a component used to select a single date.
* For information on how to configure internationalization for the date picker,
* see `$mdDateLocaleProvider`.
*
* This component supports [ngMessages](https://docs.angularjs.org/api/ngMessages/directive/ngMessages).
* Supported attributes are:
* * `required`: whether a required date is not set.
* * `mindate`: whether the selected date is before the minimum allowed date.
* * `maxdate`: whether the selected date is after the maximum allowed date.
*
* @usage
* <hljs lang="html">
* <md-datepicker ng-model="birthday"></md-datepicker>
* </hljs>
*
*/
function datePickerDirective() {
return {
template:
// Buttons are not in the tab order because users can open the calendar via keyboard
// interaction on the text input, and multiple tab stops for one component (picker)
// may be confusing.
'<md-button class="md-datepicker-button md-icon-button" type="button" ' +
'tabindex="-1" aria-hidden="true" ' +
'ng-click="ctrl.openCalendarPane($event)">' +
'<md-icon class="md-datepicker-calendar-icon" md-svg-icon="md-calendar"></md-icon>' +
'</md-button>' +
'<div class="md-datepicker-input-container" ' +
'ng-class="{\'md-datepicker-focused\': ctrl.isFocused}">' +
'<input class="md-datepicker-input" aria-haspopup="true" ' +
'ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)">' +
'<md-button type="button" md-no-ink ' +
'class="md-datepicker-triangle-button md-icon-button" ' +
'ng-click="ctrl.openCalendarPane($event)" ' +
'aria-label="{{::ctrl.dateLocale.msgOpenCalendar}}">' +
'<div class="md-datepicker-expand-triangle"></div>' +
'</md-button>' +
'</div>' +
// This pane will be detached from here and re-attached to the document body.
'<div class="md-datepicker-calendar-pane md-whiteframe-z1">' +
'<div class="md-datepicker-input-mask">' +
'<div class="md-datepicker-input-mask-opaque"></div>' +
'</div>' +
'<div class="md-datepicker-calendar">' +
'<md-calendar role="dialog" aria-label="{{::ctrl.dateLocale.msgCalendar}}" ' +
'md-min-date="ctrl.minDate" md-max-date="ctrl.maxDate"' +
'md-date-filter="ctrl.dateFilter"' +
'ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen">' +
'</md-calendar>' +
'</div>' +
'</div>',
require: ['ngModel', 'mdDatepicker', '?^mdInputContainer'],
scope: {
minDate: '=mdMinDate',
maxDate: '=mdMaxDate',
placeholder: '@mdPlaceholder',
dateFilter: '=mdDateFilter'
},
controller: DatePickerCtrl,
controllerAs: 'ctrl',
bindToController: true,
link: function(scope, element, attr, controllers) {
var ngModelCtrl = controllers[0];
var mdDatePickerCtrl = controllers[1];
var mdInputContainer = controllers[2];
if (mdInputContainer) {
throw Error('md-datepicker should not be placed inside md-input-container.');
}
mdDatePickerCtrl.configureNgModel(ngModelCtrl);
}
};
}
/** Additional offset for the input's `size` attribute, which is updated based on its content. */
var EXTRA_INPUT_SIZE = 3;
/** Class applied to the container if the date is invalid. */
var INVALID_CLASS = 'md-datepicker-invalid';
/** Default time in ms to debounce input event by. */
var DEFAULT_DEBOUNCE_INTERVAL = 500;
/**
* Height of the calendar pane used to check if the pane is going outside the boundary of
* the viewport. See calendar.scss for how $md-calendar-height is computed; an extra 20px is
* also added to space the pane away from the exact edge of the screen.
*
* This is computed statically now, but can be changed to be measured if the circumstances
* of calendar sizing are changed.
*/
var CALENDAR_PANE_HEIGHT = 368;
/**
* Width of the calendar pane used to check if the pane is going outside the boundary of
* the viewport. See calendar.scss for how $md-calendar-width is computed; an extra 20px is
* also added to space the pane away from the exact edge of the screen.
*
* This is computed statically now, but can be changed to be measured if the circumstances
* of calendar sizing are changed.
*/
var CALENDAR_PANE_WIDTH = 360;
/**
* Controller for md-datepicker.
*
* @ngInject @constructor
*/
function DatePickerCtrl($scope, $element, $attrs, $compile, $timeout, $window,
$mdConstant, $mdTheming, $mdUtil, $mdDateLocale, $$mdDateUtil, $$rAF) {
/** @final */
this.$compile = $compile;
/** @final */
this.$timeout = $timeout;
/** @final */
this.$window = $window;
/** @final */
this.dateLocale = $mdDateLocale;
/** @final */
this.dateUtil = $$mdDateUtil;
/** @final */
this.$mdConstant = $mdConstant;
/* @final */
this.$mdUtil = $mdUtil;
/** @final */
this.$$rAF = $$rAF;
/**
* The root document element. This is used for attaching a top-level click handler to
* close the calendar panel when a click outside said panel occurs. We use `documentElement`
* instead of body because, when scrolling is disabled, some browsers consider the body element
* to be completely off the screen and propagate events directly to the html element.
* @type {!angular.JQLite}
*/
this.documentElement = angular.element(document.documentElement);
/** @type {!angular.NgModelController} */
this.ngModelCtrl = null;
/** @type {HTMLInputElement} */
this.inputElement = $element[0].querySelector('input');
/** @final {!angular.JQLite} */
this.ngInputElement = angular.element(this.inputElement);
/** @type {HTMLElement} */
this.inputContainer = $element[0].querySelector('.md-datepicker-input-container');
/** @type {HTMLElement} Floating calendar pane. */
this.calendarPane = $element[0].querySelector('.md-datepicker-calendar-pane');
/** @type {HTMLElement} Calendar icon button. */
this.calendarButton = $element[0].querySelector('.md-datepicker-button');
/**
* Element covering everything but the input in the top of the floating calendar pane.
* @type {HTMLElement}
*/
this.inputMask = $element[0].querySelector('.md-datepicker-input-mask-opaque');
/** @final {!angular.JQLite} */
this.$element = $element;
/** @final {!angular.Attributes} */
this.$attrs = $attrs;
/** @final {!angular.Scope} */
this.$scope = $scope;
/** @type {Date} */
this.date = null;
/** @type {boolean} */
this.isFocused = false;
/** @type {boolean} */
this.isDisabled;
this.setDisabled($element[0].disabled || angular.isString($attrs['disabled']));
/** @type {boolean} Whether the date-picker's calendar pane is open. */
this.isCalendarOpen = false;
/**
* Element from which the calendar pane was opened. Keep track of this so that we can return
* focus to it when the pane is closed.
* @type {HTMLElement}
*/
this.calendarPaneOpenedFrom = null;
this.calendarPane.id = 'md-date-pane' + $mdUtil.nextUid();
$mdTheming($element);
/** Pre-bound click handler is saved so that the event listener can be removed. */
this.bodyClickHandler = angular.bind(this, this.handleBodyClick);
/** Pre-bound resize handler so that the event listener can be removed. */
this.windowResizeHandler = $mdUtil.debounce(angular.bind(this, this.closeCalendarPane), 100);
// Unless the user specifies so, the datepicker should not be a tab stop.
// This is necessary because ngAria might add a tabindex to anything with an ng-model
// (based on whether or not the user has turned that particular feature on/off).
if (!$attrs['tabindex']) {
$element.attr('tabindex', '-1');
}
this.installPropertyInterceptors();
this.attachChangeListeners();
this.attachInteractionListeners();
var self = this;
$scope.$on('$destroy', function() {
self.detachCalendarPane();
});
}
/**
* Sets up the controller's reference to ngModelController.
* @param {!angular.NgModelController} ngModelCtrl
*/
DatePickerCtrl.prototype.configureNgModel = function(ngModelCtrl) {
this.ngModelCtrl = ngModelCtrl;
var self = this;
ngModelCtrl.$render = function() {
var value = self.ngModelCtrl.$viewValue;
if (value && !(value instanceof Date)) {
throw Error('The ng-model for md-datepicker must be a Date instance. ' +
'Currently the model is a: ' + (typeof value));
}
self.date = value;
self.inputElement.value = self.dateLocale.formatDate(value);
self.resizeInputElement();
self.updateErrorState();
};
};
/**
* Attach event listeners for both the text input and the md-calendar.
* Events are used instead of ng-model so that updates don't infinitely update the other
* on a change. This should also be more performant than using a $watch.
*/
DatePickerCtrl.prototype.attachChangeListeners = function() {
var self = this;
self.$scope.$on('md-calendar-change', function(event, date) {
self.ngModelCtrl.$setViewValue(date);
self.date = date;
self.inputElement.value = self.dateLocale.formatDate(date);
self.closeCalendarPane();
self.resizeInputElement();
self.updateErrorState();
});
self.ngInputElement.on('input', angular.bind(self, self.resizeInputElement));
// TODO(chenmike): Add ability for users to specify this interval.
self.ngInputElement.on('input', self.$mdUtil.debounce(self.handleInputEvent,
DEFAULT_DEBOUNCE_INTERVAL, self));
};
/** Attach event listeners for user interaction. */
DatePickerCtrl.prototype.attachInteractionListeners = function() {
var self = this;
var $scope = this.$scope;
var keyCodes = this.$mdConstant.KEY_CODE;
// Add event listener through angular so that we can triggerHandler in unit tests.
self.ngInputElement.on('keydown', function(event) {
if (event.altKey && event.keyCode == keyCodes.DOWN_ARROW) {
self.openCalendarPane(event);
$scope.$digest();
}
});
$scope.$on('md-calendar-close', function() {
self.closeCalendarPane();
});
};
/**
* Capture properties set to the date-picker and imperitively handle internal changes.
* This is done to avoid setting up additional $watches.
*/
DatePickerCtrl.prototype.installPropertyInterceptors = function() {
var self = this;
if (this.$attrs['ngDisabled']) {
// The expression is to be evaluated against the directive element's scope and not
// the directive's isolate scope.
var scope = this.$scope.$parent;
if (scope) {
scope.$watch(this.$attrs['ngDisabled'], function(isDisabled) {
self.setDisabled(isDisabled);
});
}
}
Object.defineProperty(this, 'placeholder', {
get: function() { return self.inputElement.placeholder; },
set: function(value) { self.inputElement.placeholder = value || ''; }
});
};
/**
* Sets whether the date-picker is disabled.
* @param {boolean} isDisabled
*/
DatePickerCtrl.prototype.setDisabled = function(isDisabled) {
this.isDisabled = isDisabled;
this.inputElement.disabled = isDisabled;
this.calendarButton.disabled = isDisabled;
};
/**
* Sets the custom ngModel.$error flags to be consumed by ngMessages. Flags are:
* - mindate: whether the selected date is before the minimum date.
* - maxdate: whether the selected flag is after the maximum date.
* - filtered: whether the selected date is allowed by the custom filtering function.
* - valid: whether the entered text input is a valid date
*
* The 'required' flag is handled automatically by ngModel.
*
* @param {Date=} opt_date Date to check. If not given, defaults to the datepicker's model value.
*/
DatePickerCtrl.prototype.updateErrorState = function(opt_date) {
var date = opt_date || this.date;
// Clear any existing errors to get rid of anything that's no longer relevant.
this.clearErrorState();
if (this.dateUtil.isValidDate(date)) {
// Force all dates to midnight in order to ignore the time portion.
date = this.dateUtil.createDateAtMidnight(date);
if (this.dateUtil.isValidDate(this.minDate)) {
var minDate = this.dateUtil.createDateAtMidnight(this.minDate);
this.ngModelCtrl.$setValidity('mindate', date >= minDate);
}
if (this.dateUtil.isValidDate(this.maxDate)) {
var maxDate = this.dateUtil.createDateAtMidnight(this.maxDate);
this.ngModelCtrl.$setValidity('maxdate', date <= maxDate);
}
if (angular.isFunction(this.dateFilter)) {
this.ngModelCtrl.$setValidity('filtered', this.dateFilter(date));
}
} else {
// The date is seen as "not a valid date" if there is *something* set
// (i.e.., not null or undefined), but that something isn't a valid date.
this.ngModelCtrl.$setValidity('valid', date == null);
}
// TODO(jelbourn): Change this to classList.toggle when we stop using PhantomJS in unit tests
// because it doesn't conform to the DOMTokenList spec.
// See https://github.com/ariya/phantomjs/issues/12782.
if (!this.ngModelCtrl.$valid) {
this.inputContainer.classList.add(INVALID_CLASS);
}
};
/** Clears any error flags set by `updateErrorState`. */
DatePickerCtrl.prototype.clearErrorState = function() {
this.inputContainer.classList.remove(INVALID_CLASS);
['mindate', 'maxdate', 'filtered', 'valid'].forEach(function(field) {
this.ngModelCtrl.$setValidity(field, true);
}, this);
};
/** Resizes the input element based on the size of its content. */
DatePickerCtrl.prototype.resizeInputElement = function() {
this.inputElement.size = this.inputElement.value.length + EXTRA_INPUT_SIZE;
};
/**
* Sets the model value if the user input is a valid date.
* Adds an invalid class to the input element if not.
*/
DatePickerCtrl.prototype.handleInputEvent = function() {
var inputString = this.inputElement.value;
var parsedDate = inputString ? this.dateLocale.parseDate(inputString) : null;
this.dateUtil.setDateTimeToMidnight(parsedDate);
// An input string is valid if it is either empty (representing no date)
// or if it parses to a valid date that the user is allowed to select.
var isValidInput = inputString == '' || (
this.dateUtil.isValidDate(parsedDate) &&
this.dateLocale.isDateComplete(inputString) &&
this.isDateEnabled(parsedDate)
);
// The datepicker's model is only updated when there is a valid input.
if (isValidInput) {
this.ngModelCtrl.$setViewValue(parsedDate);
this.date = parsedDate;
}
this.updateErrorState(parsedDate);
};
/**
* Check whether date is in range and enabled
* @param {Date=} opt_date
* @return {boolean} Whether the date is enabled.
*/
DatePickerCtrl.prototype.isDateEnabled = function(opt_date) {
return this.dateUtil.isDateWithinRange(opt_date, this.minDate, this.maxDate) &&
(!angular.isFunction(this.dateFilter) || this.dateFilter(opt_date));
};
/** Position and attach the floating calendar to the document. */
DatePickerCtrl.prototype.attachCalendarPane = function() {
var calendarPane = this.calendarPane;
calendarPane.style.transform = '';
this.$element.addClass('md-datepicker-open');
var elementRect = this.inputContainer.getBoundingClientRect();
var bodyRect = document.body.getBoundingClientRect();
// Check to see if the calendar pane would go off the screen. If so, adjust position
// accordingly to keep it within the viewport.
var paneTop = elementRect.top - bodyRect.top;
var paneLeft = elementRect.left - bodyRect.left;
// If ng-material has disabled body scrolling (for example, if a dialog is open),
// then it's possible that the already-scrolled body has a negative top/left. In this case,
// we want to treat the "real" top as (0 - bodyRect.top). In a normal scrolling situation,
// though, the top of the viewport should just be the body's scroll position.
var viewportTop = (bodyRect.top < 0 && document.body.scrollTop == 0) ?
-bodyRect.top :
document.body.scrollTop;
var viewportLeft = (bodyRect.left < 0 && document.body.scrollLeft == 0) ?
-bodyRect.left :
document.body.scrollLeft;
var viewportBottom = viewportTop + this.$window.innerHeight;
var viewportRight = viewportLeft + this.$window.innerWidth;
// If the right edge of the pane would be off the screen and shifting it left by the
// difference would not go past the left edge of the screen. If the calendar pane is too
// big to fit on the screen at all, move it to the left of the screen and scale the entire
// element down to fit.
if (paneLeft + CALENDAR_PANE_WIDTH > viewportRight) {
if (viewportRight - CALENDAR_PANE_WIDTH > 0) {
paneLeft = viewportRight - CALENDAR_PANE_WIDTH;
} else {
paneLeft = viewportLeft;
var scale = this.$window.innerWidth / CALENDAR_PANE_WIDTH;
calendarPane.style.transform = 'scale(' + scale + ')';
}
calendarPane.classList.add('md-datepicker-pos-adjusted');
}
// If the bottom edge of the pane would be off the screen and shifting it up by the
// difference would not go past the top edge of the screen.
if (paneTop + CALENDAR_PANE_HEIGHT > viewportBottom &&
viewportBottom - CALENDAR_PANE_HEIGHT > viewportTop) {
paneTop = viewportBottom - CALENDAR_PANE_HEIGHT;
calendarPane.classList.add('md-datepicker-pos-adjusted');
}
calendarPane.style.left = paneLeft + 'px';
calendarPane.style.top = paneTop + 'px';
document.body.appendChild(calendarPane);
// The top of the calendar pane is a transparent box that shows the text input underneath.
// Since the pane is floating, though, the page underneath the pane *adjacent* to the input is
// also shown unless we cover it up. The inputMask does this by filling up the remaining space
// based on the width of the input.
this.inputMask.style.left = elementRect.width + 'px';
// Add CSS class after one frame to trigger open animation.
this.$$rAF(function() {
calendarPane.classList.add('md-pane-open');
});
};
/** Detach the floating calendar pane from the document. */
DatePickerCtrl.prototype.detachCalendarPane = function() {
this.$element.removeClass('md-datepicker-open');
this.calendarPane.classList.remove('md-pane-open');
this.calendarPane.classList.remove('md-datepicker-pos-adjusted');
if (this.calendarPane.parentNode) {
// Use native DOM removal because we do not want any of the angular state of this element
// to be disposed.
this.calendarPane.parentNode.removeChild(this.calendarPane);
}
};
/**
* Open the floating calendar pane.
* @param {Event} event
*/
DatePickerCtrl.prototype.openCalendarPane = function(event) {
if (!this.isCalendarOpen && !this.isDisabled) {
this.isCalendarOpen = true;
this.calendarPaneOpenedFrom = event.target;
// Because the calendar pane is attached directly to the body, it is possible that the
// rest of the component (input, etc) is in a different scrolling container, such as
// an md-content. This means that, if the container is scrolled, the pane would remain
// stationary. To remedy this, we disable scrolling while the calendar pane is open, which
// also matches the native behavior for things like `<select>` on Mac and Windows.
this.$mdUtil.disableScrollAround(this.calendarPane);
this.attachCalendarPane();
this.focusCalendar();
// Attach click listener inside of a timeout because, if this open call was triggered by a
// click, we don't want it to be immediately propogated up to the body and handled.
var self = this;
this.$mdUtil.nextTick(function() {
// Use 'touchstart` in addition to click in order to work on iOS Safari, where click
// events aren't propogated under most circumstances.
// See http://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
self.documentElement.on('click touchstart', self.bodyClickHandler);
}, false);
window.addEventListener('resize', this.windowResizeHandler);
}
};
/** Close the floating calendar pane. */
DatePickerCtrl.prototype.closeCalendarPane = function() {
if (this.isCalendarOpen) {
this.isCalendarOpen = false;
this.detachCalendarPane();
this.calendarPaneOpenedFrom.focus();
this.calendarPaneOpenedFrom = null;
this.$mdUtil.enableScrolling();
this.ngModelCtrl.$setTouched();
this.documentElement.off('click touchstart', this.bodyClickHandler);
window.removeEventListener('resize', this.windowResizeHandler);
}
};
/** Gets the controller instance for the calendar in the floating pane. */
DatePickerCtrl.prototype.getCalendarCtrl = function() {
return angular.element(this.calendarPane.querySelector('md-calendar')).controller('mdCalendar');
};
/** Focus the calendar in the floating pane. */
DatePickerCtrl.prototype.focusCalendar = function() {
// Use a timeout in order to allow the calendar to be rendered, as it is gated behind an ng-if.
var self = this;
this.$mdUtil.nextTick(function() {
self.getCalendarCtrl().focus();
}, false);
};
/**
* Sets whether the input is currently focused.
* @param {boolean} isFocused
*/
DatePickerCtrl.prototype.setFocused = function(isFocused) {
if (!isFocused) {
this.ngModelCtrl.$setTouched();
}
this.isFocused = isFocused;
};
/**
* Handles a click on the document body when the floating calendar pane is open.
* Closes the floating calendar pane if the click is not inside of it.
* @param {MouseEvent} event
*/
DatePickerCtrl.prototype.handleBodyClick = function(event) {
if (this.isCalendarOpen) {
// TODO(jelbourn): way want to also include the md-datepicker itself in this check.
var isInCalendar = this.$mdUtil.getClosest(event.target, 'md-calendar');
if (!isInCalendar) {
this.closeCalendarPane();
}
this.$scope.$digest();
}
};
})();
|
const db = require('../../db/dbConfig.js');
const fs = require('fs');
module.exports = {
find,
findById,
add,
update,
removePlant,
findByUser
};
function find() {
return db('plants').select('*');
}
function findById(id) {
return db('plants')
.where({ id })
.first()
.select('*');
}
async function add(plant, image, id) {
plant.user_id = id;
plant.image = image;
const [plantid] = await db('plants').insert(plant, 'id');
return findById(plantid);
}
function update(id, changes) {
return db('plants')
.where({ id })
.update(changes)
.then(count => {
return count > 0 ? this.findById(id) : null;
});
}
async function removePlant(id) {
const image = await db('plants').where({ id }).first().select('image');
if(image.image !== 'No Image') {
// If image actually exists in image column, remove that from the "uploads" dir upon deletion
fs.unlinkSync(`./${image.image}`);
}
return db('plants')
.where({ id })
.delete();
}
function findByUser(id) {
return db('plants')
.select('id', 'nickname', 'species', 'h2o_frequency', 'image', 'user_id')
.where('user_id', id);
}
|
module.exports = [{"isApi":true,"priority":1000.0001,"key":"Window","style":{orientationModes:[Ti.UI.PORTRAIT,],}},{"isApi":true,"priority":1000.0002,"key":"Button","style":{}},{"isApi":true,"priority":1000.042,"key":"Label","style":{width:Ti.UI.SIZE,height:Ti.UI.SIZE,font:{fontSize:"12",fontFamily:"Montserrat-Regular",fontStyle:"",fontWeight:"",},color:"#000000",}},{"isApi":true,"priority":1101.0421000000001,"key":"Button","style":{}},{"isClass":true,"priority":10101.0431,"key":"scrollView","style":{top:"18%",backgroundColor:"#e6e6e6",showVerticalScrollIndicator:"true",width:Titanium.UI.FILL,bottom:"0%",contentHeight:Titanium.UI.SIZE,contentWidth:"auto",layout:"vertical",scrollType:"vertical",}},{"isId":true,"priority":100000.0419,"key":"submitWin","style":{backgroundColor:"#e6e6e6",backgroundDisabledColor:"#000000",}},{"isId":true,"priority":100000.0422,"key":"submissionsView","style":{backgroundColor:"transparent",top:"0%",left:"0%",width:"100%",layout:"vertical",}},{"isId":true,"priority":100000.0423,"key":"notesView","style":{backgroundColor:"transparent",left:"0%",width:"100%",}},{"isId":true,"priority":100000.0434,"key":"back","style":{left:"5%",color:"white",backgroundColor:"transparent",borderColor:"transparent",font:{fontFamily:"queensfoundationfont",fontSize:35,},}},{"isId":true,"priority":100000.0437,"key":"TnC","style":{right:"5%",color:"white",top:"0%",backgroundColor:"transparent",borderColor:"transparent",font:{fontFamily:"Entypo",fontSize:40,},}},{"isId":true,"priority":100000.0442,"key":"qp","style":{top:"12%",width:"30%",left:"7%",}},{"isId":true,"priority":100000.0443,"key":"Title","style":{textAlign:"Titanium.UI.TEXT_ALIGNMENT_RIGHT",top:"35%",right:"5%",font:{fontWeight:"bold",fontSize:18,},}},{"isId":true,"priority":100000.0445,"key":"photoDate","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0446,"key":"photoTitle","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0447,"key":"photoPlace","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0448,"key":"photoNameF","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0449,"key":"photoName","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.045,"key":"photoPeopleName","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0451,"key":"photoEventName","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0452,"key":"photoOrg","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0453,"key":"photoMake","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0454,"key":"photoLoc","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0455,"key":"photoMeasure","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0456,"key":"photoNotesLabel","style":{left:"5%",top:"1%",wordWrap:"true",}},{"isId":true,"priority":100000.0457,"key":"subPrev","style":{textAlign:Ti.UI.TEXT_ALIGNMENT_CENTER,font:{fontSize:"20",fontFamily:"Montserrat-Regular",fontStyle:"",fontWeight:"bold",},}},{"isId":true,"priority":100000.0458,"key":"photoNotes","style":{left:"9.84%",top:"22%",borderColor:"#737373",borderRadius:"5",height:"40.00%",width:"80.00%",backgroundColor:"transparent",editable:"false",scrollable:"true",visible:"true",color:"#000000",}},{"isId":true,"priority":100000.0459,"key":"bannerBottom","style":{backgroundColor:"#ffffff",height:"25%",left:"0%",top:"93%",width:"100%",}},{"isId":true,"priority":100000.046,"key":"uploadIcon","style":{left:"16%",textAlign:Ti.UI.TEXT_ALIGNMENT_CENTER,font:{fontFamily:"Entypo",fontSize:"50",},}},{"isId":true,"priority":100000.0469,"key":"uploadedImage","style":{height:"60%",width:"65%",autorotate:true,}},{"isId":true,"priority":100000.047,"key":"ImageInfo","style":{font:{fontSize:"10",fontFamily:"",fontStyle:"",fontWeight:"",},textAlign:Ti.UI.TEXT_ALIGNMENT_CENTER,left:"5%",height:"6.72%",width:"100.09%",}},{"isId":true,"priority":100000.0471,"key":"next","style":{top:"5%",right:"5%",width:"30%",backgroundColor:"#f2f2f2",borderColor:"gray",color:"black",borderRadius:5,}},{"isId":true,"priority":100000.0472,"key":"edit","style":{top:"5%",left:"5%",width:"30%",backgroundColor:"#f2f2f2",borderColor:"gray",color:"black",borderRadius:5,}},{"isId":true,"priority":100101.0425,"key":"pickerView","style":{height:"300dp",}},{"isId":true,"priority":100101.0427,"key":"notesView","style":{height:"130dp",}},{"isId":true,"priority":100101.0429,"key":"submissionsView","style":{height:"700dp",}},{"isId":true,"priority":100101.0433,"key":"QL","style":{width:"33%",top:"13%",}},{"isId":true,"priority":100101.0436,"key":"back","style":{top:"0%",font:{fontSize:35,},}},{"isId":true,"priority":100101.0438,"key":"navBar","style":{backgroundColor:"black",top:"0%",width:"100%",height:"13%",font:{fontSize:14,},zIndex:0,}},{"isId":true,"priority":100101.0441,"key":"titleBan","style":{backgroundColor:"white",top:"7%",height:"15%",font:{fontSize:12,},}},{"isId":true,"priority":100101.0444,"key":"Title","style":{textAlign:"Titanium.UI.TEXT_ALIGNMENT_RIGHT",top:"25%",right:"5%",font:{fontWeight:"bold",fontSize:18,},}},{"isId":true,"priority":100101.0463,"key":"uploadIcon","style":{top:"82.4%",}},{"isId":true,"priority":100101.0464,"key":"ImageInfo","style":{top:"83.7%",}},{"isId":true,"priority":100101.0465,"key":"subPrev","style":{top:"10%",left:"21.5%",}},{"isId":true,"priority":100101.0467,"key":"uploadedImage","style":{top:"20%",left:"17%",}},{"isId":true,"priority":100101.0473,"key":"next","style":{height:"20%",font:{fontWeight:"bold",},}},{"isId":true,"priority":100101.0474,"key":"edit","style":{height:"20%",font:{fontWeight:"bold",},}}]; |
/**
* @module Utils
*
*/
import { assert, funcNumArgs } from '@busyweb/debug';
import { arrayT, funcT, stringT } from '@busyweb/types';
/**
* @class ProxyArray
*
*/
export default class ProxyArray {
constructor(list=[]) {
assert("new ProxyArray() must include an array as the first param", arrayT(list));
// history tracker
this.__hist__ = [];
// save the list
this.content = list;
this[Symbol.isConcatSpreadable] = true;
}
get content() {
return this.__list__.slice(0);
}
set content(list) {
// keep track of history for up to 100 changes
updateHistory(list, this.__hist__);
// define getter for arr keys
//list.forEach((val, key) => this.__defineGetter__(key, () => this.__list__[key]));
// save list
this.__list__ = list;
}
get length() {
return this.content.length;
}
[Symbol.iterator]() { return this.content.values() }
static get [Symbol.species] () { return Array }
objectAt(idx) {
return this.content[idx];
}
forEach(callback, target=null) {
assert("callback must be a function", funcT(callback));
return this.content.forEach(callback, target);
}
map(callback, target=null) {
assert("callback must be a function", funcT(callback));
return this.content.map(callback, target);
}
find(callback, target=null) {
assert("callback must be a function", funcT(callback));
return this.content.find(callback, target);
}
filter(callback, target=null) {
assert("callback must be a function", funcT(callback));
return this.content.find(callback, target);
}
push(value) {
// enforce 1 argument is passed in
funcNumArgs(1, arguments);
// get list
let list = this.content;
list.push(value);
this.content = list;
return this;
}
pop() {
let list = this.content;
let value = list.pop();
this.content = list;
return value;
}
mapBy(key) {
funcNumArgs(1, arguments);
assert("mapBy(key) takes a string as the only argument", stringT(key));
return this.map(v => v[key]);
}
findBy(key, value) {
funcNumArgs(2, arguments);
assert("findBy(key, value) takes a string as the only argument", stringT(key));
return this.find(v => v[key] === value);
}
filterBy(key, value) {
funcNumArgs(2, arguments);
assert("filterBy(key, value) takes a string as the only argument", stringT(key));
return this.find(v => v[key] === value);
}
valueOf() {
return this.content;
}
toArray() {
return this.valueOf();
}
toString() {
return JSON.stringify(this.content);
}
}
function updateHistory(list, history) {
history = history.slice(0);
let len = history.length;
history[len] = list;
if (len > 100) {
history = history.slice(1);
}
return history;
}
|
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cashflow_django.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()
|
var mongoose = require("mongoose");
var RoleSchema = new mongoose.Schema({
title: {type: String, required: true},
roleKey: {type: String, required: true},
description: {type: String, required: true},
groups: [{type: mongoose.Schema.Types.ObjectId, ref: 'Group'}],
}, {timestamps: true});
RoleSchema.methods = {
toJSON() {
return {
id: this._id,
title: this.title,
description: this.description,
roleKey: this.roleKey
}
}
};
module.exports = mongoose.model("Role", RoleSchema); |
const ReturnHistoryIndexRoutePage = {
template: `
<div id="app">
<el-divider>退货历史信息</el-divider>
<el-table :data="returnHistories" style="width: 100%">
<el-table-column prop="timestamp" label="时间">
<template slot-scope="scope">
{{(new Date(scope.row.timestamp)).toLocaleString()}}
</template>
</el-table-column>
<el-table-column prop="returnStatus" label="退货状态">
<template slot-scope="scope">
{{returnStatuses[scope.row.returnStatus].label}}
</template>
</el-table-column>
<el-table-column prop="comment" label="备注">
</el-table-column>
<el-table-column label="是否通知客户">
<template slot-scope="scope">
<span v-if="scope.row.customerNotified">是</span><span v-else>否</span>
</template>
</el-table-column>
</el-table>
<el-divider>添加退货历史</el-divider>
<el-select v-model="selectedReturnStatus" placeholder="请选择退货状态">
<el-option v-for="item in returnStatuses" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<br>
<el-checkbox v-model="customerNotified">是否通知客户</el-checkbox>
<br>
<el-input v-model="comment" type="textarea" placeholder="请输入备注"></el-input>
<br>
<el-button type="primary" @click="handleCreateClick">添加退货历史</el-button>
</div>
`,
data(){
return {
returnId:'',
returnHistories:[],
returnStatuses:[
{ value: 0, label: '待处理' },
{ value: 1, label: '待取货' },
{ value: 2, label: '正在处理' },
{ value: 3, label: '完成' },
{ value: 4, label: '拒绝' }
],
selectedReturnStatus:'',
customerNotified:false,
comment:''
}
},
mounted(){
console.log('view mounted');
/* var url = new URL(location.href);
this.returnId=url.searchParams.get("returnId"); */
this.returnId= this.$route.params.returnId;
if(!this.returnId){
alert('returnId is null');
return;
}
this.getReturnHistory();
},
methods:{
handleCreateClick(){
console.log('add returnHistory click');
this.addReturnHistory();
},
addReturnHistory(){
axios.post('/returnHistory/create', {
returnId: this.returnId,
customerNotified: this.customerNotified,
comment: this.comment,
returnStatus: this.selectedReturnStatus
})
.then((response) => {
console.log(response);
alert("添加退货历史成功");
this.selectedReturnStatus='';
this.customerNotified=false;
this.comment='';
this.getReturnHistory();
})
.catch(function (error) {
console.log(error);
});
},
getReturnHistory(){
axios.get('/returnHistory/search', {
params: {
returnId:this.returnId
}
})
.then((response) => {
console.log(response);
this.returnHistories = response.data;
})
.catch(function (error) {
console.log(error);
});
}
}
} |
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[]]);!function(e){function t(t){for(var r,l,a=t[0],u=t[1],s=t[2],f=0,p=[];f<a.length;f++)l=a[f],Object.prototype.hasOwnProperty.call(i,l)&&i[l]&&p.push(i[l][0]),i[l]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(c&&c(t);p.length;)p.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==i[u]&&(r=!1)}r&&(o.splice(t--,1),e=l(l.s=n[0]))}return e}var r={},i={1:0},o=[];function l(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,l),n.l=!0,n.exports}l.e=function(e){var t=[],n=i[e];if(0!==n)if(n)t.push(n[2]);else{var r=new Promise((function(t,r){n=i[e]=[t,r]}));t.push(n[2]=r);var o,a=document.createElement("script");a.charset="utf-8",a.timeout=120,l.nc&&a.setAttribute("nonce",l.nc),a.src=function(e){return l.p+"assets/js/"+({}[e]||e)+"."+{2:"bfab96f3",3:"4cfcf750",4:"4a225a49",5:"18395f38",6:"067b2ba9",7:"a2070def",8:"b8d88790",9:"2b6097ea",10:"b83c8145",11:"45228265",12:"84816a2b",13:"b528b4fc",14:"0d8e7631",15:"efc6e510",16:"fadd4bfd",17:"74e473b7",18:"ace77c4b",19:"73db1a91",20:"abef4298",21:"7f48f3ca",22:"7926c8a3",23:"24eff3f6",24:"439fc3ac",25:"238d1f1d",26:"3093e964",27:"32ee0693",28:"e76d62a3",29:"f09366cd",30:"83b95423",31:"b6e9bef0",32:"d899d197",33:"980d6153",34:"a6788301",35:"747dabab",36:"f6b950f5",37:"b6ca9cc6",38:"27a2549a",39:"91a25242",40:"cdcacc0b",41:"1c9b41f0",42:"49fe39b6",43:"9f00003a",44:"c4efabcc",45:"9c957d13",46:"43c1398d",47:"891e488a",48:"d898c751",49:"2cc6ccb8",50:"a0f3c1c7",51:"faa42d3d",52:"4b76958d",53:"842db183",54:"79e29d19",55:"699a63c4",56:"5280c1df",57:"f82823c0",58:"ac9d173c",59:"d032611f",60:"6751e747",61:"a0e742e3",62:"1509e8ca",63:"3dea32ec",64:"43505fee",65:"baaf19d6",66:"d39ec81b",67:"8622ccb2",68:"cb44394c",69:"30286b54",70:"4f56a980",71:"f9b81424",72:"359efe8d",73:"adf412c2",74:"84c5ad36",75:"2a375f96",76:"987f75bb",77:"5679ab03",78:"1ff4e9eb",79:"b0aa2794",80:"907d02d6",81:"f9d07069",82:"148c9dcd",83:"0e5cf263",84:"fe18a8b8",85:"9553db9c",86:"d0dba395",87:"aff3992c",88:"ca11ce53",89:"98d3e5b3",90:"b63b627d",91:"35493b12",92:"7c236a43",93:"e1339bd7",94:"73df8bfe",95:"cf2f402e",96:"4bb6f881",97:"9486defe",98:"e9716955",99:"e29012fa",100:"1eb7bd75",101:"c76147dd",102:"ef0e1ce5",103:"086862b2",104:"7d53ff16",105:"0d34c256",106:"55d5f996",107:"da00b11e",108:"5cbdae00",109:"9e3fe970",110:"5eb0860c",111:"521b5602",112:"38fcf913",113:"f604fe8b",114:"e1bb510a",115:"9d8bfcd7",116:"2ff33a7d",117:"75195893",118:"d57caf32",119:"95d80da0",120:"23f57fa7",121:"d59d7b0a",122:"8ffe28a4",123:"e25a8f58",124:"155f1020",125:"53b3be90",126:"b697b3a6",127:"009c4c93",128:"2a88db87",129:"524b967f",130:"945df7ad",131:"ce708104",132:"2692323a",133:"37ca077c",134:"992094cc",135:"47eb8e3b",136:"4582eb44",137:"deb6072a",138:"44e9a23e",139:"68c0585e",140:"0bc6cb92",141:"34197394",142:"9c682e55",143:"d5dd1fe1",144:"d661ebc8",145:"60212193",146:"3cb35e9a",147:"5f9ac0ef",148:"407176fb",149:"344249fc",150:"aa25d093",151:"fc090249",152:"5c8f6990",153:"34964020",154:"ed038a06",155:"0a19a974",156:"beccc8d9",157:"03938664",158:"0b204cfd",159:"216de527",160:"9ad3b8d5",161:"7ab5726b",162:"5d2ff390",163:"7ba0f443",164:"2147b824",165:"bb82a5ec",166:"7b07110e",167:"9d5ba281",168:"aa1708f1",169:"cd665b5b"}[e]+".js"}(e);var u=new Error;o=function(t){a.onerror=a.onload=null,clearTimeout(s);var n=i[e];if(0!==n){if(n){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",u.name="ChunkLoadError",u.type=r,u.request=o,n[1](u)}i[e]=void 0}};var s=setTimeout((function(){o({type:"timeout",target:a})}),12e4);a.onerror=a.onload=o,document.head.appendChild(a)}return Promise.all(t)},l.m=e,l.c=r,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)l.d(n,r,function(t){return e[t]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="/",l.oe=function(e){throw console.error(e),e};var a=window.webpackJsonp=window.webpackJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var s=0;s<a.length;s++)t(a[s]);var c=u;o.push([186,0]),n()}([function(e,t,n){var r=n(1),i=n(22).f,o=n(11),l=n(18),a=n(75),u=n(116),s=n(99);e.exports=function(e,t){var n,c,f,p,v,h=e.target,m=e.global,g=e.stat;if(n=m?r:g?r[h]||a(h,{}):(r[h]||{}).prototype)for(c in t){if(p=t[c],f=e.noTargetGet?(v=i(n,c))&&v.value:n[c],!s(m?c:h+(g?".":"#")+c,e.forced)&&void 0!==f){if(typeof p==typeof f)continue;u(p,f)}(e.sham||f&&f.sham)&&o(p,"sham",!0),l(n,c,p,e)}}},function(e,t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||function(){return this}()||Function("return this")()},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(1),i=n(73),o=n(8),l=n(50),a=n(77),u=n(110),s=i("wks"),c=r.Symbol,f=u?c:c&&c.withoutSetter||l;e.exports=function(e){return o(s,e)&&(a||"string"==typeof s[e])||(a&&o(c,e)?s[e]=c[e]:s[e]=f("Symbol."+e)),s[e]}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(2);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(4);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(5),i=n(108),o=n(6),l=n(49),a=Object.defineProperty;t.f=r?a:function(e,t,n){if(o(e),t=l(t,!0),o(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(84),i=n(18),o=n(201);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(e,t,n){var r=n(34),i=n(20);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(5),i=n(7),o=n(35);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(20);e.exports=function(e){return Object(r(e))}},function(e,t,n){"use strict";var r=n(131).charAt,i=n(31),o=n(115),l=i.set,a=i.getterFor("String Iterator");o(String,"String",(function(e){l(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=a(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(53),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(1),i=n(132),o=n(107),l=n(11),a=n(3),u=a("iterator"),s=a("toStringTag"),c=o.values;for(var f in i){var p=r[f],v=p&&p.prototype;if(v){if(v[u]!==c)try{l(v,u,c)}catch(e){v[u]=c}if(v[s]||l(v,s,f),i[f])for(var h in o)if(v[h]!==o[h])try{l(v,h,o[h])}catch(e){v[h]=o[h]}}}},function(e,t,n){var r=n(143),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t,n){var r=n(1),i=n(11),o=n(8),l=n(75),a=n(80),u=n(31),s=u.get,c=u.enforce,f=String(String).split("String");(e.exports=function(e,t,n,a){var u,s=!!a&&!!a.unsafe,p=!!a&&!!a.enumerable,v=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),(u=c(n)).source||(u.source=f.join("string"==typeof t?t:""))),e!==r?(s?!v&&e[t]&&(p=!0):delete e[t],p?e[t]=n:i(e,t,n)):p?e[t]=n:l(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&s(this).source||a(this)}))},function(e,t,n){var r=n(109),i=n(1),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports=!1},function(e,t,n){var r=n(5),i=n(81),o=n(35),l=n(10),a=n(49),u=n(8),s=n(108),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=l(e),t=a(t,!0),s)try{return c(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r=n(229),i=n(232);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";function r(e,t,n,r,i,o,l,a){var u,s="function"==typeof e?e.options:e;if(t&&(s.render=t,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),l?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(l)},s._ssrRegister=u):i&&(u=a?function(){i.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(s.functional){s._injectStyles=u;var c=s.render;s.render=function(e,t){return u.call(t),c(e,t)}}else{var f=s.beforeCreate;s.beforeCreate=f?[].concat(f,u):[u]}return{exports:e,options:s}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(32).filter;r({target:"Array",proto:!0,forced:!n(59)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){"use strict";var r=n(0),i=n(1),o=n(19),l=n(21),a=n(5),u=n(77),s=n(110),c=n(2),f=n(8),p=n(41),v=n(4),h=n(6),m=n(12),g=n(10),d=n(49),b=n(35),y=n(38),_=n(52),w=n(71),x=n(207),k=n(82),P=n(22),E=n(7),S=n(81),O=n(11),j=n(18),A=n(73),C=n(54),L=n(39),$=n(50),T=n(3),R=n(138),M=n(139),I=n(55),D=n(31),N=n(32).forEach,F=C("hidden"),B=T("toPrimitive"),U=D.set,z=D.getterFor("Symbol"),V=Object.prototype,q=i.Symbol,H=o("JSON","stringify"),G=P.f,W=E.f,K=x.f,J=S.f,X=A("symbols"),Y=A("op-symbols"),Q=A("string-to-symbol-registry"),Z=A("symbol-to-string-registry"),ee=A("wks"),te=i.QObject,ne=!te||!te.prototype||!te.prototype.findChild,re=a&&c((function(){return 7!=y(W({},"a",{get:function(){return W(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=G(V,t);r&&delete V[t],W(e,t,n),r&&e!==V&&W(V,t,r)}:W,ie=function(e,t){var n=X[e]=y(q.prototype);return U(n,{type:"Symbol",tag:e,description:t}),a||(n.description=t),n},oe=s?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof q},le=function(e,t,n){e===V&&le(Y,t,n),h(e);var r=d(t,!0);return h(n),f(X,r)?(n.enumerable?(f(e,F)&&e[F][r]&&(e[F][r]=!1),n=y(n,{enumerable:b(0,!1)})):(f(e,F)||W(e,F,b(1,{})),e[F][r]=!0),re(e,r,n)):W(e,r,n)},ae=function(e,t){h(e);var n=g(t),r=_(n).concat(fe(n));return N(r,(function(t){a&&!ue.call(n,t)||le(e,t,n[t])})),e},ue=function(e){var t=d(e,!0),n=J.call(this,t);return!(this===V&&f(X,t)&&!f(Y,t))&&(!(n||!f(this,t)||!f(X,t)||f(this,F)&&this[F][t])||n)},se=function(e,t){var n=g(e),r=d(t,!0);if(n!==V||!f(X,r)||f(Y,r)){var i=G(n,r);return!i||!f(X,r)||f(n,F)&&n[F][r]||(i.enumerable=!0),i}},ce=function(e){var t=K(g(e)),n=[];return N(t,(function(e){f(X,e)||f(L,e)||n.push(e)})),n},fe=function(e){var t=e===V,n=K(t?Y:g(e)),r=[];return N(n,(function(e){!f(X,e)||t&&!f(V,e)||r.push(X[e])})),r};(u||(j((q=function(){if(this instanceof q)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=$(e),n=function(e){this===V&&n.call(Y,e),f(this,F)&&f(this[F],t)&&(this[F][t]=!1),re(this,t,b(1,e))};return a&&ne&&re(V,t,{configurable:!0,set:n}),ie(t,e)}).prototype,"toString",(function(){return z(this).tag})),j(q,"withoutSetter",(function(e){return ie($(e),e)})),S.f=ue,E.f=le,P.f=se,w.f=x.f=ce,k.f=fe,R.f=function(e){return ie(T(e),e)},a&&(W(q.prototype,"description",{configurable:!0,get:function(){return z(this).description}}),l||j(V,"propertyIsEnumerable",ue,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:q}),N(_(ee),(function(e){M(e)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(f(Q,t))return Q[t];var n=q(t);return Q[t]=n,Z[n]=t,n},keyFor:function(e){if(!oe(e))throw TypeError(e+" is not a symbol");if(f(Z,e))return Z[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!a},{create:function(e,t){return void 0===t?y(e):ae(y(e),t)},defineProperty:le,defineProperties:ae,getOwnPropertyDescriptor:se}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:ce,getOwnPropertySymbols:fe}),r({target:"Object",stat:!0,forced:c((function(){k.f(1)}))},{getOwnPropertySymbols:function(e){return k.f(m(e))}}),H)&&r({target:"JSON",stat:!0,forced:!u||c((function(){var e=q();return"[null]"!=H([e])||"{}"!=H({a:e})||"{}"!=H(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(v(t)||void 0!==e)&&!oe(e))return p(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!oe(t))return t}),i[1]=t,H.apply(null,i)}});q.prototype[B]||O(q.prototype,B,q.prototype.valueOf),I(q,"Symbol"),L[F]=!0},function(e,t,n){"use strict";var r=n(0),i=n(72);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){var r,i,o,l=n(187),a=n(1),u=n(4),s=n(11),c=n(8),f=n(74),p=n(54),v=n(39),h=a.WeakMap;if(l){var m=f.state||(f.state=new h),g=m.get,d=m.has,b=m.set;r=function(e,t){return t.facade=e,b.call(m,e,t),t},i=function(e){return g.call(m,e)||{}},o=function(e){return d.call(m,e)}}else{var y=p("state");v[y]=!0,r=function(e,t){return t.facade=e,s(e,y,t),t},i=function(e){return c(e,y)?e[y]:{}},o=function(e){return c(e,y)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(56),i=n(34),o=n(12),l=n(14),a=n(133),u=[].push,s=function(e){var t=1==e,n=2==e,s=3==e,c=4==e,f=6==e,p=7==e,v=5==e||f;return function(h,m,g,d){for(var b,y,_=o(h),w=i(_),x=r(m,g,3),k=l(w.length),P=0,E=d||a,S=t?E(h,k):n||p?E(h,0):void 0;k>P;P++)if((v||P in w)&&(y=x(b=w[P],P,_),e))if(t)S[P]=y;else if(y)switch(e){case 3:return!0;case 5:return b;case 6:return P;case 2:u.call(S,b)}else switch(e){case 4:return!1;case 7:u.call(S,b)}return f?-1:s||c?c:S}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterOut:s(7)}},function(e,t,n){var r=n(44),i=n(214),o=n(215),l=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(2),i=n(28),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(28),i=n(1);e.exports="process"==r(i.process)},function(e,t,n){var r,i,o=n(1),l=n(51),a=o.process,u=a&&a.versions,s=u&&u.v8;s?i=(r=s.split("."))[0]+r[1]:l&&(!(r=l.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=l.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r,i=n(6),o=n(111),l=n(79),a=n(39),u=n(114),s=n(76),c=n(54),f=c("IE_PROTO"),p=function(){},v=function(e){return"<script>"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;h=r?function(e){e.write(v("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=s("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(v("document.F=Object")),e.close(),e.F);for(var n=l.length;n--;)delete h.prototype[l[n]];return h()};a[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=i(e),n=new p,p.prototype=null,n[f]=e):n=h(),void 0===t?n:o(n,t)}},function(e,t){e.exports={}},function(e,t){e.exports={}},function(e,t,n){var r=n(28);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var r=n(0),i=n(5),o=n(1),l=n(8),a=n(4),u=n(7).f,s=n(116),c=o.Symbol;if(i&&"function"==typeof c&&(!("description"in c.prototype)||void 0!==c().description)){var f={},p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof p?new c(e):void 0===e?c():c(e);return""===e&&(f[t]=!0),t};s(p,c);var v=p.prototype=c.prototype;v.constructor=p;var h=v.toString,m="Symbol(test)"==String(c("test")),g=/^Symbol\((.*)\)[^)]+$/;u(v,"description",{configurable:!0,get:function(){var e=a(this)?this.valueOf():this,t=h.call(e);if(l(f,e))return"";var n=m?t.slice(7,-1):t.replace(g,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:p})}},function(e,t,n){var r=n(17).Symbol;e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(97);var r=n(46);n(29),n(43),n(9),n(60),n(13),n(16),n(140);var i=n(66);function o(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(0),i=n(136);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(e,t,n){var r=n(1),i=n(132),o=n(136),l=n(11);for(var a in i){var u=r[a],s=u&&u.prototype;if(s&&s.forEach!==o)try{l(s,"forEach",o)}catch(e){s.forEach=o}}},function(e,t,n){var r=n(4);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(19);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(112),i=n(79);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(73),i=n(50),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t,n){var r=n(7).f,i=n(8),o=n(3)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(23);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n(41),l=n(113),a=n(14),u=n(10),s=n(58),c=n(3),f=n(59)("slice"),p=c("species"),v=[].slice,h=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,r,c,f=u(this),m=a(f.length),g=l(e,m),d=l(void 0===t?m:t,m);if(o(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[p])&&(n=void 0):n=void 0,n===Array||void 0===n))return v.call(f,g,d);for(r=new(void 0===n?Array:n)(h(d-g,0)),c=0;g<d;g++,c++)g in f&&s(r,c,f[g]);return r.length=c,r}})},function(e,t,n){"use strict";var r=n(49),i=n(7),o=n(35);e.exports=function(e,t,n){var l=r(t);l in e?i.f(e,l,o(0,n)):e[l]=n}},function(e,t,n){var r=n(2),i=n(3),o=n(37),l=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[l]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){n(139)("iterator")},function(e,t,n){var r=n(219),i=n(220),o=n(221),l=n(222),a=n(223);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=l,u.prototype.set=a,e.exports=u},function(e,t,n){var r=n(145);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(24)(Object,"create");e.exports=r},function(e,t,n){var r=n(241);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(93);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));n(57),n(9),n(85),n(140),n(13);var r=n(46);function i(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){var r,i;
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */void 0===(i="function"==typeof(r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function i(e,t,n){return e<t?t:e>n?n:e}function o(e){return 100*(-1+e)}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=i(e,r.minimum,1),n.status=1===e?null:e;var u=n.render(!t),s=u.querySelector(r.barSelector),c=r.speed,f=r.easing;return u.offsetWidth,l((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),a(s,function(e,t,n){var i;return(i="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,i}(e,c,f)),1===e?(a(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){a(u,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*i(Math.random()*t,.1,.95)),t=i(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var i,l=t.querySelector(r.barSelector),u=e?"-100":o(n.status||0),c=document.querySelector(r.parent);return a(l,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(i=t.querySelector(r.spinnerSelector))&&p(i),c!=document.body&&s(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),a=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})),t[n]||(t[n]=function(t){var n=document.body.style;if(t in n)return t;for(var r,i=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);i--;)if((r=e[i]+o)in n)return r;return t}(n))}function r(e,t,r){t=n(t),e.style[t]=r}return function(e,t){var n,i,o=arguments;if(2==o.length)for(n in t)void 0!==(i=t[n])&&t.hasOwnProperty(n)&&r(e,n,i);else r(e,o[1],o[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function s(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=i)},function(e,t,n){"use strict";var r=n(0),i=n(32).map;r({target:"Array",proto:!0,forced:!n(59)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(173),i=n(6),o=n(14),l=n(53),a=n(20),u=n(175),s=n(210),c=n(176),f=Math.max,p=Math.min;r("replace",2,(function(e,t,n,r){var v=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,h=r.REPLACE_KEEPS_$0,m=v?"$":"$0";return[function(n,r){var i=a(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,r){if(!v&&h||"string"==typeof r&&-1===r.indexOf(m)){var a=n(t,e,this,r);if(a.done)return a.value}var g=i(e),d=String(this),b="function"==typeof r;b||(r=String(r));var y=g.global;if(y){var _=g.unicode;g.lastIndex=0}for(var w=[];;){var x=c(g,d);if(null===x)break;if(w.push(x),!y)break;""===String(x[0])&&(g.lastIndex=u(d,o(g.lastIndex),_))}for(var k,P="",E=0,S=0;S<w.length;S++){x=w[S];for(var O=String(x[0]),j=f(p(l(x.index),d.length),0),A=[],C=1;C<x.length;C++)A.push(void 0===(k=x[C])?k:String(k));var L=x.groups;if(b){var $=[O].concat(A,j,d);void 0!==L&&$.push(L);var T=String(r.apply(void 0,$))}else T=s(O,d,j,A,L,r);j>=E&&(P+=d.slice(E,j)+T,E=j+O.length)}return P+d.slice(E)}]}))},function(e,t,n){var r=n(0),i=n(12),o=n(52);r({target:"Object",stat:!0,forced:n(2)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){var r=n(112),i=n(79).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){"use strict";var r,i,o=n(174),l=n(180),a=RegExp.prototype.exec,u=String.prototype.replace,s=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=l.UNSUPPORTED_Y||l.BROKEN_CARET,p=void 0!==/()??/.exec("")[1];(c||p||f)&&(s=function(e){var t,n,r,i,l=this,s=f&&l.sticky,v=o.call(l),h=l.source,m=0,g=e;return s&&(-1===(v=v.replace("y","")).indexOf("g")&&(v+="g"),g=String(e).slice(l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==e[l.lastIndex-1])&&(h="(?: "+h+")",g=" "+g,m++),n=new RegExp("^(?:"+h+")",v)),p&&(n=new RegExp("^"+h+"$(?!\\s)",v)),c&&(t=l.lastIndex),r=a.call(s?n:l,g),s?r?(r.input=r.input.slice(m),r[0]=r[0].slice(m),r.index=l.lastIndex,l.lastIndex+=r[0].length):l.lastIndex=0:c&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),p&&r&&r.length>1&&u.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=s},function(e,t,n){var r=n(21),i=n(74);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.9.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(1),i=n(75),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(1),i=n(11);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(1),i=n(4),o=r.document,l=i(o)&&i(o.createElement);e.exports=function(e){return l?o.createElement(e):{}}},function(e,t,n){var r=n(36),i=n(37),o=n(2);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!Symbol.sham&&(r?38===i:i>37&&i<41)}))},function(e,t,n){var r=n(10),i=n(14),o=n(113),l=function(e){return function(t,n,l){var a,u=r(t),s=i(u.length),c=o(l,s);if(e&&n!=n){for(;s>c;)if((a=u[c++])!=a)return!0}else for(;s>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:l(!0),indexOf:l(!1)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(74),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(8),i=n(12),o=n(54),l=n(119),a=o("IE_PROTO"),u=Object.prototype;e.exports=l?Object.getPrototypeOf:function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){var r={};r[n(3)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(5),i=n(7).f,o=Function.prototype,l=o.toString,a=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return l.call(this).match(a)[1]}catch(e){return""}}})},function(e,t,n){var r=n(213),i=n(27),o=Object.prototype,l=o.hasOwnProperty,a=o.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&l.call(e,"callee")&&!a.call(e,"callee")};e.exports=u},function(e,t,n){var r=n(24)(n(17),"Map");e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(233),i=n(240),o=n(242),l=n(243),a=n(244);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=l,u.prototype.set=a,e.exports=u},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(15),i=n(93),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(l.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(33),i=n(27);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(0),i=n(5);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(7).f})},function(e,t,n){"use strict";var r=n(0),i=n(32).some;r({target:"Array",proto:!0,forced:!n(42)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(0)({target:"Array",stat:!0},{isArray:n(41)})},function(e,t,n){var r=n(3),i=n(38),o=n(7),l=r("unscopables"),a=Array.prototype;null==a[l]&&o.f(a,l,{configurable:!0,value:i(null)}),e.exports=function(e){a[l][e]=!0}},function(e,t,n){var r=n(2),i=/#|\.prototype\./,o=function(e,t){var n=a[l(e)];return n==s||n!=u&&("function"==typeof t?r(t):!!t)},l=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},a=o.data={},u=o.NATIVE="N",s=o.POLYFILL="P";e.exports=o},function(e,t,n){var r=n(6),i=n(189);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){var r=n(6),i=n(23),o=n(3)("species");e.exports=function(e,t){var n,l=r(e).constructor;return void 0===l||null==(n=r(l)[o])?t:i(n)}},function(e,t,n){var r=n(172);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(3)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){"use strict";var r=n(0),i=n(2),o=n(41),l=n(4),a=n(12),u=n(14),s=n(58),c=n(133),f=n(59),p=n(3),v=n(37),h=p("isConcatSpreadable"),m=v>=51||!i((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=f("concat"),d=function(e){if(!l(e))return!1;var t=e[h];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!m||!g},{concat:function(e){var t,n,r,i,o,l=a(this),f=c(l,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(d(o=-1===t?l:arguments[t])){if(p+(i=u(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,p++)n in o&&s(f,p,o[n])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(f,p++,o)}return f.length=p,f}})},function(e,t,n){var r=n(0),i=n(1),o=n(51),l=[].slice,a=function(e){return function(t,n){var r=arguments.length>2,i=r?l.call(arguments,2):void 0;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(o)},{setTimeout:a(i.setTimeout),setInterval:a(i.setInterval)})},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){"use strict";var r=n(10),i=n(98),o=n(40),l=n(31),a=n(115),u=l.set,s=l.getterFor("Array Iterator");e.exports=a(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=s(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){var r=n(5),i=n(2),o=n(76);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(1);e.exports=r},function(e,t,n){var r=n(77);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(5),i=n(7),o=n(6),l=n(52);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=l(t),a=r.length,u=0;a>u;)i.f(e,n=r[u++],t[n]);return e}},function(e,t,n){var r=n(8),i=n(10),o=n(78).indexOf,l=n(39);e.exports=function(e,t){var n,a=i(e),u=0,s=[];for(n in a)!r(l,n)&&r(a,n)&&s.push(n);for(;t.length>u;)r(a,n=t[u++])&&(~o(s,n)||s.push(n));return s}},function(e,t,n){var r=n(53),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t,n){var r=n(19);e.exports=r("document","documentElement")},function(e,t,n){"use strict";var r=n(0),i=n(188),o=n(83),l=n(100),a=n(55),u=n(11),s=n(18),c=n(3),f=n(21),p=n(40),v=n(118),h=v.IteratorPrototype,m=v.BUGGY_SAFARI_ITERATORS,g=c("iterator"),d=function(){return this};e.exports=function(e,t,n,c,v,b,y){i(n,t,c);var _,w,x,k=function(e){if(e===v&&j)return j;if(!m&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},P=t+" Iterator",E=!1,S=e.prototype,O=S[g]||S["@@iterator"]||v&&S[v],j=!m&&O||k(v),A="Array"==t&&S.entries||O;if(A&&(_=o(A.call(new e)),h!==Object.prototype&&_.next&&(f||o(_)===h||(l?l(_,h):"function"!=typeof _[g]&&u(_,g,d)),a(_,P,!0,!0),f&&(p[P]=d))),"values"==v&&O&&"values"!==O.name&&(E=!0,j=function(){return O.call(this)}),f&&!y||S[g]===j||u(S,g,j),p[t]=j,v)if(w={values:k("values"),keys:b?j:k("keys"),entries:k("entries")},y)for(x in w)(m||E||!(x in S))&&s(S,x,w[x]);else r({target:t,proto:!0,forced:m||E},w);return w}},function(e,t,n){var r=n(8),i=n(117),o=n(22),l=n(7);e.exports=function(e,t){for(var n=i(t),a=l.f,u=o.f,s=0;s<n.length;s++){var c=n[s];r(e,c)||a(e,c,u(t,c))}}},function(e,t,n){var r=n(19),i=n(71),o=n(82),l=n(6);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(l(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";var r,i,o,l=n(2),a=n(83),u=n(11),s=n(8),c=n(3),f=n(21),p=c("iterator"),v=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):v=!0);var h=null==r||l((function(){var e={};return r[p].call(e)!==e}));h&&(r={}),f&&!h||s(r,p)||u(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},function(e,t,n){var r=n(2);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){var r=n(1);e.exports=r.Promise},function(e,t,n){var r=n(3),i=n(40),o=r("iterator"),l=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||l[o]===e)}},function(e,t,n){var r=n(123),i=n(40),o=n(3)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){var r=n(84),i=n(28),o=n(3)("toStringTag"),l="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:l?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r=n(6);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},function(e,t,n){var r=n(3)("iterator"),i=!1;try{var o=0,l={next:function(){return{done:!!o++}},return:function(){i=!0}};l[r]=function(){return this},Array.from(l,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){var r,i,o,l=n(1),a=n(2),u=n(56),s=n(114),c=n(76),f=n(127),p=n(36),v=l.location,h=l.setImmediate,m=l.clearImmediate,g=l.process,d=l.MessageChannel,b=l.Dispatch,y=0,_={},w=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},x=function(e){return function(){w(e)}},k=function(e){w(e.data)},P=function(e){l.postMessage(e+"",v.protocol+"//"+v.host)};h&&m||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++y]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(y),y},m=function(e){delete _[e]},p?r=function(e){g.nextTick(x(e))}:b&&b.now?r=function(e){b.now(x(e))}:d&&!f?(o=(i=new d).port2,i.port1.onmessage=k,r=u(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts&&v&&"file:"!==v.protocol&&!a(P)?(r=P,l.addEventListener("message",k,!1)):r="onreadystatechange"in c("script")?function(e){s.appendChild(c("script")).onreadystatechange=function(){s.removeChild(this),w(e)}}:function(e){setTimeout(x(e),0)}),e.exports={set:h,clear:m}},function(e,t,n){var r=n(51);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){var r=n(6),i=n(4),o=n(129);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(23),i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(e){a=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),l=new k(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return E()}for(n.method=i,n.arg=o;;){var l=n.delegate;if(l){var a=_(l,n);if(a){if(a===c)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=s(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,l),o}function s(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function p(){}function v(){}var h={};h[i]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(P([])));g&&g!==t&&n.call(g,i)&&(h=g);var d=v.prototype=f.prototype=Object.create(h);function b(e){["next","throw","return"].forEach((function(t){a(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){var r;this._invoke=function(i,o){function l(){return new t((function(r,l){!function r(i,o,l,a){var u=s(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,l,a)}),(function(e){r("throw",e,l,a)})):t.resolve(f).then((function(e){c.value=e,l(c)}),(function(e){return r("throw",e,l,a)}))}a(u.arg)}(i,o,r,l)}))}return r=r?r.then(l,l):l()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=s(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function P(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=d.constructor=v,v.constructor=p,p.displayName=a(v,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,a(e,l,"GeneratorFunction")),e.prototype=Object.create(d),e},e.awrap=function(e){return{__await:e}},b(y.prototype),y.prototype[o]=function(){return this},e.AsyncIterator=y,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var l=new y(u(t,n,r,i),o);return e.isGeneratorFunction(n)?l:l.next().then((function(e){return e.done?e.value:l.next()}))},b(d),a(d,l,"Generator"),d[i]=function(){return this},d.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return l.type="throw",l.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],l=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(53),i=n(20),o=function(e){return function(t,n){var o,l,a=String(i(t)),u=r(n),s=a.length;return u<0||u>=s?e?"":void 0:(o=a.charCodeAt(u))<55296||o>56319||u+1===s||(l=a.charCodeAt(u+1))<56320||l>57343?e?a.charAt(u):o:e?a.slice(u,u+2):l-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(4),i=n(41),o=n(3)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(0),i=n(5),o=n(117),l=n(10),a=n(22),u=n(58);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=l(e),i=a.f,s=o(r),c={},f=0;s.length>f;)void 0!==(n=i(r,t=s[f++]))&&u(c,t,n);return c}})},function(e,t,n){var r=n(0),i=n(2),o=n(12),l=n(83),a=n(119);r({target:"Object",stat:!0,forced:i((function(){l(1)})),sham:!a},{getPrototypeOf:function(e){return l(o(e))}})},function(e,t,n){"use strict";var r=n(32).forEach,i=n(42)("forEach");e.exports=i?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){var r=n(2);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){var r=n(3);t.f=r},function(e,t,n){var r=n(109),i=n(8),o=n(138),l=n(7).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||l(t,e,{value:o.f(e)})}},function(e,t,n){var r=n(0),i=n(208);r({target:"Array",stat:!0,forced:!n(125)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){n(0)({target:"Object",stat:!0,sham:!n(5)},{create:n(38)})},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t){var n="object"==typeof global&&global&&global.Object===Object&&global;e.exports=n},function(e,t,n){var r=n(61),i=n(224),o=n(225),l=n(226),a=n(227),u=n(228);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=i,s.prototype.delete=o,s.prototype.get=l,s.prototype.has=a,s.prototype.set=u,e.exports=s},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(33),i=n(88);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(245),i=n(27);e.exports=function e(t,n,o,l,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,l,e,a))}},function(e,t,n){var r=n(150),i=n(248),o=n(151);e.exports=function(e,t,n,l,a,u){var s=1&n,c=e.length,f=t.length;if(c!=f&&!(s&&f>c))return!1;var p=u.get(e),v=u.get(t);if(p&&v)return p==t&&v==e;var h=-1,m=!0,g=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var d=e[h],b=t[h];if(l)var y=s?l(b,d,h,t,e,u):l(d,b,h,e,t,u);if(void 0!==y){if(y)continue;m=!1;break}if(g){if(!i(t,(function(e,t){if(!o(g,t)&&(d===e||a(d,e,n,l,u)))return g.push(t)}))){m=!1;break}}else if(d!==b&&!a(d,b,n,l,u)){m=!1;break}}return u.delete(e),u.delete(t),m}},function(e,t,n){var r=n(89),i=n(246),o=n(247);function l(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}l.prototype.add=l.prototype.push=i,l.prototype.has=o,e.exports=l},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(258),i=n(264),o=n(157);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){(function(e){var r=n(17),i=n(260),o=t&&!t.nodeType&&t,l=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=l&&l.exports===o?r.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u}).call(this,n(154)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(261),i=n(262),o=n(263),l=o&&o.isTypedArray,a=l?i(l):r;e.exports=a},function(e,t,n){var r=n(146),i=n(91);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(24)(n(17),"Set");e.exports=r},function(e,t,n){var r=n(88);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(162),i=n(65);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},function(e,t,n){var r=n(15),i=n(92),o=n(274),l=n(277);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(l(e))}},function(e,t,n){},function(e,t,n){n(0)({target:"Object",stat:!0},{setPrototypeOf:n(100)})},function(e,t,n){var r=n(0),i=n(19),o=n(23),l=n(6),a=n(4),u=n(38),s=n(311),c=n(2),f=i("Reflect","construct"),p=c((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),v=!c((function(){f((function(){}))})),h=p||v;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){o(e),l(t);var n=arguments.length<3?e:o(arguments[2]);if(v&&!p)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(s.apply(e,r))}var i=n.prototype,c=u(a(i)?i:Object.prototype),h=Function.apply.call(e,c,t);return a(h)?h:c}})},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(211),i=n(216),o=n(286),l=n(294),a=n(303),u=n(184),s=o((function(e){var t=u(e);return a(t)&&(t=void 0),l(r(e,1,a,!0),i(t,2))}));e.exports=s},function(e,t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,a="object"==typeof global&&global&&global.Object===Object&&global,u="object"==typeof self&&self&&self.Object===Object&&self,s=a||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,p=Math.min,v=function(){return s.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(h(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=h(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var a=i.test(e);return a||o.test(e)?l(e.slice(2),a?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,l,a,u,s=0,c=!1,g=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,o=i;return r=i=void 0,s=t,l=e.apply(o,n)}function y(e){return s=e,a=setTimeout(w,t),c?b(e):l}function _(e){var n=e-u;return void 0===u||n>=t||n<0||g&&e-s>=o}function w(){var e=v();if(_(e))return x(e);a=setTimeout(w,function(e){var n=t-(e-u);return g?p(n,o-(e-s)):n}(e))}function x(e){return a=void 0,d&&r?b(e):(r=i=void 0,l)}function k(){var e=v(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===a)return y(u);if(g)return a=setTimeout(w,t),b(u)}return void 0===a&&(a=setTimeout(w,t)),l}return t=m(t)||0,h(n)&&(c=!!n.leading,o=(g="maxWait"in n)?f(m(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),k.cancel=function(){void 0!==a&&clearTimeout(a),s=0,r=u=i=a=void 0},k.flush=function(){return void 0===a?l:x(v())},k}},function(e,t,n){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}n(29),n(43),n(9),n(60),n(13),n(16),e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(0),i=n(78).indexOf,o=n(42),l=[].indexOf,a=!!l&&1/[1].indexOf(1,-0)<0,u=o("indexOf");r({target:"Array",proto:!0,forced:a||!u},{indexOf:function(e){return a?l.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(4),i=n(28),o=n(3)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";n(30);var r=n(18),i=n(2),o=n(3),l=n(72),a=n(11),u=o("species"),s=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c="$0"==="a".replace(/./,"$0"),f=o("replace"),p=!!/./[f]&&""===/./[f]("a","$0"),v=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=o(e),m=!i((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),g=m&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!m||!g||"replace"===e&&(!s||!c||p)||"split"===e&&!v){var d=/./[h],b=n(h,""[e],(function(e,t,n,r,i){return t.exec===l?m&&!i?{done:!0,value:d.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:c,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),y=b[0],_=b[1];r(String.prototype,e,y),r(RegExp.prototype,h,2==t?function(e,t){return _.call(e,this,t)}:function(e){return _.call(e,this)})}f&&a(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var r=n(6);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(131).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(28),i=n(72);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";var r=n(0),i=n(34),o=n(10),l=n(42),a=[].join,u=i!=Object,s=l("join",",");r({target:"Array",proto:!0,forced:u||!s},{join:function(e){return a.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(0),i=n(306);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(e,t,n){"use strict";var r=n(19),i=n(7),o=n(3),l=n(5),a=o("species");e.exports=function(e){var t=r(e),n=i.f;l&&t&&!t[a]&&n(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(2);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var r=n(0),i=n(78).includes,o=n(98);r({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";var r=n(0),i=n(102),o=n(20);r({target:"String",proto:!0,forced:!n(103)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(161);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},function(e,t,n){var r=n(20),i="["+n(106)+"]",o=RegExp("^"+i+i+"*"),l=RegExp(i+i+"*$"),a=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(l,"")),n}};e.exports={start:a(1),end:a(2),trim:a(3)}},function(e,t,n){e.exports=n(314)},function(e,t,n){var r=n(1),i=n(80),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},function(e,t,n){"use strict";var r=n(118).IteratorPrototype,i=n(38),o=n(35),l=n(55),a=n(40),u=function(){return this};e.exports=function(e,t,n){var s=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),l(e,s,!1,!0),a[s]=u,e}},function(e,t,n){var r=n(4);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r,i,o,l,a=n(0),u=n(21),s=n(1),c=n(19),f=n(120),p=n(18),v=n(191),h=n(55),m=n(179),g=n(4),d=n(23),b=n(192),y=n(80),_=n(193),w=n(125),x=n(101),k=n(126).set,P=n(194),E=n(128),S=n(196),O=n(129),j=n(197),A=n(31),C=n(99),L=n(3),$=n(36),T=n(37),R=L("species"),M="Promise",I=A.get,D=A.set,N=A.getterFor(M),F=f,B=s.TypeError,U=s.document,z=s.process,V=c("fetch"),q=O.f,H=q,G=!!(U&&U.createEvent&&s.dispatchEvent),W="function"==typeof PromiseRejectionEvent,K=C(M,(function(){if(!(y(F)!==String(F))){if(66===T)return!0;if(!$&&!W)return!0}if(u&&!F.prototype.finally)return!0;if(T>=51&&/native code/.test(F))return!1;var e=F.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[R]=t,!(e.then((function(){}))instanceof t)})),J=K||!w((function(e){F.all(e).catch((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},Y=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;P((function(){for(var r=e.value,i=1==e.state,o=0;n.length>o;){var l,a,u,s=n[o++],c=i?s.ok:s.fail,f=s.resolve,p=s.reject,v=s.domain;try{c?(i||(2===e.rejection&&te(e),e.rejection=1),!0===c?l=r:(v&&v.enter(),l=c(r),v&&(v.exit(),u=!0)),l===s.promise?p(B("Promise-chain cycle")):(a=X(l))?a.call(l,f,p):f(l)):p(r)}catch(e){v&&!u&&v.exit(),p(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&Z(e)}))}},Q=function(e,t,n){var r,i;G?((r=U.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),s.dispatchEvent(r)):r={promise:t,reason:n},!W&&(i=s["on"+e])?i(r):"unhandledrejection"===e&&S("Unhandled promise rejection",n)},Z=function(e){k.call(s,(function(){var t,n=e.facade,r=e.value;if(ee(e)&&(t=j((function(){$?z.emit("unhandledRejection",r,n):Q("unhandledrejection",n,r)})),e.rejection=$||ee(e)?2:1,t.error))throw t.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e){k.call(s,(function(){var t=e.facade;$?z.emit("rejectionHandled",t):Q("rejectionhandled",t,e.value)}))},ne=function(e,t,n){return function(r){e(t,r,n)}},re=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Y(e,!0))},ie=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw B("Promise can't be resolved itself");var r=X(t);r?P((function(){var n={done:!1};try{r.call(t,ne(ie,n,e),ne(re,n,e))}catch(t){re(n,t,e)}})):(e.value=t,e.state=1,Y(e,!1))}catch(t){re({done:!1},t,e)}}};K&&(F=function(e){b(this,F,M),d(e),r.call(this);var t=I(this);try{e(ne(ie,t),ne(re,t))}catch(e){re(t,e)}},(r=function(e){D(this,{type:M,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=v(F.prototype,{then:function(e,t){var n=N(this),r=q(x(this,F));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=$?z.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Y(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=I(e);this.promise=e,this.resolve=ne(ie,t),this.reject=ne(re,t)},O.f=q=function(e){return e===F||e===o?new i(e):H(e)},u||"function"!=typeof f||(l=f.prototype.then,p(f.prototype,"then",(function(e,t){var n=this;return new F((function(e,t){l.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof V&&a({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return E(F,V.apply(s,arguments))}}))),a({global:!0,wrap:!0,forced:K},{Promise:F}),h(F,M,!1,!0),m(M),o=c(M),a({target:M,stat:!0,forced:K},{reject:function(e){var t=q(this);return t.reject.call(void 0,e),t.promise}}),a({target:M,stat:!0,forced:u||K},{resolve:function(e){return E(u&&this===o?F:this,e)}}),a({target:M,stat:!0,forced:J},{all:function(e){var t=this,n=q(t),r=n.resolve,i=n.reject,o=j((function(){var n=d(t.resolve),o=[],l=0,a=1;_(e,(function(e){var u=l++,s=!1;o.push(void 0),a++,n.call(t,e).then((function(e){s||(s=!0,o[u]=e,--a||r(o))}),i)})),--a||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=q(t),r=n.reject,i=j((function(){var i=d(t.resolve);_(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r=n(18);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(6),i=n(121),o=n(14),l=n(56),a=n(122),u=n(124),s=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var c,f,p,v,h,m,g,d=n&&n.that,b=!(!n||!n.AS_ENTRIES),y=!(!n||!n.IS_ITERATOR),_=!(!n||!n.INTERRUPTED),w=l(t,d,1+b+_),x=function(e){return c&&u(c),new s(!0,e)},k=function(e){return b?(r(e),_?w(e[0],e[1],x):w(e[0],e[1])):_?w(e,x):w(e)};if(y)c=e;else{if("function"!=typeof(f=a(e)))throw TypeError("Target is not iterable");if(i(f)){for(p=0,v=o(e.length);v>p;p++)if((h=k(e[p]))&&h instanceof s)return h;return new s(!1)}c=f.call(e)}for(m=c.next;!(g=m.call(c)).done;){try{h=k(g.value)}catch(e){throw u(c),e}if("object"==typeof h&&h&&h instanceof s)return h}return new s(!1)}},function(e,t,n){var r,i,o,l,a,u,s,c,f=n(1),p=n(22).f,v=n(126).set,h=n(127),m=n(195),g=n(36),d=f.MutationObserver||f.WebKitMutationObserver,b=f.document,y=f.process,_=f.Promise,w=p(f,"queueMicrotask"),x=w&&w.value;x||(r=function(){var e,t;for(g&&(e=y.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?l():o=void 0,e}}o=void 0,e&&e.enter()},h||g||m||!d||!b?_&&_.resolve?(s=_.resolve(void 0),c=s.then,l=function(){c.call(s,r)}):l=g?function(){y.nextTick(r)}:function(){v.call(f,r)}:(a=!0,u=b.createTextNode(""),new d(r).observe(u,{characterData:!0}),l=function(){u.data=a=!a})),e.exports=x||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,l()),o=t}},function(e,t,n){var r=n(51);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){var r=n(1);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){var r=n(0),i=n(199);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){"use strict";var r=n(5),i=n(2),o=n(52),l=n(82),a=n(81),u=n(12),s=n(34),c=Object.assign,f=Object.defineProperty;e.exports=!c||i((function(){if(r&&1!==c({b:1},c(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,f=l.f,p=a.f;i>c;)for(var v,h=s(arguments[c++]),m=f?o(h).concat(f(h)):o(h),g=m.length,d=0;g>d;)v=m[d++],r&&!p.call(h,v)||(n[v]=h[v]);return n}:c},function(e,t,n){"use strict";var r=n(0),i=n(21),o=n(120),l=n(2),a=n(19),u=n(101),s=n(128),c=n(18);r({target:"Promise",proto:!0,real:!0,forced:!!o&&l((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,a("Promise")),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||c(o.prototype,"finally",a("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(84),i=n(123);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(e,t,n){"use strict";var r=n(0),i=n(203).left,o=n(42),l=n(37),a=n(36);r({target:"Array",proto:!0,forced:!o("reduce")||!a&&l>79&&l<83},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(23),i=n(12),o=n(34),l=n(14),a=function(e){return function(t,n,a,u){r(n);var s=i(t),c=o(s),f=l(s.length),p=e?f-1:0,v=e?-1:1;if(a<2)for(;;){if(p in c){u=c[p],p+=v;break}if(p+=v,e?p<0:f<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:f>p;p+=v)p in c&&(u=n(u,c[p],p,s));return u}};e.exports={left:a(!1),right:a(!0)}},function(e,t,n){"use strict";var r,i=n(0),o=n(22).f,l=n(14),a=n(102),u=n(20),s=n(103),c=n(21),f="".startsWith,p=Math.min,v=s("startsWith");i({target:"String",proto:!0,forced:!!(c||v||(r=o(String.prototype,"startsWith"),!r||r.writable))&&!v},{startsWith:function(e){var t=String(u(this));a(e);var n=l(p(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return f?f.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){var r=n(0),i=n(137),o=n(2),l=n(4),a=n(206).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(e){return u&&l(e)?u(a(e)):e}})},function(e,t,n){var r=n(39),i=n(4),o=n(8),l=n(7).f,a=n(50),u=n(137),s=a("meta"),c=0,f=Object.isExtensible||function(){return!0},p=function(e){l(e,s,{value:{objectID:"O"+ ++c,weakData:{}}})},v=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,s)){if(!f(e))return"F";if(!t)return"E";p(e)}return e[s].objectID},getWeakData:function(e,t){if(!o(e,s)){if(!f(e))return!0;if(!t)return!1;p(e)}return e[s].weakData},onFreeze:function(e){return u&&v.REQUIRED&&f(e)&&!o(e,s)&&p(e),e}};r[s]=!0},function(e,t,n){var r=n(10),i=n(71).f,o={}.toString,l="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return l&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return l.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(56),i=n(12),o=n(209),l=n(121),a=n(14),u=n(58),s=n(122);e.exports=function(e){var t,n,c,f,p,v,h=i(e),m="function"==typeof this?this:Array,g=arguments.length,d=g>1?arguments[1]:void 0,b=void 0!==d,y=s(h),_=0;if(b&&(d=r(d,g>2?arguments[2]:void 0,2)),null==y||m==Array&&l(y))for(n=new m(t=a(h.length));t>_;_++)v=b?d(h[_],_):h[_],u(n,_,v);else for(p=(f=y.call(h)).next,n=new m;!(c=p.call(f)).done;_++)v=b?o(f,d,[c.value,_],!0):c.value,u(n,_,v);return n.length=_,n}},function(e,t,n){var r=n(6),i=n(124);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){throw i(e),t}}},function(e,t,n){var r=n(12),i=Math.floor,o="".replace,l=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,u,s,c){var f=n+e.length,p=u.length,v=a;return void 0!==s&&(s=r(s),v=l),o.call(c,v,(function(r,o){var l;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(f);case"<":l=s[o.slice(1,-1)];break;default:var a=+o;if(0===a)return r;if(a>p){var c=i(a/10);return 0===c?r:c<=p?void 0===u[c-1]?o.charAt(1):u[c-1]+o.charAt(1):r}l=u[a-1]}return void 0===l?"":l}))}},function(e,t,n){var r=n(142),i=n(212);e.exports=function e(t,n,o,l,a){var u=-1,s=t.length;for(o||(o=i),a||(a=[]);++u<s;){var c=t[u];n>0&&o(c)?n>1?e(c,n-1,o,l,a):r(a,c):l||(a[a.length]=c)}return a}},function(e,t,n){var r=n(44),i=n(86),o=n(15),l=r?r.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(l&&e&&e[l])}},function(e,t,n){var r=n(33),i=n(27);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t,n){var r=n(44),i=Object.prototype,o=i.hasOwnProperty,l=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=l.call(e);return r&&(t?e[a]=n:delete e[a]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(217),i=n(273),o=n(94),l=n(15),a=n(283);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?l(e)?i(e[0],e[1]):r(e):a(e)}},function(e,t,n){var r=n(218),i=n(272),o=n(160);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(144),i=n(148);e.exports=function(e,t,n,o){var l=n.length,a=l,u=!o;if(null==e)return!a;for(e=Object(e);l--;){var s=n[l];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++l<a;){var c=(s=n[l])[0],f=e[c],p=s[1];if(u&&s[2]){if(void 0===f&&!(c in e))return!1}else{var v=new r;if(o)var h=o(f,p,c,e,t,v);if(!(void 0===h?i(p,f,3,o,v):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(62),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(62);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(62);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(62);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(61);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(61),i=n(87),o=n(89);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var l=n.__data__;if(!i||l.length<199)return l.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(l)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(146),i=n(230),o=n(88),l=n(147),a=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,c=u.toString,f=s.hasOwnProperty,p=RegExp("^"+c.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?p:a).test(l(e))}},function(e,t,n){var r,i=n(231),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(17)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(234),i=n(61),o=n(87);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(235),i=n(236),o=n(237),l=n(238),a=n(239);function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=l,u.prototype.set=a,e.exports=u},function(e,t,n){var r=n(63);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(63),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(63),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(63);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(64);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(64);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(64);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(64);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t,n){var r=n(144),i=n(149),o=n(249),l=n(252),a=n(268),u=n(15),s=n(153),c=n(156),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,h,m){var g=u(e),d=u(t),b=g?"[object Array]":a(e),y=d?"[object Array]":a(t),_=(b="[object Arguments]"==b?f:b)==f,w=(y="[object Arguments]"==y?f:y)==f,x=b==y;if(x&&s(e)){if(!s(t))return!1;g=!0,_=!1}if(x&&!_)return m||(m=new r),g||c(e)?i(e,t,n,v,h,m):o(e,t,b,n,v,h,m);if(!(1&n)){var k=_&&p.call(e,"__wrapped__"),P=w&&p.call(t,"__wrapped__");if(k||P){var E=k?e.value():e,S=P?t.value():t;return m||(m=new r),h(E,S,n,v,m)}}return!!x&&(m||(m=new r),l(e,t,n,v,h,m))}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){var r=n(44),i=n(250),o=n(145),l=n(149),a=n(251),u=n(90),s=r?r.prototype:void 0,c=s?s.valueOf:void 0;e.exports=function(e,t,n,r,s,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var v=a;case"[object Set]":var h=1&r;if(v||(v=u),e.size!=t.size&&!h)return!1;var m=p.get(e);if(m)return m==t;r|=2,p.set(e,t);var g=l(v(e),v(t),r,s,f,p);return p.delete(e),g;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},function(e,t,n){var r=n(17).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t,n){var r=n(253),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,l,a){var u=1&n,s=r(e),c=s.length;if(c!=r(t).length&&!u)return!1;for(var f=c;f--;){var p=s[f];if(!(u?p in t:i.call(t,p)))return!1}var v=a.get(e),h=a.get(t);if(v&&h)return v==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=u;++f<c;){var d=e[p=s[f]],b=t[p];if(o)var y=u?o(b,d,p,t,e,a):o(d,b,p,e,t,a);if(!(void 0===y?d===b||l(d,b,n,o,a):y)){m=!1;break}g||(g="constructor"==p)}if(m&&!g){var _=e.constructor,w=t.constructor;_==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w||(m=!1)}return a.delete(e),a.delete(t),m}},function(e,t,n){var r=n(254),i=n(255),o=n(152);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(142),i=n(15);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(256),i=n(257),o=Object.prototype.propertyIsEnumerable,l=Object.getOwnPropertySymbols,a=l?function(e){return null==e?[]:(e=Object(e),r(l(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var l=e[n];t(l,n,e)&&(o[i++]=l)}return o}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(259),i=n(86),o=n(15),l=n(153),a=n(155),u=n(156),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),c=!n&&i(e),f=!n&&!c&&l(e),p=!n&&!c&&!f&&u(e),v=n||c||f||p,h=v?r(e.length,String):[],m=h.length;for(var g in e)!t&&!s.call(e,g)||v&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||h.push(g);return h}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(33),i=n(91),o=n(27),l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l["[object Arguments]"]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l["[object Function]"]=l["[object Map]"]=l["[object Number]"]=l["[object Object]"]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!l[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(143),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,l=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||l&&l.binding&&l.binding("util")}catch(e){}}();e.exports=a}).call(this,n(154)(e))},function(e,t,n){var r=n(265),i=n(266),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(267)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(269),i=n(87),o=n(270),l=n(158),a=n(271),u=n(33),s=n(147),c=s(r),f=s(i),p=s(o),v=s(l),h=s(a),m=u;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||o&&"[object Promise]"!=m(o.resolve())||l&&"[object Set]"!=m(new l)||a&&"[object WeakMap]"!=m(new a))&&(m=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case c:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case v:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var r=n(24)(n(17),"DataView");e.exports=r},function(e,t,n){var r=n(24)(n(17),"Promise");e.exports=r},function(e,t,n){var r=n(24)(n(17),"WeakMap");e.exports=r},function(e,t,n){var r=n(159),i=n(152);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],l=e[o];t[n]=[o,l,r(l)]}return t}},function(e,t,n){var r=n(148),i=n(183),o=n(280),l=n(92),a=n(159),u=n(160),s=n(65);e.exports=function(e,t){return l(e)&&a(t)?u(s(e),t):function(n){var l=i(n,e);return void 0===l&&l===t?o(n,e):r(t,l,3)}}},function(e,t,n){var r=n(275),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,l=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=l},function(e,t,n){var r=n(276);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(89);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var l=e.apply(this,r);return n.cache=o.set(i,l)||o,l};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},function(e,t,n){var r=n(278);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){var r=n(44),i=n(279),o=n(15),l=n(93),a=r?r.prototype:void 0,u=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(l(t))return u?u.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(281),i=n(282);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(162),i=n(86),o=n(15),l=n(155),a=n(91),u=n(65);e.exports=function(e,t,n){for(var s=-1,c=(t=r(t,e)).length,f=!1;++s<c;){var p=u(t[s]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++s!=c?f:!!(c=null==e?0:e.length)&&a(c)&&l(p,c)&&(o(e)||i(e))}},function(e,t,n){var r=n(284),i=n(285),o=n(92),l=n(65);e.exports=function(e){return o(e)?r(l(e)):i(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(161);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(94),i=n(287),o=n(289);e.exports=function(e,t){return o(i(e,t,r),e+"")}},function(e,t,n){var r=n(288),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,l=-1,a=i(o.length-t,0),u=Array(a);++l<a;)u[l]=o[t+l];l=-1;for(var s=Array(t+1);++l<t;)s[l]=o[l];return s[t]=n(u),r(e,this,s)}}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(290),i=n(293)(r);e.exports=i},function(e,t,n){var r=n(291),i=n(292),o=n(94),l=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=l},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var r=n(24),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(150),i=n(295),o=n(300),l=n(151),a=n(301),u=n(90);e.exports=function(e,t,n){var s=-1,c=i,f=e.length,p=!0,v=[],h=v;if(n)p=!1,c=o;else if(f>=200){var m=t?null:a(e);if(m)return u(m);p=!1,c=l,h=new r}else h=t?[]:v;e:for(;++s<f;){var g=e[s],d=t?t(g):g;if(g=n||0!==g?g:0,p&&d==d){for(var b=h.length;b--;)if(h[b]===d)continue e;t&&h.push(d),v.push(g)}else c(h,d,n)||(h!==v&&h.push(d),v.push(g))}return v}},function(e,t,n){var r=n(296);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(297),i=n(298),o=n(299);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},function(e,t){e.exports=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}},function(e,t,n){var r=n(158),i=n(302),o=n(90),l=r&&1/o(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=l},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(157),i=n(27);e.exports=function(e){return i(e)&&r(e)}},function(e,t,n){var r=n(0),i=n(2),o=n(10),l=n(22).f,a=n(5),u=i((function(){l(1)}));r({target:"Object",stat:!0,forced:!a||u,sham:!a},{getOwnPropertyDescriptor:function(e,t){return l(o(e),t)}})},function(e,t,n){var r=n(0),i=n(5);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(111)})},function(e,t,n){var r=n(1),i=n(185).trim,o=n(106),l=r.parseInt,a=/^[+-]?0[Xx]/,u=8!==l(o+"08")||22!==l(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return l(n,t>>>0||(a.test(n)?16:10))}:l},function(e,t,n){"use strict";n(163)},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";var r=n(23),i=n(4),o=[].slice,l={},a=function(e,t,n){if(!(t in l)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";l[t]=Function("C,a","return new C("+r.join(",")+")")}return l[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=o.call(arguments,1),l=function(){var r=n.concat(o.call(arguments));return this instanceof l?a(t,r.length,r):t.apply(e,r)};return i(t.prototype)&&(l.prototype=t.prototype),l}},function(e,t,n){"use strict";n(166)},function(e,t,n){"use strict";n(167)},function(e,t,n){"use strict";n.r(t);n(107),n(190),n(198),n(200),n(9);function r(e,t,n,r,i,o,l){try{var a=e[o](l),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var l=e.apply(t,n);function a(e){r(l,i,o,a,u,"next",e)}function u(e){r(l,i,o,a,u,"throw",e)}a(void 0)}))}}n(130),n(57),n(13),n(16),n(68),n(26);var o=Object.freeze({});function l(e){return null==e}function a(e){return null!=e}function u(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function c(e){return null!==e&&"object"==typeof e}var f=Object.prototype.toString;function p(e){return"[object Object]"===f.call(e)}function v(e){return"[object RegExp]"===f.call(e)}function h(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function m(e){return a(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function g(e){return null==e?"":Array.isArray(e)||p(e)&&e.toString===f?JSON.stringify(e,null,2):String(e)}function d(e){var t=parseFloat(e);return isNaN(t)?e:t}function b(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}b("slot,component",!0);var y=b("key,ref,slot,slot-scope,is");function _(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var w=Object.prototype.hasOwnProperty;function x(e,t){return w.call(e,t)}function k(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var P=/-(\w)/g,E=k((function(e){return e.replace(P,(function(e,t){return t?t.toUpperCase():""}))})),S=k((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),O=/\B([A-Z])/g,j=k((function(e){return e.replace(O,"-$1").toLowerCase()}));var A=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function C(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function L(e,t){for(var n in t)e[n]=t[n];return e}function $(e){for(var t={},n=0;n<e.length;n++)e[n]&&L(t,e[n]);return t}function T(e,t,n){}var R=function(e,t,n){return!1},M=function(e){return e};function I(e,t){if(e===t)return!0;var n=c(e),r=c(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var i=Array.isArray(e),o=Array.isArray(t);if(i&&o)return e.length===t.length&&e.every((function(e,n){return I(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(i||o)return!1;var l=Object.keys(e),a=Object.keys(t);return l.length===a.length&&l.every((function(n){return I(e[n],t[n])}))}catch(e){return!1}}function D(e,t){for(var n=0;n<e.length;n++)if(I(e[n],t))return n;return-1}function N(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var F=["component","directive","filter"],B=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],U={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:R,isReservedAttr:R,isUnknownElement:R,getTagNamespace:T,parsePlatformTagName:M,mustUseProp:R,async:!0,_lifecycleHooks:B},z=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function V(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var q=new RegExp("[^"+z.source+".$_\\d]");var H,G="__proto__"in{},W="undefined"!=typeof window,K="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,J=K&&WXEnvironment.platform.toLowerCase(),X=W&&window.navigator.userAgent.toLowerCase(),Y=X&&/msie|trident/.test(X),Q=X&&X.indexOf("msie 9.0")>0,Z=X&&X.indexOf("edge/")>0,ee=(X&&X.indexOf("android"),X&&/iphone|ipad|ipod|ios/.test(X)||"ios"===J),te=(X&&/chrome\/\d+/.test(X),X&&/phantomjs/.test(X),X&&X.match(/firefox\/(\d+)/)),ne={}.watch,re=!1;if(W)try{var ie={};Object.defineProperty(ie,"passive",{get:function(){re=!0}}),window.addEventListener("test-passive",null,ie)}catch(e){}var oe=function(){return void 0===H&&(H=!W&&!K&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),H},le=W&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"==typeof e&&/native code/.test(e.toString())}var ue,se="undefined"!=typeof Symbol&&ae(Symbol)&&"undefined"!=typeof Reflect&&ae(Reflect.ownKeys);ue="undefined"!=typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ce=T,fe=0,pe=function(){this.id=fe++,this.subs=[]};pe.prototype.addSub=function(e){this.subs.push(e)},pe.prototype.removeSub=function(e){_(this.subs,e)},pe.prototype.depend=function(){pe.target&&pe.target.addDep(this)},pe.prototype.notify=function(){var e=this.subs.slice();for(var t=0,n=e.length;t<n;t++)e[t].update()},pe.target=null;var ve=[];function he(e){ve.push(e),pe.target=e}function me(){ve.pop(),pe.target=ve[ve.length-1]}var ge=function(e,t,n,r,i,o,l,a){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=l,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},de={child:{configurable:!0}};de.child.get=function(){return this.componentInstance},Object.defineProperties(ge.prototype,de);var be=function(e){void 0===e&&(e="");var t=new ge;return t.text=e,t.isComment=!0,t};function ye(e){return new ge(void 0,void 0,void 0,String(e))}function _e(e){var t=new ge(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var we=Array.prototype,xe=Object.create(we);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=we[e];V(xe,e,(function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=t.apply(this,n),l=this.__ob__;switch(e){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&l.observeArray(i),l.dep.notify(),o}))}));var ke=Object.getOwnPropertyNames(xe),Pe=!0;function Ee(e){Pe=e}var Se=function(e){var t;this.value=e,this.dep=new pe,this.vmCount=0,V(e,"__ob__",this),Array.isArray(e)?(G?(t=xe,e.__proto__=t):function(e,t,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];V(e,o,t[o])}}(e,xe,ke),this.observeArray(e)):this.walk(e)};function Oe(e,t){var n;if(c(e)&&!(e instanceof ge))return x(e,"__ob__")&&e.__ob__ instanceof Se?n=e.__ob__:Pe&&!oe()&&(Array.isArray(e)||p(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new Se(e)),t&&n&&n.vmCount++,n}function je(e,t,n,r,i){var o=new pe,l=Object.getOwnPropertyDescriptor(e,t);if(!l||!1!==l.configurable){var a=l&&l.get,u=l&&l.set;a&&!u||2!==arguments.length||(n=e[t]);var s=!i&&Oe(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=a?a.call(e):n;return pe.target&&(o.depend(),s&&(s.dep.depend(),Array.isArray(t)&&Le(t))),t},set:function(t){var r=a?a.call(e):n;t===r||t!=t&&r!=r||a&&!u||(u?u.call(e,t):n=t,s=!i&&Oe(t),o.notify())}})}}function Ae(e,t,n){if(Array.isArray(e)&&h(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(je(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function Ce(e,t){if(Array.isArray(e)&&h(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount||x(e,t)&&(delete e[t],n&&n.dep.notify())}}function Le(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&Le(t)}Se.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)je(e,t[n])},Se.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Oe(e[t])};var $e=U.optionMergeStrategies;function Te(e,t){if(!t)return e;for(var n,r,i,o=se?Reflect.ownKeys(t):Object.keys(t),l=0;l<o.length;l++)"__ob__"!==(n=o[l])&&(r=e[n],i=t[n],x(e,n)?r!==i&&p(r)&&p(i)&&Te(r,i):Ae(e,n,i));return e}function Re(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,i="function"==typeof e?e.call(n,n):e;return r?Te(r,i):i}:t?e?function(){return Te("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Me(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Ie(e,t,n,r){var i=Object.create(e||null);return t?L(i,t):i}$e.data=function(e,t,n){return n?Re(e,t,n):t&&"function"!=typeof t?e:Re(e,t)},B.forEach((function(e){$e[e]=Me})),F.forEach((function(e){$e[e+"s"]=Ie})),$e.watch=function(e,t,n,r){if(e===ne&&(e=void 0),t===ne&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var i={};for(var o in L(i,e),t){var l=i[o],a=t[o];l&&!Array.isArray(l)&&(l=[l]),i[o]=l?l.concat(a):Array.isArray(a)?a:[a]}return i},$e.props=$e.methods=$e.inject=$e.computed=function(e,t,n,r){if(!e)return t;var i=Object.create(null);return L(i,e),t&&L(i,t),i},$e.provide=Re;var De=function(e,t){return void 0===t?e:t};function Ne(e,t,n){if("function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,i,o={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o[E(i)]={type:null});else if(p(n))for(var l in n)i=n[l],o[E(l)]=p(i)?i:{type:i};else 0;e.props=o}}(t),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(p(n))for(var o in n){var l=n[o];r[o]=p(l)?L({from:o},l):{from:l}}else 0}}(t),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=Ne(e,t.extends,n)),t.mixins))for(var r=0,i=t.mixins.length;r<i;r++)e=Ne(e,t.mixins[r],n);var o,l={};for(o in e)a(o);for(o in t)x(e,o)||a(o);function a(r){var i=$e[r]||De;l[r]=i(e[r],t[r],n,r)}return l}function Fe(e,t,n,r){if("string"==typeof n){var i=e[t];if(x(i,n))return i[n];var o=E(n);if(x(i,o))return i[o];var l=S(o);return x(i,l)?i[l]:i[n]||i[o]||i[l]}}function Be(e,t,n,r){var i=t[e],o=!x(n,e),l=n[e],a=Ve(Boolean,i.type);if(a>-1)if(o&&!x(i,"default"))l=!1;else if(""===l||l===j(e)){var u=Ve(String,i.type);(u<0||a<u)&&(l=!0)}if(void 0===l){l=function(e,t,n){if(!x(t,"default"))return;var r=t.default;0;if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return"function"==typeof r&&"Function"!==Ue(t.type)?r.call(e):r}(r,i,e);var s=Pe;Ee(!0),Oe(l),Ee(s)}return l}function Ue(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function ze(e,t){return Ue(e)===Ue(t)}function Ve(e,t){if(!Array.isArray(t))return ze(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(ze(t[n],e))return n;return-1}function qe(e,t,n){he();try{if(t)for(var r=t;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{if(!1===i[o].call(r,e,t,n))return}catch(e){Ge(e,r,"errorCaptured hook")}}Ge(e,t,n)}finally{me()}}function He(e,t,n,r,i){var o;try{(o=n?e.apply(t,n):e.call(t))&&!o._isVue&&m(o)&&!o._handled&&(o.catch((function(e){return qe(e,r,i+" (Promise/async)")})),o._handled=!0)}catch(e){qe(e,r,i)}return o}function Ge(e,t,n){if(U.errorHandler)try{return U.errorHandler.call(null,e,t,n)}catch(t){t!==e&&We(t,null,"config.errorHandler")}We(e,t,n)}function We(e,t,n){if(!W&&!K||"undefined"==typeof console)throw e;console.error(e)}var Ke,Je=!1,Xe=[],Ye=!1;function Qe(){Ye=!1;var e=Xe.slice(0);Xe.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&ae(Promise)){var Ze=Promise.resolve();Ke=function(){Ze.then(Qe),ee&&setTimeout(T)},Je=!0}else if(Y||"undefined"==typeof MutationObserver||!ae(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Ke="undefined"!=typeof setImmediate&&ae(setImmediate)?function(){setImmediate(Qe)}:function(){setTimeout(Qe,0)};else{var et=1,tt=new MutationObserver(Qe),nt=document.createTextNode(String(et));tt.observe(nt,{characterData:!0}),Ke=function(){et=(et+1)%2,nt.data=String(et)},Je=!0}function rt(e,t){var n;if(Xe.push((function(){if(e)try{e.call(t)}catch(e){qe(e,t,"nextTick")}else n&&n(t)})),Ye||(Ye=!0,Ke()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}var it=new ue;function ot(e){!function e(t,n){var r,i,o=Array.isArray(t);if(!o&&!c(t)||Object.isFrozen(t)||t instanceof ge)return;if(t.__ob__){var l=t.__ob__.dep.id;if(n.has(l))return;n.add(l)}if(o)for(r=t.length;r--;)e(t[r],n);else for(i=Object.keys(t),r=i.length;r--;)e(t[i[r]],n)}(e,it),it.clear()}var lt=k((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function at(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return He(r,null,arguments,t,"v-on handler");for(var i=r.slice(),o=0;o<i.length;o++)He(i[o],null,e,t,"v-on handler")}return n.fns=e,n}function ut(e,t,n,r,i,o){var a,s,c,f;for(a in e)s=e[a],c=t[a],f=lt(a),l(s)||(l(c)?(l(s.fns)&&(s=e[a]=at(s,o)),u(f.once)&&(s=e[a]=i(f.name,s,f.capture)),n(f.name,s,f.capture,f.passive,f.params)):s!==c&&(c.fns=s,e[a]=c));for(a in t)l(e[a])&&r((f=lt(a)).name,t[a],f.capture)}function st(e,t,n){var r;e instanceof ge&&(e=e.data.hook||(e.data.hook={}));var i=e[t];function o(){n.apply(this,arguments),_(r.fns,o)}l(i)?r=at([o]):a(i.fns)&&u(i.merged)?(r=i).fns.push(o):r=at([i,o]),r.merged=!0,e[t]=r}function ct(e,t,n,r,i){if(a(t)){if(x(t,n))return e[n]=t[n],i||delete t[n],!0;if(x(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function ft(e){return s(e)?[ye(e)]:Array.isArray(e)?function e(t,n){var r,i,o,c,f=[];for(r=0;r<t.length;r++)l(i=t[r])||"boolean"==typeof i||(o=f.length-1,c=f[o],Array.isArray(i)?i.length>0&&(pt((i=e(i,(n||"")+"_"+r))[0])&&pt(c)&&(f[o]=ye(c.text+i[0].text),i.shift()),f.push.apply(f,i)):s(i)?pt(c)?f[o]=ye(c.text+i):""!==i&&f.push(ye(i)):pt(i)&&pt(c)?f[o]=ye(c.text+i.text):(u(t._isVList)&&a(i.tag)&&l(i.key)&&a(n)&&(i.key="__vlist"+n+"_"+r+"__"),f.push(i)));return f}(e):void 0}function pt(e){return a(e)&&a(e.text)&&!1===e.isComment}function vt(e,t){if(e){for(var n=Object.create(null),r=se?Reflect.ownKeys(e):Object.keys(e),i=0;i<r.length;i++){var o=r[i];if("__ob__"!==o){for(var l=e[o].from,a=t;a;){if(a._provided&&x(a._provided,l)){n[o]=a._provided[l];break}a=a.$parent}if(!a)if("default"in e[o]){var u=e[o].default;n[o]="function"==typeof u?u.call(t):u}else 0}}return n}}function ht(e,t){if(!e||!e.length)return{};for(var n={},r=0,i=e.length;r<i;r++){var o=e[r],l=o.data;if(l&&l.attrs&&l.attrs.slot&&delete l.attrs.slot,o.context!==t&&o.fnContext!==t||!l||null==l.slot)(n.default||(n.default=[])).push(o);else{var a=l.slot,u=n[a]||(n[a]=[]);"template"===o.tag?u.push.apply(u,o.children||[]):u.push(o)}}for(var s in n)n[s].every(mt)&&delete n[s];return n}function mt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function gt(e,t,n){var r,i=Object.keys(t).length>0,l=e?!!e.$stable:!i,a=e&&e.$key;if(e){if(e._normalized)return e._normalized;if(l&&n&&n!==o&&a===n.$key&&!i&&!n.$hasNormal)return n;for(var u in r={},e)e[u]&&"$"!==u[0]&&(r[u]=dt(t,u,e[u]))}else r={};for(var s in t)s in r||(r[s]=bt(t,s));return e&&Object.isExtensible(e)&&(e._normalized=r),V(r,"$stable",l),V(r,"$key",a),V(r,"$hasNormal",i),r}function dt(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:ft(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function bt(e,t){return function(){return e[t]}}function yt(e,t){var n,r,i,o,l;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(c(e))if(se&&e[Symbol.iterator]){n=[];for(var u=e[Symbol.iterator](),s=u.next();!s.done;)n.push(t(s.value,n.length)),s=u.next()}else for(o=Object.keys(e),n=new Array(o.length),r=0,i=o.length;r<i;r++)l=o[r],n[r]=t(e[l],l,r);return a(n)||(n=[]),n._isVList=!0,n}function _t(e,t,n,r){var i,o=this.$scopedSlots[e];o?(n=n||{},r&&(n=L(L({},r),n)),i=o(n)||t):i=this.$slots[e]||t;var l=n&&n.slot;return l?this.$createElement("template",{slot:l},i):i}function wt(e){return Fe(this.$options,"filters",e)||M}function xt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function kt(e,t,n,r,i){var o=U.keyCodes[t]||n;return i&&r&&!U.keyCodes[t]?xt(i,r):o?xt(o,e):r?j(r)!==t:void 0}function Pt(e,t,n,r,i){if(n)if(c(n)){var o;Array.isArray(n)&&(n=$(n));var l=function(l){if("class"===l||"style"===l||y(l))o=e;else{var a=e.attrs&&e.attrs.type;o=r||U.mustUseProp(t,a,l)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var u=E(l),s=j(l);u in o||s in o||(o[l]=n[l],i&&((e.on||(e.on={}))["update:"+l]=function(e){n[l]=e}))};for(var a in n)l(a)}else;return e}function Et(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Ot(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function St(e,t,n){return Ot(e,"__once__"+t+(n?"_"+n:""),!0),e}function Ot(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&jt(e[r],t+"_"+r,n);else jt(e,t,n)}function jt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function At(e,t){if(t)if(p(t)){var n=e.on=e.on?L({},e.on):{};for(var r in t){var i=n[r],o=t[r];n[r]=i?[].concat(i,o):o}}else;return e}function Ct(e,t,n,r){t=t||{$stable:!n};for(var i=0;i<e.length;i++){var o=e[i];Array.isArray(o)?Ct(o,t,n):o&&(o.proxy&&(o.fn.proxy=!0),t[o.key]=o.fn)}return r&&(t.$key=r),t}function Lt(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r&&(e[t[n]]=t[n+1])}return e}function $t(e,t){return"string"==typeof e?t+e:e}function Tt(e){e._o=St,e._n=d,e._s=g,e._l=yt,e._t=_t,e._q=I,e._i=D,e._m=Et,e._f=wt,e._k=kt,e._b=Pt,e._v=ye,e._e=be,e._u=Ct,e._g=At,e._d=Lt,e._p=$t}function Rt(e,t,n,r,i){var l,a=this,s=i.options;x(r,"_uid")?(l=Object.create(r))._original=r:(l=r,r=r._original);var c=u(s._compiled),f=!c;this.data=e,this.props=t,this.children=n,this.parent=r,this.listeners=e.on||o,this.injections=vt(s.inject,r),this.slots=function(){return a.$slots||gt(e.scopedSlots,a.$slots=ht(n,r)),a.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return gt(e.scopedSlots,this.slots())}}),c&&(this.$options=s,this.$slots=this.slots(),this.$scopedSlots=gt(e.scopedSlots,this.$slots)),s._scopeId?this._c=function(e,t,n,i){var o=Ut(l,e,t,n,i,f);return o&&!Array.isArray(o)&&(o.fnScopeId=s._scopeId,o.fnContext=r),o}:this._c=function(e,t,n,r){return Ut(l,e,t,n,r,f)}}function Mt(e,t,n,r,i){var o=_e(e);return o.fnContext=n,o.fnOptions=r,t.slot&&((o.data||(o.data={})).slot=t.slot),o}function It(e,t){for(var n in t)e[E(n)]=t[n]}Tt(Rt.prototype);var Dt={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;Dt.prepatch(n,n)}else{(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;a(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new e.componentOptions.Ctor(n)}(e,Yt)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,i){0;var l=r.data.scopedSlots,a=e.$scopedSlots,u=!!(l&&!l.$stable||a!==o&&!a.$stable||l&&e.$scopedSlots.$key!==l.$key),s=!!(i||e.$options._renderChildren||u);e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r);if(e.$options._renderChildren=i,e.$attrs=r.data.attrs||o,e.$listeners=n||o,t&&e.$options.props){Ee(!1);for(var c=e._props,f=e.$options._propKeys||[],p=0;p<f.length;p++){var v=f[p],h=e.$options.props;c[v]=Be(v,h,t,e)}Ee(!0),e.$options.propsData=t}n=n||o;var m=e.$options._parentListeners;e.$options._parentListeners=n,Xt(e,n,m),s&&(e.$slots=ht(i,r.context),e.$forceUpdate());0}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,tn(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,rn.push(t)):en(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?function e(t,n){if(n&&(t._directInactive=!0,Zt(t)))return;if(!t._inactive){t._inactive=!0;for(var r=0;r<t.$children.length;r++)e(t.$children[r]);tn(t,"deactivated")}}(t,!0):t.$destroy())}},Nt=Object.keys(Dt);function Ft(e,t,n,r,i){if(!l(e)){var s=n.$options._base;if(c(e)&&(e=s.extend(e)),"function"==typeof e){var f;if(l(e.cid)&&void 0===(e=function(e,t){if(u(e.error)&&a(e.errorComp))return e.errorComp;if(a(e.resolved))return e.resolved;var n=Vt;n&&a(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n);if(u(e.loading)&&a(e.loadingComp))return e.loadingComp;if(n&&!a(e.owners)){var r=e.owners=[n],i=!0,o=null,s=null;n.$on("hook:destroyed",(function(){return _(r,n)}));var f=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==o&&(clearTimeout(o),o=null),null!==s&&(clearTimeout(s),s=null))},p=N((function(n){e.resolved=qt(n,t),i?r.length=0:f(!0)})),v=N((function(t){a(e.errorComp)&&(e.error=!0,f(!0))})),h=e(p,v);return c(h)&&(m(h)?l(e.resolved)&&h.then(p,v):m(h.component)&&(h.component.then(p,v),a(h.error)&&(e.errorComp=qt(h.error,t)),a(h.loading)&&(e.loadingComp=qt(h.loading,t),0===h.delay?e.loading=!0:o=setTimeout((function(){o=null,l(e.resolved)&&l(e.error)&&(e.loading=!0,f(!1))}),h.delay||200)),a(h.timeout)&&(s=setTimeout((function(){s=null,l(e.resolved)&&v(null)}),h.timeout)))),i=!1,e.loading?e.loadingComp:e.resolved}}(f=e,s)))return function(e,t,n,r,i){var o=be();return o.asyncFactory=e,o.asyncMeta={data:t,context:n,children:r,tag:i},o}(f,t,n,r,i);t=t||{},Pn(e),a(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var i=t.on||(t.on={}),o=i[r],l=t.model.callback;a(o)?(Array.isArray(o)?-1===o.indexOf(l):o!==l)&&(i[r]=[l].concat(o)):i[r]=l}(e.options,t);var p=function(e,t,n){var r=t.options.props;if(!l(r)){var i={},o=e.attrs,u=e.props;if(a(o)||a(u))for(var s in r){var c=j(s);ct(i,u,s,c,!0)||ct(i,o,s,c,!1)}return i}}(t,e);if(u(e.options.functional))return function(e,t,n,r,i){var l=e.options,u={},s=l.props;if(a(s))for(var c in s)u[c]=Be(c,s,t||o);else a(n.attrs)&&It(u,n.attrs),a(n.props)&&It(u,n.props);var f=new Rt(n,u,i,r,e),p=l.render.call(null,f._c,f);if(p instanceof ge)return Mt(p,n,f.parent,l,f);if(Array.isArray(p)){for(var v=ft(p)||[],h=new Array(v.length),m=0;m<v.length;m++)h[m]=Mt(v[m],n,f.parent,l,f);return h}}(e,p,t,n,r);var v=t.on;if(t.on=t.nativeOn,u(e.options.abstract)){var h=t.slot;t={},h&&(t.slot=h)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<Nt.length;n++){var r=Nt[n],i=t[r],o=Dt[r];i===o||i&&i._merged||(t[r]=i?Bt(o,i):o)}}(t);var g=e.options.name||i;return new ge("vue-component-"+e.cid+(g?"-"+g:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:p,listeners:v,tag:i,children:r},f)}}}function Bt(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}function Ut(e,t,n,r,i,o){return(Array.isArray(n)||s(n))&&(i=r,r=n,n=void 0),u(o)&&(i=2),function(e,t,n,r,i){if(a(n)&&a(n.__ob__))return be();a(n)&&a(n.is)&&(t=n.is);if(!t)return be();0;Array.isArray(r)&&"function"==typeof r[0]&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);2===i?r=ft(r):1===i&&(r=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var o,s;if("string"==typeof t){var f;s=e.$vnode&&e.$vnode.ns||U.getTagNamespace(t),o=U.isReservedTag(t)?new ge(U.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!a(f=Fe(e.$options,"components",t))?new ge(t,n,r,void 0,void 0,e):Ft(f,n,e,r,t)}else o=Ft(t,n,e,r);return Array.isArray(o)?o:a(o)?(a(s)&&function e(t,n,r){t.ns=n,"foreignObject"===t.tag&&(n=void 0,r=!0);if(a(t.children))for(var i=0,o=t.children.length;i<o;i++){var s=t.children[i];a(s.tag)&&(l(s.ns)||u(r)&&"svg"!==s.tag)&&e(s,n,r)}}(o,s),a(n)&&function(e){c(e.style)&&ot(e.style);c(e.class)&&ot(e.class)}(n),o):be()}(e,t,n,r,i)}var zt,Vt=null;function qt(e,t){return(e.__esModule||se&&"Module"===e[Symbol.toStringTag])&&(e=e.default),c(e)?t.extend(e):e}function Ht(e){return e.isComment&&e.asyncFactory}function Gt(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(a(n)&&(a(n.componentOptions)||Ht(n)))return n}}function Wt(e,t){zt.$on(e,t)}function Kt(e,t){zt.$off(e,t)}function Jt(e,t){var n=zt;return function r(){var i=t.apply(null,arguments);null!==i&&n.$off(e,r)}}function Xt(e,t,n){zt=e,ut(t,n||{},Wt,Kt,Jt,e),zt=void 0}var Yt=null;function Qt(e){var t=Yt;return Yt=e,function(){Yt=t}}function Zt(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function en(e,t){if(t){if(e._directInactive=!1,Zt(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)en(e.$children[n]);tn(e,"activated")}}function tn(e,t){he();var n=e.$options[t],r=t+" hook";if(n)for(var i=0,o=n.length;i<o;i++)He(n[i],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),me()}var nn=[],rn=[],on={},ln=!1,an=!1,un=0;var sn=0,cn=Date.now;if(W&&!Y){var fn=window.performance;fn&&"function"==typeof fn.now&&cn()>document.createEvent("Event").timeStamp&&(cn=function(){return fn.now()})}function pn(){var e,t;for(sn=cn(),an=!0,nn.sort((function(e,t){return e.id-t.id})),un=0;un<nn.length;un++)(e=nn[un]).before&&e.before(),t=e.id,on[t]=null,e.run();var n=rn.slice(),r=nn.slice();un=nn.length=rn.length=0,on={},ln=an=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,en(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&tn(r,"updated")}}(r),le&&U.devtools&&le.emit("flush")}var vn=0,hn=function(e,t,n,r,i){this.vm=e,i&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++vn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new ue,this.newDepIds=new ue,this.expression="","function"==typeof t?this.getter=t:(this.getter=function(e){if(!q.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=T)),this.value=this.lazy?void 0:this.get()};hn.prototype.get=function(){var e;he(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;qe(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&ot(e),me(),this.cleanupDeps()}return e},hn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},hn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},hn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==on[t]){if(on[t]=!0,an){for(var n=nn.length-1;n>un&&nn[n].id>e.id;)n--;nn.splice(n+1,0,e)}else nn.push(e);ln||(ln=!0,rt(pn))}}(this)},hn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||c(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){qe(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},hn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},hn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},hn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||_(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var mn={enumerable:!0,configurable:!0,get:T,set:T};function gn(e,t,n){mn.get=function(){return this[t][n]},mn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,mn)}function dn(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},i=e.$options._propKeys=[];e.$parent&&Ee(!1);var o=function(o){i.push(o);var l=Be(o,t,n,e);je(r,o,l),o in e||gn(e,"_props",o)};for(var l in t)o(l);Ee(!0)}(e,t.props),t.methods&&function(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?T:A(t[n],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;p(t=e._data="function"==typeof t?function(e,t){he();try{return e.call(t,t)}catch(e){return qe(e,t,"data()"),{}}finally{me()}}(t,e):t||{})||(t={});var n=Object.keys(t),r=e.$options.props,i=(e.$options.methods,n.length);for(;i--;){var o=n[i];0,r&&x(r,o)||(l=void 0,36!==(l=(o+"").charCodeAt(0))&&95!==l&&gn(e,"_data",o))}var l;Oe(t,!0)}(e):Oe(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=oe();for(var i in t){var o=t[i],l="function"==typeof o?o:o.get;0,r||(n[i]=new hn(e,l||T,T,bn)),i in e||yn(e,i,o)}}(e,t.computed),t.watch&&t.watch!==ne&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)xn(e,n,r[i]);else xn(e,n,r)}}(e,t.watch)}var bn={lazy:!0};function yn(e,t,n){var r=!oe();"function"==typeof n?(mn.get=r?_n(t):wn(n),mn.set=T):(mn.get=n.get?r&&!1!==n.cache?_n(t):wn(n.get):T,mn.set=n.set||T),Object.defineProperty(e,t,mn)}function _n(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),pe.target&&t.depend(),t.value}}function wn(e){return function(){return e.call(this,this)}}function xn(e,t,n,r){return p(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var kn=0;function Pn(e){var t=e.options;if(e.super){var n=Pn(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var i in n)n[i]!==r[i]&&(t||(t={}),t[i]=n[i]);return t}(e);r&&L(e.extendOptions,r),(t=e.options=Ne(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function En(e){this._init(e)}function Sn(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,i=e._Ctor||(e._Ctor={});if(i[r])return i[r];var o=e.name||n.options.name;var l=function(e){this._init(e)};return(l.prototype=Object.create(n.prototype)).constructor=l,l.cid=t++,l.options=Ne(n.options,e),l.super=n,l.options.props&&function(e){var t=e.options.props;for(var n in t)gn(e.prototype,"_props",n)}(l),l.options.computed&&function(e){var t=e.options.computed;for(var n in t)yn(e.prototype,n,t[n])}(l),l.extend=n.extend,l.mixin=n.mixin,l.use=n.use,F.forEach((function(e){l[e]=n[e]})),o&&(l.options.components[o]=l),l.superOptions=n.options,l.extendOptions=e,l.sealedOptions=L({},l.options),i[r]=l,l}}function On(e){return e&&(e.Ctor.options.name||e.tag)}function jn(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!v(e)&&e.test(t)}function An(e,t){var n=e.cache,r=e.keys,i=e._vnode;for(var o in n){var l=n[o];if(l){var a=On(l.componentOptions);a&&!t(a)&&Cn(n,o,r,i)}}}function Cn(e,t,n,r){var i=e[t];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),e[t]=null,_(n,t)}En.prototype._init=function(e){var t=this;t._uid=kn++,t._isVue=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(t,e):t.$options=Ne(Pn(t.constructor),e||{},t),t._renderProxy=t,t._self=t,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(t),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Xt(e,t)}(t),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,r=n&&n.context;e.$slots=ht(t._renderChildren,r),e.$scopedSlots=o,e._c=function(t,n,r,i){return Ut(e,t,n,r,i,!1)},e.$createElement=function(t,n,r,i){return Ut(e,t,n,r,i,!0)};var i=n&&n.data;je(e,"$attrs",i&&i.attrs||o,null,!0),je(e,"$listeners",t._parentListeners||o,null,!0)}(t),tn(t,"beforeCreate"),function(e){var t=vt(e.$options.inject,e);t&&(Ee(!1),Object.keys(t).forEach((function(n){je(e,n,t[n])})),Ee(!0))}(t),dn(t),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(t),tn(t,"created"),t.$options.el&&t.$mount(t.$options.el)},function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Ae,e.prototype.$delete=Ce,e.prototype.$watch=function(e,t,n){if(p(t))return xn(this,e,t,n);(n=n||{}).user=!0;var r=new hn(this,e,t,n);if(n.immediate)try{t.call(this,r.value)}catch(e){qe(e,this,'callback for immediate watcher "'+r.expression+'"')}return function(){r.teardown()}}}(En),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var i=0,o=e.length;i<o;i++)r.$on(e[i],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,i=e.length;r<i;r++)n.$off(e[r],t);return n}var o,l=n._events[e];if(!l)return n;if(!t)return n._events[e]=null,n;for(var a=l.length;a--;)if((o=l[a])===t||o.fn===t){l.splice(a,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?C(n):n;for(var r=C(arguments,1),i='event handler for "'+e+'"',o=0,l=n.length;o<l;o++)He(n[o],t,r,t,i)}return t}}(En),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,i=n._vnode,o=Qt(n);n._vnode=e,n.$el=i?n.__patch__(i,e):n.__patch__(n.$el,e,t,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){tn(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||_(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),tn(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(En),function(e){Tt(e.prototype),e.prototype.$nextTick=function(e){return rt(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,i=n._parentVnode;i&&(t.$scopedSlots=gt(i.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=i;try{Vt=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){qe(n,t,"render"),e=t._vnode}finally{Vt=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof ge||(e=be()),e.parent=i,e}}(En);var Ln=[String,RegExp,Array],$n={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:Ln,exclude:Ln,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Cn(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){An(e,(function(e){return jn(t,e)}))})),this.$watch("exclude",(function(t){An(e,(function(e){return!jn(t,e)}))}))},render:function(){var e=this.$slots.default,t=Gt(e),n=t&&t.componentOptions;if(n){var r=On(n),i=this.include,o=this.exclude;if(i&&(!r||!jn(i,r))||o&&r&&jn(o,r))return t;var l=this.cache,a=this.keys,u=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;l[u]?(t.componentInstance=l[u].componentInstance,_(a,u),a.push(u)):(l[u]=t,a.push(u),this.max&&a.length>parseInt(this.max)&&Cn(l,a[0],a,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return U}};Object.defineProperty(e,"config",t),e.util={warn:ce,extend:L,mergeOptions:Ne,defineReactive:je},e.set=Ae,e.delete=Ce,e.nextTick=rt,e.observable=function(e){return Oe(e),e},e.options=Object.create(null),F.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,L(e.options.components,$n),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=C(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Ne(this.options,e),this}}(e),Sn(e),function(e){F.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&p(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(En),Object.defineProperty(En.prototype,"$isServer",{get:oe}),Object.defineProperty(En.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(En,"FunctionalRenderContext",{value:Rt}),En.version="2.6.12";var Tn=b("style,class"),Rn=b("input,textarea,option,select,progress"),Mn=b("contenteditable,draggable,spellcheck"),In=b("events,caret,typing,plaintext-only"),Dn=b("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Nn="http://www.w3.org/1999/xlink",Fn=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Bn=function(e){return Fn(e)?e.slice(6,e.length):""},Un=function(e){return null==e||!1===e};function zn(e){for(var t=e.data,n=e,r=e;a(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Vn(r.data,t));for(;a(n=n.parent);)n&&n.data&&(t=Vn(t,n.data));return function(e,t){if(a(e)||a(t))return qn(e,Hn(t));return""}(t.staticClass,t.class)}function Vn(e,t){return{staticClass:qn(e.staticClass,t.staticClass),class:a(e.class)?[e.class,t.class]:t.class}}function qn(e,t){return e?t?e+" "+t:e:t||""}function Hn(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,i=e.length;r<i;r++)a(t=Hn(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):c(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Gn={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Wn=b("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Kn=b("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Jn=function(e){return Wn(e)||Kn(e)};var Xn=Object.create(null);var Yn=b("text,number,password,search,email,tel,url");var Qn=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(Gn[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Zn={create:function(e,t){er(t)},update:function(e,t){e.data.ref!==t.data.ref&&(er(e,!0),er(t))},destroy:function(e){er(e,!0)}};function er(e,t){var n=e.data.ref;if(a(n)){var r=e.context,i=e.componentInstance||e.elm,o=r.$refs;t?Array.isArray(o[n])?_(o[n],i):o[n]===i&&(o[n]=void 0):e.data.refInFor?Array.isArray(o[n])?o[n].indexOf(i)<0&&o[n].push(i):o[n]=[i]:o[n]=i}}var tr=new ge("",{},[]),nr=["create","activate","update","remove","destroy"];function rr(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&a(e.data)===a(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=a(n=e.data)&&a(n=n.attrs)&&n.type,i=a(n=t.data)&&a(n=n.attrs)&&n.type;return r===i||Yn(r)&&Yn(i)}(e,t)||u(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&l(t.asyncFactory.error))}function ir(e,t,n){var r,i,o={};for(r=t;r<=n;++r)a(i=e[r].key)&&(o[i]=r);return o}var or={create:lr,update:lr,destroy:function(e){lr(e,tr)}};function lr(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,i,o=e===tr,l=t===tr,a=ur(e.data.directives,e.context),u=ur(t.data.directives,t.context),s=[],c=[];for(n in u)r=a[n],i=u[n],r?(i.oldValue=r.value,i.oldArg=r.arg,cr(i,"update",t,e),i.def&&i.def.componentUpdated&&c.push(i)):(cr(i,"bind",t,e),i.def&&i.def.inserted&&s.push(i));if(s.length){var f=function(){for(var n=0;n<s.length;n++)cr(s[n],"inserted",t,e)};o?st(t,"insert",f):f()}c.length&&st(t,"postpatch",(function(){for(var n=0;n<c.length;n++)cr(c[n],"componentUpdated",t,e)}));if(!o)for(n in a)u[n]||cr(a[n],"unbind",e,e,l)}(e,t)}var ar=Object.create(null);function ur(e,t){var n,r,i=Object.create(null);if(!e)return i;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=ar),i[sr(r)]=r,r.def=Fe(t.$options,"directives",r.name);return i}function sr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function cr(e,t,n,r,i){var o=e.def&&e.def[t];if(o)try{o(n.elm,e,n,r,i)}catch(r){qe(r,n.context,"directive "+e.name+" "+t+" hook")}}var fr=[Zn,or];function pr(e,t){var n=t.componentOptions;if(!(a(n)&&!1===n.Ctor.options.inheritAttrs||l(e.data.attrs)&&l(t.data.attrs))){var r,i,o=t.elm,u=e.data.attrs||{},s=t.data.attrs||{};for(r in a(s.__ob__)&&(s=t.data.attrs=L({},s)),s)i=s[r],u[r]!==i&&vr(o,r,i);for(r in(Y||Z)&&s.value!==u.value&&vr(o,"value",s.value),u)l(s[r])&&(Fn(r)?o.removeAttributeNS(Nn,Bn(r)):Mn(r)||o.removeAttribute(r))}}function vr(e,t,n){e.tagName.indexOf("-")>-1?hr(e,t,n):Dn(t)?Un(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Mn(t)?e.setAttribute(t,function(e,t){return Un(t)||"false"===t?"false":"contenteditable"===e&&In(t)?t:"true"}(t,n)):Fn(t)?Un(n)?e.removeAttributeNS(Nn,Bn(t)):e.setAttributeNS(Nn,t,n):hr(e,t,n)}function hr(e,t,n){if(Un(n))e.removeAttribute(t);else{if(Y&&!Q&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var mr={create:pr,update:pr};function gr(e,t){var n=t.elm,r=t.data,i=e.data;if(!(l(r.staticClass)&&l(r.class)&&(l(i)||l(i.staticClass)&&l(i.class)))){var o=zn(t),u=n._transitionClasses;a(u)&&(o=qn(o,Hn(u))),o!==n._prevClass&&(n.setAttribute("class",o),n._prevClass=o)}}var dr,br={create:gr,update:gr};function yr(e,t,n){var r=dr;return function i(){var o=t.apply(null,arguments);null!==o&&xr(e,i,n,r)}}var _r=Je&&!(te&&Number(te[1])<=53);function wr(e,t,n,r){if(_r){var i=sn,o=t;t=o._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=i||e.timeStamp<=0||e.target.ownerDocument!==document)return o.apply(this,arguments)}}dr.addEventListener(e,t,re?{capture:n,passive:r}:n)}function xr(e,t,n,r){(r||dr).removeEventListener(e,t._wrapper||t,n)}function kr(e,t){if(!l(e.data.on)||!l(t.data.on)){var n=t.data.on||{},r=e.data.on||{};dr=t.elm,function(e){if(a(e.__r)){var t=Y?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}a(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),ut(n,r,wr,xr,yr,t.context),dr=void 0}}var Pr,Er={create:kr,update:kr};function Sr(e,t){if(!l(e.data.domProps)||!l(t.data.domProps)){var n,r,i=t.elm,o=e.data.domProps||{},u=t.data.domProps||{};for(n in a(u.__ob__)&&(u=t.data.domProps=L({},u)),o)n in u||(i[n]="");for(n in u){if(r=u[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===o[n])continue;1===i.childNodes.length&&i.removeChild(i.childNodes[0])}if("value"===n&&"PROGRESS"!==i.tagName){i._value=r;var s=l(r)?"":String(r);Or(i,s)&&(i.value=s)}else if("innerHTML"===n&&Kn(i.tagName)&&l(i.innerHTML)){(Pr=Pr||document.createElement("div")).innerHTML="<svg>"+r+"</svg>";for(var c=Pr.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;c.firstChild;)i.appendChild(c.firstChild)}else if(r!==o[n])try{i[n]=r}catch(e){}}}}function Or(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(a(r)){if(r.number)return d(n)!==d(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var jr={create:Sr,update:Sr},Ar=k((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function Cr(e){var t=Lr(e.style);return e.staticStyle?L(e.staticStyle,t):t}function Lr(e){return Array.isArray(e)?$(e):"string"==typeof e?Ar(e):e}var $r,Tr=/^--/,Rr=/\s*!important$/,Mr=function(e,t,n){if(Tr.test(t))e.style.setProperty(t,n);else if(Rr.test(n))e.style.setProperty(j(t),n.replace(Rr,""),"important");else{var r=Dr(t);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)e.style[r]=n[i];else e.style[r]=n}},Ir=["Webkit","Moz","ms"],Dr=k((function(e){if($r=$r||document.createElement("div").style,"filter"!==(e=E(e))&&e in $r)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Ir.length;n++){var r=Ir[n]+t;if(r in $r)return r}}));function Nr(e,t){var n=t.data,r=e.data;if(!(l(n.staticStyle)&&l(n.style)&&l(r.staticStyle)&&l(r.style))){var i,o,u=t.elm,s=r.staticStyle,c=r.normalizedStyle||r.style||{},f=s||c,p=Lr(t.data.style)||{};t.data.normalizedStyle=a(p.__ob__)?L({},p):p;var v=function(e,t){var n,r={};if(t)for(var i=e;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=Cr(i.data))&&L(r,n);(n=Cr(e.data))&&L(r,n);for(var o=e;o=o.parent;)o.data&&(n=Cr(o.data))&&L(r,n);return r}(t,!0);for(o in f)l(v[o])&&Mr(u,o,"");for(o in v)(i=v[o])!==f[o]&&Mr(u,o,null==i?"":i)}}var Fr={create:Nr,update:Nr},Br=/\s+/;function Ur(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Br).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function zr(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Br).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Vr(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&L(t,qr(e.name||"v")),L(t,e),t}return"string"==typeof e?qr(e):void 0}}var qr=k((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),Hr=W&&!Q,Gr="transition",Wr="transitionend",Kr="animation",Jr="animationend";Hr&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Gr="WebkitTransition",Wr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Kr="WebkitAnimation",Jr="webkitAnimationEnd"));var Xr=W?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Yr(e){Xr((function(){Xr(e)}))}function Qr(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Ur(e,t))}function Zr(e,t){e._transitionClasses&&_(e._transitionClasses,t),zr(e,t)}function ei(e,t,n){var r=ni(e,t),i=r.type,o=r.timeout,l=r.propCount;if(!i)return n();var a="transition"===i?Wr:Jr,u=0,s=function(){e.removeEventListener(a,c),n()},c=function(t){t.target===e&&++u>=l&&s()};setTimeout((function(){u<l&&s()}),o+1),e.addEventListener(a,c)}var ti=/\b(transform|all)(,|$)/;function ni(e,t){var n,r=window.getComputedStyle(e),i=(r[Gr+"Delay"]||"").split(", "),o=(r[Gr+"Duration"]||"").split(", "),l=ri(i,o),a=(r[Kr+"Delay"]||"").split(", "),u=(r[Kr+"Duration"]||"").split(", "),s=ri(a,u),c=0,f=0;return"transition"===t?l>0&&(n="transition",c=l,f=o.length):"animation"===t?s>0&&(n="animation",c=s,f=u.length):f=(n=(c=Math.max(l,s))>0?l>s?"transition":"animation":null)?"transition"===n?o.length:u.length:0,{type:n,timeout:c,propCount:f,hasTransform:"transition"===n&&ti.test(r[Gr+"Property"])}}function ri(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return ii(t)+ii(e[n])})))}function ii(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function oi(e,t){var n=e.elm;a(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=Vr(e.data.transition);if(!l(r)&&!a(n._enterCb)&&1===n.nodeType){for(var i=r.css,o=r.type,u=r.enterClass,s=r.enterToClass,f=r.enterActiveClass,p=r.appearClass,v=r.appearToClass,h=r.appearActiveClass,m=r.beforeEnter,g=r.enter,b=r.afterEnter,y=r.enterCancelled,_=r.beforeAppear,w=r.appear,x=r.afterAppear,k=r.appearCancelled,P=r.duration,E=Yt,S=Yt.$vnode;S&&S.parent;)E=S.context,S=S.parent;var O=!E._isMounted||!e.isRootInsert;if(!O||w||""===w){var j=O&&p?p:u,A=O&&h?h:f,C=O&&v?v:s,L=O&&_||m,$=O&&"function"==typeof w?w:g,T=O&&x||b,R=O&&k||y,M=d(c(P)?P.enter:P);0;var I=!1!==i&&!Q,D=ui($),F=n._enterCb=N((function(){I&&(Zr(n,C),Zr(n,A)),F.cancelled?(I&&Zr(n,j),R&&R(n)):T&&T(n),n._enterCb=null}));e.data.show||st(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),$&&$(n,F)})),L&&L(n),I&&(Qr(n,j),Qr(n,A),Yr((function(){Zr(n,j),F.cancelled||(Qr(n,C),D||(ai(M)?setTimeout(F,M):ei(n,o,F)))}))),e.data.show&&(t&&t(),$&&$(n,F)),I||D||F()}}}function li(e,t){var n=e.elm;a(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=Vr(e.data.transition);if(l(r)||1!==n.nodeType)return t();if(!a(n._leaveCb)){var i=r.css,o=r.type,u=r.leaveClass,s=r.leaveToClass,f=r.leaveActiveClass,p=r.beforeLeave,v=r.leave,h=r.afterLeave,m=r.leaveCancelled,g=r.delayLeave,b=r.duration,y=!1!==i&&!Q,_=ui(v),w=d(c(b)?b.leave:b);0;var x=n._leaveCb=N((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),y&&(Zr(n,s),Zr(n,f)),x.cancelled?(y&&Zr(n,u),m&&m(n)):(t(),h&&h(n)),n._leaveCb=null}));g?g(k):k()}function k(){x.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),p&&p(n),y&&(Qr(n,u),Qr(n,f),Yr((function(){Zr(n,u),x.cancelled||(Qr(n,s),_||(ai(w)?setTimeout(x,w):ei(n,o,x)))}))),v&&v(n,x),y||_||x())}}function ai(e){return"number"==typeof e&&!isNaN(e)}function ui(e){if(l(e))return!1;var t=e.fns;return a(t)?ui(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function si(e,t){!0!==t.data.show&&oi(t)}var ci=function(e){var t,n,r={},i=e.modules,o=e.nodeOps;for(t=0;t<nr.length;++t)for(r[nr[t]]=[],n=0;n<i.length;++n)a(i[n][nr[t]])&&r[nr[t]].push(i[n][nr[t]]);function c(e){var t=o.parentNode(e);a(t)&&o.removeChild(t,e)}function f(e,t,n,i,l,s,c){if(a(e.elm)&&a(s)&&(e=s[c]=_e(e)),e.isRootInsert=!l,!function(e,t,n,i){var o=e.data;if(a(o)){var l=a(e.componentInstance)&&o.keepAlive;if(a(o=o.hook)&&a(o=o.init)&&o(e,!1),a(e.componentInstance))return p(e,t),v(n,e.elm,i),u(l)&&function(e,t,n,i){var o,l=e;for(;l.componentInstance;)if(l=l.componentInstance._vnode,a(o=l.data)&&a(o=o.transition)){for(o=0;o<r.activate.length;++o)r.activate[o](tr,l);t.push(l);break}v(n,e.elm,i)}(e,t,n,i),!0}}(e,t,n,i)){var f=e.data,m=e.children,b=e.tag;a(b)?(e.elm=e.ns?o.createElementNS(e.ns,b):o.createElement(b,e),d(e),h(e,m,t),a(f)&&g(e,t),v(n,e.elm,i)):u(e.isComment)?(e.elm=o.createComment(e.text),v(n,e.elm,i)):(e.elm=o.createTextNode(e.text),v(n,e.elm,i))}}function p(e,t){a(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,m(e)?(g(e,t),d(e)):(er(e),t.push(e))}function v(e,t,n){a(e)&&(a(n)?o.parentNode(n)===e&&o.insertBefore(e,t,n):o.appendChild(e,t))}function h(e,t,n){if(Array.isArray(t)){0;for(var r=0;r<t.length;++r)f(t[r],n,e.elm,null,!0,t,r)}else s(e.text)&&o.appendChild(e.elm,o.createTextNode(String(e.text)))}function m(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return a(e.tag)}function g(e,n){for(var i=0;i<r.create.length;++i)r.create[i](tr,e);a(t=e.data.hook)&&(a(t.create)&&t.create(tr,e),a(t.insert)&&n.push(e))}function d(e){var t;if(a(t=e.fnScopeId))o.setStyleScope(e.elm,t);else for(var n=e;n;)a(t=n.context)&&a(t=t.$options._scopeId)&&o.setStyleScope(e.elm,t),n=n.parent;a(t=Yt)&&t!==e.context&&t!==e.fnContext&&a(t=t.$options._scopeId)&&o.setStyleScope(e.elm,t)}function y(e,t,n,r,i,o){for(;r<=i;++r)f(n[r],o,e,t,!1,n,r)}function _(e){var t,n,i=e.data;if(a(i))for(a(t=i.hook)&&a(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(a(t=e.children))for(n=0;n<e.children.length;++n)_(e.children[n])}function w(e,t,n){for(;t<=n;++t){var r=e[t];a(r)&&(a(r.tag)?(x(r),_(r)):c(r.elm))}}function x(e,t){if(a(t)||a(e.data)){var n,i=r.remove.length+1;for(a(t)?t.listeners+=i:t=function(e,t){function n(){0==--n.listeners&&c(e)}return n.listeners=t,n}(e.elm,i),a(n=e.componentInstance)&&a(n=n._vnode)&&a(n.data)&&x(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);a(n=e.data.hook)&&a(n=n.remove)?n(e,t):t()}else c(e.elm)}function k(e,t,n,r){for(var i=n;i<r;i++){var o=t[i];if(a(o)&&rr(e,o))return i}}function P(e,t,n,i,s,c){if(e!==t){a(t.elm)&&a(i)&&(t=i[s]=_e(t));var p=t.elm=e.elm;if(u(e.isAsyncPlaceholder))a(t.asyncFactory.resolved)?O(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(u(t.isStatic)&&u(e.isStatic)&&t.key===e.key&&(u(t.isCloned)||u(t.isOnce)))t.componentInstance=e.componentInstance;else{var v,h=t.data;a(h)&&a(v=h.hook)&&a(v=v.prepatch)&&v(e,t);var g=e.children,d=t.children;if(a(h)&&m(t)){for(v=0;v<r.update.length;++v)r.update[v](e,t);a(v=h.hook)&&a(v=v.update)&&v(e,t)}l(t.text)?a(g)&&a(d)?g!==d&&function(e,t,n,r,i){var u,s,c,p=0,v=0,h=t.length-1,m=t[0],g=t[h],d=n.length-1,b=n[0],_=n[d],x=!i;for(0;p<=h&&v<=d;)l(m)?m=t[++p]:l(g)?g=t[--h]:rr(m,b)?(P(m,b,r,n,v),m=t[++p],b=n[++v]):rr(g,_)?(P(g,_,r,n,d),g=t[--h],_=n[--d]):rr(m,_)?(P(m,_,r,n,d),x&&o.insertBefore(e,m.elm,o.nextSibling(g.elm)),m=t[++p],_=n[--d]):rr(g,b)?(P(g,b,r,n,v),x&&o.insertBefore(e,g.elm,m.elm),g=t[--h],b=n[++v]):(l(u)&&(u=ir(t,p,h)),l(s=a(b.key)?u[b.key]:k(b,t,p,h))?f(b,r,e,m.elm,!1,n,v):rr(c=t[s],b)?(P(c,b,r,n,v),t[s]=void 0,x&&o.insertBefore(e,c.elm,m.elm)):f(b,r,e,m.elm,!1,n,v),b=n[++v]);p>h?y(e,l(n[d+1])?null:n[d+1].elm,n,v,d,r):v>d&&w(t,p,h)}(p,g,d,n,c):a(d)?(a(e.text)&&o.setTextContent(p,""),y(p,null,d,0,d.length-1,n)):a(g)?w(g,0,g.length-1):a(e.text)&&o.setTextContent(p,""):e.text!==t.text&&o.setTextContent(p,t.text),a(h)&&a(v=h.hook)&&a(v=v.postpatch)&&v(e,t)}}}function E(e,t,n){if(u(n)&&a(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var S=b("attrs,class,staticClass,staticStyle,key");function O(e,t,n,r){var i,o=t.tag,l=t.data,s=t.children;if(r=r||l&&l.pre,t.elm=e,u(t.isComment)&&a(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(a(l)&&(a(i=l.hook)&&a(i=i.init)&&i(t,!0),a(i=t.componentInstance)))return p(t,n),!0;if(a(o)){if(a(s))if(e.hasChildNodes())if(a(i=l)&&a(i=i.domProps)&&a(i=i.innerHTML)){if(i!==e.innerHTML)return!1}else{for(var c=!0,f=e.firstChild,v=0;v<s.length;v++){if(!f||!O(f,s[v],n,r)){c=!1;break}f=f.nextSibling}if(!c||f)return!1}else h(t,s,n);if(a(l)){var m=!1;for(var d in l)if(!S(d)){m=!0,g(t,n);break}!m&&l.class&&ot(l.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,i){if(!l(t)){var s,c=!1,p=[];if(l(e))c=!0,f(t,p);else{var v=a(e.nodeType);if(!v&&rr(e,t))P(e,t,p,null,null,i);else{if(v){if(1===e.nodeType&&e.hasAttribute("data-server-rendered")&&(e.removeAttribute("data-server-rendered"),n=!0),u(n)&&O(e,t,p))return E(t,p,!0),e;s=e,e=new ge(o.tagName(s).toLowerCase(),{},[],void 0,s)}var h=e.elm,g=o.parentNode(h);if(f(t,p,h._leaveCb?null:g,o.nextSibling(h)),a(t.parent))for(var d=t.parent,b=m(t);d;){for(var y=0;y<r.destroy.length;++y)r.destroy[y](d);if(d.elm=t.elm,b){for(var x=0;x<r.create.length;++x)r.create[x](tr,d);var k=d.data.hook.insert;if(k.merged)for(var S=1;S<k.fns.length;S++)k.fns[S]()}else er(d);d=d.parent}a(g)?w([e],0,0):a(e.tag)&&_(e)}}return E(t,p,c),t.elm}a(e)&&_(e)}}({nodeOps:Qn,modules:[mr,br,Er,jr,Fr,W?{create:si,activate:si,remove:function(e,t){!0!==e.data.show?li(e,t):t()}}:{}].concat(fr)});Q&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&bi(e,"input")}));var fi={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?st(n,"postpatch",(function(){fi.componentUpdated(e,t,n)})):pi(e,t,n.context),e._vOptions=[].map.call(e.options,mi)):("textarea"===n.tag||Yn(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",gi),e.addEventListener("compositionend",di),e.addEventListener("change",di),Q&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){pi(e,t,n.context);var r=e._vOptions,i=e._vOptions=[].map.call(e.options,mi);if(i.some((function(e,t){return!I(e,r[t])})))(e.multiple?t.value.some((function(e){return hi(e,i)})):t.value!==t.oldValue&&hi(t.value,i))&&bi(e,"change")}}};function pi(e,t,n){vi(e,t,n),(Y||Z)&&setTimeout((function(){vi(e,t,n)}),0)}function vi(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,l,a=0,u=e.options.length;a<u;a++)if(l=e.options[a],i)o=D(r,mi(l))>-1,l.selected!==o&&(l.selected=o);else if(I(mi(l),r))return void(e.selectedIndex!==a&&(e.selectedIndex=a));i||(e.selectedIndex=-1)}}function hi(e,t){return t.every((function(t){return!I(t,e)}))}function mi(e){return"_value"in e?e._value:e.value}function gi(e){e.target.composing=!0}function di(e){e.target.composing&&(e.target.composing=!1,bi(e.target,"input"))}function bi(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function yi(e){return!e.componentInstance||e.data&&e.data.transition?e:yi(e.componentInstance._vnode)}var _i={model:fi,show:{bind:function(e,t,n){var r=t.value,i=(n=yi(n)).data&&n.data.transition,o=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&i?(n.data.show=!0,oi(n,(function(){e.style.display=o}))):e.style.display=r?o:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=yi(n)).data&&n.data.transition?(n.data.show=!0,r?oi(n,(function(){e.style.display=e.__vOriginalDisplay})):li(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,i){i||(e.style.display=e.__vOriginalDisplay)}}},wi={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function xi(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?xi(Gt(t.children)):e}function ki(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var i=n._parentListeners;for(var o in i)t[E(o)]=i[o];return t}function Pi(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var Ei=function(e){return e.tag||Ht(e)},Si=function(e){return"show"===e.name},Oi={name:"transition",props:wi,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(Ei)).length){0;var r=this.mode;0;var i=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return i;var o=xi(i);if(!o)return i;if(this._leaving)return Pi(e,i);var l="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?l+"comment":l+o.tag:s(o.key)?0===String(o.key).indexOf(l)?o.key:l+o.key:o.key;var a=(o.data||(o.data={})).transition=ki(this),u=this._vnode,c=xi(u);if(o.data.directives&&o.data.directives.some(Si)&&(o.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(o,c)&&!Ht(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var f=c.data.transition=L({},a);if("out-in"===r)return this._leaving=!0,st(f,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),Pi(e,i);if("in-out"===r){if(Ht(o))return u;var p,v=function(){p()};st(a,"afterEnter",v),st(a,"enterCancelled",v),st(f,"delayLeave",(function(e){p=e}))}}return i}}},ji=L({tag:String,moveClass:String},wi);function Ai(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Ci(e){e.data.newPos=e.elm.getBoundingClientRect()}function Li(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,i=t.top-n.top;if(r||i){e.data.moved=!0;var o=e.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}delete ji.mode;var $i={Transition:Oi,TransitionGroup:{props:ji,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var i=Qt(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,i(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],l=ki(this),a=0;a<i.length;a++){var u=i[a];if(u.tag)if(null!=u.key&&0!==String(u.key).indexOf("__vlist"))o.push(u),n[u.key]=u,(u.data||(u.data={})).transition=l;else;}if(r){for(var s=[],c=[],f=0;f<r.length;f++){var p=r[f];p.data.transition=l,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?s.push(p):c.push(p)}this.kept=e(t,null,s),this.removed=c}return e(t,null,o)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(Ai),e.forEach(Ci),e.forEach(Li),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;Qr(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Wr,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Wr,e),n._moveCb=null,Zr(n,t))})}})))},methods:{hasMove:function(e,t){if(!Hr)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){zr(n,e)})),Ur(n,t),n.style.display="none",this.$el.appendChild(n);var r=ni(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}}};En.config.mustUseProp=function(e,t,n){return"value"===n&&Rn(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},En.config.isReservedTag=Jn,En.config.isReservedAttr=Tn,En.config.getTagNamespace=function(e){return Kn(e)?"svg":"math"===e?"math":void 0},En.config.isUnknownElement=function(e){if(!W)return!0;if(Jn(e))return!1;if(e=e.toLowerCase(),null!=Xn[e])return Xn[e];var t=document.createElement(e);return e.indexOf("-")>-1?Xn[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Xn[e]=/HTMLUnknownElement/.test(t.toString())},L(En.options.directives,_i),L(En.options.components,$i),En.prototype.__patch__=W?ci:T,En.prototype.$mount=function(e,t){return function(e,t,n){var r;return e.$el=t,e.$options.render||(e.$options.render=be),tn(e,"beforeMount"),r=function(){e._update(e._render(),n)},new hn(e,r,T,{before:function(){e._isMounted&&!e._isDestroyed&&tn(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,tn(e,"mounted")),e}(this,e=e&&W?function(e){if("string"==typeof e){var t=document.querySelector(e);return t||document.createElement("div")}return e}(e):void 0,t)},W&&setTimeout((function(){U.devtools&&le&&le.emit("init",En)}),0);var Ti=En;
/*!
* vue-router v3.5.1
* (c) 2021 Evan You
* @license MIT
*/function Ri(e,t){for(var n in t)e[n]=t[n];return e}var Mi=/[!'()*]/g,Ii=function(e){return"%"+e.charCodeAt(0).toString(16)},Di=/%2C/g,Ni=function(e){return encodeURIComponent(e).replace(Mi,Ii).replace(Di,",")};function Fi(e){try{return decodeURIComponent(e)}catch(e){0}return e}var Bi=function(e){return null==e||"object"==typeof e?e:String(e)};function Ui(e){var t={};return(e=e.trim().replace(/^(\?|#|&)/,""))?(e.split("&").forEach((function(e){var n=e.replace(/\+/g," ").split("="),r=Fi(n.shift()),i=n.length>0?Fi(n.join("=")):null;void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}function zi(e){var t=e?Object.keys(e).map((function(t){var n=e[t];if(void 0===n)return"";if(null===n)return Ni(t);if(Array.isArray(n)){var r=[];return n.forEach((function(e){void 0!==e&&(null===e?r.push(Ni(t)):r.push(Ni(t)+"="+Ni(e)))})),r.join("&")}return Ni(t)+"="+Ni(n)})).filter((function(e){return e.length>0})).join("&"):null;return t?"?"+t:""}var Vi=/\/?$/;function qi(e,t,n,r){var i=r&&r.options.stringifyQuery,o=t.query||{};try{o=Hi(o)}catch(e){}var l={name:t.name||e&&e.name,meta:e&&e.meta||{},path:t.path||"/",hash:t.hash||"",query:o,params:t.params||{},fullPath:Ki(t,i),matched:e?Wi(e):[]};return n&&(l.redirectedFrom=Ki(n,i)),Object.freeze(l)}function Hi(e){if(Array.isArray(e))return e.map(Hi);if(e&&"object"==typeof e){var t={};for(var n in e)t[n]=Hi(e[n]);return t}return e}var Gi=qi(null,{path:"/"});function Wi(e){for(var t=[];e;)t.unshift(e),e=e.parent;return t}function Ki(e,t){var n=e.path,r=e.query;void 0===r&&(r={});var i=e.hash;return void 0===i&&(i=""),(n||"/")+(t||zi)(r)+i}function Ji(e,t,n){return t===Gi?e===t:!!t&&(e.path&&t.path?e.path.replace(Vi,"")===t.path.replace(Vi,"")&&(n||e.hash===t.hash&&Xi(e.query,t.query)):!(!e.name||!t.name)&&(e.name===t.name&&(n||e.hash===t.hash&&Xi(e.query,t.query)&&Xi(e.params,t.params))))}function Xi(e,t){if(void 0===e&&(e={}),void 0===t&&(t={}),!e||!t)return e===t;var n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((function(n,i){var o=e[n];if(r[i]!==n)return!1;var l=t[n];return null==o||null==l?o===l:"object"==typeof o&&"object"==typeof l?Xi(o,l):String(o)===String(l)}))}function Yi(e){for(var t=0;t<e.matched.length;t++){var n=e.matched[t];for(var r in n.instances){var i=n.instances[r],o=n.enteredCbs[r];if(i&&o){delete n.enteredCbs[r];for(var l=0;l<o.length;l++)i._isBeingDestroyed||o[l](i)}}}}var Qi={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(e,t){var n=t.props,r=t.children,i=t.parent,o=t.data;o.routerView=!0;for(var l=i.$createElement,a=n.name,u=i.$route,s=i._routerViewCache||(i._routerViewCache={}),c=0,f=!1;i&&i._routerRoot!==i;){var p=i.$vnode?i.$vnode.data:{};p.routerView&&c++,p.keepAlive&&i._directInactive&&i._inactive&&(f=!0),i=i.$parent}if(o.routerViewDepth=c,f){var v=s[a],h=v&&v.component;return h?(v.configProps&&Zi(h,o,v.route,v.configProps),l(h,o,r)):l()}var m=u.matched[c],g=m&&m.components[a];if(!m||!g)return s[a]=null,l();s[a]={component:g},o.registerRouteInstance=function(e,t){var n=m.instances[a];(t&&n!==e||!t&&n===e)&&(m.instances[a]=t)},(o.hook||(o.hook={})).prepatch=function(e,t){m.instances[a]=t.componentInstance},o.hook.init=function(e){e.data.keepAlive&&e.componentInstance&&e.componentInstance!==m.instances[a]&&(m.instances[a]=e.componentInstance),Yi(u)};var d=m.props&&m.props[a];return d&&(Ri(s[a],{route:u,configProps:d}),Zi(g,o,u,d)),l(g,o,r)}};function Zi(e,t,n,r){var i=t.props=function(e,t){switch(typeof t){case"undefined":return;case"object":return t;case"function":return t(e);case"boolean":return t?e.params:void 0;default:0}}(n,r);if(i){i=t.props=Ri({},i);var o=t.attrs=t.attrs||{};for(var l in i)e.props&&l in e.props||(o[l]=i[l],delete i[l])}}function eo(e,t,n){var r=e.charAt(0);if("/"===r)return e;if("?"===r||"#"===r)return t+e;var i=t.split("/");n&&i[i.length-1]||i.pop();for(var o=e.replace(/^\//,"").split("/"),l=0;l<o.length;l++){var a=o[l];".."===a?i.pop():"."!==a&&i.push(a)}return""!==i[0]&&i.unshift(""),i.join("/")}function to(e){return e.replace(/\/\//g,"/")}var no=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)},ro=bo,io=so,oo=function(e,t){return fo(so(e,t),t)},lo=fo,ao=go,uo=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function so(e,t){for(var n,r=[],i=0,o=0,l="",a=t&&t.delimiter||"/";null!=(n=uo.exec(e));){var u=n[0],s=n[1],c=n.index;if(l+=e.slice(o,c),o=c+u.length,s)l+=s[1];else{var f=e[o],p=n[2],v=n[3],h=n[4],m=n[5],g=n[6],d=n[7];l&&(r.push(l),l="");var b=null!=p&&null!=f&&f!==p,y="+"===g||"*"===g,_="?"===g||"*"===g,w=n[2]||a,x=h||m;r.push({name:v||i++,prefix:p||"",delimiter:w,optional:_,repeat:y,partial:b,asterisk:!!d,pattern:x?vo(x):d?".*":"[^"+po(w)+"]+?"})}}return o<e.length&&(l+=e.substr(o)),l&&r.push(l),r}function co(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function fo(e,t){for(var n=new Array(e.length),r=0;r<e.length;r++)"object"==typeof e[r]&&(n[r]=new RegExp("^(?:"+e[r].pattern+")$",mo(t)));return function(t,r){for(var i="",o=t||{},l=(r||{}).pretty?co:encodeURIComponent,a=0;a<e.length;a++){var u=e[a];if("string"!=typeof u){var s,c=o[u.name];if(null==c){if(u.optional){u.partial&&(i+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(no(c)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(c)+"`");if(0===c.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<c.length;f++){if(s=l(c[f]),!n[a].test(s))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(s)+"`");i+=(0===f?u.prefix:u.delimiter)+s}}else{if(s=u.asterisk?encodeURI(c).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):l(c),!n[a].test(s))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+s+'"');i+=u.prefix+s}}else i+=u}return i}}function po(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function vo(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function ho(e,t){return e.keys=t,e}function mo(e){return e&&e.sensitive?"":"i"}function go(e,t,n){no(t)||(n=t||n,t=[]);for(var r=(n=n||{}).strict,i=!1!==n.end,o="",l=0;l<e.length;l++){var a=e[l];if("string"==typeof a)o+=po(a);else{var u=po(a.prefix),s="(?:"+a.pattern+")";t.push(a),a.repeat&&(s+="(?:"+u+s+")*"),o+=s=a.optional?a.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var c=po(n.delimiter||"/"),f=o.slice(-c.length)===c;return r||(o=(f?o.slice(0,-c.length):o)+"(?:"+c+"(?=$))?"),o+=i?"$":r&&f?"":"(?="+c+"|$)",ho(new RegExp("^"+o,mo(n)),t)}function bo(e,t,n){return no(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return ho(e,t)}(e,t):no(e)?function(e,t,n){for(var r=[],i=0;i<e.length;i++)r.push(bo(e[i],t,n).source);return ho(new RegExp("(?:"+r.join("|")+")",mo(n)),t)}(e,t,n):function(e,t,n){return go(so(e,n),t,n)}(e,t,n)}ro.parse=io,ro.compile=oo,ro.tokensToFunction=lo,ro.tokensToRegExp=ao;var yo=Object.create(null);function _o(e,t,n){t=t||{};try{var r=yo[e]||(yo[e]=ro.compile(e));return"string"==typeof t.pathMatch&&(t[0]=t.pathMatch),r(t,{pretty:!0})}catch(e){return""}finally{delete t[0]}}function wo(e,t,n,r){var i="string"==typeof e?{path:e}:e;if(i._normalized)return i;if(i.name){var o=(i=Ri({},e)).params;return o&&"object"==typeof o&&(i.params=Ri({},o)),i}if(!i.path&&i.params&&t){(i=Ri({},i))._normalized=!0;var l=Ri(Ri({},t.params),i.params);if(t.name)i.name=t.name,i.params=l;else if(t.matched.length){var a=t.matched[t.matched.length-1].path;i.path=_o(a,l,t.path)}else 0;return i}var u=function(e){var t="",n="",r=e.indexOf("#");r>=0&&(t=e.slice(r),e=e.slice(0,r));var i=e.indexOf("?");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{path:e,query:n,hash:t}}(i.path||""),s=t&&t.path||"/",c=u.path?eo(u.path,s,n||i.append):s,f=function(e,t,n){void 0===t&&(t={});var r,i=n||Ui;try{r=i(e||"")}catch(e){r={}}for(var o in t){var l=t[o];r[o]=Array.isArray(l)?l.map(Bi):Bi(l)}return r}(u.query,i.query,r&&r.options.parseQuery),p=i.hash||u.hash;return p&&"#"!==p.charAt(0)&&(p="#"+p),{_normalized:!0,path:c,query:f,hash:p}}var xo,ko=function(){},Po={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(e){var t=this,n=this.$router,r=this.$route,i=n.resolve(this.to,r,this.append),o=i.location,l=i.route,a=i.href,u={},s=n.options.linkActiveClass,c=n.options.linkExactActiveClass,f=null==s?"router-link-active":s,p=null==c?"router-link-exact-active":c,v=null==this.activeClass?f:this.activeClass,h=null==this.exactActiveClass?p:this.exactActiveClass,m=l.redirectedFrom?qi(null,wo(l.redirectedFrom),null,n):l;u[h]=Ji(r,m,this.exactPath),u[v]=this.exact||this.exactPath?u[h]:function(e,t){return 0===e.path.replace(Vi,"/").indexOf(t.path.replace(Vi,"/"))&&(!t.hash||e.hash===t.hash)&&function(e,t){for(var n in t)if(!(n in e))return!1;return!0}(e.query,t.query)}(r,m);var g=u[h]?this.ariaCurrentValue:null,d=function(e){Eo(e)&&(t.replace?n.replace(o,ko):n.push(o,ko))},b={click:Eo};Array.isArray(this.event)?this.event.forEach((function(e){b[e]=d})):b[this.event]=d;var y={class:u},_=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:a,route:l,navigate:d,isActive:u[v],isExactActive:u[h]});if(_){if(1===_.length)return _[0];if(_.length>1||!_.length)return 0===_.length?e():e("span",{},_)}if("a"===this.tag)y.on=b,y.attrs={href:a,"aria-current":g};else{var w=function e(t){var n;if(t)for(var r=0;r<t.length;r++){if("a"===(n=t[r]).tag)return n;if(n.children&&(n=e(n.children)))return n}}(this.$slots.default);if(w){w.isStatic=!1;var x=w.data=Ri({},w.data);for(var k in x.on=x.on||{},x.on){var P=x.on[k];k in b&&(x.on[k]=Array.isArray(P)?P:[P])}for(var E in b)E in x.on?x.on[E].push(b[E]):x.on[E]=d;var S=w.data.attrs=Ri({},w.data.attrs);S.href=a,S["aria-current"]=g}else y.on=b}return e(this.tag,y,this.$slots.default)}};function Eo(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){var t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}var So="undefined"!=typeof window;function Oo(e,t,n,r,i){var o=t||[],l=n||Object.create(null),a=r||Object.create(null);e.forEach((function(e){!function e(t,n,r,i,o,l){var a=i.path,u=i.name;0;var s=i.pathToRegexpOptions||{},c=function(e,t,n){n||(e=e.replace(/\/$/,""));if("/"===e[0])return e;if(null==t)return e;return to(t.path+"/"+e)}(a,o,s.strict);"boolean"==typeof i.caseSensitive&&(s.sensitive=i.caseSensitive);var f={path:c,regex:jo(c,s),components:i.components||{default:i.component},alias:i.alias?"string"==typeof i.alias?[i.alias]:i.alias:[],instances:{},enteredCbs:{},name:u,parent:o,matchAs:l,redirect:i.redirect,beforeEnter:i.beforeEnter,meta:i.meta||{},props:null==i.props?{}:i.components?i.props:{default:i.props}};i.children&&i.children.forEach((function(i){var o=l?to(l+"/"+i.path):void 0;e(t,n,r,i,f,o)}));n[f.path]||(t.push(f.path),n[f.path]=f);if(void 0!==i.alias)for(var p=Array.isArray(i.alias)?i.alias:[i.alias],v=0;v<p.length;++v){0;var h={path:p[v],children:i.children};e(t,n,r,h,o,f.path||"/")}u&&(r[u]||(r[u]=f))}(o,l,a,e,i)}));for(var u=0,s=o.length;u<s;u++)"*"===o[u]&&(o.push(o.splice(u,1)[0]),s--,u--);return{pathList:o,pathMap:l,nameMap:a}}function jo(e,t){return ro(e,[],t)}function Ao(e,t){var n=Oo(e),r=n.pathList,i=n.pathMap,o=n.nameMap;function l(e,n,l){var a=wo(e,n,!1,t),s=a.name;if(s){var c=o[s];if(!c)return u(null,a);var f=c.regex.keys.filter((function(e){return!e.optional})).map((function(e){return e.name}));if("object"!=typeof a.params&&(a.params={}),n&&"object"==typeof n.params)for(var p in n.params)!(p in a.params)&&f.indexOf(p)>-1&&(a.params[p]=n.params[p]);return a.path=_o(c.path,a.params),u(c,a,l)}if(a.path){a.params={};for(var v=0;v<r.length;v++){var h=r[v],m=i[h];if(Co(m.regex,a.path,a.params))return u(m,a,l)}}return u(null,a)}function a(e,n){var r=e.redirect,i="function"==typeof r?r(qi(e,n,null,t)):r;if("string"==typeof i&&(i={path:i}),!i||"object"!=typeof i)return u(null,n);var a=i,s=a.name,c=a.path,f=n.query,p=n.hash,v=n.params;if(f=a.hasOwnProperty("query")?a.query:f,p=a.hasOwnProperty("hash")?a.hash:p,v=a.hasOwnProperty("params")?a.params:v,s){o[s];return l({_normalized:!0,name:s,query:f,hash:p,params:v},void 0,n)}if(c){var h=function(e,t){return eo(e,t.parent?t.parent.path:"/",!0)}(c,e);return l({_normalized:!0,path:_o(h,v),query:f,hash:p},void 0,n)}return u(null,n)}function u(e,n,r){return e&&e.redirect?a(e,r||n):e&&e.matchAs?function(e,t,n){var r=l({_normalized:!0,path:_o(n,t.params)});if(r){var i=r.matched,o=i[i.length-1];return t.params=r.params,u(o,t)}return u(null,t)}(0,n,e.matchAs):qi(e,n,r,t)}return{match:l,addRoute:function(e,t){var n="object"!=typeof e?o[e]:void 0;Oo([t||e],r,i,o,n),n&&Oo(n.alias.map((function(e){return{path:e,children:[t]}})),r,i,o,n)},getRoutes:function(){return r.map((function(e){return i[e]}))},addRoutes:function(e){Oo(e,r,i,o)}}}function Co(e,t,n){var r=t.match(e);if(!r)return!1;if(!n)return!0;for(var i=1,o=r.length;i<o;++i){var l=e.keys[i-1];l&&(n[l.name||"pathMatch"]="string"==typeof r[i]?Fi(r[i]):r[i])}return!0}var Lo=So&&window.performance&&window.performance.now?window.performance:Date;function $o(){return Lo.now().toFixed(3)}var To=$o();function Ro(){return To}function Mo(e){return To=e}var Io=Object.create(null);function Do(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual");var e=window.location.protocol+"//"+window.location.host,t=window.location.href.replace(e,""),n=Ri({},window.history.state);return n.key=Ro(),window.history.replaceState(n,"",t),window.addEventListener("popstate",Bo),function(){window.removeEventListener("popstate",Bo)}}function No(e,t,n,r){if(e.app){var i=e.options.scrollBehavior;i&&e.app.$nextTick((function(){var o=function(){var e=Ro();if(e)return Io[e]}(),l=i.call(e,t,n,r?o:null);l&&("function"==typeof l.then?l.then((function(e){Ho(e,o)})).catch((function(e){0})):Ho(l,o))}))}}function Fo(){var e=Ro();e&&(Io[e]={x:window.pageXOffset,y:window.pageYOffset})}function Bo(e){Fo(),e.state&&e.state.key&&Mo(e.state.key)}function Uo(e){return Vo(e.x)||Vo(e.y)}function zo(e){return{x:Vo(e.x)?e.x:window.pageXOffset,y:Vo(e.y)?e.y:window.pageYOffset}}function Vo(e){return"number"==typeof e}var qo=/^#\d/;function Ho(e,t){var n,r="object"==typeof e;if(r&&"string"==typeof e.selector){var i=qo.test(e.selector)?document.getElementById(e.selector.slice(1)):document.querySelector(e.selector);if(i){var o=e.offset&&"object"==typeof e.offset?e.offset:{};t=function(e,t){var n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:r.left-n.left-t.x,y:r.top-n.top-t.y}}(i,o={x:Vo((n=o).x)?n.x:0,y:Vo(n.y)?n.y:0})}else Uo(e)&&(t=zo(e))}else r&&Uo(e)&&(t=zo(e));t&&("scrollBehavior"in document.documentElement.style?window.scrollTo({left:t.x,top:t.y,behavior:e.behavior}):window.scrollTo(t.x,t.y))}var Go,Wo=So&&((-1===(Go=window.navigator.userAgent).indexOf("Android 2.")&&-1===Go.indexOf("Android 4.0")||-1===Go.indexOf("Mobile Safari")||-1!==Go.indexOf("Chrome")||-1!==Go.indexOf("Windows Phone"))&&window.history&&"function"==typeof window.history.pushState);function Ko(e,t){Fo();var n=window.history;try{if(t){var r=Ri({},n.state);r.key=Ro(),n.replaceState(r,"",e)}else n.pushState({key:Mo($o())},"",e)}catch(n){window.location[t?"replace":"assign"](e)}}function Jo(e){Ko(e,!0)}function Xo(e,t,n){var r=function(i){i>=e.length?n():e[i]?t(e[i],(function(){r(i+1)})):r(i+1)};r(0)}var Yo={redirected:2,aborted:4,cancelled:8,duplicated:16};function Qo(e,t){return el(e,t,Yo.redirected,'Redirected when going from "'+e.fullPath+'" to "'+function(e){if("string"==typeof e)return e;if("path"in e)return e.path;var t={};return tl.forEach((function(n){n in e&&(t[n]=e[n])})),JSON.stringify(t,null,2)}(t)+'" via a navigation guard.')}function Zo(e,t){return el(e,t,Yo.cancelled,'Navigation cancelled from "'+e.fullPath+'" to "'+t.fullPath+'" with a new navigation.')}function el(e,t,n,r){var i=new Error(r);return i._isRouter=!0,i.from=e,i.to=t,i.type=n,i}var tl=["params","query","hash"];function nl(e){return Object.prototype.toString.call(e).indexOf("Error")>-1}function rl(e,t){return nl(e)&&e._isRouter&&(null==t||e.type===t)}function il(e){return function(t,n,r){var i=!1,o=0,l=null;ol(e,(function(e,t,n,a){if("function"==typeof e&&void 0===e.cid){i=!0,o++;var u,s=ul((function(t){var i;((i=t).__esModule||al&&"Module"===i[Symbol.toStringTag])&&(t=t.default),e.resolved="function"==typeof t?t:xo.extend(t),n.components[a]=t,--o<=0&&r()})),c=ul((function(e){var t="Failed to resolve async component "+a+": "+e;l||(l=nl(e)?e:new Error(t),r(l))}));try{u=e(s,c)}catch(e){c(e)}if(u)if("function"==typeof u.then)u.then(s,c);else{var f=u.component;f&&"function"==typeof f.then&&f.then(s,c)}}})),i||r()}}function ol(e,t){return ll(e.map((function(e){return Object.keys(e.components).map((function(n){return t(e.components[n],e.instances[n],e,n)}))})))}function ll(e){return Array.prototype.concat.apply([],e)}var al="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function ul(e){var t=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!t)return t=!0,e.apply(this,n)}}var sl=function(e,t){this.router=e,this.base=function(e){if(!e)if(So){var t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else e="/";"/"!==e.charAt(0)&&(e="/"+e);return e.replace(/\/$/,"")}(t),this.current=Gi,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function cl(e,t,n,r){var i=ol(e,(function(e,r,i,o){var l=function(e,t){"function"!=typeof e&&(e=xo.extend(e));return e.options[t]}(e,t);if(l)return Array.isArray(l)?l.map((function(e){return n(e,r,i,o)})):n(l,r,i,o)}));return ll(r?i.reverse():i)}function fl(e,t){if(t)return function(){return e.apply(t,arguments)}}sl.prototype.listen=function(e){this.cb=e},sl.prototype.onReady=function(e,t){this.ready?e():(this.readyCbs.push(e),t&&this.readyErrorCbs.push(t))},sl.prototype.onError=function(e){this.errorCbs.push(e)},sl.prototype.transitionTo=function(e,t,n){var r,i=this;try{r=this.router.match(e,this.current)}catch(e){throw this.errorCbs.forEach((function(t){t(e)})),e}var o=this.current;this.confirmTransition(r,(function(){i.updateRoute(r),t&&t(r),i.ensureURL(),i.router.afterHooks.forEach((function(e){e&&e(r,o)})),i.ready||(i.ready=!0,i.readyCbs.forEach((function(e){e(r)})))}),(function(e){n&&n(e),e&&!i.ready&&(rl(e,Yo.redirected)&&o===Gi||(i.ready=!0,i.readyErrorCbs.forEach((function(t){t(e)}))))}))},sl.prototype.confirmTransition=function(e,t,n){var r=this,i=this.current;this.pending=e;var o,l,a=function(e){!rl(e)&&nl(e)&&(r.errorCbs.length?r.errorCbs.forEach((function(t){t(e)})):console.error(e)),n&&n(e)},u=e.matched.length-1,s=i.matched.length-1;if(Ji(e,i)&&u===s&&e.matched[u]===i.matched[s])return this.ensureURL(),a(((l=el(o=i,e,Yo.duplicated,'Avoided redundant navigation to current location: "'+o.fullPath+'".')).name="NavigationDuplicated",l));var c=function(e,t){var n,r=Math.max(e.length,t.length);for(n=0;n<r&&e[n]===t[n];n++);return{updated:t.slice(0,n),activated:t.slice(n),deactivated:e.slice(n)}}(this.current.matched,e.matched),f=c.updated,p=c.deactivated,v=c.activated,h=[].concat(function(e){return cl(e,"beforeRouteLeave",fl,!0)}(p),this.router.beforeHooks,function(e){return cl(e,"beforeRouteUpdate",fl)}(f),v.map((function(e){return e.beforeEnter})),il(v)),m=function(t,n){if(r.pending!==e)return a(Zo(i,e));try{t(e,i,(function(t){!1===t?(r.ensureURL(!0),a(function(e,t){return el(e,t,Yo.aborted,'Navigation aborted from "'+e.fullPath+'" to "'+t.fullPath+'" via a navigation guard.')}(i,e))):nl(t)?(r.ensureURL(!0),a(t)):"string"==typeof t||"object"==typeof t&&("string"==typeof t.path||"string"==typeof t.name)?(a(Qo(i,e)),"object"==typeof t&&t.replace?r.replace(t):r.push(t)):n(t)}))}catch(e){a(e)}};Xo(h,m,(function(){Xo(function(e){return cl(e,"beforeRouteEnter",(function(e,t,n,r){return function(e,t,n){return function(r,i,o){return e(r,i,(function(e){"function"==typeof e&&(t.enteredCbs[n]||(t.enteredCbs[n]=[]),t.enteredCbs[n].push(e)),o(e)}))}}(e,n,r)}))}(v).concat(r.router.resolveHooks),m,(function(){if(r.pending!==e)return a(Zo(i,e));r.pending=null,t(e),r.router.app&&r.router.app.$nextTick((function(){Yi(e)}))}))}))},sl.prototype.updateRoute=function(e){this.current=e,this.cb&&this.cb(e)},sl.prototype.setupListeners=function(){},sl.prototype.teardown=function(){this.listeners.forEach((function(e){e()})),this.listeners=[],this.current=Gi,this.pending=null};var pl=function(e){function t(t,n){e.call(this,t,n),this._startLocation=vl(this.base)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router,n=t.options.scrollBehavior,r=Wo&&n;r&&this.listeners.push(Do());var i=function(){var n=e.current,i=vl(e.base);e.current===Gi&&i===e._startLocation||e.transitionTo(i,(function(e){r&&No(t,e,n,!0)}))};window.addEventListener("popstate",i),this.listeners.push((function(){window.removeEventListener("popstate",i)}))}},t.prototype.go=function(e){window.history.go(e)},t.prototype.push=function(e,t,n){var r=this,i=this.current;this.transitionTo(e,(function(e){Ko(to(r.base+e.fullPath)),No(r.router,e,i,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,i=this.current;this.transitionTo(e,(function(e){Jo(to(r.base+e.fullPath)),No(r.router,e,i,!1),t&&t(e)}),n)},t.prototype.ensureURL=function(e){if(vl(this.base)!==this.current.fullPath){var t=to(this.base+this.current.fullPath);e?Ko(t):Jo(t)}},t.prototype.getCurrentLocation=function(){return vl(this.base)},t}(sl);function vl(e){var t=window.location.pathname;return e&&0===t.toLowerCase().indexOf(e.toLowerCase())&&(t=t.slice(e.length)),(t||"/")+window.location.search+window.location.hash}var hl=function(e){function t(t,n,r){e.call(this,t,n),r&&function(e){var t=vl(e);if(!/^\/#/.test(t))return window.location.replace(to(e+"/#"+t)),!0}(this.base)||ml()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.setupListeners=function(){var e=this;if(!(this.listeners.length>0)){var t=this.router.options.scrollBehavior,n=Wo&&t;n&&this.listeners.push(Do());var r=function(){var t=e.current;ml()&&e.transitionTo(gl(),(function(r){n&&No(e.router,r,t,!0),Wo||yl(r.fullPath)}))},i=Wo?"popstate":"hashchange";window.addEventListener(i,r),this.listeners.push((function(){window.removeEventListener(i,r)}))}},t.prototype.push=function(e,t,n){var r=this,i=this.current;this.transitionTo(e,(function(e){bl(e.fullPath),No(r.router,e,i,!1),t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this,i=this.current;this.transitionTo(e,(function(e){yl(e.fullPath),No(r.router,e,i,!1),t&&t(e)}),n)},t.prototype.go=function(e){window.history.go(e)},t.prototype.ensureURL=function(e){var t=this.current.fullPath;gl()!==t&&(e?bl(t):yl(t))},t.prototype.getCurrentLocation=function(){return gl()},t}(sl);function ml(){var e=gl();return"/"===e.charAt(0)||(yl("/"+e),!1)}function gl(){var e=window.location.href,t=e.indexOf("#");return t<0?"":e=e.slice(t+1)}function dl(e){var t=window.location.href,n=t.indexOf("#");return(n>=0?t.slice(0,n):t)+"#"+e}function bl(e){Wo?Ko(dl(e)):window.location.hash=e}function yl(e){Wo?Jo(dl(e)):window.location.replace(dl(e))}var _l=function(e){function t(t,n){e.call(this,t,n),this.stack=[],this.index=-1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.push=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index+1).concat(e),r.index++,t&&t(e)}),n)},t.prototype.replace=function(e,t,n){var r=this;this.transitionTo(e,(function(e){r.stack=r.stack.slice(0,r.index).concat(e),t&&t(e)}),n)},t.prototype.go=function(e){var t=this,n=this.index+e;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var e=t.current;t.index=n,t.updateRoute(r),t.router.afterHooks.forEach((function(t){t&&t(r,e)}))}),(function(e){rl(e,Yo.duplicated)&&(t.index=n)}))}},t.prototype.getCurrentLocation=function(){var e=this.stack[this.stack.length-1];return e?e.fullPath:"/"},t.prototype.ensureURL=function(){},t}(sl),wl=function(e){void 0===e&&(e={}),this.app=null,this.apps=[],this.options=e,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=Ao(e.routes||[],this);var t=e.mode||"hash";switch(this.fallback="history"===t&&!Wo&&!1!==e.fallback,this.fallback&&(t="hash"),So||(t="abstract"),this.mode=t,t){case"history":this.history=new pl(this,e.base);break;case"hash":this.history=new hl(this,e.base,this.fallback);break;case"abstract":this.history=new _l(this,e.base);break;default:0}},xl={currentRoute:{configurable:!0}};function kl(e,t){return e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}wl.prototype.match=function(e,t,n){return this.matcher.match(e,t,n)},xl.currentRoute.get=function(){return this.history&&this.history.current},wl.prototype.init=function(e){var t=this;if(this.apps.push(e),e.$once("hook:destroyed",(function(){var n=t.apps.indexOf(e);n>-1&&t.apps.splice(n,1),t.app===e&&(t.app=t.apps[0]||null),t.app||t.history.teardown()})),!this.app){this.app=e;var n=this.history;if(n instanceof pl||n instanceof hl){var r=function(e){n.setupListeners(),function(e){var r=n.current,i=t.options.scrollBehavior;Wo&&i&&"fullPath"in e&&No(t,e,r,!1)}(e)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(e){t.apps.forEach((function(t){t._route=e}))}))}},wl.prototype.beforeEach=function(e){return kl(this.beforeHooks,e)},wl.prototype.beforeResolve=function(e){return kl(this.resolveHooks,e)},wl.prototype.afterEach=function(e){return kl(this.afterHooks,e)},wl.prototype.onReady=function(e,t){this.history.onReady(e,t)},wl.prototype.onError=function(e){this.history.onError(e)},wl.prototype.push=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.push(e,t,n)}));this.history.push(e,t,n)},wl.prototype.replace=function(e,t,n){var r=this;if(!t&&!n&&"undefined"!=typeof Promise)return new Promise((function(t,n){r.history.replace(e,t,n)}));this.history.replace(e,t,n)},wl.prototype.go=function(e){this.history.go(e)},wl.prototype.back=function(){this.go(-1)},wl.prototype.forward=function(){this.go(1)},wl.prototype.getMatchedComponents=function(e){var t=e?e.matched?e:this.resolve(e).route:this.currentRoute;return t?[].concat.apply([],t.matched.map((function(e){return Object.keys(e.components).map((function(t){return e.components[t]}))}))):[]},wl.prototype.resolve=function(e,t,n){var r=wo(e,t=t||this.history.current,n,this),i=this.match(r,t),o=i.redirectedFrom||i.fullPath;return{location:r,route:i,href:function(e,t,n){var r="hash"===n?"#"+t:t;return e?to(e+"/"+r):r}(this.history.base,o,this.mode),normalizedTo:r,resolved:i}},wl.prototype.getRoutes=function(){return this.matcher.getRoutes()},wl.prototype.addRoute=function(e,t){this.matcher.addRoute(e,t),this.history.current!==Gi&&this.history.transitionTo(this.history.getCurrentLocation())},wl.prototype.addRoutes=function(e){this.matcher.addRoutes(e),this.history.current!==Gi&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(wl.prototype,xl),wl.install=function e(t){if(!e.installed||xo!==t){e.installed=!0,xo=t;var n=function(e){return void 0!==e},r=function(e,t){var r=e.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(e,t)};t.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),t.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(t.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(t.prototype,"$route",{get:function(){return this._routerRoot._route}}),t.component("RouterView",Qi),t.component("RouterLink",Po);var i=t.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created}},wl.version="3.5.1",wl.isNavigationFailure=rl,wl.NavigationFailureType=Yo,wl.START_LOCATION=Gi,So&&window.Vue&&window.Vue.use(wl);var Pl=wl;n(134),n(135),n(202),n(70),n(204),n(47),n(48),n(205);function El(e){e.locales&&Object.keys(e.locales).forEach((function(t){e.locales[t].path=t})),Object.freeze(e)}n(29),n(43),n(60);var Sl=n(45),Ol=(n(141),n(69),n(30),n(181),n(182),{NotFound:function(){return n.e(35).then(n.bind(null,440))},Layout:function(){return Promise.all([n.e(0),n.e(2),n.e(34)]).then(n.bind(null,441))}}),jl={"v-62b07b7e":function(){return n.e(36).then(n.bind(null,447))},"v-201975f9":function(){return Promise.all([n.e(0),n.e(16)]).then(n.bind(null,448))},"v-2445f1a2":function(){return n.e(37).then(n.bind(null,449))},"v-4cf81808":function(){return Promise.all([n.e(0),n.e(17)]).then(n.bind(null,450))},"v-48f57bc8":function(){return n.e(38).then(n.bind(null,451))},"v-0c274f2c":function(){return Promise.all([n.e(0),n.e(18)]).then(n.bind(null,452))},"v-4a469568":function(){return n.e(39).then(n.bind(null,453))},"v-3edf5530":function(){return Promise.all([n.e(0),n.e(19)]).then(n.bind(null,454))},"v-75cbffe2":function(){return n.e(40).then(n.bind(null,455))},"v-018dc4c2":function(){return n.e(42).then(n.bind(null,456))},"v-098ff098":function(){return n.e(41).then(n.bind(null,457))},"v-64ed9002":function(){return n.e(43).then(n.bind(null,458))},"v-99d5d508":function(){return n.e(44).then(n.bind(null,459))},"v-f08e9488":function(){return n.e(46).then(n.bind(null,460))},"v-3e259288":function(){return n.e(45).then(n.bind(null,461))},"v-5d1ca9ca":function(){return n.e(47).then(n.bind(null,462))},"v-fec069a2":function(){return n.e(4).then(n.bind(null,463))},"v-f3931088":function(){return n.e(49).then(n.bind(null,464))},"v-2ec60cd8":function(){return n.e(48).then(n.bind(null,465))},"v-68bef4bc":function(){return n.e(50).then(n.bind(null,466))},"v-b757e462":function(){return n.e(3).then(n.bind(null,467))},"v-4c23587c":function(){return n.e(51).then(n.bind(null,468))},"v-4cb3b633":function(){return n.e(5).then(n.bind(null,469))},"v-c8c26cd8":function(){return n.e(53).then(n.bind(null,470))},"v-45edc4c0":function(){return n.e(52).then(n.bind(null,471))},"v-e67d8608":function(){return n.e(55).then(n.bind(null,472))},"v-35cc7bbe":function(){return n.e(54).then(n.bind(null,473))},"v-90740bc8":function(){return n.e(56).then(n.bind(null,474))},"v-3a6a9188":function(){return n.e(57).then(n.bind(null,475))},"v-0dcf745c":function(){return n.e(58).then(n.bind(null,476))},"v-28525bbc":function(){return n.e(59).then(n.bind(null,477))},"v-1ad83bba":function(){return n.e(60).then(n.bind(null,478))},"v-0d5e1bb8":function(){return n.e(61).then(n.bind(null,479))},"v-00380894":function(){return n.e(62).then(n.bind(null,480))},"v-1b2c4898":function(){return n.e(63).then(n.bind(null,481))},"v-3620889c":function(){return n.e(64).then(n.bind(null,482))},"v-6c0908a4":function(){return n.e(66).then(n.bind(null,483))},"v-5114c8a0":function(){return n.e(65).then(n.bind(null,484))},"v-0de5086f":function(){return n.e(6).then(n.bind(null,485))},"v-2c783cca":function(){return n.e(68).then(n.bind(null,486))},"v-950a9b7c":function(){return n.e(67).then(n.bind(null,487))},"v-008138c2":function(){return n.e(9).then(n.bind(null,488))},"v-fc42184a":function(){return n.e(69).then(n.bind(null,489))},"v-76560d69":function(){return n.e(10).then(n.bind(null,490))},"v-219b55dc":function(){return n.e(70).then(n.bind(null,491))},"v-b0fff48e":function(){return n.e(11).then(n.bind(null,492))},"v-0e58507c":function(){return Promise.all([n.e(0),n.e(20)]).then(n.bind(null,493))},"v-0034c43c":function(){return n.e(71).then(n.bind(null,494))},"v-9d85d47c":function(){return n.e(73).then(n.bind(null,495))},"v-b57eec6e":function(){return n.e(72).then(n.bind(null,496))},"v-5838ba22":function(){return n.e(74).then(n.bind(null,497))},"v-53fd0a28":function(){return n.e(76).then(n.bind(null,498))},"v-9e30ec3c":function(){return n.e(77).then(n.bind(null,499))},"v-08844344":function(){return n.e(78).then(n.bind(null,500))},"v-c1c04cb0":function(){return n.e(79).then(n.bind(null,501))},"v-2f1d2102":function(){return n.e(80).then(n.bind(null,502))},"v-28e2a2fc":function(){return n.e(81).then(n.bind(null,503))},"v-4947aa84":function(){return n.e(75).then(n.bind(null,504))},"v-b001937c":function(){return n.e(84).then(n.bind(null,505))},"v-33bd0cfc":function(){return n.e(85).then(n.bind(null,506))},"v-102cf97c":function(){return n.e(86).then(n.bind(null,507))},"v-4319977c":function(){return n.e(83).then(n.bind(null,508))},"v-028d2d02":function(){return n.e(87).then(n.bind(null,509))},"v-7c918242":function(){return n.e(89).then(n.bind(null,510))},"v-3bfaefe2":function(){return n.e(88).then(n.bind(null,511))},"v-76763322":function(){return n.e(90).then(n.bind(null,512))},"v-66133362":function(){return n.e(91).then(n.bind(null,513))},"v-6a3f2ded":function(){return Promise.all([n.e(0),n.e(21)]).then(n.bind(null,514))},"v-0ce9b149":function(){return Promise.all([n.e(0),n.e(22)]).then(n.bind(null,515))},"v-16a7e8ef":function(){return n.e(92).then(n.bind(null,516))},"v-5cc50deb":function(){return Promise.all([n.e(0),n.e(23)]).then(n.bind(null,517))},"v-21d279a9":function(){return Promise.all([n.e(0),n.e(24)]).then(n.bind(null,518))},"v-4f4aede9":function(){return Promise.all([n.e(0),n.e(25)]).then(n.bind(null,519))},"v-36bb4209":function(){return n.e(93).then(n.bind(null,520))},"v-22f9de2c":function(){return Promise.all([n.e(0),n.e(26)]).then(n.bind(null,521))},"v-5f746735":function(){return n.e(94).then(n.bind(null,522))},"v-33a8aa68":function(){return n.e(95).then(n.bind(null,523))},"v-15b27d76":function(){return n.e(96).then(n.bind(null,524))},"v-bb7c29c2":function(){return n.e(97).then(n.bind(null,525))},"v-e6dc1a8e":function(){return n.e(98).then(n.bind(null,526))},"v-bdc22caa":function(){return n.e(99).then(n.bind(null,527))},"v-f8803096":function(){return n.e(100).then(n.bind(null,528))},"v-e9c50156":function(){return n.e(101).then(n.bind(null,529))},"v-806a9216":function(){return n.e(102).then(n.bind(null,530))},"v-72583b79":function(){return n.e(103).then(n.bind(null,531))},"v-0d35fe4a":function(){return n.e(105).then(n.bind(null,532))},"v-7b6e0375":function(){return n.e(104).then(n.bind(null,533))},"v-4a892a39":function(){return n.e(106).then(n.bind(null,534))},"v-b7c1c716":function(){return n.e(107).then(n.bind(null,535))},"v-06a74941":function(){return n.e(108).then(n.bind(null,536))},"v-26d4fb35":function(){return n.e(109).then(n.bind(null,537))},"v-e9e24d76":function(){return n.e(110).then(n.bind(null,538))},"v-90ba0f96":function(){return n.e(111).then(n.bind(null,539))},"v-86ceafd6":function(){return n.e(112).then(n.bind(null,540))},"v-62cc0675":function(){return n.e(113).then(n.bind(null,541))},"v-7a84cc95":function(){return n.e(114).then(n.bind(null,542))},"v-22f52116":function(){return n.e(115).then(n.bind(null,543))},"v-0142be95":function(){return n.e(116).then(n.bind(null,544))},"v-795b1575":function(){return n.e(117).then(n.bind(null,545))},"v-1b2e947b":function(){return n.e(118).then(n.bind(null,546))},"v-b60c71ca":function(){return n.e(119).then(n.bind(null,547))},"v-ec944a0a":function(){return n.e(120).then(n.bind(null,548))},"v-6b3df1fb":function(){return n.e(121).then(n.bind(null,549))},"v-09815a56":function(){return n.e(123).then(n.bind(null,550))},"v-c0138256":function(){return n.e(124).then(n.bind(null,551))},"v-0532e68b":function(){return n.e(122).then(n.bind(null,552))},"v-b53cbbb2":function(){return n.e(125).then(n.bind(null,553))},"v-8912fbb2":function(){return n.e(127).then(n.bind(null,554))},"v-63ac2b96":function(){return n.e(126).then(n.bind(null,555))},"v-66426022":function(){return n.e(128).then(n.bind(null,556))},"v-3f2d4756":function(){return n.e(129).then(n.bind(null,557))},"v-83988a96":function(){return n.e(130).then(n.bind(null,558))},"v-0565332e":function(){return n.e(131).then(n.bind(null,559))},"v-66c4aefb":function(){return n.e(132).then(n.bind(null,560))},"v-951bc86a":function(){return n.e(133).then(n.bind(null,561))},"v-67db8435":function(){return n.e(134).then(n.bind(null,562))},"v-3897e467":function(){return n.e(135).then(n.bind(null,563))},"v-de9c5c56":function(){return n.e(136).then(n.bind(null,564))},"v-6cf6124b":function(){return n.e(137).then(n.bind(null,565))},"v-f7008e16":function(){return n.e(138).then(n.bind(null,566))},"v-2e2b6335":function(){return n.e(139).then(n.bind(null,567))},"v-3a3a0756":function(){return n.e(140).then(n.bind(null,568))},"v-60fad023":function(){return n.e(142).then(n.bind(null,569))},"v-1d4ae015":function(){return n.e(141).then(n.bind(null,570))},"v-1d9b7615":function(){return n.e(143).then(n.bind(null,571))},"v-d74ef116":function(){return n.e(144).then(n.bind(null,572))},"v-66cb997d":function(){return n.e(146).then(n.bind(null,573))},"v-16c4ab75":function(){return n.e(145).then(n.bind(null,574))},"v-59ea6742":function(){return n.e(147).then(n.bind(null,575))},"v-2c5d2939":function(){return n.e(148).then(n.bind(null,576))},"v-011fb089":function(){return n.e(149).then(n.bind(null,577))},"v-5c0b0306":function(){return n.e(150).then(n.bind(null,578))},"v-722ca9c2":function(){return n.e(152).then(n.bind(null,579))},"v-1864c3fc":function(){return n.e(151).then(n.bind(null,580))},"v-f0de663c":function(){return n.e(153).then(n.bind(null,581))},"v-2df40409":function(){return n.e(154).then(n.bind(null,582))},"v-7a10e27c":function(){return n.e(155).then(n.bind(null,583))},"v-4da29082":function(){return n.e(156).then(n.bind(null,584))},"v-004f9e26":function(){return n.e(157).then(n.bind(null,585))},"v-3295aed6":function(){return n.e(158).then(n.bind(null,586))},"v-3508e088":function(){return n.e(160).then(n.bind(null,587))},"v-3fceaa9e":function(){return n.e(159).then(n.bind(null,588))},"v-90d832b0":function(){return n.e(161).then(n.bind(null,589))},"v-1a663dc8":function(){return n.e(163).then(n.bind(null,590))},"v-e33b2948":function(){return n.e(162).then(n.bind(null,591))},"v-c79ea330":function(){return n.e(164).then(n.bind(null,592))},"v-ab78c518":function(){return n.e(166).then(n.bind(null,593))},"v-40b3b808":function(){return n.e(165).then(n.bind(null,594))},"v-45ce9095":function(){return n.e(167).then(n.bind(null,595))},"v-cfa57196":function(){return n.e(168).then(n.bind(null,596))},"v-2ae80456":function(){return n.e(169).then(n.bind(null,597))},"v-ea498162":function(){return Promise.all([n.e(0),n.e(27)]).then(n.bind(null,598))},"v-ebe16b22":function(){return Promise.all([n.e(0),n.e(28)]).then(n.bind(null,599))},"v-731f771a":function(){return Promise.all([n.e(0),n.e(29)]).then(n.bind(null,600))},"v-48de67fb":function(){return Promise.all([n.e(0),n.e(30)]).then(n.bind(null,601))},"v-6f9a3a3f":function(){return Promise.all([n.e(0),n.e(31)]).then(n.bind(null,602))},"v-91d80de2":function(){return Promise.all([n.e(0),n.e(32)]).then(n.bind(null,603))},"v-8996fe2a":function(){return Promise.all([n.e(0),n.e(33)]).then(n.bind(null,604))},"v-43449878":function(){return n.e(82).then(n.bind(null,605))}};function Al(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var Cl=/-(\w)/g,Ll=Al((function(e){return e.replace(Cl,(function(e,t){return t?t.toUpperCase():""}))})),$l=/\B([A-Z])/g,Tl=Al((function(e){return e.replace($l,"-$1").toLowerCase()})),Rl=Al((function(e){return e.charAt(0).toUpperCase()+e.slice(1)}));function Ml(e,t){if(t)return e(t)?e(t):t.includes("-")?e(Rl(Ll(t))):e(Rl(t))||e(Tl(t))}var Il=Object.assign({},Ol,jl),Dl=function(e){return Il[e]},Nl=function(e){return jl[e]},Fl=function(e){return Ol[e]},Bl=function(e){return Ti.component(e)};function Ul(e){return Ml(Nl,e)}function zl(e){return Ml(Fl,e)}function Vl(e){return Ml(Dl,e)}function ql(e){return Ml(Bl,e)}function Hl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.all(t.filter((function(e){return e})).map(function(){var e=i(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ql(t)||!Vl(t)){e.next=5;break}return e.next=3,Vl(t)();case 3:n=e.sent,Ti.component(t,n.default);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()))}function Gl(e,t){"undefined"!=typeof window&&window.__VUEPRESS__&&(window.__VUEPRESS__[e]=t)}n(97);var Wl=n(66);function Kl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var l,a=e[Symbol.iterator]();!(r=(l=a.next()).done)&&(n.push(l.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(e,t)||Object(Wl.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n(177),n(104);var Jl=n(168),Xl=n.n(Jl),Yl={created:function(){if(this.siteMeta=this.$site.headTags.filter((function(e){return"meta"===Kl(e,1)[0]})).map((function(e){var t=Kl(e,2);t[0];return t[1]})),this.$ssrContext){var e=this.getMergedMetaTags();this.$ssrContext.title=this.$title,this.$ssrContext.lang=this.$lang,this.$ssrContext.pageMeta=(t=e)?t.map((function(e){var t="<meta";return Object.keys(e).forEach((function(n){t+=" ".concat(n,'="').concat(e[n],'"')})),t+">"})).join("\n "):"",this.$ssrContext.canonicalLink=Zl(this.$canonicalUrl)}var t},mounted:function(){this.currentMetaTags=Object(Sl.a)(document.querySelectorAll("meta")),this.updateMeta(),this.updateCanonicalLink()},methods:{updateMeta:function(){document.title=this.$title,document.documentElement.lang=this.$lang;var e=this.getMergedMetaTags();this.currentMetaTags=ea(e,this.currentMetaTags)},getMergedMetaTags:function(){var e=this.$page.frontmatter.meta||[];return Xl()([{name:"description",content:this.$description}],e,this.siteMeta,ta)},updateCanonicalLink:function(){Ql(),this.$canonicalUrl&&document.head.insertAdjacentHTML("beforeend",Zl(this.$canonicalUrl))}},watch:{$page:function(){this.updateMeta(),this.updateCanonicalLink()}},beforeDestroy:function(){ea(null,this.currentMetaTags),Ql()}};function Ql(){var e=document.querySelector("link[rel='canonical']");e&&e.remove()}function Zl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e?'<link href="'.concat(e,'" rel="canonical" />'):""}function ea(e,t){if(t&&Object(Sl.a)(t).filter((function(e){return e.parentNode===document.head})).forEach((function(e){return document.head.removeChild(e)})),e)return e.map((function(e){var t=document.createElement("meta");return Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])})),document.head.appendChild(t),t}))}function ta(e){for(var t=0,n=["name","property","itemprop"];t<n.length;t++){var r=n[t];if(e.hasOwnProperty(r))return e[r]+r}return JSON.stringify(e)}n(96);var na=n(169),ra={mounted:function(){window.addEventListener("scroll",this.onScroll)},methods:{onScroll:n.n(na)()((function(){this.setActiveHash()}),300),setActiveHash:function(){for(var e=this,t=[].slice.call(document.querySelectorAll(".sidebar-link")),n=[].slice.call(document.querySelectorAll(".header-anchor")).filter((function(e){return t.some((function(t){return t.hash===e.hash}))})),r=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),o=window.innerHeight+r,l=0;l<n.length;l++){var a=n[l],u=n[l+1],s=0===l&&0===r||r>=a.parentElement.offsetTop+10&&(!u||r<u.parentElement.offsetTop-10),c=decodeURIComponent(this.$route.hash);if(s&&c!==decodeURIComponent(a.hash)){var f=a;if(o===i)for(var p=l+1;p<n.length;p++)if(c===decodeURIComponent(n[p].hash))return;return this.$vuepress.$set("disableScrollBehavior",!0),void this.$router.replace(decodeURIComponent(f.hash),(function(){e.$nextTick((function(){e.$vuepress.$set("disableScrollBehavior",!1)}))}))}}}},beforeDestroy:function(){window.removeEventListener("scroll",this.onScroll)}},ia=(n(85),n(67)),oa=n.n(ia),la={mounted:function(){var e=this;oa.a.configure({showSpinner:!1}),this.$router.beforeEach((function(e,t,n){e.path===t.path||Ti.component(e.name)||oa.a.start(),n()})),this.$router.afterEach((function(){oa.a.done(),e.isSidebarOpen=!1}))}};n(304),n(305),n(95);function aa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ua(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}n(105),n(178);var sa={props:{parent:Object,code:String,options:{align:String,color:String,backgroundTransition:Boolean,backgroundColor:String,successText:String,staticIcon:Boolean}},data:function(){return{success:!1,originalBackground:null,originalTransition:null}},computed:{alignStyle:function(){var e={};return e[this.options.align]="7.5px",e},iconClass:function(){return this.options.staticIcon?"":"hover"}},mounted:function(){this.originalTransition=this.parent.style.transition,this.originalBackground=this.parent.style.background},beforeDestroy:function(){this.parent.style.transition=this.originalTransition,this.parent.style.background=this.originalBackground},methods:{hexToRgb:function(e){var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},copyToClipboard:function(e){var t=this;if(navigator.clipboard)navigator.clipboard.writeText(this.code).then((function(){t.setSuccessTransitions()}),(function(){}));else{var n=document.createElement("textarea");document.body.appendChild(n),n.value=this.code,n.select(),document.execCommand("Copy"),n.remove(),this.setSuccessTransitions()}},setSuccessTransitions:function(){var e=this;if(clearTimeout(this.successTimeout),this.options.backgroundTransition){this.parent.style.transition="background 350ms";var t=this.hexToRgb(this.options.backgroundColor);this.parent.style.background="rgba(".concat(t.r,", ").concat(t.g,", ").concat(t.b,", 0.1)")}this.success=!0,this.successTimeout=setTimeout((function(){e.options.backgroundTransition&&(e.parent.style.background=e.originalBackground,e.parent.style.transition=e.originalTransition),e.success=!1}),500)}}},ca=(n(307),n(25)),fa=Object(ca.a)(sa,(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"code-copy"},[n("svg",{class:e.iconClass,style:e.alignStyle,attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},on:{click:e.copyToClipboard}},[n("path",{attrs:{fill:"none",d:"M0 0h24v24H0z"}}),e._v(" "),n("path",{attrs:{fill:e.options.color,d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z"}})]),e._v(" "),n("span",{class:e.success?"success":"",style:e.alignStyle},[e._v("\n "+e._s(e.options.successText)+"\n ")])])}),[],!1,null,"49140617",null).exports,pa=(n(308),[Yl,ra,la,{updated:function(){this.update()},methods:{update:function(){setTimeout((function(){document.querySelectorAll('div[class*="language-"] pre').forEach((function(e){if(!e.classList.contains("code-copy-added")){var t=new(Ti.extend(fa));t.options=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ua(Object(n),!0).forEach((function(t){aa(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ua(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},{align:"bottom",color:"#27b1ff",backgroundTransition:!0,backgroundColor:"#0075b8",successText:"Copied!",staticIcon:!1}),t.code=e.innerText,t.parent=e,t.$mount(),e.classList.add("code-copy-added"),e.appendChild(t.$el)}}))}),100)}}}]),va={name:"GlobalLayout",computed:{layout:function(){var e=this.getLayout();return Gl("layout",e),Ti.component(e)}},methods:{getLayout:function(){if(this.$page.path){var e=this.$page.frontmatter.layout;return e&&(this.$vuepress.getLayoutAsyncComponent(e)||this.$vuepress.getVueComponent(e))?e:"Layout"}return"NotFound"}}},ha=Object(ca.a)(va,(function(){var e=this.$createElement;return(this._self._c||e)(this.layout,{tag:"component"})}),[],!1,null,null,null).exports;!function(e,t,n){var r;switch(t){case"components":e[t]||(e[t]={}),Object.assign(e[t],n);break;case"mixins":e[t]||(e[t]=[]),(r=e[t]).push.apply(r,Object(Sl.a)(n));break;default:throw new Error("Unknown option name.")}}(ha,"mixins",pa);var ma=[{name:"v-62b07b7e",path:"/ME.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-62b07b7e").then(n)}},{name:"v-201975f9",path:"/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-201975f9").then(n)}},{path:"/index.html",redirect:"/"},{name:"v-2445f1a2",path:"/_posts/2019-01-01-index.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-2445f1a2").then(n)}},{name:"v-4cf81808",path:"/animation/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4cf81808").then(n)}},{path:"/animation/index.html",redirect:"/animation/"},{name:"v-48f57bc8",path:"/animation/component/start.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-48f57bc8").then(n)}},{name:"v-0c274f2c",path:"/animation/lodash/cli.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0c274f2c").then(n)}},{name:"v-4a469568",path:"/animation/example/start.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4a469568").then(n)}},{name:"v-3edf5530",path:"/animation/lodash/start.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3edf5530").then(n)}},{name:"v-75cbffe2",path:"/blog/JavaScript/1.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-75cbffe2").then(n)}},{name:"v-018dc4c2",path:"/blog/JavaScript/eventLoop.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-018dc4c2").then(n)}},{name:"v-098ff098",path:"/blog/JavaScript/canvas.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-098ff098").then(n)}},{name:"v-64ed9002",path:"/blog/JavaScript/git.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-64ed9002").then(n)}},{name:"v-99d5d508",path:"/blog/algorithm/Heap.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-99d5d508").then(n)}},{name:"v-f08e9488",path:"/blog/algorithm/greedy.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-f08e9488").then(n)}},{name:"v-3e259288",path:"/blog/algorithm/dp.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3e259288").then(n)}},{name:"v-5d1ca9ca",path:"/blog/babel/1.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-5d1ca9ca").then(n)}},{name:"v-fec069a2",path:"/blog/axios/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-fec069a2").then(n)}},{path:"/blog/axios/index.html",redirect:"/blog/axios/"},{name:"v-f3931088",path:"/blog/java/throughout.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-f3931088").then(n)}},{name:"v-2ec60cd8",path:"/blog/egg/1.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-2ec60cd8").then(n)}},{name:"v-68bef4bc",path:"/blog/koa2/1.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-68bef4bc").then(n)}},{name:"v-b757e462",path:"/blog/koa/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-b757e462").then(n)}},{path:"/blog/koa/index.html",redirect:"/blog/koa/"},{name:"v-4c23587c",path:"/blog/koa2/2.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4c23587c").then(n)}},{name:"v-4cb3b633",path:"/blog/lodash/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4cb3b633").then(n)}},{path:"/blog/lodash/index.html",redirect:"/blog/lodash/"},{name:"v-c8c26cd8",path:"/blog/miniprogram/login.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-c8c26cd8").then(n)}},{name:"v-45edc4c0",path:"/blog/miniapp/6.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-45edc4c0").then(n)}},{name:"v-e67d8608",path:"/blog/performance/10.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-e67d8608").then(n)}},{name:"v-35cc7bbe",path:"/blog/performance/1.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-35cc7bbe").then(n)}},{name:"v-90740bc8",path:"/blog/performance/11.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-90740bc8").then(n)}},{name:"v-3a6a9188",path:"/blog/performance/12.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3a6a9188").then(n)}},{name:"v-0dcf745c",path:"/blog/performance/13.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0dcf745c").then(n)}},{name:"v-28525bbc",path:"/blog/performance/2.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-28525bbc").then(n)}},{name:"v-1ad83bba",path:"/blog/performance/3.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-1ad83bba").then(n)}},{name:"v-0d5e1bb8",path:"/blog/performance/4.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0d5e1bb8").then(n)}},{name:"v-00380894",path:"/blog/performance/5.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-00380894").then(n)}},{name:"v-1b2c4898",path:"/blog/performance/6.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-1b2c4898").then(n)}},{name:"v-3620889c",path:"/blog/performance/7.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3620889c").then(n)}},{name:"v-6c0908a4",path:"/blog/performance/9.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-6c0908a4").then(n)}},{name:"v-5114c8a0",path:"/blog/performance/8.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-5114c8a0").then(n)}},{name:"v-0de5086f",path:"/blog/redux/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0de5086f").then(n)}},{path:"/blog/redux/index.html",redirect:"/blog/redux/"},{name:"v-2c783cca",path:"/blog/tabbar/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-2c783cca").then(n)}},{path:"/blog/tabbar/index.html",redirect:"/blog/tabbar/"},{name:"v-950a9b7c",path:"/blog/sentry/README-juejin.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-950a9b7c").then(n)}},{name:"v-008138c2",path:"/blog/sentry/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-008138c2").then(n)}},{path:"/blog/sentry/index.html",redirect:"/blog/sentry/"},{name:"v-fc42184a",path:"/blog/timeline/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-fc42184a").then(n)}},{path:"/blog/timeline/index.html",redirect:"/blog/timeline/"},{name:"v-76560d69",path:"/blog/underscore/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-76560d69").then(n)}},{path:"/blog/underscore/index.html",redirect:"/blog/underscore/"},{name:"v-219b55dc",path:"/engine/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-219b55dc").then(n)}},{path:"/engine/index.html",redirect:"/engine/"},{name:"v-b0fff48e",path:"/blog/vuex/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-b0fff48e").then(n)}},{path:"/blog/vuex/index.html",redirect:"/blog/vuex/"},{name:"v-0e58507c",path:"/interview/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0e58507c").then(n)}},{path:"/interview/index.html",redirect:"/interview/"},{name:"v-0034c43c",path:"/interview/function/KeepDecimals.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0034c43c").then(n)}},{name:"v-9d85d47c",path:"/interview/function/currNowDay.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-9d85d47c").then(n)}},{name:"v-b57eec6e",path:"/interview/function/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-b57eec6e").then(n)}},{path:"/interview/function/index.html",redirect:"/interview/function/"},{name:"v-5838ba22",path:"/interview/function/debounce.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-5838ba22").then(n)}},{name:"v-53fd0a28",path:"/interview/function/fetch.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-53fd0a28").then(n)}},{name:"v-9e30ec3c",path:"/interview/function/filterArrayByKey.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-9e30ec3c").then(n)}},{name:"v-08844344",path:"/interview/function/filterEmoji.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-08844344").then(n)}},{name:"v-c1c04cb0",path:"/interview/function/filterTaxNumber.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-c1c04cb0").then(n)}},{name:"v-2f1d2102",path:"/interview/function/formRule.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-2f1d2102").then(n)}},{name:"v-28e2a2fc",path:"/interview/function/hasEmoji.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-28e2a2fc").then(n)}},{name:"v-4947aa84",path:"/interview/function/destination.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4947aa84").then(n)}},{name:"v-b001937c",path:"/interview/function/imageLoadSuccess.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-b001937c").then(n)}},{name:"v-33bd0cfc",path:"/interview/function/promisic.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-33bd0cfc").then(n)}},{name:"v-102cf97c",path:"/interview/function/px2rpx.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-102cf97c").then(n)}},{name:"v-4319977c",path:"/interview/function/hotelExample.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4319977c").then(n)}},{name:"v-028d2d02",path:"/interview/function/reverseAddress.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-028d2d02").then(n)}},{name:"v-7c918242",path:"/interview/function/throttle.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-7c918242").then(n)}},{name:"v-3bfaefe2",path:"/interview/function/subscribeMsg.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3bfaefe2").then(n)}},{name:"v-76763322",path:"/interview/function/videoCheck.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-76763322").then(n)}},{name:"v-66133362",path:"/interview/function/ze.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-66133362").then(n)}},{name:"v-6a3f2ded",path:"/interview/issues_1.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-6a3f2ded").then(n)}},{name:"v-0ce9b149",path:"/interview/issues_1/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0ce9b149").then(n)}},{path:"/interview/issues_1/index.html",redirect:"/interview/issues_1/"},{name:"v-16a7e8ef",path:"/interview/issues_176.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-16a7e8ef").then(n)}},{name:"v-5cc50deb",path:"/interview/issues_2.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-5cc50deb").then(n)}},{name:"v-21d279a9",path:"/interview/issues_2/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-21d279a9").then(n)}},{path:"/interview/issues_2/index.html",redirect:"/interview/issues_2/"},{name:"v-4f4aede9",path:"/interview/issues_3.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4f4aede9").then(n)}},{name:"v-36bb4209",path:"/interview/issues_3/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-36bb4209").then(n)}},{path:"/interview/issues_3/index.html",redirect:"/interview/issues_3/"},{name:"v-22f9de2c",path:"/miniprogram/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-22f9de2c").then(n)}},{path:"/miniprogram/index.html",redirect:"/miniprogram/"},{name:"v-5f746735",path:"/miniprogram/cli/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-5f746735").then(n)}},{path:"/miniprogram/cli/index.html",redirect:"/miniprogram/cli/"},{name:"v-33a8aa68",path:"/miniprogram/cli/introduce.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-33a8aa68").then(n)}},{name:"v-15b27d76",path:"/miniprogram/cli/plugin/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-15b27d76").then(n)}},{path:"/miniprogram/cli/plugin/index.html",redirect:"/miniprogram/cli/plugin/"},{name:"v-bb7c29c2",path:"/miniprogram/component/animation/transition.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-bb7c29c2").then(n)}},{name:"v-e6dc1a8e",path:"/miniprogram/component/basic/button.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-e6dc1a8e").then(n)}},{name:"v-bdc22caa",path:"/miniprogram/component/basic/icon.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-bdc22caa").then(n)}},{name:"v-f8803096",path:"/miniprogram/component/form/calendar.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-f8803096").then(n)}},{name:"v-e9c50156",path:"/miniprogram/component/form/checkbox.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-e9c50156").then(n)}},{name:"v-806a9216",path:"/miniprogram/component/form/form.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-806a9216").then(n)}},{name:"v-72583b79",path:"/miniprogram/component/form/image-clipper.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-72583b79").then(n)}},{name:"v-0d35fe4a",path:"/miniprogram/component/form/input.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0d35fe4a").then(n)}},{name:"v-7b6e0375",path:"/miniprogram/component/form/image-picker.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-7b6e0375").then(n)}},{name:"v-4a892a39",path:"/miniprogram/component/form/radio.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4a892a39").then(n)}},{name:"v-b7c1c716",path:"/miniprogram/component/form/rate.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-b7c1c716").then(n)}},{name:"v-06a74941",path:"/miniprogram/component/form/rules.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-06a74941").then(n)}},{name:"v-26d4fb35",path:"/miniprogram/component/form/textarea.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-26d4fb35").then(n)}},{name:"v-e9e24d76",path:"/miniprogram/component/layout/album.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-e9e24d76").then(n)}},{name:"v-90ba0f96",path:"/miniprogram/component/layout/card.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-90ba0f96").then(n)}},{name:"v-86ceafd6",path:"/miniprogram/component/layout/collapse.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-86ceafd6").then(n)}},{name:"v-62cc0675",path:"/miniprogram/component/layout/grid.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-62cc0675").then(n)}},{name:"v-7a84cc95",path:"/miniprogram/component/layout/index-list.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-7a84cc95").then(n)}},{name:"v-22f52116",path:"/miniprogram/component/layout/list.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-22f52116").then(n)}},{name:"v-0142be95",path:"/miniprogram/component/layout/sticky.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0142be95").then(n)}},{name:"v-795b1575",path:"/miniprogram/component/layout/water-flow.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-795b1575").then(n)}},{name:"v-1b2e947b",path:"/miniprogram/component/nav/capsule-bar.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-1b2e947b").then(n)}},{name:"v-b60c71ca",path:"/miniprogram/component/nav/combined-tabs.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-b60c71ca").then(n)}},{name:"v-ec944a0a",path:"/miniprogram/component/nav/segment.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-ec944a0a").then(n)}},{name:"v-6b3df1fb",path:"/miniprogram/component/nav/tab-bar.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-6b3df1fb").then(n)}},{name:"v-09815a56",path:"/miniprogram/component/response/action-sheet.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-09815a56").then(n)}},{name:"v-c0138256",path:"/miniprogram/component/response/dialog.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-c0138256").then(n)}},{name:"v-0532e68b",path:"/miniprogram/component/nav/tabs.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0532e68b").then(n)}},{name:"v-b53cbbb2",path:"/miniprogram/component/response/message.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-b53cbbb2").then(n)}},{name:"v-8912fbb2",path:"/miniprogram/component/response/toast.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-8912fbb2").then(n)}},{name:"v-63ac2b96",path:"/miniprogram/component/response/slide-view.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-63ac2b96").then(n)}},{name:"v-66426022",path:"/miniprogram/component/shopping/counter.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-66426022").then(n)}},{name:"v-3f2d4756",path:"/miniprogram/component/shopping/price.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3f2d4756").then(n)}},{name:"v-83988a96",path:"/miniprogram/component/shopping/search.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-83988a96").then(n)}},{name:"v-0565332e",path:"/miniprogram/component/start/info.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-0565332e").then(n)}},{name:"v-66c4aefb",path:"/miniprogram/component/start/start.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-66c4aefb").then(n)}},{name:"v-951bc86a",path:"/miniprogram/component/view/arc-popup.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-951bc86a").then(n)}},{name:"v-67db8435",path:"/miniprogram/component/view/avatar.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-67db8435").then(n)}},{name:"v-3897e467",path:"/miniprogram/component/view/badge.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3897e467").then(n)}},{name:"v-de9c5c56",path:"/miniprogram/component/view/circle.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-de9c5c56").then(n)}},{name:"v-6cf6124b",path:"/miniprogram/component/view/countdown.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-6cf6124b").then(n)}},{name:"v-f7008e16",path:"/miniprogram/component/view/loading.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-f7008e16").then(n)}},{name:"v-2e2b6335",path:"/miniprogram/component/view/loadmore.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-2e2b6335").then(n)}},{name:"v-3a3a0756",path:"/miniprogram/component/view/mask.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3a3a0756").then(n)}},{name:"v-60fad023",path:"/miniprogram/component/view/popover.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-60fad023").then(n)}},{name:"v-1d4ae015",path:"/miniprogram/component/view/notice-bar.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-1d4ae015").then(n)}},{name:"v-1d9b7615",path:"/miniprogram/component/view/popup.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-1d9b7615").then(n)}},{name:"v-d74ef116",path:"/miniprogram/component/view/progress.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-d74ef116").then(n)}},{name:"v-66cb997d",path:"/miniprogram/component/view/status-show.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-66cb997d").then(n)}},{name:"v-16c4ab75",path:"/miniprogram/component/view/skeleton.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-16c4ab75").then(n)}},{name:"v-59ea6742",path:"/miniprogram/component/view/steps.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-59ea6742").then(n)}},{name:"v-2c5d2939",path:"/miniprogram/component/view/tag.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-2c5d2939").then(n)}},{name:"v-011fb089",path:"/miniprogram/filter/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-011fb089").then(n)}},{path:"/miniprogram/filter/index.html",redirect:"/miniprogram/filter/"},{name:"v-5c0b0306",path:"/miniprogram/filter/array.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-5c0b0306").then(n)}},{name:"v-722ca9c2",path:"/miniprogram/filter/is.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-722ca9c2").then(n)}},{name:"v-1864c3fc",path:"/miniprogram/filter/classnames.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-1864c3fc").then(n)}},{name:"v-f0de663c",path:"/miniprogram/filter/string.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-f0de663c").then(n)}},{name:"v-2df40409",path:"/miniprogram/function/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-2df40409").then(n)}},{path:"/miniprogram/function/index.html",redirect:"/miniprogram/function/"},{name:"v-7a10e27c",path:"/miniprogram/function/promisic.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-7a10e27c").then(n)}},{name:"v-4da29082",path:"/miniprogram/function/px2rpx.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-4da29082").then(n)}},{name:"v-004f9e26",path:"/miniprogram/log/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-004f9e26").then(n)}},{path:"/miniprogram/log/index.html",redirect:"/miniprogram/log/"},{name:"v-3295aed6",path:"/miniprogram/start/QA.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3295aed6").then(n)}},{name:"v-3508e088",path:"/miniprogram/start/class.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3508e088").then(n)}},{name:"v-3fceaa9e",path:"/miniprogram/start/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-3fceaa9e").then(n)}},{path:"/miniprogram/start/index.html",redirect:"/miniprogram/start/"},{name:"v-90d832b0",path:"/miniprogram/start/component.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-90d832b0").then(n)}},{name:"v-1a663dc8",path:"/miniprogram/start/event.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-1a663dc8").then(n)}},{name:"v-e33b2948",path:"/miniprogram/start/contribute.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-e33b2948").then(n)}},{name:"v-c79ea330",path:"/miniprogram/start/open-function.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-c79ea330").then(n)}},{name:"v-ab78c518",path:"/miniprogram/start/wx.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-ab78c518").then(n)}},{name:"v-40b3b808",path:"/miniprogram/start/using.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-40b3b808").then(n)}},{name:"v-45ce9095",path:"/notes/1.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-45ce9095").then(n)}},{name:"v-cfa57196",path:"/notes/2.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-cfa57196").then(n)}},{name:"v-2ae80456",path:"/notes/3.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-2ae80456").then(n)}},{name:"v-ea498162",path:"/openSource/animation/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-ea498162").then(n)}},{path:"/openSource/animation/index.html",redirect:"/openSource/animation/"},{name:"v-ebe16b22",path:"/openSource/component/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-ebe16b22").then(n)}},{path:"/openSource/component/index.html",redirect:"/openSource/component/"},{name:"v-731f771a",path:"/openSource/function/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-731f771a").then(n)}},{path:"/openSource/function/index.html",redirect:"/openSource/function/"},{name:"v-48de67fb",path:"/openSource/gameEngine/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-48de67fb").then(n)}},{path:"/openSource/gameEngine/index.html",redirect:"/openSource/gameEngine/"},{name:"v-6f9a3a3f",path:"/openSource/martie/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-6f9a3a3f").then(n)}},{path:"/openSource/martie/index.html",redirect:"/openSource/martie/"},{name:"v-91d80de2",path:"/openSource/start/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-91d80de2").then(n)}},{path:"/openSource/start/index.html",redirect:"/openSource/start/"},{name:"v-8996fe2a",path:"/openSource/typhon/",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-8996fe2a").then(n)}},{path:"/openSource/typhon/index.html",redirect:"/openSource/typhon/"},{name:"v-43449878",path:"/interview/function/hotel.html",component:ha,beforeEnter:function(e,t,n){Hl("Layout","v-43449878").then(n)}},{path:"*",component:ha}],ga={title:"程序员思语",description:"程序员思语个人博客",base:"/",headTags:[["script",{src:"/assets/js/autopush-baidu.js"}],["script",{src:"/assets/js/autopush-360.js"}]],pages:[{frontmatter:{},regularPath:"/ME.html",relativePath:"ME.md",key:"v-62b07b7e",path:"/ME.html"},{frontmatter:{},regularPath:"/",relativePath:"README.md",key:"v-201975f9",path:"/"},{title:"【vue】跨域解决方案之proxyTable",frontmatter:{title:"【vue】跨域解决方案之proxyTable",date:"2017-12-28T00:00:00.000Z",categories:["frontEnd"],tags:["vue"]},regularPath:"/_posts/2019-01-01-index.html",relativePath:"_posts/2019-01-01-index.md",key:"v-2445f1a2",path:"/_posts/2019-01-01-index.html"},{title:"帧动画函数库",frontmatter:{},regularPath:"/animation/",relativePath:"animation/README.md",key:"v-4cf81808",path:"/animation/",headers:[{level:2,title:"帧动画函数库",slug:"帧动画函数库"}]},{title:"帧动画函数库",frontmatter:{},regularPath:"/animation/component/start.html",relativePath:"animation/component/start.md",key:"v-48f57bc8",path:"/animation/component/start.html",headers:[{level:2,title:"帧动画函数库",slug:"帧动画函数库"}]},{title:"帧动画函数库cli",frontmatter:{},regularPath:"/animation/lodash/cli.html",relativePath:"animation/lodash/cli.md",key:"v-0c274f2c",path:"/animation/lodash/cli.html",headers:[{level:2,title:"帧动画函数库cli",slug:"帧动画函数库cli"}]},{title:"No.1 小程序帧动画组件",frontmatter:{title:"No.1 小程序帧动画组件"},regularPath:"/animation/example/start.html",relativePath:"animation/example/start.md",key:"v-4a469568",path:"/animation/example/start.html",headers:[{level:2,title:"页面调用示例代码",slug:"页面调用示例代码"},{level:2,title:"组件示例代码",slug:"组件示例代码"},{level:2,title:"备注",slug:"备注"}]},{title:"帧动画函数库start",frontmatter:{},regularPath:"/animation/lodash/start.html",relativePath:"animation/lodash/start.md",key:"v-3edf5530",path:"/animation/lodash/start.html",headers:[{level:2,title:"帧动画函数库start",slug:"帧动画函数库start"}]},{title:"性能优化1",frontmatter:{},regularPath:"/blog/JavaScript/1.html",relativePath:"blog/JavaScript/1.md",key:"v-75cbffe2",path:"/blog/JavaScript/1.html",headers:[{level:2,title:"寻找性能瓶颈",slug:"寻找性能瓶颈"},{level:2,title:"移动端挑战多",slug:"移动端挑战多"},{level:2,title:"性能指标和优化目标",slug:"性能指标和优化目标"}]},{title:"Event Loop 和 JS 引擎、渲染引擎的关系",frontmatter:{},regularPath:"/blog/JavaScript/eventLoop.html",relativePath:"blog/JavaScript/eventLoop.md",key:"v-018dc4c2",path:"/blog/JavaScript/eventLoop.html"},{title:"微信小程序canvas",frontmatter:{},regularPath:"/blog/JavaScript/canvas.html",relativePath:"blog/JavaScript/canvas.md",key:"v-098ff098",path:"/blog/JavaScript/canvas.html",headers:[{level:2,title:"1 Canvas 绘图实现原理",slug:"_1-canvas-绘图实现原理"},{level:3,title:"1.1 初始化",slug:"_1-1-初始化"},{level:3,title:"1.2 提前加载图片资源",slug:"_1-2-提前加载图片资源"},{level:2,title:"1.3 创建渲染对象",slug:"_1-3-创建渲染对象"},{level:3,title:"1.3.1 气泡属性概览",slug:"_1-3-1-气泡属性概览"},{level:3,title:"1.3.2 曲线路径生成",slug:"_1-3-2-曲线路径生成"},{level:3,title:"1.3.3 放大缩小淡出",slug:"_1-3-3-放大缩小淡出"},{level:3,title:"1.3.4 边界处理和气泡管理",slug:"_1-3-4-边界处理和气泡管理"},{level:2,title:"1.4 动画绘制原理",slug:"_1-4-动画绘制原理"},{level:3,title:"1.4.1 点赞气泡生成",slug:"_1-4-1-点赞气泡生成"},{level:3,title:"1.4.2 动画绘制",slug:"_1-4-2-动画绘制"},{level:2,title:"1.5 清除渲染实例队列",slug:"_1-5-清除渲染实例队列"},{level:2,title:"1.7 旧版本的动画效果图",slug:"_1-7-旧版本的动画效果图"},{level:2,title:"最后",slug:"最后"}]},{title:"腾讯 Git 规范",frontmatter:{},regularPath:"/blog/JavaScript/git.html",relativePath:"blog/JavaScript/git.md",key:"v-64ed9002",path:"/blog/JavaScript/git.html",headers:[{level:2,title:"1. 前言",slug:"_1-前言"},{level:2,title:"2. 集中式工作流",slug:"_2-集中式工作流"},{level:2,title:"3. 功能分支工作流",slug:"_3-功能分支工作流"},{level:2,title:"4.Gitflow 工作流",slug:"_4-gitflow-工作流"},{level:2,title:"5.Forking 工作流",slug:"_5-forking-工作流"},{level:2,title:"6. 总结",slug:"_6-总结"}]},{title:"堆",frontmatter:{},regularPath:"/blog/algorithm/Heap.html",relativePath:"blog/algorithm/Heap.md",key:"v-99d5d508",path:"/blog/algorithm/Heap.html",headers:[{level:2,title:"二叉堆性质",slug:"二叉堆性质"},{level:2,title:"堆的实现",slug:"堆的实现"},{level:3,title:"No.1 2-3 heap",slug:"no-1-2-3-heap"},{level:3,title:"No.2 B-heap",slug:"no-2-b-heap"}]},{title:"贪心算法",frontmatter:{},regularPath:"/blog/algorithm/greedy.html",relativePath:"blog/algorithm/greedy.md",key:"v-f08e9488",path:"/blog/algorithm/greedy.html",headers:[{level:2,title:"1. 什么是贪⼼",slug:"_1-什么是贪心"},{level:2,title:"2. 贪⼼的套路",slug:"_2-贪心的套路"},{level:2,title:"3. 贪⼼⼀般解题步骤",slug:"_3-贪心一般解题步骤"},{level:2,title:"4. 实战",slug:"_4-实战"}]},{title:"贪心算法的局限性",frontmatter:{},regularPath:"/blog/algorithm/dp.html",relativePath:"blog/algorithm/dp.md",key:"v-3e259288",path:"/blog/algorithm/dp.html"},{frontmatter:{},regularPath:"/blog/babel/1.html",relativePath:"blog/babel/1.md",key:"v-5d1ca9ca",path:"/blog/babel/1.html"},{title:"No.1 学习 axios ,打造属于自己的请求库",frontmatter:{},regularPath:"/blog/axios/",relativePath:"blog/axios/README.md",key:"v-fec069a2",path:"/blog/axios/",headers:[{level:2,title:"1. 前言",slug:"_1-前言"},{level:2,title:"2. chrome 和 vscode 调试 axios 源码方法",slug:"_2-chrome-和-vscode-调试-axios-源码方法"},{level:3,title:"2.1 chrome 调试浏览器环境的 axios",slug:"_2-1-chrome-调试浏览器环境的-axios"},{level:3,title:"2.2 vscode 调试 node 环境的 axios",slug:"_2-2-vscode-调试-node-环境的-axios"},{level:2,title:"3. 先看 axios 结构是怎样的",slug:"_3-先看-axios-结构是怎样的"},{level:2,title:"4. axios 源码 初始化",slug:"_4-axios-源码-初始化"},{level:3,title:"4.1 lib/axios.js主文件",slug:"_4-1-lib-axios-js主文件"},{level:3,title:"4.2 核心构造函数 Axios",slug:"_4-2-核心构造函数-axios"},{level:3,title:"4.3 拦截器管理构造函数 InterceptorManager",slug:"_4-3-拦截器管理构造函数-interceptormanager"},{level:2,title:"5. 实例结合",slug:"_5-实例结合"},{level:3,title:"5.1 先看调用栈流程",slug:"_5-1-先看调用栈流程"},{level:3,title:"5.2 Axios.prototype.request 请求核心方法",slug:"_5-2-axios-prototype-request-请求核心方法"},{level:3,title:"5.3 dispatchRequest 最终派发请求",slug:"_5-3-dispatchrequest-最终派发请求"},{level:3,title:"5.4 adapter 适配器 真正发送请求",slug:"_5-4-adapter-适配器-真正发送请求"},{level:3,title:"5.5 dispatchRequest 之 取消模块",slug:"_5-5-dispatchrequest-之-取消模块"},{level:2,title:"6. 对比其他请求库",slug:"_6-对比其他请求库"},{level:3,title:"6.1 KoAjax",slug:"_6-1-koajax"},{level:3,title:"6.2 umi-request 阿里开源的请求库",slug:"_6-2-umi-request-阿里开源的请求库"},{level:2,title:"7. 总结",slug:"_7-总结"}]},{title:"并发处理中延迟与吞吐量的关系",frontmatter:{},regularPath:"/blog/java/throughout.html",relativePath:"blog/java/throughout.md",key:"v-f3931088",path:"/blog/java/throughout.html",headers:[{level:2,title:"theme: cyanosis",slug:"theme-cyanosis"},{level:2,title:"现象",slug:"现象"},{level:3,title:"什么是吞吐量,怎么衡量",slug:"什么是吞吐量-怎么衡量"},{level:3,title:"对于分布式系统,关于微服务对性能的影响。",slug:"对于分布式系统-关于微服务对性能的影响。"},{level:3,title:"2、对于GC和JVM,关于微服务对性能的影响。",slug:"_2、对于gc和jvm-关于微服务对性能的影响。"}]},{title:"Egg 入门",frontmatter:{},regularPath:"/blog/egg/1.html",relativePath:"blog/egg/1.md",key:"v-2ec60cd8",path:"/blog/egg/1.html"},{title:"Koa2",frontmatter:{},regularPath:"/blog/koa2/1.html",relativePath:"blog/koa2/1.md",key:"v-68bef4bc",path:"/blog/koa2/1.html",headers:[{level:2,title:"KOA核心机制",slug:"koa核心机制"},{level:2,title:"为什么要有洋葱模型",slug:"为什么要有洋葱模型"},{level:2,title:"中间件",slug:"中间件"},{level:2,title:"关注点",slug:"关注点"}]},{title:"No.2 学习 koa 源码的整体架构,浅析koa洋葱模型原理和co原理",frontmatter:{},regularPath:"/blog/koa/",relativePath:"blog/koa/README.md",key:"v-b757e462",path:"/blog/koa/",headers:[{level:2,title:"前言",slug:"前言"},{level:2,title:"本文阅读最佳方式",slug:"本文阅读最佳方式"},{level:2,title:"vscode 调试 koa 源码方法",slug:"vscode-调试-koa-源码方法"},{level:3,title:"使用文档中的中间件koa-compose例子来调试",slug:"使用文档中的中间件koa-compose例子来调试"},{level:2,title:"先看看 new Koa() 结果app是什么",slug:"先看看-new-koa-结果app是什么"},{level:3,title:"app 实例、context、request、request 官方API文档",slug:"app-实例、context、request、request-官方api文档"},{level:2,title:"koa 主流程梳理简化",slug:"koa-主流程梳理简化"},{level:2,title:"koa-compose 源码(洋葱模型实现)",slug:"koa-compose-源码-洋葱模型实现"},{level:2,title:"错误处理",slug:"错误处理"},{level:2,title:"koa2 和 koa1 的简单对比",slug:"koa2-和-koa1-的简单对比"},{level:3,title:"koa-convert 源码",slug:"koa-convert-源码"},{level:3,title:"co 源码",slug:"co-源码"},{level:3,title:"模拟实现简版 co(第一版)",slug:"模拟实现简版-co-第一版"},{level:3,title:"模拟实现简版 co(第二版)",slug:"模拟实现简版-co-第二版"},{level:3,title:"模拟实现简版 co(第三版)",slug:"模拟实现简版-co-第三版"},{level:3,title:"最终来看下co源码",slug:"最终来看下co源码"},{level:2,title:"koa 和 express 简单对比",slug:"koa-和-express-简单对比"},{level:2,title:"总结",slug:"总结"},{level:3,title:"解答下开头的提问",slug:"解答下开头的提问"},{level:3,title:"还能做些什么 ?",slug:"还能做些什么"}]},{title:"node进阶——之事无巨细手写koa源码",frontmatter:{},regularPath:"/blog/koa2/2.html",relativePath:"blog/koa2/2.md",key:"v-4c23587c",path:"/blog/koa2/2.html"},{title:"No.3 学习 lodash ,打造属于自己的函数式编程类库",frontmatter:{},regularPath:"/blog/lodash/",relativePath:"blog/lodash/README.md",key:"v-4cb3b633",path:"/blog/lodash/",headers:[{level:2,title:"1. 前言",slug:"_1-前言"},{level:2,title:"2. 匿名函数执行",slug:"_2-匿名函数执行"},{level:2,title:"3. runInContext 函数",slug:"_3-runincontext-函数"},{level:3,title:"3.1 LodashWrapper 函数",slug:"_3-1-lodashwrapper-函数"},{level:3,title:"3.2 baseCreate 原型继承",slug:"_3-2-basecreate-原型继承"},{level:3,title:"3.3 Object.create() 用法举例",slug:"_3-3-object-create-用法举例"},{level:2,title:"4. mixin",slug:"_4-mixin"},{level:3,title:"4.1 mixin 具体用法",slug:"_4-1-mixin-具体用法"},{level:3,title:"4.2 mixin 源码",slug:"_4-2-mixin-源码"},{level:3,title:"4.3 mixin 衍生的函数 keys",slug:"_4-3-mixin-衍生的函数-keys"},{level:3,title:"4.4 mixin 衍生的函数 baseFunctions",slug:"_4-4-mixin-衍生的函数-basefunctions"},{level:3,title:"4.5 mixin 衍生的函数 isFunction",slug:"_4-5-mixin-衍生的函数-isfunction"},{level:3,title:"4.6 mixin 衍生的函数 arrayEach",slug:"_4-6-mixin-衍生的函数-arrayeach"},{level:3,title:"4.7 mixin 衍生的函数 arrayPush",slug:"_4-7-mixin-衍生的函数-arraypush"},{level:3,title:"4.8 mixin 衍生的函数 copyArray",slug:"_4-8-mixin-衍生的函数-copyarray"},{level:3,title:"4.9 mixin 源码解析",slug:"_4-9-mixin-源码解析"},{level:2,title:"5. lodash 究竟在和.prototype挂载了多少方法和属性",slug:"_5-lodash-究竟在-和-prototype挂载了多少方法和属性"},{level:2,title:"6. 请出贯穿下文的简单的例子",slug:"_6-请出贯穿下文的简单的例子"},{level:2,title:"7. 添加 LazyWrapper 的方法到 lodash.prototype",slug:"_7-添加-lazywrapper-的方法到-lodash-prototype"},{level:2,title:"8. lodash.prototype.value 即 wrapperValue",slug:"_8-lodash-prototype-value-即-wrappervalue"},{level:2,title:"9. LazyWrapper.prototype.value 即 lazyValue 惰性求值",slug:"_9-lazywrapper-prototype-value-即-lazyvalue-惰性求值"},{level:2,title:"10. 总结",slug:"_10-总结"}]},{title:"小程序(五)用户登录架构设计",frontmatter:{},regularPath:"/blog/miniprogram/login.html",relativePath:"blog/miniprogram/login.md",key:"v-c8c26cd8",path:"/blog/miniprogram/login.html",headers:[{level:2,title:"1. 前言",slug:"_1-前言"},{level:2,title:"2. 静默登录",slug:"_2-静默登录"},{level:3,title:"2.1 静默登录流程时序",slug:"_2-1-静默登录流程时序"},{level:3,title:"2.2 开发者后台校验与解密开放数据",slug:"_2-2-开发者后台校验与解密开放数据"},{level:3,title:"2.3 session_key 的有效期",slug:"_2-3-session-key-的有效期"},{level:2,title:"3.「登录」架构",slug:"_3-「登录」架构"},{level:3,title:"3.1 libs - 提供登录相关的类方法供「业务层」调用",slug:"_3-1-libs-提供登录相关的类方法供「业务层」调用"},{level:2,title:"4. 静默登录的调用时机",slug:"_4-静默登录的调用时机"},{level:3,title:"4.1 小程序启动时调用",slug:"_4-1-小程序启动时调用"},{level:3,title:"4.2 接口请求发起时调用",slug:"_4-2-接口请求发起时调用"},{level:3,title:"4.3 wx.checkSession的不完全可靠",slug:"_4-3-wx-checksession的不完全可靠"},{level:3,title:"4.4 并发处理",slug:"_4-4-并发处理"},{level:2,title:"5. 用户登录流程",slug:"_5-用户登录流程"},{level:3,title:"5.1.1 用户身份定义",slug:"_5-1-1-用户身份定义"},{level:3,title:"5.1.2 用户登录触发场景",slug:"_5-1-2-用户登录触发场景"},{level:2,title:"6. 授权组件的封装",slug:"_6-授权组件的封装"},{level:2,title:"7. 总结",slug:"_7-总结"}]},{frontmatter:{},regularPath:"/blog/miniapp/6.html",relativePath:"blog/miniapp/6.md",key:"v-45edc4c0",path:"/blog/miniapp/6.html",headers:[{level:2,title:"一、小程序和H5的区别",slug:"一、小程序和h5的区别"},{level:3,title:"1.1 运行环境方面",slug:"_1-1-运行环境方面"},{level:3,title:"1.2 运行机制方面",slug:"_1-2-运行机制方面"},{level:3,title:"1.3 系统权限方面",slug:"_1-3-系统权限方面"},{level:3,title:"1.4 开发编码层面",slug:"_1-4-开发编码层面"},{level:3,title:"1.5 更新机制方面",slug:"_1-5-更新机制方面"},{level:3,title:"1.6 渲染机制方面",slug:"_1-6-渲染机制方面"},{level:2,title:"二、小程序环境分析",slug:"二、小程序环境分析"},{level:2,title:"三、H5浏览器环境分析",slug:"三、h5浏览器环境分析"},{level:2,title:"3.1 小程序中h5页面onShow和跨页面通信的实现",slug:"_3-1-小程序中h5页面onshow和跨页面通信的实现"},{level:2,title:"3.2 注意点",slug:"_3-2-注意点"},{level:3,title:"3.4 如何判断小程序当前页面所处的环境",slug:"_3-4-如何判断小程序当前页面所处的环境"}]},{title:"事件的节流(throttle)与防抖(debounce)",frontmatter:{},regularPath:"/blog/performance/10.html",relativePath:"blog/performance/10.md",key:"v-e67d8608",path:"/blog/performance/10.html",headers:[{level:2,title:"“节流”与“防抖”的本质",slug:"节流-与-防抖-的本质"},{level:2,title:"Throttle: 第一个人说了算",slug:"throttle-第一个人说了算"},{level:2,title:"Debounce: 最后一个人说了算",slug:"debounce-最后一个人说了算"},{level:2,title:"用 Throttle 来优化 Debounce",slug:"用-throttle-来优化-debounce"},{level:2,title:"小结",slug:"小结"}]},{title:"webpack 性能调优与 Gzip 原理",frontmatter:{},regularPath:"/blog/performance/1.html",relativePath:"blog/performance/1.md",key:"v-35cc7bbe",path:"/blog/performance/1.html",headers:[{level:2,title:"webpack 的性能瓶颈",slug:"webpack-的性能瓶颈"},{level:2,title:"webpack 优化方案",slug:"webpack-优化方案"},{level:3,title:"构建过程提速策略",slug:"构建过程提速策略"},{level:3,title:"构建结果体积压缩",slug:"构建结果体积压缩"},{level:2,title:"彩蛋:Gzip 压缩原理",slug:"彩蛋-gzip-压缩原理"},{level:3,title:"该不该用 Gzip",slug:"该不该用-gzip"},{level:3,title:"Gzip 是万能的吗",slug:"gzip-是万能的吗"},{level:3,title:"webpack 的 Gzip 和服务端的 Gzip",slug:"webpack-的-gzip-和服务端的-gzip"},{level:2,title:"小结",slug:"小结"}]},{frontmatter:{},regularPath:"/blog/performance/11.html",relativePath:"blog/performance/11.md",key:"v-90740bc8",path:"/blog/performance/11.html",headers:[{level:3,title:"应用场景",slug:"应用场景"},{level:3,title:"总结",slug:"总结"}]},{title:"浏览器缓存机制介绍与缓存策略剖析",frontmatter:{},regularPath:"/blog/performance/12.html",relativePath:"blog/performance/12.md",key:"v-3a6a9188",path:"/blog/performance/12.html",headers:[{level:2,title:"HTTP 缓存机制探秘",slug:"http-缓存机制探秘"},{level:3,title:"强缓存的特征",slug:"强缓存的特征"},{level:3,title:"强缓存的实现:从 expires 到 cache-control",slug:"强缓存的实现-从-expires-到-cache-control"},{level:3,title:"Cache-Control 应用分析",slug:"cache-control-应用分析"},{level:3,title:"协商缓存:浏览器与服务器合作之下的缓存策略",slug:"协商缓存-浏览器与服务器合作之下的缓存策略"},{level:3,title:"协商缓存的实现:从 Last-Modified 到 Etag",slug:"协商缓存的实现-从-last-modified-到-etag"},{level:2,title:"HTTP 缓存决策指南",slug:"http-缓存决策指南"},{level:2,title:"MemoryCache",slug:"memorycache"},{level:2,title:"Service Worker Cache",slug:"service-worker-cache"},{level:2,title:"Push Cache",slug:"push-cache"},{level:2,title:"小结",slug:"小结"}]},{title:"CDN 的缓存与回源机制解析",frontmatter:{},regularPath:"/blog/performance/13.html",relativePath:"blog/performance/13.md",key:"v-0dcf745c",path:"/blog/performance/13.html",headers:[{level:2,title:"写在小册的半山腰",slug:"写在小册的半山腰"},{level:2,title:"彩蛋:CDN的缓存与回源机制解析",slug:"彩蛋-cdn的缓存与回源机制解析"},{level:3,title:"为什么要用 CDN",slug:"为什么要用-cdn"},{level:3,title:"CDN 如何工作",slug:"cdn-如何工作"},{level:3,title:"CDN的核心功能特写",slug:"cdn的核心功能特写"},{level:3,title:"CDN 与前端性能优化",slug:"cdn-与前端性能优化"},{level:3,title:"CDN 的实际应用",slug:"cdn-的实际应用"},{level:3,title:"CDN 优化细节",slug:"cdn-优化细节"},{level:2,title:"小结",slug:"小结"}]},{title:"图片优化——质量与性能的博弈",frontmatter:{},regularPath:"/blog/performance/2.html",relativePath:"blog/performance/2.md",key:"v-28525bbc",path:"/blog/performance/2.html",headers:[{level:2,title:"2018 年,图片依然很大",slug:"_2018-年-图片依然很大"},{level:2,title:"不同业务场景下的图片方案选型",slug:"不同业务场景下的图片方案选型"},{level:3,title:"前置知识:二进制位数与色彩的关系",slug:"前置知识-二进制位数与色彩的关系"},{level:3,title:"JPEG/JPG",slug:"jpeg-jpg"},{level:3,title:"PNG-8 与 PNG-24",slug:"png-8-与-png-24"},{level:3,title:"SVG",slug:"svg"},{level:3,title:"Base64",slug:"base64"},{level:3,title:"WebP",slug:"webp"},{level:2,title:"小结",slug:"小结"}]},{title:"Performance、LightHouse 与性能 API",frontmatter:{},regularPath:"/blog/performance/3.html",relativePath:"blog/performance/3.md",key:"v-1ad83bba",path:"/blog/performance/3.html",headers:[{level:2,title:"可视化监测:从 Performance 面板说起",slug:"可视化监测-从-performance-面板说起"},{level:3,title:"开始记录",slug:"开始记录"},{level:3,title:"简要分析",slug:"简要分析"},{level:3,title:"挖掘性能瓶颈",slug:"挖掘性能瓶颈"},{level:2,title:"可视化监测: 更加聪明的 LightHouse",slug:"可视化监测-更加聪明的-lighthouse"},{level:2,title:"可编程的性能上报方案: W3C 性能 API",slug:"可编程的性能上报方案-w3c-性能-api"},{level:3,title:"访问 performance 对象",slug:"访问-performance-对象"},{level:3,title:"关键时间节点",slug:"关键时间节点"},{level:2,title:"小结",slug:"小结"}]},{title:"服务端渲染的探索与实践",frontmatter:{},regularPath:"/blog/performance/4.html",relativePath:"blog/performance/4.md",key:"v-0d5e1bb8",path:"/blog/performance/4.html",headers:[{level:2,title:"服务端渲染的运行机制",slug:"服务端渲染的运行机制"},{level:3,title:"客户端渲染",slug:"客户端渲染"},{level:3,title:"服务端渲染",slug:"服务端渲染"},{level:2,title:"服务端渲染解决了什么性能问题",slug:"服务端渲染解决了什么性能问题"},{level:2,title:"服务端渲染的应用实例",slug:"服务端渲染的应用实例"},{level:2,title:"服务端渲染的应用场景",slug:"服务端渲染的应用场景"}]},{title:"知己知彼——解锁浏览器背后的运行机制",frontmatter:{},regularPath:"/blog/performance/5.html",relativePath:"blog/performance/5.md",key:"v-00380894",path:"/blog/performance/5.html",headers:[{level:2,title:"浏览器的“心”",slug:"浏览器的-心"},{level:2,title:"开启浏览器渲染“黑盒”",slug:"开启浏览器渲染-黑盒"},{level:2,title:"浏览器渲染过程解析",slug:"浏览器渲染过程解析"},{level:2,title:"几棵重要的“树”",slug:"几棵重要的-树"},{level:2,title:"不做无用功:基于渲染流程的 CSS 优化建议",slug:"不做无用功-基于渲染流程的-css-优化建议"},{level:2,title:"告别阻塞:CSS 与 JS 的加载顺序优化",slug:"告别阻塞-css-与-js-的加载顺序优化"},{level:3,title:"CSS 的阻塞",slug:"css-的阻塞"},{level:3,title:"JS 的阻塞",slug:"js-的阻塞"},{level:3,title:"JS的三种加载方式",slug:"js的三种加载方式"},{level:2,title:"小结",slug:"小结"}]},{title:"对症下药—— DOM 优化原理与基本实践",frontmatter:{},regularPath:"/blog/performance/6.html",relativePath:"blog/performance/6.md",key:"v-1b2c4898",path:"/blog/performance/6.html",headers:[{level:2,title:"望闻问切:DOM 为什么这么慢",slug:"望闻问切-dom-为什么这么慢"},{level:3,title:"因为收了“过路费”",slug:"因为收了-过路费"},{level:3,title:"对 DOM 的修改引发样式的更迭",slug:"对-dom-的修改引发样式的更迭"},{level:2,title:"药到病除:给你的 DOM “提提速”",slug:"药到病除-给你的-dom-提提速"},{level:3,title:"减少 DOM 操作:少交“过路费”、避免过度渲染",slug:"减少-dom-操作-少交-过路费-、避免过度渲染"}]},{title:"千方百计——Event Loop 与异步更新策略",frontmatter:{},regularPath:"/blog/performance/7.html",relativePath:"blog/performance/7.md",key:"v-3620889c",path:"/blog/performance/7.html",headers:[{level:2,title:"前置知识:Event Loop 中的“渲染时机”",slug:"前置知识-event-loop-中的-渲染时机"},{level:3,title:"Micro-Task 与 Macro-Task",slug:"micro-task-与-macro-task"},{level:3,title:"Event Loop 过程解析",slug:"event-loop-过程解析"},{level:3,title:"渲染的时机",slug:"渲染的时机"},{level:2,title:"生产实践:异步更新策略——以 Vue 为例",slug:"生产实践-异步更新策略-以-vue-为例"},{level:3,title:"异步更新的优越性",slug:"异步更新的优越性"},{level:3,title:"Vue状态更新手法:nextTick",slug:"vue状态更新手法-nexttick"},{level:2,title:"小结",slug:"小结"}]},{title:"优化首屏体验——Lazy-Load 初探",frontmatter:{},regularPath:"/blog/performance/9.html",relativePath:"blog/performance/9.md",key:"v-6c0908a4",path:"/blog/performance/9.html",headers:[{level:2,title:"Lazy-Load 初相见",slug:"lazy-load-初相见"},{level:2,title:"一起写一个 Lazy-Load 吧!",slug:"一起写一个-lazy-load-吧"},{level:2,title:"小结",slug:"小结"}]},{title:"前言",frontmatter:{},regularPath:"/blog/performance/8.html",relativePath:"blog/performance/8.md",key:"v-5114c8a0",path:"/blog/performance/8.html",headers:[{level:3,title:"前言",slug:"前言"},{level:3,title:"回流与重绘",slug:"回流与重绘"},{level:2,title:"哪些实际操作会导致回流与重绘",slug:"哪些实际操作会导致回流与重绘"},{level:3,title:"回流的原因",slug:"回流的原因"},{level:3,title:"如何规避回流与重绘",slug:"如何规避回流与重绘"},{level:3,title:'将DOM"离线"',slug:"将dom-离线"},{level:3,title:"浏览器Flush队列",slug:"浏览器flush队列"},{level:3,title:"总结",slug:"总结"}]},{title:"No.4 学习 redux ,深入理解 redux 及其中间件原理",frontmatter:{},regularPath:"/blog/redux/",relativePath:"blog/redux/README.md",key:"v-0de5086f",path:"/blog/redux/",headers:[{level:2,title:"1. 前言",slug:"_1-前言"},{level:3,title:"1.1 本文阅读最佳方式",slug:"_1-1-本文阅读最佳方式"},{level:2,title:"2. git subtree 管理子仓库",slug:"_2-git-subtree-管理子仓库"},{level:2,title:"3. 调试 redux 源码准备工作",slug:"_3-调试-redux-源码准备工作"},{level:3,title:"3.1 rollup 生成 sourcemap 便于调试",slug:"_3-1-rollup-生成-sourcemap-便于调试"},{level:2,title:"4. 通过调试计数器例子的学习 redux 源码",slug:"_4-通过调试计数器例子的学习-redux-源码"},{level:3,title:"4.1 Redux.createSotre",slug:"_4-1-redux-createsotre"},{level:3,title:"4.2 store.dispatch(action)",slug:"_4-2-store-dispatch-action"},{level:3,title:"4.3 store.getState()",slug:"_4-3-store-getstate"},{level:3,title:"4.4 store.subscribe(listener)",slug:"_4-4-store-subscribe-listener"},{level:2,title:"5. Redux 中间件相关源码",slug:"_5-redux-中间件相关源码"},{level:3,title:"5.1 Redux.applyMiddleware(...middlewares)",slug:"_5-1-redux-applymiddleware-middlewares"},{level:3,title:"5.2 Redux.compose(...functions)",slug:"_5-2-redux-compose-functions"},{level:2,title:"6. Redux.combineReducers(reducers)",slug:"_6-redux-combinereducers-reducers"},{level:2,title:"7. Redux.bindActionCreators(actionCreators, dispatch)",slug:"_7-redux-bindactioncreators-actioncreators-dispatch"},{level:2,title:"8. vuex 和 redux 简单对比",slug:"_8-vuex-和-redux-简单对比"},{level:3,title:"8.1 源码实现形式",slug:"_8-1-源码实现形式"},{level:3,title:"8.2 耦合度",slug:"_8-2-耦合度"},{level:3,title:"8.3 扩展",slug:"_8-3-扩展"},{level:3,title:"8.4 上手难易度",slug:"_8-4-上手难易度"},{level:2,title:"9. 总结",slug:"_9-总结"}]},{title:"小程序自定义TabBar",frontmatter:{},regularPath:"/blog/tabbar/",relativePath:"blog/tabbar/index.md",key:"v-2c783cca",path:"/blog/tabbar/",headers:[{level:3,title:"1:配置信息",slug:"_1-配置信息"},{level:3,title:"2:添加文件在根目录新增组件文件",slug:"_2-添加文件在根目录新增组件文件"},{level:3,title:"3:index.wxml内容如下:",slug:"_3-index-wxml内容如下"},{level:3,title:"4:index.js内容如下:",slug:"_4-index-js内容如下"},{level:3,title:"5:index.wxss内容如下:",slug:"_5-index-wxss内容如下"},{level:3,title:"6:如果你需要自定义的TabBar是多少个那么你的app.json中就需要配置几个相同的TabBar如下:",slug:"_6-如果你需要自定义的tabbar是多少个那么你的app-json中就需要配置几个相同的tabbar如下"},{level:3,title:"7:这样配置后,你真正的TabBar页面就可以直接自己使用这个自定义的TabBar文件了,不需要你去写任何引用的标签",slug:"_7-这样配置后-你真正的tabbar页面就可以直接自己使用这个自定义的tabbar文件了-不需要你去写任何引用的标签"}]},{frontmatter:{},regularPath:"/blog/sentry/README-juejin.html",relativePath:"blog/sentry/README-juejin.md",key:"v-950a9b7c",path:"/blog/sentry/README-juejin.html"},{title:"No.5 学习 sentry 源码整体架构,打造属于自己的前端异常监控SDK",frontmatter:{},regularPath:"/blog/sentry/",relativePath:"blog/sentry/README.md",key:"v-008138c2",path:"/blog/sentry/",headers:[{level:2,title:"1. 前言",slug:"_1-前言"},{level:2,title:"2. 前端错误监控知识",slug:"_2-前端错误监控知识"},{level:3,title:"2.1 前端错误的分类",slug:"_2-1-前端错误的分类"},{level:3,title:"2.2 Error事件捕获代码示例",slug:"_2-2-error事件捕获代码示例"},{level:3,title:"2.3 上报错误的基本原理",slug:"_2-3-上报错误的基本原理"},{level:2,title:"3. Sentry 前端异常监控基本原理",slug:"_3-sentry-前端异常监控基本原理"},{level:2,title:"4. Sentry 源码入口和出口",slug:"_4-sentry-源码入口和出口"},{level:2,title:"5. Sentry.init 初始化 之 init 函数",slug:"_5-sentry-init-初始化-之-init-函数"},{level:3,title:"5.1 getGlobalObject、inNodeEnv 函数",slug:"_5-1-getglobalobject、innodeenv-函数"},{level:2,title:"6. initAndBind 函数之 new BrowserClient(options)",slug:"_6-initandbind-函数之-new-browserclient-options"},{level:3,title:"6.1 BrowserClient 构造函数",slug:"_6-1-browserclient-构造函数"},{level:3,title:"6.2 __extends、extendStatics 打包代码实现的继承",slug:"_6-2-extends、extendstatics-打包代码实现的继承"},{level:3,title:"6.3 BrowserBackend 构造函数 (浏览器后端)",slug:"_6-3-browserbackend-构造函数-浏览器后端"},{level:3,title:"6.4 小结1. new BrowerClient 经过一系列的继承和初始化",slug:"_6-4-小结1-new-browerclient-经过一系列的继承和初始化"},{level:2,title:"7. initAndBind 函数之 getCurrentHub().bindClient()",slug:"_7-initandbind-函数之-getcurrenthub-bindclient"},{level:3,title:"7.1 getCurrentHub 函数",slug:"_7-1-getcurrenthub-函数"},{level:3,title:"7.2 衍生的函数 getMainCarrier、getHubFromCarrier",slug:"_7-2-衍生的函数-getmaincarrier、gethubfromcarrier"},{level:3,title:"7.3 bindClient 绑定客户端在当前控制中心上",slug:"_7-3-bindclient-绑定客户端在当前控制中心上"},{level:3,title:"7.4 小结2. 经过一系列的继承和初始化",slug:"_7-4-小结2-经过一系列的继承和初始化"},{level:2,title:"8. captureMessage 函数",slug:"_8-capturemessage-函数"},{level:3,title:"8.1 FetchTransport.prototype.sendEvent",slug:"_8-1-fetchtransport-prototype-sendevent"},{level:2,title:"9. window.onerror 和 window.onunhandledrejection 捕获 错误",slug:"_9-window-onerror-和-window-onunhandledrejection-捕获-错误"},{level:3,title:"9.1 captureEvent",slug:"_9-1-captureevent"},{level:2,title:"10. 总结",slug:"_10-总结"}]},{title:"No.6 Time Line",frontmatter:{isTimeLine:!0,sidebar:!1,isComment:!1},regularPath:"/blog/timeline/",relativePath:"blog/timeline/README.md",key:"v-fc42184a",path:"/blog/timeline/",headers:[{level:2,title:"Time Line",slug:"time-line"}]},{title:"No.7 学习 underscore ,打造属于自己的函数式编程类库",frontmatter:{},regularPath:"/blog/underscore/",relativePath:"blog/underscore/README.md",key:"v-76560d69",path:"/blog/underscore/",headers:[{level:2,title:"1. 前言",slug:"_1-前言"},{level:2,title:"2. 链式调用",slug:"_2-链式调用"},{level:2,title:"3. _ 函数对象 支持OOP",slug:"_3-函数对象-支持oop"},{level:2,title:"4. 基于流的编程",slug:"_4-基于流的编程"},{level:2,title:"5. _.mixin 挂载所有的静态方法到 _.prototype, 也可以挂载自定义的方法",slug:"_5-mixin-挂载所有的静态方法到-prototype-也可以挂载自定义的方法"},{level:3,title:"5.1 _.mixin 挂载自定义方法",slug:"_5-1-mixin-挂载自定义方法"},{level:3,title:"5.2 _.functions(obj)",slug:"_5-2-functions-obj"},{level:3,title:"5.3 underscore.js 究竟在_和_.prototype挂载了多少方法和属性",slug:"_5-3-underscore-js-究竟在-和-prototype挂载了多少方法和属性"},{level:2,title:"6. 整体架构概览",slug:"_6-整体架构概览"},{level:3,title:"6.1 匿名函数自执行",slug:"_6-1-匿名函数自执行"},{level:3,title:"6.2 root 处理",slug:"_6-2-root-处理"},{level:3,title:"6.3 导出",slug:"_6-3-导出"},{level:3,title:"6.4 支持 amd 模块化规范",slug:"_6-4-支持-amd-模块化规范"},{level:3,title:"6.5 _.noConflict 防冲突函数",slug:"_6-5-noconflict-防冲突函数"},{level:2,title:"7. 总结",slug:"_7-总结"}]},{title:"小程序3D引擎",frontmatter:{},regularPath:"/engine/",relativePath:"engine/README.md",key:"v-219b55dc",path:"/engine/",headers:[{level:2,title:"小程序3D引擎",slug:"小程序3d引擎"}]},{title:"No.8 学习 vuex ,打造属于自己的状态管理库",frontmatter:{},regularPath:"/blog/vuex/",relativePath:"blog/vuex/README.md",key:"v-b0fff48e",path:"/blog/vuex/",headers:[{level:2,title:"前言",slug:"前言"},{level:2,title:"chrome 浏览器调试 vuex 源码方法",slug:"chrome-浏览器调试-vuex-源码方法"},{level:3,title:"顺便提一下调试 vue 源码(v2.6.10)的方法",slug:"顺便提一下调试-vue-源码-v2-6-10-的方法"},{level:2,title:"vuex 原理",slug:"vuex-原理"},{level:2,title:"Vue.use 安装",slug:"vue-use-安装"},{level:3,title:"install 函数",slug:"install-函数"},{level:3,title:"applyMixin 函数",slug:"applymixin-函数"},{level:2,title:"Vuex.Store 构造函数",slug:"vuex-store-构造函数"},{level:3,title:"class ModuleCollection",slug:"class-modulecollection"},{level:3,title:"installModule 函数",slug:"installmodule-函数"},{level:3,title:"resetStoreVM 函数",slug:"resetstorevm-函数"},{level:2,title:"Vuex.Store 实例方法",slug:"vuex-store-实例方法"},{level:3,title:"commit",slug:"commit"},{level:3,title:"dispatch",slug:"dispatch"},{level:3,title:"replaceState",slug:"replacestate"},{level:3,title:"watch",slug:"watch"},{level:3,title:"subscribe",slug:"subscribe"},{level:3,title:"subscribeAction",slug:"subscribeaction"},{level:3,title:"registerModule",slug:"registermodule"},{level:3,title:"unregisterModule",slug:"unregistermodule"},{level:3,title:"hotUpdate",slug:"hotupdate"},{level:2,title:"组件绑定的辅助函数",slug:"组件绑定的辅助函数"},{level:3,title:"mapState",slug:"mapstate"},{level:3,title:"mapGetters",slug:"mapgetters"},{level:3,title:"mapActions",slug:"mapactions"},{level:3,title:"mapMutations",slug:"mapmutations"},{level:3,title:"createNamespacedHelpers",slug:"createnamespacedhelpers"},{level:2,title:"插件",slug:"插件"},{level:2,title:"总结",slug:"总结"}]},{title:"第 1 题:写 React / Vue 项目时为什么要在列表组件中写 key,其作用是什么?",frontmatter:{},regularPath:"/interview/",relativePath:"interview/README.md",key:"v-0e58507c",path:"/interview/",headers:[{level:3,title:"1. 更准确",slug:"_1-更准确"},{level:3,title:"2. 更快",slug:"_2-更快"}]},{title:"保留小数",frontmatter:{title:"保留小数"},regularPath:"/interview/function/KeepDecimals.html",relativePath:"interview/function/KeepDecimals.md",key:"v-0034c43c",path:"/interview/function/KeepDecimals.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"判断当前日期",frontmatter:{title:"判断当前日期"},regularPath:"/interview/function/currNowDay.html",relativePath:"interview/function/currNowDay.md",key:"v-9d85d47c",path:"/interview/function/currNowDay.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"Promisic 回调转换",frontmatter:{title:"Promisic 回调转换"},regularPath:"/interview/function/",relativePath:"interview/function/README.md",key:"v-b57eec6e",path:"/interview/function/",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"防抖",frontmatter:{title:"防抖"},regularPath:"/interview/function/debounce.html",relativePath:"interview/function/debounce.md",key:"v-5838ba22",path:"/interview/function/debounce.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"fetch",frontmatter:{title:"fetch"},regularPath:"/interview/function/fetch.html",relativePath:"interview/function/fetch.md",key:"v-53fd0a28",path:"/interview/function/fetch.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"数组对象去重",frontmatter:{title:"数组对象去重"},regularPath:"/interview/function/filterArrayByKey.html",relativePath:"interview/function/filterArrayByKey.md",key:"v-9e30ec3c",path:"/interview/function/filterArrayByKey.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"正则表达式",frontmatter:{title:"正则表达式"},regularPath:"/interview/function/filterEmoji.html",relativePath:"interview/function/filterEmoji.md",key:"v-08844344",path:"/interview/function/filterEmoji.html",headers:[{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"过滤Emoji表情",slug:"过滤emoji表情"},{level:2,title:"过滤税号",slug:"过滤税号"},{level:2,title:"验证手机号",slug:"验证手机号"},{level:2,title:"验证邮箱",slug:"验证邮箱"},{level:2,title:"时间格式化-带时区",slug:"时间格式化-带时区"}]},{title:"过滤Emoji",frontmatter:{title:"过滤Emoji"},regularPath:"/interview/function/filterTaxNumber.html",relativePath:"interview/function/filterTaxNumber.md",key:"v-c1c04cb0",path:"/interview/function/filterTaxNumber.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"表单验证组件",frontmatter:{title:"表单验证组件"},regularPath:"/interview/function/formRule.html",relativePath:"interview/function/formRule.md",key:"v-2f1d2102",path:"/interview/function/formRule.html",headers:[{level:3,title:"1 快速上手",slug:"_1-快速上手"},{level:3,title:"2 校验规则",slug:"_2-校验规则"}]},{title:"验证emoji表情",frontmatter:{title:"验证emoji表情"},regularPath:"/interview/function/hasEmoji.html",relativePath:"interview/function/hasEmoji.md",key:"v-28e2a2fc",path:"/interview/function/hasEmoji.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"城市天气",frontmatter:{title:"城市天气"},regularPath:"/interview/function/destination.html",relativePath:"interview/function/destination.md",key:"v-4947aa84",path:"/interview/function/destination.html"},{title:"图片是否加载完成",frontmatter:{title:"图片是否加载完成"},regularPath:"/interview/function/imageLoadSuccess.html",relativePath:"interview/function/imageLoadSuccess.md",key:"v-b001937c",path:"/interview/function/imageLoadSuccess.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"Promisic 回调转换",frontmatter:{title:"Promisic 回调转换"},regularPath:"/interview/function/promisic.html",relativePath:"interview/function/promisic.md",key:"v-33bd0cfc",path:"/interview/function/promisic.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"px2rpx 单位转换",frontmatter:{title:"px2rpx 单位转换"},regularPath:"/interview/function/px2rpx.html",relativePath:"interview/function/px2rpx.md",key:"v-102cf97c",path:"/interview/function/px2rpx.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{frontmatter:{},regularPath:"/interview/function/hotelExample.html",relativePath:"interview/function/hotelExample.md",key:"v-4319977c",path:"/interview/function/hotelExample.html",headers:[{level:2,title:"title: 查询酒店示例",slug:"title-查询酒店示例"}]},{title:"查询地址",frontmatter:{title:"查询地址"},regularPath:"/interview/function/reverseAddress.html",relativePath:"interview/function/reverseAddress.md",key:"v-028d2d02",path:"/interview/function/reverseAddress.html"},{title:"节流",frontmatter:{title:"节流"},regularPath:"/interview/function/throttle.html",relativePath:"interview/function/throttle.md",key:"v-7c918242",path:"/interview/function/throttle.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"订阅消息",frontmatter:{title:"订阅消息"},regularPath:"/interview/function/subscribeMsg.html",relativePath:"interview/function/subscribeMsg.md",key:"v-3bfaefe2",path:"/interview/function/subscribeMsg.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"摄像头",frontmatter:{title:"摄像头"},regularPath:"/interview/function/videoCheck.html",relativePath:"interview/function/videoCheck.md",key:"v-76763322",path:"/interview/function/videoCheck.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"正则",frontmatter:{title:"正则"},regularPath:"/interview/function/ze.html",relativePath:"interview/function/ze.md",key:"v-66133362",path:"/interview/function/ze.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"第 1 题:写 React / Vue 项目时为什么要在列表组件中写 key,其作用是什么?",frontmatter:{},regularPath:"/interview/issues_1.html",relativePath:"interview/issues_1.md",key:"v-6a3f2ded",path:"/interview/issues_1.html",headers:[{level:3,title:"1. 更准确",slug:"_1-更准确"},{level:3,title:"2. 更快",slug:"_2-更快"}]},{title:"第 1 题:写 React / Vue 项目时为什么要在列表组件中写 key,其作用是什么?",frontmatter:{},regularPath:"/interview/issues_1/",relativePath:"interview/issues_1/README.md",key:"v-0ce9b149",path:"/interview/issues_1/",headers:[{level:3,title:"1. 更准确",slug:"_1-更准确"},{level:3,title:"2. 更快",slug:"_2-更快"}]},{title:"第 176 题:es6 及 es6+ 的能力集,你最常用的,这其中最有用的,都解决了什么问题",frontmatter:{},regularPath:"/interview/issues_176.html",relativePath:"interview/issues_176.md",key:"v-16a7e8ef",path:"/interview/issues_176.html"},{title:"第 1 题:写 React / Vue 项目时为什么要在列表组件中写 key,其作用是什么?",frontmatter:{},regularPath:"/interview/issues_2.html",relativePath:"interview/issues_2.md",key:"v-5cc50deb",path:"/interview/issues_2.html",headers:[{level:3,title:"1. 更准确",slug:"_1-更准确"},{level:3,title:"2. 更快",slug:"_2-更快"}]},{title:"第 1 题:写 React / Vue 项目时为什么要在列表组件中写 key,其作用是什么?",frontmatter:{},regularPath:"/interview/issues_2/",relativePath:"interview/issues_2/README.md",key:"v-21d279a9",path:"/interview/issues_2/",headers:[{level:3,title:"1. 更准确",slug:"_1-更准确"},{level:3,title:"2. 更快",slug:"_2-更快"}]},{title:"第 1 题:写 React / Vue 项目时为什么要在列表组件中写 key,其作用是什么?",frontmatter:{},regularPath:"/interview/issues_3.html",relativePath:"interview/issues_3.md",key:"v-4f4aede9",path:"/interview/issues_3.html",headers:[{level:3,title:"1. 更准确",slug:"_1-更准确"},{level:3,title:"2. 更快",slug:"_2-更快"}]},{title:"面试专题",frontmatter:{},regularPath:"/interview/issues_3/",relativePath:"interview/issues_3/README.md",key:"v-36bb4209",path:"/interview/issues_3/",headers:[{level:2,title:"面试专题",slug:"面试专题"}]},{frontmatter:{},regularPath:"/miniprogram/",relativePath:"miniprogram/README.md",key:"v-22f9de2c",path:"/miniprogram/",headers:[{level:2,title:"特性",slug:"特性"},{level:2,title:"小结",slug:"小结"}]},{title:"Loreal UI CLI",frontmatter:{title:"Loreal UI CLI"},regularPath:"/miniprogram/cli/",relativePath:"miniprogram/cli/README.md",key:"v-5f746735",path:"/miniprogram/cli/",headers:[{level:2,title:"特性",slug:"特性"},{level:2,title:"快速上手",slug:"快速上手"},{level:3,title:"新项目引入",slug:"新项目引入"},{level:3,title:"旧项目迁移",slug:"旧项目迁移"},{level:2,title:"lin-ui.config.json (Attributes)",slug:"lin-ui-config-json-attributes"}]},{title:"详细介绍",frontmatter:{title:"详细介绍"},regularPath:"/miniprogram/cli/introduce.html",relativePath:"miniprogram/cli/introduce.md",key:"v-33a8aa68",path:"/miniprogram/cli/introduce.html",headers:[{level:2,title:"create 命令介绍",slug:"create-命令介绍"},{level:2,title:"load 命令介绍",slug:"load-命令介绍"}]},{frontmatter:{},regularPath:"/miniprogram/cli/plugin/",relativePath:"miniprogram/cli/plugin/README.md",key:"v-15b27d76",path:"/miniprogram/cli/plugin/",headers:[{level:2,title:"Introduction",slug:"introduction"},{level:2,title:"Usage Example",slug:"usage-example"}]},{title:"过渡 Transition",frontmatter:{title:"过渡 Transition"},regularPath:"/miniprogram/component/animation/transition.html",relativePath:"miniprogram/component/animation/transition.md",key:"v-bb7c29c2",path:"/miniprogram/component/animation/transition.html",headers:[{level:2,title:"基础用法",slug:"基础用法"},{level:2,title:"动画类型",slug:"动画类型"},{level:2,title:"动画时长",slug:"动画时长"},{level:2,title:"动画事件",slug:"动画事件"},{level:2,title:"高级用法",slug:"高级用法"},{level:3,title:"案例1. SKU 选择弹框",slug:"案例1-sku-选择弹框"},{level:3,title:"案例2. 遮照页",slug:"案例2-遮照页"},{level:2,title:"动画属性",slug:"动画属性"},{level:2,title:"动画事件",slug:"动画事件-2"},{level:2,title:"动画外部样式类",slug:"动画外部样式类"},{level:2,title:"动画类型",slug:"动画类型-2"}]},{title:"按钮 Button",frontmatter:{title:"按钮 Button"},regularPath:"/miniprogram/component/basic/button.html",relativePath:"miniprogram/component/basic/button.md",key:"v-e6dc1a8e",path:"/miniprogram/component/basic/button.html",headers:[{level:2,title:"按钮类型",slug:"按钮类型"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"按钮尺寸",slug:"按钮尺寸"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置按钮长和宽",slug:"设置按钮长和宽"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"按钮形状",slug:"按钮形状"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"镂空按钮",slug:"镂空按钮"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"禁用按钮",slug:"禁用按钮"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"加载状态",slug:"加载状态"},{level:3,title:"示例代码",slug:"示例代码-7"},{level:2,title:"图标按钮",slug:"图标按钮"},{level:3,title:"示例代码",slug:"示例代码-8"},{level:2,title:"特殊样式按钮",slug:"特殊样式按钮"},{level:3,title:"示例代码",slug:"示例代码-9"},{level:2,title:"按钮微信开放能力",slug:"按钮微信开放能力"},{level:3,title:"示例代码",slug:"示例代码-10"},{level:2,title:"用户案例",slug:"用户案例"},{level:3,title:"示例代码",slug:"示例代码-11"},{level:2,title:"按钮属性",slug:"按钮属性"},{level:2,title:"按钮外部样式类",slug:"按钮外部样式类"},{level:2,title:"按钮插槽",slug:"按钮插槽"},{level:2,title:"按钮事件",slug:"按钮事件"}]},{title:"图标 Icon",frontmatter:{title:"图标 Icon"},regularPath:"/miniprogram/component/basic/icon.html",relativePath:"miniprogram/component/basic/icon.md",key:"v-bdc22caa",path:"/miniprogram/component/basic/icon.html",headers:[{level:2,title:"图标库",slug:"图标库"},{level:2,title:"图标类型",slug:"图标类型"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"图标样式",slug:"图标样式"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义图标",slug:"自定义图标"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"图标属性",slug:"图标属性"},{level:2,title:"图标外部样式类",slug:"图标外部样式类"}]},{title:"日历 Calendar",frontmatter:{title:"日历 Calendar"},regularPath:"/miniprogram/component/form/calendar.html",relativePath:"miniprogram/component/form/calendar.md",key:"v-f8803096",path:"/miniprogram/component/form/calendar.html",headers:[{level:2,title:"基本用法",slug:"基本用法"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"自定义颜色",slug:"自定义颜色"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"日历类型",slug:"日历类型"},{level:3,title:"选择多个日期",slug:"选择多个日期"},{level:3,title:"选择日期区间",slug:"选择日期区间"},{level:2,title:"自定义日期文案",slug:"自定义日期文案"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"自定义日期可选范围",slug:"自定义日期可选范围"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"自定义可选日期的数量",slug:"自定义可选日期的数量"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"自定义超过可选数量的提示语句",slug:"自定义超过可选数量的提示语句"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"自定义不足必选数量的提示语句",slug:"自定义不足必选数量的提示语句"},{level:3,title:"示例代码",slug:"示例代码-7"},{level:2,title:"自定义按钮文字",slug:"自定义按钮文字"},{level:2,title:"隐藏按钮",slug:"隐藏按钮"},{level:2,title:"日历组件属性",slug:"日历组件属性"},{level:2,title:"Day 数据结构",slug:"day-数据结构"},{level:2,title:"插槽",slug:"插槽"},{level:2,title:"日历组件事件",slug:"日历组件事件"}]},{title:"复选框 Checkbox",frontmatter:{title:"复选框 Checkbox"},regularPath:"/miniprogram/component/form/checkbox.html",relativePath:"miniprogram/component/form/checkbox.md",key:"v-e9c50156",path:"/miniprogram/component/form/checkbox.html",headers:[{level:2,title:"基础案例",slug:"基础案例"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"单个Checkbox布局方式",slug:"单个checkbox布局方式"},{level:2,title:"多个Checkbox布局方式",slug:"多个checkbox布局方式"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置选中项的颜色",slug:"设置选中项的颜色"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"设置禁用",slug:"设置禁用"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"更改Checkbox的大小",slug:"更改checkbox的大小"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"自定义checkbox的按钮部分",slug:"自定义checkbox的按钮部分"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"设置最多、最少选项",slug:"设置最多、最少选项"},{level:3,title:"示例代码",slug:"示例代码-7"},{level:2,title:"复选框组件属性",slug:"复选框组件属性"},{level:2,title:"复选框组件外部样式类(Checkbox ExternalClasses)",slug:"复选框组件外部样式类-checkbox-externalclasses"},{level:2,title:"复选框组组件外部样式类(CheckboxGroup ExternalClasses)",slug:"复选框组组件外部样式类-checkboxgroup-externalclasses"},{level:2,title:"复选框容器组件属性",slug:"复选框容器组件属性"},{level:2,title:"复选框组件事件",slug:"复选框组件事件"}]},{title:"表单 Form",frontmatter:{title:null},regularPath:"/miniprogram/component/form/form.html",relativePath:"miniprogram/component/form/form.md",key:"v-806a9216",path:"/miniprogram/component/form/form.html",headers:[{level:2,title:"基础案例",slug:"基础案例"},{level:2,title:"使用更多表单项",slug:"使用更多表单项"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"更改表单域的布局方式",slug:"更改表单域的布局方式"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置表单域标签的文字对齐方式",slug:"设置表单域标签的文字对齐方式"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"设置表单域标签的宽度",slug:"设置表单域标签的宽度"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"自定义表单域标签的内容",slug:"自定义表单域标签的内容"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"带验证的表单案例",slug:"带验证的表单案例"},{level:3,title:"基础校验",slug:"基础校验"},{level:3,title:"自定义校验",slug:"自定义校验"},{level:3,title:"复杂表单的校验案例",slug:"复杂表单的校验案例"},{level:2,title:"校验规则属性",slug:"校验规则属性"},{level:2,title:"内置校验类型",slug:"内置校验类型"},{level:2,title:"手动提交或重置表单",slug:"手动提交或重置表单"},{level:2,title:"表单容器组件属性",slug:"表单容器组件属性"},{level:2,title:"表单容器组件外部样式类",slug:"表单容器组件外部样式类"},{level:2,title:"表单容器组件事件",slug:"表单容器组件事件"},{level:2,title:"表单项组件属性",slug:"表单项组件属性"},{level:2,title:"表单项组件外部样式类",slug:"表单项组件外部样式类"},{level:2,title:"插槽 (Form Slot)",slug:"插槽-form-slot"}]},{title:"图片裁剪 ImageClipper",frontmatter:{title:"图片裁剪 ImageClipper"},regularPath:"/miniprogram/component/form/image-clipper.html",relativePath:"miniprogram/component/form/image-clipper.md",key:"v-72583b79",path:"/miniprogram/component/form/image-clipper.html",headers:[{level:2,title:"介绍",slug:"介绍"},{level:2,title:"基础使用",slug:"基础使用"},{level:3,title:"代码演示",slug:"代码演示"},{level:2,title:"页面内选择图片",slug:"页面内选择图片"},{level:3,title:"代码演示",slug:"代码演示-2"},{level:2,title:"自定义工具栏",slug:"自定义工具栏"},{level:3,title:"代码演示",slug:"代码演示-3"},{level:2,title:"组件完整使用说明",slug:"组件完整使用说明"},{level:2,title:"组件属性",slug:"组件属性"},{level:2,title:"工具栏组件属性",slug:"工具栏组件属性"},{level:2,title:"组件外部样式类",slug:"组件外部样式类"},{level:2,title:"组件事件",slug:"组件事件"}]},{title:"输入框 Input",frontmatter:{title:"输入框 Input"},regularPath:"/miniprogram/component/form/input.html",relativePath:"miniprogram/component/form/input.md",key:"v-0d35fe4a",path:"/miniprogram/component/form/input.html",headers:[{level:2,title:"基础案例",slug:"基础案例"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"对齐方式",slug:"对齐方式"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"隐藏表单标题",slug:"隐藏表单标题"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"输入框类型",slug:"输入框类型"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"清除按钮",slug:"清除按钮"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"设置必选项",slug:"设置必选项"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"设置校验规则",slug:"设置校验规则"},{level:3,title:"示例代码",slug:"示例代码-7"},{level:2,title:"设置禁用",slug:"设置禁用"},{level:3,title:"示例代码",slug:"示例代码-8"},{level:2,title:"自定义Input组件右边部分",slug:"自定义input组件右边部分"},{level:3,title:"示例代码",slug:"示例代码-9"},{level:2,title:"自定义Input组件左边(label)部分",slug:"自定义input组件左边-label-部分"},{level:3,title:"示例代码",slug:"示例代码-10"},{level:2,title:"表单项属性",slug:"表单项属性"},{level:2,title:"表单项外部样式类",slug:"表单项外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"表单项事件",slug:"表单项事件"}]},{title:"图片选择器 ImagePicker",frontmatter:{title:"图片选择器 ImagePicker"},regularPath:"/miniprogram/component/form/image-picker.html",relativePath:"miniprogram/component/form/image-picker.md",key:"v-7b6e0375",path:"/miniprogram/component/form/image-picker.html",headers:[{level:2,title:"设置最大值",slug:"设置最大值"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"自定义每行图片的数量",slug:"自定义每行图片的数量"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置选择图片的质量",slug:"设置选择图片的质量"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"自定义图片添加按钮",slug:"自定义图片添加按钮"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"图片选择器属性",slug:"图片选择器属性"},{level:2,title:"图片选择器外部样式类",slug:"图片选择器外部样式类"},{level:2,title:"图片选择器事件",slug:"图片选择器事件"},{level:2,title:"开放函数",slug:"开放函数"}]},{title:"单选框 Radio",frontmatter:{title:"单选框 Radio"},regularPath:"/miniprogram/component/form/radio.html",relativePath:"miniprogram/component/form/radio.md",key:"v-4a892a39",path:"/miniprogram/component/form/radio.html",headers:[{level:2,title:"基本常识",slug:"基本常识"},{level:2,title:"基础案例",slug:"基础案例"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"两种模式与选中项",slug:"两种模式与选中项"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置radio-group布局方式",slug:"设置radio-group布局方式"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"设置radio布局方式",slug:"设置radio布局方式"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"设置选中项的颜色及大小",slug:"设置选中项的颜色及大小"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"设置禁用",slug:"设置禁用"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"自定义Radio的内容部分",slug:"自定义radio的内容部分"},{level:3,title:"示例代码",slug:"示例代码-7"},{level:2,title:"单选组件属性",slug:"单选组件属性"},{level:2,title:"单选组件外部样式类",slug:"单选组件外部样式类"},{level:2,title:"单项选择器组件属性",slug:"单项选择器组件属性"},{level:2,title:"单项选择器事件",slug:"单项选择器事件"}]},{title:"评分 Rate",frontmatter:{title:"评分 Rate"},regularPath:"/miniprogram/component/form/rate.html",relativePath:"miniprogram/component/form/rate.md",key:"v-b7c1c716",path:"/miniprogram/component/form/rate.html",headers:[{level:2,title:"基本用法",slug:"基本用法"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"设置默认选中数",slug:"设置默认选中数"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义组件样式",slug:"自定义组件样式"},{level:3,title:"自定义大小",slug:"自定义大小"},{level:3,title:"自定义颜色",slug:"自定义颜色"},{level:3,title:"自定义图标",slug:"自定义图标"},{level:3,title:"自定义图片",slug:"自定义图片"},{level:2,title:"设置评分元素个数",slug:"设置评分元素个数"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"禁用",slug:"禁用"},{level:2,title:"评分组件属性",slug:"评分组件属性"},{level:2,title:"评分外部样式类",slug:"评分外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"评分组件事件",slug:"评分组件事件"}]},{title:"校验规则 Rules",frontmatter:{title:"校验规则 Rules"},regularPath:"/miniprogram/component/form/rules.html",relativePath:"miniprogram/component/form/rules.md",key:"v-06a74941",path:"/miniprogram/component/form/rules.html",headers:[{level:2,title:"基本用法",slug:"基本用法"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"校验规则属性",slug:"校验规则属性"},{level:2,title:"内置校验类型",slug:"内置校验类型"},{level:2,title:"监听校验事件",slug:"监听校验事件"}]},{title:"文本域 Textarea",frontmatter:{title:"文本域 Textarea"},regularPath:"/miniprogram/component/form/textarea.html",relativePath:"miniprogram/component/form/textarea.md",key:"v-26d4fb35",path:"/miniprogram/component/form/textarea.html",headers:[{level:2,title:"基础案例",slug:"基础案例"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"显示文本计数器",slug:"显示文本计数器"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自动增高",slug:"自动增高"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"校验规则",slug:"校验规则"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"设置禁用",slug:"设置禁用"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"文本域属性",slug:"文本域属性"},{level:2,title:"文本域外部样式类",slug:"文本域外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"文本域事件",slug:"文本域事件"}]},{title:"相册Album",frontmatter:{title:"相册Album"},regularPath:"/miniprogram/component/layout/album.html",relativePath:"miniprogram/component/layout/album.md",key:"v-e9e24d76",path:"/miniprogram/component/layout/album.html",headers:[{level:2,title:"使用方法",slug:"使用方法"},{level:2,title:"",slug:"图片列表"},{level:2,title:"指定key",slug:"指定key"},{level:2,title:"图片展示",slug:"图片展示"},{level:3,title:"示例代码",slug:"示例代码"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"预览",slug:"预览"},{level:2,title:"图片尺寸",slug:"图片尺寸"},{level:2,title:"图像间隔",slug:"图像间隔"},{level:2,title:"裁剪、缩放模式",slug:"裁剪、缩放模式"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"指定最大展示图片数量",slug:"指定最大展示图片数量"},{level:2,title:"是否预览全部图片",slug:"是否预览全部图片"},{level:2,title:"设置每行显示图片数量",slug:"设置每行显示图片数量"},{level:2,title:"属性",slug:"属性"},{level:2,title:"外部样式类",slug:"外部样式类"},{level:2,title:"组件事件",slug:"组件事件"}]},{title:"卡片 Card",frontmatter:{title:"卡片 Card"},regularPath:"/miniprogram/component/layout/card.html",relativePath:"miniprogram/component/layout/card.md",key:"v-90ba0f96",path:"/miniprogram/component/layout/card.html",headers:[{level:2,title:"卡片类型",slug:"卡片类型"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"卡片的图片位置",slug:"卡片的图片位置"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"纯文字卡片",slug:"纯文字卡片"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"通栏卡片",slug:"通栏卡片"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"卡片属性",slug:"卡片属性"},{level:2,title:"卡片外部样式类",slug:"卡片外部样式类"}]},{title:"折叠面板 Collapse",frontmatter:{title:"折叠面板 Collapse"},regularPath:"/miniprogram/component/layout/collapse.html",relativePath:"miniprogram/component/layout/collapse.md",key:"v-86ceafd6",path:"/miniprogram/component/layout/collapse.html",headers:[{level:2,title:"普通模式",slug:"普通模式"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"手风琴模式",slug:"手风琴模式"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义标题",slug:"自定义标题"},{level:2,title:"折叠面板属性",slug:"折叠面板属性"},{level:2,title:"折叠面板子项属性",slug:"折叠面板子项属性"},{level:2,title:"折叠面板外部样式类",slug:"折叠面板外部样式类"},{level:2,title:"折叠面板子项外部样式类",slug:"折叠面板子项外部样式类"},{level:2,title:"折叠面板事件",slug:"折叠面板事件"},{level:2,title:"折叠面板子项插槽",slug:"折叠面板子项插槽"}]},{title:"宫格 Grid",frontmatter:{title:"宫格 Grid"},regularPath:"/miniprogram/component/layout/grid.html",relativePath:"miniprogram/component/layout/grid.md",key:"v-62cc0675",path:"/miniprogram/component/layout/grid.html",headers:[{level:2,title:"基本使用",slug:"基本使用"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"设置边框",slug:"设置边框"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置每行数目",slug:"设置每行数目"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"宫格属性",slug:"宫格属性"},{level:2,title:"宫格外部样式类",slug:"宫格外部样式类"},{level:2,title:"宫格事件",slug:"宫格事件"},{level:2,title:"宫格元素属性",slug:"宫格元素属性"},{level:2,title:"宫格元素外部样式类",slug:"宫格元素外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"宫格元素事件",slug:"宫格元素事件"}]},{title:"索引列表 IndexList",frontmatter:{title:"索引列表 IndexList"},regularPath:"/miniprogram/component/layout/index-list.html",relativePath:"miniprogram/component/layout/index-list.md",key:"v-7a84cc95",path:"/miniprogram/component/layout/index-list.html",headers:[{level:2,title:"核心概念",slug:"核心概念"},{level:2,title:"基本用法",slug:"基本用法"},{level:2,title:"高级用法",slug:"高级用法"},{level:2,title:"索引列表属性",slug:"索引列表属性"},{level:2,title:"索引列表外部样式类",slug:"索引列表外部样式类"},{level:2,title:"索引列表事件",slug:"索引列表事件"},{level:2,title:"索引列表插槽",slug:"索引列表插槽"},{level:2,title:"索引锚点插槽",slug:"索引锚点插槽"},{level:2,title:"索引列表 wx.lin 方法",slug:"索引列表-wx-lin-方法"}]},{title:"列表 List",frontmatter:{title:"列表 List"},regularPath:"/miniprogram/component/layout/list.html",relativePath:"miniprogram/component/layout/list.md",key:"v-22f52116",path:"/miniprogram/component/layout/list.html",headers:[{level:2,title:"列表左侧内容",slug:"列表左侧内容"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"列表右侧内容",slug:"列表右侧内容"},{level:2,title:"带图标或图片的列表",slug:"带图标或图片的列表"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义图标的列表",slug:"自定义图标的列表"},{level:2,title:"带标签的列表",slug:"带标签的列表"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"带徽标的列表",slug:"带徽标的列表"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"自定义子节点的列表",slug:"自定义子节点的列表"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"列表属性",slug:"列表属性"},{level:2,title:"列表外部样式类",slug:"列表外部样式类"},{level:2,title:"列表事件",slug:"列表事件"}]},{title:"吸顶容器 Sticky",frontmatter:{title:"吸顶容器 Sticky"},regularPath:"/miniprogram/component/layout/sticky.html",relativePath:"miniprogram/component/layout/sticky.md",key:"v-0142be95",path:"/miniprogram/component/layout/sticky.html",headers:[{level:2,title:"页面垂直滑动距离(必填)",slug:"页面垂直滑动距离-必填"},{level:3,title:"属性传值示例代码",slug:"属性传值示例代码"},{level:3,title:"wx.lin传值示例代码",slug:"wx-lin传值示例代码"},{level:2,title:"渲染模式",slug:"渲染模式"},{level:2,title:"吸顶位置",slug:"吸顶位置"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"动态修改内容",slug:"动态修改内容"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"吸顶容器属性",slug:"吸顶容器属性"},{level:2,title:"吸顶容器子项属性",slug:"吸顶容器子项属性"},{level:2,title:"吸顶容器外部样式类",slug:"吸顶容器外部样式类"},{level:2,title:"吸顶容器子项外部样式类",slug:"吸顶容器子项外部样式类"},{level:2,title:"吸顶容器事件",slug:"吸顶容器事件"},{level:2,title:"吸顶容器wx.lin方法",slug:"吸顶容器wx-lin方法"},{level:2,title:"吸顶容器子项插槽",slug:"吸顶容器子项插槽"}]},{title:"瀑布流 WaterFlow",frontmatter:{title:"瀑布流 WaterFlow"},regularPath:"/miniprogram/component/layout/water-flow.html",relativePath:"miniprogram/component/layout/water-flow.md",key:"v-795b1575",path:"/miniprogram/component/layout/water-flow.html",headers:[{level:2,title:"使用方法",slug:"使用方法"},{level:2,title:"列间距",slug:"列间距"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"瀑布流属性",slug:"瀑布流属性"},{level:2,title:"瀑布流子项事件",slug:"瀑布流子项事件"}]},{title:"胶囊栏 CapsuleBar",frontmatter:{title:"胶囊栏 CapsuleBar"},regularPath:"/miniprogram/component/nav/capsule-bar.html",relativePath:"miniprogram/component/nav/capsule-bar.md",key:"v-1b2e947b",path:"/miniprogram/component/nav/capsule-bar.html",headers:[{level:2,title:"介绍",slug:"介绍"},{level:2,title:"核心概念",slug:"核心概念"},{level:2,title:"基本用法",slug:"基本用法"},{level:2,title:"胶囊栏高度",slug:"胶囊栏高度"},{level:2,title:"高级用法",slug:"高级用法"},{level:2,title:"胶囊颜色",slug:"胶囊颜色"},{level:2,title:"自定义胶囊按钮图标",slug:"自定义胶囊按钮图标"},{level:2,title:"胶囊栏属性",slug:"胶囊栏属性"},{level:2,title:"胶囊栏外部样式类",slug:"胶囊栏外部样式类"},{level:2,title:"胶囊栏事件",slug:"胶囊栏事件"},{level:2,title:"胶囊栏插槽",slug:"胶囊栏插槽"}]},{title:"混合标签 Combined Tabs",frontmatter:{title:"混合标签 Combined Tabs"},regularPath:"/miniprogram/component/nav/combined-tabs.html",relativePath:"miniprogram/component/nav/combined-tabs.md",key:"v-b60c71ca",path:"/miniprogram/component/nav/combined-tabs.html",headers:[{level:2,title:"等宽标签",slug:"等宽标签"},{level:2,title:"标签动画",slug:"标签动画"},{level:2,title:"标签初始样式",slug:"标签初始样式"},{level:2,title:"混合标签属性",slug:"混合标签属性"},{level:2,title:"混合标签外部样式类",slug:"混合标签外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"标签页属性",slug:"标签页属性"},{level:2,title:"混合标签事件",slug:"混合标签事件"}]},{title:"选项卡 Segment",frontmatter:{title:"选项卡 Segment"},regularPath:"/miniprogram/component/nav/segment.html",relativePath:"miniprogram/component/nav/segment.md",key:"v-ec944a0a",path:"/miniprogram/component/nav/segment.html",headers:[{level:2,title:"等宽选项卡",slug:"等宽选项卡"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"选项卡位置",slug:"选项卡位置"},{level:2,title:"图标选项卡",slug:"图标选项卡"},{level:2,title:"图片选项卡",slug:"图片选项卡"},{level:2,title:"徽标选项卡",slug:"徽标选项卡"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义选项卡",slug:"自定义选项卡"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"自定义数据",slug:"自定义数据"},{level:2,title:"选项卡初始样式",slug:"选项卡初始样式"},{level:2,title:"选项卡属性",slug:"选项卡属性"},{level:2,title:"选项卡子项属性",slug:"选项卡子项属性"},{level:2,title:"选项卡外部样式类",slug:"选项卡外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"选项卡事件",slug:"选项卡事件"}]},{title:"导航栏 TabBar",frontmatter:{title:"导航栏 TabBar"},regularPath:"/miniprogram/component/nav/tab-bar.html",relativePath:"miniprogram/component/nav/tab-bar.md",key:"v-6b3df1fb",path:"/miniprogram/component/nav/tab-bar.html",headers:[{level:2,title:"介绍",slug:"介绍"},{level:2,title:"基础使用",slug:"基础使用"},{level:2,title:"自定义背景图片",slug:"自定义背景图片"},{level:2,title:"显示红点",slug:"显示红点"},{level:2,title:"导航栏属性",slug:"导航栏属性"},{level:2,title:"页面列表属性",slug:"页面列表属性"},{level:2,title:"导航栏事件",slug:"导航栏事件"}]},{title:"操作菜单 ActionSheet",frontmatter:{title:"操作菜单 ActionSheet"},regularPath:"/miniprogram/component/response/action-sheet.html",relativePath:"miniprogram/component/response/action-sheet.md",key:"v-09815a56",path:"/miniprogram/component/response/action-sheet.html",headers:[{level:2,title:"基本使用",slug:"基本使用"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"操作菜单子菜单",slug:"操作菜单子菜单"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置标题",slug:"设置标题"},{level:2,title:"点击菜单子项和取消之后的回调函数",slug:"点击菜单子项和取消之后的回调函数"},{level:2,title:"关闭操作菜单",slug:"关闭操作菜单"},{level:2,title:"外部样式类",slug:"外部样式类"},{level:2,title:"第二种用法",slug:"第二种用法"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"操作菜单属性",slug:"操作菜单属性"},{level:2,title:"操作菜单外部样式类",slug:"操作菜单外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"操作菜单子菜单组",slug:"操作菜单子菜单组"},{level:3,title:"操作菜单事件",slug:"操作菜单事件"},{level:3,title:"操作菜单API调用参数",slug:"操作菜单api调用参数"}]},{title:"模态框 Dialog",frontmatter:{title:"模态框 Dialog"},regularPath:"/miniprogram/component/response/dialog.html",relativePath:"miniprogram/component/response/dialog.md",key:"v-c0138256",path:"/miniprogram/component/response/dialog.html",headers:[{level:2,title:"模态框类型",slug:"模态框类型"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"无标题的模态弹框",slug:"无标题的模态弹框"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"修改按钮文字和颜色",slug:"修改按钮文字和颜色"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"设置子节点",slug:"设置子节点"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"锁定",slug:"锁定"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"模态框参数",slug:"模态框参数"},{level:2,title:"模态框外部样式类",slug:"模态框外部样式类"},{level:2,title:"模态框事件",slug:"模态框事件"},{level:2,title:"开放函数",slug:"开放函数"}]},{title:"标签页 Tabs",frontmatter:{title:"标签页 Tabs"},regularPath:"/miniprogram/component/nav/tabs.html",relativePath:"miniprogram/component/nav/tabs.md",key:"v-0532e68b",path:"/miniprogram/component/nav/tabs.html",headers:[{level:2,title:"等宽标签",slug:"等宽标签"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"标签页位置",slug:"标签页位置"},{level:2,title:"标签动画",slug:"标签动画"},{level:2,title:"滑动切换标签",slug:"滑动切换标签"},{level:2,title:"图标标签",slug:"图标标签"},{level:2,title:"图片资源",slug:"图片资源"},{level:2,title:"标签初始样式",slug:"标签初始样式"},{level:2,title:"标签属性",slug:"标签属性"},{level:2,title:"标签外部样式类",slug:"标签外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"标签页属性",slug:"标签页属性"},{level:2,title:"标签页事件",slug:"标签页事件"}]},{title:"消息提示 Message",frontmatter:{title:"消息提示 Message"},regularPath:"/miniprogram/component/response/message.html",relativePath:"miniprogram/component/response/message.md",key:"v-b53cbbb2",path:"/miniprogram/component/response/message.html",headers:[{level:2,title:"基本使用",slug:"基本使用"},{level:3,title:"示例代码(第一种用法)",slug:"示例代码-第一种用法"},{level:3,title:"示例代码(第二种用法)",slug:"示例代码-第二种用法"},{level:2,title:"显示消息",slug:"显示消息"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"消息内容",slug:"消息内容"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"提示类型",slug:"提示类型"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"消息提示时长",slug:"消息提示时长"},{level:2,title:"消息图标",slug:"消息图标"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"消息提示属性",slug:"消息提示属性"},{level:2,title:"消息提示外部样式类",slug:"消息提示外部样式类"}]},{title:"轻提示 Toast",frontmatter:{title:"轻提示 Toast"},regularPath:"/miniprogram/component/response/toast.html",relativePath:"miniprogram/component/response/toast.md",key:"v-8912fbb2",path:"/miniprogram/component/response/toast.html",headers:[{level:2,title:"无文字基本类型",slug:"无文字基本类型"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"icon + 文本内容的提示框",slug:"icon-文本内容的提示框"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义图片的提示框",slug:"自定义图片的提示框"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"更改文字的位置",slug:"更改文字的位置"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"提示框属性",slug:"提示框属性"},{level:2,title:"提示框外部样式类",slug:"提示框外部样式类"},{level:2,title:"icon 参数说明",slug:"icon-参数说明"},{level:2,title:"开放函数",slug:"开放函数"}]},{title:"滑动菜单 SlideView",frontmatter:{title:"滑动菜单 SlideView"},regularPath:"/miniprogram/component/response/slide-view.html",relativePath:"miniprogram/component/response/slide-view.md",key:"v-63ac2b96",path:"/miniprogram/component/response/slide-view.html",headers:[{level:2,title:"基础案例",slug:"基础案例"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"自定义阈值",slug:"自定义阈值"},{level:2,title:"自动关闭与主动关闭",slug:"自动关闭与主动关闭"},{level:2,title:"滑动菜单属性",slug:"滑动菜单属性"},{level:2,title:"滑动菜单事件",slug:"滑动菜单事件"}]},{title:"数量选择器 Counter",frontmatter:{title:"数量选择器 Counter"},regularPath:"/miniprogram/component/shopping/counter.html",relativePath:"miniprogram/component/shopping/counter.md",key:"v-66426022",path:"/miniprogram/component/shopping/counter.html",headers:[{level:2,title:"基础用法",slug:"基础用法"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"设置数量增减步长",slug:"设置数量增减步长"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置禁用状态",slug:"设置禁用状态"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"数量选择器属性",slug:"数量选择器属性"},{level:2,title:"数量选择器外部样式类",slug:"数量选择器外部样式类"},{level:2,title:"数量选择器事件",slug:"数量选择器事件"}]},{title:"价格 Price",frontmatter:{title:"价格 Price"},regularPath:"/miniprogram/component/shopping/price.html",relativePath:"miniprogram/component/shopping/price.md",key:"v-3f2d4756",path:"/miniprogram/component/shopping/price.html",headers:[{level:2,title:"价格及价格符号",slug:"价格及价格符号"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"是否为删除态价格",slug:"是否为删除态价格"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"价格小数保留位数及自动补零",slug:"价格小数保留位数及自动补零"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"价格颜色及大小",slug:"价格颜色及大小"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"价格属性",slug:"价格属性"},{level:2,title:"价格外部样式类",slug:"价格外部样式类"}]},{title:"搜索栏 SearchBar",frontmatter:{title:"搜索栏 SearchBar"},regularPath:"/miniprogram/component/shopping/search.html",relativePath:"miniprogram/component/shopping/search.md",key:"v-83988a96",path:"/miniprogram/component/shopping/search.html",headers:[{level:2,title:"基础用法",slug:"基础用法"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"更改搜索框形状及背景颜色",slug:"更改搜索框形状及背景颜色"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置地址",slug:"设置地址"},{level:3,title:"是否显示取消文字",slug:"是否显示取消文字"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:3,title:"设置插槽内容",slug:"设置插槽内容"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"搜索栏属性",slug:"搜索栏属性"},{level:2,title:"搜索栏事件",slug:"搜索栏事件"},{level:2,title:"搜索栏插槽",slug:"搜索栏插槽"},{level:2,title:"搜索栏外部样式类",slug:"搜索栏外部样式类"}]},{title:"使用说明",frontmatter:{title:"使用说明"},regularPath:"/miniprogram/component/start/info.html",relativePath:"miniprogram/component/start/info.md",key:"v-0565332e",path:"/miniprogram/component/start/info.html",headers:[{level:2,title:"图标库",slug:"图标库"},{level:2,title:"图标类型",slug:"图标类型"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"图标样式",slug:"图标样式"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义图标",slug:"自定义图标"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"图标属性",slug:"图标属性"},{level:2,title:"图标外部样式类",slug:"图标外部样式类"}]},{title:"前言",frontmatter:{title:"前言"},regularPath:"/miniprogram/component/start/start.html",relativePath:"miniprogram/component/start/start.md",key:"v-66c4aefb",path:"/miniprogram/component/start/start.html",headers:[{level:2,title:"按钮类型",slug:"按钮类型"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"按钮尺寸",slug:"按钮尺寸"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置按钮长和宽",slug:"设置按钮长和宽"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"按钮形状",slug:"按钮形状"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"镂空按钮",slug:"镂空按钮"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"禁用按钮",slug:"禁用按钮"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"加载状态",slug:"加载状态"},{level:3,title:"示例代码",slug:"示例代码-7"},{level:2,title:"图标按钮",slug:"图标按钮"},{level:3,title:"示例代码",slug:"示例代码-8"},{level:2,title:"特殊样式按钮",slug:"特殊样式按钮"},{level:3,title:"示例代码",slug:"示例代码-9"},{level:2,title:"按钮微信开放能力",slug:"按钮微信开放能力"},{level:3,title:"示例代码",slug:"示例代码-10"},{level:2,title:"用户案例",slug:"用户案例"},{level:3,title:"示例代码",slug:"示例代码-11"},{level:2,title:"按钮属性",slug:"按钮属性"},{level:2,title:"按钮外部样式类",slug:"按钮外部样式类"},{level:2,title:"按钮插槽",slug:"按钮插槽"},{level:2,title:"按钮事件",slug:"按钮事件"}]},{title:"弧形滚动弹出层 ArcPopup",frontmatter:{title:"弧形滚动弹出层 ArcPopup"},regularPath:"/miniprogram/component/view/arc-popup.html",relativePath:"miniprogram/component/view/arc-popup.md",key:"v-951bc86a",path:"/miniprogram/component/view/arc-popup.html",headers:[{level:2,title:"基础使用",slug:"基础使用"},{level:3,title:"代码演示",slug:"代码演示"},{level:2,title:"最大/小高度设置",slug:"最大-小高度设置"},{level:3,title:"代码演示",slug:"代码演示-2"},{level:2,title:"组件顶部弧度",slug:"组件顶部弧度"},{level:3,title:"代码演示",slug:"代码演示-3"},{level:2,title:"遮罩层区域透明度设置",slug:"遮罩层区域透明度设置"},{level:3,title:"代码演示",slug:"代码演示-4"},{level:2,title:"从上/下弹出",slug:"从上-下弹出"},{level:3,title:"代码演示",slug:"代码演示-5"},{level:2,title:"显示顶部内容(高级用法)",slug:"显示顶部内容-高级用法"},{level:3,title:"代码演示",slug:"代码演示-6"},{level:2,title:"案例演示",slug:"案例演示"},{level:2,title:"组件属性",slug:"组件属性"},{level:2,title:"组件外部样式类",slug:"组件外部样式类"},{level:2,title:"组件事件",slug:"组件事件"},{level:2,title:"插槽",slug:"插槽"}]},{title:"头像 Avatar",frontmatter:{title:"头像 Avatar"},regularPath:"/miniprogram/component/view/avatar.html",relativePath:"miniprogram/component/view/avatar.md",key:"v-67db8435",path:"/miniprogram/component/view/avatar.html",headers:[{level:2,title:"头像类型",slug:"头像类型"},{level:3,title:"1 图标头像(Icon)",slug:"_1-图标头像-icon"},{level:3,title:"2 图片头像",slug:"_2-图片头像"},{level:3,title:"3 open-data",slug:"_3-open-data"},{level:2,title:"头像形状",slug:"头像形状"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"头像尺寸",slug:"头像尺寸"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"头像和文本",slug:"头像和文本"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"头像属性",slug:"头像属性"},{level:2,title:"头像外部样式类",slug:"头像外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"头像事件",slug:"头像事件"}]},{title:"徽章 Badge",frontmatter:{title:"徽章 Badge"},regularPath:"/miniprogram/component/view/badge.html",relativePath:"miniprogram/component/view/badge.md",key:"v-3897e467",path:"/miniprogram/component/view/badge.html",headers:[{level:2,title:"显示徽标",slug:"显示徽标"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"数字徽标",slug:"数字徽标"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"徽标形状",slug:"徽标形状"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"数字显示方式",slug:"数字显示方式"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"自定义徽标内容",slug:"自定义徽标内容"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"红点徽标",slug:"红点徽标"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"徽标属性",slug:"徽标属性"},{level:2,title:"徽标外部样式类",slug:"徽标外部样式类"},{level:2,title:"徽标插槽",slug:"徽标插槽"},{level:2,title:"徽标事件",slug:"徽标事件"}]},{title:"圆型进度条 Circle",frontmatter:{title:"圆型进度条 Circle"},regularPath:"/miniprogram/component/view/circle.html",relativePath:"miniprogram/component/view/circle.md",key:"v-de9c5c56",path:"/miniprogram/component/view/circle.html",headers:[{level:2,title:"百分比",slug:"百分比"},{level:2,title:"外圆直径",slug:"外圆直径"},{level:2,title:"内圆直径",slug:"内圆直径"},{level:2,title:"已选择的进度条颜色",slug:"已选择的进度条颜色"},{level:2,title:"未选择的进度条颜色",slug:"未选择的进度条颜色"},{level:2,title:"中间的背景颜色",slug:"中间的背景颜色"},{level:2,title:"显示数值",slug:"显示数值"},{level:2,title:"文字颜色",slug:"文字颜色"},{level:2,title:"文字大小",slug:"文字大小"},{level:2,title:"自定义背景",slug:"自定义背景"},{level:2,title:"进度条属性",slug:"进度条属性"},{level:2,title:"外部样式类",slug:"外部样式类"},{level:2,title:"插槽",slug:"插槽"}]},{title:"倒计时 Countdown",frontmatter:{title:"倒计时 Countdown"},regularPath:"/miniprogram/component/view/countdown.html",relativePath:"miniprogram/component/view/countdown.md",key:"v-6cf6124b",path:"/miniprogram/component/view/countdown.html",headers:[{level:2,title:"目标时间",slug:"目标时间"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"自定义显示日期模板",slug:"自定义显示日期模板"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义样式",slug:"自定义样式"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"停止计时器",slug:"停止计时器"},{level:2,title:"纪念日模式",slug:"纪念日模式"},{level:2,title:"倒计时",slug:"倒计时"},{level:2,title:"倒计时外部样式类",slug:"倒计时外部样式类"},{level:2,title:"已经弃用的外部样式类",slug:"已经弃用的外部样式类"},{level:2,title:"倒计时",slug:"倒计时-2"},{level:2,title:"行为属性",slug:"行为属性"},{level:2,title:"行为事件",slug:"行为事件"},{level:2,title:"拓展",slug:"拓展"}]},{title:"加载中 Loading",frontmatter:{title:"加载中 Loading"},regularPath:"/miniprogram/component/view/loading.html",relativePath:"miniprogram/component/view/loading.md",key:"v-f7008e16",path:"/miniprogram/component/view/loading.html",headers:[{level:2,title:"加载类型",slug:"加载类型"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"加载动画大小",slug:"加载动画大小"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"自定义加载动画颜色",slug:"自定义加载动画颜色"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"自定义加载动画",slug:"自定义加载动画"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"全屏状态下的Loading",slug:"全屏状态下的loading"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"固定Loading区域",slug:"固定loading区域"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"加载中属性",slug:"加载中属性"},{level:2,title:"加载中插槽",slug:"加载中插槽"},{level:2,title:"加载中外部样式类",slug:"加载中外部样式类"}]},{title:"页底提示 Loadmore",frontmatter:{title:"页底提示 Loadmore"},regularPath:"/miniprogram/component/view/loadmore.html",relativePath:"miniprogram/component/view/loadmore.md",key:"v-2e2b6335",path:"/miniprogram/component/view/loadmore.html",headers:[{level:2,title:"显示与隐藏",slug:"显示与隐藏"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"提示类型及提示文案",slug:"提示类型及提示文案"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"是否显示分割线",slug:"是否显示分割线"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"自定义提示文字颜色及字体大小",slug:"自定义提示文字颜色及字体大小"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"自定义页底加载类型",slug:"自定义页底加载类型"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"页底提示属性",slug:"页底提示属性"},{level:2,title:"页底提示事件",slug:"页底提示事件"},{level:2,title:"页底提示外部样式类",slug:"页底提示外部样式类"},{level:2,title:"页底提示插槽",slug:"页底提示插槽"}]},{title:"遮罩层 Mask",frontmatter:{title:"遮罩层 Mask"},regularPath:"/miniprogram/component/view/mask.html",relativePath:"miniprogram/component/view/mask.md",key:"v-3a3a0756",path:"/miniprogram/component/view/mask.html",headers:[{level:2,title:"基本案例",slug:"基本案例"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"自定义透明度",slug:"自定义透明度"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"设置子节点",slug:"设置子节点"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"设置子节点是否居中",slug:"设置子节点是否居中"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"锁定mask",slug:"锁定mask"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"用户案例",slug:"用户案例"},{level:3,title:"代码示例",slug:"代码示例"},{level:2,title:"遮罩层属性",slug:"遮罩层属性"},{level:2,title:"遮罩层外部样式类",slug:"遮罩层外部样式类"},{level:2,title:"遮罩层事件",slug:"遮罩层事件"}]},{title:"气泡框 Popover",frontmatter:{title:"气泡框 Popover"},regularPath:"/miniprogram/component/view/popover.html",relativePath:"miniprogram/component/view/popover.md",key:"v-60fad023",path:"/miniprogram/component/view/popover.html",headers:[{level:2,title:"基本案例",slug:"基本案例"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"设置气泡的类型",slug:"设置气泡的类型"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"气泡出现的方位",slug:"气泡出现的方位"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"气泡的背景色",slug:"气泡的背景色"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"设置子节点",slug:"设置子节点"},{level:2,title:"设置是否点击关闭",slug:"设置是否点击关闭"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"锁定Popover",slug:"锁定popover"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"气泡框属性",slug:"气泡框属性"},{level:2,title:"气泡框外部样式类",slug:"气泡框外部样式类"},{level:2,title:"气泡框事件",slug:"气泡框事件"}]},{title:"通告栏 NoticeBar",frontmatter:{title:"通告栏 NoticeBar"},regularPath:"/miniprogram/component/view/notice-bar.html",relativePath:"miniprogram/component/view/notice-bar.md",key:"v-1d4ae015",path:"/miniprogram/component/view/notice-bar.html",headers:[{level:2,title:"是否显示通告栏",slug:"是否显示通告栏"},{level:3,title:"示例代码",slug:"示例代码"},{level:3,title:"通告栏类型",slug:"通告栏类型"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"滚动速度系数",slug:"滚动速度系数"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"通告栏图标",slug:"通告栏图标"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"可关闭通告栏",slug:"可关闭通告栏"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"动态修改通告栏内容",slug:"动态修改通告栏内容"},{level:2,title:"通告栏属性",slug:"通告栏属性"},{level:2,title:"通告栏外部样式类",slug:"通告栏外部样式类"},{level:2,title:"通告栏事件",slug:"通告栏事件"},{level:2,title:"开放函数",slug:"开放函数"}]},{title:"弹出层 Popup",frontmatter:{title:"弹出层 Popup"},regularPath:"/miniprogram/component/view/popup.html",relativePath:"miniprogram/component/view/popup.md",key:"v-1d9b7615",path:"/miniprogram/component/view/popup.html",headers:[{level:2,title:"基本案例",slug:"基本案例"},{level:3,title:"代码演示",slug:"代码演示"},{level:2,title:"动画设置",slug:"动画设置"},{level:3,title:"代码演示",slug:"代码演示-2"},{level:2,title:"从不同方向弹出",slug:"从不同方向弹出"},{level:3,title:"代码演示",slug:"代码演示-3"},{level:2,title:"锁定",slug:"锁定"},{level:3,title:"代码演示",slug:"代码演示-4"},{level:2,title:"弹出层属性",slug:"弹出层属性"},{level:2,title:"弹出层外部样式类",slug:"弹出层外部样式类"},{level:2,title:"弹出层事件",slug:"弹出层事件"}]},{title:"进度条 Progress",frontmatter:{title:"进度条 Progress"},regularPath:"/miniprogram/component/view/progress.html",relativePath:"miniprogram/component/view/progress.md",key:"v-d74ef116",path:"/miniprogram/component/view/progress.html",headers:[{level:2,title:"百分比",slug:"百分比"},{level:2,title:"宽度",slug:"宽度"},{level:2,title:"圆角",slug:"圆角"},{level:2,title:"已选择的进度条颜色",slug:"已选择的进度条颜色"},{level:2,title:"背景色",slug:"背景色"},{level:2,title:"显示数值",slug:"显示数值"},{level:2,title:"文字显示位置",slug:"文字显示位置"},{level:2,title:"文字颜色",slug:"文字颜色"},{level:2,title:"文字和进度条间隔",slug:"文字和进度条间隔"},{level:2,title:"自定义子节点",slug:"自定义子节点"},{level:2,title:"进度条属性",slug:"进度条属性"},{level:2,title:"外部样式类",slug:"外部样式类"},{level:2,title:"插槽",slug:"插槽"}]},{title:"状态展示页 StatusShow",frontmatter:{title:"状态展示页 StatusShow"},regularPath:"/miniprogram/component/view/status-show.html",relativePath:"miniprogram/component/view/status-show.md",key:"v-66cb997d",path:"/miniprogram/component/view/status-show.html",headers:[{level:2,title:"展示与隐藏状态展示页",slug:"展示与隐藏状态展示页"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"状态展示类型",slug:"状态展示类型"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"按钮文案",slug:"按钮文案"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"自定义图标及文案描述",slug:"自定义图标及文案描述"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"自定义背景色",slug:"自定义背景色"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"自定义状态展示页",slug:"自定义状态展示页"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"状态展示页属性",slug:"状态展示页属性"},{level:2,title:"状态展示页外部样式类",slug:"状态展示页外部样式类"},{level:2,title:"状态展示页事件",slug:"状态展示页事件"}]},{title:"骨架屏 Skeleton",frontmatter:{title:"骨架屏 Skeleton"},regularPath:"/miniprogram/component/view/skeleton.html",relativePath:"miniprogram/component/view/skeleton.md",key:"v-16c4ab75",path:"/miniprogram/component/view/skeleton.html",headers:[{level:2,title:"基础用法",slug:"基础用法"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"设置段落占位图的行数",slug:"设置段落占位图的行数"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置段落及标题占位图宽度及高度",slug:"设置段落及标题占位图宽度及高度"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"设置头像占位图",slug:"设置头像占位图"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"展示动画效果",slug:"展示动画效果"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"骨架屏属性",slug:"骨架屏属性"},{level:2,title:"骨架屏外部样式类",slug:"骨架屏外部样式类"}]},{title:"步骤条 Steps",frontmatter:{title:"步骤条 Steps"},regularPath:"/miniprogram/component/view/steps.html",relativePath:"miniprogram/component/view/steps.md",key:"v-59ea6742",path:"/miniprogram/component/view/steps.html",headers:[{level:2,title:"基础用法",slug:"基础用法"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"设置步骤条进度",slug:"设置步骤条进度"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"设置步骤条方向及步骤条元素的最小高度",slug:"设置步骤条方向及步骤条元素的最小高度"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"设置步骤条排序",slug:"设置步骤条排序"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"设置步骤条状态",slug:"设置步骤条状态"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"点状步骤条",slug:"点状步骤条"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"步骤条图标",slug:"步骤条图标"},{level:3,title:"示例代码",slug:"示例代码-7"},{level:2,title:"步骤条激活态颜色",slug:"步骤条激活态颜色"},{level:3,title:"示例代码",slug:"示例代码-8"},{level:2,title:"自定义(步骤条节点 || 描述内容)",slug:"自定义-步骤条节点-描述内容"},{level:3,title:"示例代码",slug:"示例代码-9"},{level:2,title:"步骤条属性",slug:"步骤条属性"},{level:2,title:"步骤条元素属性",slug:"步骤条元素属性"},{level:2,title:"步骤条元素外部样式类",slug:"步骤条元素外部样式类"},{level:2,title:"步骤条元素外部样式类",slug:"步骤条元素外部样式类-2"},{level:2,title:"步骤条元素插槽",slug:"步骤条元素插槽"}]},{title:"标签 Tag",frontmatter:{title:"标签 Tag"},regularPath:"/miniprogram/component/view/tag.html",relativePath:"miniprogram/component/view/tag.md",key:"v-2c5d2939",path:"/miniprogram/component/view/tag.html",headers:[{level:2,title:"标签形状",slug:"标签形状"},{level:3,title:"示例代码",slug:"示例代码"},{level:2,title:"标签大小",slug:"标签大小"},{level:3,title:"示例代码",slug:"示例代码-2"},{level:2,title:"标签类型",slug:"标签类型"},{level:3,title:"示例代码",slug:"示例代码-3"},{level:2,title:"标签标识",slug:"标签标识"},{level:3,title:"示例代码",slug:"示例代码-4"},{level:2,title:"设置标签高度",slug:"设置标签高度"},{level:3,title:"示例代码",slug:"示例代码-5"},{level:2,title:"镂空标签",slug:"镂空标签"},{level:3,title:"示例代码",slug:"示例代码-6"},{level:2,title:"标签颜色",slug:"标签颜色"},{level:3,title:"示例代码",slug:"示例代码-7"},{level:2,title:"图标标签",slug:"图标标签"},{level:2,title:"标签禁用",slug:"标签禁用"},{level:3,title:"示例代码",slug:"示例代码-8"},{level:2,title:"标签是否可选中",slug:"标签是否可选中"},{level:3,title:"示例代码",slug:"示例代码-9"},{level:2,title:"标签属性",slug:"标签属性"},{level:2,title:"标签外部样式类",slug:"标签外部样式类"},{level:2,title:"标签插槽",slug:"标签插槽"},{level:2,title:"标签事件",slug:"标签事件"}]},{title:"快速上手",frontmatter:{title:"快速上手"},regularPath:"/miniprogram/filter/",relativePath:"miniprogram/filter/README.md",key:"v-011fb089",path:"/miniprogram/filter/",headers:[{level:2,title:"使用场景",slug:"使用场景"},{level:2,title:"快速使用",slug:"快速使用"},{level:3,title:"在wxml中使用",slug:"在wxml中使用"},{level:3,title:"在wxs中使用",slug:"在wxs中使用"},{level:2,title:"基础过滤器",slug:"基础过滤器"},{level:3,title:"String",slug:"string"},{level:3,title:"Array",slug:"array"},{level:3,title:"判断数据类型过滤器",slug:"判断数据类型过滤器"},{level:3,title:"业务型过滤器",slug:"业务型过滤器"},{level:2,title:"未来计划",slug:"未来计划"}]},{title:"Array 数组",frontmatter:{title:"Array 数组"},regularPath:"/miniprogram/filter/array.html",relativePath:"miniprogram/filter/array.md",key:"v-5c0b0306",path:"/miniprogram/filter/array.html",headers:[{level:2,title:"join",slug:"join"},{level:3,title:"语法",slug:"语法"},{level:2,title:"pop",slug:"pop"},{level:3,title:"语法",slug:"语法-2"},{level:2,title:"push",slug:"push"},{level:3,title:"语法",slug:"语法-3"},{level:2,title:"reverse",slug:"reverse"},{level:3,title:"语法",slug:"语法-4"},{level:2,title:"shift",slug:"shift"},{level:3,title:"语法",slug:"语法-5"},{level:2,title:"slice",slug:"slice"},{level:3,title:"语法",slug:"语法-6"},{level:2,title:"concat",slug:"concat"},{level:3,title:"语法",slug:"语法-7"},{level:2,title:"splice",slug:"splice"},{level:3,title:"语法",slug:"语法-8"},{level:2,title:"unshift",slug:"unshift"},{level:3,title:"语法",slug:"语法-9"},{level:2,title:"indexOf",slug:"indexof"},{level:3,title:"语法",slug:"语法-10"},{level:2,title:"lastIndexOf",slug:"lastindexof"},{level:3,title:"语法",slug:"语法-11"}]},{title:"Is 判断",frontmatter:{title:"Is 判断"},regularPath:"/miniprogram/filter/is.html",relativePath:"miniprogram/filter/is.md",key:"v-722ca9c2",path:"/miniprogram/filter/is.html",headers:[{level:2,title:"判断类型",slug:"判断类型"},{level:2,title:"语法",slug:"语法"}]},{title:"Classnames",frontmatter:{title:"Classnames"},regularPath:"/miniprogram/filter/classnames.html",relativePath:"miniprogram/filter/classnames.md",key:"v-1864c3fc",path:"/miniprogram/filter/classnames.html",headers:[{level:2,title:"示例代码",slug:"示例代码"}]},{title:"String 字符",frontmatter:{title:"String 字符"},regularPath:"/miniprogram/filter/string.html",relativePath:"miniprogram/filter/string.md",key:"v-f0de663c",path:"/miniprogram/filter/string.html",headers:[{level:2,title:"toString",slug:"tostring"},{level:3,title:"语法",slug:"语法"},{level:2,title:"valueOf",slug:"valueof"},{level:3,title:"语法",slug:"语法-2"},{level:2,title:"charAt",slug:"charat"},{level:3,title:"语法",slug:"语法-3"},{level:2,title:"indexOf",slug:"indexof"},{level:3,title:"语法",slug:"语法-4"},{level:2,title:"lastIndexOf",slug:"lastindexof"},{level:3,title:"语法",slug:"语法-5"},{level:2,title:"slice",slug:"slice"},{level:3,title:"语法",slug:"语法-6"},{level:2,title:"split",slug:"split"},{level:3,title:"语法",slug:"语法-7"},{level:2,title:"substring",slug:"substring"},{level:3,title:"语法",slug:"语法-8"},{level:2,title:"toLowerCase",slug:"tolowercase"},{level:3,title:"语法",slug:"语法-9"},{level:2,title:"toUpperCase",slug:"touppercase"},{level:3,title:"语法",slug:"语法-10"},{level:2,title:"trim",slug:"trim"},{level:3,title:"语法",slug:"语法-11"}]},{title:"Promisic 回调转换",frontmatter:{title:"Promisic 回调转换"},regularPath:"/miniprogram/function/",relativePath:"miniprogram/function/README.md",key:"v-2df40409",path:"/miniprogram/function/",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"Promisic 回调转换",frontmatter:{title:"Promisic 回调转换"},regularPath:"/miniprogram/function/promisic.html",relativePath:"miniprogram/function/promisic.md",key:"v-7a10e27c",path:"/miniprogram/function/promisic.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{title:"px2rpx 单位转换",frontmatter:{title:"px2rpx 单位转换"},regularPath:"/miniprogram/function/px2rpx.html",relativePath:"miniprogram/function/px2rpx.md",key:"v-4da29082",path:"/miniprogram/function/px2rpx.html",headers:[{level:3,title:"示例代码",slug:"示例代码"}]},{frontmatter:{},regularPath:"/miniprogram/log/",relativePath:"miniprogram/log/README.md",key:"v-004f9e26",path:"/miniprogram/log/"},{title:"常见问题",frontmatter:{title:"常见问题"},regularPath:"/miniprogram/start/QA.html",relativePath:"miniprogram/start/QA.md",key:"v-3295aed6",path:"/miniprogram/start/QA.html",headers:[{level:2,title:"在跨端框架中使用Lin-UI",slug:"在跨端框架中使用lin-ui"},{level:2,title:"组件List常见问题",slug:"组件list常见问题"},{level:2,title:"关于在小程序中将less编译成wxss",slug:"关于在小程序中将less编译成wxss"},{level:2,title:"关于自定义iconfont与lin-ui内置的iconfont相冲突的问题",slug:"关于自定义iconfont与lin-ui内置的iconfont相冲突的问题"}]},{title:"外部样式类使用",frontmatter:{title:"外部样式类使用"},regularPath:"/miniprogram/start/class.html",relativePath:"miniprogram/start/class.md",key:"v-3508e088",path:"/miniprogram/start/class.html"},{title:"快速开始",frontmatter:{title:"快速开始"},regularPath:"/miniprogram/start/",relativePath:"miniprogram/start/README.md",key:"v-3fceaa9e",path:"/miniprogram/start/",headers:[{level:2,title:"安装",slug:"安装"},{level:3,title:"方式一: 使用npm安装 (推荐)",slug:"方式一-使用npm安装-推荐"},{level:3,title:"方式二:下载代码",slug:"方式二-下载代码"},{level:2,title:"使用组件",slug:"使用组件"},{level:2,title:"自定义配置",slug:"自定义配置"},{level:3,title:"全局样式更改",slug:"全局样式更改"},{level:3,title:"按需加载组件",slug:"按需加载组件"}]},{title:"组件上手",frontmatter:{title:"组件上手"},regularPath:"/miniprogram/start/component.html",relativePath:"miniprogram/start/component.md",key:"v-90d832b0",path:"/miniprogram/start/component.html",headers:[{level:2,title:"组件的引入",slug:"组件的引入"},{level:2,title:"组件的使用",slug:"组件的使用"},{level:2,title:"组件的事件",slug:"组件的事件"},{level:2,title:"全局自定义组件",slug:"全局自定义组件"}]},{title:"事件",frontmatter:{title:"事件"},regularPath:"/miniprogram/start/event.html",relativePath:"miniprogram/start/event.md",key:"v-1a663dc8",path:"/miniprogram/start/event.html",headers:[{level:2,title:"事件绑定",slug:"事件绑定"},{level:2,title:"事件冒泡和非冒泡",slug:"事件冒泡和非冒泡"}]},{title:"贡献指南",frontmatter:{title:"贡献指南"},regularPath:"/miniprogram/start/contribute.html",relativePath:"miniprogram/start/contribute.md",key:"v-e33b2948",path:"/miniprogram/start/contribute.html",headers:[{level:2,title:"开发流程",slug:"开发流程"},{level:2,title:"分支管理",slug:"分支管理"},{level:2,title:"Bugs && Issue",slug:"bugs-issue"},{level:2,title:"Pull Request",slug:"pull-request"}]},{title:"开放函数",frontmatter:{title:"开放函数"},regularPath:"/miniprogram/start/open-function.html",relativePath:"miniprogram/start/open-function.md",key:"v-c79ea330",path:"/miniprogram/start/open-function.html",headers:[{level:2,title:"诞生背景",slug:"诞生背景"},{level:2,title:"函数规范",slug:"函数规范"},{level:3,title:"命名规范",slug:"命名规范"},{level:3,title:"文档规范",slug:"文档规范"},{level:2,title:"使用方式",slug:"使用方式"}]},{title:"wx.lin使用方法",frontmatter:{title:"wx.lin使用方法"},regularPath:"/miniprogram/start/wx.html",relativePath:"miniprogram/start/wx.md",key:"v-ab78c518",path:"/miniprogram/start/wx.html"},{frontmatter:{},regularPath:"/miniprogram/start/using.html",relativePath:"miniprogram/start/using.md",key:"v-40b3b808",path:"/miniprogram/start/using.html"},{title:"22222222",frontmatter:{},regularPath:"/notes/1.html",relativePath:"notes/1.md",key:"v-45ce9095",path:"/notes/1.html",headers:[{level:3,title:"22222222",slug:"_22222222"}]},{title:"组件库",frontmatter:{},regularPath:"/notes/2.html",relativePath:"notes/2.md",key:"v-cfa57196",path:"/notes/2.html",headers:[{level:2,title:"组件库",slug:"组件库"}]},{title:"动画库",frontmatter:{},regularPath:"/notes/3.html",relativePath:"notes/3.md",key:"v-2ae80456",path:"/notes/3.html",headers:[{level:3,title:"动画库",slug:"动画库"}]},{title:"开源作品",frontmatter:{},regularPath:"/openSource/animation/",relativePath:"openSource/animation/README.md",key:"v-ea498162",path:"/openSource/animation/"},{title:"开源作品",frontmatter:{},regularPath:"/openSource/component/",relativePath:"openSource/component/README.md",key:"v-ebe16b22",path:"/openSource/component/"},{title:"开源作品",frontmatter:{},regularPath:"/openSource/function/",relativePath:"openSource/function/README.md",key:"v-731f771a",path:"/openSource/function/"},{title:"开源作品",frontmatter:{},regularPath:"/openSource/gameEngine/",relativePath:"openSource/gameEngine/README.md",key:"v-48de67fb",path:"/openSource/gameEngine/"},{title:"开源作品",frontmatter:{},regularPath:"/openSource/martie/",relativePath:"openSource/martie/README.md",key:"v-6f9a3a3f",path:"/openSource/martie/"},{title:"开源作品",frontmatter:{},regularPath:"/openSource/start/",relativePath:"openSource/start/README.md",key:"v-91d80de2",path:"/openSource/start/"},{title:"开源作品",frontmatter:{},regularPath:"/openSource/typhon/",relativePath:"openSource/typhon/README.md",key:"v-8996fe2a",path:"/openSource/typhon/"},{title:"国内外城市列表",frontmatter:{title:"国内外城市列表"},regularPath:"/interview/function/hotel.html",relativePath:"interview/function/hotel.md",key:"v-43449878",path:"/interview/function/hotel.html"}],themeConfig:{nav:[{text:"首页",link:"/"},{text:"开源",link:"/openSource/start/"},{text:"Loreal UI组件库",link:"/miniprogram/component/basic/button"},{text:"Loreal动画库",link:"/animation/"},{text:"博客",link:"/blog/underscore/"},{text:"日记",link:"/interview/"}],sidebar:{"/openSource/":[{title:"代码人生",collapsable:!1,children:["/openSource/start/"]},{title:"组件库",collapsable:!1,children:["/openSource/component/"]},{title:"动画库",collapsable:!1,children:["/openSource/animation/"]},{title:"矩阵",collapsable:!1,children:["/openSource/martie/"]},{title:"台风",collapsable:!1,children:["/openSource/typhon/"]}],"/interview/":[{title:"工具函数",collapsable:!0,children:["/interview/function/subscribeMsg","/interview/function/px2rpx","/interview/function/promisic","/interview/function/currNowDay","/interview/function/fetch","/interview/function/filterArrayByKey","/interview/function/filterTaxNumber","/interview/function/imageLoadSuccess","/interview/function/videoCheck","/interview/function/formRule","/interview/function/destination"]},{title:"日记",collapsable:!0,children:["/interview/issues_1","/interview/issues_2","/interview/issues_3"]}],"/blog/":[{title:"日常博客",collapsable:!0,children:["/blog/axios/","/blog/koa/","/blog/lodash/","/blog/redux/","/blog/sentry/","/blog/timeline/","/blog/underscore/","/blog/vuex/","/blog/miniprogram/login","/blog/performance/1","/blog/performance/2","/blog/performance/3","/blog/performance/4","/blog/performance/5","/blog/performance/6","/blog/performance/7","/blog/performance/8","/blog/performance/9","/blog/performance/10","/blog/performance/11","/blog/performance/12","/blog/performance/13","/blog/tabbar/"]},{title:"前端训练营",collapsable:!0,children:["/blog/algorithm/greedy","/blog/JavaScript/1","/blog/JavaScript/canvas","/blog/JavaScript/git","/blog/JavaScript/eventLoop"]},{title:"算法训练营",collapsable:!0,children:["/blog/algorithm/greedy","/blog/algorithm/dp"]},{title:"Java训练营",collapsable:!0,children:["/blog/java/throughout"]}],"/miniprogram/component/":[{title:"前言",collapsable:!1,children:["/miniprogram/component/start/start","/miniprogram/component/start/info"]},{title:"基础",collapsable:!1,children:["/miniprogram/component/basic/button","/miniprogram/component/basic/icon"]},{title:"动画",collapsable:!1,children:["/miniprogram/component/animation/transition"]},{title:"布局",collapsable:!1,children:["/miniprogram/component/layout/list","/miniprogram/component/layout/index-list","/miniprogram/component/layout/grid","/miniprogram/component/layout/card","/miniprogram/component/layout/water-flow","/miniprogram/component/layout/album","/miniprogram/component/layout/sticky","/miniprogram/component/layout/collapse"]},{title:"视图",collapsable:!1,children:["/miniprogram/component/view/avatar","/miniprogram/component/view/badge","/miniprogram/component/view/countdown","/miniprogram/component/view/loading","/miniprogram/component/view/loadmore","/miniprogram/component/view/mask","/miniprogram/component/view/notice-bar","/miniprogram/component/view/popup","/miniprogram/component/view/progress","/miniprogram/component/view/status-show","/miniprogram/component/view/tag","/miniprogram/component/view/steps","/miniprogram/component/view/skeleton","/miniprogram/component/view/arc-popup","/miniprogram/component/view/circle"]},{title:"导航",collapsable:!1,children:["/miniprogram/component/nav/segment","/miniprogram/component/nav/tabs","/miniprogram/component/nav/combined-tabs","/miniprogram/component/nav/capsule-bar","/miniprogram/component/nav/tab-bar.md"]},{title:"操作反馈",collapsable:!1,children:["/miniprogram/component/response/toast","/miniprogram/component/response/dialog","/miniprogram/component/response/message","/miniprogram/component/response/slide-view","/miniprogram/component/response/action-sheet"]},{title:"表单",collapsable:!1,children:["/miniprogram/component/form/input","/miniprogram/component/form/textarea","/miniprogram/component/form/radio","/miniprogram/component/form/checkbox","/miniprogram/component/form/image-picker","/miniprogram/component/form/rules","/miniprogram/component/form/rate","/miniprogram/component/form/form","/miniprogram/component/form/image-clipper","/miniprogram/component/form/calendar"]},{title:"电商专题",collapsable:!1,children:["/miniprogram/component/shopping/price","/miniprogram/component/shopping/counter","/miniprogram/component/shopping/search"]}],"/animation/":[{title:"动画库",collapsable:!1,children:["/animation/lodash/start","/animation/lodash/cli"]},{title:"动画组件",collapsable:!1,children:["/animation/component/start"]},{title:"作品集合",collapsable:!1,children:["/animation/example/start"]}],"/miniprogram/cli/":[{title:"脚手架",collapsable:!1,children:["/miniprogram/cli/","/miniprogram/cli/introduce"]}],"/miniprogram/filter/":[{title:"过滤器",collapsable:!1,children:["/miniprogram/filter/"]},{title:"基本",collapsable:!0,children:["/miniprogram/filter/string","/miniprogram/filter/array","/miniprogram/filter/is"]},{title:"业务型",collapsable:!0,children:["/miniprogram/filter/classnames"]}]},lastUpdated:"最后更新时间",repo:"https://github.com/GitLuoSiyu",docsDir:"docs",docsBranch:"master",editLinks:!1}};n(309);Ti.component("H2Icon",(function(){return n.e(7).then(n.bind(null,442))})),Ti.component("ImgWrapper",(function(){return Promise.all([n.e(0),n.e(12)]).then(n.bind(null,443))})),Ti.component("RightMenu",(function(){return Promise.all([n.e(0),n.e(8)]).then(n.bind(null,444))})),Ti.component("Badge",(function(){return Promise.all([n.e(0),n.e(13)]).then(n.bind(null,606))})),Ti.component("CodeBlock",(function(){return Promise.all([n.e(0),n.e(14)]).then(n.bind(null,445))})),Ti.component("CodeGroup",(function(){return Promise.all([n.e(0),n.e(15)]).then(n.bind(null,446))}));n(310);var da=[{},function(e){e.Vue.mixin({computed:{$dataBlock:function(){return this.$options.__data__block__}}})},{},{},function(e){e.Vue.component("CodeCopy",fa)}],ba=[];function ya(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wa(e,t,n){return t&&_a(e.prototype,t),n&&_a(e,n),e}n(171);n(164);function xa(e,t){return(xa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n(165);function ka(e){return(ka=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Pa=n(170),Ea=n.n(Pa);function Sa(e,t){return!t||"object"!==Ea()(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Oa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ka(e);if(t){var i=ka(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sa(this,n)}}var ja=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xa(e,t)}(n,e);var t=Oa(n);function n(){return ya(this,n),t.apply(this,arguments)}return n}(function(){function e(){ya(this,e),this.store=new Ti({data:{state:{}}})}return wa(e,[{key:"$get",value:function(e){return this.store.state[e]}},{key:"$set",value:function(e,t){Ti.set(this.store.state,e,t)}},{key:"$emit",value:function(){var e;(e=this.store).$emit.apply(e,arguments)}},{key:"$on",value:function(){var e;(e=this.store).$on.apply(e,arguments)}}]),e}());Object.assign(ja.prototype,{getPageAsyncComponent:Ul,getLayoutAsyncComponent:zl,getAsyncComponent:Vl,getVueComponent:ql});var Aa={install:function(e){var t=new ja;e.$vuepress=t,e.prototype.$vuepress=t}};function Ca(e){e.beforeEach((function(t,n,r){if(La(e,t.path))r();else if(/(\/|\.html)$/.test(t.path))if(/\/$/.test(t.path)){var i=t.path.replace(/\/$/,"")+".html";La(e,i)?r(i):r()}else r();else{var o=t.path+"/",l=t.path+".html";La(e,l)?r(l):La(e,o)?r(o):r()}}))}function La(e,t){var n=t.toLowerCase();return e.options.routes.some((function(e){return e.path.toLowerCase()===n}))}var $a={props:{pageKey:String,slotKey:{type:String,default:"default"}},render:function(e){var t=this.pageKey||this.$parent.$page.key;return Gl("pageKey",t),Ti.component(t)||Ti.component(t,Ul(t)),Ti.component(t)?e(t):e("")}},Ta={functional:!0,props:{slotKey:String,required:!0},render:function(e,t){var n=t.props,r=t.slots;return e("div",{class:["content__".concat(n.slotKey)]},r()[n.slotKey])}},Ra={computed:{openInNewWindowTitle:function(){return this.$themeLocaleConfig.openNewWindowText||"(opens new window)"}}},Ma=(n(312),n(313),Object(ca.a)(Ra,(function(){var e=this.$createElement,t=this._self._c||e;return t("span",[t("svg",{staticClass:"icon outbound",attrs:{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"}},[t("path",{attrs:{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}}),this._v(" "),t("polygon",{attrs:{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"}})]),this._v(" "),t("span",{staticClass:"sr-only"},[this._v(this._s(this.openInNewWindowTitle))])])}),[],!1,null,null,null).exports);function Ia(){return(Ia=i(regeneratorRuntime.mark((function e(t){var n,r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="undefined"!=typeof window&&window.__VUEPRESS_ROUTER_BASE__?window.__VUEPRESS_ROUTER_BASE__:ga.routerBase||ga.base,Ca(r=new Pl({base:n,mode:"history",fallback:!1,routes:ma,scrollBehavior:function(e,t,n){return n||(e.hash?!Ti.$vuepress.$get("disableScrollBehavior")&&{selector:decodeURIComponent(e.hash)}:{x:0,y:0})}})),i={},e.prev=4,e.next=7,Promise.all(da.filter((function(e){return"function"==typeof e})).map((function(e){return e({Vue:Ti,options:i,router:r,siteData:ga,isServer:t})})));case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(4),console.error(e.t0);case 12:return o=new Ti(Object.assign(i,{router:r,render:function(e){return e("div",{attrs:{id:"app"}},[e("RouterView",{ref:"layout"}),e("div",{class:"global-ui"},ba.map((function(t){return e(t)})))])}})),e.abrupt("return",{app:o,router:r});case 14:case"end":return e.stop()}}),e,null,[[4,9]])})))).apply(this,arguments)}Ti.config.productionTip=!1,Ti.use(Pl),Ti.use(Aa),Ti.mixin(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ti;El(t),n.$vuepress.$set("siteData",t);var r=e(n.$vuepress.$get("siteData")),i=new r,o=Object.getOwnPropertyDescriptors(Object.getPrototypeOf(i)),l={};return Object.keys(o).reduce((function(e,t){return t.startsWith("$")&&(e[t]=o[t].get),e}),l),{computed:l}}((function(e){return function(){function t(){ya(this,t)}return wa(t,[{key:"setPage",value:function(e){this.__page=e}},{key:"$site",get:function(){return e}},{key:"$themeConfig",get:function(){return this.$site.themeConfig}},{key:"$frontmatter",get:function(){return this.$page.frontmatter}},{key:"$localeConfig",get:function(){var e,t,n=this.$site.locales,r=void 0===n?{}:n;for(var i in r)"/"===i?t=r[i]:0===this.$page.path.indexOf(i)&&(e=r[i]);return e||t||{}}},{key:"$siteTitle",get:function(){return this.$localeConfig.title||this.$site.title||""}},{key:"$canonicalUrl",get:function(){var e=this.$page.frontmatter.canonicalUrl;return"string"==typeof e&&e}},{key:"$title",get:function(){var e=this.$page,t=this.$page.frontmatter.metaTitle;if("string"==typeof t)return t;var n=this.$siteTitle,r=e.frontmatter.home?null:e.frontmatter.title||e.title;return n?r?r+" | "+n:n:r||"VuePress"}},{key:"$description",get:function(){var e=function(e){if(e){var t=e.filter((function(e){return"description"===e.name}))[0];if(t)return t.content}}(this.$page.frontmatter.meta);return e||(this.$page.frontmatter.description||this.$localeConfig.description||this.$site.description||"")}},{key:"$lang",get:function(){return this.$page.frontmatter.lang||this.$localeConfig.lang||"en-US"}},{key:"$localePath",get:function(){return this.$localeConfig.path||"/"}},{key:"$themeLocaleConfig",get:function(){return(this.$site.themeConfig.locales||{})[this.$localePath]||{}}},{key:"$page",get:function(){return this.__page?this.__page:function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.path.toLowerCase()===t.toLowerCase())return r}return{path:"",frontmatter:{}}}(this.$site.pages,this.$route.path)}}]),t}()}),ga)),Ti.component("Content",$a),Ti.component("ContentSlotsDistributor",Ta),Ti.component("OutboundLink",Ma),Ti.component("ClientOnly",{functional:!0,render:function(e,t){var n=t.parent,r=t.children;if(n._isMounted)return r;n.$once("hook:mounted",(function(){n.$forceUpdate()}))}}),Ti.component("Layout",zl("Layout")),Ti.component("NotFound",zl("NotFound")),Ti.prototype.$withBase=function(e){var t=this.$site.base;return"/"===e.charAt(0)?t+e.slice(1):e},window.__VUEPRESS__={version:"1.8.2",hash:""},function(e){return Ia.apply(this,arguments)}(!1).then((function(e){var t=e.app;e.router.onReady((function(){t.$mount("#app")}))}))}]); |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os.path
from cruds_adminlte import utils
from django import template
from django.urls import (reverse, NoReverseMatch) # django2.0
from django.db import models
from django.utils import six
from django.utils.html import escape
from django.utils.safestring import mark_safe
register = template.Library()
if hasattr(register, 'assignment_tag'):
register_tag = register.assignment_tag
else:
register_tag = register.simple_tag
@register.filter
def get_attr(obj, attr):
"""
Filter returns obj attribute.
"""
return getattr(obj, attr)
@register_tag
def crud_url(obj, action, namespace=None):
try:
nurl = utils.crud_url_name(type(obj), action)
if namespace:
nurl = namespace + ':' + nurl
if action in utils.LIST_ACTIONS:
url = reverse(nurl)
else:
url = reverse(nurl, kwargs={'pk': obj.pk})
except NoReverseMatch:
url = None
return url
@register_tag
def crud_inline_url(obj, inline, action, namespace=None):
try:
nurl = utils.crud_url_name(type(inline), action)
if namespace:
nurl = namespace + ':' + nurl
if action in ['delete', 'update']:
url = reverse(nurl, kwargs={'model_id': obj.pk,
'pk': inline.pk})
else:
url = reverse(nurl, kwargs={'model_id': obj.pk})
except NoReverseMatch:
url = None
return url
@register.filter
def format_value(obj, field_name):
"""
Simple value formatting.
If value is model instance returns link to detail view if exists.
"""
if '__' in field_name:
related_model, field_name = field_name.split('__', 1)
obj = getattr(obj, related_model)
display_func = getattr(obj, 'get_%s_display' % field_name, None)
if display_func:
return display_func()
value = getattr(obj, field_name)
if isinstance(value, models.fields.files.FieldFile):
if value:
return mark_safe('<a href="%s">%s</a>' % (
value.url,
os.path.basename(value.name),
))
else:
return ''
if isinstance(value, models.Model):
url = crud_url(value, utils.ACTION_UPDATE)
if url:
return mark_safe('<a href="%s">%s</a>' % (url, escape(value)))
else:
if hasattr(value, 'get_absolute_url'):
url = getattr(value, 'get_absolute_url')()
return mark_safe('<a href="%s">%s</a>' % (url, escape(value)))
if value is None:
value = ""
return value
@register.inclusion_tag('cruds/templatetags/crud_fields.html')
def crud_fields(obj, fields=None):
"""
Display object fields in table rows::
<table>
{% crud_fields object 'id, %}
</table>
* ``fields`` fields to include
If fields is ``None`` all fields will be displayed.
If fields is ``string`` comma separated field names will be
displayed.
if field is dictionary, key should be field name and value
field verbose name.
"""
if fields is None:
fields = utils.get_fields(type(obj))
elif isinstance(fields, six.string_types):
field_names = [f.strip() for f in fields.split(',')]
fields = utils.get_fields(type(obj), include=field_names)
return {
'object': obj,
'fields': fields,
}
@register_tag
def get_fields(model, fields=None):
"""
Assigns fields for model.
"""
include = [f.strip() for f in fields.split(',')] if fields else None
return utils.get_fields(
model,
include
)
|
'''Generalized Method of Moments, GMM, and Two-Stage Least Squares for
instrumental variables IV2SLS
Issues
------
* number of parameters, nparams, and starting values for parameters
Where to put them? start was initially taken from global scope (bug)
* When optimal weighting matrix cannot be calculated numerically
In DistQuantilesGMM, we only have one row of moment conditions, not a
moment condition for each observation, calculation for cov of moments
breaks down. iter=1 works (weights is identity matrix)
-> need method to do one iteration with an identity matrix or an
analytical weighting matrix given as parameter.
-> add result statistics for this case, e.g. cov_params, I have it in the
standalone function (and in calc_covparams which is a copy of it),
but not tested yet.
DONE `fitonce` in DistQuantilesGMM, params are the same as in direct call to fitgmm
move it to GMM class (once it's clearer for which cases I need this.)
* GMM doesn't know anything about the underlying model, e.g. y = X beta + u or panel
data model. It would be good if we can reuse methods from regressions, e.g.
predict, fitted values, calculating the error term, and some result statistics.
What's the best way to do this, multiple inheritance, outsourcing the functions,
mixins or delegation (a model creates a GMM instance just for estimation).
Unclear
-------
* dof in Hausman
- based on rank
- differs between IV2SLS method and function used with GMM or (IV2SLS)
- with GMM, covariance matrix difference has negative eigenvalues in iv example, ???
* jtest/jval
- I'm not sure about the normalization (multiply or divide by nobs) in jtest.
need a test case. Scaling of jval is irrelevant for estimation.
jval in jtest looks to large in example, but I have no idea about the size
* bse for fitonce look too large (no time for checking now)
formula for calc_cov_params for the case without optimal weighting matrix
is wrong. I don't have an estimate for omega in that case. And I'm confusing
between weights and omega, which are *not* the same in this case.
Author: josef-pktd
License: BSD (3-clause)
'''
from __future__ import print_function
from statsmodels.compat.python import lrange
import numpy as np
from scipy import optimize, stats
from statsmodels.tools.numdiff import approx_fprime, approx_hess
from statsmodels.base.model import (Model,
LikelihoodModel, LikelihoodModelResults)
from statsmodels.regression.linear_model import (OLS, RegressionResults,
RegressionResultsWrapper)
import statsmodels.stats.sandwich_covariance as smcov
from statsmodels.tools.decorators import (resettable_cache, cache_readonly)
from statsmodels.compat.numpy import np_matrix_rank
DEBUG = 0
def maxabs(x):
'''just a shortcut to np.abs(x).max()
'''
return np.abs(x).max()
class IV2SLS(LikelihoodModel):
'''
Class for instrumental variables estimation using Two-Stage Least-Squares
Parameters
----------
endog: array 1d
endogenous variable
exog : array
explanatory variables
instruments : array
instruments for explanatory variables, needs to contain those exog
variables that are not instrumented out
Notes
-----
All variables in exog are instrumented in the calculations. If variables
in exog are not supposed to be instrumented out, then these variables
need also to be included in the instrument array.
Degrees of freedom in the calculation of the standard errors uses
`df_resid = (nobs - k_vars)`.
(This corresponds to the `small` option in Stata's ivreg2.)
'''
def __init__(self, endog, exog, instrument=None):
self.instrument = instrument
super(IV2SLS, self).__init__(endog, exog)
# where is this supposed to be handled
#Note: Greene p.77/78 dof correction is not necessary (because only
# asy results), but most packages do it anyway
self.df_resid = self.exog.shape[0] - self.exog.shape[1]
#self.df_model = float(self.rank - self.k_constant)
self.df_model = float(self.exog.shape[1] - self.k_constant)
def initialize(self):
self.wendog = self.endog
self.wexog = self.exog
def whiten(self, X):
pass
def fit(self):
'''estimate model using 2SLS IV regression
Returns
-------
results : instance of RegressionResults
regression result
Notes
-----
This returns a generic RegressioResults instance as defined for the
linear models.
Parameter estimates and covariance are correct, but other results
haven't been tested yet, to seee whether they apply without changes.
'''
#Greene 5th edt., p.78 section 5.4
#move this maybe
y,x,z = self.endog, self.exog, self.instrument
# TODO: this uses "textbook" calculation, improve linalg
ztz = np.dot(z.T, z)
ztx = np.dot(z.T, x)
self.xhatparams = xhatparams = np.linalg.solve(ztz, ztx)
#print 'x.T.shape, xhatparams.shape', x.shape, xhatparams.shape
F = xhat = np.dot(z, xhatparams)
FtF = np.dot(F.T, F)
self.xhatprod = FtF #store for Housman specification test
Ftx = np.dot(F.T, x)
Fty = np.dot(F.T, y)
params = np.linalg.solve(FtF, Fty)
Ftxinv = np.linalg.inv(Ftx)
self.normalized_cov_params = np.dot(Ftxinv.T, np.dot(FtF, Ftxinv))
lfit = IVRegressionResults(self, params,
normalized_cov_params=self.normalized_cov_params)
lfit.exog_hat_params = xhatparams
lfit.exog_hat = xhat # TODO: do we want to store this, might be large
self._results = lfit # TODO : remove this
self._results_ols2nd = OLS(y, xhat).fit()
return RegressionResultsWrapper(lfit)
#copied from GLS, because I subclass currently LikelihoodModel and not GLS
def predict(self, params, exog=None):
"""
Return linear predicted values from a design matrix.
Parameters
----------
exog : array-like
Design / exogenous data
params : array-like, optional after fit has been called
Parameters of a linear model
Returns
-------
An array of fitted values
Notes
-----
If the model as not yet been fit, params is not optional.
"""
if exog is None:
exog = self.exog
return np.dot(exog, params)
#JP: this doesn't look correct for GLMAR
#SS: it needs its own predict method
if self._results is None and params is None:
raise ValueError("If the model has not been fit, then you must specify the params argument.")
if self._results is not None:
return np.dot(exog, self._results.params)
else:
return np.dot(exog, params)
class IVRegressionResults(RegressionResults):
"""
Results class for for an OLS model.
Most of the methods and attributes are inherited from RegressionResults.
The special methods that are only available for OLS are:
- get_influence
- outlier_test
- el_test
- conf_int_el
See Also
--------
RegressionResults
"""
@cache_readonly
def fvalue(self):
k_vars = len(self.params)
restriction = np.eye(k_vars)
idx_noconstant = lrange(k_vars)
del idx_noconstant[self.model.data.const_idx]
fval = self.f_test(restriction[idx_noconstant]).fvalue # without constant
return fval
def spec_hausman(self, dof=None):
'''Hausman's specification test
See Also
--------
spec_hausman : generic function for Hausman's specification test
'''
#use normalized cov_params for OLS
endog, exog = self.model.endog, self.model.exog
resols = OLS(endog, exog).fit()
normalized_cov_params_ols = resols.model.normalized_cov_params
# Stata `ivendog` doesn't use df correction for se
#se2 = resols.mse_resid #* resols.df_resid * 1. / len(endog)
se2 = resols.ssr / len(endog)
params_diff = self.params - resols.params
cov_diff = np.linalg.pinv(self.model.xhatprod) - normalized_cov_params_ols
#TODO: the following is very inefficient, solves problem (svd) twice
#use linalg.lstsq or svd directly
#cov_diff will very often be in-definite (singular)
if not dof:
dof = np_matrix_rank(cov_diff)
cov_diffpinv = np.linalg.pinv(cov_diff)
H = np.dot(params_diff, np.dot(cov_diffpinv, params_diff))/se2
pval = stats.chi2.sf(H, dof)
return H, pval, dof
# copied from regression results with small changes, no llf
def summary(self, yname=None, xname=None, title=None, alpha=.05):
"""Summarize the Regression Results
Parameters
-----------
yname : string, optional
Default is `y`
xname : list of strings, optional
Default is `var_##` for ## in p the number of regressors
title : string, optional
Title for the top table. If not None, then this replaces the
default title
alpha : float
significance level for the confidence intervals
Returns
-------
smry : Summary instance
this holds the summary tables and text, which can be printed or
converted to various output formats.
See Also
--------
statsmodels.iolib.summary.Summary : class to hold summary
results
"""
#TODO: import where we need it (for now), add as cached attributes
from statsmodels.stats.stattools import (jarque_bera,
omni_normtest, durbin_watson)
jb, jbpv, skew, kurtosis = jarque_bera(self.wresid)
omni, omnipv = omni_normtest(self.wresid)
#TODO: reuse condno from somewhere else ?
#condno = np.linalg.cond(np.dot(self.wexog.T, self.wexog))
wexog = self.model.wexog
eigvals = np.linalg.linalg.eigvalsh(np.dot(wexog.T, wexog))
eigvals = np.sort(eigvals) #in increasing order
condno = np.sqrt(eigvals[-1]/eigvals[0])
# TODO: check what is valid.
# box-pierce, breusch-pagan, durbin's h are not with endogenous on rhs
# use Cumby Huizinga 1992 instead
self.diagn = dict(jb=jb, jbpv=jbpv, skew=skew, kurtosis=kurtosis,
omni=omni, omnipv=omnipv, condno=condno,
mineigval=eigvals[0])
#TODO not used yet
#diagn_left_header = ['Models stats']
#diagn_right_header = ['Residual stats']
#TODO: requiring list/iterable is a bit annoying
#need more control over formatting
#TODO: default don't work if it's not identically spelled
top_left = [('Dep. Variable:', None),
('Model:', None),
('Method:', ['Two Stage']),
('', ['Least Squares']),
('Date:', None),
('Time:', None),
('No. Observations:', None),
('Df Residuals:', None), #[self.df_resid]), #TODO: spelling
('Df Model:', None), #[self.df_model])
]
top_right = [('R-squared:', ["%#8.3f" % self.rsquared]),
('Adj. R-squared:', ["%#8.3f" % self.rsquared_adj]),
('F-statistic:', ["%#8.4g" % self.fvalue] ),
('Prob (F-statistic):', ["%#6.3g" % self.f_pvalue]),
#('Log-Likelihood:', None), #["%#6.4g" % self.llf]),
#('AIC:', ["%#8.4g" % self.aic]),
#('BIC:', ["%#8.4g" % self.bic])
]
diagn_left = [('Omnibus:', ["%#6.3f" % omni]),
('Prob(Omnibus):', ["%#6.3f" % omnipv]),
('Skew:', ["%#6.3f" % skew]),
('Kurtosis:', ["%#6.3f" % kurtosis])
]
diagn_right = [('Durbin-Watson:', ["%#8.3f" % durbin_watson(self.wresid)]),
('Jarque-Bera (JB):', ["%#8.3f" % jb]),
('Prob(JB):', ["%#8.3g" % jbpv]),
('Cond. No.', ["%#8.3g" % condno])
]
if title is None:
title = self.model.__class__.__name__ + ' ' + "Regression Results"
#create summary table instance
from statsmodels.iolib.summary import Summary
smry = Summary()
smry.add_table_2cols(self, gleft=top_left, gright=top_right,
yname=yname, xname=xname, title=title)
smry.add_table_params(self, yname=yname, xname=xname, alpha=alpha,
use_t=True)
smry.add_table_2cols(self, gleft=diagn_left, gright=diagn_right,
yname=yname, xname=xname,
title="")
return smry
############# classes for Generalized Method of Moments GMM
_gmm_options = '''\
Options for GMM
---------------
Type of GMM
~~~~~~~~~~~
- one-step
- iterated
- CUE : not tested yet
weight matrix
~~~~~~~~~~~~~
- `weights_method` : string, defines method for robust
Options here are similar to :mod:`statsmodels.stats.robust_covariance`
default is heteroscedasticity consistent, HC0
currently available methods are
- `cov` : HC0, optionally with degrees of freedom correction
- `hac` :
- `iid` : untested, only for Z*u case, IV cases with u as error indep of Z
- `ac` : not available yet
- `cluster` : not connected yet
- others from robust_covariance
other arguments:
- `wargs` : tuple or dict, required arguments for weights_method
- `centered` : bool,
indicates whether moments are centered for the calculation of the weights
and covariance matrix, applies to all weight_methods
- `ddof` : int
degrees of freedom correction, applies currently only to `cov`
- maxlag : int
number of lags to include in HAC calculation , applies only to `hac`
- others not yet, e.g. groups for cluster robust
covariance matrix
~~~~~~~~~~~~~~~~~
The same options as for weight matrix also apply to the calculation of the
estimate of the covariance matrix of the parameter estimates.
The additional option is
- `has_optimal_weights`: If true, then the calculation of the covariance
matrix assumes that we have optimal GMM with :math:`W = S^{-1}`.
Default is True.
TODO: do we want to have a different default after `onestep`?
'''
class GMM(Model):
'''
Class for estimation by Generalized Method of Moments
needs to be subclassed, where the subclass defined the moment conditions
`momcond`
Parameters
----------
endog : array
endogenous variable, see notes
exog : array
array of exogenous variables, see notes
instrument : array
array of instruments, see notes
nmoms : None or int
number of moment conditions, if None then it is set equal to the
number of columns of instruments. Mainly needed to determin the shape
or size of start parameters and starting weighting matrix.
kwds : anything
this is mainly if additional variables need to be stored for the
calculations of the moment conditions
Returns
-------
*Attributes*
results : instance of GMMResults
currently just a storage class for params and cov_params without it's
own methods
bse : property
return bse
Notes
-----
The GMM class only uses the moment conditions and does not use any data
directly. endog, exog, instrument and kwds in the creation of the class
instance are only used to store them for access in the moment conditions.
Which of this are required and how they are used depends on the moment
conditions of the subclass.
Warning:
Options for various methods have not been fully implemented and
are still missing in several methods.
TODO:
currently onestep (maxiter=0) still produces an updated estimate of bse
and cov_params.
'''
results_class = 'GMMResults'
def __init__(self, endog, exog, instrument, k_moms=None, k_params=None,
missing='none', **kwds):
'''
maybe drop and use mixin instead
TODO: GMM doesn't really care about the data, just the moment conditions
'''
instrument = self._check_inputs(instrument, endog) # attaches if needed
super(GMM, self).__init__(endog, exog, missing=missing,
instrument=instrument)
# self.endog = endog
# self.exog = exog
# self.instrument = instrument
self.nobs = endog.shape[0]
if k_moms is not None:
self.nmoms = k_moms
elif instrument is not None:
self.nmoms = instrument.shape[1]
else:
self.nmoms = np.nan
if k_params is not None:
self.k_params = k_params
elif instrument is not None:
self.k_params = exog.shape[1]
else:
self.k_params = np.nan
self.__dict__.update(kwds)
self.epsilon_iter = 1e-6
def _check_inputs(self, instrument, endog):
if instrument is not None:
offset = np.asarray(instrument)
if offset.shape[0] != endog.shape[0]:
raise ValueError("instrument is not the same length as endog")
return instrument
def _fix_param_names(self, params, param_names=None):
# TODO: this is a temporary fix, need
xnames = self.data.xnames
if not param_names is None:
if len(params) == len(param_names):
self.data.xnames = param_names
else:
raise ValueError('param_names has the wrong length')
else:
if len(params) < len(xnames):
# cut in front for poisson multiplicative
self.data.xnames = xnames[-len(params):]
elif len(params) > len(xnames):
# cut at the end
self.data.xnames = xnames[:len(params)]
def fit(self, start_params=None, maxiter=10, inv_weights=None,
weights_method='cov', wargs=(),
has_optimal_weights=True,
optim_method='bfgs', optim_args=None):
'''
Estimate parameters using GMM and return GMMResults
TODO: weight and covariance arguments still need to be made consistent
with similar options in other models,
see RegressionResult.get_robustcov_results
Parameters
----------
start_params : array (optional)
starting value for parameters ub minimization. If None then
fitstart method is called for the starting values.
maxiter : int or 'cue'
Number of iterations in iterated GMM. The onestep estimate can be
obtained with maxiter=0 or 1. If maxiter is large, then the
iteration will stop either at maxiter or on convergence of the
parameters (TODO: no options for convergence criteria yet.)
If `maxiter == 'cue'`, the the continuously updated GMM is
calculated which updates the weight matrix during the minimization
of the GMM objective function. The CUE estimation uses the onestep
parameters as starting values.
inv_weights : None or ndarray
inverse of the starting weighting matrix. If inv_weights are not
given then the method `start_weights` is used which depends on
the subclass, for IV subclasses `inv_weights = z'z` where `z` are
the instruments, otherwise an identity matrix is used.
weights_method : string, defines method for robust
Options here are similar to :mod:`statsmodels.stats.robust_covariance`
default is heteroscedasticity consistent, HC0
currently available methods are
- `cov` : HC0, optionally with degrees of freedom correction
- `hac` :
- `iid` : untested, only for Z*u case, IV cases with u as error indep of Z
- `ac` : not available yet
- `cluster` : not connected yet
- others from robust_covariance
wargs` : tuple or dict,
required and optional arguments for weights_method
- `centered` : bool,
indicates whether moments are centered for the calculation of the weights
and covariance matrix, applies to all weight_methods
- `ddof` : int
degrees of freedom correction, applies currently only to `cov`
- `maxlag` : int
number of lags to include in HAC calculation , applies only to `hac`
- others not yet, e.g. groups for cluster robust
has_optimal_weights: If true, then the calculation of the covariance
matrix assumes that we have optimal GMM with :math:`W = S^{-1}`.
Default is True.
TODO: do we want to have a different default after `onestep`?
optim_method : string, default is 'bfgs'
numerical optimization method. Currently not all optimizers that
are available in LikelihoodModels are connected.
optim_args : dict
keyword arguments for the numerical optimizer.
Returns
-------
results : instance of GMMResults
this is also attached as attribute results
Notes
-----
Warning: One-step estimation, `maxiter` either 0 or 1, still has
problems (at least compared to Stata's gmm).
By default it uses a heteroscedasticity robust covariance matrix, but
uses the assumption that the weight matrix is optimal.
See options for cov_params in the results instance.
The same options as for weight matrix also apply to the calculation of
the estimate of the covariance matrix of the parameter estimates.
'''
# TODO: add check for correct wargs keys
# currently a misspelled key is not detected,
# because I'm still adding options
# TODO: check repeated calls to fit with different options
# arguments are dictionaries, i.e. mutable
# unit test if anything is stale or spilled over.
#bug: where does start come from ???
start = start_params # alias for renaming
if start is None:
start = self.fitstart() #TODO: temporary hack
if inv_weights is None:
inv_weights
if optim_args is None:
optim_args = {}
if not 'disp' in optim_args:
optim_args['disp'] = 1
if maxiter == 0 or maxiter == 'cue':
if inv_weights is not None:
weights = np.linalg.pinv(inv_weights)
else:
# let start_weights handle the inv=False for maxiter=0
weights = self.start_weights(inv=False)
params = self.fitgmm(start, weights=weights,
optim_method=optim_method, optim_args=optim_args)
weights_ = weights # temporary alias used in jval
else:
params, weights = self.fititer(start,
maxiter=maxiter,
start_invweights=inv_weights,
weights_method=weights_method,
wargs=wargs,
optim_method=optim_method,
optim_args=optim_args)
# TODO weights returned by fititer is inv_weights - not true anymore
# weights_ currently not necessary and used anymore
weights_ = np.linalg.pinv(weights)
if maxiter == 'cue':
#we have params from maxiter= 0 as starting value
# TODO: need to give weights options to gmmobjective_cu
params = self.fitgmm_cu(params,
optim_method=optim_method,
optim_args=optim_args)
# weights is stored as attribute
weights = self._weights_cu
#TODO: use Bunch instead ?
options_other = {'weights_method':weights_method,
'has_optimal_weights':has_optimal_weights,
'optim_method':optim_method}
# check that we have the right number of xnames
self._fix_param_names(params, param_names=None)
results = results_class_dict[self.results_class](
model = self,
params = params,
weights = weights,
wargs = wargs,
options_other = options_other,
optim_args = optim_args)
self.results = results # FIXME: remove, still keeping it temporarily
return results
def fitgmm(self, start, weights=None, optim_method='bfgs', optim_args=None):
'''estimate parameters using GMM
Parameters
----------
start : array_like
starting values for minimization
weights : array
weighting matrix for moment conditions. If weights is None, then
the identity matrix is used
Returns
-------
paramest : array
estimated parameters
Notes
-----
todo: add fixed parameter option, not here ???
uses scipy.optimize.fmin
'''
## if not fixed is None: #fixed not defined in this version
## raise NotImplementedError
# TODO: should start_weights only be in `fit`
if weights is None:
weights = self.start_weights(inv=False)
if optim_args is None:
optim_args = {}
if optim_method == 'nm':
optimizer = optimize.fmin
elif optim_method == 'bfgs':
optimizer = optimize.fmin_bfgs
# TODO: add score
optim_args['fprime'] = self.score #lambda params: self.score(params, weights)
elif optim_method == 'ncg':
optimizer = optimize.fmin_ncg
optim_args['fprime'] = self.score
elif optim_method == 'cg':
optimizer = optimize.fmin_cg
optim_args['fprime'] = self.score
elif optim_method == 'fmin_l_bfgs_b':
optimizer = optimize.fmin_l_bfgs_b
optim_args['fprime'] = self.score
elif optim_method == 'powell':
optimizer = optimize.fmin_powell
elif optim_method == 'slsqp':
optimizer = optimize.fmin_slsqp
else:
raise ValueError('optimizer method not available')
if DEBUG:
print(np.linalg.det(weights))
#TODO: add other optimization options and results
return optimizer(self.gmmobjective, start, args=(weights,),
**optim_args)
def fitgmm_cu(self, start, optim_method='bfgs', optim_args=None):
'''estimate parameters using continuously updating GMM
Parameters
----------
start : array_like
starting values for minimization
Returns
-------
paramest : array
estimated parameters
Notes
-----
todo: add fixed parameter option, not here ???
uses scipy.optimize.fmin
'''
## if not fixed is None: #fixed not defined in this version
## raise NotImplementedError
if optim_args is None:
optim_args = {}
if optim_method == 'nm':
optimizer = optimize.fmin
elif optim_method == 'bfgs':
optimizer = optimize.fmin_bfgs
optim_args['fprime'] = self.score_cu
elif optim_method == 'ncg':
optimizer = optimize.fmin_ncg
else:
raise ValueError('optimizer method not available')
#TODO: add other optimization options and results
return optimizer(self.gmmobjective_cu, start, args=(), **optim_args)
def start_weights(self, inv=True):
return np.eye(self.nmoms)
def gmmobjective(self, params, weights):
'''
objective function for GMM minimization
Parameters
----------
params : array
parameter values at which objective is evaluated
weights : array
weighting matrix
Returns
-------
jval : float
value of objective function
'''
moms = self.momcond_mean(params)
return np.dot(np.dot(moms, weights), moms)
#moms = self.momcond(params)
#return np.dot(np.dot(moms.mean(0),weights), moms.mean(0))
def gmmobjective_cu(self, params, weights_method='cov',
wargs=()):
'''
objective function for continuously updating GMM minimization
Parameters
----------
params : array
parameter values at which objective is evaluated
Returns
-------
jval : float
value of objective function
'''
moms = self.momcond(params)
inv_weights = self.calc_weightmatrix(moms, weights_method=weights_method,
wargs=wargs)
weights = np.linalg.pinv(inv_weights)
self._weights_cu = weights # store if we need it later
return np.dot(np.dot(moms.mean(0), weights), moms.mean(0))
def fititer(self, start, maxiter=2, start_invweights=None,
weights_method='cov', wargs=(), optim_method='bfgs',
optim_args=None):
'''iterative estimation with updating of optimal weighting matrix
stopping criteria are maxiter or change in parameter estimate less
than self.epsilon_iter, with default 1e-6.
Parameters
----------
start : array
starting value for parameters
maxiter : int
maximum number of iterations
start_weights : array (nmoms, nmoms)
initial weighting matrix; if None, then the identity matrix
is used
weights_method : {'cov', ...}
method to use to estimate the optimal weighting matrix,
see calc_weightmatrix for details
Returns
-------
params : array
estimated parameters
weights : array
optimal weighting matrix calculated with final parameter
estimates
Notes
-----
'''
self.history = []
momcond = self.momcond
if start_invweights is None:
w = self.start_weights(inv=True)
else:
w = start_invweights
#call fitgmm function
#args = (self.endog, self.exog, self.instrument)
#args is not used in the method version
winv_new = w
for it in range(maxiter):
winv = winv_new
w = np.linalg.pinv(winv)
#this is still calling function not method
## resgmm = fitgmm(momcond, (), start, weights=winv, fixed=None,
## weightsoptimal=False)
resgmm = self.fitgmm(start, weights=w, optim_method=optim_method,
optim_args=optim_args)
moms = momcond(resgmm)
# the following is S = cov_moments
winv_new = self.calc_weightmatrix(moms,
weights_method=weights_method,
wargs=wargs, params=resgmm)
if it > 2 and maxabs(resgmm - start) < self.epsilon_iter:
#check rule for early stopping
# TODO: set has_optimal_weights = True
break
start = resgmm
return resgmm, w
def calc_weightmatrix(self, moms, weights_method='cov', wargs=(),
params=None):
'''
calculate omega or the weighting matrix
Parameters
----------
moms : array, (nobs, nmoms)
moment conditions for all observations evaluated at a parameter
value
weights_method : string 'cov'
If method='cov' is cov then the matrix is calculated as simple
covariance of the moment conditions.
see fit method for available aoptions for the weight and covariance
matrix
wargs : tuple or dict
parameters that are required by some kernel methods to
estimate the long-run covariance. Not used yet.
Returns
-------
w : array (nmoms, nmoms)
estimate for the weighting matrix or covariance of the moment
condition
Notes
-----
currently a constant cutoff window is used
TODO: implement long-run cov estimators, kernel-based
Newey-West
Andrews
Andrews-Moy????
References
----------
Greene
Hansen, Bruce
'''
nobs, k_moms = moms.shape
# TODO: wargs are tuple or dict ?
if DEBUG:
print(' momcov wargs', wargs)
centered = not ('centered' in wargs and not wargs['centered'])
if not centered:
# caller doesn't want centered moment conditions
moms_ = moms
else:
moms_ = moms - moms.mean()
# TODO: store this outside to avoid doing this inside optimization loop
# TODO: subclasses need to be able to add weights_methods, and remove
# IVGMM can have homoscedastic (OLS),
# some options won't make sense in some cases
# possible add all here and allow subclasses to define a list
# TODO: should other weights_methods also have `ddof`
if weights_method == 'cov':
w = np.dot(moms_.T, moms_)
if 'ddof' in wargs:
# caller requests degrees of freedom correction
if wargs['ddof'] == 'k_params':
w /= (nobs - self.k_params)
else:
if DEBUG:
print(' momcov ddof', wargs['ddof'])
w /= (nobs - wargs['ddof'])
else:
# default: divide by nobs
w /= nobs
elif weights_method == 'flatkernel':
#uniform cut-off window
# This was a trial version, can use HAC with flatkernel
if not 'maxlag' in wargs:
raise ValueError('flatkernel requires maxlag')
maxlag = wargs['maxlag']
h = np.ones(maxlag + 1)
w = np.dot(moms_.T, moms_)/nobs
for i in range(1,maxlag+1):
w += (h[i] * np.dot(moms_[i:].T, moms_[:-i]) / (nobs-i))
elif weights_method == 'hac':
maxlag = wargs['maxlag']
if 'kernel' in wargs:
weights_func = wargs['kernel']
else:
weights_func = smcov.weights_bartlett
wargs['kernel'] = weights_func
w = smcov.S_hac_simple(moms_, nlags=maxlag,
weights_func=weights_func)
w /= nobs #(nobs - self.k_params)
elif weights_method == 'iid':
# only when we have instruments and residual mom = Z * u
# TODO: problem we don't have params in argument
# I cannot keep everything in here w/o params as argument
u = self.get_error(params)
if centered:
# Note: I'm not centering instruments,
# shouldn't we always center u? Ok, with centered as default
u -= u.mean(0) #demean inplace, we don't need original u
instrument = self.instrument
w = np.dot(instrument.T, instrument).dot(np.dot(u.T, u)) / nobs
if 'ddof' in wargs:
# caller requests degrees of freedom correction
if wargs['ddof'] == 'k_params':
w /= (nobs - self.k_params)
else:
# assume ddof is a number
if DEBUG:
print(' momcov ddof', wargs['ddof'])
w /= (nobs - wargs['ddof'])
else:
# default: divide by nobs
w /= nobs
else:
raise ValueError('weight method not available')
return w
def momcond_mean(self, params):
'''
mean of moment conditions,
'''
momcond = self.momcond(params)
self.nobs_moms, self.k_moms = momcond.shape
return momcond.mean(0)
def gradient_momcond(self, params, epsilon=1e-4, centered=True):
'''gradient of moment conditions
Parameters
----------
params : ndarray
parameter at which the moment conditions are evaluated
epsilon : float
stepsize for finite difference calculation
centered : bool
This refers to the finite difference calculation. If `centered`
is true, then the centered finite difference calculation is
used. Otherwise the one-sided forward differences are used.
TODO: looks like not used yet
missing argument `weights`
'''
momcond = self.momcond_mean
# TODO: approx_fprime has centered keyword
if centered:
gradmoms = (approx_fprime(params, momcond, epsilon=epsilon) +
approx_fprime(params, momcond, epsilon=-epsilon))/2
else:
gradmoms = approx_fprime(params, momcond, epsilon=epsilon)
return gradmoms
def score(self, params, weights, epsilon=None, centered=True):
deriv = approx_fprime(params, self.gmmobjective, args=(weights,),
centered=centered, epsilon=epsilon)
return deriv
def score_cu(self, params, epsilon=None, centered=True):
deriv = approx_fprime(params, self.gmmobjective_cu, args=(),
centered=centered, epsilon=epsilon)
return deriv
# TODO: wrong superclass, I want tvalues, ... right now
class GMMResults(LikelihoodModelResults):
'''just a storage class right now'''
use_t = False
def __init__(self, *args, **kwds):
self.__dict__.update(kwds)
self.nobs = self.model.nobs
self.df_resid = np.inf
self.cov_params_default = self._cov_params()
@cache_readonly
def q(self):
return self.model.gmmobjective(self.params, self.weights)
@cache_readonly
def jval(self):
# nobs_moms attached by momcond_mean
return self.q * self.model.nobs_moms
def _cov_params(self, **kwds):
#TODO add options ???)
# this should use by default whatever options have been specified in
# fit
# TODO: don't do this when we want to change options
# if hasattr(self, '_cov_params'):
# #replace with decorator later
# return self._cov_params
# set defaults based on fit arguments
if not 'wargs' in kwds:
# Note: we don't check the keys in wargs, use either all or nothing
kwds['wargs'] = self.wargs
if not 'weights_method' in kwds:
kwds['weights_method'] = self.options_other['weights_method']
if not 'has_optimal_weights' in kwds:
kwds['has_optimal_weights'] = self.options_other['has_optimal_weights']
gradmoms = self.model.gradient_momcond(self.params)
moms = self.model.momcond(self.params)
covparams = self.calc_cov_params(moms, gradmoms, **kwds)
return covparams
def calc_cov_params(self, moms, gradmoms, weights=None, use_weights=False,
has_optimal_weights=True,
weights_method='cov', wargs=()):
'''calculate covariance of parameter estimates
not all options tried out yet
If weights matrix is given, then the formula use to calculate cov_params
depends on whether has_optimal_weights is true.
If no weights are given, then the weight matrix is calculated with
the given method, and has_optimal_weights is assumed to be true.
(API Note: The latter assumption could be changed if we allow for
has_optimal_weights=None.)
'''
nobs = moms.shape[0]
if weights is None:
#omegahat = self.model.calc_weightmatrix(moms, method=method, wargs=wargs)
#has_optimal_weights = True
#add other options, Barzen, ... longrun var estimators
# TODO: this might still be inv_weights after fititer
weights = self.weights
else:
pass
#omegahat = weights #2 different names used,
#TODO: this is wrong, I need an estimate for omega
if use_weights:
omegahat = weights
else:
omegahat = self.model.calc_weightmatrix(
moms,
weights_method=weights_method,
wargs=wargs,
params=self.params)
if has_optimal_weights: #has_optimal_weights:
# TOD0 make has_optimal_weights depend on convergence or iter >2
cov = np.linalg.inv(np.dot(gradmoms.T,
np.dot(np.linalg.inv(omegahat), gradmoms)))
else:
gw = np.dot(gradmoms.T, weights)
gwginv = np.linalg.inv(np.dot(gw, gradmoms))
cov = np.dot(np.dot(gwginv, np.dot(np.dot(gw, omegahat), gw.T)), gwginv)
#cov /= nobs
return cov/nobs
@property
def bse_(self):
'''standard error of the parameter estimates
'''
return self.get_bse()
def get_bse(self, **kwds):
'''standard error of the parameter estimates with options
Parameters
----------
kwds : optional keywords
options for calculating cov_params
Returns
-------
bse : ndarray
estimated standard error of parameter estimates
'''
return np.sqrt(np.diag(self.cov_params(**kwds)))
def jtest(self):
'''overidentification test
I guess this is missing a division by nobs,
what's the normalization in jval ?
'''
jstat = self.jval
nparams = self.params.size #self.nparams
df = self.model.nmoms - nparams
return jstat, stats.chi2.sf(jstat, df), df
def compare_j(self, other):
'''overidentification test for comparing two nested gmm estimates
This assumes that some moment restrictions have been dropped in one
of the GMM estimates relative to the other.
Not tested yet
We are comparing two separately estimated models, that use different
weighting matrices. It is not guaranteed that the resulting
difference is positive.
TODO: Check in which cases Stata programs use the same weigths
'''
jstat1 = self.jval
k_moms1 = self.model.nmoms
jstat2 = other.jval
k_moms2 = other.model.nmoms
jdiff = jstat1 - jstat2
df = k_moms1 - k_moms2
if df < 0:
# possible nested in other way, TODO allow this or not
# flip sign instead of absolute
df = - df
jdiff = - jdiff
return jdiff, stats.chi2.sf(jdiff, df), df
def summary(self, yname=None, xname=None, title=None, alpha=.05):
"""Summarize the Regression Results
Parameters
-----------
yname : string, optional
Default is `y`
xname : list of strings, optional
Default is `var_##` for ## in p the number of regressors
title : string, optional
Title for the top table. If not None, then this replaces the
default title
alpha : float
significance level for the confidence intervals
Returns
-------
smry : Summary instance
this holds the summary tables and text, which can be printed or
converted to various output formats.
See Also
--------
statsmodels.iolib.summary.Summary : class to hold summary
results
"""
#TODO: add a summary text for options that have been used
jvalue, jpvalue, jdf = self.jtest()
top_left = [('Dep. Variable:', None),
('Model:', None),
('Method:', ['GMM']),
('Date:', None),
('Time:', None),
('No. Observations:', None),
#('Df Residuals:', None), #[self.df_resid]), #TODO: spelling
#('Df Model:', None), #[self.df_model])
]
top_right = [#('R-squared:', ["%#8.3f" % self.rsquared]),
#('Adj. R-squared:', ["%#8.3f" % self.rsquared_adj]),
('Hansen J:', ["%#8.4g" % jvalue] ),
('Prob (Hansen J):', ["%#6.3g" % jpvalue]),
#('F-statistic:', ["%#8.4g" % self.fvalue] ),
#('Prob (F-statistic):', ["%#6.3g" % self.f_pvalue]),
#('Log-Likelihood:', None), #["%#6.4g" % self.llf]),
#('AIC:', ["%#8.4g" % self.aic]),
#('BIC:', ["%#8.4g" % self.bic])
]
if title is None:
title = self.model.__class__.__name__ + ' ' + "Results"
#create summary table instance
from statsmodels.iolib.summary import Summary
smry = Summary()
smry.add_table_2cols(self, gleft=top_left, gright=top_right,
yname=yname, xname=xname, title=title)
smry.add_table_params(self, yname=yname, xname=xname, alpha=alpha,
use_t=False)
return smry
class IVGMM(GMM):
'''
Basic class for instrumental variables estimation using GMM
A linear function for the conditional mean is defined as default but the
methods should be overwritten by subclasses, currently `LinearIVGMM` and
`NonlinearIVGMM` are implemented as subclasses.
See Also
--------
LinearIVGMM
NonlinearIVGMM
'''
results_class = 'IVGMMResults'
def fitstart(self):
return np.zeros(self.exog.shape[1])
def start_weights(self, inv=True):
zz = np.dot(self.instrument.T, self.instrument)
nobs = self.instrument.shape[0]
if inv:
return zz / nobs
else:
return np.linalg.pinv(zz / nobs)
def get_error(self, params):
return self.endog - self.predict(params)
def predict(self, params, exog=None):
if exog is None:
exog = self.exog
return np.dot(exog, params)
def momcond(self, params):
instrument = self.instrument
return instrument * self.get_error(params)[:,None]
class LinearIVGMM(IVGMM):
"""class for linear instrumental variables models estimated with GMM
Uses closed form expression instead of nonlinear optimizers for each step
of the iterative GMM.
The model is assumed to have the following moment condition
E( z * (y - x beta)) = 0
Where `y` is the dependent endogenous variable, `x` are the explanatory
variables and `z` are the instruments. Variables in `x` that are exogenous
need also be included in `z`.
Notation Warning: our name `exog` stands for the explanatory variables,
and includes both exogenous and explanatory variables that are endogenous,
i.e. included endogenous variables
Parameters
----------
endog : array_like
dependent endogenous variable
exog : array_like
explanatory, right hand side variables, including explanatory variables
that are endogenous
instruments : array_like
Instrumental variables, variables that are exogenous to the error
in the linear model containing both included and excluded exogenous
variables
"""
def fitgmm(self, start, weights=None, optim_method=None, **kwds):
'''estimate parameters using GMM for linear model
Uses closed form expression instead of nonlinear optimizers
Parameters
----------
start : not used
starting values for minimization, not used, only for consistency
of method signature
weights : array
weighting matrix for moment conditions. If weights is None, then
the identity matrix is used
optim_method : not used,
optimization method, not used, only for consistency of method
signature
**kwds : keyword arguments
not used, will be silently ignored (for compatibility with generic)
Returns
-------
paramest : array
estimated parameters
'''
## if not fixed is None: #fixed not defined in this version
## raise NotImplementedError
# TODO: should start_weights only be in `fit`
if weights is None:
weights = self.start_weights(inv=False)
y, x, z = self.endog, self.exog, self.instrument
zTx = np.dot(z.T, x)
zTy = np.dot(z.T, y)
# normal equation, solved with pinv
part0 = zTx.T.dot(weights)
part1 = part0.dot(zTx)
part2 = part0.dot(zTy)
params = np.linalg.pinv(part1).dot(part2)
return params
def predict(self, params, exog=None):
if exog is None:
exog = self.exog
return np.dot(exog, params)
def gradient_momcond(self, params, **kwds):
# **kwds for compatibility not used
x, z = self.exog, self.instrument
gradmoms = -np.dot(z.T, x) / self.nobs
return gradmoms
def score(self, params, weights, **kwds):
# **kwds for compatibility, not used
# Note: I coud use general formula with gradient_momcond instead
x, z = self.exog, self.instrument
nobs = z.shape[0]
u = self.get_errors(params)
score = -2 * np.dot(x.T, z).dot(weights.dot(np.dot(z.T, u)))
score /= nobs * nobs
return score
class NonlinearIVGMM(IVGMM):
"""
Class for non-linear instrumental variables estimation wusing GMM
The model is assumed to have the following moment condition
E[ z * (y - f(X, beta)] = 0
Where `y` is the dependent endogenous variable, `x` are the explanatory
variables and `z` are the instruments. Variables in `x` that are exogenous
need also be included in z. `f` is a nonlinear function.
Notation Warning: our name `exog` stands for the explanatory variables,
and includes both exogenous and explanatory variables that are endogenous,
i.e. included endogenous variables
Parameters
----------
endog : array_like
dependent endogenous variable
exog : array_like
explanatory, right hand side variables, including explanatory variables
that are endogenous.
instruments : array_like
Instrumental variables, variables that are exogenous to the error
in the linear model containing both included and excluded exogenous
variables
func : callable
function for the mean or conditional expectation of the endogenous
variable. The function will be called with parameters and the array of
explanatory, right hand side variables, `func(params, exog)`
Notes
-----
This class uses numerical differences to obtain the derivative of the
objective function. If the jacobian of the conditional mean function, `func`
is available, then it can be used by subclassing this class and defining
a method `jac_func`.
TODO: check required signature of jac_error and jac_func
"""
# This should be reversed:
# NonlinearIVGMM is IVGMM and need LinearIVGMM as special case (fit, predict)
def fitstart(self):
#might not make sense for more general functions
return np.zeros(self.exog.shape[1])
def __init__(self, endog, exog, instrument, func, **kwds):
self.func = func
super(NonlinearIVGMM, self).__init__(endog, exog, instrument, **kwds)
def predict(self, params, exog=None):
if exog is None:
exog = self.exog
return self.func(params, exog)
#---------- the following a semi-general versions,
# TODO: move to higher class after testing
def jac_func(self, params, weights, args=None, centered=True, epsilon=None):
# TODO: Why are ther weights in the signature - copy-paste error?
deriv = approx_fprime(params, self.func, args=(self.exog,),
centered=centered, epsilon=epsilon)
return deriv
def jac_error(self, params, weights, args=None, centered=True,
epsilon=None):
jac_func = self.jac_func(params, weights, args=None, centered=True,
epsilon=None)
return -jac_func
def score(self, params, weights, **kwds):
# **kwds for compatibility not used
# Note: I coud use general formula with gradient_momcond instead
z = self.instrument
nobs = z.shape[0]
jac_u = self.jac_error(params, weights, args=None, epsilon=None,
centered=True)
x = -jac_u # alias, plays the same role as X in linear model
u = self.get_error(params)
score = -2 * np.dot(np.dot(x.T, z), weights).dot(np.dot(z.T, u))
score /= nobs * nobs
return score
class IVGMMResults(GMMResults):
# this assumes that we have an additive error model `(y - f(x, params))`
@cache_readonly
def fittedvalues(self):
return self.model.predict(self.params)
@cache_readonly
def resid(self):
return self.model.endog - self.fittedvalues
@cache_readonly
def ssr(self):
return (self.resid * self.resid).sum(0)
def spec_hausman(params_e, params_i, cov_params_e, cov_params_i, dof=None):
'''Hausmans specification test
Parameters
----------
params_e : array
efficient and consistent under Null hypothesis,
inconsistent under alternative hypothesis
params_i: array
consistent under Null hypothesis,
consistent under alternative hypothesis
cov_params_e : array, 2d
covariance matrix of parameter estimates for params_e
cov_params_i : array, 2d
covariance matrix of parameter estimates for params_i
example instrumental variables OLS estimator is `e`, IV estimator is `i`
Notes
-----
Todos,Issues
- check dof calculations and verify for linear case
- check one-sided hypothesis
References
----------
Greene section 5.5 p.82/83
'''
params_diff = (params_i - params_e)
cov_diff = cov_params_i - cov_params_e
#TODO: the following is very inefficient, solves problem (svd) twice
#use linalg.lstsq or svd directly
#cov_diff will very often be in-definite (singular)
if not dof:
dof = np_matrix_rank(cov_diff)
cov_diffpinv = np.linalg.pinv(cov_diff)
H = np.dot(params_diff, np.dot(cov_diffpinv, params_diff))
pval = stats.chi2.sf(H, dof)
evals = np.linalg.eigvalsh(cov_diff)
return H, pval, dof, evals
###########
class DistQuantilesGMM(GMM):
'''
Estimate distribution parameters by GMM based on matching quantiles
Currently mainly to try out different requirements for GMM when we cannot
calculate the optimal weighting matrix.
'''
def __init__(self, endog, exog, instrument, **kwds):
#TODO: something wrong with super
super(DistQuantilesGMM, self).__init__(endog, exog, instrument)
#self.func = func
self.epsilon_iter = 1e-5
self.distfn = kwds['distfn']
#done by super doesn't work yet
#TypeError: super does not take keyword arguments
self.endog = endog
#make this optional for fit
if not 'pquant' in kwds:
self.pquant = pquant = np.array([0.01, 0.05,0.1,0.4,0.6,0.9,0.95,0.99])
else:
self.pquant = pquant = kwds['pquant']
#TODO: vectorize this: use edf
self.xquant = np.array([stats.scoreatpercentile(endog, p) for p
in pquant*100])
self.nmoms = len(self.pquant)
#TODOcopied from GMM, make super work
self.endog = endog
self.exog = exog
self.instrument = instrument
self.results = GMMResults(model=self)
#self.__dict__.update(kwds)
self.epsilon_iter = 1e-6
def fitstart(self):
#todo: replace with or add call to distfn._fitstart
# added but not used during testing, avoid Travis
distfn = self.distfn
if hasattr(distfn, '_fitstart'):
start = distfn._fitstart(self.endog)
else:
start = [1]*distfn.numargs + [0.,1.]
return np.asarray(start)
def momcond(self, params): #drop distfn as argument
#, mom2, quantile=None, shape=None
'''moment conditions for estimating distribution parameters by matching
quantiles, defines as many moment conditions as quantiles.
Returns
-------
difference : array
difference between theoretical and empirical quantiles
Notes
-----
This can be used for method of moments or for generalized method of
moments.
'''
#this check looks redundant/unused know
if len(params) == 2:
loc, scale = params
elif len(params) == 3:
shape, loc, scale = params
else:
#raise NotImplementedError
pass #see whether this might work, seems to work for beta with 2 shape args
#mom2diff = np.array(distfn.stats(*params)) - mom2
#if not quantile is None:
pq, xq = self.pquant, self.xquant
#ppfdiff = distfn.ppf(pq, alpha)
cdfdiff = self.distfn.cdf(xq, *params) - pq
#return np.concatenate([mom2diff, cdfdiff[:1]])
return np.atleast_2d(cdfdiff)
def fitonce(self, start=None, weights=None, has_optimal_weights=False):
'''fit without estimating an optimal weighting matrix and return results
This is a convenience function that calls fitgmm and covparams with
a given weight matrix or the identity weight matrix.
This is useful if the optimal weight matrix is know (or is analytically
given) or if an optimal weight matrix cannot be calculated.
(Developer Notes: this function could go into GMM, but is needed in this
class, at least at the moment.)
Parameters
----------
Returns
-------
results : GMMResult instance
result instance with params and _cov_params attached
See Also
--------
fitgmm
cov_params
'''
if weights is None:
weights = np.eye(self.nmoms)
params = self.fitgmm(start=start)
# TODO: rewrite this old hack, should use fitgmm or fit maxiter=0
self.results.params = params #required before call to self.cov_params
self.results.wargs = {} #required before call to self.cov_params
self.results.options_other = {'weights_method':'cov'}
# TODO: which weights_method? There shouldn't be any needed ?
_cov_params = self.results.cov_params(weights=weights,
has_optimal_weights=has_optimal_weights)
self.results.weights = weights
self.results.jval = self.gmmobjective(params, weights)
self.results.options_other.update({'has_optimal_weights':has_optimal_weights})
return self.results
results_class_dict = {'GMMResults': GMMResults,
'IVGMMResults': IVGMMResults,
'DistQuantilesGMM': GMMResults} #TODO: should be a default
|
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'tela.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(1001, 800)
self.gridLayout = QtWidgets.QGridLayout(Dialog)
self.gridLayout.setObjectName("gridLayout")
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
self.gridLayout.addItem(spacerItem, 0, 2, 1, 1)
self.label = QtWidgets.QLabel(Dialog)
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(22)
self.label.setFont(font)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.tableView = QtWidgets.QTableView(Dialog)
font = QtGui.QFont()
font.setFamily("Arial Black")
font.setPointSize(26)
self.tableView.setFont(font)
self.tableView.setObjectName("tableView")
self.gridLayout.addWidget(self.tableView, 2, 0, 1, 4)
self.label_2 = QtWidgets.QLabel(Dialog)
font = QtGui.QFont()
font.setFamily("Arial")
font.setPointSize(22)
font.setBold(False)
font.setItalic(False)
font.setWeight(50)
self.label_2.setFont(font)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 3, 0, 1, 1)
self.listWidget = QtWidgets.QListWidget(Dialog)
self.listWidget.setObjectName("listWidget")
self.gridLayout.addWidget(self.listWidget, 5, 0, 1, 4)
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
self.label.setText(_translate("Dialog", "Informações:"))
self.label_2.setText(_translate("Dialog", "Detalhes:"))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.